← 输入框|github.com|刷新
Skip to content

Example suggest to use a TLSv1 socket #76189

Closed

Description

@kroeckx
mannequin
BPO 32008
Nosy @tiran, @benjaminp, @matrixise, @csabella, @miss-islington
PRs
  • bpo-32008: don't use PROTOCOL_TLSv1 in example #5789
  • [3.7] bpo-32008: don't use PROTOCOL_TLSv1 in example (GH-5789) #5790
  • [3.6] bpo-32008: don't use PROTOCOL_TLSv1 in example (GH-5789) #5791
  • [2.7] bpo-32008: don't use PROTOCOL_TLSv1 in example (GH-5789) #5792
  • bpo-32008: Prefer client or TLSv1_2 in examples #5797
  • [3.7] bpo-32008: Prefer client or TLSv1_2 in examples (GH-5797) #16026
  • [3.8] bpo-32008: Prefer client or TLSv1_2 in examples (GH-5797) #16027
  • 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 2019-09-12.11:25:55.622>
    created_at = <Date 2017-11-11.19:36:05.589>
    labels = ['3.8', 'type-feature', '3.7', '3.9', 'docs']
    title = 'Example suggest to use a TLSv1 socket'
    updated_at = <Date 2019-09-12.11:25:55.620>
    user = 'https://bugs.python.org/kroeckx'

    bugs.python.org fields:

    activity = <Date 2019-09-12.11:25:55.620>
    actor = 'matrixise'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2019-09-12.11:25:55.622>
    closer = 'matrixise'
    components = ['Documentation']
    creation = <Date 2017-11-11.19:36:05.589>
    creator = 'kroeckx'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 32008
    keywords = ['patch']
    message_count = 13.0
    messages = ['306093', '312449', '312465', '312467', '312468', '312469', '312483', '312484', '339855', '352109', '352117', '352122', '352123']
    nosy_count = 7.0
    nosy_names = ['christian.heimes', 'benjamin.peterson', 'docs@python', 'matrixise', 'kroeckx', 'cheryl.sabella', 'miss-islington']
    pr_nums = ['5789', '5790', '5791', '5792', '5797', '16026', '16027']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue32008'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']

    Activity

    1. kroeckx commented on Nov 11, 2017

      kroeckxmannequin
      MannequinAuthor

      Here:
      https://docs.python.org/3/library/ssl.html#ssl.SSLContext.check_hostname

      And here:
      https://docs.python.org/2/library/ssl.html#ssl.SSLContext.check_hostname

      It uses ssl.PROTOCOL_TLSv1, which is a bad example. Please change it to PROTOCOL_SSLv23 or PROTOCOL_TLS.

      (Those were the first 2 examples I could find via google on how to create an ssl connection using python.)

    2. added
      docs
      type-feature
      on Nov 11, 2017
    3. csabella commented on Feb 21, 2018

      @csabella
      Contributor

      Christian,

      Would you have any feedback on this? Thanks!

    4. benjaminp commented on Feb 21, 2018

      @benjaminp
      Contributor

      New changeset e9edee0 by Benjamin Peterson in branch 'master':
      bpo-32008: don't use PROTOCOL_TLSv1 in example (GH-5789)
      e9edee0

    5. miss-islington commented on Feb 21, 2018

      @miss-islington
      Contributor

      New changeset e5d38de by Miss Islington (bot) in branch '3.7':
      bpo-32008: don't use PROTOCOL_TLSv1 in example (GH-5789)
      e5d38de

    6. miss-islington commented on Feb 21, 2018

      @miss-islington
      Contributor

      New changeset f8a794c by Miss Islington (bot) in branch '3.6':
      bpo-32008: don't use PROTOCOL_TLSv1 in example (GH-5789)
      f8a794c

    7. benjaminp commented on Feb 21, 2018

      @benjaminp
      Contributor

      New changeset 6c7edba by Benjamin Peterson in branch '2.7':
      [2.7] closes bpo-32008: don't use PROTOCOL_TLSv1 in example (GH-5789) (bpo-5792)
      6c7edba

    8. tiran commented on Feb 21, 2018

      @tiran
      Member

      For 3.6 to 3.8 I'd prefer TLS_PROTOCOL_CLIENT. It also sets check_hostname and verify_mode to sane, safe values, too.

    9. added
      3.7 (EOL)
      3.8 (EOL)
      on Feb 21, 2018
    10. reopened this on Feb 21, 2018
    11. tiran commented on Feb 21, 2018

      @tiran
      Member

      Err, I meant PROTOCOL_TLS_CLIENT:

      >>> import ssl
      >>> context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
      >>> context.check_hostname
      True
      >>> context.verify_mode
      <VerifyMode.CERT_REQUIRED: 2>
    12. csabella commented on Apr 10, 2019

      @csabella
      Contributor

      @christian.heimes, this one looks ready to merge and close. Please take a look when you get a chance. Thanks!

    13. matrixise commented on Sep 12, 2019

      @matrixise
      Member

      New changeset 894d0f7 by Stéphane Wirtel (Christian Heimes) in branch 'master':
      bpo-32008: Prefer client or TLSv1_2 in examples (GH-5797)
      894d0f7

    14. matrixise commented on Sep 12, 2019

      @matrixise
      Member

      New changeset 07b4148 by Stéphane Wirtel (Miss Islington (bot)) in branch '3.7':
      bpo-32008: Prefer client or TLSv1_2 in examples (GH-5797) (GH-16026)
      07b4148

    15. matrixise commented on Sep 12, 2019

      @matrixise
      Member

      New changeset 1fc84b6 by Stéphane Wirtel in branch '3.8':
      [3.8] bpo-32008: Prefer client or TLSv1_2 in examples (GH-5797) (GH-16027)
      1fc84b6

    16. matrixise commented on Sep 12, 2019

      @matrixise
      Member

      Hi,

      I have merged the PR of Christian for master, 3.8 & 3.7

      Thank you so much,

    17. 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

      Labels

      3.7 (EOL)3.8 (EOL)3.9 (EOL)docstype-feature

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions