diff options
author | Jack Lloyd <[email protected]> | 2019-01-18 11:37:01 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2019-01-18 11:37:01 -0500 |
commit | b835fdf8fd3910a79ab408660757d9736f82d14d (patch) | |
tree | fbbd8e89d9cf910bc3a9e9ecbfce5ce290b7c8d9 /src/lib/pubkey/xmss/xmss_signature.cpp | |
parent | 9ca22335edcb9800158f4691de20fa5d0f9cc849 (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_signature.cpp')
-rw-r--r-- | src/lib/pubkey/xmss/xmss_signature.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/pubkey/xmss/xmss_signature.cpp b/src/lib/pubkey/xmss/xmss_signature.cpp index f2d1ba4f1..2ba8a1965 100644 --- a/src/lib/pubkey/xmss/xmss_signature.cpp +++ b/src/lib/pubkey/xmss/xmss_signature.cpp @@ -19,7 +19,7 @@ XMSS_Signature::XMSS_Signature(XMSS_Parameters::xmss_algorithm_t oid, if(raw_sig.size() != (xmss_params.len() + xmss_params.tree_height() + 1) * xmss_params.element_size() + sizeof(m_leaf_idx)) { - throw Integrity_Failure("XMSS signature size invalid."); + throw Decoding_Error("XMSS signature size invalid."); } for(size_t i = 0; i < 8; i++) @@ -27,7 +27,7 @@ XMSS_Signature::XMSS_Signature(XMSS_Parameters::xmss_algorithm_t oid, if(m_leaf_idx >= (1ull << xmss_params.tree_height())) { - throw Integrity_Failure("XMSS signature leaf index out of bounds."); + throw Decoding_Error("XMSS signature leaf index out of bounds."); } auto begin = raw_sig.begin() + sizeof(m_leaf_idx); |