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/pubkey.c | |
parent | partly added creation of OP partial length headers (diff) | |
download | gnupg-a9ec668cbe5b3335f5db0f05b8e9e88e29ada52c.tar.gz gnupg-a9ec668cbe5b3335f5db0f05b8e9e88e29ada52c.zip |
intermediate release
Diffstat (limited to 'cipher/pubkey.c')
-rw-r--r-- | cipher/pubkey.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cipher/pubkey.c b/cipher/pubkey.c index f59996c4d..a78f788c0 100644 --- a/cipher/pubkey.c +++ b/cipher/pubkey.c @@ -282,9 +282,11 @@ check_pubkey_algo2( int algo, unsigned usage ) do { for(i=0; pubkey_table[i].name; i++ ) if( pubkey_table[i].algo == algo ) { - if( (usage & 1) && !(pubkey_table[i].usage & 1) ) + if( (usage & PUBKEY_USAGE_SIG) + && !(pubkey_table[i].usage & PUBKEY_USAGE_SIG) ) return G10ERR_WR_PUBKEY_ALGO; - if( (usage & 2) && !(pubkey_table[i].usage & 2) ) + if( (usage & PUBKEY_USAGE_ENC) + && !(pubkey_table[i].usage & PUBKEY_USAGE_ENC) ) return G10ERR_WR_PUBKEY_ALGO; return 0; /* okay */ } |