]> git.ipfire.org Git - people/ms/dma.git/commitdiff
crypto: Don't limit to TLSv1 only better-tls
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 11 Feb 2018 11:05:43 +0000 (11:05 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 11 Feb 2018 11:05:43 +0000 (11:05 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
crypto.c

index 897b55bfdcfcc94814ba8482056c72e3d4a31f35..440c882880b50be8896cd53cbb4f29fb1d181673 100644 (file)
--- a/crypto.c
+++ b/crypto.c
@@ -93,7 +93,12 @@ smtp_init_crypto(int fd, int feature)
        SSL_library_init();
        SSL_load_error_strings();
 
-       meth = TLSv1_client_method();
+       // Allow any possible version
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+       meth = TLS_client_method();
+#else
+       meth = SSLv23_client_method();
+#endif
 
        ctx = SSL_CTX_new(meth);
        if (ctx == NULL) {