summaryrefslogtreecommitdiffstats
path: root/g10/sig-check.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-11-03 20:38:58 +0100
committerWerner Koch <wk@gnupg.org>1998-11-03 20:38:58 +0100
commitb9dd2ebb2c08b457735f8acf997ff54965db91de (patch)
tree7d2408445104fa5135bd63b7e7bfc98d5a66688f /g10/sig-check.c
parentsome random changes (diff)
downloadgnupg2-b9dd2ebb2c08b457735f8acf997ff54965db91de.tar.xz
gnupg2-b9dd2ebb2c08b457735f8acf997ff54965db91de.zip
(Does not compile yet)
Diffstat (limited to 'g10/sig-check.c')
-rw-r--r--g10/sig-check.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/g10/sig-check.c b/g10/sig-check.c
index fd476f767..da732c451 100644
--- a/g10/sig-check.c
+++ b/g10/sig-check.c
@@ -278,12 +278,27 @@ check_key_signature( KBNODE root, KBNODE node, int *is_selfsig )
rc = do_check( pk, sig, md );
md_close(md);
}
+ else if( sig->sig_class == 0x28 ) { /* subkey revocation */
+ KBNODE snode = find_prev_kbnode( root, node, PKT_PUBLIC_SUBKEY );
+
+ if( snode ) {
+ md = md_open( algo, 0 );
+ hash_public_key( md, pk );
+ hash_public_key( md, snode->pkt->pkt.public_key );
+ rc = do_check( pk, sig, md );
+ md_close(md);
+ }
+ else {
+ log_error("no subkey for subkey revocation packet\n");
+ rc = G10ERR_SIG_CLASS;
+ }
+ }
else if( sig->sig_class == 0x18 ) {
KBNODE snode = find_prev_kbnode( root, node, PKT_PUBLIC_SUBKEY );
if( snode ) {
- if( is_selfsig ) {
- u32 keyid[2];
+ if( is_selfsig ) { /* does this make sense????? */
+ u32 keyid[2]; /* it should always be a selfsig */
keyid_from_pk( pk, keyid );
if( keyid[0] == sig->keyid[0] && keyid[1] == sig->keyid[1] )