summaryrefslogtreecommitdiff
path: root/gcr/gcr-simple-certificate.c
diff options
context:
space:
mode:
authorStef Walter <stefw@collabora.co.uk>2010-12-07 19:30:35 +0000
committerStef Walter <stefw@collabora.co.uk>2010-12-07 19:30:35 +0000
commit1589aeaa30ec641c63f1b1525eb566f3a780bf51 (patch)
tree08acbaa773c46824a71f2af90ce9ead0888e17a4 /gcr/gcr-simple-certificate.c
parent12622e94f4c2ab2acec53610bb26899204ea9aeb (diff)
downloadgcr-1589aeaa30ec641c63f1b1525eb566f3a780bf51.tar.gz
[gcr] Complete documentation for various certificate types.
Diffstat (limited to 'gcr/gcr-simple-certificate.c')
-rw-r--r--gcr/gcr-simple-certificate.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/gcr/gcr-simple-certificate.c b/gcr/gcr-simple-certificate.c
index cd76a7e..dfa6023 100644
--- a/gcr/gcr-simple-certificate.c
+++ b/gcr/gcr-simple-certificate.c
@@ -27,6 +27,19 @@
#include <string.h>
+/**
+ * SECTION:gcr-simple-certificate
+ * @title: GcrSimpleCertificate
+ * @short_description: A certificate loaded from a memory buffer
+ *
+ * An implementation of #GcrCertificate which loads a certificate from DER
+ * data already located in memory.
+ *
+ * To create a #GcrSimpleCertificate object use the
+ * gcr_simple_certificate_new() or gcr_simple_certificate_new_static()
+ * functions.
+ */
+
struct _GcrSimpleCertificatePrivate {
const guchar *data;
gsize n_data;
@@ -93,6 +106,16 @@ gcr_certificate_iface (GcrCertificateIface *iface)
* PUBLIC
*/
+/**
+ * gcr_simple_certificate_new:
+ * @data: The raw DER certificate data
+ * @n_data: The length of @data
+ *
+ * Create a new #GcrSimpleCertificate for the raw DER data. The @data memory is
+ * copied so you can dispose of it after this function returns.
+ *
+ * Returns: a new #GcrSimpleCertificate
+ */
GcrCertificate*
gcr_simple_certificate_new (gconstpointer data, gsize n_data)
{
@@ -108,6 +131,17 @@ gcr_simple_certificate_new (gconstpointer data, gsize n_data)
return GCR_CERTIFICATE (cert);
}
+/**
+ * gcr_simple_certificate_new_static:
+ * @data: The raw DER certificate data
+ * @n_data: The length of @data
+ *
+ * Create a new #GcrSimpleCertificate for the raw DER data. The @data memory is
+ * not copied and must persist until the #GcrSimpleCertificate object is
+ * destroyed.
+ *
+ * Returns: a new #GcrSimpleCertificate
+ */
GcrCertificate*
gcr_simple_certificate_new_static (gconstpointer data, gsize n_data)
{