Fix issue #9711: raise ValueError is SSLConnection constructor is invoked with keyfile and not certfile.

This commit is contained in:
Giampaolo Rodolà 2010-08-30 18:28:05 +00:00
parent 40d9a4e854
commit 8b7da623ce
2 changed files with 14 additions and 7 deletions

View file

@ -125,6 +125,8 @@ class SSLSocket(socket):
if server_side and not certfile:
raise ValueError("certfile must be specified for server-side "
"operations")
if keyfile and not certfile:
raise ValueError("certfile must be specified")
if certfile and not keyfile:
keyfile = certfile
self.context = SSLContext(ssl_version)