bool deadlock = false;
struct skshash hash;
- get_keyid(publickey, &keyid);
+ if (get_keyid(publickey, &keyid) != ONAK_E_OK) {
+ logthing(LOGTHING_ERROR, "Couldn't find key ID for key.");
+ return 0;
+ }
if (!intrans) {
db4_starttrans();
int fd = -1;
uint64_t keyid;
- get_keyid(publickey, &keyid);
+ if (get_keyid(publickey, &keyid) != ONAK_E_OK) {
+ logthing(LOGTHING_ERROR, "Couldn't find key ID for key.");
+ return 0;
+ }
snprintf(keyfile, 1023, "%s/0x%" PRIX64, config.db_dir,
keyid & 0xFFFFFFFF);
fd = open(keyfile, O_WRONLY | O_CREAT, 0664); // | O_EXLOCK);
uint32_t hashid;
int i = 0;
- get_keyid(publickey, &keyid);
+ if (get_keyid(publickey, &keyid) != ONAK_E_OK) {
+ logthing(LOGTHING_ERROR, "Couldn't find key ID for key.");
+ return 0;
+ }
if (!intrans)
fs_starttrans();
uint32_t cmd = KEYD_CMD_STORE;
uint64_t keyid;
- get_keyid(publickey, &keyid);
+ if (get_keyid(publickey, &keyid) != ONAK_E_OK) {
+ logthing(LOGTHING_ERROR, "Couldn't find key ID for key.");
+ return 0;
+ }
if (update) {
keyd_delete_key(keyid, false);
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.