Environment
- macOS 26.3 (25D125)
- Apple Command Line Tools python3: 3.9.6 (LibreSSL 2.8.3)
Issue
Creating a TCP tunnel can fail on macOS when using the system/CLT python that is built against LibreSSL.
Observed error:
SSLError: ('No cipher can be selected.',)
- Trace points to code that creates
SSLPSKContext(...); ctx.set_ciphers("PSK")
Workaround
- Using an OpenSSL-based Python build (e.g. Homebrew python3.13) makes the TCP tunnel path work.
Request
- Could pymobiledevice3 detect LibreSSL at runtime and fail with a clearer, actionable message (e.g. "LibreSSL python is not supported for PSK/TCP tunnels; use an OpenSSL python build")?
- If there is a compatible cipher string for LibreSSL that should work, I can help test.