verify signature for hmac-secret

This commit is contained in:
Conor Patrick 2019-07-26 23:51:39 -04:00
parent 1cd1b3c295
commit ca66b6e43b
2 changed files with 5 additions and 2 deletions

View File

@ -211,7 +211,7 @@ class FIDO2Tests(Tester):
assert "hmac-secret" in reg.auth_data.extensions
assert reg.auth_data.extensions["hmac-secret"] == True
reg = self.testMC(
self.testMC(
"Send MC with fake extension set to true, expect SUCCESS",
cdh,
rp,
@ -278,6 +278,10 @@ class FIDO2Tests(Tester):
assert shannon_entropy(ext["hmac-secret"]) > 5.4
assert shannon_entropy(key) > 5.4
with Test("Check that the assertion is valid"):
credential_data = AttestedCredentialData(reg.auth_data.credential_data)
auth.verify(cdh, credential_data.public_key)
salt_enc, salt_auth = get_salt_params((salt3,))
auth = self.testGA(

View File

@ -206,7 +206,6 @@ class Tester:
self.ctap.make_credential, test, *args, **kwargs
)
if attestation_object:
print(attestation_object)
verifier = Attestation.for_type(attestation_object.fmt)
client_data = args[0]
verifier().verify(