aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-04-14 09:01:27 -0400
committerJack Lloyd <[email protected]>2018-04-14 09:01:27 -0400
commitd208cc3ab74afce04b18c21d87e4927034ab726a (patch)
tree4b4bf7d4e3c6ae033b78b5db0e66d2af9095d86f /src
parent325d772cf89763a3ca9e5ac144d10af6c408421f (diff)
parent134e2d21b6118542a0000ba6b556db9357000339 (diff)
Merge GH #1531 Improve XMSS test coverage
Diffstat (limited to 'src')
-rw-r--r--src/build-data/buildh.in4
-rw-r--r--src/lib/pubkey/xmss/xmss_hash.cpp5
-rw-r--r--src/lib/pubkey/xmss/xmss_hash.h7
-rw-r--r--src/lib/pubkey/xmss/xmss_tools.cpp8
4 files changed, 12 insertions, 12 deletions
diff --git a/src/build-data/buildh.in b/src/build-data/buildh.in
index 807b6f479..594eab9c8 100644
--- a/src/build-data/buildh.in
+++ b/src/build-data/buildh.in
@@ -56,6 +56,10 @@
#define BOTAN_HAS_SANITIZER_%{i|upper}
%{endfor}
+%{if build_coverage}
+#define BOTAN_HAS_COVERAGE
+%{endif}
+
#define BOTAN_TARGET_ARCH_IS_%{arch|upper}
%{if endian}
#define BOTAN_TARGET_CPU_IS_%{endian|upper}_ENDIAN
diff --git a/src/lib/pubkey/xmss/xmss_hash.cpp b/src/lib/pubkey/xmss/xmss_hash.cpp
index a691453dc..cd714873c 100644
--- a/src/lib/pubkey/xmss/xmss_hash.cpp
+++ b/src/lib/pubkey/xmss/xmss_hash.cpp
@@ -56,11 +56,6 @@ void XMSS_Hash::h_msg_init(const secure_vector<uint8_t>& randomness,
m_msg_hash->update(index_bytes);
}
-void XMSS_Hash::h_msg_update(const secure_vector<uint8_t>& data)
- {
- m_msg_hash->update(data);
- }
-
void XMSS_Hash::h_msg_update(const uint8_t data[], size_t size)
{
m_msg_hash->update(data, size);
diff --git a/src/lib/pubkey/xmss/xmss_hash.h b/src/lib/pubkey/xmss/xmss_hash.h
index 85cebdc91..f45432d59 100644
--- a/src/lib/pubkey/xmss/xmss_hash.h
+++ b/src/lib/pubkey/xmss/xmss_hash.h
@@ -120,13 +120,6 @@ class XMSS_Hash final
* Adds a message block to buffered h_msg computation.
*
* @param data A message block
- **/
- void h_msg_update(const secure_vector<uint8_t>& data);
-
- /**
- * Adds a message block to buffered h_msg computation.
- *
- * @param data A message block
* @param size Length of the message block in bytes.
**/
void h_msg_update(const uint8_t data[], size_t size);
diff --git a/src/lib/pubkey/xmss/xmss_tools.cpp b/src/lib/pubkey/xmss/xmss_tools.cpp
index f9bd4892e..b55a977d8 100644
--- a/src/lib/pubkey/xmss/xmss_tools.cpp
+++ b/src/lib/pubkey/xmss/xmss_tools.cpp
@@ -68,11 +68,19 @@ size_t XMSS_Tools::bench_threads()
if(durations[0].count() < durations[1].count())
{
+#if defined(BOTAN_HAS_COVERAGE)
+ return 4;
+#else
return concurrency[0];
+#endif
}
else
{
+#if defined(BOTAN_HAS_COVERAGE)
+ return 4;
+#else
return concurrency[1];
+#endif
}
}