@@ -242,16 +242,31 @@ runTLSSocket' tlsset@TLSSettings{..} set credential sock app =
242242 TLS.serverWantClientCert = tlsWantClientCert
243243 , TLS.serverCACertificates = []
244244 , TLS.serverDHEParams = Nothing
245− , TLS.serverHooks = tlsServerHooks {
246− TLS.onALPNClientSuggest = Just alpn
247− }
248− , TLS.serverShared = def {
249− TLS.sharedCredentials = TLS.Credentials [credential]
250− }
251− , TLS.serverSupported = def {
252− TLS.supportedVersions = tlsAllowedVersions
253− , TLS.supportedCiphers = tlsCiphers
254− }
245+ , TLS.serverHooks = hooks
246+ , TLS.serverShared = shared
247+ , TLS.serverSupported = supported
248+ }
249+ -- Adding alpn to user's tlsServerHooks.
250+ hooks = tlsServerHooks {
251+ TLS.onALPNClientSuggest = Just alpn
252+ }
253+ shared = def {
254+ TLS.sharedCredentials = TLS.Credentials [credential]
255+ }
256+ supported = TLS.Supported {
257+ TLS.supportedVersions = tlsAllowedVersions
258+ , TLS.supportedCiphers = tlsCiphers
259+ , TLS.supportedCompressions = [TLS.nullCompression]
260+ , TLS.supportedHashSignatures = [
261+ (TLS.HashSHA512, TLS.SignatureRSA)
262+ , (TLS.HashSHA384, TLS.SignatureRSA)
263+ , (TLS.HashSHA256, TLS.SignatureRSA)
264+ , (TLS.HashSHA224, TLS.SignatureRSA)
265+ , (TLS.HashSHA1, TLS.SignatureRSA)
266+ , (TLS.HashSHA1, TLS.SignatureDSS)
267+ ]
268+ , TLS.supportedSecureRenegotiation = True
269+ , TLS.supportedSession = True
255270 }
256271
257272alpn :: [S.ByteString] -> IO S.ByteString