From 33d471c80b97442951c04628b6bb656bed400963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Mon, 16 May 2022 20:28:31 +0000 Subject: [PATCH] src: remove SecureContext::operator* This rather mysterious operator is only used once and can easily be replaced with ssl_ctx(). --- src/crypto/crypto_common.cc | 2 +- src/crypto/crypto_context.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/crypto/crypto_common.cc b/src/crypto/crypto_common.cc index 8922b638dd31a2..5db9b1aa56941b 100644 --- a/src/crypto/crypto_common.cc +++ b/src/crypto/crypto_common.cc @@ -213,7 +213,7 @@ const char* GetServerName(SSL* ssl) { } bool SetGroups(SecureContext* sc, const char* groups) { - return SSL_CTX_set1_groups_list(**sc, groups) == 1; + return SSL_CTX_set1_groups_list(sc->ssl_ctx(), groups) == 1; } const char* X509ErrorCode(long err) { // NOLINT(runtime/int) diff --git a/src/crypto/crypto_context.h b/src/crypto/crypto_context.h index d9b33a4736f13a..0d290eb8368f35 100644 --- a/src/crypto/crypto_context.h +++ b/src/crypto/crypto_context.h @@ -41,8 +41,6 @@ class SecureContext final : public BaseObject { static void RegisterExternalReferences(ExternalReferenceRegistry* registry); static SecureContext* Create(Environment* env); - SSL_CTX* operator*() const { return ctx_.get(); } - SSL_CTX* ssl_ctx() const { return ctx_.get(); } SSLPointer CreateSSL();