diff options
author | Lance Stout <lancestout@gmail.com> | 2012-06-11 08:28:02 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2012-06-11 08:28:02 -0700 |
commit | 250d28e870b63576e09dd1288b05394808518369 (patch) | |
tree | 007a39b5e8b7934a063028ba084cc36260e13e21 | |
parent | 19f65c8510f0c4b385a753f0817ea79877ccdc4a (diff) | |
download | slixmpp-250d28e870b63576e09dd1288b05394808518369.tar.gz slixmpp-250d28e870b63576e09dd1288b05394808518369.tar.bz2 slixmpp-250d28e870b63576e09dd1288b05394808518369.tar.xz slixmpp-250d28e870b63576e09dd1288b05394808518369.zip |
Properly handle certs with no extensions.
-rw-r--r-- | sleekxmpp/xmlstream/cert.py | 2 |
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: |