Safe Haskell | None |
---|---|
Language | Haskell2010 |
Internal module, not subject to PVP.
Synopsis
- data ClientConfig
- data ClientConfigBuilder
- clientConfigBuilderNewCustom :: Ptr (Ptr SupportedCipherSuite) -> CSize -> Ptr TLSVersion -> CSize -> Ptr (Ptr ClientConfigBuilder) -> IO Result
- clientConfigBuilderFree :: Ptr ClientConfigBuilder -> IO ()
- clientConfigBuilderBuild :: Ptr ClientConfigBuilder -> IO (Ptr ClientConfig)
- clientConfigFree :: FinalizerPtr ClientConfig
- clientConfigBuilderSetALPNProtocols :: Ptr ClientConfigBuilder -> Ptr SliceBytes -> CSize -> IO Result
- clientConfigBuilderSetEnableSNI :: Ptr ClientConfigBuilder -> CBool -> IO ()
- clientConfigBuilderSetCertifiedKey :: Ptr ClientConfigBuilder -> Ptr (Ptr CertifiedKey) -> CSize -> IO Result
- clientConfigBuilderLoadRootsFromFile :: Ptr ClientConfigBuilder -> CString -> IO Result
- clientConfigBuilderUseRoots :: Ptr ClientConfigBuilder -> Ptr RootCertStore -> IO Result
- clientConnectionNew :: Ptr ClientConfig -> CString -> Ptr (Ptr Connection) -> IO Result
- serverConnectionNew :: Ptr ServerConfig -> Ptr (Ptr Connection) -> IO Result
- data ServerConfig
- data ServerConfigBuilder
- serverConfigBuilderNewCustom :: Ptr (Ptr SupportedCipherSuite) -> CSize -> Ptr TLSVersion -> CSize -> Ptr (Ptr ServerConfigBuilder) -> IO Result
- serverConfigBuilderFree :: Ptr ServerConfigBuilder -> IO ()
- serverConfigBuilderBuild :: Ptr ServerConfigBuilder -> IO (Ptr ServerConfig)
- serverConfigFree :: FinalizerPtr ServerConfig
- serverConfigBuilderSetALPNProtocols :: Ptr ServerConfigBuilder -> Ptr SliceBytes -> CSize -> IO Result
- serverConfigBuilderSetIgnoreClientOrder :: Ptr ServerConfigBuilder -> CBool -> IO Result
- serverConfigBuilderSetCertifiedKeys :: Ptr ServerConfigBuilder -> Ptr (Ptr CertifiedKey) -> CSize -> IO Result
- data ClientCertVerifier
- clientCertVerifierNew :: Ptr RootCertStore -> IO (Ptr ClientCertVerifier)
- clientCertVerifierFree :: Ptr ClientCertVerifier -> IO ()
- serverConfigBuilderSetClientVerifier :: Ptr ServerConfigBuilder -> Ptr ClientCertVerifier -> IO ()
- data ClientCertVerifierOptional
- clientCertVerifierOptionalNew :: Ptr RootCertStore -> IO (Ptr ClientCertVerifierOptional)
- clientCertVerifierOptionalFree :: Ptr ClientCertVerifierOptional -> IO ()
- serverConfigBuilderSetClientVerifierOptional :: Ptr ServerConfigBuilder -> Ptr ClientCertVerifierOptional -> IO ()
- data CertifiedKey
- certifiedKeyBuild :: Ptr Word8 -> CSize -> Ptr Word8 -> CSize -> Ptr (Ptr CertifiedKey) -> IO Result
- certifiedKeyFree :: Ptr CertifiedKey -> IO ()
- data Certificate
- certificateGetDER :: Ptr Certificate -> Ptr (Ptr Word8) -> Ptr CSize -> IO Result
- data Connection
- connectionFree :: Ptr Connection -> IO ()
- type ReadWriteCallback = Ptr Userdata -> Ptr Word8 -> CSize -> Ptr CSize -> IO IOResult
- mkReadWriteCallback :: ReadWriteCallback -> IO (FunPtr ReadWriteCallback)
- connectionWantsRead :: Ptr Connection -> IO CBool
- connectionRead :: Ptr Connection -> Ptr Word8 -> CSize -> Ptr CSize -> IO Result
- connectionReadTls :: Ptr Connection -> FunPtr ReadWriteCallback -> Ptr Userdata -> Ptr CSize -> IO IOResult
- connectionWantsWrite :: Ptr Connection -> IO CBool
- connectionWrite :: Ptr Connection -> Ptr Word8 -> CSize -> Ptr CSize -> IO Result
- connectionWriteTls :: Ptr Connection -> FunPtr ReadWriteCallback -> Ptr Userdata -> Ptr CSize -> IO IOResult
- connectionProcessNewPackets :: Ptr Connection -> IO Result
- connectionIsHandshaking :: Ptr Connection -> IO CBool
- connectionSendCloseNotify :: Ptr Connection -> IO ()
- connectionSetBufferLimit :: Ptr Connection -> CSize -> IO ()
- connectionGetALPNProtocol :: Ptr Connection -> Ptr (Ptr Word8) -> Ptr CSize -> IO ()
- connectionGetProtocolVersion :: Ptr Connection -> IO TLSVersion
- connectionGetNegotiatedCipherSuite :: Ptr Connection -> IO (Ptr SupportedCipherSuite)
- serverConnectionGetSNIHostname :: Ptr Connection -> Ptr Word8 -> CSize -> Ptr CSize -> IO Result
- connectionGetPeerCertificate :: Ptr Connection -> CSize -> IO (Ptr Certificate)
- connectionSetLogCallback :: Ptr Connection -> FunPtr LogCallback -> IO ()
- type LogCallback = Ptr Userdata -> Ptr LogParams -> IO ()
- mkLogCallback :: LogCallback -> IO (FunPtr LogCallback)
- data LogParams = LogParams {}
- newtype LogLevel = LogLevel CSize
- data Str = Str CString CSize
- data SliceBytes = SliceBytes (Ptr Word8) CSize
- hsVersion :: Ptr Str -> IO ()
- data Userdata
- newtype Result = Result Word32
- resultIsCertError :: Result -> CBool
- errorMsg :: Result -> CString -> CSize -> Ptr CSize -> IO ()
- resultOk :: Result
- resultInsufficientSize :: Result
- newtype IOResult = IOResult CInt
- ioResultOk :: IOResult
- ioResultErr :: IOResult
- data SupportedCipherSuite
- allCipherSuites :: Ptr (Ptr SupportedCipherSuite)
- allCipherSuitesLen :: CSize
- defaultCipherSuites :: Ptr (Ptr SupportedCipherSuite)
- defaultCipherSuitesLen :: CSize
- supportedCipherSuiteGetSuite :: Ptr SupportedCipherSuite -> Word16
- hsSupportedCipherSuiteGetName :: Ptr SupportedCipherSuite -> Ptr Str -> IO ()
- newtype TLSVersion = TLSVersion {}
- pattern TLS12 :: TLSVersion
- pattern TLS13 :: TLSVersion
- allVersions :: Ptr TLSVersion
- allVersionsLen :: CSize
- defaultVersions :: Ptr TLSVersion
- defaultVersionsLen :: CSize
- data RootCertStore
- rootCertStoreNew :: IO (Ptr RootCertStore)
- rootCertStoreAddPEM :: Ptr RootCertStore -> Ptr Word8 -> CSize -> CBool -> IO Result
- rootCertStoreFree :: Ptr RootCertStore -> IO ()
Client
Config
data ClientConfig Source #
data ClientConfigBuilder Source #
clientConfigBuilderNewCustom :: Ptr (Ptr SupportedCipherSuite) -> CSize -> Ptr TLSVersion -> CSize -> Ptr (Ptr ClientConfigBuilder) -> IO Result Source #
clientConfigBuilderFree :: Ptr ClientConfigBuilder -> IO () Source #
clientConfigBuilderSetALPNProtocols :: Ptr ClientConfigBuilder -> Ptr SliceBytes -> CSize -> IO Result Source #
clientConfigBuilderSetEnableSNI :: Ptr ClientConfigBuilder -> CBool -> IO () Source #
clientConfigBuilderSetCertifiedKey :: Ptr ClientConfigBuilder -> Ptr (Ptr CertifiedKey) -> CSize -> IO Result Source #
Connection
:: Ptr ClientConfig | |
-> CString | Hostname. |
-> Ptr (Ptr Connection) | |
-> IO Result |
serverConnectionNew :: Ptr ServerConfig -> Ptr (Ptr Connection) -> IO Result Source #
Server
Config
data ServerConfig Source #
data ServerConfigBuilder Source #
serverConfigBuilderNewCustom :: Ptr (Ptr SupportedCipherSuite) -> CSize -> Ptr TLSVersion -> CSize -> Ptr (Ptr ServerConfigBuilder) -> IO Result Source #
serverConfigBuilderFree :: Ptr ServerConfigBuilder -> IO () Source #
serverConfigBuilderSetALPNProtocols :: Ptr ServerConfigBuilder -> Ptr SliceBytes -> CSize -> IO Result Source #
serverConfigBuilderSetCertifiedKeys :: Ptr ServerConfigBuilder -> Ptr (Ptr CertifiedKey) -> CSize -> IO Result Source #
data ClientCertVerifier Source #
clientCertVerifierFree :: Ptr ClientCertVerifier -> IO () Source #
serverConfigBuilderSetClientVerifier :: Ptr ServerConfigBuilder -> Ptr ClientCertVerifier -> IO () Source #
serverConfigBuilderSetClientVerifierOptional :: Ptr ServerConfigBuilder -> Ptr ClientCertVerifierOptional -> IO () Source #
Certificate stuff
data CertifiedKey Source #
certifiedKeyBuild :: Ptr Word8 -> CSize -> Ptr Word8 -> CSize -> Ptr (Ptr CertifiedKey) -> IO Result Source #
certifiedKeyFree :: Ptr CertifiedKey -> IO () Source #
data Certificate Source #
Connection
data Connection Source #
connectionFree :: Ptr Connection -> IO () Source #
Read/write
Read
connectionWantsRead :: Ptr Connection -> IO CBool Source #
connectionReadTls :: Ptr Connection -> FunPtr ReadWriteCallback -> Ptr Userdata -> Ptr CSize -> IO IOResult Source #
Write
connectionWantsWrite :: Ptr Connection -> IO CBool Source #
connectionWriteTls :: Ptr Connection -> FunPtr ReadWriteCallback -> Ptr Userdata -> Ptr CSize -> IO IOResult Source #
Misc
connectionSendCloseNotify :: Ptr Connection -> IO () Source #
connectionSetBufferLimit :: Ptr Connection -> CSize -> IO () Source #
serverConnectionGetSNIHostname :: Ptr Connection -> Ptr Word8 -> CSize -> Ptr CSize -> IO Result Source #
connectionGetPeerCertificate :: Ptr Connection -> CSize -> IO (Ptr Certificate) Source #
Logging
connectionSetLogCallback :: Ptr Connection -> FunPtr LogCallback -> IO () Source #
mkLogCallback :: LogCallback -> IO (FunPtr LogCallback) Source #
Instances
Generic LogParams Source # | |
GStorable LogParams Source # | |
type Rep LogParams Source # | |
Defined in Rustls.Internal.FFI type Rep LogParams = D1 ('MetaData "LogParams" "Rustls.Internal.FFI" "rustls-0.0.0.0-inplace" 'False) (C1 ('MetaCons "LogParams" 'PrefixI 'True) (S1 ('MetaSel ('Just "rustlsLogParamsLevel") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 LogLevel) :*: S1 ('MetaSel ('Just "rustlsLogParamsMessage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Str))) |
Instances
Eq LogLevel Source # | |
Storable LogLevel Source # | |
Defined in Rustls.Internal.FFI |
Misc
Instances
Generic Str Source # | |
GStorable Str Source # | |
type Rep Str Source # | |
Defined in Rustls.Internal.FFI type Rep Str = D1 ('MetaData "Str" "Rustls.Internal.FFI" "rustls-0.0.0.0-inplace" 'False) (C1 ('MetaCons "Str" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CString) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CSize))) |
data SliceBytes Source #
Instances
Generic SliceBytes Source # | |
Defined in Rustls.Internal.FFI type Rep SliceBytes :: Type -> Type # from :: SliceBytes -> Rep SliceBytes x # to :: Rep SliceBytes x -> SliceBytes # | |
GStorable SliceBytes Source # | |
Defined in Rustls.Internal.FFI gsizeOf :: SliceBytes -> Int # galignment :: SliceBytes -> Int # gpeekByteOff :: Ptr b -> Int -> IO SliceBytes # gpokeByteOff :: Ptr b -> Int -> SliceBytes -> IO () # | |
type Rep SliceBytes Source # | |
Defined in Rustls.Internal.FFI type Rep SliceBytes = D1 ('MetaData "SliceBytes" "Rustls.Internal.FFI" "rustls-0.0.0.0-inplace" 'False) (C1 ('MetaCons "SliceBytes" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Ptr Word8)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CSize))) |
Result
resultIsCertError :: Result -> CBool Source #
Some values
IOResult
TLS params
data SupportedCipherSuite Source #
hsSupportedCipherSuiteGetName :: Ptr SupportedCipherSuite -> Ptr Str -> IO () Source #
newtype TLSVersion Source #
A TLS protocol version supported by Rustls.
Instances
pattern TLS12 :: TLSVersion Source #
pattern TLS13 :: TLSVersion Source #
Root cert store
data RootCertStore Source #
rootCertStoreFree :: Ptr RootCertStore -> IO () Source #