]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
doc update and gnutls_ocsp_resp_get_responder() will always initialized output data
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Thu, 13 Nov 2014 14:43:04 +0000 (15:43 +0100)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Thu, 13 Nov 2014 14:49:30 +0000 (15:49 +0100)
lib/x509/ocsp.c

index d71ed6e2119f2552b3ace6c10afa765af62db979..5a5b60267bdde343fdb576f12de90086542ef8b9 100644 (file)
@@ -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);