This removes some #ifndef clutter.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1644)
}
return e;
}
+#endif
ENGINE *setup_engine(BIO *err, const char *engine, int debug)
{
ENGINE *e = NULL;
+#ifndef OPENSSL_NO_ENGINE
if (engine) {
if (strcmp(engine, "auto") == 0) {
BIO_printf(err, "enabling auto ENGINE support\n");
BIO_printf(err, "engine \"%s\" set.\n", ENGINE_get_id(e));
}
+#endif
return e;
}
void release_engine(ENGINE *e)
{
+#ifndef OPENSSL_NO_ENGINE
if (e != NULL)
/* Free our "structural" reference. */
ENGINE_free(e);
-}
#endif
+}
int load_config(BIO *err, CONF *cnf)
{
const char *pass, ENGINE *e,
const char *cert_descrip);
X509_STORE *setup_verify(BIO *bp, char *CAfile, char *CApath);
-# ifndef OPENSSL_NO_ENGINE
+
ENGINE *setup_engine(BIO *err, const char *engine, int debug);
void release_engine(ENGINE *e);
-# endif
# ifndef OPENSSL_NO_OCSP
OCSP_RESPONSE *process_responder(BIO *err, OCSP_REQUEST *req,
#define BSIZE 256
MS_STATIC char buf[3][BSIZE];
char *randfile = NULL;
-#ifndef OPENSSL_NO_ENGINE
char *engine = NULL;
-#endif
char *tofree = NULL;
DB_ATTR db_attr;
if (!load_config(bio_err, conf))
goto err;
-#ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-#endif
/* Lets get the config section we are using */
if (section == NULL) {
X509_CRL_free(crl);
NCONF_free(conf);
NCONF_free(extconf);
-#ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-#endif
+ release_engine(e);
OBJ_cleanup();
apps_shutdown();
OPENSSL_EXIT(ret);
const EVP_MD *sign_md = NULL;
int informat = FORMAT_SMIME, outformat = FORMAT_SMIME;
int rctformat = FORMAT_SMIME, keyform = FORMAT_PEM;
-# ifndef OPENSSL_NO_ENGINE
char *engine = NULL;
-# endif
unsigned char *secret_key = NULL, *secret_keyid = NULL;
unsigned char *pwri_pass = NULL, *pwri_tmp = NULL;
size_t secret_keylen = 0, secret_keyidlen = 0;
"cert.pem recipient certificate(s) for encryption\n");
goto end;
}
-# ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-# endif
if (!app_passwd(bio_err, passargin, NULL, &passin, NULL)) {
BIO_printf(bio_err, "Error getting password\n");
EVP_PKEY_free(key);
CMS_ContentInfo_free(cms);
CMS_ContentInfo_free(rcms);
-#ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-#endif
+ release_engine(e);
BIO_free(rctin);
BIO_free(in);
BIO_free(indata);
OPENSSL_free(sigbuf);
if (bmd != NULL)
BIO_free(bmd);
-#ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-#endif
+ release_engine(e);
apps_shutdown();
OPENSSL_EXIT(err);
}
BIO *in = NULL, *out = NULL;
int informat, outformat, check = 0, noout = 0, C = 0, ret = 1;
char *infile, *outfile, *prog;
-# ifndef OPENSSL_NO_ENGINE
char *engine;
-# endif
apps_startup();
if (!load_config(bio_err, NULL))
goto end;
-# ifndef OPENSSL_NO_ENGINE
engine = NULL;
-# endif
infile = NULL;
outfile = NULL;
informat = FORMAT_PEM;
ERR_load_crypto_strings();
-# ifndef OPENSSL_NO_ENGINE
setup_engine(bio_err, engine, 0);
-# endif
in = BIO_new(BIO_s_file());
out = BIO_new(BIO_s_file());
int informat, outformat, check = 0, noout = 0, C = 0, ret = 1;
char *infile, *outfile, *prog;
char *inrand = NULL;
-# ifndef OPENSSL_NO_ENGINE
char *engine = NULL;
ENGINE *e = NULL;
-# endif
int num = 0, g = 0;
apps_startup();
ERR_load_crypto_strings();
-# ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-# endif
if (g && !num)
num = DEFBITS;
BIO_free_all(out);
if (dh != NULL)
DH_free(dh);
-# ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-# endif
+ release_engine(e);
apps_shutdown();
OPENSSL_EXIT(ret);
}
int informat, outformat, text = 0, noout = 0;
int pubin = 0, pubout = 0;
char *infile, *outfile, *prog;
-# ifndef OPENSSL_NO_ENGINE
char *engine;
-# endif
char *passargin = NULL, *passargout = NULL;
char *passin = NULL, *passout = NULL;
int modulus = 0;
if (!load_config(bio_err, NULL))
goto end;
-# ifndef OPENSSL_NO_ENGINE
engine = NULL;
-# endif
infile = NULL;
outfile = NULL;
informat = FORMAT_PEM;
ERR_load_crypto_strings();
-# ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-# endif
if (!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
BIO_printf(bio_err, "Error getting passwords\n");
BIO_free_all(out);
if (dsa != NULL)
DSA_free(dsa);
-# ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-# endif
+ release_engine(e);
if (passin)
OPENSSL_free(passin);
if (passout)
char *infile, *outfile, *prog, *inrand = NULL;
int numbits = -1, num, genkey = 0;
int need_rand = 0;
-# ifndef OPENSSL_NO_ENGINE
char *engine = NULL;
ENGINE *e = NULL;
-# endif
# ifdef GENCB_TEST
int timebomb = 0;
# endif
}
}
-# ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-# endif
if (need_rand) {
app_RAND_load_file(NULL, bio_err, (inrand != NULL));
BIO_free_all(out);
if (dsa != NULL)
DSA_free(dsa);
-#ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-#endif
+ release_engine(e);
apps_shutdown();
OPENSSL_EXIT(ret);
}
int informat, outformat, text = 0, noout = 0;
int pubin = 0, pubout = 0, param_out = 0;
char *infile, *outfile, *prog, *engine;
-# ifndef OPENSSL_NO_ENGINE
ENGINE *e = NULL;
-# endif
char *passargin = NULL, *passargout = NULL;
char *passin = NULL, *passout = NULL;
point_conversion_form_t form = POINT_CONVERSION_UNCOMPRESSED;
ERR_load_crypto_strings();
-# ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-# endif
if (!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
BIO_printf(bio_err, "Error getting passwords\n");
BIO_free_all(out);
if (eckey)
EC_KEY_free(eckey);
-# ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-# endif
+ release_engine(e);
if (passin)
OPENSSL_free(passin);
if (passout)
BIO *in = NULL, *out = NULL;
int informat, outformat, noout = 0, C = 0, ret = 1;
char *engine = NULL;
-# ifndef OPENSSL_NO_ENGINE
ENGINE *e = NULL;
-# endif
BIGNUM *ec_p = NULL, *ec_a = NULL, *ec_b = NULL,
*ec_gen = NULL, *ec_order = NULL, *ec_cofactor = NULL;
}
}
-# ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-# endif
if (list_curves) {
EC_builtin_curve *curves = NULL;
OPENSSL_free(buffer);
if (group != NULL)
EC_GROUP_free(group);
-# ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-# endif
+ release_engine(e);
if (in != NULL)
BIO_free(in);
if (out != NULL)
NULL, *wbio = NULL;
#define PROG_NAME_SIZE 39
char pname[PROG_NAME_SIZE + 1];
-#ifndef OPENSSL_NO_ENGINE
char *engine = NULL;
ENGINE *e = NULL;
-#endif
const EVP_MD *dgst = NULL;
int non_fips_allow = 0;
argv++;
}
-#ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-#endif
if (cipher && EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER) {
BIO_printf(bio_err,
if (bzl != NULL)
BIO_free(bzl);
#endif
-#ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-#endif
+ release_engine(e);
if (pass)
OPENSSL_free(pass);
apps_shutdown();
int g = 2;
char *outfile = NULL;
char *inrand = NULL;
-# ifndef OPENSSL_NO_ENGINE
char *engine = NULL;
-# endif
BIO *out = NULL;
apps_startup();
BIO_printf(bio_err, " the random number generator\n");
goto end;
}
-# ifndef OPENSSL_NO_ENGINE
setup_engine(bio_err, engine, 0);
-# endif
out = BIO_new(BIO_s_file());
if (out == NULL) {
char *passargout = NULL, *passout = NULL;
BIO *out = NULL, *in = NULL;
const EVP_CIPHER *enc = NULL;
-# ifndef OPENSSL_NO_ENGINE
char *engine = NULL;
ENGINE *e = NULL;
-# endif
apps_startup();
" - a DSA parameter file as generated by the dsaparam command\n");
goto end;
}
-# ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-# endif
if (!app_passwd(bio_err, NULL, passargout, NULL, &passout)) {
BIO_printf(bio_err, "Error getting password\n");
BIO_free_all(out);
if (dsa != NULL)
DSA_free(dsa);
-# ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-# endif
+ release_engine(e);
if (passout)
OPENSSL_free(passout);
apps_shutdown();
if (out)
BIO_free_all(out);
BIO_free(in);
-#ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-#endif
+ release_engine(e);
if (pass)
OPENSSL_free(pass);
return ret;
int MAIN(int argc, char **argv)
{
BN_GENCB cb;
-# ifndef OPENSSL_NO_ENGINE
ENGINE *e = NULL;
-# endif
int ret = 1;
int i, num = DEFBITS;
long l;
unsigned long f4 = RSA_F4;
char *outfile = NULL;
char *passargout = NULL, *passout = NULL;
-# ifndef OPENSSL_NO_ENGINE
char *engine = NULL;
-# endif
char *inrand = NULL;
BIO *out = NULL;
BIGNUM *bn = BN_new();
BIO_printf(bio_err, "Error getting password\n");
goto err;
}
-# ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-# endif
if (outfile == NULL) {
BIO_set_fp(out, stdout, BIO_NOCLOSE);
RSA_free(rsa);
if (out)
BIO_free_all(out);
-# ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-# endif
+ release_engine(e);
if (passout)
OPENSSL_free(passout);
if (ret != 0)
char *inrand = NULL;
char *macalg = NULL;
char *CApath = NULL, *CAfile = NULL;
-# ifndef OPENSSL_NO_ENGINE
char *engine = NULL;
-# endif
apps_startup();
"-LMK Add local machine keyset attribute to private key\n");
goto end;
}
-# ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-# endif
if (passarg) {
if (export_cert)
# ifdef CRYPTO_MDEBUG
CRYPTO_remove_all_info();
# endif
-# ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-# endif
+ release_engine(e);
BIO_free(in);
BIO_free_all(out);
if (canames)
char *infile, *outfile, *prog;
int print_certs = 0, text = 0, noout = 0, p7_print = 0;
int ret = 1;
-#ifndef OPENSSL_NO_ENGINE
char *engine = NULL;
ENGINE *e = NULL;
-#endif
apps_startup();
ERR_load_crypto_strings();
-#ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-#endif
in = BIO_new(BIO_s_file());
out = BIO_new(BIO_s_file());
end:
if (p7 != NULL)
PKCS7_free(p7);
-#ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-#endif
+ release_engine(e);
if (in != NULL)
BIO_free(in);
if (out != NULL)
char pass[50], *passin = NULL, *passout = NULL, *p8pass = NULL;
int badarg = 0;
int ret = 1;
-#ifndef OPENSSL_NO_ENGINE
char *engine = NULL;
-#endif
if (bio_err == NULL)
bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);
#endif
goto end;
}
-#ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-#endif
if (!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
BIO_printf(bio_err, "Error getting passwords\n");
X509_SIG_free(p8);
PKCS8_PRIV_KEY_INFO_free(p8inf);
EVP_PKEY_free(pkey);
-#ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-#endif
+ release_engine(e);
BIO_free_all(out);
BIO_free(in);
if (passin)
EVP_PKEY *pkey = NULL;
char *passin = NULL, *passout = NULL;
int badarg = 0;
-#ifndef OPENSSL_NO_ENGINE
char *engine = NULL;
-#endif
int ret = 1;
if (bio_err == NULL)
#endif
return 1;
}
-#ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-#endif
if (!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
BIO_printf(bio_err, "Error getting passwords\n");
end:
EVP_PKEY_free(pkey);
-#ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-#endif
+ release_engine(e);
BIO_free_all(out);
BIO_free(in);
if (passin)
int text = 0, noout = 0;
EVP_PKEY *pkey = NULL;
int badarg = 0;
-#ifndef OPENSSL_NO_ENGINE
char *engine = NULL;
ENGINE *e = NULL;
-#endif
int ret = 1;
if (bio_err == NULL)
#endif
return 1;
}
-#ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-#endif
if (infile) {
if (!(in = BIO_new_file(infile, "r"))) {
end:
EVP_PKEY_free(pkey);
-#ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-#endif
+ release_engine(e);
BIO_free_all(out);
BIO_free(in);
end:
if (ctx)
EVP_PKEY_CTX_free(ctx);
-#ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-#endif
+ release_engine(e);
BIO_free(in);
BIO_free_all(out);
if (buf_in != NULL)
int hex = 0;
BIO *out = NULL;
int num = -1;
-#ifndef OPENSSL_NO_ENGINE
ENGINE *e = NULL;
char *engine = NULL;
-#endif
apps_startup();
BIO_printf(bio_err, "-hex - hex encode output\n");
goto err;
}
-#ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-#endif
app_RAND_load_file(NULL, bio_err, (inrand != NULL));
if (inrand != NULL)
err:
ERR_print_errors(bio_err);
-#ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-#endif
+ release_engine(e);
if (out)
BIO_free_all(out);
apps_shutdown();
int nodes = 0, kludge = 0, newhdr = 0, subject = 0, pubkey = 0;
char *infile, *outfile, *prog, *keyfile = NULL, *template =
NULL, *keyout = NULL;
-#ifndef OPENSSL_NO_ENGINE
char *engine = NULL;
-#endif
char *extensions = NULL;
char *req_exts = NULL;
const EVP_CIPHER *cipher = NULL;
if ((in == NULL) || (out == NULL))
goto end;
-#ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-#endif
if (keyfile != NULL) {
pkey = load_key(bio_err, keyfile, keyform, 0, passin, e,
X509_REQ_free(req);
X509_free(x509ss);
ASN1_INTEGER_free(serial);
-#ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-#endif
+ release_engine(e);
if (passargin && passin)
OPENSSL_free(passin);
if (passargout && passout)
char *infile, *outfile, *prog;
char *passargin = NULL, *passargout = NULL;
char *passin = NULL, *passout = NULL;
-# ifndef OPENSSL_NO_ENGINE
char *engine = NULL;
-# endif
int modulus = 0;
int pvk_encr = 2;
ERR_load_crypto_strings();
-# ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-# endif
if (!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
BIO_printf(bio_err, "Error getting passwords\n");
} else
ret = 0;
end:
-# ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-# endif
+ release_engine(e);
if (out != NULL)
BIO_free_all(out);
if (rsa != NULL)
ENGINE *e = NULL;
BIO *in = NULL, *out = NULL;
char *infile = NULL, *outfile = NULL;
-# ifndef OPENSSL_NO_ENGINE
char *engine = NULL;
-# endif
char *keyfile = NULL;
char rsa_mode = RSA_VERIFY, key_type = KEY_PRIVKEY;
int keyform = FORMAT_PEM;
BIO_printf(bio_err, "A private key is needed for this operation\n");
goto end;
}
-# ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-# endif
if (!app_passwd(bio_err, passargin, NULL, &passin, NULL)) {
BIO_printf(bio_err, "Error getting password\n");
goto end;
BIO_write(out, rsa_out, rsa_outlen);
end:
RSA_free(rsa);
-# ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-# endif
+ release_engine(e);
BIO_free(in);
BIO_free_all(out);
if (rsa_in)
char *inrand = NULL;
int mbuf_len = 0;
struct timeval timeout, *timeoutp;
-#ifndef OPENSSL_NO_ENGINE
char *engine_id = NULL;
+ ENGINE *e = NULL;
+#ifndef OPENSSL_NO_ENGINE
char *ssl_client_engine_id = NULL;
ENGINE *ssl_client_engine = NULL;
#endif
- ENGINE *e = NULL;
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_NETWARE) || defined(OPENSSL_SYS_BEOS_R5)
struct timeval tv;
# if defined(OPENSSL_SYS_BEOS_R5)
next_proto.data = NULL;
#endif
-#ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine_id, 1);
+#ifndef OPENSSL_NO_ENGINE
if (ssl_client_engine_id) {
ssl_client_engine = ENGINE_by_id(ssl_client_engine_id);
if (!ssl_client_engine) {
OPENSSL_cleanse(mbuf, BUFSIZZ);
OPENSSL_free(mbuf);
}
-#ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-#endif
+ release_engine(e);
if (bio_c_out != NULL) {
BIO_free(bio_c_out);
bio_c_out = NULL;
static int keymatexportlen = 20;
static int hack = 0;
-#ifndef OPENSSL_NO_ENGINE
static char *engine_id = NULL;
-#endif
static const char *session_id_prefix = NULL;
static int enable_timeouts = 0;
s_quiet = 0;
s_brief = 0;
hack = 0;
-# ifndef OPENSSL_NO_ENGINE
engine_id = NULL;
-# endif
}
#endif
SSL_load_error_strings();
OpenSSL_add_ssl_algorithms();
-#ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine_id, 1);
-#endif
if (!app_passwd(bio_err, passarg, dpassarg, &pass, &dpass)) {
BIO_printf(bio_err, "Error getting password\n");
if (jpake_secret && psk_key)
OPENSSL_free(psk_key);
#endif
-#ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-#endif
+ release_engine(e);
if (bio_s_out != NULL) {
BIO_free(bio_s_out);
bio_s_out = NULL;
const EVP_MD *sign_md = NULL;
int informat = FORMAT_SMIME, outformat = FORMAT_SMIME;
int keyform = FORMAT_PEM;
-#ifndef OPENSSL_NO_ENGINE
char *engine = NULL;
-#endif
X509_VERIFY_PARAM *vpm = NULL;
"cert.pem recipient certificate(s) for encryption\n");
goto end;
}
-#ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-#endif
if (!app_passwd(bio_err, passargin, NULL, &passin, NULL)) {
BIO_printf(bio_err, "Error getting password\n");
X509_free(signer);
EVP_PKEY_free(key);
PKCS7_free(p7);
-#ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-#endif
+ release_engine(e);
BIO_free(in);
BIO_free(indata);
BIO_free_all(out);
int MAIN(int argc, char **argv)
{
-# ifndef OPENSSL_NO_ENGINE
ENGINE *e = NULL;
-#endif
unsigned char *buf = NULL, *buf2 = NULL;
int mret = 1;
long count = 0, save_count = 0;
}
# endif
-#ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-#endif
+ release_engine(e);
apps_shutdown();
OPENSSL_EXIT(mret);
}
CONF *conf = NULL;
NETSCAPE_SPKI *spki = NULL;
EVP_PKEY *pkey = NULL;
-#ifndef OPENSSL_NO_ENGINE
char *engine = NULL;
-#endif
apps_startup();
BIO_printf(bio_err, "Error getting password\n");
goto end;
}
-#ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-#endif
if (keyfile) {
pkey = load_key(bio_err,
BIO_free(in);
BIO_free_all(out);
EVP_PKEY_free(pkey);
-#ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-#endif
+ release_engine(e);
if (passin)
OPENSSL_free(passin);
apps_shutdown();
int i;
long errorline = -1;
char *randfile = NULL;
-# ifndef OPENSSL_NO_ENGINE
ENGINE *e = NULL;
char *engine = NULL;
-# endif
char *tofree = NULL;
DB_ATTR db_attr;
ERR_load_crypto_strings();
-# ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-# endif
if (!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
BIO_printf(bio_err, "Error getting passwords\n");
if (db)
free_index(db);
-#ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-#endif
+ release_engine(e);
OBJ_cleanup();
apps_shutdown();
OPENSSL_EXIT(ret);
X509_LOOKUP *lookup = NULL;
X509_VERIFY_PARAM *vpm = NULL;
int crl_download = 0;
-#ifndef OPENSSL_NO_ENGINE
char *engine = NULL;
-#endif
cert_ctx = X509_STORE_new();
if (cert_ctx == NULL)
break;
}
-#ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-#endif
if (vpm)
X509_STORE_set1_param(cert_ctx, vpm);
sk_X509_pop_free(untrusted, X509_free);
sk_X509_pop_free(trusted, X509_free);
sk_X509_CRL_pop_free(crls, X509_CRL_free);
-#ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-#endif
+ release_engine(e);
apps_shutdown();
OPENSSL_EXIT(ret < 0 ? 2 : ret);
}
char *checkhost = NULL;
char *checkemail = NULL;
char *checkip = NULL;
-#ifndef OPENSSL_NO_ENGINE
char *engine = NULL;
-#endif
reqfile = 0;
BIO_printf(bio_err, "%s", *pp);
goto end;
}
-#ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-#endif
if (need_rand)
app_RAND_load_file(NULL, bio_err, 0);
ASN1_INTEGER_free(sno);
sk_ASN1_OBJECT_pop_free(trust, ASN1_OBJECT_free);
sk_ASN1_OBJECT_pop_free(reject, ASN1_OBJECT_free);
-#ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-#endif
+ release_engine(e);
if (passin)
OPENSSL_free(passin);
apps_shutdown();