Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
benfogle opened this issue Sep 19, 2022 · 0 comments
Closed

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

benfogle opened this issue Sep 19, 2022 · 0 comments
Labels
topic-SSL type-bug An unexpected behavior, bug, or error

Comments

@benfogle
Copy link
Contributor

benfogle commented Sep 19, 2022

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

@benfogle benfogle added the type-bug An unexpected behavior, bug, or error label Sep 19, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Mar 22, 2023
…pythonGH-96932)

(cherry picked from commit af9c34f)

Co-authored-by: Benjamin Fogle <benfogle@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Mar 22, 2023
…pythonGH-96932)

(cherry picked from commit af9c34f)

Co-authored-by: Benjamin Fogle <benfogle@gmail.com>
Yhg1s pushed a commit that referenced this issue Mar 24, 2023
GH-96932) (#102918)

gh-96931: Fix incorrect results in ssl.SSLSocket.shared_ciphers (GH-96932)
(cherry picked from commit af9c34f)

Co-authored-by: Benjamin Fogle <benfogle@gmail.com>
Yhg1s pushed a commit that referenced this issue Mar 24, 2023
GH-96932) (#102919)

gh-96931: Fix incorrect results in ssl.SSLSocket.shared_ciphers (GH-96932)
(cherry picked from commit af9c34f)

Co-authored-by: Benjamin Fogle <benfogle@gmail.com>
@Yhg1s Yhg1s closed this as completed Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-SSL type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants