From 7285778cb0e4af044ddcff0b74bf5a15b3fe41ce Mon Sep 17 00:00:00 2001 From: olszomal Date: Fri, 1 Dec 2023 09:58:33 +0100 Subject: [PATCH] Use X509_LOOKUP_load_file() to load certificates with a lookup using the implementation X509_LOOKUP_file() --- osslsigncode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osslsigncode.c b/osslsigncode.c index f8264a87..c24e9acd 100644 --- a/osslsigncode.c +++ b/osslsigncode.c @@ -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 */ } @@ -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 */ }