X-Git-Url: http://the.earth.li/gitweb/?a=blobdiff_plain;f=keydb_fs.c;h=b7117bebab4ffeda8f4bf36a2b650eb3c600a256;hb=0f0f62d3505e60cac5fd35ebcdea525d9d79a3e1;hp=ea09c7c0dae882e0684f3174c35397e26fccadaa;hpb=5e1b22d763640c4d7a09d07920403d8d491b4410;p=onak.git diff --git a/keydb_fs.c b/keydb_fs.c index ea09c7c..b7117be 100644 --- a/keydb_fs.c +++ b/keydb_fs.c @@ -329,13 +329,17 @@ static int fs_store_key(struct openpgp_publickey *publickey, bool intrans, struct openpgp_packet_list *packets = NULL; struct openpgp_packet_list *list_end = NULL; struct openpgp_publickey *next = NULL; - uint64_t keyid = get_keyid(publickey); + uint64_t keyid; struct ll *wordlist = NULL, *wl = NULL; struct skshash hash; uint64_t *subkeyids = NULL; uint32_t hashid; int i = 0; + if (get_keyid(publickey, &keyid) != ONAK_E_OK) { + logthing(LOGTHING_ERROR, "Couldn't find key ID for key."); + return 0; + } if (!intrans) fs_starttrans();