]> granicus.if.org Git - python/commit
bpo-35941: Fix performance regression in SSL certificate code (GH-12610)
authorSteve Dower <steve.dower@python.org>
Tue, 10 Sep 2019 09:02:04 +0000 (02:02 -0700)
committerGitHub <noreply@github.com>
Tue, 10 Sep 2019 09:02:04 +0000 (02:02 -0700)
commitfdd17abc51e363ab19d248375d717512b8b26966
treecd7494ab4145909f6889c4ed2d0192c408ff3256
parent74b7413d3a9be5e06b16eb2b9a6bdc1f3fe44bbb
bpo-35941: Fix performance regression in SSL certificate code (GH-12610)

Accumulate certificates in a set instead of doing a costly list contain
operation. A Windows cert store can easily contain over hundred
certificates. The old code would result in way over 5,000 comparison
operations

Signed-off-by: Christian Heimes <christian@python.org>
Lib/test/test_ssl.py
Modules/_ssl.c