X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/blobdiff_plain/4b8483ae278577a3adc8d84da81d77019704466f..e01d2e2d07392eb03e4268fdc4f0f1339a9a9461:/keyid.c?ds=sidebyside 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;