#3798 Don't require certificate for TLS clients#3825
#3798 Don't require certificate for TLS clients#3825liviuchircu merged 1 commit intoOpenSIPS:3.6from
Conversation
|
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 |
|
@rsmck and @NormB -- I really appreciate the work and fully documented issue and PR here, bit of a pity that I didn't merge this sooner. I went ahead and played with it a bit, didn't spot any regressions either. The patch is fully backwards-compatible too, for opensips.cfg scripts which explicitly set the client Merging ASAP, I will go for a backport to 3.6 and 3.4 as well, so we keep TLS behavior consistent across all stables. |
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