Commit c0f1b6af authored by Doug MacEachern's avatar Doug MacEachern
Browse files

proxy needs to use client ssl method


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/ssl@94282 13f79535-47bb-0310-9956-ffa450edef68
parent 3773b3f7
Loading
Loading
Loading
Loading
+9 −2
Changes for ssl_engine_init.c: 9 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -407,6 +407,7 @@ static void ssl_init_ctx(server_rec *s,
                         modssl_ctx_t *mctx)
{
    SSL_CTX *ctx = NULL;
    SSL_METHOD *method = NULL;
    char *cp;
    int protocol = mctx->protocol;

@@ -430,10 +431,16 @@ static void ssl_init_ctx(server_rec *s,
            "Creating new SSL context (protocols: %s)", cp);

    if (protocol == SSL_PROTOCOL_SSLV2) {
        ctx = SSL_CTX_new(SSLv2_server_method());  /* only SSLv2 is left */
        method = mctx->pkp ?
            SSLv2_client_method() : /* proxy */
            SSLv2_server_method();  /* server */
        ctx = SSL_CTX_new(method);  /* only SSLv2 is left */
    }
    else {
        ctx = SSL_CTX_new(SSLv23_server_method()); /* be more flexible */
        method = mctx->pkp ?
            SSLv23_client_method() : /* proxy */
            SSLv23_server_method();  /* server */
        ctx = SSL_CTX_new(method); /* be more flexible */
    }

    mctx->ssl_ctx = ctx;