Re: BUG #15789: libpq compilation with OpenSSL 1.1.1b fails on Windows with Visual Studio 2017
Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
From: Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: serpashk@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2019-05-31T14:11:37Z
Lists: pgsql-bugs
Attachments
- 0001_windows_openssl_1.1.0_build_PG11_v1.patch (application/octet-stream) patch v1
On Tue, May 28, 2019 at 12:58 PM Michael Paquier <michael@paquier.xyz>
wrote:
>
> Could you add your patch to the upcoming commit fest please? Here it
> is:
> https://commitfest.postgresql.org/23/
>
>
Sure, done as [1]. The attached patch is still for 11, will it be back
patched?
>
> + # 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
>
>
The change in the library names comes directly from OpenSSL [2].
> + if (-e "$self->{options}->{openssl}/lib/VC/libssl32MD.lib")
> Why not using a version-specific logic here?
>
>
The version logic is just before that:
+ my ($major, $minor) = $self->GetOpenSSLVersion();
+ if ($major == 1 && $minor == 1)
I guess that what you mean is, why testing the 32/64 bits using the
libraries instead of using the 'platform'? I try to make it clearer in this
version.
> + 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.
>
>
Yes, you are right. Since those do not break the compilation between 1.0.2
and 1.1.0 I did not notice them.
Regards,
Juan José Santamaría Flecha
[1] https://commitfest.postgresql.org/23/2134/
[2] https://mta.openssl.org/pipermail/openssl-dev/2016-August/008351.html
Commits
-
Add support for OpenSSL 1.1.0 and newer versions in MSVC scripts
- 05b2758c39e2 9.4.24 landed
- d908a0087e0a 9.5.19 landed
- 5329606693fc 9.6.15 landed
- a559805597d5 10.10 landed
- 0e08a3a1f541 11.5 landed
- d993e0fb82ff 12.0 landed