Skip to content

Commit

Permalink
Merge PR #194.
Browse files Browse the repository at this point in the history
  • Loading branch information
dainnilsson committed Jul 6, 2023
2 parents c7ebd87 + 1143d47 commit f523839
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_attestation.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
UnsupportedType,
verify_x509_chain,
)
from cryptography.exceptions import UnsupportedAlgorithm, _Reasons

import unittest

Expand Down Expand Up @@ -222,6 +223,14 @@ def test_tpm_windows_hello_attestation(self):
"057a0ecbe7e3e99e8926941614f6af078c802b110be89eb221d69be2e17a1ba4"
)

try:
res = attestation.verify(statement, auth_data, client_param)
except UnsupportedAlgorithm as e:
if e._reason is _Reasons.UNSUPPORTED_HASH:
self.skipTest(
"SHA1 signature verification not supported on this machine"
)

res = attestation.verify(statement, auth_data, client_param)
self.assertEqual(res.attestation_type, AttestationType.ATT_CA)
verify_x509_chain(res.trust_path)
Expand Down

0 comments on commit f523839

Please sign in to comment.