_
("The certificate requires the server to include an OCSP status in its response, but the OCSP status is missing. "));
+ if (status & GNUTLS_CERT_INVALID_OCSP_STATUS)
+ _gnutls_buffer_append_str(&str,
+ _
+ ("The received OCSP status response is invalid. "));
+
return _gnutls_buffer_to_datum(&str, out, 1);
}
* @GNUTLS_CERT_MISMATCH: The certificate presented isn't the expected one (TOFU)
* @GNUTLS_CERT_PURPOSE_MISMATCH: The certificate or an intermediate does not match the intended purpose (extended key usage).
* @GNUTLS_CERT_MISSING_OCSP_STATUS: The certificate requires the server to send the certifiate status, but no status was received.
+ * @GNUTLS_CERT_INVALID_OCSP_STATUS: The received OCSP status response is invalid.
*
* Enumeration of certificate status codes. Note that the status
* bits may have different meanings in OpenPGP keys and X.509
GNUTLS_CERT_SIGNER_CONSTRAINTS_FAILURE = 1 << 16,
GNUTLS_CERT_MISMATCH = 1 << 17,
GNUTLS_CERT_PURPOSE_MISMATCH = 1 << 18,
- GNUTLS_CERT_MISSING_OCSP_STATUS = 1 << 19
+ GNUTLS_CERT_MISSING_OCSP_STATUS = 1 << 19,
+ GNUTLS_CERT_INVALID_OCSP_STATUS = 1 << 20
} gnutls_certificate_status_t;
/**
gnutls_strerror(ret));
ret = gnutls_assert_val(0);
check_failed = 1;
+ *ostatus |= GNUTLS_CERT_INVALID_OCSP_STATUS;
goto cleanup;
}
_gnutls_audit_log(session,
"Got OCSP response with an unrelated certificate.\n");
check_failed = 1;
+ *ostatus |= GNUTLS_CERT_INVALID_OCSP_STATUS;
goto cleanup;
}
ret = gnutls_assert_val(0);
gnutls_assert();
check_failed = 1;
+ *ostatus |= GNUTLS_CERT_INVALID_OCSP_STATUS;
goto cleanup;
}
if (status != 0) {
ret = gnutls_assert_val(0);
check_failed = 1;
+ *ostatus |= GNUTLS_CERT_INVALID_OCSP_STATUS;
goto cleanup;
}
gnutls_strerror(ret));
ret = gnutls_assert_val(0);
check_failed = 1;
+ *ostatus |= GNUTLS_CERT_INVALID_OCSP_STATUS;
goto cleanup;
}