RANDs ENGINE reference in ENGINE_cleanup().
#endif
!ENGINE_set_default_RAND(NULL) ||
!ENGINE_set_default_BN_mod_exp(NULL) ||
- !ENGINE_set_default_BN_mod_exp_crt(NULL))
+ !ENGINE_set_default_BN_mod_exp_crt(NULL) ||
+ !RAND_set_rand_method(NULL))
return 0;
return 1;
}
{
ENGINE *mtmp;
mtmp = rand_engine;
- if (!ENGINE_init(engine))
+ if (engine && !ENGINE_init(engine))
return 0;
rand_engine = engine;
/* SHOULD ERROR CHECK THIS!!! */
- ENGINE_finish(mtmp);
+ if(mtmp)
+ ENGINE_finish(mtmp);
return 1;
}
#endif