]> granicus.if.org Git - postgresql/commit
Clear OpenSSL error queue after failed X509_STORE_load_locations() call.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 7 Oct 2016 09:53:40 +0000 (12:53 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 7 Oct 2016 09:53:40 +0000 (12:53 +0300)
commit4d3ecbfee9dbe34fe20991a5a402b1f949814928
treec94e7469c936dab37db8ee63edca1e884d774506
parent341acf235943c15aa56103ef7b66ecec625b4af0
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.
src/interfaces/libpq/fe-secure-openssl.c