Welcome! Log In Create A New Profile

Advanced

Nginx and 400 SSL error handling

Marcello Lorenzi
June 11, 2019 04:26AM
Hi All,

We’re trying to configure a client authentication on an Nginx 1.15.12 and
we noticed a “400 Bad Request - SSL Certificate Error” because a
certificate CA isn’t present into the certificates listed into
“ssl_client_certificate”. This is the configuration for the SSL
authentication.



ssl_verify_client optional;

ssl_client_certificate /usr/local/nginx/ca-test.pem;



Actually we would return a 401 error page instead a 400 error page but we
aren’t able to customize the HTTP code but only the message reported with
this configuration.



error_page 495 @error_ssl_495;



location @error_ssl_495{

return 401 'certificate invalid';

}



Is it possible to adjust also the http error code?



Thanks in advance,

Marcello
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx and 400 SSL error handling

Marcello Lorenzi June 11, 2019 04:26AM

Re: Nginx and 400 SSL error handling

Francis Daly June 11, 2019 04:48AM

Re: Nginx and 400 SSL error handling

Marcello Lorenzi June 12, 2019 10:30AM

Re: Nginx and 400 SSL error handling

fostercarly November 01, 2022 01:28AM

Re: Nginx and 400 SSL error handling

romankris May 01, 2023 02:27AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 317
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready