]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
cert-session: fail hard if mandatory stapling is not honored
authorDaiki Ueno <ueno@gnu.org>
Wed, 12 Aug 2020 05:27:17 +0000 (07:27 +0200)
committerDaiki Ueno <ueno@gnu.org>
Wed, 12 Aug 2020 05:31:23 +0000 (07:31 +0200)
According to the documentation, the GNUTLS_CERT_INVALID flag must
always be set in case of verification failure, together with the flag
indicating the actual error cause.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
lib/cert-session.c

index db04a25e5de29631f2face7965523ab27dfb7422..97f31597d5214dfbbce8ed66982a56b8c6532187 100644 (file)
@@ -415,6 +415,7 @@ _gnutls_ocsp_verify_mandatory_stapling(gnutls_session_t session,
 
                        if (feature == 5 /* TLS ID for status request */) {
                                /* We sent a status request, the certificate mandates a reply, but we did not get any. */
+                               *ocsp_status |= GNUTLS_CERT_INVALID;
                                *ocsp_status |= GNUTLS_CERT_MISSING_OCSP_STATUS;
                                break;
                        }