From 0d9b2f1f898bb54ccc4bb27784e600bc0426b3b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Tue, 17 May 2022 18:19:34 +0200 Subject: [PATCH] src: remove SecureContext::operator* This rather mysterious operator is only used once and can easily be replaced with ssl_ctx(). PR-URL: https://github.com/nodejs/node/pull/43121 Reviewed-By: Luigi Pinca Reviewed-By: Joyee Cheung Reviewed-By: Darshan Sen --- 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 5796e96708ddc6..b40d84ea6cbb96 100644 --- a/src/crypto/crypto_common.cc +++ b/src/crypto/crypto_common.cc @@ -209,7 +209,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();