From: Nikos Mavrogiannopoulos Date: Sun, 30 Sep 2012 22:18:43 +0000 (+0200) Subject: read revocation reason X-Git-Tag: gnutls_3_1_3~63 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=494ecee11ad5b650bf1b187c68b69a7aee4f23be;p=thirdparty%2Fgnutls.git read revocation reason --- diff --git a/lib/x509/ocsp.c b/lib/x509/ocsp.c index 37fa4dd298..2ec35a5ac0 100644 --- a/lib/x509/ocsp.c +++ b/lib/x509/ocsp.c @@ -1572,6 +1572,18 @@ gnutls_ocsp_resp_get_single (gnutls_ocsp_resp_t resp, } /* revocation_reason */ + if (revocation_reason) + { + snprintf (name, sizeof (name), + "tbsResponseData.responses.?%u.certStatus." + "revoked.revocationReason", + indx + 1); + + ret = _gnutls_x509_read_uint (resp->basicresp, name, + revocation_reason); + if (ret < 0) + return gnutls_assert_val(ret); + } return GNUTLS_E_SUCCESS; }