mirror of
https://github.com/openssl/openssl.git
synced 2025-01-12 13:36:28 +08:00
APPS: make sure the -CAfile argument can be in DER format
Note that PKCS#12 input is still not supported here- Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18917)
This commit is contained in:
parent
2786160731
commit
57c0205b4d
@ -1379,8 +1379,12 @@ X509_STORE *setup_verify(const char *CAfile, int noCAfile,
|
||||
if (CAfile != NULL) {
|
||||
if (X509_LOOKUP_load_file_ex(lookup, CAfile, X509_FILETYPE_PEM,
|
||||
libctx, propq) <= 0) {
|
||||
BIO_printf(bio_err, "Error loading file %s\n", CAfile);
|
||||
goto end;
|
||||
ERR_clear_error();
|
||||
if (X509_LOOKUP_load_file_ex(lookup, CAfile, X509_FILETYPE_ASN1,
|
||||
libctx, propq) <= 0) {
|
||||
BIO_printf(bio_err, "Error loading file %s\n", CAfile);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
X509_LOOKUP_load_file_ex(lookup, NULL, X509_FILETYPE_DEFAULT,
|
||||
|
@ -202,8 +202,8 @@ can be specified using following options.
|
||||
|
||||
=item B<-CAfile> I<file>
|
||||
|
||||
Load the specified file which contains a certificate
|
||||
or several of them in case the input is in PEM or PKCS#12 format.
|
||||
Load the specified file which contains a trusted certificate in DER format
|
||||
or potentially several of them in case the input is in PEM format.
|
||||
PEM-encoded certificates may also have trust attributes set.
|
||||
|
||||
=item B<-no-CAfile>
|
||||
|
Loading…
Reference in New Issue
Block a user