]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/dma-0.10-better-tls.patch
squid 3.5.28: latest patches (01-02)
[people/pmueller/ipfire-2.x.git] / src / patches / dma-0.10-better-tls.patch
CommitLineData
f794504e
MT
1commit e94f50bbbe7318eec5b6b165ff73d94bbc9d20b0
2Author: Michael Tremer <michael.tremer@ipfire.org>
3Date: Sun Feb 11 11:05:43 2018 +0000
4
5 crypto: Don't limit to TLSv1 only
6
7 Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
8
9diff --git a/crypto.c b/crypto.c
10index 897b55bfdcfc..440c882880b5 100644
11--- a/crypto.c
12+++ b/crypto.c
13@@ -93,7 +93,12 @@ smtp_init_crypto(int fd, int feature)
14 SSL_library_init();
15 SSL_load_error_strings();
16
17- meth = TLSv1_client_method();
18+ // Allow any possible version
19+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
20+ meth = TLS_client_method();
21+#else
22+ meth = SSLv23_client_method();
23+#endif
24
25 ctx = SSL_CTX_new(meth);
26 if (ctx == NULL) {