#include "version.h"
struct onak_hkp_dbctx {
+ struct onak_db_config *config; /* Our DB config info */
CURL *curl;
char hkpbase[1024];
};
*
* We initialize CURL here.
*/
-struct onak_dbctx *keydb_hkp_init(bool readonly)
+struct onak_dbctx *keydb_hkp_init(struct onak_db_config *dbcfg, bool readonly)
{
struct onak_dbctx *dbctx;
struct onak_hkp_dbctx *privctx;
return NULL;
}
+ dbctx->config = dbcfg;
dbctx->priv = privctx = malloc(sizeof(*privctx));
dbctx->cleanupdb = hkp_cleanupdb;
dbctx->starttrans = hkp_starttrans;
dbctx->getfullkeyid = generic_getfullkeyid;
dbctx->iterate_keys = hkp_iterate_keys;
- if (!hkp_parse_url(privctx, config.db_dir)) {
+ if (!hkp_parse_url(privctx, dbcfg->location)) {
exit(EXIT_FAILURE);
}
curl_global_init(CURL_GLOBAL_DEFAULT);