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5pdCAoKTsNCnwgaW50DQp8IG1haW4gKCkNCnwgew0KfCByZXR1cm4g U1NMX2xpYnJhcnlfaW5pdCAoKTsNCnwgICA7DQp8ICAgcmV0dXJuIDA7DQp8 IH0NCmNvbmZpZ3VyZTo4NzQxOiByZXN1bHQ6IG5vDQpjb25maWd1cmU6ODc1 MTogZXJyb3I6IGxpYnJhcnkgJ3NzbCcgaXMgcmVxdWlyZWQgZm9yIE9wZW5T U0wKCg==
On Fri, Sep 2, 2016 at 3:10 PM, <noloader@gmail.com> wrote: > OpenSSL 1.1.0 does not use SSL_library_init. Instead, it uses > OPENSSL_init_ssl. The work to be done with OpenSSL 1.1.0 is discussed here: https://www.postgresql.org/message-id/20160627151604.GD1051@msg.df7cb.de I'd expect a patch to land soon. -- Michael
The following gets past the OpenSSL 1.1.0 configuration problems. It was tested against Postgres 9.5.4 and Master (6591f4226c81104f). Thanks to ldav1s at http://stackoverflow.com/q/39285733 (I'm an OpenSSL guy; not an Autoconf guy). $ git diff configure.in > configure.in.patch riemann:postgresql$ cat configure.in.patch diff --git a/configure.in b/configure.in index c878b4e..c12bfb6 100644 --- a/configure.in +++ b/configure.in @@ -1112,10 +1112,16 @@ if test "$with_openssl" = yes ; then dnl Order matters! if test "$PORTNAME" != "win32"; then AC_CHECK_LIB(crypto, CRYPTO_new_ex_data, [], [AC_MSG_ERROR([library 'crypto' is required for OpenSSL])]) - AC_CHECK_LIB(ssl, SSL_library_init, [], [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])]) + FOUND_SSL_LIB="no" + AC_CHECK_LIB(ssl, OPENSSL_init_ssl, [FOUND_SSL_LIB="yes"]) + AC_CHECK_LIB(ssl, SSL_library_init, [FOUND_SSL_LIB="yes"]) + AS_IF([test "x$FOUND_SSL_LIB" = xno], [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])]) else AC_SEARCH_LIBS(CRYPTO_new_ex_data, eay32 crypto, [], [AC_MSG_ERROR([library 'eay32' or 'crypto' is required for OpenSSL])]) - AC_SEARCH_LIBS(SSL_library_init, ssleay32 ssl, [], [AC_MSG_ERROR([library 'ssleay32' or 'ssl' is required for OpenSSL])]) + FOUND_SSL_LIB="no" + AC_SEARCH_LIBS(ssleay32 ssl, OPENSSL_init_ssl, [FOUND_SSL_LIB="yes"]) + AC_SEARCH_LIBS(ssleay32 ssl, SSL_library_init, [FOUND_SSL_LIB="yes"]) + AS_IF([test "x$FOUND_SSL_LIB" = xno], [AC_MSG_ERROR([library 'ssleay32' or 'ssl' is required for OpenSSL])]) fi AC_CHECK_FUNCS([SSL_get_current_compression]) fi On Fri, Sep 2, 2016 at 2:21 AM, Michael Paquier <michael.paquier@gmail.com> wrote: > On Fri, Sep 2, 2016 at 3:10 PM, <noloader@gmail.com> wrote: >> OpenSSL 1.1.0 does not use SSL_library_init. Instead, it uses >> OPENSSL_init_ssl. > > The work to be done with OpenSSL 1.1.0 is discussed here: > https://www.postgresql.org/message-id/20160627151604.GD1051@msg.df7cb.de > I'd expect a patch to land soon. > -- > Michael
Attachment
On Sun, Sep 4, 2016 at 1:07 PM, Jeffrey Walton <noloader@gmail.com> wrote: > The following gets past the OpenSSL 1.1.0 configuration problems. > > It was tested against Postgres 9.5.4 and Master (6591f4226c81104f). > Thanks to ldav1s at http://stackoverflow.com/q/39285733 (I'm an > OpenSSL guy; not an Autoconf guy). Yes, a similar method is part of the existing patches. Note that this is not enough, the exiting code would not go through compilation. If you have an interest in getting that done, I think that it would be good if you could review the existing patches and help to move on. -- Michael