ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/gvpectrl.C
(Generate patch)

Comparing gvpe/src/gvpectrl.C (file contents):
Revision 1.17 by root, Fri Jul 19 18:18:28 2013 UTC vs.
Revision 1.20 by root, Wed Jun 29 22:37:50 2016 UTC

278 fprintf (stderr, _("generating %d bits key for %s:\n"), bits, node->nodename); 278 fprintf (stderr, _("generating %d bits key for %s:\n"), bits, node->nodename);
279 279
280 RSA *rsa = RSA_new (); 280 RSA *rsa = RSA_new ();
281 BIGNUM *e = BN_new (); 281 BIGNUM *e = BN_new ();
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
284#if OPENSSL_VERSION_NUMBER < 0x10100000
283 BN_GENCB cb; 285 BN_GENCB cb_100;
286 BN_GENCB *cb = &cb_100;
287#else
288 BN_GENCB *cb = BN_GENCB_new ();
289 require (cb);
290#endif
291
284 BN_GENCB_set (&cb, indicator, 0); 292 BN_GENCB_set (cb, indicator, 0);
285
286 require (RSA_generate_key_ex (rsa, bits, e, &cb)); 293 require (RSA_generate_key_ex (rsa, bits, e, cb));
287 294
288 fprintf (stderr, _("Done.\n")); 295 fprintf (stderr, _("Done.\n"));
289 296
290 fname = conf.config_filename ("pubkey/%s", 0); 297 fname = conf.config_filename ("pubkey/%s", 0);
291 pubf = fopen (fname, "wb"); 298 pubf = fopen (fname, "wb");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines