From 6fa443b0bc71f79d812a81b30e6f48793ca79347 Mon Sep 17 00:00:00 2001 From: Conor Patrick Date: Tue, 26 Mar 2019 19:00:42 -0400 Subject: [PATCH] tests for GA without pin --- tools/testing/tests/fido2.py | 41 +++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/tools/testing/tests/fido2.py b/tools/testing/tests/fido2.py index 999f7d5..2ab09e6 100644 --- a/tools/testing/tests/fido2.py +++ b/tools/testing/tests/fido2.py @@ -905,22 +905,25 @@ class FIDO2Tests(Tester): expectedError=CtapError.ERR.SUCCESS, ) - # self.testGA( - # "Send GA request with no pinAuth, expect SUCCESS", - # rp["id"], - # cdh, - # [ - # { - # "type": "public-key", - # "id": res_mc.auth_data.credential_data.credential_id, - # } - # ], - # expectedError=CtapError.ERR.SUCCESS, - # ) - with Test("Check UV flag is set"): assert res_ga.auth_data.flags & (1 << 2) + res_ga = self.testGA( + "Send GA request with no pinAuth, expect SUCCESS", + rp["id"], + cdh, + [ + { + "type": "public-key", + "id": res_mc.auth_data.credential_data.credential_id, + } + ], + expectedError=CtapError.ERR.SUCCESS, + ) + + with Test("Check UV flag is NOT set"): + assert not (res_ga.auth_data.flags & (1 << 2)) + self.testReset() with Test("Setting pin code, expect SUCCESS"): @@ -973,12 +976,12 @@ class FIDO2Tests(Tester): expectedError=CtapError.ERR.PIN_REQUIRED, ) - # res_mc = self.testGA( - # "Send GA request with no pin_auth, expect NO_CREDENTIALS", - # rp["id"], - # cdh, - # expectedError=CtapError.ERR.NO_CREDENTIALS, - # ) + res_mc = self.testGA( + "Send GA request with no pin_auth, expect NO_CREDENTIALS", + rp["id"], + cdh, + expectedError=CtapError.ERR.NO_CREDENTIALS, + ) res = self.testCP( "Test getRetries, expect SUCCESS",