Skip to content

Remove hostflags from PySSLContext #89562

Closed

Description

@ramikg
mannequin
BPO 45399
Nosy @tiran, @ramikg
PRs
  • gh-89562: Remove hostflags from PySSLContext #28602
  • 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 = 'https://github.com/tiran'
    closed_at = None
    created_at = <Date 2021-10-07.09:36:55.983>
    labels = ['expert-SSL', 'type-feature', '3.10', '3.11']
    title = 'Remove hostflags from PySSLContext'
    updated_at = <Date 2021-10-09.22:35:38.217>
    user = 'https://github.com/ramikg'

    bugs.python.org fields:

    activity = <Date 2021-10-09.22:35:38.217>
    actor = 'ramikg'
    assignee = 'christian.heimes'
    closed = False
    closed_date = None
    closer = None
    components = ['SSL']
    creation = <Date 2021-10-07.09:36:55.983>
    creator = 'ramikg'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45399
    keywords = []
    message_count = 6.0
    messages = ['403368', '403514', '403519', '403524', '403527', '403557']
    nosy_count = 3.0
    nosy_names = ['christian.heimes', 'ramikg', 'komugi']
    pr_nums = ['28602']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue45399'
    versions = ['Python 3.10', 'Python 3.11']

    Activity

    1. ramikg commented on Oct 7, 2021

      ramikgmannequin
      MannequinAuthor

      The PySSLContext struct mentions that "OpenSSL has no API to get hostflags from X509_VERIFY_PARAM* struct. We have to maintain our own copy".
      Since OpenSSL 1.1.0i added the function X509_VERIFY_PARAM_get_hostflags, this statement is no longer true.
      Because Python 3.10 requires OpenSSL 1.1.1 (PEP-644), we no longer have to maintain a copy of the host flags.

      The related PR removes the hostflags member from the PySSLContext struct.

    2. komugi commented on Oct 9, 2021

      komugimannequin
      Mannequin

      Hi, I would like to work on it. I'll send the PR tomorrow.

    3. ramikg commented on Oct 9, 2021

      ramikgmannequin
      MannequinAuthor

      In addition to #28602?
      What would the PR include?

    4. komugi commented on Oct 9, 2021

      komugimannequin
      Mannequin

      You've already done it, my bad. It was a waste of time.

    5. tiran commented on Oct 9, 2021

      @tiran
      Member

      I have limited time to review code at the moment. It might take a while until I can get back to you.

    6. ramikg commented on Oct 9, 2021

      ramikgmannequin
      MannequinAuthor

      @komugi The same code written independently by multiple people is probably the most effective and least cost-efficient form of code review.

      @christian.heimes Of course, there is no hurry.

    7. transferred this issue fromon Apr 10, 2022
    8. added and removed
      3.11only security fixes
      on Apr 18, 2025
    9. added a commit that references this issue on Apr 18, 2025
    10. gpshead commented on Apr 18, 2025

      @gpshead
      Member

      thanks for the code cleanup!

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

    Metadata

    Metadata

    Assignees

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions