file format fixes

This commit is contained in:
olszomal 2020-02-19 10:47:29 +01:00
parent 7fcf08ad75
commit 6bcb95e8fa

View File

@ -1624,16 +1624,14 @@ static int load_file_lookup(X509_STORE *store, char *certs, char *crl, int purpo
fprintf(stderr, "Error: no certificate found in %s\n", certs);
return 0; /* FAILED */
}
if (crl)
if (!X509_load_crl_file(lookup, crl, X509_FILETYPE_PEM)) {
if (crl && !X509_load_crl_file(lookup, crl, X509_FILETYPE_PEM)) {
fprintf(stderr, "Error: no CRL found in %s\n", crl);
return 0; /* FAILED */
}
param = X509_STORE_get0_param(store);
if (param == NULL)
return 0; /* FAILED */
if (crl)
if (!X509_VERIFY_PARAM_set_flags(param, X509_V_FLAG_CRL_CHECK))
if (crl && !X509_VERIFY_PARAM_set_flags(param, X509_V_FLAG_CRL_CHECK))
return 0; /* FAILED */
if (!X509_VERIFY_PARAM_set_purpose(param, purpose))
return 0; /* FAILED */