[gnutls-dev] [PATCH 1/1] crt_get_issuer_dn and friends request the wrong sized buffer

Adam Langley alangley at gmail.com
Sat May 28 20:04:46 CEST 2005

With GnuTLS 1.2.[34] calling gnutls_x509_crt_get_issuer_dn with a NULL
parameter will cause the function to request (by filling out the int
*size argument) a buffer which is one byte too small. Calling the
function again with a buffer of the requested size will fail.

When a larger buffer is provided, the returned size is one byte too
large as it includes the NUL terminator which seems to be counter to
the convention in GnuTLS.


Adam Langley                                      agl at imperialviolet.org
http://www.imperialviolet.org                       (+44) (0)7906 332512
PGP: 9113   256A   CC0F   71A6   4C84   5087   CDA5   52DF   2CB6   3D60
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnutls-1.2.4-fix-dn-requested-size.patch
Type: application/octet-stream
Size: 513 bytes
Desc: not available
URL: </pipermail/attachments/20050528/e16b1c4a/attachment.obj>

More information about the Gnutls-devel mailing list