Welcome! Log In Create A New Profile

Advanced

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

Maxim Dounin
August 03, 2016 11:56PM
Hello!

On Tue, Aug 02, 2016 at 03:24:55PM -0700, Piotr Sikora wrote:

> # HG changeset patch
> # User Piotr Sikora <piotrsikora@google.com>
> # Date 1470107238 25200
> # Mon Aug 01 20:07:18 2016 -0700
> # Node ID cd72e0a1164abd70aafdb391b3470869508532e5
> # Parent d43ee392e825186545d81e683b88cc58ef8479bc
> SSL: fix order of checks during SSL certificate verification.
>
> SSL_get_verify_result() should be called only if certificate was presented
> by the peer, otherwise returned value is the default one, which happens to
> be X509_V_OK, but it doesn't indicate success and it's considered a bug:
> https://www.openssl.org/docs/manmaster/ssl/SSL_get_verify_result.html

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().
And this is what nginx does. I don't see compelling reasons to
change the order of the calls here.

> While there, move common verification logic to ngx_ssl_verify_client() and
> ngx_ssl_check_host() in order to make the callers crypto-library-agnostic.

This looks like a separate patch, or two patches. 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. As well as magic values in the "verify" argument,
and the change of the ngx_ssl_check_host() semantics.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
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 969 August 02, 2016 06:26PM

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

Maxim Dounin 343 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 237 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 200 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 338 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: 141
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