Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module provides convenience functions for interfacing tls
.
This module is intended to be imported qualified
, e.g.:
import Data.Connection import qualified System.IO.Streams.TLS as TLS
Synopsis
- type TLSConnection = Connection (Context, SockAddr)
- connect :: ClientParams -> Maybe String -> HostName -> PortNumber -> IO TLSConnection
- connectTLS :: ClientParams -> Maybe String -> HostName -> PortNumber -> IO (Context, SockAddr)
- tLsToConnection :: (Context, SockAddr) -> IO TLSConnection
- accept :: ServerParams -> Socket -> IO TLSConnection
- module Data.TLSSetting
Documentation
type TLSConnection = Connection (Context, SockAddr) Source #
Type alias for tls connection.
Normally you shouldn't use Context
in connExtraInfo
directly.
client
:: ClientParams | check Data.TLSSetting |
-> Maybe String | Optional certificate subject name, if set to |
-> HostName | hostname to connect to |
-> PortNumber | port number to connect to |
-> IO TLSConnection |
Connect to server using TLS and return a Connection
.
:: ClientParams | check Data.TLSSetting |
-> Maybe String | Optional certificate subject name, if set to |
-> HostName | hostname to connect to |
-> PortNumber | port number to connect to |
-> IO (Context, SockAddr) |
Convenience function for initiating an TLS connection to the given
(
combination.HostName
, PortNumber
)
This operation may throw TLSException
on failure.
:: (Context, SockAddr) | TLS connection / socket address pair |
-> IO TLSConnection |
Make a Connection
from a Context
.
server
:: ServerParams | check Data.TLSSetting |
-> Socket | the listening |
-> IO TLSConnection |
Accept a new TLS connection from remote client with listening socket.
This operation may throw TLSException
on failure.
re-export
module Data.TLSSetting