Fix error handling for CRL loading in OpenSSL code

This commit is contained in:
Tim Rühsen 2014-11-12 15:38:21 +01:00
parent 6e259b76b7
commit 897ef07712
2 changed files with 6 additions and 6 deletions

View File

@ -1,3 +1,7 @@
2014-11-12 Tim Ruehsen <tim.ruehsen@gmx.de>
* openssl.c (ssl_init): Fix error handling for CRL loading
2014-11-12 Witchakorn Kamolpornwijit <witchakk@mit.edu> (tiny change)
* html-parse.c (map_html_tags): Fix range check

View File

@ -258,14 +258,10 @@ ssl_init (void)
{
X509_STORE *store = SSL_CTX_get_cert_store (ssl_ctx);
X509_LOOKUP *lookup;
int rc;
if (!(lookup = X509_STORE_add_lookup (store, X509_LOOKUP_file ()))
|| (!(rc = X509_load_crl_file (lookup, opt.crl_file, X509_FILETYPE_PEM))))
{
logprintf (LOG_NOTQUIET, _("ERROR: Failed to load CRL file '%s': (%d)\n"), opt.crl_file, rc);
return false;
}
|| (!X509_load_crl_file (lookup, opt.crl_file, X509_FILETYPE_PEM)))
goto error;
X509_STORE_set_flags (store, X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL);
}