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.16 by root, Thu Jul 18 13:35:16 2013 UTC vs.
Revision 1.18 by root, Wed Jun 29 22:32:48 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;
284 BN_GENCB_set (&cb, indicator, 0); 286 BN_GENCB_set (&cb, indicator, 0);
287#else
288 BN_GENCB *cb = BN_GENCB_new ();
289 BN_GENCB_set (cb, indicator, 0);
290#endif
285 291
286 require (RSA_generate_key_ex (rsa, bits, e, &cb)); 292 require (RSA_generate_key_ex (rsa, bits, e, &cb));
287 293
288 fprintf (stderr, _("Done.\n")); 294 fprintf (stderr, _("Done.\n"));
289 295
349 printf ("cipher_nid=%d\n", EVP_CIPHER_nid (CIPHER ())); 355 printf ("cipher_nid=%d\n", EVP_CIPHER_nid (CIPHER ()));
350 printf ("mac_nid=%d\n", EVP_MD_type (MAC_DIGEST ())); 356 printf ("mac_nid=%d\n", EVP_MD_type (MAC_DIGEST ()));
351 printf ("auth_nid=%d\n", EVP_MD_type (AUTH_DIGEST ())); 357 printf ("auth_nid=%d\n", EVP_MD_type (AUTH_DIGEST ()));
352 printf ("sizeof_auth_data=%d\n", sizeof (auth_data)); 358 printf ("sizeof_auth_data=%d\n", sizeof (auth_data));
353 printf ("sizeof_rsa_data=%d\n", sizeof (rsa_data)); 359 printf ("sizeof_rsa_data=%d\n", sizeof (rsa_data));
354 printf ("sizeof_rsa_data_pad=%d\n", sizeof (((rsa_data *)0)->pad)); 360 printf ("sizeof_rsa_data_extra_auth=%d\n", sizeof (((rsa_data *)0)->extra_auth));
355 printf ("raw_overhead=%d\n", VPE_OVERHEAD); 361 printf ("raw_overhead=%d\n", VPE_OVERHEAD);
356 printf ("vpn_overhead=%d\n", VPE_OVERHEAD + 6 + 6); 362 printf ("vpn_overhead=%d\n", VPE_OVERHEAD + 6 + 6);
357 printf ("udp_overhead=%d\n", UDP_OVERHEAD + VPE_OVERHEAD + 6 + 6); 363 printf ("udp_overhead=%d\n", UDP_OVERHEAD + VPE_OVERHEAD + 6 + 6);
358 exit (EXIT_SUCCESS); 364 exit (EXIT_SUCCESS);
359 } 365 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines