Skip to content
Snippets Groups Projects
Commit a53675cf authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

prevent traceback when a wrong certificate is being checked. Fixes #7242

parent 58e6a874
No related branches found
No related tags found
No related merge requests found
......@@ -133,7 +133,12 @@ try:
for i in range(0, cnt):
ext = cert.get_extension(i)
if ext.get_short_name() == 'subjectAltName':
r = _parse_asn1(ext.get_data())
try:
r = _parse_asn1(ext.get_data())
except:
log.error('Wrong data in certificate: subjectAltName=%s' % \
ext.get_data())
continue
if 'otherName' in r:
if oid_xmppaddr in r['otherName']:
for host in r['otherName'][oid_xmppaddr]:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment