@@ -67,6 +67,14 @@ data TLSSettings = TLSSettings
6767 -- Default: 'TLS.defaultLogging'.
6868 --
6969 -- Since 1.4.0
70+ , tlsAllowedVersions :: [TLS.Version]
71+ -- ^ The TLS versions this server accepts.
72+ --
73+ -- Default: '[TLS.SSL3,TLS.TLS10,TLS.TLS11,TLS.TLS12]'.
74+ , tlsCiphers :: [TLS.Cipher]
75+ -- ^ The TLS ciphers this server accepts.
76+ --
77+ -- Default: '[TLSExtra.cipher_AES128_SHA1, TLSExtra.cipher_AES256_SHA1, TLSExtra.cipher_RC4_128_MD5, TLSExtra.cipher_RC4_128_SHA1]'
7078 }
7179
7280-- | An action when a plain HTTP comes to HTTP over TLS/SSL port.
@@ -89,6 +97,8 @@ defaultTlsSettings = TLSSettings
8997 , keyFile = "key.pem"
9098 , onInsecure = DenyInsecure "This server only accepts secure HTTPS connections."
9199 , tlsLogging = TLS.defaultLogging
100+ , tlsAllowedVersions = [TLS.SSL3,TLS.TLS10,TLS.TLS11,TLS.TLS12]
101+ , tlsCiphers = ciphers
92102 }
93103
94104-- | Running 'Application' with 'TLSSettings' and 'Settings' using
@@ -101,8 +111,8 @@ runTLSSocket TLSSettings {..} set sock app = do
101111 TLS.updateServerParams
102112 (\sp -> sp { TLS.serverWantClientCert = False }) $
103113 TLS.defaultParamsServer
104− { TLS.pAllowedVersions = [TLS.SSL3,TLS.TLS10,TLS.TLS11,TLS.TLS12]
105− , TLS.pCiphers = ciphers
114+ { TLS.pAllowedVersions = tlsAllowedVersions
115+ , TLS.pCiphers = tlsCiphers
106116 , TLS.pCertificates = zip certs $ (Just pk):repeat Nothing
107117 , TLS.pLogging = tlsLogging
108118 }