From 0496c7c91abbf8ec20cc70f383868957c6f9adc9 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Fri, 20 Jul 2018 22:59:18 +0100 Subject: crypto: do not use boost::value_initialized to init null skey/pkey --- tests/unit_tests/crypto.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/unit_tests/crypto.cpp') diff --git a/tests/unit_tests/crypto.cpp b/tests/unit_tests/crypto.cpp index 4bed06173..9e1680568 100644 --- a/tests/unit_tests/crypto.cpp +++ b/tests/unit_tests/crypto.cpp @@ -73,3 +73,11 @@ TEST(Crypto, Ostream) EXPECT_TRUE(is_formatted()); EXPECT_TRUE(is_formatted()); } + +TEST(Crypto, null_keys) +{ + char zero[32]; + memset(zero, 0, 32); + ASSERT_EQ(memcmp(crypto::null_skey.data, zero, 32), 0); + ASSERT_EQ(memcmp(crypto::null_pkey.data, zero, 32), 0); +} -- cgit v1.2.3