aboutsummaryrefslogtreecommitdiffstats
path: root/g10/getkey.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g10/getkey.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/g10/getkey.c b/g10/getkey.c
index 477ba9e34..72b80ba76 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -1055,11 +1055,7 @@ get_seckey_byname2( GETKEY_CTX *retctx,
ctx.items[0].mode = KEYDB_SEARCH_MODE_FIRST;
rc = lookup( &ctx, &kb, 1 );
if (!rc && sk )
- {
- sk_from_block ( &ctx, sk, kb );
- if(sk->pubkey_algo==PUBKEY_ALGO_ELGAMAL)
- rc=G10ERR_UNU_SECKEY;
- }
+ sk_from_block ( &ctx, sk, kb );
release_kbnode ( kb );
get_seckey_end( &ctx );
}
@@ -1681,11 +1677,6 @@ merge_selfsigs_main( KBNODE keyblock, int *r_revoked )
if ( x ) /* mask it down to the actual allowed usage */
key_usage &= x;
}
-
- /* Type 20 Elgamal keys are not usable. */
- if(pk->pubkey_algo==PUBKEY_ALGO_ELGAMAL)
- key_usage=0;
-
pk->pubkey_usage = key_usage;
if ( !key_expire_seen ) {
@@ -1902,13 +1893,6 @@ merge_selfsigs_subkey( KBNODE keyblock, KBNODE subnode )
if ( x ) /* mask it down to the actual allowed usage */
key_usage &= x;
}
-
- /* Type 20 Elgamal subkeys or any subkey on a type 20 primary are
- not usable. */
- if(mainpk->pubkey_algo==PUBKEY_ALGO_ELGAMAL
- || subpk->pubkey_algo==PUBKEY_ALGO_ELGAMAL)
- key_usage=0;
-
subpk->pubkey_usage = key_usage;
p = parse_sig_subpkt (sig->hashed, SIGSUBPKT_KEY_EXPIRE, NULL);