… | |
… | |
282 | BN_set_bit (e, 0); BN_set_bit (e, 16); // 0x10001, 65537 |
282 | BN_set_bit (e, 0); BN_set_bit (e, 16); // 0x10001, 65537 |
283 | |
283 | |
284 | #if OPENSSL_VERSION_NUMBER < 0x10100000 |
284 | #if OPENSSL_VERSION_NUMBER < 0x10100000 |
285 | BN_GENCB cb; |
285 | BN_GENCB cb; |
286 | BN_GENCB_set (&cb, indicator, 0); |
286 | BN_GENCB_set (&cb, indicator, 0); |
|
|
287 | require (RSA_generate_key_ex (rsa, bits, e, &cb)); |
287 | #else |
288 | #else |
288 | BN_GENCB *cb = BN_GENCB_new (); |
289 | BN_GENCB *cb = BN_GENCB_new (); |
289 | BN_GENCB_set (cb, indicator, 0); |
290 | BN_GENCB_set (cb, indicator, 0); |
|
|
291 | require (RSA_generate_key_ex (rsa, bits, e, cb)); |
290 | #endif |
292 | #endif |
291 | |
|
|
292 | require (RSA_generate_key_ex (rsa, bits, e, &cb)); |
|
|
293 | |
293 | |
294 | fprintf (stderr, _("Done.\n")); |
294 | fprintf (stderr, _("Done.\n")); |
295 | |
295 | |
296 | fname = conf.config_filename ("pubkey/%s", 0); |
296 | fname = conf.config_filename ("pubkey/%s", 0); |
297 | pubf = fopen (fname, "wb"); |
297 | pubf = fopen (fname, "wb"); |