From: Michael Paquier <michael@paquier.xyz>
To: Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Cc: serpashk@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15789: libpq compilation with OpenSSL 1.1.1b fails on Windows with Visual Studio 2017
Date: Tue, 28 May 2019 06:58:02 -0400
Message-ID: <20190528105802.GC2682@paquier.xyz> (raw)
In-Reply-To: <CAC+AXB1Vw81MzWAPNmvpQhr_dDezucA1xu_JB9-asxzOk0rGYA@mail.gmail.com>
References: <15789-8fc75dea3c5a17c8@postgresql.org>
<CAC+AXB1Vw81MzWAPNmvpQhr_dDezucA1xu_JB9-asxzOk0rGYA@mail.gmail.com>
On Tue, May 28, 2019 at 07:31:55AM +0200, Juan José Santamaría Flecha wrote:
> Can you check if you get a sane compilation with the attached patch?
>
> It is just a compilation issue, once the software is built with the 1.1.x
> libraries you should not have any further problems to use SSL.
Could you add your patch to the upcoming commit fest please? Here it
is:
https://commitfest.postgresql.org/23/
The scripts in src/tools/msvc/ make efforts for being able to compile
with OpenSSL 1.0.2 which is the latest LTS version of upstream, but we
lack facility to make them more dynamic depending on the version of
OpenSSL so as the compile flags of pg_config.h can be enforced
correctly. So what you are doing in GetOpenSSLVersion() is something
that we are going to need badly, and OpenSSL has broken many
interfaces between 1.0.2 and 1.1.0.
+ # Startint at version 1.1.0 OpenSSL have changed their library names from:
+ # libeay to libcrypto
+ # ssleay to libssl
s/startint/starting/
Are these from the installers we recommend in the docs? I mean these
ones:
https://slproweb.com/products/Win32OpenSSL.html
+ if (-e "$self->{options}->{openssl}/lib/VC/libssl32MD.lib")
Why not using a version-specific logic here?
+ my ($major, $minor) = $self->GetOpenSSLVersion();
+ if ($major == 1 && $minor == 1)
+ {
+ print $o "#define HAVE_BIO_GET_DATA 1\n";
+ print $o "#define HAVE_BIO_METH_NEW 1\n";
+ }
I think that you are missing HAVE_OPENSSL_INIT_SSL and
HAVE_ASN1_STRING_GET0_DATA here. Please see commit message of
bde64eb.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: michael@paquier.xyz, juanjo.santamaria@gmail.com, serpashk@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15789: libpq compilation with OpenSSL 1.1.1b fails on Windows with Visual Studio 2017
In-Reply-To: <20190528105802.GC2682@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox