grahamedgecombe / nginx-ct

Certificate Transparency module for nginx.
https://grahamedgecombe.com/projects/nginx-ct
ISC License
176 stars 29 forks source link

421 Response from nginx when certs and /path/to/scts defined in "http" and using client certificate #23

Closed cyanide1959 closed 7 years ago

cyanide1959 commented 7 years ago

Background: I have a multidomain cert from Letsencrypt which is used for all vhosts and is defined in http context, along with the path to scts. One vhost requires a client certificate, which is defined in the server context.

Result: all vhosts work as expected except for the one with a client certificate defined. That one gives an http 421 (Misdirected Request) response.

When the nginx-ct module is not loaded (and no scts are defined), that vhost works as expected.

grahamedgecombe commented 7 years ago

To help me reproduce:

What version of nginx/openssl are you using? Is it possible for you to provide the relevant snippets from the nginx config file?

cyanide1959 commented 7 years ago

nginx 1.13.0 Openssl 1.0.2k FreeBSD 11.0amd64

I'll provide nginx.conf and two vhosts. One is a rainloop install which requires a client cert. One is a mailman install which does not.

nginx.conf.txt domain1.com.txt domain2.conf.txt

alexyangjie commented 7 years ago

Same problem here. nginx 1.13.0 openssl 1.1.0e CentOS 7

The problem has been there for a long time. After commenting out relevant directives for nginx-ct, the problem has gone.

grahamedgecombe commented 7 years ago

I've not yet been able to reproduce this. A few more questions:

or alternatively, can you provide a minimal but complete nginx configuration demonstrating the issue with self-signed certs?

alexyangjie commented 7 years ago

I think this issue is caused by the incorrect handling of 421 response code from nginx, where the same connection is reused for different domains with different security settings in one ip address under http2. More details here: https://bugs.chromium.org/p/chromium/issues/detail?id=546991

I have removed the nginx-ct module, recompiled, and the same problem occurred again. So this is not related to nginx-ct.

grahamedgecombe commented 7 years ago

Okay, thanks. I'll close this but if someone does find evidence that nginx-ct is causing problems then please feel free to re-open.