Making openssl_tls_init_hook OpenSSL specific - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Making openssl_tls_init_hook OpenSSL specific
Date
Msg-id E1BB5261-5C89-494A-841B-283DAD27A2EA@yesql.se
Whole thread Raw
Responses Re: Making openssl_tls_init_hook OpenSSL specific  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Commit 896fcdb230e72 (sorry for chiming in too late, I missed that thread)
added a TLS init hook which is OpenSSL specific: openssl_tls_init_hook.  Since
the rest of the TLS support in the backend is library agnostic, we should IMO
make this hook follow that pattern, else this will make a non-OpenSSL backend
not compile.

If we make the hook generic, extension authors must have a way to tell which
backend invoked it, so maybe the best option is to simply wrap this hook in
USE_OPENSSL ifdefs and keep the name/signature?  Looking at the Secure
Transport patch I wrote, there is really no equivalent callsite; the same goes
for a libnss patch which I haven't yet submitted.

The attached adds USE_OPENSSL guards.

cheers ./daniel


Attachment

pgsql-hackers by date:

Previous
From: "Zhang, Jie"
Date:
Subject: RE: [PATHC] Fix minor memory leak in pg_basebackup
Next
From: Robert Haas
Date:
Subject: Re: Do we need to handle orphaned prepared transactions in the server?