Skip to content

using deprecated SSLContext() with no ssl.PROTOCOL_TLS_CLIENT flag #384

Closed

Description

@graingert

see

self._ssl_context = SSLContext() if ssl_context is None else ssl_context

Activity

  1. graingert commented on Jul 31, 2021

    @graingert
    ContributorAuthor

    I tried setting this to SSLContext(ssl.PROTOCOL_TLS_CLlENT) but then ssl couldn't get the local issuer certificate of hypercorn

  2. lovelydinosaur commented on Nov 16, 2021

    @lovelydinosaur
    Member

    This is..... brief. 😅

    What's the issue here?

  3. graingert commented on Nov 16, 2021

    @graingert
    ContributorAuthor

    This is..... brief. 😅

    What's the issue here?

    Calling SSLContext() (with no arguments) is deprecated and throws a warning with them enabled

  4. lovelydinosaur commented on Nov 16, 2021

    @lovelydinosaur
    Member

    Ah yes... https://docs.python.org/3/library/ssl.html#ssl.SSLContext

    Deprecated since version 3.10: SSLContext without protocol argument is deprecated. The context class will either require PROTOCOL_TLS_CLIENT or PROTOCOL_TLS_SERVER protocol in the future.

    Assume this is no longer valid, since we're using ssl.create_default_context() now... https://github.com/encode/httpcore/blob/master/httpcore/_ssl.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions