Re: add support for the old naming libs convention on windows (ssleay32.lib and libeay32.lib)

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Darek Ślusarczyk <dslusarczyk(at)splunk(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: add support for the old naming libs convention on windows (ssleay32.lib and libeay32.lib)
Date: 2024-12-04 14:48:00
Message-ID: BD61F6E2-3BAA-4003-9F27-1F02AA0592B5@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 2 Dec 2024, at 22:12, Darek Ślusarczyk <dslusarczyk(at)splunk(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2024-12-04 14:49:20 Re: Index AM API cleanup
Previous Message Daniel Gustafsson 2024-12-04 14:45:51 Re: Replace current implementations in crypt() and gen_salt() to OpenSSL