Safe Haskell | Safe-Infered |
---|
- newtype SslConnection = SslConnection {}
- data SslC = SslC
- enumSsl :: MonadIO m => SSL -> Onum ByteString m a
- sslI :: MonadIO m => SSL -> Iter ByteString m ()
- iterSSL :: MonadIO m => SSLContext -> Socket -> Bool -> IO (Iter ByteString m (), Onum ByteString m a)
- simpleContext :: FilePath -> IO SSLContext
- genSelfSigned :: FilePath -> String -> IO ()
Documentation
newtype SslConnection Source
Control request to fetch the SSL
object associated with an
enumerator.
:: MonadIO m | |
=> SSLContext | OpenSSL context |
-> Socket | The socket |
-> Bool | |
-> IO (Iter ByteString m (), Onum ByteString m a) |
Turn a socket into an Iter
and Onum
that use OpenSSL to write
to and read from the socket, respectively. Does an SSL
bi-directional shutdown and closes the socket when both a) the enum
completes and b) the iter has received an EOF chunk.
If the SSL handshake fails, then iterSSL
closes the socket before
throwing an exception.
This funciton must only be invoked from within a call to
withOpenSSL
.
simpleContext :: FilePath -> IO SSLContextSource
Simplest possible SSL context, loads cert and unencrypted private key from a single file.