Safe Haskell | None |
---|---|
Language | Haskell2010 |
SSL-enabled http transport with support for https requests and client certificates.
- confTransport :: Text -> Config -> (SSLContext -> IO ()) -> IO Transport
- makeSettings :: Maybe (FilePath, FilePath) -> (SSLContext -> IO ()) -> IO ManagerSettings
- withOpenSSL :: IO a -> IO a
- data SSLContext :: *
Documentation
:: Text | Section name containing transport settings. |
-> Config | |
-> (SSLContext -> IO ()) | |
-> IO Transport |
Initialize a SOAP HTTP transport with HTTPS support using tls.
:: Maybe (FilePath, FilePath) | Client certificate and key. |
-> (SSLContext -> IO ()) | Additional OpenSSL setup if needed. |
-> IO ManagerSettings |
OpenSSL parts
withOpenSSL :: IO a -> IO a
Computation of
initializes the OpenSSL
library as necessary, and computes withOpenSSL
actionaction
. Every application that
uses HsOpenSSL must wrap any operations involving OpenSSL with
withOpenSSL
, or they might crash:
module Main where import OpenSSL main :: IO () main = withOpenSSL $ do ...
Since 0.10.3.5, withOpenSSL
is safe to be applied
redundantly. Library authors may wish to wrap their functions not
to force their users to think about initialization:
get :: URI -> IO Response get uri = withOpenSSL $ internalImplementationOfGet uri
data SSLContext :: *
An SSL context. Contexts carry configuration such as a server's private key, root CA certiifcates etc. Contexts are stateful IO objects; they start empty and various options are set on them by the functions in this module. Note that an empty context will pretty much cause any operation to fail since it doesn't even have any ciphers enabled.