summaryrefslogtreecommitdiffstats
path: root/Lib/ssl.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/ssl.py')
-rw-r--r--Lib/ssl.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/ssl.py b/Lib/ssl.py
index a634442..e83d889 100644
--- a/Lib/ssl.py
+++ b/Lib/ssl.py
@@ -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)