MCPcopy Create free account
hub / github.com/apache/trafficserver / _make_ssl_connection

Method _make_ssl_connection

src/iocore/net/SSLNetVConnection.cc:101–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99//
100
101void
102SSLNetVConnection::_make_ssl_connection(SSL_CTX *ctx)
103{
104 if (likely(this->ssl = SSL_new(ctx))) {
105 // Only set up the bio stuff for the server side
106 if (this->get_context() == NET_VCONNECTION_OUT) {
107 BIO *bio = BIO_new(const_cast<BIO_METHOD *>(BIO_s_fastopen()));
108 BIO_set_fd(bio, this->get_socket(), BIO_NOCLOSE);
109
110 BIO_fastopen_set_dest_addr(bio,
111 this->options.f_tcp_fastopen ? this->get_remote_addr() : static_cast<const sockaddr *>(nullptr));
112
113 SSL_set_bio(ssl, bio, bio);
114 } else {
115 this->initialize_handshake_buffers();
116 BIO *rbio = BIO_new(BIO_s_mem());
117 BIO *wbio = BIO_new_socket(this->get_socket(), BIO_NOCLOSE);
118 BIO_set_mem_eof_return(wbio, -1);
119 SSL_set_bio(ssl, rbio, wbio);
120
121#if TS_HAS_TLS_EARLY_DATA
122 update_early_data_config(ssl, SSLConfigParams::server_max_early_data, SSLConfigParams::server_recv_max_early_data);
123#endif
124 }
125 this->_bindSSLObject();
126 }
127}
128
129void
130SSLNetVConnection::_bindSSLObject()

Callers 1

sslStartHandShakeMethod · 0.95

Calls 7

_bindSSLObjectMethod · 0.95
BIO_s_fastopenFunction · 0.85
get_contextMethod · 0.45
get_socketMethod · 0.45
get_remote_addrMethod · 0.45

Tested by

no test coverage detected