summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-06-08 22:12:56 +0200
committerSimon Josefsson <simon@josefsson.org>2008-06-08 22:12:56 +0200
commitd44ffe657ea8c86e4836fbf824e65b40db0346b4 (patch)
tree857f6c724a99fa94653345b89f2c29e15228d35c /lib
parentec93110f061a3c8cc8e6c40a111924b4d334a469 (diff)
downloadgnutls-d44ffe657ea8c86e4836fbf824e65b40db0346b4.tar.gz
gnutls_x509_crt_get_extension_oid: Doc fix.
Reported by Sam Varshavchik <mrsam@courier-mta.com>.
Diffstat (limited to 'lib')
-rw-r--r--lib/x509/x509.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/x509/x509.c b/lib/x509/x509.c
index dc131d40f7..21287b8060 100644
--- a/lib/x509/x509.c
+++ b/lib/x509/x509.c
@@ -1574,7 +1574,8 @@ gnutls_x509_crt_get_extension_oid (gnutls_x509_crt_t cert, int indx,
* @cert: should contain a #gnutls_x509_crt_t structure
* @indx: Specifies which extension OID to send. Use zero to get the first one.
* @oid: a pointer to a structure to hold the OID
- * @sizeof_oid: initially holds the size of @oid
+ * @sizeof_oid: initially holds the maximum size of @oid, on return
+ * holds actual size of @oid.
* @critical: output variable with critical flag, may be NULL.
*
* This function will return the requested extension OID in the
@@ -1582,6 +1583,10 @@ gnutls_x509_crt_get_extension_oid (gnutls_x509_crt_t cert, int indx,
* be stored as a string in the provided buffer. Use
* gnutls_x509_crt_get_extension_data() to extract the data.
*
+ * If the buffer provided is not long enough to hold the output, then
+ * *@sizeof_oid is updated and %GNUTLS_E_SHORT_MEMORY_BUFFER will be
+ * returned.
+
* Return 0 on success. A negative value may be returned in case of
* parsing error. If you have reached the last extension available
* GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will be returned.