digest->key = NULL;
if(!digest->digest) {
- logger(LOG_DEBUG, "Unknown digest name '%s'!", name);
+ logger(DEBUG_ALWAYS, LOG_DEBUG, "Unknown digest name '%s'!", name);
return false;
}
digest->key = NULL;
if(!digest->digest) {
- logger(LOG_DEBUG, "Unknown digest nid %d!", nid);
+ logger(DEBUG_ALWAYS, LOG_DEBUG, "Unknown digest nid %d!", nid);
return false;
}
}
void digest_close(digest_t *digest) {
- if(digest->key)
- free(digest->key);
+ free(digest->key);
digest->key = NULL;
}
if(!EVP_DigestInit(&ctx, digest->digest)
|| !EVP_DigestUpdate(&ctx, indata, inlen)
|| !EVP_DigestFinal(&ctx, tmpdata, NULL)) {
- logger(LOG_DEBUG, "Error creating digest: %s", ERR_error_string(ERR_get_error(), NULL));
+ logger(DEBUG_ALWAYS, LOG_DEBUG, "Error creating digest: %s", ERR_error_string(ERR_get_error(), NULL));
return false;
}
}