[PATCH] (re-post) Add "optional_no_ca" option to ssl_verify_client to enable app-only CA chain validation
nginx-forum at nginx.us
Sat Sep 15 11:52:30 UTC 2012
Re-post of patch from
Updated version of the patch in the original thread haven't received any new
attention, it seems, and I've received several inquiries now about the
status of this work, so this thread is basically an attempt to draw more
attention to this patch.
Use-case is the same as before - enable CA-chain validation in the
application only - but with all non-CA-chain validation handled by nginx, so
it won't be necessary to duplicate (and possibly mess-up) these details
(handled by openssl) in application code.
For more details on reasoning behind the use-case and the previous comments
on how it should be implemented, please see the original '[PATCH] Add
"pass_only" option to ssl_verify_client to enable app-only validation'
thread (linked for the web interface above).
Notes from original thread on the latest patch incarnation:
> Option is now called "optional_no_ca", as suggested, and allows to check
> certificate parameters except for a trust chain. I've used
> ssl_verify_error_is_optional macro (listing trust-chain related errors)
> from apache 2.4.2 codebase.
> Note that since ngx_ssl_get_client_verify now has to access configuration,
> is accessible from ngx_http_request_t, it wasn't enough to pass
> to it, plus it was only used from ngx_http_ssl_module.c, so I've moved
> modified version of it into ngx_http_ssl_module.c, to avoid having to
> http-only stuff into ngx_event_openssl.c. If that was a bad idea, and
> need to keep that function generic (non-http-only), please suggest
> generic copy should just be kept in ngx_event_openssl.c, it's signature
> be extended to have http-specific options or maybe there should be
> includes for http stuff.
> URL for the patch: https://raw.github.com/gist/3319062/
(I'm not posting the patch inline here, because forum interface seem to
break it anyway, but it can also be found inline in the original thread)
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,230748,230748#msg-230748
More information about the nginx