summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-06-11 08:28:02 -0700
committerLance Stout <lancestout@gmail.com>2012-06-19 00:01:02 -0700
commit534aaf2b2aa967909640325de409316479f8f7e3 (patch)
treea3e3b82f2c21c61ff731010b8a06e2bcd44f2594 /sleekxmpp/xmlstream
parent4cc20fdd052afaf19146d366a09cbf1d337bc396 (diff)
downloadslixmpp-534aaf2b2aa967909640325de409316479f8f7e3.tar.gz
slixmpp-534aaf2b2aa967909640325de409316479f8f7e3.tar.bz2
slixmpp-534aaf2b2aa967909640325de409316479f8f7e3.tar.xz
slixmpp-534aaf2b2aa967909640325de409316479f8f7e3.zip
Properly handle certs with no extensions.
Diffstat (limited to 'sleekxmpp/xmlstream')
-rw-r--r--sleekxmpp/xmlstream/cert.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/cert.py b/sleekxmpp/xmlstream/cert.py
index 0f58d4ed..b2711e8e 100644
--- a/sleekxmpp/xmlstream/cert.py
+++ b/sleekxmpp/xmlstream/cert.py
@@ -42,7 +42,7 @@ def extract_names(raw_cert):
cert = decoder.decode(raw_cert, asn1Spec=Certificate())[0]
tbs = cert.getComponentByName('tbsCertificate')
subject = tbs.getComponentByName('subject')
- extensions = tbs.getComponentByName('extensions')
+ extensions = tbs.getComponentByName('extensions') or []
# Extract the CommonName(s) from the cert.
for rdnss in subject: