diff options
author | Matthias Gierlings <[email protected]> | 2019-06-21 14:15:05 +0200 |
---|---|---|
committer | Matthias Gierlings <[email protected]> | 2019-06-21 14:19:43 +0200 |
commit | db0bc4c4b9a24f9123c1864a521a833f51aa6b65 (patch) | |
tree | 0dabd9d182a1c7c231933c2fe8a10e98761abddf /src/lib | |
parent | d31b68c301495d5b61d840a0c22c282cfae77db2 (diff) |
Use qualified-id for XMSS key size check
Explicitly choose the correct size() method for
the key size check during XMSS_PublicKey and
XMSS_PrivateKey construction.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/pubkey/xmss/xmss_privatekey.cpp | 2 | ||||
-rw-r--r-- | src/lib/pubkey/xmss/xmss_publickey.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/pubkey/xmss/xmss_privatekey.cpp b/src/lib/pubkey/xmss/xmss_privatekey.cpp index ee6a605f6..d4a353d3c 100644 --- a/src/lib/pubkey/xmss/xmss_privatekey.cpp +++ b/src/lib/pubkey/xmss/xmss_privatekey.cpp @@ -40,7 +40,7 @@ XMSS_PrivateKey::XMSS_PrivateKey(const secure_vector<uint8_t>& raw_key) */ static_assert(sizeof(size_t) >= 4, "size_t is big enough to support leaf index"); - if(raw_key.size() != size()) + if(raw_key.size() != XMSS_PrivateKey::size()) { throw Decoding_Error("Invalid XMSS private key size detected."); } diff --git a/src/lib/pubkey/xmss/xmss_publickey.cpp b/src/lib/pubkey/xmss/xmss_publickey.cpp index fdda21e40..7c7c19fc1 100644 --- a/src/lib/pubkey/xmss/xmss_publickey.cpp +++ b/src/lib/pubkey/xmss/xmss_publickey.cpp @@ -23,7 +23,7 @@ XMSS_PublicKey::XMSS_PublicKey(const std::vector<uint8_t>& raw_key) : m_xmss_params(XMSS_PublicKey::deserialize_xmss_oid(raw_key)), m_wots_params(m_xmss_params.ots_oid()) { - if(raw_key.size() < size()) + if(raw_key.size() < XMSS_PublicKey::size()) { throw Decoding_Error("Invalid XMSS public key size detected."); } |