mirror of
https://github.com/mtrojnar/osslsigncode.git
synced 2025-07-03 03:32:47 -05:00
Support loading OpenSSL 3.0+ providers without -pkcs11module option (e.g., CNG)
This commit is contained in:

committed by
Michał Trojnara

parent
6b56aef073
commit
dd9b81281f
@ -4317,6 +4317,12 @@ static int read_crypto_params(GLOBAL_OPTIONS *options)
|
||||
}
|
||||
#endif /* !defined(OPENSSL_NO_ENGINE) || OPENSSL_VERSION_NUMBER>=0x30000000L */
|
||||
else {
|
||||
#if OPENSSL_VERSION_NUMBER>=0x30000000L
|
||||
if (options->provider) {
|
||||
/* Attempt to load a provider without a PKCS#11 module (e.g., for the CNG provider) */
|
||||
(void)provider_load(options->provider);
|
||||
}
|
||||
#endif /* OPENSSL_VERSION_NUMBER>=0x30000000L */
|
||||
/* Load the the private key ('-key' option) */
|
||||
load_objects_from_store(options->keyfile, options->pass, &options->pkey, NULL, NULL);
|
||||
}
|
||||
|
Reference in New Issue
Block a user