diff options
author | Werner Koch <[email protected]> | 1998-07-06 10:23:57 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 1998-07-06 10:23:57 +0000 |
commit | a9ec668cbe5b3335f5db0f05b8e9e88e29ada52c (patch) | |
tree | e159c79b615fcdcb65f31ee5d1d0a2b1ba84e9aa /cipher/elgamal.c | |
parent | partly added creation of OP partial length headers (diff) | |
download | gnupg-a9ec668cbe5b3335f5db0f05b8e9e88e29ada52c.tar.gz gnupg-a9ec668cbe5b3335f5db0f05b8e9e88e29ada52c.zip |
intermediate release
Diffstat (limited to '')
-rw-r--r-- | cipher/elgamal.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/cipher/elgamal.c b/cipher/elgamal.c index bcaaa20ba..9b9981da1 100644 --- a/cipher/elgamal.c +++ b/cipher/elgamal.c @@ -510,8 +510,8 @@ elg_get_nbits( int algo, MPI *pkey ) * the ALGO is invalid. * Usage: Bit 0 set : allows signing * 1 set : allows encryption - * NOTE: This function allows signing also for ELG-E, chich is not - * okay but a bad hack to allow to work with olf gpg keys. The real check + * NOTE: This function allows signing also for ELG-E, which is not + * okay but a bad hack to allow to work with old gpg keys. The real check * is done in the gnupg ocde depending on the packet version. */ const char * @@ -524,8 +524,12 @@ elg_get_info( int algo, int *npkey, int *nskey, int *nenc, int *nsig, *nsig = 2; switch( algo ) { - case PUBKEY_ALGO_ELGAMAL: *usage = 2|1; return "ELG"; - case PUBKEY_ALGO_ELGAMAL_E: *usage = 2|1; return "ELG-E"; + case PUBKEY_ALGO_ELGAMAL: + *usage = PUBKEY_USAGE_SIG|PUBKEY_USAGE_ENC; + return "ELG"; + case PUBKEY_ALGO_ELGAMAL_E: + *usage = PUBKEY_USAGE_SIG|PUBKEY_USAGE_ENC; + return "ELG-E"; default: *usage = 0; return NULL; } } |