MCPcopy Create free account
hub / github.com/apache/httpd / ssl_hook_ssl_bind_outgoing

Function ssl_hook_ssl_bind_outgoing

modules/ssl/mod_ssl.c:542–575  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

540}
541
542static int ssl_hook_ssl_bind_outgoing(conn_rec *c,
543 ap_conf_vector_t *per_dir_config,
544 int enable_ssl)
545{
546 SSLConnRec *sslconn;
547 int status;
548
549 sslconn = ssl_init_connection_ctx(c, per_dir_config, 1);
550 if (sslconn->ssl) {
551 /* we are already bound to this connection. We have rebound
552 * or removed the reference to a previous per_dir_config,
553 * there is nothing more to do. */
554 return OK;
555 }
556
557 status = ssl_engine_status(c, sslconn);
558 if (enable_ssl) {
559 if (status != OK) {
560 SSLSrvConfigRec *sc = mySrvConfig(sslconn->server);
561 sslconn->disabled = 1;
562 ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(10272)
563 "SSL Proxy requested for %s but not enabled for us.",
564 sc->vhost_id);
565 }
566 else {
567 sslconn->disabled = 0;
568 return OK;
569 }
570 }
571 else {
572 sslconn->disabled = 1;
573 }
574 return DECLINED;
575}
576
577int ssl_init_ssl_connection(conn_rec *c, request_rec *r)
578{

Callers

nothing calls this directly

Calls 2

ssl_init_connection_ctxFunction · 0.85
ssl_engine_statusFunction · 0.85

Tested by

no test coverage detected