I have configured a tomcat application with SSL for client authentication purpose. It is on port 8443. It works fine so that when I try to hit tomcat with client certificate(client.p12) I got success and with another certificate which is not in the keystore gets bad ssl error. So this works.
Then I tried to put nginx in front of tomcat as a proxy but there I am always getting 502. Nginx is also on SSL. The below is the error I am getting.
2018/04/20 17:25:03 [error] 21884#0: *3 SSL_do_handshake() failed (SSL: error:14094412:SSL routines:SSL3_READ_BYTES:sslv3 alert bad certificate:SSL alert number 42) while SSL handshaking to upstream, client: 10.6.8.20, server: 10.6.3.105, request: "GET /print HTTP/1.1", upstream: "https://10.6.3.105:8443/", host: "10.6.3.105"
Can anybody help me to resolve this issue? Ultimately I just want to pass the tomcat certificate through nginx which is also on SSL. ( Nginx(https) -> Tomcat(https) ).
I know this is a strange requirement, but I need this.
Thanks,