@@ -4226,12 +4226,12 @@ static int read_crypto_params(GLOBAL_OPTIONS *options)
42264226 /* Try to use PKCS#12 container with certificates and the private key ('-pkcs12' option) */
42274227 if (options -> pkcs12file ) {
42284228 load_objects_from_store (options -> pkcs12file , options -> pass , & options -> pkey , options -> certs , options -> crls );
4229-
4229+ }
42304230#if !defined(OPENSSL_NO_ENGINE ) || OPENSSL_VERSION_NUMBER >=0x30000000L
42314231 /* Security token */
42324232#ifndef OPENSSL_NO_ENGINE
42334233 /* PKCS#11 'dynamic' engine */
4234- } else if (options -> p11engine ) {
4234+ else if (options -> p11engine ) {
42354235 if (!engine_load (options ))
42364236 goto out ;
42374237#endif /* OPENSSL_NO_ENGINE */
@@ -4241,17 +4241,16 @@ static int read_crypto_params(GLOBAL_OPTIONS *options)
42414241 if ((options -> provider && provider_load (options -> provider )) || provider_load ("pkcs11prov" )) {
42424242 load_objects_from_store (options -> keyfile , options -> pass , & options -> pkey , NULL , NULL );
42434243 load_objects_from_store (options -> p11cert , options -> pass , NULL , options -> certs , NULL );
4244- } else {
4244+ } else
42454245#endif /* OPENSSL_VERSION_NUMBER>=0x30000000L */
42464246#ifndef OPENSSL_NO_ENGINE
42474247 /* try to find and load libp11 'pkcs11' engine */
4248- if (!engine_load (options )) {
4248+ if (!engine_load (options ))
42494249 goto out ;
42504250#endif /* OPENSSL_NO_ENGINE */
4251- }
4252- }
4251+ }
42534252#endif /* !defined(OPENSSL_NO_ENGINE) || OPENSSL_VERSION_NUMBER>=0x30000000L */
4254- } else {
4253+ else {
42554254 /* Load the the private key ('-key' option) */
42564255 load_objects_from_store (options -> keyfile , options -> pass , & options -> pkey , NULL , NULL );
42574256 }
@@ -4273,7 +4272,9 @@ static int read_crypto_params(GLOBAL_OPTIONS *options)
42734272 if (sk_X509_num (options -> certs ) == 0 && !read_pkcs7_certfile (options )) {
42744273 return 0 ; /* FAILED */
42754274 }
4275+ #if !defined(OPENSSL_NO_ENGINE ) || OPENSSL_VERSION_NUMBER >=0x30000000L
42764276out :
4277+ #endif /* !defined(OPENSSL_NO_ENGINE) || OPENSSL_VERSION_NUMBER>=0x30000000L */
42774278 return (options -> pkey && sk_X509_num (options -> certs ) > 0 ) ? 1 : 0 ;
42784279}
42794280
0 commit comments