<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hello,<div class=""><br class=""></div><div class="">is there a way to make NGINX more forgiving on TLS certificate errors? Or would that have to be done in OpenSSL instead?</div><div class=""><br class=""></div><div class="">When I use openssl s_client, I get the following errors from the upstream server:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">140226185430680:error:0407006A:rsa routines:RSA_padding_check_PKCS1_type_1:block type is not 01:rsa_pk1.c:103:</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">140226185430680:error:04067072:rsa routines:RSA_EAY_PUBLIC_DECRYPT:padding check failed:rsa_eay.c:705:</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">140226185430680:error:1408D07B:SSL routines:ssl3_get_key_exchange:bad signature:s3_clnt.c:2010:</span></div></div><div class=""><br class=""></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class="">This causes NGINX (reverse proxy) to return 502 Bad Gateway to the browser.</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class="">The NGINX error log shows:</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class="">2018/08/29 09:09:59 [crit] 11633#11633: *28 SSL_do_handshake() failed (SSL: error:0407006A:rsa routines:RSA_padding_check_PKCS1_type_1:block type is not 01 error:04067072:rsa routines:RSA_EAY_PUBLIC_DECRYPT:padding check failed error:1408D07B:SSL routines:ssl3_get_key_exchange:bad signature) while SSL handshaking to upstream, client: 192.168.1.66, server: <a href="http://s5.example.com" class="">s5.example.com</a>, request: "GET /xyz</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class="">I have added “</span><span style="font-family: Menlo; background-color: rgb(255, 255, 255);" class="">proxy_ssl_verify off;</span>”, but that did not make any difference.</div><div class=""><br class=""></div><div class="">Surprisingly, the browser (directly to the upstream server) does not complain about the TLS error.</div><div class=""><br class=""></div><div class="">Is there anything else I can do either in NGINX or openssl to suppress the 502 Bad Gateway?</div><div class=""><br class=""></div><div class="">Thanks…</div><div class=""><br class=""></div><div class="">Roger</div><div class=""><br class=""></div><div class="">PS: I don’t have control over the upstream server, so I can’t fix the root cause (faulty certificate).</div><div class=""><br class=""></div></body></html>