security: dissolve private header security/impl/openssl.hpp

It no longer serves a purpose

Change-Id: Ic145460c139dbda969976644352fed3f44fd32ec
diff --git a/ndn-cxx/impl/common-pch.hpp b/ndn-cxx/impl/common-pch.hpp
index 5e781c6..eea4287 100644
--- a/ndn-cxx/impl/common-pch.hpp
+++ b/ndn-cxx/impl/common-pch.hpp
@@ -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).
  *
@@ -26,7 +26,6 @@
 // and included before anything else
 
 #include "ndn-cxx/detail/common.hpp"
-#include "ndn-cxx/security/impl/openssl.hpp"
 
 // STL headers to precompile
 #include <atomic>
diff --git a/ndn-cxx/security/impl/openssl-helper.hpp b/ndn-cxx/security/impl/openssl-helper.hpp
index c1da8b8..310a283 100644
--- a/ndn-cxx/security/impl/openssl-helper.hpp
+++ b/ndn-cxx/security/impl/openssl-helper.hpp
@@ -22,9 +22,11 @@
 #ifndef NDN_CXX_SECURITY_IMPL_OPENSSL_HELPER_HPP
 #define NDN_CXX_SECURITY_IMPL_OPENSSL_HELPER_HPP
 
-#include "ndn-cxx/security/impl/openssl.hpp"
 #include "ndn-cxx/security/security-common.hpp"
 
