security: Add wrapper for public/private key in transformation

Change-Id: I6610cccc8bb20b4e9e227895cf24b595a6e13698
Refs: #3009, #3010
diff --git a/src/security/detail/openssl-helper.cpp b/src/security/detail/openssl-helper.cpp
index ce51d1b..3a7140d 100644
--- a/src/security/detail/openssl-helper.cpp
+++ b/src/security/detail/openssl-helper.cpp
@@ -36,6 +36,44 @@
   }
 }
 
+EvpPkey::EvpPkey()
+  : m_key(nullptr)
+{
+}
+
+EvpPkey::~EvpPkey()
+{
+  EVP_PKEY_free(m_key);
+}
+
+EvpPkeyCtx::EvpPkeyCtx(EVP_PKEY* key)
+  : m_ctx(EVP_PKEY_CTX_new(key, nullptr))
+{
+  BOOST_ASSERT(m_ctx != nullptr);
+}
+
+EvpPkeyCtx::EvpPkeyCtx(int id)
+  : m_ctx(EVP_PKEY_CTX_new_id(id, nullptr))
+{
+  BOOST_ASSERT(m_ctx != nullptr);
+}
+
+EvpPkeyCtx::~EvpPkeyCtx()
+{
+  EVP_PKEY_CTX_free(m_ctx);
+}
+
+Bio::Bio(BIO_METHOD* method)
+  : m_bio(BIO_new(method))
+{
+  BOOST_ASSERT(m_bio != nullptr);
+}
+
+Bio::~Bio()
+{
+  BIO_free_all(m_bio);
+}
+
 } // namespace detail
 } // namespace security
 } // namespace ndn