Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tls] Expose ServerContextImpl::selectTlsContext #14592

Merged
merged 2 commits into from
Jan 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions source/extensions/transport_sockets/tls/context_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,11 @@ class ServerContextImpl : public ContextImpl, public Envoy::Ssl::ServerContext {
ServerContextImpl(Stats::Scope& scope, const Envoy::Ssl::ServerContextConfig& config,
const std::vector<std::string>& server_names, TimeSource& time_source);

// Select the TLS certificate context in SSL_CTX_set_select_certificate_cb() callback with
// ClientHello details. This is made public for use by custom TLS extensions who want to
// manually create and use this as a client hello callback.
enum ssl_select_cert_result_t selectTlsContext(const SSL_CLIENT_HELLO* ssl_client_hello);

private:
using SessionContextID = std::array<uint8_t, SSL_MAX_SSL_SESSION_ID_LENGTH>;

Expand All @@ -259,9 +264,6 @@ class ServerContextImpl : public ContextImpl, public Envoy::Ssl::ServerContext {
HMAC_CTX* hmac_ctx, int encrypt);
bool isClientEcdsaCapable(const SSL_CLIENT_HELLO* ssl_client_hello);
bool isClientOcspCapable(const SSL_CLIENT_HELLO* ssl_client_hello);
// Select the TLS certificate context in SSL_CTX_set_select_certificate_cb() callback with
// ClientHello details.
enum ssl_select_cert_result_t selectTlsContext(const SSL_CLIENT_HELLO* ssl_client_hello);
OcspStapleAction ocspStapleAction(const ServerContextImpl::TlsContext& ctx,
bool client_ocsp_capable);

Expand Down