2011-03-02 08:43:14 +00:00
|
|
|
-- |
|
|
|
|
-- Module : Network.TLS
|
|
|
|
-- License : BSD-style
|
|
|
|
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
|
|
|
|
-- Stability : experimental
|
|
|
|
-- Portability : unknown
|
|
|
|
--
|
|
|
|
module Network.TLS
|
|
|
|
(
|
2011-03-19 21:45:43 +00:00
|
|
|
-- * Context configuration
|
|
|
|
TLSParams(..)
|
2011-05-04 07:41:16 +00:00
|
|
|
, TLSLogging(..)
|
2011-05-13 06:02:44 +00:00
|
|
|
, TLSCertificateUsage(..)
|
|
|
|
, TLSCertificateRejectReason(..)
|
2011-03-19 21:45:43 +00:00
|
|
|
, defaultParams
|
2011-05-04 07:41:16 +00:00
|
|
|
, defaultLogging
|
2011-03-19 21:45:43 +00:00
|
|
|
|
|
|
|
-- * Context object
|
|
|
|
, TLSCtx
|
2011-09-29 07:29:28 +00:00
|
|
|
, ctxConnection
|
2011-03-19 21:45:43 +00:00
|
|
|
|
|
|
|
-- * Creating a context
|
|
|
|
, client
|
|
|
|
, server
|
|
|
|
|
|
|
|
-- * Initialisation and Termination of context
|
|
|
|
, bye
|
|
|
|
, handshake
|
|
|
|
|
|
|
|
-- * High level API
|
|
|
|
, sendData
|
|
|
|
, recvData
|
2012-02-07 20:41:28 +00:00
|
|
|
, recvData'
|
2011-03-19 21:45:43 +00:00
|
|
|
|
2011-03-02 08:43:14 +00:00
|
|
|
-- * Crypto Key
|
|
|
|
, PrivateKey(..)
|
|
|
|
-- * Compressions & Predefined compressions
|
2011-08-12 17:31:58 +00:00
|
|
|
, CompressionC(..)
|
|
|
|
, Compression(..)
|
2011-03-02 08:43:14 +00:00
|
|
|
, nullCompression
|
|
|
|
-- * Ciphers & Predefined ciphers
|
2011-08-12 17:32:18 +00:00
|
|
|
, Cipher(..)
|
2011-08-13 11:06:54 +00:00
|
|
|
, Bulk(..)
|
2011-03-02 08:43:14 +00:00
|
|
|
-- * Versions
|
|
|
|
, Version(..)
|
|
|
|
-- * Errors
|
|
|
|
, TLSError(..)
|
2012-01-18 06:41:32 +00:00
|
|
|
-- * Exceptions
|
|
|
|
, HandshakeFailed(..)
|
2012-01-25 16:01:55 +00:00
|
|
|
, ConnectionNotEstablished(..)
|
2011-03-02 08:43:14 +00:00
|
|
|
) where
|
|
|
|
|
|
|
|
import Network.TLS.Struct (Version(..), TLSError(..))
|
|
|
|
import Network.TLS.Crypto (PrivateKey(..))
|
2011-08-13 11:30:36 +00:00
|
|
|
import Network.TLS.Cipher (Cipher(..), Bulk(..))
|
2011-08-12 17:31:58 +00:00
|
|
|
import Network.TLS.Compression (CompressionC(..), Compression(..), nullCompression)
|
2011-12-06 00:15:00 +00:00
|
|
|
import Network.TLS.Context
|
2011-03-02 08:43:14 +00:00
|
|
|
import Network.TLS.Core
|