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 <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
  • Loading branch information
tniessen authored and juanarbol committed May 31, 2022
1 parent 745d9a2 commit c4833ff
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 @@ -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)
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 c4833ff

Please sign in to comment.