mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Fix issue #9711: raise ValueError is SSLConnection constructor is invoked with keyfile and not certfile.
This commit is contained in:
parent
40d9a4e854
commit
8b7da623ce
2 changed files with 14 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue