tls-0.3.1: TLS/SSL protocol native implementation (Server and Client)ContentsIndex
Network.TLS.Client
Portabilityunknown
Stabilityexperimental
MaintainerVincent Hanquez <vincent@snarc.org>
Contents
low level packet sending receiving.
API, warning probably subject to change
Description
the Client module contains the necessary calls to create a connecting TLS socket aka. a client socket.
Synopsis
data TLSClientParams = TLSClientParams {
cpConnectVersion :: Version
cpAllowedVersions :: [Version]
cpSession :: Maybe [Word8]
cpCiphers :: [Cipher]
cpCertificate :: Maybe Certificate
cpCallbacks :: TLSClientCallbacks
}
data TLSClientCallbacks = TLSClientCallbacks {
cbCertificates :: Maybe ([Certificate] -> IO Bool)
}
data TLSStateClient
newtype TLSClient m a = TLSClient {
runTLSC :: StateT TLSStateClient m a
}
runTLSClient :: TLSClient m a -> TLSClientParams -> SRandomGen -> m (a, TLSStateClient)
recvPacket :: Handle -> TLSClient IO (Either TLSError [Packet])
sendPacket :: Handle -> Packet -> TLSClient IO ()
connect :: Handle -> TLSClient IO ()
sendData :: Handle -> ByteString -> TLSClient IO ()
recvData :: Handle -> TLSClient IO ByteString
close :: Handle -> TLSClient IO ()
Documentation
data TLSClientParams
Constructors
TLSClientParams
cpConnectVersion :: Versionclient version we're sending by default
cpAllowedVersions :: [Version]allowed versions from the server
cpSession :: Maybe [Word8]session for this connection
cpCiphers :: [Cipher]all ciphers for this connection
cpCertificate :: Maybe Certificatean optional client certificate
cpCallbacks :: TLSClientCallbacksuser callbacks
show/hide Instances
data TLSClientCallbacks
Constructors
TLSClientCallbacks
cbCertificates :: Maybe ([Certificate] -> IO Bool)optional callback to verify certificates
show/hide Instances
data TLSStateClient
show/hide Instances
newtype TLSClient m a
Constructors
TLSClient
runTLSC :: StateT TLSStateClient m a
show/hide Instances
runTLSClient :: TLSClient m a -> TLSClientParams -> SRandomGen -> m (a, TLSStateClient)
low level packet sending receiving.
recvPacket :: Handle -> TLSClient IO (Either TLSError [Packet])
receive a single TLS packet or on error a TLSError
sendPacket :: Handle -> Packet -> TLSClient IO ()
send a single TLS packet
API, warning probably subject to change
connect :: Handle -> TLSClient IO ()
connect through a handle as a new TLS connection.
sendData :: Handle -> ByteString -> TLSClient IO ()
sendData sends a bunch of data
recvData :: Handle -> TLSClient IO ByteString
recvData get data out of Data packet, and automatically try to renegociate if - a Handshake HelloRequest is received
close :: Handle -> TLSClient IO ()
close a TLS connection. - note that it doesn't close the handle, but just signal we're going to close - the connection to the other side
Produced by Haddock version 2.7.2