nginx/nginx — pull request #7 by rohitjoshi (2014-08-18 19:51:09+00:00)
Title: Support for two way/mutual authentication for http proxy upstream 

ngx_http_proxy module support one way authentication using trusted certificate only. If upstream server requires mutual authentication, it fails. I have added support for mutual authentication using certificate and key.

I have validated against Oracle WebLogic11g server.

The logic is as below.

if proxy_ssl_trusted_certificate is configured and (proxy_ssl_certificate or proxy_ssl_certificate_key) configured
it logs warning for proxy_ssl_certificate or proxy_ssl_certificate_key will be ignored.

if proxy_ssl_trusted_certificate is configured then
it use ssl_trusted_certificate for authentication
else if proxy_ssl_certificate and proxy_ssl_certificate_key configured,
it uses both to do two way authentication
else
logs error as either proxy_ssl_trusted_certificate or (proxy_ssl_certificate and proxy_ssl_certificate_key) required.