Skip to content

Commit

Permalink
Use X509_LOOKUP_load_file() to load certificates with a lookup using …
Browse files Browse the repository at this point in the history
…the implementation X509_LOOKUP_file()
  • Loading branch information
olszomal authored and mtrojnar committed Dec 3, 2023
1 parent c909ba8 commit 7285778
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions osslsigncode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1304,7 +1304,7 @@ static int x509_store_load_file(X509_STORE *store, char *cafile)
lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file());
if (!lookup || !cafile)
return 0; /* FAILED */
if (!X509_load_cert_file(lookup, cafile, X509_FILETYPE_PEM)) {
if (!X509_LOOKUP_load_file(lookup, cafile, X509_FILETYPE_PEM)) {
printf("\nError: no certificate found\n");
return 0; /* FAILED */
}
Expand Down Expand Up @@ -1334,7 +1334,7 @@ static int x509_store_load_crlfile(X509_STORE *store, char *cafile, char *crlfil
lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file());
if (!lookup)
return 0; /* FAILED */
if (!X509_load_cert_file(lookup, cafile, X509_FILETYPE_PEM)) {
if (!X509_LOOKUP_load_file(lookup, cafile, X509_FILETYPE_PEM)) {
printf("\nError: no certificate found\n");
return 0; /* FAILED */
}
Expand Down

0 comments on commit 7285778

Please sign in to comment.