From 3442e764f9f1ab81b5776602de4fe47892904d0e Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 8 Oct 2018 23:23:09 +0000 Subject: [PATCH] crypto: Don't limit to TLSv1 only Approved by: re (rgrimes, gjb) Obtained from: upstream commit e94f50bbbe7318eec5b6b165ff73d94bbc9d20b0 --- contrib/dma/crypto.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/contrib/dma/crypto.c b/contrib/dma/crypto.c index 897b55bfdcfc..440c882880b5 100644 --- a/contrib/dma/crypto.c +++ b/contrib/dma/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) {