#include <string.h>
#include <openssl/err.h>
#include <openssl/pem.h>
-#include <openssl/engine.h>
#define RSA_SIGN 1
#define RSA_VERIFY 2
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);
/* FIXME: seed PRNG only if needed */
app_RAND_load_file(NULL, bio_err, 0);