Catch binascii related key format errors (LP: #1854477)

This commit is contained in:
Scott Kitterman
2019-12-08 02:43:57 -05:00
parent c66a014a9f
commit 7173c0cbcc
4 changed files with 50 additions and 0 deletions
+4
View File
@@ -37,6 +37,7 @@ import hashlib
import logging
import re
import time
import binascii
# only needed for arc
try:
@@ -688,6 +689,9 @@ class DomainSigner(object):
except KeyFormatError as e:
self.logger.error("%s" % e)
return False
except binascii.Error as e:
self.logger.error('KeyFormatError: {0}'.format(e))
return False
# RFC 8460 MAY ignore signatures without tlsrpt Service Type
if self.tlsrpt == 'strict' and not self.seqtlsrpt: