Skip to main content

Module cert_pin

Module cert_pin 

Source
Expand description

Certificate fingerprint pinning for QUIC/TLS connections.

This module provides CertPinStore, which supports three pin policies:

  • TrustOnFirstUse (TOFU): Accept and pin unknown peers on first contact.
  • Strict: Reject peers whose certificates are not pre-registered.
  • Observe: Always accept but count mismatches for monitoring.

Structs§

CertFingerprint
SHA-256 fingerprint of a peer’s TLS certificate (32 bytes, hex-encoded).
CertPinStore
Thread-safe store for peer certificate fingerprint pins.
PeerCertPin
A pinned certificate entry for one peer.

Enums§

PinPolicy
Pin policy for certificate verification.
VerificationResult
Result of a certificate verification attempt.