diff options
author | Stef Walter <stefw@collabora.co.uk> | 2010-12-07 19:30:35 +0000 |
---|---|---|
committer | Stef Walter <stefw@collabora.co.uk> | 2010-12-07 19:30:35 +0000 |
commit | 1589aeaa30ec641c63f1b1525eb566f3a780bf51 (patch) | |
tree | 08acbaa773c46824a71f2af90ce9ead0888e17a4 /gcr/gcr-simple-certificate.c | |
parent | 12622e94f4c2ab2acec53610bb26899204ea9aeb (diff) | |
download | gcr-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.c | 34 |
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) { |