commit | 3504cc4405b0b191cfb14069c5597c2d35a48517 | [log] [tgz] |
---|---|---|
author | Davide Pesavento <davide.pesavento@lip6.fr> | Sun Sep 17 15:28:10 2017 -0400 |
committer | Davide Pesavento <davide.pesavento@lip6.fr> | Mon Sep 18 19:05:56 2017 -0400 |
tree | e6338278c78f9e5c87ac3b281309d7663b8a74ee | |
parent | 9219f5885de79804055ebac42d4fe5be9fe9f15c [diff] [blame] |
security: deduplicate RAII wrapper class for EVP_MD_CTX Change-Id: I256588a8bc601b06548f7ec45aee020ddabb9597
diff --git a/src/security/detail/openssl-helper.hpp b/src/security/detail/openssl-helper.hpp index 51a4a36..58690ca 100644 --- a/src/security/detail/openssl-helper.hpp +++ b/src/security/detail/openssl-helper.hpp
@@ -35,6 +35,22 @@ int getEvpPkeyType(EVP_PKEY* key); +class EvpMdCtx : noncopyable +{ +public: + EvpMdCtx(); + + ~EvpMdCtx(); + + operator EVP_MD_CTX*() const + { + return m_ctx; + } + +private: + EVP_MD_CTX* m_ctx; +}; + class EvpPkeyCtx : noncopyable { public: