We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d76cda9 commit 4250593Copy full SHA for 4250593
1 file changed
src/fido_mds/helpers.py
@@ -31,7 +31,12 @@ def load_raw_cert(cert: Union[bytes, str]) -> x509.Certificate:
31
32
def cert_chain_verified(cert_chain: List[Certificate], root_certs: List[Certificate]) -> bool:
33
cert_verified = False
34
- cert_to_check = cert_chain[0] # first cert in chain is the one we want to verify
+ try:
35
+ cert_to_check = cert_chain[0] # first cert in chain is the one we want to verify
36
+ except IndexError:
37
+ logger.error('no certificate to validate in certificate chain')
38
+ return cert_verified
39
+
40
# create store and add root cert
41
for root_cert in root_certs:
42
store = crypto.X509Store()
0 commit comments