X-Git-Url: https://the.earth.li/gitweb/?a=blobdiff_plain;f=keyid.c;h=65a036328295328b1cc2b984b6e44011d6423728;hb=d55ec9e986e5c0c7345ae0e6a1449c4292291b32;hp=5252e81c4db7ca8d89f6b4e2e153ffa98f2f4e44;hpb=4b8483ae278577a3adc8d84da81d77019704466f;p=onak.git diff --git a/keyid.c b/keyid.c index 5252e81..65a0363 100644 --- a/keyid.c +++ b/keyid.c @@ -26,6 +26,8 @@ uint64_t get_keyid(struct openpgp_publickey *publickey) unsigned char c; unsigned char *buff = NULL; + assert(publickey != NULL); + switch (publickey->publickey->data[0]) { case 2: case 3: @@ -81,7 +83,8 @@ uint64_t get_keyid(struct openpgp_publickey *publickey) break; default: - printf("Unknown key type: %d\n", publickey->publickey->data[0]); + fprintf(stderr, "Unknown key type: %d\n", + publickey->publickey->data[0]); } return keyid;