Skip to content

macOS CLT Python (LibreSSL) can break TCP tunnel: SSLError('No cipher can be selected') when setting PSK ciphers #1570

@khj1212k

Description

@khj1212k

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions