test assertions work post reboot
This commit is contained in:
parent
235785b225
commit
f5d50e001d
@ -743,6 +743,40 @@ class FIDO2Tests(Tester):
|
|||||||
expectedError=CtapError.ERR.SUCCESS,
|
expectedError=CtapError.ERR.SUCCESS,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
with Test("Check assertion is correct"):
|
||||||
|
credential_data = AttestedCredentialData(prev_reg.auth_data.credential_data)
|
||||||
|
prev_auth.verify(cdh, credential_data.public_key)
|
||||||
|
assert (
|
||||||
|
prev_auth.credential["id"]
|
||||||
|
== prev_reg.auth_data.credential_data.credential_id
|
||||||
|
)
|
||||||
|
|
||||||
|
self.reboot()
|
||||||
|
|
||||||
|
prev_auth = self.testGA(
|
||||||
|
"Send GA request after reboot, expect success",
|
||||||
|
rp["id"],
|
||||||
|
cdh,
|
||||||
|
allow_list,
|
||||||
|
expectedError=CtapError.ERR.SUCCESS,
|
||||||
|
)
|
||||||
|
|
||||||
|
with Test("Check assertion is correct"):
|
||||||
|
credential_data = AttestedCredentialData(prev_reg.auth_data.credential_data)
|
||||||
|
prev_auth.verify(cdh, credential_data.public_key)
|
||||||
|
assert (
|
||||||
|
prev_auth.credential["id"]
|
||||||
|
== prev_reg.auth_data.credential_data.credential_id
|
||||||
|
)
|
||||||
|
|
||||||
|
prev_auth = self.testGA(
|
||||||
|
"Send GA request, expect success",
|
||||||
|
rp["id"],
|
||||||
|
cdh,
|
||||||
|
allow_list,
|
||||||
|
expectedError=CtapError.ERR.SUCCESS,
|
||||||
|
)
|
||||||
|
|
||||||
with Test("Test auth_data is 37 bytes"):
|
with Test("Test auth_data is 37 bytes"):
|
||||||
assert len(prev_auth.auth_data) == 37
|
assert len(prev_auth.auth_data) == 37
|
||||||
|
|
||||||
|
@ -78,6 +78,16 @@ class U2FTests(Tester):
|
|||||||
auth = self.authenticate(chal, appid, regs[i].key_handle)
|
auth = self.authenticate(chal, appid, regs[i].key_handle)
|
||||||
auth.verify(appid, chal, regs[i].public_key)
|
auth.verify(appid, chal, regs[i].public_key)
|
||||||
|
|
||||||
|
self.reboot()
|
||||||
|
|
||||||
|
for i in range(0, self.user_count):
|
||||||
|
with Test(
|
||||||
|
"Post reboot, Checking previous registration %d/%d"
|
||||||
|
% (i + 1, self.user_count)
|
||||||
|
):
|
||||||
|
auth = self.authenticate(chal, appid, regs[i].key_handle)
|
||||||
|
auth.verify(appid, chal, regs[i].public_key)
|
||||||
|
|
||||||
print("Check that all previous credentials are registered...")
|
print("Check that all previous credentials are registered...")
|
||||||
for i in range(0, self.user_count):
|
for i in range(0, self.user_count):
|
||||||
with Test("Check that previous credential %d is registered" % i):
|
with Test("Check that previous credential %d is registered" % i):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user