This is an automated email from the ASF dual-hosted git repository. alexey pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kudu.git
commit de0e0ef1b35fe666f46139510d11721ea9183dc4 Author: Alexey Serbin <[email protected]> AuthorDate: Wed Mar 17 17:58:56 2021 -0700 [security] move SslTypeTraits<BIO>::kFreeFunc to openssl_util.h This patch moves SslTypeTraits<BIO>::kFreeFunc definition from the openssl_util_bio.h to openssl_util.h header file. The rationale for this update is that ssl_make_unique(BIO_new(...)) construct can be used separately from utility functions defined in openssl_util_bio.h, exactly like it's done in a follow-up patch. With that, inclusion of openssl_util_bio.h isn't necessary once openssl_util.h is already included. Change-Id: I04ac09fbd79abda8c07491f4fe3bdbcac0af07ca Reviewed-on: http://gerrit.cloudera.org:8080/17196 Tested-by: Kudu Jenkins Reviewed-by: Grant Henke <[email protected]> --- src/kudu/security/openssl_util.h | 3 +++ src/kudu/security/openssl_util_bio.h | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kudu/security/openssl_util.h b/src/kudu/security/openssl_util.h index e5b522e..b2f936d 100644 --- a/src/kudu/security/openssl_util.h +++ b/src/kudu/security/openssl_util.h @@ -164,6 +164,9 @@ template<> struct SslTypeTraits<EVP_PKEY> { template<> struct SslTypeTraits<SSL_CTX> { static constexpr auto kFreeFunc = &SSL_CTX_free; }; +template<> struct SslTypeTraits<BIO> { + static constexpr auto kFreeFunc = &BIO_free; +}; template<typename SSL_TYPE, typename Traits = SslTypeTraits<SSL_TYPE>> c_unique_ptr<SSL_TYPE> ssl_make_unique(SSL_TYPE* d) { diff --git a/src/kudu/security/openssl_util_bio.h b/src/kudu/security/openssl_util_bio.h index c935b0b..3c41adb 100644 --- a/src/kudu/security/openssl_util_bio.h +++ b/src/kudu/security/openssl_util_bio.h @@ -31,9 +31,6 @@ namespace kudu { namespace security { -template<> struct SslTypeTraits<BIO> { - static constexpr auto kFreeFunc = &BIO_free; -}; template<typename TYPE, typename Traits = SslTypeTraits<TYPE>> Status ToBIO(BIO* bio, DataFormat format, TYPE* obj) {
