@@ -66,6 +66,18 @@ data TLSSettings = TLSSettings
6666 -- Default: 'TLS.defaultLogging'.
6767 --
6868 -- Since 1.4.0
69+ , tlsAllowedVersions :: [TLS.Version]
70+ -- ^ The TLS versions this server accepts.
71+ --
72+ -- Default: '[TLS.SSL3,TLS.TLS10,TLS.TLS11,TLS.TLS12]'.
73+ --
74+ -- Since 1.4.2
75+ , tlsCiphers :: [TLS.Cipher]
76+ -- ^ The TLS ciphers this server accepts.
77+ --
78+ -- Default: '[TLSExtra.cipher_AES128_SHA1, TLSExtra.cipher_AES256_SHA1, TLSExtra.cipher_RC4_128_MD5, TLSExtra.cipher_RC4_128_SHA1]'
79+ --
80+ -- Since 1.4.2
6981 }
7082
7183-- | An action when a plain HTTP comes to HTTP over TLS/SSL port.
@@ -88,6 +100,8 @@ defaultTlsSettings = TLSSettings
88100 , keyFile = "key.pem"
89101 , onInsecure = DenyInsecure "This server only accepts secure HTTPS connections."
90102 , tlsLogging = TLS.defaultLogging
103+ , tlsAllowedVersions = [TLS.SSL3,TLS.TLS10,TLS.TLS11,TLS.TLS12]
104+ , tlsCiphers = ciphers
91105 }
92106
93107-- | Running 'Application' with 'TLSSettings' and 'Settings' using
@@ -100,8 +114,8 @@ runTLSSocket TLSSettings {..} set sock app = do
100114 TLS.updateServerParams
101115 (\sp -> sp { TLS.serverWantClientCert = False }) $
102116 TLS.defaultParamsServer
103− { TLS.pAllowedVersions = [TLS.SSL3,TLS.TLS10,TLS.TLS11,TLS.TLS12]
104− , TLS.pCiphers = ciphers
117+ { TLS.pAllowedVersions = tlsAllowedVersions
118+ , TLS.pCiphers = tlsCiphers
105119 , TLS.pCertificates = zip certs $ (Just pk):repeat Nothing
106120 , TLS.pLogging = tlsLogging
107121 }