On Wed, Apr 12, 2023, 19:30 Daniel Gustafsson <dan...@yesql.se> wrote: > > The issue we have is that we cannot get PGconn in > verify_cb so logging an error is tricky.
Hm, the man page talks about a "ex_data mechanism" which seems to be referring to this Rube Goldberg device https://www.openssl.org/docs/man3.1/man3/SSL_get_ex_data.html It looks like X509_STORE_CTX_set_app_data() and X509_STORE_CTX_get_app_data() would be convenience macros to do this.