Fix bus error from boost socket.shutdown in tcp_socket_error() and link statically to OpenSSL #145
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.
Under MacOS (Darwin 23.1, arm64), building with Boost 1.81.0, localproxytest test-cases 'Test source mode" and 'Test source mode with client token' fail due to a bus error when calling connection->socket_.shutdown in tcp_adapter_proxy::tcp_socket_error. The exact same issue is triggered in localproxy, when a connection that's been setup through the tunnel, is subsequently closed (e.g. using SSH to login to the remote end and then logging out).
In addition, OpenSSL is not linked statically when both shared and dynamic libs are available.
Motivation
Without this fix, localproxy is still usable but requires restarting under MacOS whenever a connection through the secure tunnel is closed -- this complicates things further since tunnel credentials must be rotated when the connection drops after localproxy crashes with a bus error.
Modifications
Change summary
Testing
Is your change tested? If not, please justify the reason.
Please list your testing steps and test results.
test_output.zip
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.