return -1;
}
- while (*sldns_buffer_at(buffer, --len) == 0);
+ while (*sldns_buffer_at(buffer, --len) == 0)
+ ;
if (*sldns_buffer_at(buffer, len) != 0x80) {
return -1;
uint64_t ts = (uint64_t)0U;
int ret;
- ret = evutil_gettimeofday(&tv, NULL);
+ ret = gettimeofday(&tv, NULL);
assert(ret == 0);
if (ret == 0) {
ts = (uint64_t)tv.tv_sec * 1000000U + (uint64_t)tv.tv_usec;
head->str,
(char *)(env->signed_certs + signed_cert_id),
sizeof(struct SignedCert)) != 0) {
- fatal_exit("dnsc_parse_certs: failed to load %s", head->str);
+ fatal_exit("dnsc_parse_certs: failed to load %s: %s", head->str, strerror(errno));
}
verbose(VERB_OPS, "Loaded cert %s", head->str);
}
head->str,
(char *)(env->keypairs[keypair_id].crypt_secretkey),
crypto_box_SECRETKEYBYTES) != 0) {
- fatal_exit("dnsc_parse_keys: failed to load %s", head->str);
+ fatal_exit("dnsc_parse_keys: failed to load %s: %s", head->str, strerror(errno));
}
verbose(VERB_OPS, "Loaded key %s", head->str);
if (crypto_scalarmult_base(env->keypairs[keypair_id].crypt_publickey,
/**
* Initialize DNSCrypt enviroment.
* Initialize sodium library and allocate the dnsc_env structure.
- * \return an unitialized struct dnsc_env.
+ * \return an uninitialized struct dnsc_env.
*/
struct dnsc_env * dnsc_create(void);