summaryrefslogtreecommitdiffstats
path: root/Lib/ssl.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/ssl.py')
-rw-r--r--Lib/ssl.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/ssl.py b/Lib/ssl.py
index ab7a49b..df39592 100644
--- a/Lib/ssl.py
+++ b/Lib/ssl.py
@@ -410,7 +410,8 @@ class SSLContext(_SSLContext):
if encoding == "x509_asn":
if trust is True or purpose.oid in trust:
certs.extend(cert)
- self.load_verify_locations(cadata=certs)
+ if certs:
+ self.load_verify_locations(cadata=certs)
return certs
def load_default_certs(self, purpose=Purpose.SERVER_AUTH):