Stop spurious "unable to load config info" errors in req
[openssl.git] / apps / rsautl.c
index 86aa95d38a6b26456bf0e888a6c4a550d57abc6d..c04a2fcb9b861614fde98157f9ded560d9f8581c 100644 (file)
@@ -62,7 +62,6 @@
 #include <string.h>
 #include <openssl/err.h>
 #include <openssl/pem.h>
-#include <openssl/engine.h>
 
 #define RSA_SIGN       1
 #define RSA_VERIFY     2
@@ -157,23 +156,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);
 
 /* FIXME: seed PRNG only if needed */
        app_RAND_load_file(NULL, bio_err, 0);