From ace89d9a89922257dcfe343f86725181f35b65e1 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 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();