aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/xmss/xmss_privatekey.h
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2019-01-18 11:37:01 -0500
committerJack Lloyd <[email protected]>2019-01-18 11:37:01 -0500
commitb835fdf8fd3910a79ab408660757d9736f82d14d (patch)
treefbbd8e89d9cf910bc3a9e9ecbfce5ce290b7c8d9 /src/lib/pubkey/xmss/xmss_privatekey.h
parent9ca22335edcb9800158f4691de20fa5d0f9cc849 (diff)
Rename Integrity_Failure to Invalid_Authentication_Tag
This makes the meaning and usage more clear. Add a specific error type so invalid tags can be distinguished without having to catch that specific type. See also #1813
Diffstat (limited to 'src/lib/pubkey/xmss/xmss_privatekey.h')
-rw-r--r--src/lib/pubkey/xmss/xmss_privatekey.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/pubkey/xmss/xmss_privatekey.h b/src/lib/pubkey/xmss/xmss_privatekey.h
index d66933724..e3b41617c 100644
--- a/src/lib/pubkey/xmss/xmss_privatekey.h
+++ b/src/lib/pubkey/xmss/xmss_privatekey.h
@@ -115,8 +115,7 @@ class BOTAN_PUBLIC_API(2,0) XMSS_PrivateKey final : public virtual XMSS_PublicKe
{
if(idx >= (1ull << XMSS_PublicKey::m_xmss_params.tree_height()))
{
- throw Integrity_Failure("XMSS private key leaf index out of "
- "bounds.");
+ throw Decoding_Error("XMSS private key leaf index out of bounds");
}
else
{
@@ -140,8 +139,7 @@ class BOTAN_PUBLIC_API(2,0) XMSS_PrivateKey final : public virtual XMSS_PublicKe
*recover_global_leaf_index())).fetch_add(1);
if(idx >= (1ull << XMSS_PublicKey::m_xmss_params.tree_height()))
{
- throw Integrity_Failure("XMSS private key, one time signatures "
- "exhausted.");
+ throw Decoding_Error("XMSS private key, one time signatures exhaused");
}
return idx;
}