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
|
2012-03-28 07:49:31 +00:00
|
|
|
(
|
|
|
|
-- * Context configuration
|
|
|
|
Params(..)
|
2012-07-12 07:54:34 +00:00
|
|
|
, RoleParams(..)
|
|
|
|
, ClientParams(..)
|
|
|
|
, ServerParams(..)
|
|
|
|
, updateClientParams
|
|
|
|
, updateServerParams
|
2012-03-28 07:49:31 +00:00
|
|
|
, Logging(..)
|
2012-10-21 17:32:07 +00:00
|
|
|
, Measurement(..)
|
2012-03-28 07:49:31 +00:00
|
|
|
, CertificateUsage(..)
|
|
|
|
, CertificateRejectReason(..)
|
|
|
|
, defaultParamsClient
|
|
|
|
, defaultParamsServer
|
|
|
|
, defaultLogging
|
2012-10-21 17:32:07 +00:00
|
|
|
, MaxFragmentEnum(..)
|
|
|
|
, HashAndSignatureAlgorithm
|
|
|
|
, HashAlgorithm(..)
|
|
|
|
, SignatureAlgorithm(..)
|
|
|
|
, CertificateType(..)
|
|
|
|
|
|
|
|
-- * raw types
|
|
|
|
, ProtocolType(..)
|
|
|
|
, Header(..)
|
2011-03-19 21:45:43 +00:00
|
|
|
|
2012-07-12 07:56:16 +00:00
|
|
|
-- * Session
|
|
|
|
, SessionID
|
|
|
|
, SessionData(..)
|
2012-07-12 07:59:59 +00:00
|
|
|
, SessionManager(..)
|
|
|
|
, NoSessionManager(..)
|
|
|
|
, setSessionManager
|
|
|
|
|
2012-03-28 07:49:31 +00:00
|
|
|
-- * Backend abstraction
|
|
|
|
, Backend(..)
|
2012-03-12 08:48:03 +00:00
|
|
|
|
2012-03-28 07:49:31 +00:00
|
|
|
-- * Context object
|
|
|
|
, Context
|
|
|
|
, ctxConnection
|
2011-03-19 21:45:43 +00:00
|
|
|
|
2012-03-28 07:49:31 +00:00
|
|
|
-- * Creating a context
|
|
|
|
, contextNew
|
|
|
|
, contextNewOnHandle
|
2012-03-31 22:15:23 +00:00
|
|
|
, contextFlush
|
|
|
|
, contextClose
|
2011-03-19 21:45:43 +00:00
|
|
|
|
2012-03-28 07:49:31 +00:00
|
|
|
-- * deprecated type aliases
|
|
|
|
, TLSParams
|
|
|
|
, TLSLogging
|
|
|
|
, TLSCertificateUsage
|
|
|
|
, TLSCertificateRejectReason
|
|
|
|
, TLSCtx
|
2012-03-14 08:56:28 +00:00
|
|
|
|
2012-03-28 07:49:31 +00:00
|
|
|
-- * deprecated values
|
|
|
|
, defaultParams
|
2012-03-15 08:04:16 +00:00
|
|
|
|
2012-03-28 07:49:31 +00:00
|
|
|
-- * Initialisation and Termination of context
|
|
|
|
, bye
|
|
|
|
, handshake
|
2011-03-19 21:45:43 +00:00
|
|
|
|
2012-03-28 07:49:31 +00:00
|
|
|
-- * Next Protocol Negotiation
|
|
|
|
, getNegotiatedProtocol
|
2012-02-12 18:59:19 +00:00
|
|
|
|
2012-03-28 07:49:31 +00:00
|
|
|
-- * High level API
|
|
|
|
, sendData
|
|
|
|
, recvData
|
|
|
|
, recvData'
|
2011-03-19 21:45:43 +00:00
|
|
|
|
2012-03-28 07:49:31 +00:00
|
|
|
-- * Crypto Key
|
|
|
|
, PrivateKey(..)
|
2012-10-20 07:56:39 +00:00
|
|
|
|
2012-03-28 07:49:31 +00:00
|
|
|
-- * Compressions & Predefined compressions
|
2012-10-21 19:35:32 +00:00
|
|
|
, module Network.TLS.Compression
|
2012-10-20 07:56:39 +00:00
|
|
|
|
2012-03-28 07:49:31 +00:00
|
|
|
-- * Ciphers & Predefined ciphers
|
2012-10-21 19:35:32 +00:00
|
|
|
, module Network.TLS.Cipher
|
2012-10-20 07:56:39 +00:00
|
|
|
|
2012-03-28 07:49:31 +00:00
|
|
|
-- * Versions
|
|
|
|
, Version(..)
|
2012-10-20 07:56:39 +00:00
|
|
|
|
2012-03-28 07:49:31 +00:00
|
|
|
-- * Errors
|
|
|
|
, TLSError(..)
|
2012-10-21 17:32:07 +00:00
|
|
|
, KxError(..)
|
|
|
|
, AlertDescription(..)
|
2012-10-20 07:56:39 +00:00
|
|
|
|
2012-03-28 07:49:31 +00:00
|
|
|
-- * Exceptions
|
2012-12-31 15:48:04 +00:00
|
|
|
, Terminated(..)
|
2012-03-28 07:49:31 +00:00
|
|
|
, HandshakeFailed(..)
|
|
|
|
, ConnectionNotEstablished(..)
|
|
|
|
) where
|
2011-03-02 08:43:14 +00:00
|
|
|
|
2012-10-21 17:32:07 +00:00
|
|
|
import Network.TLS.Struct (Version(..), TLSError(..), HashAndSignatureAlgorithm, HashAlgorithm(..), SignatureAlgorithm(..), Header(..), ProtocolType(..), CertificateType(..), AlertDescription(..))
|
|
|
|
import Network.TLS.Crypto (PrivateKey(..), KxError(..))
|
2012-10-21 19:35:32 +00:00
|
|
|
import Network.TLS.Cipher
|
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
|
2012-07-12 07:59:59 +00:00
|
|
|
import Network.TLS.Session
|