close_backend();
}
+ if (!config.db_backend) {
+ logthing(LOGTHING_CRITICAL, "No database backend defined.");
+ exit(EXIT_FAILURE);
+ }
+
if (config.backends_dir == NULL) {
soname = malloc(strlen(config.db_backend)
- + strlen("/libkeydb_")
+ + strlen("./libkeydb_")
+ strlen(".so")
+ 1);
- sprintf(soname, "libkeydb_%s.so", config.db_backend);
+ sprintf(soname, "./libkeydb_%s.so", config.db_backend);
} else {
soname = malloc(strlen(config.db_backend)
+ strlen("/libkeydb_")
handle = dlopen(soname, RTLD_LAZY);
if (handle == NULL) {
- logthing(LOGTHING_ERROR,
+ logthing(LOGTHING_CRITICAL,
"Failed to open handle to library '%s': %s",
soname, dlerror());
free(soname);
soname = NULL;
- return false;
+ exit(EXIT_FAILURE);
}
free(soname);
soname = NULL;
sigs = keysigs(sigs, uids->sigs);
}
if (revoked != NULL) {
- *revoked = (publickey->revocations != NULL);
+ *revoked = publickey->revoked;
}
free_publickey(publickey);
}
*/
if (oldkey != NULL) {
merge_keys(oldkey, curkey);
- if (curkey->revocations == NULL &&
+ if (curkey->sigs == NULL &&
curkey->uids == NULL &&
curkey->subkeys == NULL) {
if (prev == NULL) {