Clear OpenSSL error stack after loading certificate file.
authorKyle Nekritz <knekritz@fb.com>
Fri, 20 Jan 2017 17:02:40 +0000 (09:02 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 20 Jan 2017 17:17:55 +0000 (09:17 -0800)
commitd97932619c6a70dc855c51688b88231ad47bb853
tree8471b6228fc19d81a22000e7256f79eaa3e31405
parentb95919855a9053e9d7f425ba6595d369f055fbb0
Clear OpenSSL error stack after loading certificate file.

Summary: SSL_CTX_load_verify_locations interally end up using X509_load_cert_crt_file, which has an unchecked call to X509_STORE_add_cert. This can fail and add an error to the error stack without causing SSL_CTX_load_verify_locations to return an error.

Reviewed By: siyengar

Differential Revision: D4442017

fbshipit-source-id: a4cf7f5ee2c18d90d5d61baf3acb99ffca6b8af0
folly/io/async/SSLContext.cpp