comparison genrsa.c @ 689:c3de235d9506

/dev/random blocks on busy servers too.
author Matt Johnston <matt@ucc.asn.au>
date Thu, 19 Jul 2012 21:34:27 +0800
parents 167fdc091c05
children d386defb5376
comparison
equal deleted inserted replaced
688:650c41a4909a 689:c3de235d9506
54 54
55 m_mp_init_multi(key->e, key->n, key->d, key->p, key->q, 55 m_mp_init_multi(key->e, key->n, key->d, key->p, key->q,
56 &pminus, &lcm, &qminus, NULL); 56 &pminus, &lcm, &qminus, NULL);
57 57
58 seedrandom(); 58 seedrandom();
59 seedstrongrandom();
60 59
61 if (mp_set_int(key->e, RSA_E) != MP_OKAY) { 60 if (mp_set_int(key->e, RSA_E) != MP_OKAY) {
62 fprintf(stderr, "RSA generation failed\n"); 61 fprintf(stderr, "RSA generation failed\n");
63 exit(1); 62 exit(1);
64 } 63 }