X-Git-Url: http://the.earth.li/gitweb/?a=blobdiff_plain;f=keydb_pg.c;h=480f1f1d34541831c6e3fd414785867d0a2c3ed1;hb=5d7fe5f83aafcf787f426cff450412d668d1128d;hp=1ec0a1a570e16fb0c71397a7055b2207dc213944;hpb=95a2f93d4800b7e4da4e63e1bb6dd5de2a7dea09;p=onak.git diff --git a/keydb_pg.c b/keydb_pg.c index 1ec0a1a..480f1f1 100644 --- a/keydb_pg.c +++ b/keydb_pg.c @@ -376,7 +376,10 @@ static int pg_store_key(struct openpgp_publickey *publickey, bool intrans, PQclear(result); } - get_keyid(publickey, &keyid); + if (get_keyid(publickey, &keyid) != ONAK_E_OK) { + logthing(LOGTHING_ERROR, "Couldn't find key ID for key."); + return 0; + } /* * Delete the key if we already have it.