Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Remi Gacogne <github@coredump.fr>
  • Loading branch information
omoerbeek and rgacogne committed Dec 15, 2021
1 parent 2eaaa7c commit 45c59fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pdns/sha.hh
Expand Up @@ -58,11 +58,11 @@ namespace pdns
class SHADigest
{
public:
SHADigest(int bits)
SHADigest(unsigned int bits)
{
mdctx = EVP_MD_CTX_new();
if (mdctx == nullptr) {
throw std::runtime_error("VSHADigest: P_MD_CTX_new failed");
throw std::runtime_error("SHADigest: EVP_MD_CTX_new failed");
}
switch (bits) {
case 256:
Expand Down Expand Up @@ -90,7 +90,7 @@ public:
}
}

void process(const std::string& msg, size_t sz)
void process(const std::string& msg)
{
if (EVP_DigestUpdate(mdctx, msg.data(), msg.size()) == 0) {
throw std::runtime_error("SHADigest: update error");
Expand All @@ -106,7 +106,7 @@ public:
throw std::runtime_error("SHADigest: finalize error");
}
if (md_len != md_value.size()) {
throw std::runtime_error("SHADigest: inconsisten size");
throw std::runtime_error("SHADigest: inconsistent size");
}
return md_value;
}
Expand Down
2 changes: 1 addition & 1 deletion pdns/zonemd.cc
Expand Up @@ -30,7 +30,7 @@ void pdns::zonemdVerify(const DNSName& zone, ZoneParserTNG& zpt, bool& validatio
validationDone = false;
validationOK = false;

// scheme,hasalgo -> duplicate,zonemdrecord
// scheme,hashalgo -> duplicate,zonemdrecord
struct ZoneMDAndDuplicateFlag
{
std::shared_ptr<ZONEMDRecordContent> record;
Expand Down

0 comments on commit 45c59fe

Please sign in to comment.