mirror of
https://github.com/mtrojnar/osslsigncode.git
synced 2025-05-18 09:25:35 -05:00
Fix engine-less builds
This commit is contained in:
parent
68e8845ef1
commit
9ea7e85468
@ -4242,15 +4242,19 @@ static int read_crypto_params(GLOBAL_OPTIONS *options)
|
||||
else if (options->p11engine) {
|
||||
if(!engine_load(options))
|
||||
goto out;
|
||||
}
|
||||
#endif /* OPENSSL_NO_ENGINE */
|
||||
} else if (options->p11module) {
|
||||
else if (options->p11module) {
|
||||
#if OPENSSL_VERSION_NUMBER>=0x30000000L
|
||||
/* Try to load PKCS#11 provider first */
|
||||
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->p11cert, options->pass, NULL, options->certs, NULL);
|
||||
} else
|
||||
}
|
||||
#endif /* OPENSSL_VERSION_NUMBER>=0x30000000L */
|
||||
#if !defined(OPENSSL_NO_ENGINE) && OPENSSL_VERSION_NUMBER>=0x30000000L
|
||||
else
|
||||
#endif /* !defined(OPENSSL_NO_ENGINE) || OPENSSL_VERSION_NUMBER>=0x30000000L */
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
/* try to find and load libp11 'pkcs11' engine */
|
||||
if (!engine_load(options))
|
||||
@ -4280,9 +4284,9 @@ static int read_crypto_params(GLOBAL_OPTIONS *options)
|
||||
if (sk_X509_num(options->certs) == 0 && !read_pkcs7_certfile(options)) {
|
||||
return 0; /* FAILED */
|
||||
}
|
||||
#if !defined(OPENSSL_NO_ENGINE) || OPENSSL_VERSION_NUMBER>=0x30000000L
|
||||
#if !defined(OPENSSL_NO_ENGINE) || OPENSSL_VERSION_NUMBER<0x1010108f
|
||||
out:
|
||||
#endif /* !defined(OPENSSL_NO_ENGINE) || OPENSSL_VERSION_NUMBER>=0x30000000L */
|
||||
#endif /* !defined(OPENSSL_NO_ENGINE) || OPENSSL_VERSION_NUMBER<0x1010108f */
|
||||
return (options->pkey && sk_X509_num(options->certs) > 0) ? 1 : 0;
|
||||
}
|
||||
|
||||
|
@ -268,11 +268,13 @@ typedef struct {
|
||||
int output_pkcs7;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *p11engine;
|
||||
STACK_OF(EngineControl) *engine_ctrls;
|
||||
int login;
|
||||
#endif /* OPENSSL_NO_ENGINE */
|
||||
#if !defined(OPENSSL_NO_ENGINE) || OPENSSL_VERSION_NUMBER>=0x30000000L
|
||||
char *p11module;
|
||||
char *p11cert;
|
||||
int login;
|
||||
STACK_OF(EngineControl) *engine_ctrls;
|
||||
#endif /* OPENSSL_NO_ENGINE */
|
||||
#endif /* !defined(OPENSSL_NO_ENGINE) || OPENSSL_VERSION_NUMBER>=0x30000000L */
|
||||
int askpass;
|
||||
char *readpass;
|
||||
char *pass;
|
||||
|
Loading…
x
Reference in New Issue
Block a user