]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Throw std::invalid_argument on unsupported sha size
authorOtto <otto.moerbeek@open-xchange.com>
Fri, 17 Dec 2021 08:24:28 +0000 (09:24 +0100)
committerOtto <otto.moerbeek@open-xchange.com>
Fri, 17 Dec 2021 08:24:28 +0000 (09:24 +0100)
pdns/sha.hh

index 258a43243cea24ee6bab101efec95fe277594aaf..30b83ad8b4a4f305a1ff7bb0dafc6b3655d56d48 100644 (file)
@@ -75,7 +75,7 @@ public:
       md = EVP_sha512();
       break;
     default:
-      throw std::runtime_error("SHADigest: unsupported size");
+      throw std::invalid_argument("SHADigest: unsupported size");
     }
     if (EVP_DigestInit_ex(mdctx.get(), md, NULL) == 0) {
       throw std::runtime_error("SHADigest: init error");