diff options
author | Jeffrey Walton <noloader@gmail.com> | 2018-12-25 06:48:09 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2018-12-25 06:48:09 -0500 |
commit | c37d7c83b145d8d3c0b47b8b884cd15d09eb6e42 (patch) | |
tree | 707759b8ec42f7dff44cce58e154c9bbb522a1bf /validat7.cpp | |
parent | 416db72f2ca148012156eee85b5001bedf9bf399 (diff) | |
download | cryptopp-git-c37d7c83b145d8d3c0b47b8b884cd15d09eb6e42.tar.gz |
Fix compile with NO_OS_DEPENDENCE
Diffstat (limited to 'validat7.cpp')
-rw-r--r-- | validat7.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/validat7.cpp b/validat7.cpp index 64ba30de..612eb47f 100644 --- a/validat7.cpp +++ b/validat7.cpp @@ -412,9 +412,14 @@ bool TestX25519() bool TestEd25519()
{
std::cout << "\nTesting ed25519 Signatures...\n\n";
+ bool pass = true;
+
+#if defined(NO_OS_DEPENDENCE)
+ std::cout << "\nNo operating system provided random number generator, skipping test." << std::endl;
+ return pass;
+#else
const unsigned int SIGN_COUNT = 64, MSG_SIZE=128;
const unsigned int NACL_EXTRA=NaCl::crypto_sign_BYTES;
- bool pass = true;
// Test key conversion
byte seed[32], sk1[64], sk2[64], pk1[32], pk2[32];
@@ -511,6 +516,7 @@ bool TestEd25519() else
std::cout << "FAILED:";
std::cout << " " << SIGN_COUNT << " verifications" << std::endl;
+#endif
return pass;
}
|