Re: Small cleanup of leftover pre-1.1.0 OpenSSL code

From: Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com>
To: Andreas Karlsson <andreas(at)proxel(dot)se>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Small cleanup of leftover pre-1.1.0 OpenSSL code
Date: 2026-11-25 03:49:15
Message-ID: CAJTYsWUouU4NYxSBJZ+FOU7u8bvvpOn-JP8Ce8Fk=1H4rb_Xqg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Wed, 25 Nov 2026 at 08:06, Andreas Karlsson <andreas(at)proxel(dot)se> wrote:
> While reviewing another patch I found this small leftover from before we
> bumped the OpenSSL version requirement to 1.1.0. As the
> SSL_AD_NO_APPLICATION_PROTOCOL define was introduced in OpenSSL 1.1.0
> and in LibreSSL 3.4.0 (not 3.4.3 as the comment I remove implies) we no
> longer have to check if it is defined and we can therefore very slightly
> simplify our code.

Thanks for the patch! I checked the LibreSSL headers as well, the define
is there in 3.4.0 and not in 3.3.x, so this looks good to me.

Since we are touching this comment anyway, maybe we can also mention that
the OpenSSL issue has been fixed? Newer OpenSSL and LibreSSL versions now
return an error string for this alert on their own, so we only need this
for older versions. Something like:

/*
* Server aborted the connection with TLS "no_application_protocol" alert.
* Older OpenSSL and LibreSSL versions don't give any error string for
* that, so do it ourselves. This was fixed in OpenSSL 3.0.14, 3.1.6,
* 3.2.2 and 3.3.1, and in LibreSSL 4.1.0. See
* https://github.com/openssl/openssl/issues/24300.
*/

This would likely help us in removing that entire block in future.

Regards,
Ayush

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Xuneng Zhou 2026-11-25 04:22:29 remove unused shared WAL flush request
Previous Message Manu 2026-11-25 03:41:34 Re: Dropping a composite attribute causes data integrity violations