X-Git-Url: https://the.earth.li/gitweb/?p=onak.git;a=blobdiff_plain;f=cgi%2Fhashquery.c;fp=cgi%2Fhashquery.c;h=d750608b812342cc9160c70bc574ab73b42e0294;hp=7b8c6c4fa57360cee56e2d5c8e2d6a4d59b7cb1d;hb=23538b7a1fe44e6e04e15d58b6fe809a6ad2ca31;hpb=79425efea806599b611de4e3b25bdc36516e7522 diff --git a/cgi/hashquery.c b/cgi/hashquery.c index 7b8c6c4..d750608 100644 --- a/cgi/hashquery.c +++ b/cgi/hashquery.c @@ -94,6 +94,10 @@ int main(__unused int argc, __unused char *argv[]) catchsignals(); dbctx = config.dbinit(config.backend, false); + if (dbctx == NULL) { + doerror("Failed to open key database."); + } + if (dbctx->fetch_key_skshash == NULL) { dbctx->cleanupdb(dbctx); doerror("Can't fetch by skshash with this backend.");