mirror of
https://github.com/mtrojnar/osslsigncode.git
synced 2025-04-22 15:35:03 -05:00
Do not try to load engine twice
This commit is contained in:
parent
7734382436
commit
d352dcc1a5
@ -4231,7 +4231,8 @@ static int read_crypto_params(GLOBAL_OPTIONS *options)
|
|||||||
/* Security token */
|
/* Security token */
|
||||||
#ifndef OPENSSL_NO_ENGINE
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
/* PKCS#11 'dynamic' engine */
|
/* PKCS#11 'dynamic' engine */
|
||||||
} else if (options->p11engine && !engine_load(options)) {
|
} else if (options->p11engine) {
|
||||||
|
if(!engine_load(options))
|
||||||
goto out;
|
goto out;
|
||||||
#endif /* OPENSSL_NO_ENGINE */
|
#endif /* OPENSSL_NO_ENGINE */
|
||||||
} else if (options->p11module) {
|
} else if (options->p11module) {
|
||||||
@ -4240,13 +4241,14 @@ static int read_crypto_params(GLOBAL_OPTIONS *options)
|
|||||||
if ((options->provider && provider_load(options->provider)) || provider_load("pkcs11prov")) {
|
if ((options->provider && provider_load(options->provider)) || provider_load("pkcs11prov")) {
|
||||||
load_objects_from_store(options->keyfile, options->pass, &options->pkey, NULL, NULL);
|
load_objects_from_store(options->keyfile, options->pass, &options->pkey, NULL, NULL);
|
||||||
load_objects_from_store(options->p11cert, options->pass, NULL, options->certs, NULL);
|
load_objects_from_store(options->p11cert, options->pass, NULL, options->certs, NULL);
|
||||||
} else
|
} else {
|
||||||
#endif /* OPENSSL_VERSION_NUMBER>=0x30000000L */
|
#endif /* OPENSSL_VERSION_NUMBER>=0x30000000L */
|
||||||
#ifndef OPENSSL_NO_ENGINE
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
/* try to find and load libp11 'pkcs11' engine */
|
/* try to find and load libp11 'pkcs11' engine */
|
||||||
if (!engine_load(options)) {
|
if (!engine_load(options)) {
|
||||||
goto out;
|
goto out;
|
||||||
#endif /* OPENSSL_NO_ENGINE */
|
#endif /* OPENSSL_NO_ENGINE */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif /* !defined(OPENSSL_NO_ENGINE) || OPENSSL_VERSION_NUMBER>=0x30000000L */
|
#endif /* !defined(OPENSSL_NO_ENGINE) || OPENSSL_VERSION_NUMBER>=0x30000000L */
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user