Loading apps/apps.c +29 −0 Original line number Diff line number Diff line Loading @@ -1037,3 +1037,32 @@ X509_STORE *setup_verify(BIO *bp, char *CAfile, char *CApath) X509_STORE_free(store); return NULL; } ENGINE *setup_engine(BIO *err, const char *engine, int debug) { ENGINE *e = NULL; if (engine) { if((e = ENGINE_by_id(engine)) == NULL) { BIO_printf(err,"invalid engine \"%s\"\n", engine); return NULL; } if (debug) { ENGINE_ctrl(e, ENGINE_CTRL_SET_LOGSTREAM, 0, err, 0); } ENGINE_ctrl_cmd(e, "SET_USER_INTERFACE", 0, UI_OpenSSL(), 0, 1); if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) { BIO_printf(err,"can't use that engine\n"); return NULL; } BIO_printf(err,"engine \"%s\" set.\n", engine); /* Free our "structural" reference. */ ENGINE_free(e); } return e; } apps/apps.h +1 −0 Original line number Diff line number Diff line Loading @@ -176,6 +176,7 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, STACK_OF(X509) *load_certs(BIO *err, const char *file, int format, const char *pass, ENGINE *e, const char *cert_descrip); X509_STORE *setup_verify(BIO *bp, char *CAfile, char *CApath); ENGINE *setup_engine(BIO *err, const char *engine, int debug); #define FORMAT_UNDEF 0 #define FORMAT_ASN1 1 Loading apps/ca.c +1 −17 Original line number Diff line number Diff line Loading @@ -549,23 +549,7 @@ bad: ERR_load_crypto_strings(); if (engine != NULL) { if ((e = ENGINE_by_id(engine)) == NULL) { BIO_printf(bio_err,"invalid engine \"%s\"\n", engine); goto err; } if (!ENGINE_set_default(e, ENGINE_METHOD_ALL)) { BIO_printf(bio_err,"can't use that engine\n"); goto err; } BIO_printf(bio_err,"engine \"%s\" set.\n", engine); /* Free our "structural" reference. */ ENGINE_free(e); } e = setup_engine(bio_err, engine, 0); /*****************************************************************/ if (configfile == NULL) configfile = getenv("OPENSSL_CONF"); Loading apps/dgst.c +1 −17 Original line number Diff line number Diff line Loading @@ -225,23 +225,7 @@ int MAIN(int argc, char **argv) goto end; } if (engine != NULL) { if((e = ENGINE_by_id(engine)) == NULL) { BIO_printf(bio_err,"invalid engine \"%s\"\n", engine); goto end; } if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) { BIO_printf(bio_err,"can't use that engine\n"); goto end; } BIO_printf(bio_err,"engine \"%s\" set.\n", engine); /* Free our "structural" reference. */ ENGINE_free(e); } e = setup_engine(bio_err, engine, 0); in=BIO_new(BIO_s_file()); bmd=BIO_new(BIO_f_md()); Loading apps/dh.c +1 −17 Original line number Diff line number Diff line Loading @@ -174,23 +174,7 @@ bad: ERR_load_crypto_strings(); if (engine != NULL) { if((e = ENGINE_by_id(engine)) == NULL) { BIO_printf(bio_err,"invalid engine \"%s\"\n", engine); goto end; } if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) { BIO_printf(bio_err,"can't use that engine\n"); goto end; } BIO_printf(bio_err,"engine \"%s\" set.\n", engine); /* Free our "structural" reference. */ ENGINE_free(e); } e = setup_engine(bio_err, engine, 0); in=BIO_new(BIO_s_file()); out=BIO_new(BIO_s_file()); Loading Loading
apps/apps.c +29 −0 Original line number Diff line number Diff line Loading @@ -1037,3 +1037,32 @@ X509_STORE *setup_verify(BIO *bp, char *CAfile, char *CApath) X509_STORE_free(store); return NULL; } ENGINE *setup_engine(BIO *err, const char *engine, int debug) { ENGINE *e = NULL; if (engine) { if((e = ENGINE_by_id(engine)) == NULL) { BIO_printf(err,"invalid engine \"%s\"\n", engine); return NULL; } if (debug) { ENGINE_ctrl(e, ENGINE_CTRL_SET_LOGSTREAM, 0, err, 0); } ENGINE_ctrl_cmd(e, "SET_USER_INTERFACE", 0, UI_OpenSSL(), 0, 1); if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) { BIO_printf(err,"can't use that engine\n"); return NULL; } BIO_printf(err,"engine \"%s\" set.\n", engine); /* Free our "structural" reference. */ ENGINE_free(e); } return e; }
apps/apps.h +1 −0 Original line number Diff line number Diff line Loading @@ -176,6 +176,7 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, STACK_OF(X509) *load_certs(BIO *err, const char *file, int format, const char *pass, ENGINE *e, const char *cert_descrip); X509_STORE *setup_verify(BIO *bp, char *CAfile, char *CApath); ENGINE *setup_engine(BIO *err, const char *engine, int debug); #define FORMAT_UNDEF 0 #define FORMAT_ASN1 1 Loading
apps/ca.c +1 −17 Original line number Diff line number Diff line Loading @@ -549,23 +549,7 @@ bad: ERR_load_crypto_strings(); if (engine != NULL) { if ((e = ENGINE_by_id(engine)) == NULL) { BIO_printf(bio_err,"invalid engine \"%s\"\n", engine); goto err; } if (!ENGINE_set_default(e, ENGINE_METHOD_ALL)) { BIO_printf(bio_err,"can't use that engine\n"); goto err; } BIO_printf(bio_err,"engine \"%s\" set.\n", engine); /* Free our "structural" reference. */ ENGINE_free(e); } e = setup_engine(bio_err, engine, 0); /*****************************************************************/ if (configfile == NULL) configfile = getenv("OPENSSL_CONF"); Loading
apps/dgst.c +1 −17 Original line number Diff line number Diff line Loading @@ -225,23 +225,7 @@ int MAIN(int argc, char **argv) goto end; } if (engine != NULL) { if((e = ENGINE_by_id(engine)) == NULL) { BIO_printf(bio_err,"invalid engine \"%s\"\n", engine); goto end; } if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) { BIO_printf(bio_err,"can't use that engine\n"); goto end; } BIO_printf(bio_err,"engine \"%s\" set.\n", engine); /* Free our "structural" reference. */ ENGINE_free(e); } e = setup_engine(bio_err, engine, 0); in=BIO_new(BIO_s_file()); bmd=BIO_new(BIO_f_md()); Loading
apps/dh.c +1 −17 Original line number Diff line number Diff line Loading @@ -174,23 +174,7 @@ bad: ERR_load_crypto_strings(); if (engine != NULL) { if((e = ENGINE_by_id(engine)) == NULL) { BIO_printf(bio_err,"invalid engine \"%s\"\n", engine); goto end; } if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) { BIO_printf(bio_err,"can't use that engine\n"); goto end; } BIO_printf(bio_err,"engine \"%s\" set.\n", engine); /* Free our "structural" reference. */ ENGINE_free(e); } e = setup_engine(bio_err, engine, 0); in=BIO_new(BIO_s_file()); out=BIO_new(BIO_s_file()); Loading