|
Botan 3.14.1
Crypto and TLS for C&
|
#include <x509path.h>
Specifies restrictions on the PKIX path validation
Definition at line 34 of file x509path.h.
| Botan::Path_Validation_Restrictions::Path_Validation_Restrictions | ( | bool | require_rev = false, |
| size_t | minimum_key_strength = 110, | ||
| bool | ocsp_all_intermediates = false, | ||
| std::chrono::seconds | max_ocsp_age = std::chrono::hours(24 * 7), | ||
| std::unique_ptr< Certificate_Store > | trusted_ocsp_responders = nullptr, | ||
| bool | ignore_trusted_root_time_range = false, | ||
| bool | require_self_signed_trust_anchors = true, | ||
| bool | accept_ocsp_softfail = false ) |
| require_rev | if true, revocation information is required |
| minimum_key_strength | is the minimum strength (in terms of operations, eg 80 means 2^80) of a signature. Signatures weaker than this are rejected. If more than 80, SHA-1 signatures are also rejected. If possible use at least setting 110. 80 bit strength requires 1024 bit RSA 110 bit strength requires 2k bit RSA 128 bit strength requires ~3k bit RSA or P-256 |
| ocsp_all_intermediates | Make OCSP requests for all CAs as well as end entity (if OCSP enabled in path validation request) |
| max_ocsp_age | maximum age of OCSP responses w/o next_update. If zero, there is no maximum age |
| trusted_ocsp_responders | optional certificate store containing certificates of trusted OCSP responders (additionally to the CA's responders) |
| ignore_trusted_root_time_range | if true, validity checks on the time range of the trusted root certificate only produce warnings |
| require_self_signed_trust_anchors | if true, only certificates which appear to be self-signed are allowed as trust anchors. Trust anchors based on intermediate and leaf certificates are forbidden in this case. The self-signature itself is not verified. |
| accept_ocsp_softfail | if true then soft fail conditions (the OCSP responder being unavailable or returning an error status, no responder URL, or the library being built without HTTP support) will be accepted as satisfying revocation requirements. Not recommended. |
Definition at line 1361 of file x509path.cpp.
References accept_ocsp_softfail(), ignore_trusted_root_time_range(), max_ocsp_age(), require_self_signed_trust_anchors(), and trusted_ocsp_responders().
|
inline |
| require_rev | if true, revocation information is required |
| minimum_key_strength | is the minimum strength (in terms of operations, eg 80 means 2^80) of a signature. Signatures weaker than this are rejected. |
| ocsp_all_intermediates | Make OCSP requests for all CAs as well as end entity (if OCSP enabled in path validation request) |
| trusted_hashes | a set of trusted hashes. Any signatures created using a hash other than one of these will be rejected. |
| max_ocsp_age | maximum age of OCSP responses w/o next_update. If zero, there is no maximum age |
| trusted_ocsp_responders | optional certificate store containing certificates of trusted OCSP responders (additionally to the CA's responders) |
| ignore_trusted_root_time_range | if true, validity checks on the time range of the trusted root certificate only produce warnings |
| require_self_signed_trust_anchors | if true, only certificates which appear to be self-signed are allowed as trust anchors. Trust anchors based on intermediate and leaf certificates are forbidden in this case. The self-signature itself is not verified. |
| accept_ocsp_softfail | if true then soft fail conditions (the OCSP responder being unavailable or returning an error status, no responder URL, or the library being built without HTTP support) will be accepted as satisfying revocation requirements. Not recommended. |
Definition at line 101 of file x509path.h.
References accept_ocsp_softfail(), ignore_trusted_root_time_range(), max_ocsp_age(), minimum_key_strength(), ocsp_all_intermediates(), require_self_signed_trust_anchors(), trusted_hashes(), and trusted_ocsp_responders().
|
inline |
By default OCSP soft-fail conditions (such as a network error) do not count as satisfying revocation requirements. This restriction can be removed by setting accept_ocsp_softfail=true in the constructor.
Definition at line 183 of file x509path.h.
Referenced by Botan::PKIX::merge_revocation_status(), Path_Validation_Restrictions(), and Path_Validation_Restrictions().
|
inline |
RFC 5280 does not disallow trusted anchors signing certificates with wider validity ranges than theirs. When checking a certificate chain at a specific point in time, this can lead to situations where a root certificate is expired, but the lower-chain certificates are not.
If this flag is set to true, such chains are considered valid (with warning TRUSTED_CERT_HAS_EXPIRED). Otherwise, the chain is rejected with the error code CERT_HAS_EXPIRED. The same holds for not yet valid certificates with the error code CERT_NOT_YET_VALID (or warning TRUSTED_CERT_NOT_YET_VALID).
Definition at line 165 of file x509path.h.
Referenced by Botan::PKIX::check_chain(), Path_Validation_Restrictions(), and Path_Validation_Restrictions().
|
inline |
Definition at line 145 of file x509path.h.
Referenced by Path_Validation_Restrictions(), and Path_Validation_Restrictions().
|
inline |
Definition at line 139 of file x509path.h.
Referenced by Botan::PKIX::check_chain(), Path_Validation_Restrictions(), and Botan::OCSP::Response::verify_signature().
|
inline |
Definition at line 129 of file x509path.h.
Referenced by Botan::PKIX::merge_revocation_status(), Path_Validation_Restrictions(), and Botan::x509_path_validate().
|
inline |
Definition at line 123 of file x509path.h.
Referenced by Botan::PKIX::merge_revocation_status().
|
inline |
By default Botan requires trust anchors to appear self-signed; the self-signature itself is not verified. This prevents using intermediate CA certificates and leaf certificates as trust anchors, even if they are included in the Certificate Store. This restriction can be removed by setting require_self_signed_trust_anchors=false in the constructor.
Definition at line 175 of file x509path.h.
Referenced by Botan::PKIX::check_chain(), Path_Validation_Restrictions(), Path_Validation_Restrictions(), and Botan::x509_path_validate().
|
inline |
Definition at line 134 of file x509path.h.
Referenced by Botan::PKIX::check_chain(), Botan::PKIX::check_crl(), Path_Validation_Restrictions(), and Botan::OCSP::Response::verify_signature().
|
inline |
Certificates in this store are trusted to sign OCSP responses additionally to the CA's responder certificates.
Definition at line 152 of file x509path.h.
Referenced by Path_Validation_Restrictions(), and Path_Validation_Restrictions().