Skip to content

Close SecureTransport native sockets without a TLS context - #657

Open
bsergean wants to merge 1 commit into
masterfrom
fix/securetransport-socket-close
Open

bsergean wants to merge 1 commit into
masterfrom
fix/securetransport-socket-close

Conversation

@bsergean

Copy link
Copy Markdown
Collaborator

Calling SocketAppleSSL::close() before a TLS context existed returned without closing an adopted native descriptor. This could keep the descriptor open until the socket object was destroyed. Always close the native socket after optionally releasing the TLS context, matching the OpenSSL and MbedTLS backends.

The regression test uses an unconnected local descriptor and checks immediate closure with and without a TLS context. It failed on master and passes with the fix; both cases take less than a millisecond and use no sleeps or timeout waits.

Validation: complete SecureTransport suite, 31/31 passed; TLS adapter tests, 28 assertions passed. Production builds as C++11 with warnings treated as errors (legacy SecureTransport deprecation warnings excluded). git clang-format and git diff --check pass.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant