Re: add support for the old naming libs convention on windows (ssleay32.lib and libeay32.lib) - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: add support for the old naming libs convention on windows (ssleay32.lib and libeay32.lib)
Date
Msg-id BD61F6E2-3BAA-4003-9F27-1F02AA0592B5@yesql.se
Whole thread Raw
In response to add support for the old naming libs convention on windows (ssleay32.lib and libeay32.lib)  (Darek Ślusarczyk <dslusarczyk@splunk.com>)
Responses Re: add support for the old naming libs convention on windows (ssleay32.lib and libeay32.lib)
List pgsql-hackers
> On 2 Dec 2024, at 22:12, Darek Ślusarczyk <dslusarczyk@splunk.com> wrote:

> According to the postgresql-17 requirements https://www.postgresql.org/docs/17/install-requirements.html
> the minimum required version of openssl is 1.0.2.
> In that version, the naming convention on windows is still ssleay32.[lib|dll] and
> libeay32.[lib|dll] instead of libssl.[lib|dll] and libcrypto.[lib|dll].
> It changed in version 1.1.0 https://github.com/openssl/openssl/issues/10332#issuecomment-549027653

Correct, nice catch.

> I also submitted a pull request on GitHub, which can be found here: https://github.com/postgres/postgres/pull/188

Thanks for submitting it here once the PR was auto-closed, we don't use Github
as I believe the bot stated.

> -    ssl_lib = cc.find_library('ssl',
> +    ssl_lib = cc.find_library(['ssl', 'ssleay32'],

I'm not a meson expert by any means but I was suprised to see this, libname is
defined as str and not list[str] in the meson documentaion so I didn't expect
that to work.  Is the list prioritized in order in case both libs exist on the
system?  On a non-Windows system I wouldn't want libssleay32 to be picked up
over libssl if it happened to exist etc.

--
Daniel Gustafsson




pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: Replace current implementations in crypt() and gen_salt() to OpenSSL
Next
From: Andres Freund
Date:
Subject: Re: Make tuple deformation faster