debugs(3, DBG_IMPORTANT, "Initializing https proxy context");
- Config.ssl_client.sslContext = sslCreateClientContext(Config.ssl_client.cert, Config.ssl_client.key, Config.ssl_client.version, Config.ssl_client.cipher, Config.ssl_client.options, Config.ssl_client.flags, Config.ssl_client.cafile, Config.ssl_client.capath, Config.ssl_client.crlfile);
+ Config.ssl_client.sslContext = sslCreateClientContext(Config.ssl_client.cert, Config.ssl_client.key, Config.ssl_client.version, Config.ssl_client.cipher, NULL, Config.ssl_client.flags, Config.ssl_client.cafile, Config.ssl_client.capath, Config.ssl_client.crlfile);
+ // Pre-parse SSL client options to be applied when the client SSL objects created.
+ // Options must not used in the case of peek or stare bump mode.
+ Config.ssl_client.parsedOptions = Ssl::parse_options(::Config.ssl_client.options);
for (CachePeer *p = Config.peers; p != NULL; p = p->next) {
if (p->use_ssl) {
if (peer->sslSession)
SSL_set_session(ssl, peer->sslSession);
- } else if (const ConnStateData *csd = request->clientConnectionManager.valid()) {
+ } else if (ConnStateData *csd = request->clientConnectionManager.valid()) {
// client connection is required in the case we need to splice
// or terminate client and server connections
assert(clientConn != NULL);
if (hostName)
SSL_set_ex_data(ssl, ssl_ex_index_server, (void*)hostName);
+ Must(!csd->serverBump() || csd->serverBump()->step <= Ssl::bumpStep2);
if (csd->sslBumpMode == Ssl::bumpPeek || csd->sslBumpMode == Ssl::bumpStare) {
assert(cltBio);
const Ssl::Bio::sslFeatures &features = cltBio->getFeatures();
}
}
} else {
+ // Set client SSL options
+ SSL_set_options(ssl, ::Config.ssl_client.parsedOptions);
+
// Use SNI TLS extension only when we connect directly
// to the origin server and we know the server host name.
const char *sniServer = hostName ? hostName :