Skip to main content

Crate tls2

Crate tls2 

Source
Expand description

Zero-allocation, no_std compatible TLS

Modules§

crypto_default_provider
key_schedule
tokio

Structs§

Client
A sans-IO TLS 1.3 client state machine.
ClientConfig
Configuration for a TLS 1.3 client connection.
DefaultCertificateVerifier
Default certificate validator that can handle both X509 chains and raw public keys.
Hash
A fixed-capacity byte buffer for cryptographic hash outputs.
KeyExchangePublicKey
KeyExchangeSecretKey
ParsedCertificate
A pre-parsed X.509 certificate with all commonly accessed fields extracted in a single DER walk.
RawPublicKey
A raw public key pinned as a trust anchor (RFC 7250).
RootCa
A trusted root certificate authority with pre-parsed fields.
SystemClock
A Clock backed by std::time::SystemTime.

Enums§

CertType
Certificate types for server_certificate_type / client_certificate_type extension negotiation (RFC 7250 / RFC 9633).
CipherSuite
Cipher suites supported by a CryptoProvider.
ClientApplicationDataEvent
Events produced when decrypting application data.
ClientHandshakeEvent
Events produced by the handshake state machine.
Error
KeyExchangeGroup
Key exchange group identifiers (RFC 8446 §4.2.7).
ReceivedCertificate
A certificate received from the peer during the TLS handshake.
SignatureScheme
Signature schemes (RFC 8446 §4.2.3).

Constants§

AEAD_MAX_KEY_SIZE
AEAD_TAG_SIZE
The fixed size of AEAD tags
ALPN_PROTOCOL_MAX_SIZE
KEY_EXCHANGE_MAX_GROUPS
The maximum number of supported key exchange groups in ClientHello
KEY_EXCHANGE_PUBLIC_KEY_MAX_SIZE
The maximum size, in bytes, of a key exchange public key
KEY_EXCHANGE_SECRET_KEY_MAX_SIZE
32-byte X25519 seed + 64-byte ML-KEM 768 seed
KEY_EXCHANGE_SHARED_SECRET_MAX_SIZE
MAX_CERTS
Maximum number of certificates allowed in a chain.
MAX_HASH_SIZE
The maximum size, in bytes, of a hash
MAX_RECORD_SIZE
Maximum size of a fully framed TLS record (5-byte header + payload + padding + tag). 5 + 16384 + 1 + 256 + 16 = 16662.
PSK_MAX_SIZE
SIGNATURE_MAX_SIZE
SIGNING_PUBLIC_KEY_MAX_SIZE
The maximum size, in bytes, of a SPKI-encoded signing public key

Traits§

Buffer
Trait for buffer types that can hold TLS record data.
CertificateVerifier
Clock
A wall clock used to check certificate validity periods.
CryptoProvider

Functions§

load_roots