Document recent changes.
[openssl.git] / apps / gendsa.c
index f7c5f4791a0891e5d52c6146c30b8c398b49420d..57ef0da46d99e96dc617538aee588d5b14efec21 100644 (file)
@@ -85,7 +85,7 @@ int MAIN(int argc, char **argv)
        char *inrand=NULL,*dsaparams=NULL;
        char *passargout = NULL, *passout = NULL;
        BIO *out=NULL,*in=NULL;
-       EVP_CIPHER *enc=NULL;
+       const EVP_CIPHER *enc=NULL;
        char *engine=NULL;
 
        apps_startup();
@@ -162,23 +162,7 @@ bad:
                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);
 
        if(!app_passwd(bio_err, NULL, passargout, NULL, &passout)) {
                BIO_printf(bio_err, "Error getting password\n");
@@ -207,7 +191,7 @@ bad:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                {
                BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                out = BIO_push(tmpbio, out);