View | Details | Raw Unified | Return to bug 31418
Collapse All | Expand All

(-)httpd-2.0.54/modules/ssl/ssl_engine_kernel.c (-3 / +11 lines)
Lines 881-895 Link Here
881
        return DECLINED;
881
        return DECLINED;
882
    }
882
    }
883
    
883
    
884
    if (!sslconn->client_dn) {
884
    clientdn = NULL;
885
886
    if (dc->szUserName) {
887
        char *val = ssl_var_lookup(r->pool, r->server, r->connection,
888
                                   r, (char *)dc->szUserName);
889
        if (val && val[0])
890
	  clientdn = val;
891
    }
892
893
    if (!clientdn && !sslconn->client_dn) {
885
        X509_NAME *name = X509_get_subject_name(sslconn->client_cert);
894
        X509_NAME *name = X509_get_subject_name(sslconn->client_cert);
886
        char *cp = X509_NAME_oneline(name, NULL, 0);
895
        char *cp = X509_NAME_oneline(name, NULL, 0);
887
        sslconn->client_dn = apr_pstrdup(r->connection->pool, cp);
896
        sslconn->client_dn = apr_pstrdup(r->connection->pool, cp);
888
        modssl_free(cp);
897
        modssl_free(cp);
898
        clientdn = (char *)sslconn->client_dn;
889
    }
899
    }
890
900
891
    clientdn = (char *)sslconn->client_dn;
892
893
    /*
901
    /*
894
     * Fake a password - which one would be immaterial, as, it seems, an empty
902
     * Fake a password - which one would be immaterial, as, it seems, an empty
895
     * password in the users file would match ALL incoming passwords, if only
903
     * password in the users file would match ALL incoming passwords, if only

Return to bug 31418