From: Nikos Mavrogiannopoulos Date: Thu, 13 Nov 2014 14:43:04 +0000 (+0100) Subject: doc update and gnutls_ocsp_resp_get_responder() will always initialized output data X-Git-Tag: gnutls_3_4_0~627 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2b24612879ba62bd8cab83df43f3a87f202c3a8;p=thirdparty%2Fgnutls.git doc update and gnutls_ocsp_resp_get_responder() will always initialized output data --- diff --git a/lib/x509/ocsp.c b/lib/x509/ocsp.c index d71ed6e211..5a5b60267b 100644 --- a/lib/x509/ocsp.c +++ b/lib/x509/ocsp.c @@ -1115,7 +1115,7 @@ int gnutls_ocsp_resp_get_version(gnutls_ocsp_resp_t resp) * will be ASCII or UTF-8 encoded, depending on the certificate data. * * If the responder ID is not a name but a hash, this function - * will return a @dn that has %NULL data. + * will return %GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE. * * The caller needs to deallocate memory by calling gnutls_free() on * @dn->data. @@ -1135,6 +1135,9 @@ gnutls_ocsp_resp_get_responder(gnutls_ocsp_resp_t resp, return GNUTLS_E_INVALID_REQUEST; } + dn->data = NULL; + dn->size = 0; + ret = _gnutls_x509_parse_dn (resp->basicresp, "tbsResponseData.responderID.byName", NULL, &l);