Safe Haskell | None |
---|---|
Language | GHC2021 |
Rustls.Internal
Description
Internal module, not subject to PVP.
Synopsis
- newtype CryptoProvider = CryptoProvider {}
- newtype ALPNProtocol = ALPNProtocol {}
- data CipherSuite = CipherSuite {}
- data NegotiatedCipherSuite = NegotiatedCipherSuite {}
- data ClientConfigBuilder = ClientConfigBuilder {}
- data ServerCertVerifier
- data PEMCertificates
- data PEMCertificateParsing
- data CertifiedKey = CertifiedKey {}
- data ClientConfig = ClientConfig {}
- data ClientCertVerifier = ClientCertVerifier {}
- data ClientCertVerifierPolicy
- newtype CertificateRevocationList = CertificateRevocationList {}
- data ServerConfigBuilder = ServerConfigBuilder {}
- data ServerConfig = ServerConfig {}
- data LogLevel
- newtype LogCallback = LogCallback {}
- newtype HandshakeQuery (side :: Side) a = HandshakeQuery (ReaderT Connection' IO a)
- handshakeQuery :: forall a (side :: Side). (Connection' -> IO a) -> HandshakeQuery side a
- newtype RustlsException = RustlsException {}
- resultMsg :: Result -> Text
- isCertError :: RustlsException -> Bool
- rethrowR :: Result -> IO ()
- newtype RustlsLogException = RustlsLogException SomeException
- data RustlsUnknownLogLevel = RustlsUnknownLogLevel LogLevel
- data Backend = Backend {}
- mkSocketBackend :: Socket -> Backend
- mkByteStringBackend :: (Int -> IO ByteString) -> (ByteString -> IO ()) -> Backend
- data Side
- newtype Connection (side :: Side) = Connection (MVar Connection')
- data Connection' = Connection' {}
- withConnection :: forall (side :: Side) a. Connection side -> (Connection' -> IO a) -> IO a
- data ReadOrWrite
- data IOMsgReq
- data IOMsgRes
- interactTLS :: Connection' -> ReadOrWrite -> IO CSize
- data IsEOF
- completeIO :: Connection' -> IO IsEOF
- completePriorIO :: Connection' -> IO ()
- getIsHandshaking :: Connection' -> IO Bool
- getWantsRead :: Connection' -> IO Bool
- getWantsWrite :: Connection' -> IO Bool
- whenM :: Monad m => m Bool -> m () -> m ()
- loopWhileTrue :: Monad m => m Bool -> m ()
- cSizeToInt :: CSize -> Int
- intToCSize :: Int -> CSize
- strToText :: Str -> IO Text
- ignoreExceptions :: IO () -> IO ()
- ignoreSyncExceptions :: IO () -> IO ()
Documentation
newtype CryptoProvider Source #
A cryptography provider for Rustls.
In particular, this contains the set of supported TLS cipher suites.
Constructors
CryptoProvider | |
Fields |
Instances
Show CryptoProvider Source # | |
Defined in Rustls.Internal Methods showsPrec :: Int -> CryptoProvider -> ShowS # show :: CryptoProvider -> String # showList :: [CryptoProvider] -> ShowS # |
newtype ALPNProtocol Source #
An ALPN protocol ID. See https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for a list of registered IDs.
Constructors
ALPNProtocol | |
Fields |
Instances
data CipherSuite Source #
A TLS cipher suite supported by a Rustls cryptography provider.
Constructors
CipherSuite | |
Fields
|
Instances
Generic CipherSuite Source # | |||||
Defined in Rustls.Internal Associated Types
| |||||
Show CipherSuite Source # | |||||
Defined in Rustls.Internal Methods showsPrec :: Int -> CipherSuite -> ShowS # show :: CipherSuite -> String # showList :: [CipherSuite] -> ShowS # | |||||
Eq CipherSuite Source # | |||||
Defined in Rustls.Internal | |||||
Ord CipherSuite Source # | |||||
Defined in Rustls.Internal Methods compare :: CipherSuite -> CipherSuite -> Ordering # (<) :: CipherSuite -> CipherSuite -> Bool # (<=) :: CipherSuite -> CipherSuite -> Bool # (>) :: CipherSuite -> CipherSuite -> Bool # (>=) :: CipherSuite -> CipherSuite -> Bool # max :: CipherSuite -> CipherSuite -> CipherSuite # min :: CipherSuite -> CipherSuite -> CipherSuite # | |||||
type Rep CipherSuite Source # | |||||
Defined in Rustls.Internal type Rep CipherSuite = D1 ('MetaData "CipherSuite" "Rustls.Internal" "rustls-0.2.0.0-inplace" 'False) (C1 ('MetaCons "CipherSuite" 'PrefixI 'True) (S1 ('MetaSel ('Just "cipherSuiteID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word16) :*: (S1 ('MetaSel ('Just "cipherSuiteName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "cipherSuiteTLSVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 TLSVersion)))) |
data NegotiatedCipherSuite Source #
A negotiated TLS cipher suite. Subset of CipherSuite
.
Constructors
NegotiatedCipherSuite | |
Fields
|
Instances
Generic NegotiatedCipherSuite Source # | |||||
Defined in Rustls.Internal Associated Types
Methods from :: NegotiatedCipherSuite -> Rep NegotiatedCipherSuite x # to :: Rep NegotiatedCipherSuite x -> NegotiatedCipherSuite # | |||||
Show NegotiatedCipherSuite Source # | |||||
Defined in Rustls.Internal Methods showsPrec :: Int -> NegotiatedCipherSuite -> ShowS # show :: NegotiatedCipherSuite -> String # showList :: [NegotiatedCipherSuite] -> ShowS # | |||||
Eq NegotiatedCipherSuite Source # | |||||
Defined in Rustls.Internal Methods (==) :: NegotiatedCipherSuite -> NegotiatedCipherSuite -> Bool # (/=) :: NegotiatedCipherSuite -> NegotiatedCipherSuite -> Bool # | |||||
Ord NegotiatedCipherSuite Source # | |||||
Defined in Rustls.Internal Methods compare :: NegotiatedCipherSuite -> NegotiatedCipherSuite -> Ordering # (<) :: NegotiatedCipherSuite -> NegotiatedCipherSuite -> Bool # (<=) :: NegotiatedCipherSuite -> NegotiatedCipherSuite -> Bool # (>) :: NegotiatedCipherSuite -> NegotiatedCipherSuite -> Bool # (>=) :: NegotiatedCipherSuite -> NegotiatedCipherSuite -> Bool # max :: NegotiatedCipherSuite -> NegotiatedCipherSuite -> NegotiatedCipherSuite # min :: NegotiatedCipherSuite -> NegotiatedCipherSuite -> NegotiatedCipherSuite # | |||||
type Rep NegotiatedCipherSuite Source # | |||||
Defined in Rustls.Internal type Rep NegotiatedCipherSuite = D1 ('MetaData "NegotiatedCipherSuite" "Rustls.Internal" "rustls-0.2.0.0-inplace" 'False) (C1 ('MetaCons "NegotiatedCipherSuite" 'PrefixI 'True) (S1 ('MetaSel ('Just "negotiatedCipherSuiteID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word16) :*: S1 ('MetaSel ('Just "negotiatedCipherSuiteName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))) |
data ClientConfigBuilder Source #
Rustls client config builder.
Constructors
ClientConfigBuilder | |
Fields
|
Instances
Generic ClientConfigBuilder Source # | |||||
Defined in Rustls.Internal Associated Types
Methods from :: ClientConfigBuilder -> Rep ClientConfigBuilder x # to :: Rep ClientConfigBuilder x -> ClientConfigBuilder # | |||||
Show ClientConfigBuilder Source # | |||||
Defined in Rustls.Internal Methods showsPrec :: Int -> ClientConfigBuilder -> ShowS # show :: ClientConfigBuilder -> String # showList :: [ClientConfigBuilder] -> ShowS # | |||||
type Rep ClientConfigBuilder Source # | |||||
Defined in Rustls.Internal type Rep ClientConfigBuilder = D1 ('MetaData "ClientConfigBuilder" "Rustls.Internal" "rustls-0.2.0.0-inplace" 'False) (C1 ('MetaCons "ClientConfigBuilder" 'PrefixI 'True) ((S1 ('MetaSel ('Just "clientConfigCryptoProvider") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CryptoProvider) :*: S1 ('MetaSel ('Just "clientConfigServerCertVerifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ServerCertVerifier)) :*: (S1 ('MetaSel ('Just "clientConfigALPNProtocols") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [ALPNProtocol]) :*: (S1 ('MetaSel ('Just "clientConfigEnableSNI") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "clientConfigCertifiedKeys") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [CertifiedKey]))))) |
data ServerCertVerifier Source #
How to verify TLS server certificates.
Constructors
PlatformServerCertVerifier | Verify the validity of TLS certificates based on the operating system's certificate facilities, using rustls-platform-verifier. |
ServerCertVerifier | |
Fields
|
Instances
Generic ServerCertVerifier Source # | |||||
Defined in Rustls.Internal Associated Types
Methods from :: ServerCertVerifier -> Rep ServerCertVerifier x # to :: Rep ServerCertVerifier x -> ServerCertVerifier # | |||||
Show ServerCertVerifier Source # | |||||
Defined in Rustls.Internal Methods showsPrec :: Int -> ServerCertVerifier -> ShowS # show :: ServerCertVerifier -> String # showList :: [ServerCertVerifier] -> ShowS # | |||||
type Rep ServerCertVerifier Source # | |||||
Defined in Rustls.Internal type Rep ServerCertVerifier = D1 ('MetaData "ServerCertVerifier" "Rustls.Internal" "rustls-0.2.0.0-inplace" 'False) (C1 ('MetaCons "PlatformServerCertVerifier" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ServerCertVerifier" 'PrefixI 'True) (S1 ('MetaSel ('Just "serverCertVerifierCertificates") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (NonEmpty PEMCertificates)) :*: S1 ('MetaSel ('Just "serverCertVerifierCRLs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [CertificateRevocationList]))) |
data PEMCertificates Source #
A source of PEM-encoded certificates.
Constructors
PEMCertificatesInMemory ByteString PEMCertificateParsing | In-memory PEM-encoded certificates. |
PemCertificatesFromFile FilePath PEMCertificateParsing | Fetch PEM-encoded root certificates from a file. |
Instances
Generic PEMCertificates Source # | |||||
Defined in Rustls.Internal Associated Types
Methods from :: PEMCertificates -> Rep PEMCertificates x # to :: Rep PEMCertificates x -> PEMCertificates # | |||||
Show PEMCertificates Source # | |||||
Defined in Rustls.Internal Methods showsPrec :: Int -> PEMCertificates -> ShowS # show :: PEMCertificates -> String # showList :: [PEMCertificates] -> ShowS # | |||||
type Rep PEMCertificates Source # | |||||
Defined in Rustls.Internal type Rep PEMCertificates = D1 ('MetaData "PEMCertificates" "Rustls.Internal" "rustls-0.2.0.0-inplace" 'False) (C1 ('MetaCons "PEMCertificatesInMemory" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ByteString) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 PEMCertificateParsing)) :+: C1 ('MetaCons "PemCertificatesFromFile" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 FilePath) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 PEMCertificateParsing))) |
data PEMCertificateParsing Source #
Parsing mode for PEM-encoded certificates.
Constructors
PEMCertificateParsingStrict | Fail if syntactically invalid. |
PEMCertificateParsingLax | Ignore if syntactically invalid. This may be useful on systems that have syntactically invalid root certificates. |
Instances
Bounded PEMCertificateParsing Source # | |||||
Defined in Rustls.Internal | |||||
Enum PEMCertificateParsing Source # | |||||
Defined in Rustls.Internal Methods succ :: PEMCertificateParsing -> PEMCertificateParsing # pred :: PEMCertificateParsing -> PEMCertificateParsing # toEnum :: Int -> PEMCertificateParsing # fromEnum :: PEMCertificateParsing -> Int # enumFrom :: PEMCertificateParsing -> [PEMCertificateParsing] # enumFromThen :: PEMCertificateParsing -> PEMCertificateParsing -> [PEMCertificateParsing] # enumFromTo :: PEMCertificateParsing -> PEMCertificateParsing -> [PEMCertificateParsing] # enumFromThenTo :: PEMCertificateParsing -> PEMCertificateParsing -> PEMCertificateParsing -> [PEMCertificateParsing] # | |||||
Generic PEMCertificateParsing Source # | |||||
Defined in Rustls.Internal Associated Types
Methods from :: PEMCertificateParsing -> Rep PEMCertificateParsing x # to :: Rep PEMCertificateParsing x -> PEMCertificateParsing # | |||||
Show PEMCertificateParsing Source # | |||||
Defined in Rustls.Internal Methods showsPrec :: Int -> PEMCertificateParsing -> ShowS # show :: PEMCertificateParsing -> String # showList :: [PEMCertificateParsing] -> ShowS # | |||||
Eq PEMCertificateParsing Source # | |||||
Defined in Rustls.Internal Methods (==) :: PEMCertificateParsing -> PEMCertificateParsing -> Bool # (/=) :: PEMCertificateParsing -> PEMCertificateParsing -> Bool # | |||||
Ord PEMCertificateParsing Source # | |||||
Defined in Rustls.Internal Methods compare :: PEMCertificateParsing -> PEMCertificateParsing -> Ordering # (<) :: PEMCertificateParsing -> PEMCertificateParsing -> Bool # (<=) :: PEMCertificateParsing -> PEMCertificateParsing -> Bool # (>) :: PEMCertificateParsing -> PEMCertificateParsing -> Bool # (>=) :: PEMCertificateParsing -> PEMCertificateParsing -> Bool # max :: PEMCertificateParsing -> PEMCertificateParsing -> PEMCertificateParsing # min :: PEMCertificateParsing -> PEMCertificateParsing -> PEMCertificateParsing # | |||||
type Rep PEMCertificateParsing Source # | |||||
Defined in Rustls.Internal |
data CertifiedKey Source #
A complete chain of certificates plus a private key for the leaf certificate.
Constructors
CertifiedKey | |
Fields
|
Instances
Generic CertifiedKey Source # | |||||
Defined in Rustls.Internal Associated Types
| |||||
Show CertifiedKey Source # | |||||
Defined in Rustls.Internal Methods showsPrec :: Int -> CertifiedKey -> ShowS # show :: CertifiedKey -> String # showList :: [CertifiedKey] -> ShowS # | |||||
type Rep CertifiedKey Source # | |||||
Defined in Rustls.Internal type Rep CertifiedKey = D1 ('MetaData "CertifiedKey" "Rustls.Internal" "rustls-0.2.0.0-inplace" 'False) (C1 ('MetaCons "CertifiedKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "certificateChain") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ByteString) :*: S1 ('MetaSel ('Just "privateKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ByteString))) |
data ClientConfig Source #
Assembled configuration for a Rustls client connection.
Constructors
ClientConfig | |
Fields
|
data ClientCertVerifier Source #
How to verify TLS client certificates.
Constructors
ClientCertVerifier | |
Fields
|
Instances
Generic ClientCertVerifier Source # | |||||
Defined in Rustls.Internal Associated Types
Methods from :: ClientCertVerifier -> Rep ClientCertVerifier x # to :: Rep ClientCertVerifier x -> ClientCertVerifier # | |||||
Show ClientCertVerifier Source # | |||||
Defined in Rustls.Internal Methods showsPrec :: Int -> ClientCertVerifier -> ShowS # show :: ClientCertVerifier -> String # showList :: [ClientCertVerifier] -> ShowS # | |||||
type Rep ClientCertVerifier Source # | |||||
Defined in Rustls.Internal type Rep ClientCertVerifier = D1 ('MetaData "ClientCertVerifier" "Rustls.Internal" "rustls-0.2.0.0-inplace" 'False) (C1 ('MetaCons "ClientCertVerifier" 'PrefixI 'True) (S1 ('MetaSel ('Just "clientCertVerifierPolicy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ClientCertVerifierPolicy) :*: (S1 ('MetaSel ('Just "clientCertVerifierCertificates") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (NonEmpty PEMCertificates)) :*: S1 ('MetaSel ('Just "clientCertVerifierCRLs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [CertificateRevocationList])))) |
data ClientCertVerifierPolicy Source #
Which client connections are allowed by a ClientCertVerifier
.
Constructors
AllowAnyAuthenticatedClient | Allow any authenticated client (i.e. offering a trusted certificate), and reject clients offering none. |
AllowAnyAnonymousOrAuthenticatedClient | Allow any authenticated client (i.e. offering a trusted certificate), but also allow clients offering none. |
Instances
Bounded ClientCertVerifierPolicy Source # | |||||
Defined in Rustls.Internal | |||||
Enum ClientCertVerifierPolicy Source # | |||||
Defined in Rustls.Internal Methods succ :: ClientCertVerifierPolicy -> ClientCertVerifierPolicy # pred :: ClientCertVerifierPolicy -> ClientCertVerifierPolicy # toEnum :: Int -> ClientCertVerifierPolicy # fromEnum :: ClientCertVerifierPolicy -> Int # enumFrom :: ClientCertVerifierPolicy -> [ClientCertVerifierPolicy] # enumFromThen :: ClientCertVerifierPolicy -> ClientCertVerifierPolicy -> [ClientCertVerifierPolicy] # enumFromTo :: ClientCertVerifierPolicy -> ClientCertVerifierPolicy -> [ClientCertVerifierPolicy] # enumFromThenTo :: ClientCertVerifierPolicy -> ClientCertVerifierPolicy -> ClientCertVerifierPolicy -> [ClientCertVerifierPolicy] # | |||||
Generic ClientCertVerifierPolicy Source # | |||||
Defined in Rustls.Internal Associated Types
Methods from :: ClientCertVerifierPolicy -> Rep ClientCertVerifierPolicy x # to :: Rep ClientCertVerifierPolicy x -> ClientCertVerifierPolicy # | |||||
Show ClientCertVerifierPolicy Source # | |||||
Defined in Rustls.Internal Methods showsPrec :: Int -> ClientCertVerifierPolicy -> ShowS # show :: ClientCertVerifierPolicy -> String # showList :: [ClientCertVerifierPolicy] -> ShowS # | |||||
Eq ClientCertVerifierPolicy Source # | |||||
Defined in Rustls.Internal Methods (==) :: ClientCertVerifierPolicy -> ClientCertVerifierPolicy -> Bool # (/=) :: ClientCertVerifierPolicy -> ClientCertVerifierPolicy -> Bool # | |||||
Ord ClientCertVerifierPolicy Source # | |||||
Defined in Rustls.Internal Methods compare :: ClientCertVerifierPolicy -> ClientCertVerifierPolicy -> Ordering # (<) :: ClientCertVerifierPolicy -> ClientCertVerifierPolicy -> Bool # (<=) :: ClientCertVerifierPolicy -> ClientCertVerifierPolicy -> Bool # (>) :: ClientCertVerifierPolicy -> ClientCertVerifierPolicy -> Bool # (>=) :: ClientCertVerifierPolicy -> ClientCertVerifierPolicy -> Bool # max :: ClientCertVerifierPolicy -> ClientCertVerifierPolicy -> ClientCertVerifierPolicy # min :: ClientCertVerifierPolicy -> ClientCertVerifierPolicy -> ClientCertVerifierPolicy # | |||||
type Rep ClientCertVerifierPolicy Source # | |||||
Defined in Rustls.Internal type Rep ClientCertVerifierPolicy = D1 ('MetaData "ClientCertVerifierPolicy" "Rustls.Internal" "rustls-0.2.0.0-inplace" 'False) (C1 ('MetaCons "AllowAnyAuthenticatedClient" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AllowAnyAnonymousOrAuthenticatedClient" 'PrefixI 'False) (U1 :: Type -> Type)) |
newtype CertificateRevocationList Source #
One or more PEM-encoded certificate revocation lists (CRL).
Constructors
CertificateRevocationList | |
Fields |
Instances
Generic CertificateRevocationList Source # | |||||
Defined in Rustls.Internal Associated Types
Methods from :: CertificateRevocationList -> Rep CertificateRevocationList x # to :: Rep CertificateRevocationList x -> CertificateRevocationList # | |||||
Show CertificateRevocationList Source # | |||||
Defined in Rustls.Internal Methods showsPrec :: Int -> CertificateRevocationList -> ShowS # show :: CertificateRevocationList -> String # showList :: [CertificateRevocationList] -> ShowS # | |||||
type Rep CertificateRevocationList Source # | |||||
Defined in Rustls.Internal type Rep CertificateRevocationList = D1 ('MetaData "CertificateRevocationList" "Rustls.Internal" "rustls-0.2.0.0-inplace" 'True) (C1 ('MetaCons "CertificateRevocationList" 'PrefixI 'True) (S1 ('MetaSel ('Just "unCertificateRevocationList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) |
data ServerConfigBuilder Source #
Rustls client config builder.
Constructors
ServerConfigBuilder | |
Fields
|
Instances
Generic ServerConfigBuilder Source # | |||||
Defined in Rustls.Internal Associated Types
Methods from :: ServerConfigBuilder -> Rep ServerConfigBuilder x # to :: Rep ServerConfigBuilder x -> ServerConfigBuilder # | |||||
Show ServerConfigBuilder Source # | |||||
Defined in Rustls.Internal Methods showsPrec :: Int -> ServerConfigBuilder -> ShowS # show :: ServerConfigBuilder -> String # showList :: [ServerConfigBuilder] -> ShowS # | |||||
type Rep ServerConfigBuilder Source # | |||||
Defined in Rustls.Internal type Rep ServerConfigBuilder = D1 ('MetaData "ServerConfigBuilder" "Rustls.Internal" "rustls-0.2.0.0-inplace" 'False) (C1 ('MetaCons "ServerConfigBuilder" 'PrefixI 'True) ((S1 ('MetaSel ('Just "serverConfigCryptoProvider") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CryptoProvider) :*: S1 ('MetaSel ('Just "serverConfigCertifiedKeys") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (NonEmpty CertifiedKey))) :*: (S1 ('MetaSel ('Just "serverConfigALPNProtocols") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [ALPNProtocol]) :*: (S1 ('MetaSel ('Just "serverConfigIgnoreClientOrder") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "serverConfigClientCertVerifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ClientCertVerifier)))))) |
data ServerConfig Source #
Assembled configuration for a Rustls server connection.
Constructors
ServerConfig | |
Fields
|
Rustls log level.
Constructors
LogLevelError | |
LogLevelWarn | |
LogLevelInfo | |
LogLevelDebug | |
LogLevelTrace |
Instances
Bounded LogLevel Source # | |||||
Enum LogLevel Source # | |||||
Generic LogLevel Source # | |||||
Defined in Rustls.Internal Associated Types
| |||||
Show LogLevel Source # | |||||
Eq LogLevel Source # | |||||
Ord LogLevel Source # | |||||
Defined in Rustls.Internal | |||||
type Rep LogLevel Source # | |||||
Defined in Rustls.Internal type Rep LogLevel = D1 ('MetaData "LogLevel" "Rustls.Internal" "rustls-0.2.0.0-inplace" 'False) ((C1 ('MetaCons "LogLevelError" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LogLevelWarn" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "LogLevelInfo" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LogLevelDebug" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LogLevelTrace" 'PrefixI 'False) (U1 :: Type -> Type)))) |
newtype HandshakeQuery (side :: Side) a Source #
Constructors
HandshakeQuery (ReaderT Connection' IO a) |
Instances
Applicative (HandshakeQuery side) Source # | |
Defined in Rustls.Internal Methods pure :: a -> HandshakeQuery side a # (<*>) :: HandshakeQuery side (a -> b) -> HandshakeQuery side a -> HandshakeQuery side b # liftA2 :: (a -> b -> c) -> HandshakeQuery side a -> HandshakeQuery side b -> HandshakeQuery side c # (*>) :: HandshakeQuery side a -> HandshakeQuery side b -> HandshakeQuery side b # (<*) :: HandshakeQuery side a -> HandshakeQuery side b -> HandshakeQuery side a # | |
Functor (HandshakeQuery side) Source # | |
Defined in Rustls.Internal Methods fmap :: (a -> b) -> HandshakeQuery side a -> HandshakeQuery side b # (<$) :: a -> HandshakeQuery side b -> HandshakeQuery side a # | |
Monad (HandshakeQuery side) Source # | |
Defined in Rustls.Internal Methods (>>=) :: HandshakeQuery side a -> (a -> HandshakeQuery side b) -> HandshakeQuery side b # (>>) :: HandshakeQuery side a -> HandshakeQuery side b -> HandshakeQuery side b # return :: a -> HandshakeQuery side a # |
handshakeQuery :: forall a (side :: Side). (Connection' -> IO a) -> HandshakeQuery side a Source #
newtype RustlsException Source #
TLS exception thrown by Rustls.
Use displayException
for a human-friendly representation.
Constructors
RustlsException | |
Fields |
Instances
Exception RustlsException Source # | |
Defined in Rustls.Internal Methods toException :: RustlsException -> SomeException # fromException :: SomeException -> Maybe RustlsException # displayException :: RustlsException -> String # backtraceDesired :: RustlsException -> Bool # | |
Show RustlsException Source # | |
Defined in Rustls.Internal Methods showsPrec :: Int -> RustlsException -> ShowS # show :: RustlsException -> String # showList :: [RustlsException] -> ShowS # |
isCertError :: RustlsException -> Bool Source #
Checks if the given RustlsException
represents a certificate error.
newtype RustlsLogException Source #
Wrapper for exceptions thrown in a LogCallback
.
Constructors
RustlsLogException SomeException |
Instances
Exception RustlsLogException Source # | |
Defined in Rustls.Internal Methods toException :: RustlsLogException -> SomeException # fromException :: SomeException -> Maybe RustlsLogException # | |
Show RustlsLogException Source # | |
Defined in Rustls.Internal Methods showsPrec :: Int -> RustlsLogException -> ShowS # show :: RustlsLogException -> String # showList :: [RustlsLogException] -> ShowS # |
data RustlsUnknownLogLevel Source #
Constructors
RustlsUnknownLogLevel LogLevel |
Instances
Exception RustlsUnknownLogLevel Source # | |
Defined in Rustls.Internal | |
Show RustlsUnknownLogLevel Source # | |
Defined in Rustls.Internal Methods showsPrec :: Int -> RustlsUnknownLogLevel -> ShowS # show :: RustlsUnknownLogLevel -> String # showList :: [RustlsUnknownLogLevel] -> ShowS # |
Underlying data source for Rustls.
mkSocketBackend :: Socket -> Backend Source #
Arguments
:: (Int -> IO ByteString) | Read a This will silently truncate |
-> (ByteString -> IO ()) | Write a |
-> Backend |
An in-memory Backend
.
Type-level indicator whether a Connection
is client- or server-side.
newtype Connection (side :: Side) Source #
A Rustls connection.
Constructors
Connection (MVar Connection') |
data Connection' Source #
withConnection :: forall (side :: Side) a. Connection side -> (Connection' -> IO a) -> IO a Source #
data ReadOrWrite Source #
Messages sent to the background thread.
Constructors
Request ReadOrWrite | Request to start a read or a write FFI call from the background thread.
It should respond with |
Done IOResult | Notify the background thread that we are done interacting with the buffer. |
Messages sent from the background thread.
interactTLS :: Connection' -> ReadOrWrite -> IO CSize Source #
completeIO :: Connection' -> IO IsEOF Source #
Helper function, see complete_io
from rustls.
https://github.com/rustls/rustls/blob/v/0.23.4/rustls/src/conn.rs#L544
completePriorIO :: Connection' -> IO () Source #
getIsHandshaking :: Connection' -> IO Bool Source #
getWantsRead :: Connection' -> IO Bool Source #
getWantsWrite :: Connection' -> IO Bool Source #
loopWhileTrue :: Monad m => m Bool -> m () Source #
cSizeToInt :: CSize -> Int Source #
intToCSize :: Int -> CSize Source #
ignoreExceptions :: IO () -> IO () Source #
ignoreSyncExceptions :: IO () -> IO () Source #