You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.3 KiB
31 lines
1.3 KiB
|
15 years ago
|
-- Copyright © 2010-2011 Jon Kristensen. See the LICENSE file in the Pontarius
|
||
|
|
-- XMPP distribution for more details.
|
||
|
15 years ago
|
|
||
|
15 years ago
|
-- TODO: TLS12 when supported in tls; TODO: TLS11 results in a read error - bug?
|
||
|
|
-- TODO: cipher_AES128_SHA1 = TLS_RSA_WITH_AES_128_CBC_SHA?
|
||
|
|
-- TODO: Compression?
|
||
|
|
-- TODO: Validate certificate
|
||
|
|
|
||
|
15 years ago
|
{-# OPTIONS_HADDOCK hide #-}
|
||
|
15 years ago
|
|
||
|
15 years ago
|
module Network.XMPP.TLS (tlsParams) where
|
||
|
15 years ago
|
|
||
|
15 years ago
|
import Network.TLS (TLSCertificateUsage (CertificateUsageAccept),
|
||
|
|
TLSParams (..), Version (SSL3, TLS10, TLS11),
|
||
|
|
defaultLogging, nullCompression)
|
||
|
|
import Network.TLS.Extra (cipher_AES128_SHA1)
|
||
|
|
|
||
|
15 years ago
|
|
||
|
15 years ago
|
tlsParams :: TLSParams
|
||
|
15 years ago
|
|
||
|
15 years ago
|
tlsParams = TLSParams { pConnectVersion = TLS10
|
||
|
|
, pAllowedVersions = [SSL3, TLS10,TLS11]
|
||
|
|
, pCiphers = [cipher_AES128_SHA1]
|
||
|
|
, pCompressions = [nullCompression]
|
||
|
15 years ago
|
, pWantClientCert = False -- Used for servers
|
||
|
15 years ago
|
, pUseSecureRenegotiation = False -- No renegotiation
|
||
|
15 years ago
|
, pCertificates = [] -- TODO
|
||
|
|
, pLogging = defaultLogging -- TODO
|
||
|
15 years ago
|
, onCertificatesRecv = \ certificate ->
|
||
|
|
return CertificateUsageAccept }
|