#3798 Don't require certificate for TLS clients#3825
Open
rsmck wants to merge 1 commit intoOpenSIPS:3.6from
Open
#3798 Don't require certificate for TLS clients#3825rsmck wants to merge 1 commit intoOpenSIPS:3.6from
rsmck wants to merge 1 commit intoOpenSIPS:3.6from
Conversation
Member
|
Tested this with WolfSSL since you mentioned it wasn't covered. I applied the patch to master (4.0.0-dev, Setup: Two separate Debian 13 nodes, opensips-1 as TLS server (OpenSSL 3.5.4, with cert) and opensips-2 as TLS client (WolfSSL 5.4.0, no cert/key configured). UDP OPTIONS sent to opensips-2, which relays to opensips-1 over TLS via Results: All passing. Key log lines confirming the new code paths: No crashes, no errors, transaction cleaned up normally. One thing that might be worth adding — a docs update for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements a fix for #3798
Details
OpenSIPS requires a certificate when configuring a client_domain, even if mTLS is not required. As a result it's easiest to use the server certificate. However, this means that OpenSIPS will send this certificate (these will be without a clientAuth EKU) if the server requests a client certificate. It should be possible to establish the connection without the Client Certificate (see RFC 8446 4.4.2.4 and RFC 5426 7.4.6 ("If no suitable certificate is available, the client MUST send a certificate message containing no certificates. That is, the certificate_list structure has a length of zero")
Solution
Server domains: Continue to require certificates (using defaults if not specified), should be no change to behaviour here.
Client domains: Can now be configured without certificate and private_key parameters.
When the destination TLS server requests a client certificate but one isn't configured, an empty certificate message is sent per RFC 8446 / 5246
Compatibility
Tested with OpenSIPS 3.6 + LibreSSL 3.3.6
Not tested with WolfSSL
Closing issues
Closes #3798