Skip to content

ssl.SSLSocket.shared_ciphers always returns server cipher list #96931

Closed
@benfogle

Description

@benfogle

Bug report

The function ssl.SSLSocket.shared_ciphers always returns the server's cipher list, rather than the ciphers common to both client and server. I.e., the same list as ssl.SSLContext.get_ciphers, in a different format.

This is due to the use of SSL_get_ciphers in the implementation, rather than SSL_get_shared_ciphers.

Your environment

  • CPython versions tested on: 3.8.10, 3.12.0a0
  • Operating system and architecture: Ubuntu 20.04, x86_64

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic-SSLtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions