Skip to content

Commit 08fc251

Browse files
committed
Always load additional certificates if '-ac' option is defined
1 parent 4568c89 commit 08fc251

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

osslsigncode.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4223,6 +4223,9 @@ static int read_crypto_params(GLOBAL_OPTIONS *options)
42234223
options->xcerts = sk_X509_new_null();
42244224
options->crls = sk_X509_CRL_new_null();
42254225

4226+
/* Load additional (cross) certificates ('-ac' option) */
4227+
load_objects_from_store(options->xcertfile, options->pass, NULL, options->xcerts, NULL);
4228+
42264229
/* Try to use PKCS#12 container with certificates and the private key ('-pkcs12' option) */
42274230
if (options->pkcs12file) {
42284231
load_objects_from_store(options->pkcs12file, options->pass, &options->pkey, options->certs, options->crls);
@@ -4261,9 +4264,6 @@ static int read_crypto_params(GLOBAL_OPTIONS *options)
42614264
}
42624265
#endif /* OPENSSL_VERSION_NUMBER<0x1010108f */
42634266

4264-
/* Load additional (cross) certificates ('-ac' option) */
4265-
load_objects_from_store(options->xcertfile, options->pass, NULL, options->xcerts, NULL);
4266-
42674267
/* Load the certificate chain ('-certs' option) */
42684268
load_objects_from_store(options->certfile, options->pass, NULL, options->certs, NULL);
42694269

0 commit comments

Comments
 (0)