mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-04 03:47:18 +02:00
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.
This commit is contained in:
parent
cb38c056fd
commit
f0ca540374
@ -999,6 +999,7 @@ initialize_SSL(PGconn *conn)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
/* if not found, silently ignore; we do not require CRL */
|
/* if not found, silently ignore; we do not require CRL */
|
||||||
|
ERR_clear_error();
|
||||||
}
|
}
|
||||||
have_rootcert = true;
|
have_rootcert = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user