Moduletls-2.4.9Haskell2010
Network.TLS.Internal
- 141 types
- 1 class
- 140 values
- Packagetls-2.4.9
- Exports443
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceExtension.hs
all supported extensions by the implementation
Instances5Eq, Show, Generic, Serialise, Rep
Eq GroupDefined in tls-2.4.9 · Network.TLS.Crypto.TypesShow GroupDefined in tls-2.4.9 · Network.TLS.Crypto.TypesGeneric GroupDefined in tls-2.4.9 · Network.TLS.Crypto.TypesSerialise GroupDefined in tls-2.4.9 · Network.TLS.Crypto.Typestype Rep Group = D1 ('MetaDataDefined in tls-2.4.9 · Network.TLS.Crypto.Types"Group"
"Network.TLS.Crypto.Types"
"tls-2.4.9-GfDMdHL6iE22nv0AhKMuYm"
'True) (C1 ('MetaCons"Group"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16)))
Application Layer Protocol Negotiation (ALPN)
Constructors
ApplicationLayerProtocolNegotiation [ByteString]
Constructors
CertificateAuthorities [DistinguishedName]
Constructors
CertificateCompressionAlgorithm Word16
Constructors
CompressCertificate [CertificateCompressionAlgorithm]
Constructors
Cookie ByteString
Constructors
EcPointFormatfromEcPointFormat :: Word8
Constructors
EcPointFormatsSupported [EcPointFormat]
Constructors
EchOuterExtensions [ExtensionID]
Encrypted Client Hello
Constructors
ECHClientHelloInnerECHClientHelloOuterechCipherSuite :: (KDF_ID, AEAD_ID)echConfigId :: ConfigIdechEnc :: EncodedPublicKeyechPayload :: ByteString
ECHEncryptedExtensions ECHConfigListECHHelloRetryRequest ByteString
Extended Main Secret
Extension class to transform bytes to and from a high level Extension type.
Methods
extensionID :: a -> ExtensionIDextensionDecode :: MessageType -> ByteString -> Maybe aDecode an extension's body as it appears in the given message.
Nothing covers both ways this can fail to produce a value: a body that does not parse, and a message the extension is not defined in. Both reach the peer the same way, as the decode_error alert that
lookupAndDecodeandlookupAndDecodeAndDoraise, which is what either case warrants.So the last clause of an instance is
Nothing, nevererror: the message type is chosen by this library rather than by the peer, so an unhandled one would be our own bug -- and turning our bug into an ErrorCall thrown from pure code, out through the handshake and into the application, is a worse answer than dropping the one connection.extensionEncode :: a -> ByteString
Instances23Extension, …
Extension ApplicationLayerProtocolNegotiationDefined in tls-2.4.9 · Network.TLS.ExtensionExtension CertificateAuthoritiesDefined in tls-2.4.9 · Network.TLS.ExtensionExtension CompressCertificateDefined in tls-2.4.9 · Network.TLS.ExtensionExtension CookieDefined in tls-2.4.9 · Network.TLS.ExtensionExtension EarlyDataIndicationDefined in tls-2.4.9 · Network.TLS.ExtensionExtension EcPointFormatsSupportedDefined in tls-2.4.9 · Network.TLS.ExtensionExtension EchOuterExtensionsDefined in tls-2.4.9 · Network.TLS.ExtensionExtension EncryptedClientHelloDefined in tls-2.4.9 · Network.TLS.ExtensionExtension ExtendedMainSecretDefined in tls-2.4.9 · Network.TLS.ExtensionExtension HeartBeatDefined in tls-2.4.9 · Network.TLS.ExtensionExtension KeyShareDefined in tls-2.4.9 · Network.TLS.ExtensionExtension MaxFragmentLengthDefined in tls-2.4.9 · Network.TLS.ExtensionExtension PostHandshakeAuthDefined in tls-2.4.9 · Network.TLS.ExtensionExtension PreSharedKeyDefined in tls-2.4.9 · Network.TLS.ExtensionExtension PskKeyExchangeModesDefined in tls-2.4.9 · Network.TLS.ExtensionExtension RecordSizeLimitDefined in tls-2.4.9 · Network.TLS.ExtensionExtension SecureRenegotiationDefined in tls-2.4.9 · Network.TLS.ExtensionExtension ServerNameDefined in tls-2.4.9 · Network.TLS.ExtensionExtension SessionTicketDefined in tls-2.4.9 · Network.TLS.ExtensionExtension SignatureAlgorithmsDefined in tls-2.4.9 · Network.TLS.ExtensionExtension SignatureAlgorithmsCertDefined in tls-2.4.9 · Network.TLS.ExtensionExtension SupportedGroupsDefined in tls-2.4.9 · Network.TLS.ExtensionExtension SupportedVersionsDefined in tls-2.4.9 · Network.TLS.Extension
Identifier of a TLS extension. http://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.txt
Constructors
ExtensionIDfromExtensionID :: Word16
Instances2Eq, Show
Eq ExtensionIDDefined in tls-2.4.9 · Network.TLS.ExtensionShow ExtensionIDDefined in tls-2.4.9 · Network.TLS.Extension
The raw content of a TLS extension.
Constructors
Instances2Eq, Show
Eq ExtensionRawDefined in tls-2.4.9 · Network.TLS.ExtensionShow ExtensionRawDefined in tls-2.4.9 · Network.TLS.Extension
Constructors
HeartBeat HeartBeatMode
Constructors
HeartBeatModefromHeartBeatMode :: Word8
Instances2Eq, Show
Eq MaxFragmentEnumDefined in tls-2.4.9 · Network.TLS.ExtensionShow MaxFragmentEnumDefined in tls-2.4.9 · Network.TLS.Extension
Max fragment extension with length from 512 bytes to 4096 bytes
RFC 6066 defines: If a server receives a maximum fragment length negotiation request for a value other than the allowed values, it MUST abort the handshake with an "illegal_parameter" alert.
So, if a server receives MaxFragmentLengthOther, it must send the alert.
Constructors
MaxFragmentLength MaxFragmentEnumMaxFragmentLengthOther Word8
Constructors
PskIdentity ByteString Word32
Constructors
PskKexModefromPskKexMode :: Word8
Constructors
PskKeyExchangeModes [PskKexMode]
Constructors
RecordSizeLimit Word16
Secure Renegotiation
Constructors
SecureRenegotiation ByteString ByteString
Server Name extension including the name type and the associated name. the associated name decoding is dependent of its name type. name type = 0 : hostname
Constructors
ServerName [ServerNameType]
Constructors
ServerNameHostName HostNameServerNameOther (Word8, ByteString)
Constructors
SessionTicket Ticket
Constructors
SignatureAlgorithms [HashAndSignatureAlgorithm]
Constructors
SignatureAlgorithmsCert [HashAndSignatureAlgorithm]
Constructors
SupportedGroups [Group]
A ChangeCipherSpec is the single byte 1. RFC 8446 Section 5 answers any other value with unexpected_message, and TLS 1.2, which does not say, is answered the same way: a record of two of them included.
encodePacket transform a packet into marshalled data related to current state and updating state on the go
in certain cases, we haven't manage to decode ServerKeyExchange properly, because the decoding was too eager and the cipher wasn't been set yet. we keep the Server Key Exchange in it unparsed format, and this function is able to really decode the server key xchange if it's unparsed.
Decode a list CA distinguished names
The TLS12 PRF is cipher specific, and some TLS12 algorithms use SHA384 instead of the default SHA256.
Encode a list of distinguished names.
Last supported certificate type, no 'CertificateType that compares greater than this one (based on the Ord instance, not on the wire code point) will be reported to the application via the client certificate request callback.
A list of OID and strings.
Instances6Eq, Ord, Show, Semigroup, Monoid, ASN1Object
Eq DistinguishedNameDefined in crypton-x509-1.9.2 · Data.X509.DistinguishedNameOrd DistinguishedNameDefined in crypton-x509-1.9.2 · Data.X509.DistinguishedNameShow DistinguishedNameDefined in crypton-x509-1.9.2 · Data.X509.DistinguishedNameSemigroup DistinguishedNameDefined in crypton-x509-1.9.2 · Data.X509.DistinguishedNameMonoid DistinguishedNameDefined in crypton-x509-1.9.2 · Data.X509.DistinguishedNameASN1Object DistinguishedNameDefined in crypton-x509-1.9.2 · Data.X509.DistinguishedName
Constructors
Instances2Eq, Show
Eq AlertDescriptionDefined in tls-2.4.9 · Network.TLS.ErrorShow AlertDescriptionDefined in tls-2.4.9 · Network.TLS.Error
Constructors
AlertLevelfromAlertLevel :: Word8
TLSError that might be returned through the TLS stack.
Prior to version 1.8.0, this type had an Exception instance.
In version 1.8.0, this instance was removed, and functions in
this library now only throw TLSException.
Constructors
Error_Misc Stringmainly for instance of Error
Error_Protocol String AlertDescriptionA fatal error condition was encountered at a low level. The elements of the tuple give (freeform text description, structured error description).
Error_Protocol_Warning String AlertDescriptionA non-fatal error condition was encountered at a low level at a low level. The elements of the tuple give (freeform text description, structured error description).
Error_Certificate StringError_HandshakePolicy Stringhandshake policy failed.
Error_EOFError_Packet StringError_Packet_unexpected String StringError_Packet_Parsing StringError_TCP_Terminate
Instances4Eq, Show, MonadError
Eq TLSErrorDefined in tls-2.4.9 · Network.TLS.ErrorShow TLSErrorDefined in tls-2.4.9 · Network.TLS.ErrorMonadError TLSError RecordMDefined in tls-2.4.9 · Network.TLS.Record.StateMonadError TLSError TLSStDefined in tls-2.4.9 · Network.TLS.State
TLS Exceptions. Some of the data constructors indicate incorrect use of the library, and the documentation for those data constructors calls this out. The others wrap TLSError with some kind of context to explain when the exception occurred.
Constructors
Terminated Bool String TLSErrorEarly termination exception with the reason and the error associated
HandshakeFailed TLSErrorHandshake failed for the reason attached.
PostHandshake TLSErrorFailure occurred while sending or receiving data after the TLS handshake succeeded.
Uncontextualized TLSErrorLifts a TLSError into TLSException without provided any context around when the error happened.
ConnectionNotEstablishedUsage error when the connection has not been established and the user is trying to send or receive data. Indicates that this library has been used incorrectly.
MissingHandshakeExpected that a TLS handshake had already taken place, but no TLS handshake had occurred. Indicates that this library has been used incorrectly.
Instances3Eq, Show, Exception
Eq TLSExceptionDefined in tls-2.4.9 · Network.TLS.ErrorShow TLSExceptionDefined in tls-2.4.9 · Network.TLS.ErrorException TLSExceptionDefined in tls-2.4.9 · Network.TLS.Error
Identifier of a TLS extension. http://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.txt
Constructors
ExtensionIDfromExtensionID :: Word16
Instances2Eq, Show
Eq ExtensionIDDefined in tls-2.4.9 · Network.TLS.ExtensionShow ExtensionIDDefined in tls-2.4.9 · Network.TLS.Extension
The raw content of a TLS extension.
Constructors
Instances2Eq, Show
Eq ExtensionRawDefined in tls-2.4.9 · Network.TLS.ExtensionShow ExtensionRawDefined in tls-2.4.9 · Network.TLS.Extension
Constructors
Instances2Eq, Show
Eq HashAlgorithmDefined in tls-2.4.9 · Network.TLS.HashAndSignatureShow HashAlgorithmDefined in tls-2.4.9 · Network.TLS.HashAndSignature
Constructors
Instances2Eq, Show
Eq SignatureAlgorithmDefined in tls-2.4.9 · Network.TLS.HashAndSignatureShow SignatureAlgorithmDefined in tls-2.4.9 · Network.TLS.HashAndSignature
Constructors
CertificateChain_ CertificateChain
Some of the IANA registered code points for CertificateType are not currently supported by the library. Nor should they be, they're are either unwise, obsolete or both. There's no point in conveying these to the user in the client certificate request callback. The request callback will be filtered to exclude unsupported values. If the user cannot find a certificate for a supported code point, we'll go ahead without a client certificate and hope for the best, unless the user's callback decides to throw an exception.
Constructors
Instances3Eq, Ord, Show
Eq CertificateTypeDefined in tls-2.4.9 · Network.TLS.StructOrd CertificateTypeDefined in tls-2.4.9 · Network.TLS.StructShow CertificateTypeDefined in tls-2.4.9 · Network.TLS.Struct
TLS10 and up, RFC5246
TLS10 and up, RFC8422
TLS10 and up, RFC5246
Constructors
CipherDatacipherDataContent :: ByteStringcipherDataMAC :: Maybe ByteStringcipherDataPadding :: Maybe (ByteString, Int)
Constructors
CHchVersion :: VersionchRandom :: ClientRandomchSession :: SessionchCiphers :: [CipherId]chComps :: [CompressionID]chExtensions :: [ExtensionRaw]
Constructors
CKX_RSA ByteStringCKX_DH DHPublicCKX_ECDH ByteString
Constructors
ClientRandom
Instances2Eq, Show
Eq ClientRandomDefined in tls-2.4.9 · Network.TLS.StructShow ClientRandomDefined in tls-2.4.9 · Network.TLS.Struct
Constructors
DigitallySigned HashAndSignatureAlgorithm Signature
Deprecated. use VerifyData
Constructors
ClientHello ClientHelloServerHello ServerHelloCertificate CertificateChain_HelloRequestServerHelloDoneClientKeyXchg ClientKeyXchgAlgorithmDataServerKeyXchg ServerKeyXchgAlgorithmDataCertRequest [CertificateType] [HashAndSignatureAlgorithm] [DistinguishedName]CertVerify DigitallySignedFinished VerifyDataNewSessionTicket Second Ticket
Constructors
HandshakeTypefromHandshakeType :: Word8
Constructors
Constructors
Handshake [Handshake] [WireBytes]Alert [(AlertLevel, AlertDescription)]ChangeCipherSpecAppData ByteString
Constructors
Instances2Eq, Show
Eq ProtocolTypeDefined in tls-2.4.9 · Network.TLS.StructShow ProtocolTypeDefined in tls-2.4.9 · Network.TLS.Struct
Constructors
ServerDHParamsserverDHParams_p :: BigNumserverDHParams_g :: BigNumserverDHParams_y :: BigNum
Constructors
ServerECDHParams Group GroupPublicA
Constructors
SHshVersion :: VersionshRandom :: ServerRandomshSession :: SessionshCipher :: CipherIdshComp :: CompressionIDshExtensions :: [ExtensionRaw]
Constructors
SKX_DH_Anon ServerDHParamsSKX_DHE_DSA ServerDHParams DigitallySignedSKX_DHE_RSA ServerDHParams DigitallySignedSKX_ECDHE_RSA ServerECDHParams DigitallySignedSKX_ECDHE_ECDSA ServerECDHParams DigitallySignedSKX_RSA (Maybe ServerRSAParams)SKX_DH_DSA (Maybe ServerDSAParams)SKX_DH_RSA (Maybe ServerRSAParams)SKX_Unparsed ByteStringSKX_Unknown ByteString
Constructors
ServerRandom
Instances2Eq, Show
Eq ServerRandomDefined in tls-2.4.9 · Network.TLS.StructShow ServerRandomDefined in tls-2.4.9 · Network.TLS.Struct
Constructors
VerifyData ByteString
Session data to resume
Constructors
SessionDatasessionVersion :: VersionsessionCipher :: CipherIDsessionCompression :: CompressionIDsessionClientSNI :: Maybe HostNamesessionSecret :: ByteStringsessionGroup :: Maybe GroupsessionTicketInfo :: Maybe TLS13TicketInfosessionALPN :: Maybe ByteStringsessionMaxEarlyDataSize :: IntsessionFlags :: [SessionFlag]
Instances6Eq, Show, Generic, DebugShow, Serialise, Rep
Eq SessionDataDefined in tls-2.4.9 · Network.TLS.Types.SessionShow SessionDataDefined in tls-2.4.9 · Network.TLS.Types.SessionEverything but
sessionSecret, which renders as<secret>: whoever has it can resume the session. debugShow renders it.Generic SessionDataDefined in tls-2.4.9 · Network.TLS.Types.SessionDebugShow SessionDataDefined in tls-2.4.9 · Network.TLS.Types.SessionSerialise SessionDataDefined in tls-2.4.9 · Network.TLS.Types.Sessiontype Rep SessionData = D1 ('MetaDataDefined in tls-2.4.9 · Network.TLS.Types.Session"SessionData"
"Network.TLS.Types.Session"
"tls-2.4.9-GfDMdHL6iE22nv0AhKMuYm"
'False) (C1 ('MetaCons"SessionData"
'PrefixI 'True) (((S1 ('MetaSel ('Just"sessionVersion"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedUnpack) (Rec0 Version) :*: S1 ('MetaSel ('Just"sessionCipher"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedUnpack) (Rec0 CipherID)) :*: (S1 ('MetaSel ('Just"sessionCompression"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedUnpack) (Rec0 CompressionID) :*: (S1 ('MetaSel ('Just"sessionClientSNI"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe HostName)) :*: S1 ('MetaSel ('Just"sessionSecret"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ByteString)))) :*: ((S1 ('MetaSel ('Just"sessionGroup"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Group)) :*: S1 ('MetaSel ('Just"sessionTicketInfo"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe TLS13TicketInfo))) :*: (S1 ('MetaSel ('Just"sessionALPN"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ByteString)) :*: (S1 ('MetaSel ('Just"sessionMaxEarlyDataSize"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedUnpack) (Rec0 Int) :*: S1 ('MetaSel ('Just"sessionFlags"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [SessionFlag]))))))
A session ID
Instances6Eq, Ord, Show, Generic, Serialise, Rep
Eq VersionDefined in tls-2.4.9 · Network.TLS.Types.VersionOrd VersionDefined in tls-2.4.9 · Network.TLS.Types.VersionShow VersionDefined in tls-2.4.9 · Network.TLS.Types.VersionGeneric VersionDefined in tls-2.4.9 · Network.TLS.Types.VersionSerialise VersionDefined in tls-2.4.9 · Network.TLS.Types.Versiontype Rep Version = D1 ('MetaDataDefined in tls-2.4.9 · Network.TLS.Types.Version"Version"
"Network.TLS.Types.Version"
"tls-2.4.9-GfDMdHL6iE22nv0AhKMuYm"
'True) (C1 ('MetaCons"Version"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16)))
Certificate request context for TLS 1.3.
Constructors
ServerHello13 ServerHelloNewSessionTicket13 Second Word32 TicketNonce SessionIDorTicket_ [ExtensionRaw]EndOfEarlyData13EncryptedExtensions13 [ExtensionRaw]Certificate13 CertReqContext CertificateChain_ [[ExtensionRaw]]CertRequest13 CertReqContext [ExtensionRaw]CertVerify13 DigitallySignedFinished13 VerifyDataKeyUpdate13 KeyUpdateCompressedCertificate13 CertReqContext CertificateChain_ [[ExtensionRaw]]
Instances2Eq, Show
Eq Handshake13Defined in tls-2.4.9 · Network.TLS.Struct13Show Handshake13Defined in tls-2.4.9 · Network.TLS.Struct13
Constructors
Handshake13 [Handshake13] [WireBytes]Alert13 [(AlertLevel, AlertDescription)]ChangeCipherSpec13AppData13 ByteString
Constructors
SessionIDorTicket_ ByteString
Constructors
TicketNonce ByteString
The largest handshake message we will reassemble.
A handshake message carries a 24-bit length, so a peer may announce close to 16MB and then feed it a record at a time. Records are bounded, but the message they are reassembled into was not, and the fragments are held until it is complete -- before anything has authenticated the peer.
The largest legitimate one is a Certificate message. A long chain of post-quantum certificates runs to tens of kilobytes, so this leaves an order of magnitude over anything real while taking two orders of magnitude off what a peer can ask us to hold.
What the two instances above share, so that a field added to SessionData cannot reach one of them and not the other.
Either a host name e.g., "haskell.org" or a numeric host
address string consisting of a dotted decimal IPv4 address or an
IPv6 address e.g., "192.168.0.1".
Constructors
BigNum ByteString
Constructors
TranscriptHash ByteString
Instances1Show
Show TranscriptHashDefined in tls-2.4.9 · Network.TLS.Types
Constructors
BulkBlockF (BulkDirection -> BulkKey -> BulkBlock)BulkStreamF (BulkDirection -> BulkKey -> BulkStream)BulkAeadF (BulkDirection -> BulkKey -> BulkAEAD)
Constructors
BulkStream (ByteString -> (ByteString, BulkStream))
Cipher algorithm
Cipher identification
Constructors
CipherIdfromCipherId :: Word16
Instances10Enum, Eq, Integral, Num, Ord, Read, …
Enum CipherIdDefined in tls-2.4.9 · Network.TLS.Types.CipherEq CipherIdDefined in tls-2.4.9 · Network.TLS.Types.CipherIntegral CipherIdDefined in tls-2.4.9 · Network.TLS.Types.CipherNum CipherIdDefined in tls-2.4.9 · Network.TLS.Types.CipherOrd CipherIdDefined in tls-2.4.9 · Network.TLS.Types.CipherRead CipherIdDefined in tls-2.4.9 · Network.TLS.Types.CipherReal CipherIdDefined in tls-2.4.9 · Network.TLS.Types.CipherShow CipherIdDefined in tls-2.4.9 · Network.TLS.Types.CipherGeneric CipherIdDefined in tls-2.4.9 · Network.TLS.Types.Ciphertype Rep CipherId = D1 ('MetaDataDefined in tls-2.4.9 · Network.TLS.Types.Cipher"CipherId"
"Network.TLS.Types.Cipher"
"tls-2.4.9-GfDMdHL6iE22nv0AhKMuYm"
'True) (C1 ('MetaCons"CipherId"
'PrefixI 'True) (S1 ('MetaSel ('Just"fromCipherId"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16)))
Constructors
AnyTrafficSecret Secret
Phantom type indicating application traffic secrets.
Instances3HasCryptLevel, LogLabel
HasCryptLevel ApplicationSecretDefined in tls-2.4.9 · Network.TLS.Record.StateLogLabel (ClientTrafficSecret ApplicationSecret)Defined in tls-2.4.9 · Network.TLS.Handshake.KeyLogLabel (ServerTrafficSecret ApplicationSecret)Defined in tls-2.4.9 · Network.TLS.Handshake.Key
Constructors
BaseSecret Secret
A client traffic secret, typed with a parameter indicating a step in the TLS key schedule.
Constructors
ClientTrafficSecret Secret
Instances6Show, DebugShow, LogLabel, TrafficSecret
Show (ClientTrafficSecret a)Defined in tls-2.4.9 · Network.TLS.Types.SecretDebugShow (ClientTrafficSecret a)Defined in tls-2.4.9 · Network.TLS.Types.SecretLogLabel (ClientTrafficSecret ApplicationSecret)Defined in tls-2.4.9 · Network.TLS.Handshake.KeyLogLabel (ClientTrafficSecret EarlySecret)Defined in tls-2.4.9 · Network.TLS.Handshake.KeyLogLabel (ClientTrafficSecret HandshakeSecret)Defined in tls-2.4.9 · Network.TLS.Handshake.KeyHasCryptLevel a => TrafficSecret (ClientTrafficSecret a)Defined in tls-2.4.9 · Network.TLS.Handshake.State13
Phantom type indicating early traffic secret.
Instances2HasCryptLevel, LogLabel
HasCryptLevel EarlySecretDefined in tls-2.4.9 · Network.TLS.Record.StateLogLabel (ClientTrafficSecret EarlySecret)Defined in tls-2.4.9 · Network.TLS.Handshake.Key
Phantom type indicating handshake traffic secrets.
Instances3HasCryptLevel, LogLabel
HasCryptLevel HandshakeSecretDefined in tls-2.4.9 · Network.TLS.Record.StateLogLabel (ClientTrafficSecret HandshakeSecret)Defined in tls-2.4.9 · Network.TLS.Handshake.KeyLogLabel (ServerTrafficSecret HandshakeSecret)Defined in tls-2.4.9 · Network.TLS.Handshake.Key
Constructors
MainSecret Secret
Constructors
SecretPairpairBase :: BaseSecret apairClient :: ClientTrafficSecret a
Instances1Show
Show (SecretPair a)Defined in tls-2.4.9 · Network.TLS.Types.Secret
Constructors
SecretTripletriBase :: BaseSecret atriClient :: ClientTrafficSecret atriServer :: ServerTrafficSecret a
Instances1Show
Show (SecretTriple a)Defined in tls-2.4.9 · Network.TLS.Types.Secret
A server traffic secret, typed with a parameter indicating a step in the TLS key schedule.
Constructors
ServerTrafficSecret Secret
Instances5Show, DebugShow, LogLabel, TrafficSecret
Show (ServerTrafficSecret a)Defined in tls-2.4.9 · Network.TLS.Types.SecretDebugShow (ServerTrafficSecret a)Defined in tls-2.4.9 · Network.TLS.Types.SecretLogLabel (ServerTrafficSecret ApplicationSecret)Defined in tls-2.4.9 · Network.TLS.Handshake.KeyLogLabel (ServerTrafficSecret HandshakeSecret)Defined in tls-2.4.9 · Network.TLS.Handshake.KeyHasCryptLevel a => TrafficSecret (ServerTrafficSecret a)Defined in tls-2.4.9 · Network.TLS.Handshake.State13
Hold both client and server traffic secrets at the same step.
Compression identification
Session data to resume
Constructors
SessionDatasessionVersion :: VersionsessionCipher :: CipherIDsessionCompression :: CompressionIDsessionClientSNI :: Maybe HostNamesessionSecret :: ByteStringsessionGroup :: Maybe GroupsessionTicketInfo :: Maybe TLS13TicketInfosessionALPN :: Maybe ByteStringsessionMaxEarlyDataSize :: IntsessionFlags :: [SessionFlag]
Instances6Eq, Show, Generic, DebugShow, Serialise, Rep
Eq SessionDataDefined in tls-2.4.9 · Network.TLS.Types.SessionShow SessionDataDefined in tls-2.4.9 · Network.TLS.Types.SessionEverything but
sessionSecret, which renders as<secret>: whoever has it can resume the session. debugShow renders it.Generic SessionDataDefined in tls-2.4.9 · Network.TLS.Types.SessionDebugShow SessionDataDefined in tls-2.4.9 · Network.TLS.Types.SessionSerialise SessionDataDefined in tls-2.4.9 · Network.TLS.Types.Sessiontype Rep SessionData = D1 ('MetaDataDefined in tls-2.4.9 · Network.TLS.Types.Session"SessionData"
"Network.TLS.Types.Session"
"tls-2.4.9-GfDMdHL6iE22nv0AhKMuYm"
'False) (C1 ('MetaCons"SessionData"
'PrefixI 'True) (((S1 ('MetaSel ('Just"sessionVersion"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedUnpack) (Rec0 Version) :*: S1 ('MetaSel ('Just"sessionCipher"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedUnpack) (Rec0 CipherID)) :*: (S1 ('MetaSel ('Just"sessionCompression"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedUnpack) (Rec0 CompressionID) :*: (S1 ('MetaSel ('Just"sessionClientSNI"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe HostName)) :*: S1 ('MetaSel ('Just"sessionSecret"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ByteString)))) :*: ((S1 ('MetaSel ('Just"sessionGroup"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Group)) :*: S1 ('MetaSel ('Just"sessionTicketInfo"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe TLS13TicketInfo))) :*: (S1 ('MetaSel ('Just"sessionALPN"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ByteString)) :*: (S1 ('MetaSel ('Just"sessionMaxEarlyDataSize"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedUnpack) (Rec0 Int) :*: S1 ('MetaSel ('Just"sessionFlags"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [SessionFlag]))))))
Some session flags
Constructors
SessionEMSSession created with Extended Main Secret
Instances6Enum, Eq, Show, Generic, Serialise, Rep
Enum SessionFlagDefined in tls-2.4.9 · Network.TLS.Types.SessionEq SessionFlagDefined in tls-2.4.9 · Network.TLS.Types.SessionShow SessionFlagDefined in tls-2.4.9 · Network.TLS.Types.SessionGeneric SessionFlagDefined in tls-2.4.9 · Network.TLS.Types.SessionSerialise SessionFlagDefined in tls-2.4.9 · Network.TLS.Types.Sessiontype Rep SessionFlag = D1 ('MetaDataDefined in tls-2.4.9 · Network.TLS.Types.Session"SessionFlag"
"Network.TLS.Types.Session"
"tls-2.4.9-GfDMdHL6iE22nv0AhKMuYm"
'False) (C1 ('MetaCons"SessionEMS"
'PrefixI 'False) U1)
A session ID
Identity
Constructors
TLS13TicketInfolifetime :: SecondageAdd :: SecondtxrxTime :: MillisecondestimatedRTT :: Maybe Millisecond
Instances5Eq, Show, Generic, Serialise, Rep
Eq TLS13TicketInfoDefined in tls-2.4.9 · Network.TLS.Types.SessionShow TLS13TicketInfoDefined in tls-2.4.9 · Network.TLS.Types.SessionGeneric TLS13TicketInfoDefined in tls-2.4.9 · Network.TLS.Types.SessionSerialise TLS13TicketInfoDefined in tls-2.4.9 · Network.TLS.Types.Sessiontype Rep TLS13TicketInfo = D1 ('MetaDataDefined in tls-2.4.9 · Network.TLS.Types.Session"TLS13TicketInfo"
"Network.TLS.Types.Session"
"tls-2.4.9-GfDMdHL6iE22nv0AhKMuYm"
'False) (C1 ('MetaCons"TLS13TicketInfo"
'PrefixI 'True) ((S1 ('MetaSel ('Just"lifetime"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedUnpack) (Rec0 Second) :*: S1 ('MetaSel ('Just"ageAdd"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedUnpack) (Rec0 Second)) :*: (S1 ('MetaSel ('Just"txrxTime"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedUnpack) (Rec0 Millisecond) :*: S1 ('MetaSel ('Just"estimatedRTT"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Millisecond)))))
Encrypted session ticket (encrypt(encode SessionData)).
Instances6Eq, Ord, Show, Generic, Serialise, Rep
Eq VersionDefined in tls-2.4.9 · Network.TLS.Types.VersionOrd VersionDefined in tls-2.4.9 · Network.TLS.Types.VersionShow VersionDefined in tls-2.4.9 · Network.TLS.Types.VersionGeneric VersionDefined in tls-2.4.9 · Network.TLS.Types.VersionSerialise VersionDefined in tls-2.4.9 · Network.TLS.Types.Versiontype Rep Version = D1 ('MetaDataDefined in tls-2.4.9 · Network.TLS.Types.Version"Version"
"Network.TLS.Types.Version"
"tls-2.4.9-GfDMdHL6iE22nv0AhKMuYm"
'True) (C1 ('MetaCons"Version"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16)))
Pull n bytes from the input, as a strict ByteString.
Read a Word8 from the monad state
Test whether all input has been consumed.
WARNING: when run with runGetPartial, isEmpty will only tell you if you're
at the end of the current chunk.
Get the number of remaining unparsed bytes. Useful for checking whether all input has been consumed.
WARNING: when run with runGetPartial, remaining will only return the number
of bytes that are remaining in the current input.
Efficiently write a byte into the output buffer
Run the Put monad with a serialiser
The Get monad is an Exception and State monad.
Instances6Monad, Functor, MonadFail, Applicative, Alternative, MonadPlus
Monad GetDefined in cereal-0.5.8.3 · Data.Serialize.GetFunctor GetDefined in cereal-0.5.8.3 · Data.Serialize.GetMonadFail GetDefined in cereal-0.5.8.3 · Data.Serialize.GetApplicative GetDefined in cereal-0.5.8.3 · Data.Serialize.GetAlternative GetDefined in cereal-0.5.8.3 · Data.Serialize.GetMonadPlus GetDefined in cereal-0.5.8.3 · Data.Serialize.Get
Put merely lifts Builder into a Writer monad, applied to ().
Constructors
GotError TLSErrorGotPartial (GetContinuation a)GotSuccess aGotSuccessRemaining a ByteString
Get the Certificate associated to a SignedCertificate
validateDefault :: CertificateStoreThe trusted certificate store for CA
-> ValidationCachethe validation cache callbacks
-> ServiceIDidentification of the connection
-> CertificateChainthe certificate chain we want to validate
-> IO [FailedReason]the return failed reasons (empty list is no failure)
Validate using the default hooks and checks and the SHA256 mechanism as hashing mechanism
create a simple constant cache that list exceptions to the certification validation. Typically this is use to allow self-signed certificates for specific use, with out-of-bounds user checks.
No fingerprints will be added after the instance is created.
The underlying structure for the check is kept as a list, as usually the exception list will be short, but when the list go above a dozen exceptions it's recommended to use another cache mechanism with a faster lookup mechanism (hashtable, map, etc).
Note that only one fingerprint is allowed per ServiceID, for other use, another cache mechanism need to be use.
A utility function for client authentication which can be used
onClientCertificate.
Since: 2.1.7
A Signed Certificate
Extensions
Issuer DN
Public key
Serial number
Signature algorithm
Subject DN
Validity period (UTC)
Version
A chain of X.509 certificates in exact form.
Constructors
Instances2Eq, Show
Eq CertificateChainDefined in crypton-x509-1.9.2 · Data.X509.CertificateChainShow CertificateChainDefined in crypton-x509-1.9.2 · Data.X509.CertificateChain
A Collection of certificate or store of certificates.
Instances2Semigroup, Monoid
Semigroup CertificateStoreDefined in crypton-x509-store-1.9.0 · Data.X509.CertificateStoreMonoid CertificateStoreDefined in crypton-x509-store-1.9.0 · Data.X509.CertificateStore
Possible reason of certificate and chain failure.
The values InvalidName and InvalidWildcard are internal-only and are never returned by the validation functions. NameMismatch is returned instead.
Instances2Eq, Show
Eq FailedReasonDefined in crypton-x509-validation-1.9.1 · Data.X509.ValidationShow FailedReasonDefined in crypton-x509-validation-1.9.1 · Data.X509.Validation
All the callbacks needed for querying and adding to the cache.
Instances1Default
Default ValidationCacheDefined in crypton-x509-validation-1.9.1 · Data.X509.Validation.Cache
identification of the connection consisting of the fully qualified host name (e.g. www.example.com) and an optional suffix.
The suffix is not used by the validation process, but is used by the optional cache to identity certificate per service on a specific host. For example, one might have a different certificate on 2 differents ports (443 and 995) for the same host.
for TCP connection, it's recommended to use: :port, or :service for the suffix.
Certificate and Chain rejection reason
Instances2Eq, Show
Eq CertificateRejectReasonDefined in tls-2.4.9 · Network.TLS.X509Show CertificateRejectReasonDefined in tls-2.4.9 · Network.TLS.X509
Certificate Usage callback possible returns values.
Constructors
CertificateUsageAcceptusage of certificate accepted
CertificateUsageReject CertificateRejectReasonusage of certificate rejected
Instances2Eq, Show
Eq CertificateUsageDefined in tls-2.4.9 · Network.TLS.X509Show CertificateUsageDefined in tls-2.4.9 · Network.TLS.X509
Send one packet to the context
receive one packet from the context that contains 1 or many messages (many only in case of handshake). if will returns a TLSError if the packet is unexpected or malformed