52#ifndef QSC_TLS_STATE_H
53#define QSC_TLS_STATE_H
60QSC_CPLUSPLUS_ENABLED_START
160QSC_CPLUSPLUS_ENABLED_END
The SHA2 family of hash functions.
The SHA2-256 digest state array.
Definition sha2.h:207
The SHA2-384 digest state array.
Definition sha2.h:277
The SHA2-512 digest state array.
Definition sha2.h:338
Stores a bounded ordered ALPN protocol list and its negotiation policy.
Definition tlsstate.h:102
uint8_t protocols[QSC_TLS_MAX_ALPN_PROTOCOLS][QSC_TLS_MAX_ALPN_SIZE]
Definition tlsstate.h:103
size_t protocolcount
Definition tlsstate.h:105
bool configured
Definition tlsstate.h:107
size_t protocollens[QSC_TLS_MAX_ALPN_PROTOCOLS]
Definition tlsstate.h:104
bool required
Definition tlsstate.h:106
A non-owning view over a single encoded certificate.
Definition tlscert.h:80
Stores the configured local certificate chain and CertificateVerify signing configuration.
Definition tlsstate.h:130
qsc_tls_certificate_sign_callback signcallback
Definition tlsstate.h:141
size_t signprivatekeylen
Definition tlsstate.h:140
size_t verifysignaturelen
Definition tlsstate.h:135
bool configured
Definition tlsstate.h:143
qsc_tls_certificate_view chain[QSC_TLS_CERTIFICATE_LIST_MAX_ENTRIES]
Definition tlsstate.h:131
size_t chainlength
Definition tlsstate.h:132
qsc_tls_signature_scheme verifyscheme
Definition tlsstate.h:133
uint8_t verifysignature[QSC_TLS_CERTIFICATE_VERIFY_MAX_SIGNATURE_SIZE]
Definition tlsstate.h:134
uint8_t signprivatekey[QSC_TLS_MAX_SIGNING_PRIVATE_KEY_SIZE]
Definition tlsstate.h:139
void * signstate
Definition tlsstate.h:142
bool staticsignature
Definition tlsstate.h:144
Stores the peer-advertised supported groups and signature-scheme capabilities.
Definition tlsstate.h:115
qsc_tls_signature_scheme certsigschemes[QSC_TLS_MAX_SIGNATURE_SCHEMES]
Definition tlsstate.h:120
qsc_tls_named_group groups[QSC_TLS_MAX_GROUPS]
Definition tlsstate.h:116
qsc_tls_signature_scheme sigschemes[QSC_TLS_MAX_SIGNATURE_SCHEMES]
Definition tlsstate.h:118
size_t certsigschemecount
Definition tlsstate.h:121
size_t sigschemecount
Definition tlsstate.h:119
size_t groupcount
Definition tlsstate.h:117
Stores cached TLS 1.3 resumption ticket state and the derived PSK binder for the active connection.
Definition tlsstate.h:152
bool resumed
Definition tlsstate.h:157
size_t binderlen
Definition tlsstate.h:155
bool enabled
Definition tlsstate.h:156
uint8_t binder[QSC_TLS_PSK_BINDER_MAX_SIZE]
Definition tlsstate.h:154
Stores the active TLS traffic keying material and sequence number for one record direction.
Definition tlsstate.h:88
uint8_t iv[12U]
Definition tlsstate.h:92
qsc_tls_cipher_suite suite
Definition tlsstate.h:89
uint8_t key[32U]
Definition tlsstate.h:90
uint64_t sequence
Definition tlsstate.h:93
bool initialized
Definition tlsstate.h:94
size_t keylen
Definition tlsstate.h:91
Stores the active transcript hash context and its selected hash algorithm.
Definition tlsstate.h:72
qsc_sha256_state sha256
Definition tlsstate.h:77
qsc_sha512_state sha512
Definition tlsstate.h:79
qsc_tls_hash_algorithm hash
Definition tlsstate.h:73
qsc_sha384_state sha384
Definition tlsstate.h:78
union qsc_tls_transcript_state::@217207304340054104166026204375043031367311177376 ctx
bool initialized
Definition tlsstate.h:74
TLS certificate bridge types and validation callbacks.
bool(* qsc_tls_certificate_sign_callback)(qsc_tls_signature_scheme scheme, const uint8_t *input, size_t inputlen, uint8_t *signature, size_t *signaturelen, void *state)
Produce a TLS 1.3 CertificateVerify signature.
Definition tlscert.h:141
Fixed upper bounds used by the TLS implementation.
#define QSC_TLS_MAX_GROUPS
Maximum number of supported groups tracked per peer.
Definition tlslimits.h:103
#define QSC_TLS_CERTIFICATE_LIST_MAX_ENTRIES
Maximum number of certificates tracked in a chain.
Definition tlslimits.h:152
#define QSC_TLS_MAX_ALPN_SIZE
Maximum ALPN identifier length in bytes.
Definition tlslimits.h:127
#define QSC_TLS_PSK_BINDER_MAX_SIZE
Maximum size of a PSK binder in bytes.
Definition tlslimits.h:188
#define QSC_TLS_MAX_SIGNATURE_SCHEMES
Maximum number of signature schemes tracked per peer.
Definition tlslimits.h:109
#define QSC_TLS_CERTIFICATE_VERIFY_MAX_SIGNATURE_SIZE
Maximum CertificateVerify signature size in bytes across the registered signature schemes.
Definition tlslimits.h:255
#define QSC_TLS_MAX_SIGNING_PRIVATE_KEY_SIZE
Maximum private-key size in bytes across all supported CertificateVerify signature schemes....
Definition tlslimits.h:264
#define QSC_TLS_MAX_ALPN_PROTOCOLS
Maximum number of ALPN identifiers stored in a TLS endpoint policy.
Definition tlslimits.h:133
Public TLS type definitions.
qsc_tls_cipher_suite
TLS 1.3 cipher-suite identifiers.
Definition tlstypes.h:129
qsc_tls_named_group
TLS named-group identifiers for classical, ML-KEM, and hybrid key exchange groups.
Definition tlstypes.h:159
qsc_tls_hash_algorithm
Identifies the transcript and HKDF hash algorithm associated with a TLS cipher suite.
Definition tlstypes.h:69
qsc_tls_signature_scheme
TLS signature-scheme identifiers.
Definition tlstypes.h:179