log_msg(LLVL_FATAL,"Could not read key database file %s.",options.keydbfile);
success=false;
break;
}
log_msg(LLVL_DEBUG,"Successfully loaded key database file %s with %d entries and %d disk keys.",options.keydbfile,keydb.entrycnt,keydb_disk_key_count(&keydb));
#ifdef DEBUG
keydb_dump(&keydb);
#endif
if(keydb.entrycnt==0){
log_msg(LLVL_FATAL,"Key database file %s contains no keys.",options.keydbfile);
success=false;
break;
}
if(options.mode==SERVER_MODE){
if(keydb.entrycnt!=1){
log_msg(LLVL_FATAL,"Server configuration files need to have exactly one host entry.");
success=false;
break;
}
if(keydb_disk_key_count(&keydb)!=0){
log_msg(LLVL_FATAL,"Server configuration files may not contain disk unlocking keys.");