Skip to content

Python should return comperhansive error when SSLContext cannot be created #73144

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

Closed
Kentzo mannequin opened this issue Dec 13, 2016 · 4 comments
Closed

Python should return comperhansive error when SSLContext cannot be created #73144

Kentzo mannequin opened this issue Dec 13, 2016 · 4 comments
Assignees
Labels
topic-SSL type-feature A feature request or enhancement

Comments

@Kentzo
Copy link
Mannequin

Kentzo mannequin commented Dec 13, 2016

BPO 28958
Nosy @tiran, @Kentzo
PRs
  • bpo-28958: Improve SSLContext error reporting. #3414
  • [3.6] bpo-28958: Improve SSLContext error reporting. (GH-3414) #3432
  • [2.7] bpo-28958: Improve SSLContext error reporting. (GH-3414) #3433
  • [2.7] bpo-28958: Improve SSLContext error reporting. (GH-3414) #3436
  • 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 = <Date 2017-09-07.23:48:25.166>
    created_at = <Date 2016-12-13.06:55:01.676>
    labels = ['expert-SSL', 'type-feature']
    title = 'Python should return comperhansive error when SSLContext cannot be created'
    updated_at = <Date 2017-09-07.23:48:25.166>
    user = 'https://github.com/Kentzo'

    bugs.python.org fields:

    activity = <Date 2017-09-07.23:48:25.166>
    actor = 'christian.heimes'
    assignee = 'christian.heimes'
    closed = True
    closed_date = <Date 2017-09-07.23:48:25.166>
    closer = 'christian.heimes'
    components = ['SSL']
    creation = <Date 2016-12-13.06:55:01.676>
    creator = 'Ilya.Kulakov'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 28958
    keywords = ['patch']
    message_count = 4.0
    messages = ['283078', '301637', '301649', '301650']
    nosy_count = 2.0
    nosy_names = ['christian.heimes', 'Ilya.Kulakov']
    pr_nums = ['3414', '3432', '3433', '3436']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue28958'
    versions = ['Python 3.5', 'Python 3.6']

    @Kentzo
    Copy link
    Mannequin Author

    Kentzo mannequin commented Dec 13, 2016

    When SSLContext cannot be created, python raises an SSLError exception with "failed to allocate SSL context".

    https://hg.python.org/cpython/file/4def2a2901a5/Modules/_ssl.c#l2260

    This is completely useless to debug the error. In fact many errors raised from _ssl.c are non-helpful.

    Python's SSLError should be extended to include comprehensive information about OpenSSL's error stack which can be extracted with ERR_get_error_line.

    @Kentzo Kentzo mannequin assigned tiran Dec 13, 2016
    @Kentzo Kentzo mannequin added topic-SSL type-feature A feature request or enhancement labels Dec 13, 2016
    @tiran
    Copy link
    Member

    tiran commented Sep 7, 2017

    New changeset 17c9ac9 by Christian Heimes in branch 'master':
    bpo-28958: Improve SSLContext error reporting. (bpo-3414)
    17c9ac9

    @tiran
    Copy link
    Member

    tiran commented Sep 7, 2017

    New changeset 611a3ea by Christian Heimes in branch '2.7':
    [2.7] bpo-28958: Improve SSLContext error reporting. (GH-3414) (bpo-3433)
    611a3ea

    @tiran
    Copy link
    Member

    tiran commented Sep 7, 2017

    New changeset 6c99b65 by Christian Heimes in branch '3.6':
    [3.6] bpo-28958: Improve SSLContext error reporting. (GH-3414) (bpo-3432)
    6c99b65

    @tiran tiran closed this as completed Sep 7, 2017
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    topic-SSL type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant