main
main copied to clipboard
test_poplib SSL tests are failing
test_poplib gets some new tests in 2.7 for SSL. Those tests fail:
Traceback (most recent call last):
File "F:\Product\0\Dlr\External.LCA_RESTRICTED\Languages\IronPython\27\Lib\thr
eading.py", line 530, in _Thread__bootstrap_inner
self.run()
File "test\test_poplib.py", line 124, in run
threading.Thread.start(self)
File "F:\Product\0\Dlr\External.LCA_RESTRICTED\Languages\IronPython\27\Lib\asy ncore.py", line 214, in loop
poll_fun(timeout, map)
File "F:\Product\0\Dlr\External.LCA_RESTRICTED\Languages\IronPython\27\Lib\asy ncore.py", line 151, in poll
read(obj)
File "F:\Product\0\Dlr\External.LCA_RESTRICTED\Languages\IronPython\27\Lib\asy ncore.py", line 83, in read
obj.handle_error()
File "test\test_poplib.py", line 146, in handle_error
def handle_connect(self):
File "F:\Product\0\Dlr\External.LCA_RESTRICTED\Languages\IronPython\27\Lib\asy ncore.py", line 79, in read
obj.handle_read_event()
File "F:\Product\0\Dlr\External.LCA_RESTRICTED\Languages\IronPython\27\Lib\asy ncore.py", line 430, in handle_read_event
self.handle_accept()
File "test\test_poplib.py", line 135, in handle_accept
File "test\test_poplib.py", line 231, in ** init **
File "test\test_poplib.py", line 238, in _do_ssl_handshake
self._ssl_accepting = True
File
"F:\Product\0\Dlr\External.LCA_RESTRICTED\Languages\IronPython\27\Lib\ssl.py",
line 280, in do_handshake
WindowsError: [Errno 22] The credentials supplied to the package were not
recognized
Work Item Details
Original CodePlex Issue: Issue 28750 Status: Proposed Reason Closed: Unassigned Assigned to: Unassigned Reported on: Sep 1, 2010 at 5:42 PM Reported by: dinov Updated on: Feb 22, 2013 at 2:10 AM Updated by: jdhardy
On 2011-05-18 04:56:45 UTC, gramana commented:
This issue arises when the certificate used by ssl has either a) not been imported into the local machine's certificate store, or b) was imported into another user's certificate store.
The easiest way I found around this issue on my workstation was to perform the following:
-
Open IIS Manager > Server Certificates.
-
Chose the "Create Self-Signed Certificate..." Action.
-
Once the wizard is complete, right click on the resulting server cert, and select Export...
-
Configure a password, and specify the file path.
-
Download and install openssl for Windows (if you don't have it already).
-
open cmd, and run openssl.exe.
-
At the OpenSSL> prompt, enter: pkcs12 -in <path_from_step_4.pfx> -out <path_to_poplib\keycert.pem> -nodes
That resolved the issue for me. Unfortunately, this is a workstation-/user-environment specific resolution.
It currently seems to be failing because _SSLContext.load_cert_chain
isn't implemented (so no certificate gets loaded).
There's a bunch in there that needa to be implemented