Skip to content

asyncio: add ssl_object extra info #69301

Closed

Description

@vstinner
BPO 25114
Nosy @gvanrossum, @vstinner, @mathieui, @1st1
Files
  • ssl_object.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2015-09-21.16:29:13.518>
    created_at = <Date 2015-09-14.22:00:46.948>
    labels = ['expert-asyncio']
    title = 'asyncio: add ssl_object extra info'
    updated_at = <Date 2015-09-21.20:22:27.657>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2015-09-21.20:22:27.657>
    actor = 'python-dev'
    assignee = 'none'
    closed = True
    closed_date = <Date 2015-09-21.16:29:13.518>
    closer = 'vstinner'
    components = ['asyncio']
    creation = <Date 2015-09-14.22:00:46.948>
    creator = 'vstinner'
    dependencies = []
    files = ['40468']
    hgrepos = []
    issue_num = 25114
    keywords = ['patch', '3.5regression']
    message_count = 8.0
    messages = ['250705', '250706', '250978', '251233', '251236', '251237', '251238', '251251']
    nosy_count = 5.0
    nosy_names = ['gvanrossum', 'vstinner', 'python-dev', 'mathieui', 'yselivanov']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue25114'
    versions = ['Python 3.4', 'Python 3.5', 'Python 3.6']

    Activity

    1. vstinner commented on Sep 14, 2015

      @vstinner
      MemberAuthor

      Attached patch adds the "ssl_object" extra information to SSL sockets. For the legacy SSL implementation, it's a ssl.SSLSocket instance. For the new SSL implementation, it's a ssl.SSLObject instance.

      ssl.SSLObject and ssl.SSLSocket have a similar but different API. Both classes provide important methods like getpeercert().

      This issue fixes a regressions of Python 3.5 compared to Python 3.4 in asyncio SSL sockets: it's no more possible to get the peer certificate as a binary object (only as text). See the issue bpo-22768.

      My patch adds also unit tests on SSL extra info. We only had poor unit tests on these info.

    2. vstinner commented on Sep 14, 2015

      @vstinner
      MemberAuthor

      Workaround for Python 3.5.0: force the legacy SSL implementation. For example, monkey patch the asyncio module with:

      asyncio.sslproto._is_sslproto_availabe=lambda: False
    3. vstinner commented on Sep 18, 2015

      @vstinner
      MemberAuthor

      Guido? Yury? Can you please review attached patch? It looks like a Python 3.5 regression.

    4. 1st1 commented on Sep 21, 2015

      @1st1
      Member

      the patch lgtm

    5. python-dev commented on Sep 21, 2015

      python-devmannequin
      Mannequin

      New changeset d7859e7e7071 by Victor Stinner in branch '3.4':
      Issue bpo-25114, asyncio: add ssl_object extra info to SSL transports
      https://hg.python.org/cpython/rev/d7859e7e7071

    6. changed the title [-]asynico: add ssl_object extra info[/-] [+]asyncio: add ssl_object extra info[/+] on Sep 21, 2015
    7. python-dev commented on Sep 21, 2015

      python-devmannequin
      Mannequin

      New changeset 2f451651038c by Victor Stinner in branch '3.5':
      Issue bpo-25114: Adjust versionchanged in the doc
      https://hg.python.org/cpython/rev/2f451651038c

    8. vstinner commented on Sep 21, 2015

      @vstinner
      MemberAuthor

      I pushed my change to Python 3.4, 3.6 and 3.6 and Github.

      The strange thing is the put a different "versionchanged" tag in the doc: version 3.4.4 in the 3.4 branch, version 3.5.1 in the 3.5 and default branches.

    9. python-dev commented on Sep 21, 2015

      python-devmannequin
      Mannequin

      New changeset 32e3a9e46f70 by Victor Stinner in branch '3.4':
      Issue bpo-25114: Fix test_asyncio
      https://hg.python.org/cpython/rev/32e3a9e46f70

    10. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions