src/random.c
/* Attempt to hook up the hardware random number
 * generator, if it's available. */
Attempt to hook up the hardware random number
generator, if it's available.
Attempt to hook up the hardware random number generator if it ' s available .
static void load_hardware_engine () {
  if (rand_loaded)
    return;
  OPENSSL_cpuid_setup ();
  ENGINE_load_rdrand ();
  reng = ENGINE_by_id ("rdrand");
  ERR_get_error ();
  if (!reng)
    return;
  int rc = ENGINE_set_default (reng, ENGINE_METHOD_RAND);
  ERR_get_error ();
  if (!rc) {
    unload_hardware_engine ();
  }
  rand_loaded = 1;
}
static void load_hardware_engine ( ) { if ( rand_loaded ) return ; OPENSSL_cpuid_setup ( ) ; ENGINE_load_rdrand ( ) ; reng = ENGINE_by_id ( " " ) ; ERR_get_error ( ) ; if ( ! reng ) return ; int rc = ENGINE_set_default ( reng , ENGINE_METHOD_RAND ) ; ERR_get_error ( ) ; if ( ! rc ) { unload_hardware_engine ( ) ; } rand_loaded = 1 ; }
Attempt to hook up the hardware random number
 generator, if it's available.
Attempt to hook up the hardware random number generator if it ' s available .