soap-openssl-0.1.0.2: TLS-enabled SOAP transport (using openssl bindings)

Safe HaskellNone
LanguageHaskell2010

Network.SOAP.Transport.HTTP.OpenSSL

Contents

Description

SSL-enabled http transport with support for https requests and client certificates.

Synopsis

Documentation

confTransport Source

Arguments

:: Text

Section name containing transport settings.

-> Config 
-> (SSLContext -> IO ()) 
-> IO Transport 

Initialize a SOAP HTTP transport with HTTPS support using tls.

makeSettings Source

Arguments

:: 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 withOpenSSL action initializes the OpenSSL library as necessary, and computes action. 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.

Instances