mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
2.4 KiB

  1. diff -pruN gnupg-1.2.3_orig/g10/getkey.c gnupg-1.2.3/g10/getkey.c
  2. --- gnupg-1.2.3_orig/g10/getkey.c 2003-11-27 14:27:05.000000000 +0100
  3. +++ gnupg-1.2.3/g10/getkey.c 2003-11-27 14:27:10.000000000 +0100
  4. @@ -1655,6 +1655,11 @@ merge_selfsigs_main( KBNODE keyblock, in
  5. if ( x ) /* mask it down to the actual allowed usage */
  6. key_usage &= x;
  7. }
  8. +
  9. + /* Type 20 Elgamal keys are not usable. */
  10. + if(pk->pubkey_algo==PUBKEY_ALGO_ELGAMAL)
  11. + key_usage=0;
  12. +
  13. pk->pubkey_usage = key_usage;
  14. if ( !key_expire_seen ) {
  15. @@ -1869,6 +1874,13 @@ merge_selfsigs_subkey( KBNODE keyblock,
  16. if ( x ) /* mask it down to the actual allowed usage */
  17. key_usage &= x;
  18. }
  19. +
  20. + /* Type 20 Elgamal subkeys or any subkey on a type 20 primary are
  21. + not usable. */
  22. + if(mainpk->pubkey_algo==PUBKEY_ALGO_ELGAMAL
  23. + || subpk->pubkey_algo==PUBKEY_ALGO_ELGAMAL)
  24. + key_usage=0;
  25. +
  26. subpk->pubkey_usage = key_usage;
  27. p = parse_sig_subpkt (sig->hashed, SIGSUBPKT_KEY_EXPIRE, NULL);
  28. diff -pruN gnupg-1.2.3_orig/g10/keygen.c gnupg-1.2.3/g10/keygen.c
  29. --- gnupg-1.2.3_orig/g10/keygen.c 2003-11-27 14:27:05.000000000 +0100
  30. +++ gnupg-1.2.3/g10/keygen.c 2003-11-27 14:27:10.000000000 +0100
  31. @@ -958,8 +958,6 @@ ask_algo (int addmode, unsigned int *r_u
  32. tty_printf( _(" (%d) DSA (sign only)\n"), 2 );
  33. if( addmode )
  34. tty_printf( _(" (%d) ElGamal (encrypt only)\n"), 3 );
  35. - if (opt.expert)
  36. - tty_printf( _(" (%d) ElGamal (sign and encrypt)\n"), 4 );
  37. tty_printf( _(" (%d) RSA (sign only)\n"), 5 );
  38. if (addmode)
  39. tty_printf( _(" (%d) RSA (encrypt only)\n"), 6 );
  40. @@ -990,21 +988,6 @@ ask_algo (int addmode, unsigned int *r_u
  41. *r_usage = PUBKEY_USAGE_SIG;
  42. break;
  43. }
  44. - else if( algo == 4 && opt.expert)
  45. - {
  46. - tty_printf(_(
  47. -"The use of this algorithm is only supported by GnuPG. You will not be\n"
  48. -"able to use this key to communicate with PGP users. This algorithm is also\n"
  49. -"very slow, and may not be as secure as the other choices.\n"));
  50. -
  51. - if( cpr_get_answer_is_yes("keygen.algo.elg_se",
  52. - _("Create anyway? ")))
  53. - {
  54. - algo = PUBKEY_ALGO_ELGAMAL;
  55. - *r_usage = PUBKEY_USAGE_ENC | PUBKEY_USAGE_SIG;
  56. - break;
  57. - }
  58. - }
  59. else if( algo == 3 && addmode ) {
  60. algo = PUBKEY_ALGO_ELGAMAL_E;
  61. *r_usage = PUBKEY_USAGE_ENC;