Re: BUG #14308: Postgres 9.5.4 does not configure against OpenSSL 1.1.0

From: Jeffrey Walton <noloader(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14308: Postgres 9.5.4 does not configure against OpenSSL 1.1.0
Date: 2016-09-04 04:07:11
Message-ID: CAH8yC8mQHmX76fZdMWDG8S=M9Ycgm7WekpMp00_RkA96KpQWGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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(dot)paquier(at)gmail(dot)com> wrote:
> On Fri, Sep 2, 2016 at 3:10 PM, <noloader(at)gmail(dot)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 Content-Type Size
configure.in.patch text/x-patch 1.3 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2016-09-04 04:44:27 Re: BUG #14308: Postgres 9.5.4 does not configure against OpenSSL 1.1.0
Previous Message Tom Lane 2016-09-03 15:49:57 Re: BUG #14295: Hot standby crash during tsvector rebuild