#include <openssl/objects.h>
#include <openssl/x509.h>
#include <openssl/pem.h>
-#include <openssl/engine.h>
#undef BUFSIZE
#define BUFSIZE 1024*8
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());
EVP_PKEY_free(sigkey);
if(sigbuf) OPENSSL_free(sigbuf);
if (bmd != NULL) BIO_free(bmd);
+ apps_shutdown();
EXIT(err);
}