X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=apps%2Frand.c;h=10adf0e95d81e3f3810987b9ee169afb145e5769;hp=8a216fbc75b2002fdf0b9195bf9003ff9ae88fa7;hb=531d630b5cfe0c50de122f0387a65473b4746bf8;hpb=853b1eb424bf60a8ddebdd01baa5af0cc6e204d4 diff --git a/apps/rand.c b/apps/rand.c index 8a216fbc75..10adf0e95d 100644 --- a/apps/rand.c +++ b/apps/rand.c @@ -101,23 +101,7 @@ int MAIN(int argc, char **argv) goto err; } - 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); app_RAND_load_file(NULL, bio_err, (inrand != NULL)); if (inrand != NULL)