package tls

  1. Overview
  2. Docs
type hmac_key = Cstruct.t
type iv_mode =
  1. | Iv of Cstruct.t
  2. | Random_iv
type 'k cbc_cipher = (module Mirage_crypto.Cipher_block.S.CBC with type key = 'k)
type 'k cbc_state = {
  1. cipher : 'k cbc_cipher;
  2. cipher_secret : 'k;
  3. iv_mode : iv_mode;
  4. hmac : Mirage_crypto.Hash.hash;
  5. hmac_secret : hmac_key;
}
type nonce = Cstruct.t
type 'k aead_cipher = (module Mirage_crypto.AEAD with type key = 'k)
type 'k aead_state = {
  1. cipher : 'k aead_cipher;
  2. cipher_secret : 'k;
  3. nonce : nonce;
  4. explicit_nonce : bool;
}
type cipher_st =
  1. | CBC : 'k cbc_state -> cipher_st
  2. | AEAD : 'k aead_state -> cipher_st
type crypto_context = {
  1. sequence : int64;
  2. cipher_st : cipher_st;
}
type hs_log = Cstruct.t list
type reneg_params = Cstruct.t * Cstruct.t
type common_session_data = {
  1. server_random : Cstruct.t;
  2. client_random : Cstruct.t;
  3. peer_certificate_chain : X509.Certificate.t list;
  4. peer_certificate : X509.Certificate.t option;
  5. trust_anchor : X509.Certificate.t option;
  6. received_certificates : X509.Certificate.t list;
  7. own_certificate : X509.Certificate.t list;
  8. own_private_key : X509.Private_key.t option;
  9. own_name : [ `host ] Domain_name.t option;
  10. client_auth : bool;
  11. master_secret : Core.master_secret;
  12. alpn_protocol : string option;
}
type session_data = {
  1. common_session_data : common_session_data;
  2. client_version : Core.tls_any_version;
  3. ciphersuite : Ciphersuite.ciphersuite;
  4. group : Core.group option;
  5. renegotiation : reneg_params;
  6. session_id : Cstruct.t;
  7. extended_ms : bool;
  8. tls_unique : Cstruct.t;
}
type server_handshake_state =
  1. | AwaitClientHello
  2. | AwaitClientHelloRenegotiate
  3. | AwaitClientCertificate_RSA of session_data * hs_log
  4. | AwaitClientCertificate_DHE of session_data * dh_secret * hs_log
  5. | AwaitClientKeyExchange_RSA of session_data * hs_log
  6. | AwaitClientKeyExchange_DHE of session_data * dh_secret * hs_log
  7. | AwaitClientCertificateVerify of session_data * crypto_context * crypto_context * hs_log
  8. | AwaitClientChangeCipherSpec of session_data * crypto_context * crypto_context * hs_log
  9. | AwaitClientChangeCipherSpecResume of session_data * crypto_context * Cstruct.t * hs_log
  10. | AwaitClientFinished of session_data * hs_log
  11. | AwaitClientFinishedResume of session_data * Cstruct.t * hs_log
  12. | Established
type client_handshake_state =
  1. | ClientInitial
  2. | AwaitServerHello of Core.client_hello * (Core.group * dh_secret) list * hs_log
  3. | AwaitServerHelloRenegotiate of session_data * Core.client_hello * hs_log
  4. | AwaitCertificate_RSA of session_data * hs_log
  5. | AwaitCertificate_DHE of session_data * hs_log
  6. | AwaitServerKeyExchange_DHE of session_data * hs_log
  7. | AwaitCertificateRequestOrServerHelloDone of session_data * Cstruct.t * Cstruct.t * hs_log
  8. | AwaitServerHelloDone of session_data * Core.signature_algorithm list option * Cstruct.t * Cstruct.t * hs_log
  9. | AwaitServerChangeCipherSpec of session_data * crypto_context * Cstruct.t * hs_log
  10. | AwaitServerChangeCipherSpecResume of session_data * crypto_context * crypto_context * hs_log
  11. | AwaitServerFinished of session_data * Cstruct.t * hs_log
  12. | AwaitServerFinishedResume of session_data * hs_log
  13. | Established
type kdf = {
  1. secret : Cstruct.t;
  2. cipher : Ciphersuite.ciphersuite13;
  3. hash : Mirage_crypto.Hash.hash;
}
type session_data13 = {
  1. common_session_data13 : common_session_data;
  2. ciphersuite13 : Ciphersuite.ciphersuite13;
  3. master_secret : kdf;
  4. exporter_master_secret : Cstruct.t;
  5. resumption_secret : Cstruct.t;
  6. state : Core.epoch_state;
  7. resumed : bool;
  8. client_app_secret : Cstruct.t;
  9. server_app_secret : Cstruct.t;
}
type client13_handshake_state =
  1. | AwaitServerHello13 of Core.client_hello * (Core.group * dh_secret) list * Cstruct.t
  2. | AwaitServerEncryptedExtensions13 of session_data13 * Cstruct.t * Cstruct.t * Cstruct.t
  3. | AwaitServerCertificateRequestOrCertificate13 of session_data13 * Cstruct.t * Cstruct.t * Cstruct.t
  4. | AwaitServerCertificate13 of session_data13 * Cstruct.t * Cstruct.t * Core.signature_algorithm list option * Cstruct.t
  5. | AwaitServerCertificateVerify13 of session_data13 * Cstruct.t * Cstruct.t * Core.signature_algorithm list option * Cstruct.t
  6. | AwaitServerFinished13 of session_data13 * Cstruct.t * Cstruct.t * Core.signature_algorithm list option * Cstruct.t
  7. | Established13
type server13_handshake_state =
  1. | AwaitClientHelloHRR13
  2. | AwaitClientCertificate13 of session_data13 * Cstruct.t * crypto_context * Core.session_ticket option * Cstruct.t
  3. | AwaitClientCertificateVerify13 of session_data13 * Cstruct.t * crypto_context * Core.session_ticket option * Cstruct.t
  4. | AwaitClientFinished13 of Cstruct.t * crypto_context * Core.session_ticket option * Cstruct.t
  5. | AwaitEndOfEarlyData13 of Cstruct.t * crypto_context * crypto_context * Core.session_ticket option * Cstruct.t
  6. | Established13
type handshake_machina_state =
  1. | Client of client_handshake_state
  2. | Server of server_handshake_state
  3. | Client13 of client13_handshake_state
  4. | Server13 of server13_handshake_state
type handshake_state = {
  1. session : [ `TLS of session_data | `TLS13 of session_data13 ] list;
  2. protocol_version : Core.tls_version;
  3. early_data_left : int32;
  4. machina : handshake_machina_state;
  5. config : Config.config;
  6. hs_fragment : Cstruct.t;
}
type crypto_state = crypto_context option
type rec_resp = [
  1. | `Change_enc of crypto_context
  2. | `Change_dec of crypto_context
  3. | `Record of record
]
type handshake_return = handshake_state * rec_resp list
type state = {
  1. handshake : handshake_state;
  2. decryptor : crypto_state;
  3. encryptor : crypto_state;
  4. fragment : Cstruct.t;
  5. read_closed : bool;
  6. write_closed : bool;
}
type error = [
  1. | `AuthenticationFailure of X509.Validation.validation_error
  2. | `NoConfiguredCiphersuite of Ciphersuite.ciphersuite list
  3. | `NoConfiguredVersions of Core.tls_version list
  4. | `NoConfiguredSignatureAlgorithm of Core.signature_algorithm list
  5. | `NoMatchingCertificateFound of string
  6. | `NoCertificateConfigured
  7. | `CouldntSelectCertificate
]
val pp_error : Stdlib.Format.formatter -> [< `AuthenticationFailure of X509.Validation.validation_error | `CouldntSelectCertificate | `NoCertificateConfigured | `NoConfiguredCiphersuite of [< `AES_128_CCM_SHA256 | `AES_128_GCM_SHA256 | `AES_256_GCM_SHA384 | `CHACHA20_POLY1305_SHA256 | `DHE_RSA_WITH_3DES_EDE_CBC_SHA | `DHE_RSA_WITH_AES_128_CBC_SHA | `DHE_RSA_WITH_AES_128_CBC_SHA256 | `DHE_RSA_WITH_AES_128_CCM | `DHE_RSA_WITH_AES_128_GCM_SHA256 | `DHE_RSA_WITH_AES_256_CBC_SHA | `DHE_RSA_WITH_AES_256_CBC_SHA256 | `DHE_RSA_WITH_AES_256_CCM | `DHE_RSA_WITH_AES_256_GCM_SHA384 | `DHE_RSA_WITH_CHACHA20_POLY1305_SHA256 | `ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA | `ECDHE_ECDSA_WITH_AES_128_CBC_SHA | `ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 | `ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 | `ECDHE_ECDSA_WITH_AES_256_CBC_SHA | `ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 | `ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 | `ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 | `ECDHE_RSA_WITH_3DES_EDE_CBC_SHA | `ECDHE_RSA_WITH_AES_128_CBC_SHA | `ECDHE_RSA_WITH_AES_128_CBC_SHA256 | `ECDHE_RSA_WITH_AES_128_GCM_SHA256 | `ECDHE_RSA_WITH_AES_256_CBC_SHA | `ECDHE_RSA_WITH_AES_256_CBC_SHA384 | `ECDHE_RSA_WITH_AES_256_GCM_SHA384 | `ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 | `RSA_WITH_3DES_EDE_CBC_SHA | `RSA_WITH_AES_128_CBC_SHA | `RSA_WITH_AES_128_CBC_SHA256 | `RSA_WITH_AES_128_CCM | `RSA_WITH_AES_128_GCM_SHA256 | `RSA_WITH_AES_256_CBC_SHA | `RSA_WITH_AES_256_CBC_SHA256 | `RSA_WITH_AES_256_CCM | `RSA_WITH_AES_256_GCM_SHA384 AES_128_CCM_SHA256 AES_128_GCM_SHA256 AES_256_GCM_SHA384 CHACHA20_POLY1305_SHA256 ] list | `NoConfiguredSignatureAlgorithm of [< `ECDSA_SECP256R1_SHA1 | `ECDSA_SECP256R1_SHA256 | `ECDSA_SECP384R1_SHA384 | `ECDSA_SECP521R1_SHA512 | `ED25519 | `RSA_PKCS1_MD5 | `RSA_PKCS1_SHA1 | `RSA_PKCS1_SHA224 | `RSA_PKCS1_SHA256 | `RSA_PKCS1_SHA384 | `RSA_PKCS1_SHA512 | `RSA_PSS_RSAENC_SHA256 | `RSA_PSS_RSAENC_SHA384 | `RSA_PSS_RSAENC_SHA512 ECDSA_SECP256R1_SHA1 ECDSA_SECP256R1_SHA256 ECDSA_SECP384R1_SHA384 ECDSA_SECP521R1_SHA512 ] list | `NoConfiguredVersions of [< `TLS_1_0 | `TLS_1_1 | `TLS_1_2 | `TLS_1_3 ] list | `NoMatchingCertificateFound of string ] -> unit
type client_hello_errors = [
  1. | `EmptyCiphersuites
  2. | `NotSetCiphersuites of Packet.any_ciphersuite list
  3. | `NoSupportedCiphersuite of Packet.any_ciphersuite list
  4. | `NotSetExtension of Core.client_extension list
  5. | `NoSignatureAlgorithmsExtension
  6. | `NoGoodSignatureAlgorithms of Core.signature_algorithm list
  7. | `NoKeyShareExtension
  8. | `NoSupportedGroupExtension
  9. | `NotSetSupportedGroup of Packet.named_group list
  10. | `NotSetKeyShare of (Packet.named_group * Cstruct.t) list
  11. | `NotSubsetKeyShareSupportedGroup of Packet.named_group list * (Packet.named_group * Cstruct.t) list
  12. | `Has0rttAfterHRR
  13. | `NoCookie
]
val pp_client_hello_error : Stdlib.Format.formatter -> [< `EmptyCiphersuites | `Has0rttAfterHRR | `NoCookie | `NoGoodSignatureAlgorithms of [< `ECDSA_SECP256R1_SHA1 | `ECDSA_SECP256R1_SHA256 | `ECDSA_SECP384R1_SHA384 | `ECDSA_SECP521R1_SHA512 | `ED25519 | `RSA_PKCS1_MD5 | `RSA_PKCS1_SHA1 | `RSA_PKCS1_SHA224 | `RSA_PKCS1_SHA256 | `RSA_PKCS1_SHA384 | `RSA_PKCS1_SHA512 | `RSA_PSS_RSAENC_SHA256 | `RSA_PSS_RSAENC_SHA384 | `RSA_PSS_RSAENC_SHA512 ECDSA_SECP256R1_SHA1 ECDSA_SECP256R1_SHA256 ECDSA_SECP384R1_SHA384 ECDSA_SECP521R1_SHA512 ] list | `NoKeyShareExtension | `NoSignatureAlgorithmsExtension | `NoSupportedCiphersuite of Packet.any_ciphersuite list | `NoSupportedGroupExtension | `NotSetCiphersuites of Packet.any_ciphersuite list | `NotSetExtension of 'a | `NotSetKeyShare of (Packet.named_group * 'b) list | `NotSetSupportedGroup of Packet.named_group list | `NotSubsetKeyShareSupportedGroup of Packet.named_group list * (Packet.named_group * 'c) list ] -> unit
type fatal = [
  1. | `NoSecureRenegotiation
  2. | `NoSupportedGroup
  3. | `NoVersions of Core.tls_any_version list
  4. | `ReaderError of Reader.error
  5. | `NoCertificateReceived
  6. | `NoCertificateVerifyReceived
  7. | `NotRSACertificate
  8. | `KeyTooSmall
  9. | `SignatureVerificationFailed of string
  10. | `SigningFailed of string
  11. | `BadCertificateChain
  12. | `MACMismatch
  13. | `MACUnderflow
  14. | `RecordOverflow of int
  15. | `UnknownRecordVersion of int * int
  16. | `UnknownContentType of int
  17. | `CannotHandleApplicationDataYet
  18. | `NoHeartbeat
  19. | `BadRecordVersion of Core.tls_any_version
  20. | `BadFinished
  21. | `HandshakeFragmentsNotEmpty
  22. | `InsufficientDH
  23. | `InvalidDH
  24. | `BadECDH of Mirage_crypto_ec.error
  25. | `InvalidRenegotiation
  26. | `InvalidClientHello of client_hello_errors
  27. | `InvalidServerHello
  28. | `InvalidRenegotiationVersion of Core.tls_version
  29. | `InappropriateFallback
  30. | `UnexpectedCCS
  31. | `UnexpectedHandshake of Core.tls_handshake
  32. | `InvalidCertificateUsage
  33. | `InvalidCertificateExtendedUsage
  34. | `InvalidSession
  35. | `NoApplicationProtocol
  36. | `HelloRetryRequest
  37. | `InvalidMessage
  38. | `Toomany0rttbytes
  39. | `MissingContentType
  40. | `Downgrade12
  41. | `Downgrade11
  42. | `WriteHalfClosed
]
val pp_fatal : Stdlib.Format.formatter -> [< `BadCertificateChain | `BadECDH of Mirage_crypto_ec.error | `BadFinished | `BadRecordVersion of [< `SSL_3 | `TLS_1_0 | `TLS_1_1 | `TLS_1_2 | `TLS_1_3 | `TLS_1_X of int ] | `CannotHandleApplicationDataYet | `Downgrade11 | `Downgrade12 | `HandshakeFragmentsNotEmpty | `HelloRetryRequest | `InappropriateFallback | `InsufficientDH | `InvalidCertificateExtendedUsage | `InvalidCertificateUsage | `InvalidClientHello of [< `EmptyCiphersuites | `Has0rttAfterHRR | `NoCookie | `NoGoodSignatureAlgorithms of [< `ECDSA_SECP256R1_SHA1 | `ECDSA_SECP256R1_SHA256 | `ECDSA_SECP384R1_SHA384 | `ECDSA_SECP521R1_SHA512 | `ED25519 | `RSA_PKCS1_MD5 | `RSA_PKCS1_SHA1 | `RSA_PKCS1_SHA224 | `RSA_PKCS1_SHA256 | `RSA_PKCS1_SHA384 | `RSA_PKCS1_SHA512 | `RSA_PSS_RSAENC_SHA256 | `RSA_PSS_RSAENC_SHA384 | `RSA_PSS_RSAENC_SHA512 ECDSA_SECP256R1_SHA1 ECDSA_SECP256R1_SHA256 ECDSA_SECP384R1_SHA384 ECDSA_SECP521R1_SHA512 ] list | `NoKeyShareExtension | `NoSignatureAlgorithmsExtension | `NoSupportedCiphersuite of Packet.any_ciphersuite list | `NoSupportedGroupExtension | `NotSetCiphersuites of Packet.any_ciphersuite list | `NotSetExtension of 'a | `NotSetKeyShare of (Packet.named_group * 'b) list | `NotSetSupportedGroup of Packet.named_group list | `NotSubsetKeyShareSupportedGroup of Packet.named_group list * (Packet.named_group * 'c) list ] | `InvalidDH | `InvalidMessage | `InvalidRenegotiation | `InvalidRenegotiationVersion of [< `TLS_1_0 | `TLS_1_1 | `TLS_1_2 | `TLS_1_3 ] | `InvalidServerHello | `InvalidSession | `KeyTooSmall | `MACMismatch | `MACUnderflow | `MissingContentType | `NoApplicationProtocol | `NoCertificateReceived | `NoCertificateVerifyReceived | `NoHeartbeat | `NoSecureRenegotiation | `NoSupportedGroup | `NoVersions of [< `SSL_3 | `TLS_1_0 | `TLS_1_1 | `TLS_1_2 | `TLS_1_3 | `TLS_1_X of int ] list | `NotRSACertificate | `ReaderError of Reader.error | `RecordOverflow of int | `SignatureVerificationFailed of string | `SigningFailed of string | `Toomany0rttbytes | `UnexpectedCCS | `UnexpectedHandshake of Core.tls_handshake | `UnknownContentType of int | `UnknownRecordVersion of int * int | `WriteHalfClosed ] -> unit
type failure = [
  1. | `Error of error
  2. | `Fatal of fatal
  3. | `Alert of Packet.alert_type
]
val pp_failure : Stdlib.Format.formatter -> [< `Alert of Packet.alert_type | `Error of [< `AuthenticationFailure of X509.Validation.validation_error | `CouldntSelectCertificate | `NoCertificateConfigured | `NoConfiguredCiphersuite of [< `AES_128_CCM_SHA256 | `AES_128_GCM_SHA256 | `AES_256_GCM_SHA384 | `CHACHA20_POLY1305_SHA256 | `DHE_RSA_WITH_3DES_EDE_CBC_SHA | `DHE_RSA_WITH_AES_128_CBC_SHA | `DHE_RSA_WITH_AES_128_CBC_SHA256 | `DHE_RSA_WITH_AES_128_CCM | `DHE_RSA_WITH_AES_128_GCM_SHA256 | `DHE_RSA_WITH_AES_256_CBC_SHA | `DHE_RSA_WITH_AES_256_CBC_SHA256 | `DHE_RSA_WITH_AES_256_CCM | `DHE_RSA_WITH_AES_256_GCM_SHA384 | `DHE_RSA_WITH_CHACHA20_POLY1305_SHA256 | `ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA | `ECDHE_ECDSA_WITH_AES_128_CBC_SHA | `ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 | `ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 | `ECDHE_ECDSA_WITH_AES_256_CBC_SHA | `ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 | `ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 | `ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 | `ECDHE_RSA_WITH_3DES_EDE_CBC_SHA | `ECDHE_RSA_WITH_AES_128_CBC_SHA | `ECDHE_RSA_WITH_AES_128_CBC_SHA256 | `ECDHE_RSA_WITH_AES_128_GCM_SHA256 | `ECDHE_RSA_WITH_AES_256_CBC_SHA | `ECDHE_RSA_WITH_AES_256_CBC_SHA384 | `ECDHE_RSA_WITH_AES_256_GCM_SHA384 | `ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 | `RSA_WITH_3DES_EDE_CBC_SHA | `RSA_WITH_AES_128_CBC_SHA | `RSA_WITH_AES_128_CBC_SHA256 | `RSA_WITH_AES_128_CCM | `RSA_WITH_AES_128_GCM_SHA256 | `RSA_WITH_AES_256_CBC_SHA | `RSA_WITH_AES_256_CBC_SHA256 | `RSA_WITH_AES_256_CCM | `RSA_WITH_AES_256_GCM_SHA384 AES_128_CCM_SHA256 AES_128_GCM_SHA256 AES_256_GCM_SHA384 CHACHA20_POLY1305_SHA256 ] list | `NoConfiguredSignatureAlgorithm of [< `ECDSA_SECP256R1_SHA1 | `ECDSA_SECP256R1_SHA256 | `ECDSA_SECP384R1_SHA384 | `ECDSA_SECP521R1_SHA512 | `ED25519 | `RSA_PKCS1_MD5 | `RSA_PKCS1_SHA1 | `RSA_PKCS1_SHA224 | `RSA_PKCS1_SHA256 | `RSA_PKCS1_SHA384 | `RSA_PKCS1_SHA512 | `RSA_PSS_RSAENC_SHA256 | `RSA_PSS_RSAENC_SHA384 | `RSA_PSS_RSAENC_SHA512 ECDSA_SECP256R1_SHA1 ECDSA_SECP256R1_SHA256 ECDSA_SECP384R1_SHA384 ECDSA_SECP521R1_SHA512 ] list | `NoConfiguredVersions of [< `TLS_1_0 | `TLS_1_1 | `TLS_1_2 | `TLS_1_3 ] list | `NoMatchingCertificateFound of string ] | `Fatal of [< `BadCertificateChain | `BadECDH of Mirage_crypto_ec.error | `BadFinished | `BadRecordVersion of [< `SSL_3 | `TLS_1_0 | `TLS_1_1 | `TLS_1_2 | `TLS_1_3 | `TLS_1_X of int ] | `CannotHandleApplicationDataYet | `Downgrade11 | `Downgrade12 | `HandshakeFragmentsNotEmpty | `HelloRetryRequest | `InappropriateFallback | `InsufficientDH | `InvalidCertificateExtendedUsage | `InvalidCertificateUsage | `InvalidClientHello of [< `EmptyCiphersuites | `Has0rttAfterHRR | `NoCookie | `NoGoodSignatureAlgorithms of [< `ECDSA_SECP256R1_SHA1 | `ECDSA_SECP256R1_SHA256 | `ECDSA_SECP384R1_SHA384 | `ECDSA_SECP521R1_SHA512 | `ED25519 | `RSA_PKCS1_MD5 | `RSA_PKCS1_SHA1 | `RSA_PKCS1_SHA224 | `RSA_PKCS1_SHA256 | `RSA_PKCS1_SHA384 | `RSA_PKCS1_SHA512 | `RSA_PSS_RSAENC_SHA256 | `RSA_PSS_RSAENC_SHA384 | `RSA_PSS_RSAENC_SHA512 ECDSA_SECP256R1_SHA1 ECDSA_SECP256R1_SHA256 ECDSA_SECP384R1_SHA384 ECDSA_SECP521R1_SHA512 ] list | `NoKeyShareExtension | `NoSignatureAlgorithmsExtension | `NoSupportedCiphersuite of Packet.any_ciphersuite list | `NoSupportedGroupExtension | `NotSetCiphersuites of Packet.any_ciphersuite list | `NotSetExtension of 'a | `NotSetKeyShare of (Packet.named_group * 'b) list | `NotSetSupportedGroup of Packet.named_group list | `NotSubsetKeyShareSupportedGroup of Packet.named_group list * (Packet.named_group * 'c) list ] | `InvalidDH | `InvalidMessage | `InvalidRenegotiation | `InvalidRenegotiationVersion of [< `TLS_1_0 | `TLS_1_1 | `TLS_1_2 | `TLS_1_3 ] | `InvalidServerHello | `InvalidSession | `KeyTooSmall | `MACMismatch | `MACUnderflow | `MissingContentType | `NoApplicationProtocol | `NoCertificateReceived | `NoCertificateVerifyReceived | `NoHeartbeat | `NoSecureRenegotiation | `NoSupportedGroup | `NoVersions of [< `SSL_3 | `TLS_1_0 | `TLS_1_1 | `TLS_1_2 | `TLS_1_3 | `TLS_1_X of int ] list | `NotRSACertificate | `ReaderError of Reader.error | `RecordOverflow of int | `SignatureVerificationFailed of string | `SigningFailed of string | `Toomany0rttbytes | `UnexpectedCCS | `UnexpectedHandshake of Core.tls_handshake | `UnknownContentType of int | `UnknownRecordVersion of int * int | `WriteHalfClosed ] ] -> unit
val common_data_to_epoch : common_session_data -> bool -> [ `host ] Domain_name.t option -> Core.epoch_data
val epoch_of_session : bool -> [ `host ] Domain_name.t option -> Core.tls_version -> [< `TLS of session_data | `TLS13 of session_data13 ] -> Core.epoch_data
val epoch_of_hs : handshake_state -> Core.epoch_data option
OCaml

Innovation. Community. Security.