Skip to content

Conversation

@dwoz
Copy link
Contributor

@dwoz dwoz commented Dec 9, 2025

Adds disable_aes_with_tls config option that eliminates redundant AES encryption when TLS with mutual authentication is active, providing performance improvement with 6 security checks including certificate identity verification.

What does this PR do?

What issues does this PR fix or reference?

Fixes

Previous Behavior

Remove this section if not relevant

New Behavior

Remove this section if not relevant

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes/No

Adds disable_aes_with_tls config option that eliminates redundant AES
encryption when TLS with mutual authentication is active, providing
10-50% performance improvement with 6 security checks including
certificate identity verification.
Main Issue: Tests were checking for SSL handshake failures too early. With Tornado's lazy SSL handshaking, TCP connections succeed immediately, but SSL validation happens asynchronously.

test_tcp_ssl.py (20 lines changed):
- Timing fix: Added await asyncio.sleep(1) after connect() to allow SSL handshake to fail
- Stream check: Verify connection closed by checking pub_client._stream.closed()
- Exception handling: Added ssl.SSLError to expected exceptions
- Test isolation: Added minion_opts.pop("ssl", None) to prevent state contamination
- Cleanup: Added process_manager.terminate() for proper process cleanup
- Imports: Added import ssl and import salt.utils.process

test_ws_ssl.py (3 lines changed):
- Test isolation: Added minion_opts.pop("ssl", None)
- Cleanup: Added process_manager.terminate()

These minimal changes fix the test expectations to match the actual async SSL behavior while ensuring proper isolation and cleanup between tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants