X-Git-Url: http://the.earth.li/gitweb/?a=blobdiff_plain;f=keydb_hkp.c;h=3802e4985b60bcb5076ff139a80cc236f695606d;hb=f31f6d8cf4bda52b8ef1b1d1d280884e904429a9;hp=f1dfe4477786b83b087359533d5e95457b6b5532;hpb=54288021d24e0b40119d2ffae5a24ecd720d3aca;p=onak.git diff --git a/keydb_hkp.c b/keydb_hkp.c index f1dfe44..3802e49 100644 --- a/keydb_hkp.c +++ b/keydb_hkp.c @@ -31,6 +31,7 @@ #include "mem.h" #include "onak-conf.h" #include "parsekey.h" +#include "version.h" static CURL *curl = NULL; @@ -43,6 +44,11 @@ static void hkp_initdb(bool readonly) { curl_global_init(CURL_GLOBAL_DEFAULT); curl = curl_easy_init(); + if (curl == NULL) { + logthing(LOGTHING_CRITICAL, "Could not initialize CURL."); + exit(EXIT_FAILURE); + } + curl_easy_setopt(curl, CURLOPT_USERAGENT, "onak/" ONAK_VERSION); } /**