X-Git-Url: http://the.earth.li/gitweb/?a=blobdiff_plain;f=sigcheck.c;h=2f165bce0dd1e711bff108089ecc70781ca33595;hb=8574412dcf649de37289721ec216215a79fbcd14;hp=a0f4feb2d6bada946f8eaf2f73088e64d997f8e6;hpb=25515318015210c5f201950031bc0269f945f48a;p=onak.git diff --git a/sigcheck.c b/sigcheck.c index a0f4feb..2f165bc 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; } @@ -235,8 +239,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; }