mirror of
https://github.com/apache/httpd.git
synced 2025-08-07 04:02:58 +03:00
* modules/ssl/ssl_util.c (modssl_request_is_tls): Adjust
to take SSLConnRec * out parameter rather than SSL *. * modules/ssl/ssl_engine_kernel.c (ssl_hook_UserCheck): Use it here. (ssl_hook_Fixup): Adjust use. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1829263 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1326,8 +1326,7 @@ int ssl_hook_Access(request_rec *r)
|
||||
*/
|
||||
int ssl_hook_UserCheck(request_rec *r)
|
||||
{
|
||||
SSLConnRec *sslconn = myConnConfig(r->connection);
|
||||
SSLSrvConfigRec *sc = mySrvConfig(r->server);
|
||||
SSLConnRec *sslconn;
|
||||
SSLDirConfigRec *dc = myDirConfig(r);
|
||||
const char *user, *auth_line, *username, *password;
|
||||
|
||||
@@ -1375,15 +1374,15 @@ int ssl_hook_UserCheck(request_rec *r)
|
||||
|
||||
/*
|
||||
* We decline operation in various situations...
|
||||
* - TLS not enabled
|
||||
* - client did not present a certificate
|
||||
* - SSLOptions +FakeBasicAuth not configured
|
||||
* - r->user already authenticated
|
||||
* - ssl not enabled
|
||||
* - client did not present a certificate
|
||||
*/
|
||||
if (!((sc->enabled == SSL_ENABLED_TRUE || sc->enabled == SSL_ENABLED_OPTIONAL)
|
||||
&& sslconn && sslconn->ssl && sslconn->client_cert) ||
|
||||
!(dc->nOptions & SSL_OPT_FAKEBASICAUTH) || r->user)
|
||||
{
|
||||
if (!modssl_request_is_tls(r, &sslconn)
|
||||
|| !sslconn->client_cert
|
||||
|| !(dc->nOptions & SSL_OPT_FAKEBASICAUTH)
|
||||
|| r->user) {
|
||||
return DECLINED;
|
||||
}
|
||||
|
||||
@@ -1509,12 +1508,14 @@ int ssl_hook_Fixup(request_rec *r)
|
||||
const char *servername;
|
||||
#endif
|
||||
STACK_OF(X509) *peer_certs;
|
||||
SSLConnRec *sslconn;
|
||||
SSL *ssl;
|
||||
int i;
|
||||
|
||||
if (!modssl_request_is_tls(r, &ssl)) {
|
||||
if (!modssl_request_is_tls(r, &sslconn)) {
|
||||
return DECLINED;
|
||||
}
|
||||
ssl = sslconn->ssl;
|
||||
|
||||
/*
|
||||
* Annotate the SSI/CGI environment with standard SSL information
|
||||
|
Reference in New Issue
Block a user