pgsql: Clear OpenSSL error queue after failed X509_STORE_load_locations - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Clear OpenSSL error queue after failed X509_STORE_load_locations
Date
Msg-id E1bsRrj-00037E-UI@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Clear OpenSSL error queue after failed X509_STORE_load_locations() call.

Leaving the error in the error queue used to be harmless, because the
X509_STORE_load_locations() call used to be the last step in
initialize_SSL(), and we would clear the queue before the next
SSL_connect() call. But previous commit moved things around. The symptom
was that if a CRL file was not found, and one of the subsequent
initialization steps, like loading the client certificate or private key,
failed, we would incorrectly print the "no such file" error message from
the earlier X509_STORE_load_locations() call as the reason.

Backpatch to all supported versions, like the previous patch.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/f0ca540374ee89b45bce83b499327ffd934344a8

Modified Files
--------------
src/interfaces/libpq/fe-secure-openssl.c | 1 +
1 file changed, 1 insertion(+)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Clear OpenSSL error queue after failed X509_STORE_load_locations
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Clear OpenSSL error queue after failed X509_STORE_load_locations