diff --git a/README.md b/README.md index 840eede..958fed0 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,15 @@ cd .. cd python-fido2/ python setup.py install + +``` + +Open `crypto/tiny-AES-c/aes.h` in a text editor and make sure AES256 is selected as follows. + +``` +//#define AES128 1 +//#define AES192 1 +#define AES256 1 ``` Now compile FIDO 2.0 and U2F authenticator. diff --git a/fido2/main.c b/fido2/main.c index bcaf701..654806e 100644 --- a/fido2/main.c +++ b/fido2/main.c @@ -30,7 +30,7 @@ int main(int argc, char * argv[]) TAG_WALLET | TAG_STOR | /*TAG_CP |*/ -// TAG_CTAP| + TAG_CTAP| // TAG_HID| /*TAG_U2F|*/ /*TAG_PARSE |*/ diff --git a/pc/app.h b/pc/app.h index 6995dcc..692e291 100644 --- a/pc/app.h +++ b/pc/app.h @@ -12,6 +12,8 @@ #define USING_PC +#define DEBUG_LEVEL 1 + //#define BRIDGE_TO_WALLET void printing_init(); diff --git a/pc/device.c b/pc/device.c index b80e538..43ad521 100644 --- a/pc/device.c +++ b/pc/device.c @@ -162,7 +162,7 @@ void heartbeat() void ctaphid_write_block(uint8_t * data) { - printf("<< "); dump_hex(data, 64); + /*printf("<< "); dump_hex(data, 64);*/ usbhid_send(data); } diff --git a/python-fido2 b/python-fido2 index 38c093e..4964d98 160000 --- a/python-fido2 +++ b/python-fido2 @@ -1 +1 @@ -Subproject commit 38c093ef0e88baa5b9cd289afc182d1ac85cef55 +Subproject commit 4964d98ca6d0cfc24cd49926521282b8e92c598d diff --git a/tools/ctap_test.py b/tools/ctap_test.py index 120f229..54c860a 100644 --- a/tools/ctap_test.py +++ b/tools/ctap_test.py @@ -46,7 +46,7 @@ class Tester(): raise RuntimeError('No FIDO device found') self.dev = dev self.client = Fido2Client(dev, self.origin) - self.ctap = self.client.ctap + self.ctap = self.client.ctap2 # consume timeout error #cmd,resp = self.recv_raw() @@ -470,6 +470,8 @@ class Tester(): attest, data = self.client.make_credential(rp, user, challenge, pin = PIN + ' ', exclude_list = []) except CtapError as e: assert(e.code == CtapError.ERR.PIN_INVALID) + except ClientError as e: + assert(e.cause.code == CtapError.ERR.PIN_INVALID) print('PASS') print('make credential with exclude list') @@ -572,11 +574,11 @@ if __name__ == '__main__': t = Tester() t.find_device() #t.test_hid() - t.test_long_ping() - #t.test_fido2() + #t.test_long_ping() + t.test_fido2() #test_find_brute_force() #t.test_fido2_simple() - t.test_fido2_brute_force() + # t.test_fido2_brute_force()