if (SSL_select_next_proto(const_cast<unsigned char**>(out), outlen, alpn_data, alpn_data_size, in,
} else if (!session_ticket_keys_.empty() && !config.capabilities().handles_session_resumption) {
ServerContextImpl::generateHashForSessionContextId(const std::vector<std::string>& server_names) {
// Hash the CommonName/SANs of all the server certificates. This makes sure that sessions can only
// be resumed to certificate(s) for the same name(s), but allows resuming to unique certs in the
rc = X509_NAME_digest(X509_get_issuer_name(cert), EVP_sha256(), hash_buffer, &hash_length);
static_assert(session_id.size() == SSL_MAX_SSL_SESSION_ID_LENGTH, "TLS session ID size mismatch");
ServerContextImpl::getClientEcdsaCapabilities(const SSL_CLIENT_HELLO& ssl_client_hello) const {
// This is the TLSv1.3 case (TLSv1.2 on the wire and the supported_versions extensions present).
if (SSL_early_callback_ctx_extension_get(&ssl_client_hello, TLSEXT_TYPE_supported_versions,
if (SSL_early_callback_ctx_extension_get(&ssl_client_hello, TLSEXT_TYPE_signature_algorithms,
// ECDSA and also for a compatible cipher suite. https://tools.ietf.org/html/rfc4492#section-5.1.1
CBS_init(&cipher_suites, ssl_client_hello.cipher_suites, ssl_client_hello.cipher_suites_len);
return ServerContextImpl::create(scope, config, factory_context, std::move(additional_init));