Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] SSL: fix order of checks during SSL certificate verification

Piotr Sikora
August 09, 2016 03:52PM
Hey Maxim,

> This behaviour is explicitly documented for years. The BUGS
> section outlines that the API is not intuitive and requires use of
> SSL_get_peer_certificate() in addition ot SSL_get_verify_result().

Exactly.

> And this is what nginx does. I don't see compelling reasons to
> change the order of the calls here.

No, it doesn't, which is the reason for this patch in the first
place... NGINX uses the result of SSL_get_verify_result() without
calling SSL_get_peer_certificate(), which is what the BUGS section
requires.

Also, this breaks implementations (i.e. BoringSSL) that are a bit more
strict and don't use X509_V_OK as the initial value.

> This looks like a separate patch, or two patches.

Fair enough.

> Though I'm
> somewhat sceptical about the use of "upstream" and "client" in
> error messages introduced, this looks like a wrong approach for a
> generic SSL code.

What you would prefer, then?

1. Returning error string back the the caller?
2. Returning "rc" back to the caller and adding another function to
abstract X509_verify_cert_error_string()?
3. Adding the caller string ("client" or "upstream") as the parameter
and writing error from within the function?

> As well as magic values in the "verify" argument,

Good call.

> and the change of the ngx_ssl_check_host() semantics.

You mean the introduction of error logs? If so, then it seems that
returning "rc" and adding another function to retrieve the error
string would be the best way to keep the behavior as close to the
existing one as possible.

Best regards,
Piotr Sikora

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] SSL: fix order of checks during SSL certificate verification

Piotr Sikora 971 August 02, 2016 06:26PM

Re: [PATCH] SSL: fix order of checks during SSL certificate verification

Maxim Dounin 344 August 03, 2016 11:56PM

Re: [PATCH] SSL: fix order of checks during SSL certificate verification

Piotr Sikora 240 August 09, 2016 03:52PM

Re: [PATCH] SSL: fix order of checks during SSL certificate verification

Maxim Dounin 305 August 17, 2016 08:38PM

Re: [PATCH] SSL: fix order of checks during SSL certificate verification

Piotr Sikora 238 August 18, 2016 10:48PM

Re: [PATCH] SSL: fix order of checks during SSL certificate verification

Maxim Dounin 250 August 21, 2016 10:04AM

Re: [PATCH] SSL: fix order of checks during SSL certificate verification

Piotr Sikora 201 August 31, 2016 06:26PM

Re: [PATCH] SSL: fix order of checks during SSL certificate verification

Maxim Dounin 215 September 01, 2016 11:28AM

Re: [PATCH] SSL: fix order of checks during SSL certificate verification

Piotr Sikora 216 September 01, 2016 05:18PM

Re: [PATCH] SSL: fix order of checks during SSL certificate verification

Maxim Dounin 231 September 02, 2016 08:50AM

Re: [PATCH] SSL: fix order of checks during SSL certificate verification

Piotr Sikora 339 September 02, 2016 07:20PM

Re: [PATCH] SSL: fix order of checks during SSL certificate verification

Maxim Dounin 175 September 03, 2016 11:30AM

Re: [PATCH] SSL: fix order of checks during SSL certificate verification

Piotr Sikora 233 September 03, 2016 06:28PM

Re: [PATCH] SSL: fix order of checks during SSL certificate verification

Maxim Dounin 359 September 05, 2016 10:18AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 118
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