]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
Bitrot: auto-initialization of OpenSSL 1.1.0
authorViktor Dukhovni <postfix-users@dukhovni.org>
Mon, 15 Feb 2016 06:13:06 +0000 (01:13 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Thu, 26 May 2016 04:41:55 +0000 (00:41 -0400)
The functions SSL_library_init(), SSL_load_error_strings() and
OpenSSL_add_ssl_algorithms() are deprecated in OpenSSL 1.1.0.

Instead the library auto-initializes.  Though it is possible to
call OPENSSL_init_crypto() and OPENSSL_init_ssl() for explicit
control over initialization, for now there is no apparent reason
to do so.  This may change, so explicit initialization might yet
become necessary.

postfix/src/tls/tls_client.c
postfix/src/tls/tls_dane.c
postfix/src/tls/tls_server.c

index 6739d1f58fc0496d3df5a7a89794780f0fbbc74e..de50a73f8c4ecc68947ab6ecc3a7de312e6fa16f 100644 (file)
@@ -298,6 +298,7 @@ TLS_APPL_STATE *tls_client_init(const TLS_CLIENT_INIT_PROPS *props)
      */
     tls_check_version();
 
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
     /*
      * Initialize the OpenSSL library by the book! To start with, we must
      * initialize the algorithms. We want cleartext error messages instead of
@@ -305,6 +306,7 @@ TLS_APPL_STATE *tls_client_init(const TLS_CLIENT_INIT_PROPS *props)
      */
     SSL_load_error_strings();
     OpenSSL_add_ssl_algorithms();
+#endif
 
     /*
      * Create an application data index for SSL objects, so that we can
index 879fd0963cf01b6fa940ebbbdd88d5604f8695d3..3f6060980125114b1936107f248117d94ba2a4c5 100644 (file)
@@ -2155,8 +2155,10 @@ static SSL_CTX *ctx_init(const char *CAfile)
     tls_param_init();
     tls_check_version();
 
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
     SSL_load_error_strings();
     SSL_library_init();
+#endif
 
     if (!tls_validate_digest(LN_sha1))
        msg_fatal("%s digest algorithm not available", LN_sha1);
index 8d4d0c523e30d7ae8f28c5f84bef58beb8a77150..56c83eb80454a5030cb086808df8678af92ce0d5 100644 (file)
@@ -375,6 +375,7 @@ TLS_APPL_STATE *tls_server_init(const TLS_SERVER_INIT_PROPS *props)
      */
     tls_check_version();
 
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
     /*
      * Initialize the OpenSSL library by the book! To start with, we must
      * initialize the algorithms. We want cleartext error messages instead of
@@ -382,6 +383,7 @@ TLS_APPL_STATE *tls_server_init(const TLS_SERVER_INIT_PROPS *props)
      */
     SSL_load_error_strings();
     OpenSSL_add_ssl_algorithms();
+#endif
 
     /*
      * First validate the protocols. If these are invalid, we can't continue.