Skip to content
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

test_ssl: try more protocols in test_options() #69118

Closed
marcosptf mannequin opened this issue Aug 24, 2015 · 6 comments
Closed

test_ssl: try more protocols in test_options() #69118

marcosptf mannequin opened this issue Aug 24, 2015 · 6 comments
Labels
tests Tests in the Lib/test dir type-feature A feature request or enhancement

Comments

@marcosptf
Copy link
Mannequin

marcosptf mannequin commented Aug 24, 2015

BPO 24930
Nosy @tiran, @bitdancer, @vadmium
Files
  • test_options.patch: test fixed from test_ssl.py
  • 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 2016-09-08.15:39:40.221>
    created_at = <Date 2015-08-24.23:18:03.689>
    labels = ['type-feature', 'tests']
    title = 'test_ssl: try more protocols in test_options()'
    updated_at = <Date 2016-09-08.15:39:40.219>
    user = 'https://bugs.python.org/marcosptf'

    bugs.python.org fields:

    activity = <Date 2016-09-08.15:39:40.219>
    actor = 'christian.heimes'
    assignee = 'none'
    closed = True
    closed_date = <Date 2016-09-08.15:39:40.221>
    closer = 'christian.heimes'
    components = ['Tests']
    creation = <Date 2015-08-24.23:18:03.689>
    creator = 'marcosptf'
    dependencies = []
    files = ['40249']
    hgrepos = []
    issue_num = 24930
    keywords = ['patch']
    message_count = 6.0
    messages = ['249078', '249094', '249096', '249097', '258774', '275053']
    nosy_count = 4.0
    nosy_names = ['christian.heimes', 'r.david.murray', 'martin.panter', 'marcosptf']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = 'patch review'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue24930'
    versions = ['Python 2.7']

    @marcosptf
    Copy link
    Mannequin Author

    marcosptf mannequin commented Aug 24, 2015

    Hello to everyone!!!

    This test https://hg.python.org/cpython/file/2.7/Lib/test/test_ssl.py on method
    ContextTests.test_options, is broker becouse has a error between lines 717 ~ 719;

    On 717 line, has a comment about # OP_ALL | OP_NO_SSLv2 is the default value, but
    it's not true, becouse this method is fail when i run it =>
    py.test Lib/test/test_ssl.py -k ContextTests
    results ===>
    https://hg.python.org/cpython/file/2.7/Lib/test/test_ssl.py#l717
    *** AssertionError: 2164261887 != 2197816319L

    I fixed this method and i wrote new cases about test_options using a lot of options
    from ssl.PROTOCOL, for example:
    ssl.PROTOCOL_TLSv1
    ssl.PROTOCOL_TLSv1_1
    ssl.PROTOCOL_TLSv1_2
    ssl.PROTOCOL_SSLv2
    ssl.PROTOCOL_SSLv23
    ssl.PROTOCOL_SSLv3

    on this test_options.patch, is the test fixed!

    thanks
    Att

    :-)
    marcosptf

    @marcosptf marcosptf mannequin added type-crash A hard crash of the interpreter, possibly with a core dump stdlib Python modules in the Lib dir labels Aug 24, 2015
    @marcosptf marcosptf mannequin changed the title fix test_ssl broker was fixed Aug 24, 2015
    @bitdancer
    Copy link
    Member

    Most likely you ran the test using a different version of python from the one the test is from. All the tests in that file pass on our buildbots when run by the python version they are for.

    @marcosptf
    Copy link
    Mannequin Author

    marcosptf mannequin commented Aug 25, 2015

    the version that i ran the test, is python 2.7.10

    @marcosptf
    Copy link
    Mannequin Author

    marcosptf mannequin commented Aug 25, 2015

    anyway, this changes that i did, make this test more resilent!
    this test now is more complete than before!

    :-)

    @vadmium
    Copy link
    Member

    vadmium commented Jan 21, 2016

    Your patch removes the testing of getting ctx.options. However, OP_NO_SSLv3 was enabled by default and added to the test in bpo-25530, so I suspect that problem is no longer valid.

    I guess that leaves the rest of your patch which exercises other protocol values.

    @vadmium vadmium added tests Tests in the Lib/test dir and removed stdlib Python modules in the Lib dir labels Jan 21, 2016
    @vadmium vadmium changed the title test_ssl broker was fixed test_ssl: try more protocols in test_options() Jan 21, 2016
    @vadmium vadmium added type-feature A feature request or enhancement and removed type-crash A hard crash of the interpreter, possibly with a core dump labels Jan 21, 2016
    @tiran
    Copy link
    Member

    tiran commented Sep 8, 2016

    This ticket is no longer relevant. All but TLS_METHOD (old name SSLv23_METHOD) have been deprecated by OpenSSL. In the future Python will use auto-negotiation.

    @tiran tiran closed this as completed Sep 8, 2016
    @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
    tests Tests in the Lib/test dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants