Skip to content

Commit

Permalink
src: remove SecureContext::operator*
Browse files Browse the repository at this point in the history
This rather mysterious operator is only used once and can easily be
replaced with ssl_ctx().

PR-URL: #43121
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
  • Loading branch information
tniessen authored and bengl committed May 30, 2022
1 parent 85d81a7 commit 72a767b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/crypto/crypto_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions src/crypto/crypto_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 72a767b

Please sign in to comment.