Skip to content
Snippets Groups Projects
Commit 502a2b59 authored by Francesco Giacomini's avatar Francesco Giacomini
Browse files

Merge branch...

Merge branch '28-using-an-embedded-variable-in-a-subrequest-causes-a-segmentation-fault' into 'master'

Resolve "Using an embedded variable in a subrequest causes a segmentation fault"

Closes #28

See merge request storm2/ngx_http_voms_module!20
parents 572d0bb0 06378394
No related branches found
No related tags found
1 merge request!20Resolve "Using an embedded variable in a subrequest causes a segmentation fault"
Pipeline #77362 passed
......@@ -261,7 +261,7 @@ static MaybeVomsAc retrieve_voms_ac_from_proxy(ngx_http_request_t* r)
{
ngx_log_error(NGX_LOG_DEBUG, r->connection->log, 0, "%s", __func__);
if (!r->http_connection->ssl) {
if (!r->main->http_connection->ssl) {
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, "SSL not enabled");
return boost::none;
}
......
use Test::Nginx::Socket 'no_plan';
run_tests();
__DATA__
=== TEST 1: valid AC, verification of valid VOMS attributes extracted by ngx_http_voms_module
--- main_config
env X509_VOMS_DIR=t/vomsdir;
env X509_CERT_DIR=t/trust-anchors;
--- http_config
server {
error_log logs/error.log debug;
listen 8443 ssl;
ssl_certificate ../../certs/nginx_voms_example.cert.pem;
ssl_certificate_key ../../certs/nginx_voms_example.key.pem;
ssl_client_certificate ../../trust-anchors/igi-test-ca.pem;
ssl_verify_depth 10;
ssl_verify_client on;
location = / {
auth_request /authz;
default_type text/plain;
echo $some_var;
}
location = /authz {
internal;
set $some_var $voms_user;
return 200;
}
}
--- config
location = / {
error_log logs/error-proxy.log debug;
proxy_pass https://localhost:8443;
proxy_ssl_certificate ../../certs/3.cert.pem;
proxy_ssl_certificate_key ../../certs/3.key.pem;
}
--- request
GET /
--- response_body
/C=IT/O=IGI/CN=test0
--- error_code: 200
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment