diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-06-01 14:13:52 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-06-01 16:00:09 +0200 |
commit | 63fa76e089e7a46ed687e8efe36c5062648a4be1 (patch) | |
tree | c094620ccc49565483671f67071cf7c544e0cacf /lib/x509.c | |
parent | 5e6f4e646e61a6fda9ebc101c62eb4a6c9d9dcd5 (diff) | |
download | gnutls-63fa76e089e7a46ed687e8efe36c5062648a4be1.tar.gz |
ocsp: Introduced GNUTLS_CERT_INVALID_OCSP_STATUS
This verification status flag indicates an OCSP status response
being stapled but it being invalid for some reason (e.g., unable
to parse or doesn't contain the expected certificate).
Diffstat (limited to 'lib/x509.c')
-rw-r--r-- | lib/x509.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/x509.c b/lib/x509.c index f407f74478..edd8e5bd19 100644 --- a/lib/x509.c +++ b/lib/x509.c @@ -88,6 +88,7 @@ check_ocsp_response(gnutls_session_t session, gnutls_x509_crt_t cert, gnutls_strerror(ret)); ret = gnutls_assert_val(0); check_failed = 1; + *ostatus |= GNUTLS_CERT_INVALID_OCSP_STATUS; goto cleanup; } @@ -97,6 +98,7 @@ check_ocsp_response(gnutls_session_t session, gnutls_x509_crt_t cert, _gnutls_audit_log(session, "Got OCSP response with an unrelated certificate.\n"); check_failed = 1; + *ostatus |= GNUTLS_CERT_INVALID_OCSP_STATUS; goto cleanup; } @@ -105,6 +107,7 @@ check_ocsp_response(gnutls_session_t session, gnutls_x509_crt_t cert, ret = gnutls_assert_val(0); gnutls_assert(); check_failed = 1; + *ostatus |= GNUTLS_CERT_INVALID_OCSP_STATUS; goto cleanup; } @@ -112,6 +115,7 @@ check_ocsp_response(gnutls_session_t session, gnutls_x509_crt_t cert, if (status != 0) { ret = gnutls_assert_val(0); check_failed = 1; + *ostatus |= GNUTLS_CERT_INVALID_OCSP_STATUS; goto cleanup; } @@ -124,6 +128,7 @@ check_ocsp_response(gnutls_session_t session, gnutls_x509_crt_t cert, gnutls_strerror(ret)); ret = gnutls_assert_val(0); check_failed = 1; + *ostatus |= GNUTLS_CERT_INVALID_OCSP_STATUS; goto cleanup; } |