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

check that it's an SSL connection

fix issue #26
parent 7ca002f6
No related branches found
No related tags found
1 merge request!15Check it's an SSL request before dereferencing the ssl field of a connection
......@@ -266,6 +266,11 @@ static MaybeVomsAc retrieve_voms_ac_from_proxy(ngx_http_request_t* r)
return boost::none;
}
if (!r->connection->ssl) {
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, "plain HTTP request");
return boost::none;
}
auto client_cert = X509Ptr{
SSL_get_peer_certificate(r->connection->ssl->connection), X509_free};
if (!client_cert) {
......
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