summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Nießen <tniessen@tnie.de>2022-05-17 18:19:34 +0200
committerGitHub <noreply@github.com>2022-05-17 17:19:34 +0100
commitace89d9a89922257dcfe343f86725181f35b65e1 (patch)
tree1a49db4fe6ccdda9d1714688fcb82deab22b0c6f
parent2bc1991423b8327ff6d9491a997a249bd66290ad (diff)
downloadnode-new-ace89d9a89922257dcfe343f86725181f35b65e1.tar.gz
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 <luigipinca@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
-rw-r--r--src/crypto/crypto_common.cc2
-rw-r--r--src/crypto/crypto_context.h2
2 files changed, 1 insertions, 3 deletions
diff --git a/src/crypto/crypto_common.cc b/src/crypto/crypto_common.cc
index 8922b638dd..5db9b1aa56 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 d9b33a4736..0d290eb836 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();