module Network.TLS (
Context,
contextNew,
handshake,
sendData,
recvData,
bye,
HasBackend (..),
Backend (..),
TLSParams,
ClientParams (..),
defaultParamsClient,
ServerParams (..),
Shared (..),
ClientHooks (..),
OnCertificateRequest,
OnServerCertificate,
ServerHooks (..),
Measurement (..),
Supported (..),
DebugParams (..),
Credentials (..),
Credential,
credentialLoadX509,
credentialLoadX509FromMemory,
credentialLoadX509Chain,
credentialLoadX509ChainFromMemory,
SessionManager (..),
noSessionManager,
SessionID,
SessionIDorTicket,
Ticket,
SessionData (..),
SessionFlag (..),
TLS13TicketInfo,
ValidationCache (..),
ValidationCacheQueryCallback,
ValidationCacheAddCallback,
ValidationCacheResult (..),
exceptionValidationCache,
Version (..),
Compression (..),
nullCompression,
HashAndSignatureAlgorithm,
supportedSignatureSchemes,
HashAlgorithm (..),
SignatureAlgorithm (..),
Group (..),
supportedNamedGroups,
EMSMode (..),
DHParams,
DHPublic,
GroupUsage (..),
CertificateUsage (..),
CertificateRejectReason (..),
CertificateType (..),
HostName,
MaxFragmentEnum (..),
ctxBackend,
contextFlush,
contextClose,
Information (..),
contextGetInformation,
ClientRandom,
ServerRandom,
unClientRandom,
unServerRandom,
HandshakeMode13 (..),
getClientCertificateChain,
getNegotiatedProtocol,
getClientSNI,
updateKey,
KeyUpdateRequest (..),
requestCertificate,
getTLSUnique,
getTLSExporter,
getTLSServerEndPoint,
getFinished,
getPeerFinished,
Hooks (..),
contextModifyHooks,
Handshake,
contextHookSetHandshakeRecv,
Handshake13,
contextHookSetHandshake13Recv,
contextHookSetCertificateRecv,
Logging (..),
Header (..),
ProtocolType (..),
contextHookSetLogging,
TLSError (..),
KxError (..),
AlertDescription (..),
TLSException (..),
CompressionC (..),
CompressionID,
PubKey (..),
PrivKey (..),
module Network.TLS.Cipher,
recvData',
Bytes,
ValidationChecks (..),
ValidationHooks (..),
) where
import Network.TLS.Backend (Backend (..), HasBackend (..))
import Network.TLS.Cipher
import Network.TLS.Compression (
Compression (..),
CompressionC (..),
nullCompression,
)
import Network.TLS.Context
import Network.TLS.Core
import Network.TLS.Credentials
import Network.TLS.Crypto (
DHParams,
DHPublic,
Group (..),
KxError (..),
supportedNamedGroups,
)
import Network.TLS.Handshake.State (HandshakeMode13 (..))
import Network.TLS.Hooks
import Network.TLS.Measurement
import Network.TLS.Parameters
import Network.TLS.Session
import qualified Network.TLS.State as S
import Network.TLS.Struct (
AlertDescription (..),
CertificateType (..),
ClientRandom (..),
Handshake,
HashAlgorithm (..),
HashAndSignatureAlgorithm,
Header (..),
ProtocolType (..),
ServerRandom (..),
SignatureAlgorithm (..),
TLSError (..),
TLSException (..),
supportedSignatureSchemes,
)
import Network.TLS.Struct13 (Handshake13)
import Network.TLS.Types
import Network.TLS.X509
import Data.ByteString as B
import Data.X509 (PrivKey (..), PubKey (..))
import Data.X509.Validation hiding (HostName)
{-# DEPRECATED Bytes "Use Data.ByteString.Bytestring instead of Bytes." #-}
type Bytes = B.ByteString
getClientCertificateChain :: Context -> IO (Maybe CertificateChain)
getClientCertificateChain :: Context -> IO (Maybe CertificateChain)
getClientCertificateChain Context
ctx = Context
-> TLSSt (Maybe CertificateChain) -> IO (Maybe CertificateChain)
forall a. Context -> TLSSt a -> IO a
usingState_ Context
ctx TLSSt (Maybe CertificateChain)
S.getClientCertificateChain