293 std::span<const Certificate> intermediates,
const Certificate& anchor,
Immutable, strictly DER-parsed X.509 certificate.
Definition certificate.hxx:262
One supported subjectAltName entry (a DNS name or an IP address).
Definition certificate.hxx:156
std::size_t CertificateIndex() const noexcept
Returns the certificate position.
TLSPeerFailure() noexcept
Constructs an invalid-certificate failure at the leaf.
PurposeError PurposeDetail() const noexcept
Returns the preserved purpose error.
IdentityError IdentityDetail() const noexcept
Returns the preserved identity error.
TLSPeerError Code() const noexcept
Returns the failure category.
TLSPeerVerifier(TLSPeerVerifier &&other)=delete
Non-movable stateless verifier.
TLSPeerVerifier()=delete
Non-instantiable stateless verifier.
static ExpectedTLSPeer Verify(const Certificate &leaf, std::span< const Certificate > intermediates, const Certificate &anchor, TimePoint at, TLSRole role, const SubjectAltName *identity=nullptr)
Verifies an ordered chain, signing purpose and optional SAN identity.
TLSPeerVerifier & operator=(TLSPeerVerifier &&other)=delete
Move assignment is unavailable.
TLSPeerVerifier(const TLSPeerVerifier &other)=delete
Non-copyable stateless verifier.
~TLSPeerVerifier()=delete
No instances exist to destroy.
TLSPeerVerifier & operator=(const TLSPeerVerifier &other)=delete
Copy assignment is unavailable.
STORMBYTE_DECLARE_MAYBE_SAFE(class StormByte::System::Device::Access)
X.509 certificate parsing and chain verification.
StormByte::Expected< void, TLSPeerFailure > ExpectedTLSPeer
Offline peer-certificate success or a detailed, indexed failure.
Definition tls_peer.hxx:201
TLSRole
Certificate signing role in TLS 1.3 (RFC 8446 ยง4.4.2.2).
Definition certificate.hxx:119
PurposeError
Errors of narrowly scoped certificate-purpose checks.
Definition certificate.hxx:136
@ InvalidCertificate
Certificate is empty or moved from.
Definition certificate.hxx:138
@ UnsupportedRole
Role is not Server or Client.
Definition certificate.hxx:137
std::chrono::sys_seconds TimePoint
Point in time with second precision, as stored in certificates.
Definition certificate.hxx:75
TLSPeerError
Failures of the constrained, offline TLS signing-certificate verifier.
Definition tls_peer.hxx:64
@ SignatureOrIssuerMismatch
Ordered issuer name or certificate signature does not verify.
Definition tls_peer.hxx:74
@ NotCA
Issuer is not a version 3 CA.
Definition tls_peer.hxx:71
@ Purpose
PurposeDetail supplies the exact EKU/KU failure.
Definition tls_peer.hxx:79
@ UnsupportedIdentity
Identity kind is neither DNS nor IP.
Definition tls_peer.hxx:67
@ IssuerKeyUsageNotAllowed
Present issuer KU lacks keyCertSign.
Definition tls_peer.hxx:72
@ InvalidTime
Caller time is outside a certificate's inclusive validity interval.
Definition tls_peer.hxx:69
@ UnsupportedAlgorithm
Signature or public key is outside the documented subset.
Definition tls_peer.hxx:75
@ MissingServerIdentity
A server requires an expected DNS or IP identity.
Definition tls_peer.hxx:66
@ UnsupportedCriticalExtension
Critical extension is not fully processed by this verifier.
Definition tls_peer.hxx:76
@ PathLengthExceeded
Supplied CA count exceeds an issuer's pathLenConstraint.
Definition tls_peer.hxx:73
@ LeafIsCA
Peer leaf must not be a CA.
Definition tls_peer.hxx:70
@ Identity
IdentityDetail supplies the exact SAN failure.
Definition tls_peer.hxx:80
@ UnsupportedConstraint
Present path restriction requires unsupported processing.
Definition tls_peer.hxx:77
@ MalformedExtension
Relevant extension has invalid DER or inconsistent semantics.
Definition tls_peer.hxx:78
IdentityError
Errors of subjectAltName extraction and expected-identity verification.
Definition certificate.hxx:107
Crypto module of the StormByte suite.
Definition aead.hxx:53
Root namespace of the StormByte suite.
std::conditional_t< Type::Reference< T >, std::expected< std::reference_wrapper< std::remove_reference_t< T > >, Safe::Shared< E > >, std::expected< T, Safe::Shared< E > > > Expected
#define STORMBYTE_CRYPTO_PUBLIC
Definition visibility.h:53