+#include <openssl/bio.h>
+#include <openssl/evp.h>
+
 namespace ndn {
 namespace security {
 namespace detail {
diff --git a/ndn-cxx/security/impl/openssl.hpp b/ndn-cxx/security/impl/openssl.hpp
deleted file mode 100644
index 13a81d4..0000000
--- a/ndn-cxx/security/impl/openssl.hpp
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2013-2021 Regents of the University of California.
- *
- * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
- *
- * ndn-cxx library is free software: you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later version.
- *
- * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
- *
- * You should have received copies of the GNU General Public License and GNU Lesser
- * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
- */
-
-#ifndef NDN_CXX_SECURITY_IMPL_OPENSSL_HPP
-#define NDN_CXX_SECURITY_IMPL_OPENSSL_HPP
-
-// suppress deprecation warnings on macOS >= 10.7
-#if defined(__APPLE__) && defined(__clang__)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-#endif
-
-#include <openssl/bio.h>
-#include <openssl/crypto.h>
-#include <openssl/ec.h>
-#include <openssl/err.h>
-#include <openssl/evp.h>
-#include <openssl/pem.h>
-#include <openssl/rand.h>
-#include <openssl/rsa.h>
-#include <openssl/x509.h>
-
-#if defined(__APPLE__) && defined(__clang__)
-#pragma clang diagnostic pop
-#endif
-
-#endif // NDN_CXX_SECURITY_IMPL_OPENSSL_HPP
diff --git a/ndn-cxx/security/transform/base64-decode.cpp b/ndn-cxx/security/transform/base64-decode.cpp
index 7b731a0..e9a3f08 100644
--- a/ndn-cxx/security/transform/base64-decode.cpp
+++ b/ndn-cxx/security/transform/base64-decode.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).
  *
@@ -20,7 +20,9 @@
  */
 
 #include "ndn-cxx/security/transform/base64-decode.hpp"
-#include "ndn-cxx/security/impl/openssl.hpp"
+
+#include <openssl/bio.h>
+#include <openssl/evp.h>
 
 namespace ndn {
 namespace security {
diff --git a/ndn-cxx/security/transform/base64-encode.cpp b/ndn-cxx/security/transform/base64-encode.cpp
index 51f5e50..5383a8f 100644
--- a/ndn-cxx/security/transform/base64-encode.cpp
+++ b/ndn-cxx/security/transform/base64-encode.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).
  *
@@ -20,7 +20,9 @@
  */
 
 #include "ndn-cxx/security/transform/base64-encode.hpp"
-#include "ndn-cxx/security/impl/openssl.hpp"
+
+#include <openssl/bio.h>
+#include <openssl/evp.h>
 
 namespace ndn {
 namespace security {
diff --git a/ndn-cxx/security/transform/block-cipher.cpp b/ndn-cxx/security/transform/block-cipher.cpp
index 1857776..bc881f1 100644
--- a/ndn-cxx/security/transform/block-cipher.cpp
+++ b/ndn-cxx/security/transform/block-cipher.cpp
@@ -20,7 +20,9 @@
  */
 
 #include "ndn-cxx/security/transform/block-cipher.hpp"
-#include "ndn-cxx/security/impl/openssl.hpp"
+
+#include <openssl/bio.h>
+#include <openssl/evp.h>
 
 #include <boost/lexical_cast.hpp>
 
diff --git a/ndn-cxx/security/transform/private-key.cpp b/ndn-cxx/security/transform/private-key.cpp
index 831ab8a..53501a9 100644
--- a/ndn-cxx/security/transform/private-key.cpp
+++ b/ndn-cxx/security/transform/private-key.cpp
@@ -37,6 +37,11 @@
 #include <boost/lexical_cast.hpp>
 #include <cstring>
 
+#include <openssl/ec.h>
+#include <openssl/pem.h>
+#include <openssl/rsa.h>
+#include <openssl/x509.h>
+
 #define ENSURE_PRIVATE_KEY_LOADED(key) \
   do { \
     if ((key) == nullptr) \
diff --git a/ndn-cxx/security/transform/public-key.cpp b/ndn-cxx/security/transform/public-key.cpp
index 6427f4d..3291628 100644
--- a/ndn-cxx/security/transform/public-key.cpp
+++ b/ndn-cxx/security/transform/public-key.cpp
@@ -28,6 +28,9 @@
 #include "ndn-cxx/security/impl/openssl-helper.hpp"
 #include "ndn-cxx/encoding/buffer-stream.hpp"
 
+#include <openssl/rsa.h>
+#include <openssl/x509.h>
+
 #define ENSURE_PUBLIC_KEY_LOADED(key) \
   do { \
     if ((key) == nullptr) \
diff --git a/ndn-cxx/security/verification-helpers.cpp b/ndn-cxx/security/verification-helpers.cpp
index 89b4427..553b45b 100644
--- a/ndn-cxx/security/verification-helpers.cpp
+++ b/ndn-cxx/security/verification-helpers.cpp
@@ -25,7 +25,6 @@
 #include "ndn-cxx/encoding/buffer-stream.hpp"
 #include "ndn-cxx/interest.hpp"
 #include "ndn-cxx/security/certificate.hpp"
-#include "ndn-cxx/security/impl/openssl.hpp"
 #include "ndn-cxx/security/pib/key.hpp"
 #include "ndn-cxx/security/tpm/tpm.hpp"
 #include "ndn-cxx/security/transform/bool-sink.hpp"
@@ -35,6 +34,8 @@
 #include "ndn-cxx/security/transform/stream-sink.hpp"
 #include "ndn-cxx/security/transform/verifier-filter.hpp"
 
+#include <openssl/crypto.h>
+
 namespace ndn {
 namespace security {
 
diff --git a/ndn-cxx/util/random.cpp b/ndn-cxx/util/random.cpp
index a60917b..0eec624 100644
--- a/ndn-cxx/util/random.cpp
+++ b/ndn-cxx/util/random.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).
  *
@@ -20,7 +20,9 @@
  */
 
 #include "ndn-cxx/util/random.hpp"
-#include "ndn-cxx/security/impl/openssl.hpp"
+
+#include <openssl/err.h>
+#include <openssl/rand.h>
 
 namespace ndn {
 namespace random {
diff --git a/ndn-cxx/util/sha256.cpp b/ndn-cxx/util/sha256.cpp
index 7af7e58..1874b1e 100644
--- a/ndn-cxx/util/sha256.cpp
+++ b/ndn-cxx/util/sha256.cpp
@@ -21,11 +21,12 @@
 
 #include "ndn-cxx/util/sha256.hpp"
 #include "ndn-cxx/util/string-helper.hpp"
-#include "ndn-cxx/security/impl/openssl.hpp"
 #include "ndn-cxx/security/transform/digest-filter.hpp"
 #include "ndn-cxx/security/transform/stream-sink.hpp"
 #include "ndn-cxx/security/transform/stream-source.hpp"
 
+#include <openssl/crypto.h>
+
 namespace ndn {
 namespace util {
 
diff --git a/tests/unit/security/key-chain.t.cpp b/tests/unit/security/key-chain.t.cpp
index ddee6db..ef1646b 100644
--- a/tests/unit/security/key-chain.t.cpp
+++ b/tests/unit/security/key-chain.t.cpp
@@ -20,7 +20,6 @@
  */
 
 #include "ndn-cxx/security/key-chain.hpp"
-#include "ndn-cxx/security/impl/openssl.hpp"
 #include "ndn-cxx/security/transform/private-key.hpp"
 #include "ndn-cxx/security/verification-helpers.hpp"
 
@@ -29,6 +28,7 @@
 #include "tests/unit/clock-fixture.hpp"
 #include "tests/unit/test-home-env-saver.hpp"
 
+#include <openssl/opensslv.h>
 #include <boost/mpl/vector.hpp>
 
 namespace ndn {
diff --git a/tests/unit/security/signing-info.t.cpp b/tests/unit/security/signing-info.t.cpp
index a68c031..87c347f 100644
--- a/tests/unit/security/signing-info.t.cpp
+++ b/tests/unit/security/signing-info.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).
  *
@@ -20,10 +20,10 @@
  */
 
 #include "ndn-cxx/security/signing-info.hpp"
-#include "ndn-cxx/security/impl/openssl.hpp"
 
 #include "tests/boost-test.hpp"
 
+#include <openssl/opensslv.h>
 #include <boost/lexical_cast.hpp>
 #include <sstream>
 
diff --git a/tests/unit/security/tpm/back-end.t.cpp b/tests/unit/security/tpm/back-end.t.cpp
index 9101aa3..e6f78e7 100644
--- a/tests/unit/security/tpm/back-end.t.cpp
+++ b/tests/unit/security/tpm/back-end.t.cpp
@@ -22,7 +22,6 @@
 #include "ndn-cxx/security/tpm/back-end.hpp"
 
 #include "ndn-cxx/encoding/buffer-stream.hpp"
-#include "ndn-cxx/security/impl/openssl.hpp"
 #include "ndn-cxx/security/pib/key.hpp"
 #include "ndn-cxx/security/transform/bool-sink.hpp"
 #include "ndn-cxx/security/transform/buffer-source.hpp"
@@ -38,6 +37,7 @@
 
 #include "tests/boost-test.hpp"
 
+#include <openssl/opensslv.h>
 #include <boost/mpl/vector.hpp>
 #include <set>
 
diff --git a/tests/unit/security/transform/digest-filter.t.cpp b/tests/unit/security/transform/digest-filter.t.cpp
index fced1b8..08f85cf 100644
--- a/tests/unit/security/transform/digest-filter.t.cpp
+++ b/tests/unit/security/transform/digest-filter.t.cpp
@@ -22,13 +22,14 @@
 #include "ndn-cxx/security/transform/digest-filter.hpp"
 
 #include "ndn-cxx/encoding/buffer-stream.hpp"
-#include "ndn-cxx/security/impl/openssl.hpp"
 #include "ndn-cxx/security/transform/buffer-source.hpp"
 #include "ndn-cxx/security/transform/step-source.hpp"
 #include "ndn-cxx/security/transform/stream-sink.hpp"
 
 #include "tests/boost-test.hpp"
 
+#include <openssl/evp.h>
+
 namespace ndn {
 namespace security {
 namespace transform {
diff --git a/tests/unit/security/transform/private-key.t.cpp b/tests/unit/security/transform/private-key.t.cpp
index 9ab5734..077c2e3 100644
--- a/tests/unit/security/transform/private-key.t.cpp
+++ b/tests/unit/security/transform/private-key.t.cpp
@@ -22,7 +22,6 @@
 #include "ndn-cxx/security/transform/private-key.hpp"
 
 #include "ndn-cxx/encoding/buffer-stream.hpp"
-#include "ndn-cxx/security/impl/openssl.hpp"
 #include "ndn-cxx/security/key-params.hpp"
 #include "ndn-cxx/security/transform/base64-decode.hpp"
 #include "ndn-cxx/security/transform/bool-sink.hpp"
@@ -35,8 +34,8 @@
 
 #include "tests/boost-test.hpp"
 
+#include <openssl/opensslv.h>
 #include <boost/mpl/vector.hpp>
-
 #include <sstream>
 
 namespace ndn {
diff --git a/tests/unit/security/transform/verifier-filter.t.cpp b/tests/unit/security/transform/verifier-filter.t.cpp
index 882890f..ef986b1 100644
--- a/tests/unit/security/transform/verifier-filter.t.cpp
+++ b/tests/unit/security/transform/verifier-filter.t.cpp
@@ -22,7 +22,6 @@
 #include "ndn-cxx/security/transform/verifier-filter.hpp"
 
 #include "ndn-cxx/encoding/buffer-stream.hpp"
-#include "ndn-cxx/security/impl/openssl.hpp"
 #include "ndn-cxx/security/key-params.hpp"
 #include "ndn-cxx/security/transform/base64-decode.hpp"
 #include "ndn-cxx/security/transform/bool-sink.hpp"
@@ -34,6 +33,8 @@
 
 #include "tests/boost-test.hpp"
 
+#include <openssl/opensslv.h>
+
 namespace ndn {
 namespace security {
 namespace transform {
diff --git a/tests/unit/security/verification-helpers.t.cpp b/tests/unit/security/verification-helpers.t.cpp
index 79cc41c..d3434c8 100644
--- a/tests/unit/security/verification-helpers.t.cpp
+++ b/tests/unit/security/verification-helpers.t.cpp
@@ -20,13 +20,13 @@
  */
 
 #include "ndn-cxx/security/verification-helpers.hpp"
-#include "ndn-cxx/security/impl/openssl.hpp"
 #include "ndn-cxx/security/transform/public-key.hpp"
 // #include "ndn-cxx/util/string-helper.hpp"
 
 #include "tests/key-chain-fixture.hpp"
 #include "tests/test-common.hpp"
 
+#include <openssl/opensslv.h>
 #include <boost/mpl/vector.hpp>
 
 namespace ndn {
diff --git a/tests/unit/util/random.t.cpp b/tests/unit/util/random.t.cpp
index 8875cce..388bb98 100644
--- a/tests/unit/util/random.t.cpp
+++ b/tests/unit/util/random.t.cpp
@@ -20,10 +20,11 @@
  */
 
 #include "ndn-cxx/util/random.hpp"
-#include "ndn-cxx/security/impl/openssl.hpp"
 
 #include "tests/boost-test.hpp"
 
+#include <openssl/rand.h>
+
 #include <array>
 #include <thread>
 
diff --git a/tools/ndnsec/export.cpp b/tools/ndnsec/export.cpp
index f11cc96..4ce0ebc 100644
--- a/tools/ndnsec/export.cpp
+++ b/tools/ndnsec/export.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).
  *
@@ -22,9 +22,10 @@
 #include "ndnsec.hpp"
 #include "util.hpp"
 
-#include "ndn-cxx/security/impl/openssl.hpp"
 #include "ndn-cxx/util/scope.hpp"
 
+#include <openssl/crypto.h>
+
 namespace ndn {
 namespace ndnsec {
 
diff --git a/tools/ndnsec/import.cpp b/tools/ndnsec/import.cpp
index 2fb6755..c25b0c7 100644
--- a/tools/ndnsec/import.cpp
+++ b/tools/ndnsec/import.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).
  *
@@ -22,9 +22,10 @@
 #include "ndnsec.hpp"
 #include "util.hpp"
 
-#include "ndn-cxx/security/impl/openssl.hpp"
 #include "ndn-cxx/util/scope.hpp"
 
+#include <openssl/crypto.h>
+
 namespace ndn {
 namespace ndnsec {
 
diff --git a/tools/ndnsec/unlock-tpm.cpp b/tools/ndnsec/unlock-tpm.cpp
index bcf7ca0..1baaa55 100644
--- a/tools/ndnsec/unlock-tpm.cpp
+++ b/tools/ndnsec/unlock-tpm.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).
  *
@@ -22,7 +22,7 @@
 #include "ndnsec.hpp"
 #include "util.hpp"
 
-#include "ndn-cxx/security/impl/openssl.hpp"
+#include <openssl/crypto.h>
 
 #include <cerrno>
 #include <cstring>
diff --git a/tools/ndnsec/util.cpp b/tools/ndnsec/util.cpp
index d79df47..ae407db 100644
--- a/tools/ndnsec/util.cpp
+++ b/tools/ndnsec/util.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).
  *
@@ -21,7 +21,7 @@
 
 #include "util.hpp"
 
-#include "ndn-cxx/security/impl/openssl.hpp"
+#include <openssl/crypto.h>
 
 #include <unistd.h>