build: require OpenSSL >= 1.1.1
Change-Id: I17a09ac60b867617af7a49fe19ab6e906dc14f61
diff --git a/tests/unit/security/transform/digest-filter.t.cpp b/tests/unit/security/transform/digest-filter.t.cpp
index fa109bb..fced1b8 100644
--- a/tests/unit/security/transform/digest-filter.t.cpp
+++ b/tests/unit/security/transform/digest-filter.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -137,7 +137,7 @@
BOOST_CHECK_EQUAL_COLLECTIONS(out, out + sizeof(out), os.buf()->begin(), os.buf()->end());
}
-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL && !defined(OPENSSL_NO_BLAKE2)
+#ifndef OPENSSL_NO_BLAKE2
BOOST_AUTO_TEST_CASE(AlgorithmBlake2b_512)
{
const uint8_t out[] = {
@@ -161,9 +161,8 @@
bufferSource("") >> digestFilter(DigestAlgorithm::BLAKE2S_256) >> streamSink(os);
BOOST_CHECK_EQUAL_COLLECTIONS(out, out + sizeof(out), os.buf()->begin(), os.buf()->end());
}
-#endif // OPENSSL_VERSION_NUMBER >= 0x1010000fL && !defined(OPENSSL_NO_BLAKE2)
+#endif // !OPENSSL_NO_BLAKE2
-#if OPENSSL_VERSION_NUMBER >= 0x10101001L
BOOST_AUTO_TEST_CASE(AlgorithmSha3_224)
{
const uint8_t out[] = {
@@ -210,7 +209,6 @@
bufferSource("") >> digestFilter(DigestAlgorithm::SHA3_512) >> streamSink(os);
BOOST_CHECK_EQUAL_COLLECTIONS(out, out + sizeof(out), os.buf()->begin(), os.buf()->end());
}
-#endif // OPENSSL_VERSION_NUMBER >= 0x10101001L
BOOST_AUTO_TEST_SUITE_END() // TestDigestFilter
BOOST_AUTO_TEST_SUITE_END() // Transform
diff --git a/tests/unit/security/transform/private-key.t.cpp b/tests/unit/security/transform/private-key.t.cpp
index 4be078b..9ab5734 100644
--- a/tests/unit/security/transform/private-key.t.cpp
+++ b/tests/unit/security/transform/private-key.t.cpp
@@ -685,9 +685,7 @@
boolSink(result));
}
else {
-#if OPENSSL_VERSION_NUMBER >= 0x1010100fL
BOOST_CHECK_THROW(sKey->derivePublicKey(), PrivateKey::Error);
-#endif
BOOST_CHECK_NO_THROW(bufferSource(data) >>
verifierFilter(DigestAlgorithm::SHA256, *sKey, *sig) >>
boolSink(result));
@@ -705,10 +703,8 @@
BOOST_CHECK(*os1.buf() != *os2.buf());
}
else {
-#if OPENSSL_VERSION_NUMBER >= 0x1010100fL
OBufferStream os1;
BOOST_CHECK_THROW(sKey->savePkcs1(os1), PrivateKey::Error);
-#endif
}
}
diff --git a/tests/unit/util/random.t.cpp b/tests/unit/util/random.t.cpp
index bfa486a..73c3825 100644
--- a/tests/unit/util/random.t.cpp
+++ b/tests/unit/util/random.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -68,18 +68,11 @@
}
private: // RAND_METHOD callbacks
-#if OPENSSL_VERSION_NUMBER < 0x1010000fL
- static void
- seed(const void* buf, int num)
- {
- }
-#else
static int
seed(const void* buf, int num)
{
return 0;
}
-#endif // OPENSSL_VERSION_NUMBER < 0x1010000fL
static int
bytes(unsigned char* buf, int num)
@@ -92,18 +85,11 @@
{
}
-#if OPENSSL_VERSION_NUMBER < 0x1010000fL
- static void
- add(const void* buf, int num, double entropy)
- {
- }
-#else
static int
add(const void* buf, int num, double entropy)
{
return 0;
}
-#endif // OPENSSL_VERSION_NUMBER < 0x1010000fL
static int
pseudorand(unsigned char* buf, int num)