X-Git-Url: http://the.earth.li/gitweb/?a=blobdiff_plain;f=sigcheck.c;h=902c9a1e9ce078df9cdaa03e58644906531a5b9a;hb=f8e9e43f90418ec6c8b5768a7981cbdabb64b198;hp=a0f4feb2d6bada946f8eaf2f73088e64d997f8e6;hpb=a8eae82dbcc70ecb4380cf6393c6b594b9abe995;p=onak.git diff --git a/sigcheck.c b/sigcheck.c index a0f4feb..902c9a1 100644 --- a/sigcheck.c +++ b/sigcheck.c @@ -20,6 +20,7 @@ #include #include "config.h" +#include "keyid.h" #include "keystructs.h" #include "log.h" #include "openpgp.h" @@ -65,6 +66,7 @@ int check_packet_sighash(struct openpgp_publickey *key, uint8_t *hashdata[8]; size_t hashlen[8]; int chunks, i; + uint64_t keyid; keyheader[0] = 0x99; keyheader[1] = key->publickey->length >> 8; @@ -149,8 +151,10 @@ int check_packet_sighash(struct openpgp_publickey *key, sighash = &sig->data[siglen + unhashedlen + 2]; break; default: - logthing(LOGTHING_ERROR, "Unknown signature version %d", - sig->data[0]); + get_keyid(key, &keyid); + logthing(LOGTHING_ERROR, + "Unknown signature version %d on 0x%016" PRIX64, + sig->data[0], keyid); return -1; } @@ -178,6 +182,7 @@ int check_packet_sighash(struct openpgp_publickey *key, } ripemd160_digest(&ripemd160_context, RIPEMD160_DIGEST_SIZE, hash); + break; #else logthing(LOGTHING_INFO, "RIPEMD160 support not available."); return -1; @@ -235,8 +240,11 @@ int check_packet_sighash(struct openpgp_publickey *key, return -1; #endif default: - logthing(LOGTHING_ERROR, "Unsupported signature hash type %d", - hashtype); + get_keyid(key, &keyid); + logthing(LOGTHING_ERROR, + "Unsupported signature hash type %d on 0x%016" PRIX64, + hashtype, + keyid); return -1; }