Repository navigation
Conversation
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
Use
wolfSSLv23_client_method()when initializing client-only TLS domains.This fixes outbound TLS handshakes to ECDSA-only peers with wolfSSL 5.6.6, bundled by OpenSIPS 3.6. This PR is intended for merging into master followed by a backport to 3.6.
Details
Currently, client domains use the generic
wolfSSLv23_method(). With wolfSSL 5.6.6, subsequently callingwolfSSL_set_connect_state()does not fully rebuild the cipher suites and signature algorithms for client use.A standalone harness reproducing the module's client initialization and connection setup reproduces handshake failures with ECDSA-only servers on both TLS 1.2 and TLS 1.3, returning error
-313(received fatal alert). RSA-server handshakes succeed.Master's bundled wolfSSL 5.9.1 already handles these handshakes successfully with either method. The demonstrated bug-fix benefit is therefore for 3.6; on master, the change explicitly selects the appropriate client API.
Solution
Select
wolfSSLv23_client_method()whenDOM_FLAG_CLIis set andDOM_FLAG_SRVis not set. All other domains retain the existing generic method.This initializes client cipher suites and signature algorithms correctly from the start, without relying on a later role switch to rebuild them.
Validation using the standalone harness:
The patched
tls_wolfsslmodule also compiled and linked successfully against master's pinned wolfSSL dependency.Limitations: handshake validation used a standalone library harness, not a full OpenSIPS integration test. Tests ran on Linux ARM64. wolfSSL 5.4.0, bundled by older OpenSIPS branches, was not tested.
Compatibility
No configuration migration is required. Server-domain initialization and subsequent protocol-version configuration are unchanged.
No regressions were observed in the tested handshake cases, including cases with and without a configured client certificate and with explicit minimum/maximum TLS versions. No SIP signaling behavior is changed.
Please consider backporting this change to 3.6.
Closing issues
None.