-
Notifications
You must be signed in to change notification settings - Fork 647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net/haproxy: SNI not working when OCSP is enabled #3779
Comments
|
I have same problem. For those who wants back running HaProxy before fix will be issued: 1)locate in /tmp/haproxy/ssl file *.certlist HAProxy should be running fine. This is not final solution, and any restart or save via GUI will overwrite that. |
|
Am I correct to assume that the problem has to do with OCSP? Could you solve this issue by re-issuing a LE cert without OSCP Must Staple, too? |
|
On each row, this was present "ocsp-update on" probably by this commit ac824e3 I dont want to mess with certificates - need running service. |
|
After study of source code, even more elegant solution is Settings->Global parameters->Automatic OSCP updates -> OFF |
|
Thanks for reporting this issue. The following patch should solve this: Be sure to hit the "Apply" button in os-haproxy in order to activate the changes after applying the patch. (EDIT: This is a revised patch that should also address all issues mentioned below.) |
|
Did I run it correctly? It fails. Fetched 558d564 via https://github.com/opnsense/plugins |
|
@mnaiman That's because the previous patch already modified this file. In order to be 100% sure, reinstall the plugin... ...and apply the patch again. |
|
Perfect, now configs are syntactical correct in both cases and HAProxy starts! Still have problem that certificates are not stapled (firefox complaining) but need to investigate why and if it is error just my side or wider. |
|
It seems, firefox is right |
|
@mnaiman Maybe third time's a charm? Please try the 3rd patch revision. FYI, HAProxy now provides a neat way to see OCSP update status: |
|
|
|
Yes, I confirm, that OSCP is working now. Firefox is fine. |
|
@fraenki The following issues are fixed for me:
The following issue is still present for me:
Workaround: Once the default certificate is set to "none" HAProxy accepts the config and starts fine. |
|
@TheHellSite The error suggests that there is something odd with your certificate. Please provide the output of the following commands: |
The default "INVALID_SNI" certificate is self-signed and used to hide the real certificates if no valid SNI is provided by the accessing client. |
I was able to reproduce this error with an arbitrary self-signed certificate. There's not much I can do about it right now. The best workaround would probably be to avoid self-signed certificates if OCSP auto updates are enabled (use ACME certificates instead). My gut feeling is that this may be a limitation or bug in HAProxy. I've reported this to the HAProxy project to get a confirmation. Please note that I consider the initially reported bug fixed. Everything else should be reported as NEW issues. Every bug deserves it's own issue. 😁 Thanks! |
The HAProxy developers confirmed that this error message is misleading. They will probably change this error message and the HAProxy behaviour in a future release. I've implemented a workaround for this issue: os-haproxy will first check the OCSP data of every certificate before enabling OCSP updates for it. This will be available in os-haproxy 4.3. |





Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
Describe the bug
SNI does not seem to be working in HAProxy 4.2. It did for me with HAProxy 4.1. Now it always uses the Default Certificate under Public Services -> "My HTTPS Frontend" -> SSL Offloading. When opening a website that does not match the CN of the default cert it is still used and i get a NET::ERR_CERT_COMMON_NAME_INVALID
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A different cert should be used
Environment
OPNsense 24.1 (amd64).
AMD EPYC 7282 16-Core Processor (4 cores, 4 threads) (VM under Proxmox)
HAProxy 4.2
The text was updated successfully, but these errors were encountered: