class

Beryl::TLS::ClientCertificateVerifier

Inherits Beryl::TLS::CertificateVerifier < Reference < Object

Verifies a client's certificate chain for a server that asks for one: RFC 5280 path validation to the server's client trust store (B4's ChainVerification), the clientAuth purpose, and the digitalSignature key usage when present. No name is checked; the application reads the subject from Socket::Server#peer_certificate.

verifier = Beryl::TLS::ClientCertificateVerifier.new(Beryl::Certificates::TrustStore.from_pem(File.read("clients-ca.pem")))

Constructors

new(trust_store : Certificates::TrustStore, *, time_source : -> Time = -> do Time.utc end)
Source

Instance methods

trust_store
Source
verify_chain(chain : Array(Certificates::Certificate), hostname : String | Nil) : Nil

Raises CertificateRejected when chain does not verify. A client sends no name to check, so hostname is ignored.

Source