From b474d918f31a97fb3c3999ac83d819360aa3f7b0 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Tue, 2 Oct 2012 20:58:18 +0200 Subject: [PATCH] If revocation reason cannot be read set it to GNUTLS_X509_CRLREASON_UNSPECIFIED. --- lib/x509/ocsp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/x509/ocsp.c b/lib/x509/ocsp.c index 67892e8f4..8756431a7 100644 --- a/lib/x509/ocsp.c +++ b/lib/x509/ocsp.c @@ -1414,7 +1414,7 @@ gnutls_ocsp_resp_get_single (gnutls_ocsp_resp_t resp, gnutls_datum_t sa; char name[ASN1_MAX_NAME_SIZE]; int ret; - + snprintf (name, sizeof (name), "tbsResponseData.responses.?%u.certID.hashAlgorithm.algorithm", indx + 1); @@ -1583,7 +1583,7 @@ gnutls_ocsp_resp_get_single (gnutls_ocsp_resp_t resp, ret = _gnutls_x509_read_uint (resp->basicresp, name, revocation_reason); if (ret < 0) - return gnutls_assert_val(ret); + *revocation_reason = GNUTLS_X509_CRLREASON_UNSPECIFIED; } return GNUTLS_E_SUCCESS; -- 2.11.4.GIT