➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 Alan.Huang
收信人 Alan.Huang, alex, christian.heimes, dstufft, janssen
日期 2018-07-02.14:38:32
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1530542312.23.0.56676864532.issue34001@psf.upfronthosting.co.za>
In-reply-to
内容
Strangely, LibreSSL's `ssl_clamp_version_range` function is perfectly happy to accept minimum protocol versions lower than the lowest supported protocol version, and likewise is happy to accept maximum protocol versions higher than the highest supported protocol version.
In said case, the minimum/maximum protocol version is set to clamp_min/clamp_max (i.e., the minimum/maximum protocol version supported by the internal method).

As such, the assertion test `ctx.minimum_version = 42` on line 1127 in test_min_max_version in test_ssl.py fails.

A possible fix would be to add another check in `set_min_max_proto_version` _ssl.c that checks if the current set protocol version is equal to the value passed (with exceptions for the magic constants of `MINIMUM_SUPPORTED` and `MAXIMUM_SUPPORTED`), and if not, raise a ValueError as well.

One dilemma is whether to reset the respective version back to what it was before the attempt, which I think should be done.
历史
日期 用户 动作 参数
2018-07-02 14:38:32Alan.Huang修改recipients: + Alan.Huang, janssen, christian.heimes, alex, dstufft
2018-07-02 14:38:32Alan.Huang修改messageid: <1530542312.23.0.56676864532.issue34001@psf.upfronthosting.co.za>
2018-07-02 14:38:32Alan.Huang链接issue34001 messages
2018-07-02 14:38:32Alan.Huang创建