]> git.ipfire.org Git - people/ms/dma.git/blobdiff - crypto.c
Merge pull request #34 from mtremer/better-authentication
[people/ms/dma.git] / crypto.c
index 8048f204e877963754521de7df17285da82b6933..0ebcf78c86d8babcd89d71c00f4cd959e6f7c2b7 100644 (file)
--- a/crypto.c
+++ b/crypto.c
@@ -93,7 +93,12 @@ smtp_init_crypto(int fd, int feature, struct smtp_features* features)
        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) {