From 75073d0a8478441cc97a6efa10b566c5fb1dac81 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Fri, 17 Apr 2020 20:57:17 +0100 Subject: New upstream version 1.4.0 --- fuzz/fuzz_mgmt.c | 257 +++++++++++-------------------------------------------- 1 file changed, 49 insertions(+), 208 deletions(-) (limited to 'fuzz/fuzz_mgmt.c') diff --git a/fuzz/fuzz_mgmt.c b/fuzz/fuzz_mgmt.c index 741b375..d46daf6 100644 --- a/fuzz/fuzz_mgmt.c +++ b/fuzz/fuzz_mgmt.c @@ -11,6 +11,8 @@ #include #include "mutator_aux.h" +#include "wiredata_fido2.h" +#include "dummy.h" #include "fido.h" #include "../openbsd-compat/openbsd-compat.h" @@ -35,207 +37,39 @@ struct param { int seed; }; -/* Example parameters. */ -static const char dummy_pin1[] = "skepp cg0u3;Y.."; -static const char dummy_pin2[] = "bastilha 6rJrfQZI."; - static const uint8_t dummy_reset_wire_data[] = { - 0xff, 0xff, 0xff, 0xff, 0x86, 0x00, 0x11, 0x91, - 0xef, 0xbe, 0x74, 0x39, 0x1a, 0x1c, 0x4a, 0x00, - 0x22, 0x00, 0x01, 0x02, 0x05, 0x02, 0x01, 0x05, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x22, 0x00, 0x01, 0xbb, 0x00, 0x01, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x22, 0x00, 0x01, 0xbb, 0x00, 0x01, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x22, 0x00, 0x01, 0xbb, 0x00, 0x01, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x22, 0x00, 0x01, 0xbb, 0x00, 0x01, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x22, 0x00, 0x01, 0xbb, 0x00, 0x01, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x22, 0x00, 0x01, 0xbb, 0x00, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x22, 0x00, 0x01, 0x90, 0x00, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + WIREDATA_CTAP_INIT, + WIREDATA_CTAP_CBOR_INFO, + WIREDATA_CTAP_KEEPALIVE, + WIREDATA_CTAP_KEEPALIVE, + WIREDATA_CTAP_KEEPALIVE, + WIREDATA_CTAP_CBOR_RESET, }; static const uint8_t dummy_info_wire_data[] = { - 0xff, 0xff, 0xff, 0xff, 0x86, 0x00, 0x11, 0x80, - 0x43, 0x56, 0x40, 0xb1, 0x4e, 0xd9, 0x2d, 0x00, - 0x22, 0x00, 0x02, 0x02, 0x05, 0x02, 0x01, 0x05, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x22, 0x00, 0x02, 0x90, 0x00, 0xb9, 0x00, - 0xa9, 0x01, 0x83, 0x66, 0x55, 0x32, 0x46, 0x5f, - 0x56, 0x32, 0x68, 0x46, 0x49, 0x44, 0x4f, 0x5f, - 0x32, 0x5f, 0x30, 0x6c, 0x46, 0x49, 0x44, 0x4f, - 0x5f, 0x32, 0x5f, 0x31, 0x5f, 0x50, 0x52, 0x45, - 0x02, 0x82, 0x6b, 0x63, 0x72, 0x65, 0x64, 0x50, - 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x6b, 0x68, - 0x6d, 0x61, 0x63, 0x2d, 0x73, 0x65, 0x63, 0x72, - 0x00, 0x22, 0x00, 0x02, 0x00, 0x65, 0x74, 0x03, - 0x50, 0x19, 0x56, 0xe5, 0xbd, 0xa3, 0x74, 0x45, - 0xf1, 0xa8, 0x14, 0x35, 0x64, 0x03, 0xfd, 0xbc, - 0x18, 0x04, 0xa5, 0x62, 0x72, 0x6b, 0xf5, 0x62, - 0x75, 0x70, 0xf5, 0x64, 0x70, 0x6c, 0x61, 0x74, - 0xf4, 0x69, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x50, 0x69, 0x6e, 0xf4, 0x75, 0x63, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4d, - 0x00, 0x22, 0x00, 0x02, 0x01, 0x67, 0x6d, 0x74, - 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0xf5, - 0x05, 0x19, 0x04, 0xb0, 0x06, 0x81, 0x01, 0x07, - 0x08, 0x08, 0x18, 0x80, 0x0a, 0x82, 0xa2, 0x63, - 0x61, 0x6c, 0x67, 0x26, 0x64, 0x74, 0x79, 0x70, - 0x65, 0x6a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x2d, 0x6b, 0x65, 0x79, 0xa2, 0x63, 0x61, 0x6c, - 0x67, 0x27, 0x64, 0x74, 0x79, 0x70, 0x65, 0x6a, - 0x00, 0x22, 0x00, 0x02, 0x02, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x2d, 0x6b, 0x65, 0x79, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + WIREDATA_CTAP_INIT, + WIREDATA_CTAP_CBOR_INFO, + WIREDATA_CTAP_CBOR_INFO, }; static const uint8_t dummy_set_pin_wire_data[] = { - 0xff, 0xff, 0xff, 0xff, 0x86, 0x00, 0x11, 0x59, - 0x50, 0x8c, 0x27, 0x14, 0x83, 0x43, 0xd5, 0x00, - 0x22, 0x00, 0x03, 0x02, 0x05, 0x02, 0x01, 0x05, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x22, 0x00, 0x03, 0x90, 0x00, 0x51, 0x00, - 0xa1, 0x01, 0xa5, 0x01, 0x02, 0x03, 0x38, 0x18, - 0x20, 0x01, 0x21, 0x58, 0x20, 0x2a, 0xb8, 0x2d, - 0x36, 0x69, 0xab, 0x30, 0x9d, 0xe3, 0x5e, 0x9b, - 0xfb, 0x94, 0xfc, 0x1d, 0x92, 0x95, 0xaf, 0x01, - 0x47, 0xfe, 0x4b, 0x87, 0xe5, 0xcf, 0x3f, 0x05, - 0x0b, 0x39, 0xda, 0x17, 0x49, 0x22, 0x58, 0x20, - 0x15, 0x1b, 0xbe, 0x08, 0x78, 0x60, 0x4d, 0x3c, - 0x00, 0x22, 0x00, 0x03, 0x00, 0x3f, 0xf1, 0x60, - 0xa6, 0xd8, 0xf8, 0xed, 0xce, 0x4a, 0x30, 0x5d, - 0x1a, 0xaf, 0x80, 0xc4, 0x0a, 0xd2, 0x6f, 0x77, - 0x38, 0x12, 0x97, 0xaa, 0xbd, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x22, 0x00, 0x03, 0x90, 0x00, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + WIREDATA_CTAP_INIT, + WIREDATA_CTAP_CBOR_INFO, + WIREDATA_CTAP_CBOR_AUTHKEY, + WIREDATA_CTAP_CBOR_STATUS, }; static const uint8_t dummy_change_pin_wire_data[] = { - 0xff, 0xff, 0xff, 0xff, 0x86, 0x00, 0x11, 0x48, - 0xfd, 0xf9, 0xde, 0x28, 0x21, 0x99, 0xd5, 0x00, - 0x22, 0x00, 0x04, 0x02, 0x05, 0x02, 0x01, 0x05, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x22, 0x00, 0x04, 0x90, 0x00, 0x51, 0x00, - 0xa1, 0x01, 0xa5, 0x01, 0x02, 0x03, 0x38, 0x18, - 0x20, 0x01, 0x21, 0x58, 0x20, 0x2a, 0xb8, 0x2d, - 0x36, 0x69, 0xab, 0x30, 0x9d, 0xe3, 0x5e, 0x9b, - 0xfb, 0x94, 0xfc, 0x1d, 0x92, 0x95, 0xaf, 0x01, - 0x47, 0xfe, 0x4b, 0x87, 0xe5, 0xcf, 0x3f, 0x05, - 0x0b, 0x39, 0xda, 0x17, 0x49, 0x22, 0x58, 0x20, - 0x15, 0x1b, 0xbe, 0x08, 0x78, 0x60, 0x4d, 0x3c, - 0x00, 0x22, 0x00, 0x04, 0x00, 0x3f, 0xf1, 0x60, - 0xa6, 0xd8, 0xf8, 0xed, 0xce, 0x4a, 0x30, 0x5d, - 0x1a, 0xaf, 0x80, 0xc4, 0x0a, 0xd2, 0x6f, 0x77, - 0x38, 0x12, 0x97, 0xaa, 0xbd, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x22, 0x00, 0x04, 0x90, 0x00, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + WIREDATA_CTAP_INIT, + WIREDATA_CTAP_CBOR_INFO, + WIREDATA_CTAP_CBOR_AUTHKEY, + WIREDATA_CTAP_CBOR_STATUS, }; static const uint8_t dummy_retry_wire_data[] = { - 0xff, 0xff, 0xff, 0xff, 0x86, 0x00, 0x11, 0x7f, - 0xaa, 0x73, 0x3e, 0x95, 0x98, 0xa8, 0x60, 0x00, - 0x22, 0x00, 0x05, 0x02, 0x05, 0x02, 0x01, 0x05, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x22, 0x00, 0x05, 0x90, 0x00, 0x04, 0x00, - 0xa1, 0x03, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + WIREDATA_CTAP_INIT, + WIREDATA_CTAP_CBOR_INFO, + WIREDATA_CTAP_CBOR_RETRIES, }; int LLVMFuzzerTestOneInput(const uint8_t *, size_t); @@ -277,12 +111,20 @@ pack(uint8_t *ptr, size_t len, const struct param *p) return (max - len); } +static size_t +input_len(int max) +{ + return (2 * len_string(max) + 5 * len_blob(max) + len_int()); +} + static fido_dev_t * prepare_dev() { fido_dev_t *dev; fido_dev_io_t io; + memset(&io, 0, sizeof(io)); + io.open = dev_open; io.close = dev_close; io.read = dev_read; @@ -304,9 +146,8 @@ dev_reset(struct param *p) set_wire_data(p->reset_wire_data.body, p->reset_wire_data.len); - if ((dev = prepare_dev()) == NULL) { + if ((dev = prepare_dev()) == NULL) return; - } fido_dev_reset(dev); fido_dev_close(dev); @@ -327,9 +168,8 @@ dev_get_cbor_info(struct param *p) set_wire_data(p->info_wire_data.body, p->info_wire_data.len); - if ((dev = prepare_dev()) == NULL) { + if ((dev = prepare_dev()) == NULL) return; - } proto = fido_dev_protocol(dev); major = fido_dev_major(dev); @@ -343,15 +183,10 @@ dev_get_cbor_info(struct param *p) consume(&build, sizeof(build)); consume(&flags, sizeof(flags)); - if ((ci = fido_cbor_info_new()) == NULL) { - fido_dev_close(dev); - fido_dev_free(&dev); - return; - } + if ((ci = fido_cbor_info_new()) == NULL) + goto out; fido_dev_get_cbor_info(dev, ci); - fido_dev_close(dev); - fido_dev_free(&dev); for (size_t i = 0; i < fido_cbor_info_versions_len(ci); i++) { char * const *sa = fido_cbor_info_versions_ptr(ci); @@ -372,10 +207,17 @@ dev_get_cbor_info(struct param *p) n = fido_cbor_info_maxmsgsiz(ci); consume(&n, sizeof(n)); + n = fido_cbor_info_fwversion(ci); + consume(&n, sizeof(n)); + consume(fido_cbor_info_aaguid_ptr(ci), fido_cbor_info_aaguid_len(ci)); consume(fido_cbor_info_protocols_ptr(ci), fido_cbor_info_protocols_len(ci)); +out: + fido_dev_close(dev); + fido_dev_free(&dev); + fido_cbor_info_free(&ci); } @@ -386,9 +228,8 @@ dev_set_pin(struct param *p) set_wire_data(p->set_pin_wire_data.body, p->set_pin_wire_data.len); - if ((dev = prepare_dev()) == NULL) { + if ((dev = prepare_dev()) == NULL) return; - } fido_dev_set_pin(dev, p->pin1, NULL); fido_dev_close(dev); @@ -402,9 +243,8 @@ dev_change_pin(struct param *p) set_wire_data(p->change_pin_wire_data.body, p->change_pin_wire_data.len); - if ((dev = prepare_dev()) == NULL) { + if ((dev = prepare_dev()) == NULL) return; - } fido_dev_set_pin(dev, p->pin2, p->pin1); fido_dev_close(dev); @@ -419,9 +259,8 @@ dev_get_retry_count(struct param *p) set_wire_data(p->retry_wire_data.body, p->retry_wire_data.len); - if ((dev = prepare_dev()) == NULL) { + if ((dev = prepare_dev()) == NULL) return; - } fido_dev_get_retry_count(dev, &n); consume(&n, sizeof(n)); @@ -436,12 +275,14 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) memset(&p, 0, sizeof(p)); - if (unpack(data, size, &p) < 0) + if (size < input_len(GETLEN_MIN) || size > input_len(GETLEN_MAX) || + unpack(data, size, &p) < 0) return (0); - srandom((unsigned int)p.seed); + prng_init((unsigned int)p.seed); - fido_init(0); + fido_init(FIDO_DEBUG); + fido_set_log_handler(consume_str); dev_reset(&p); dev_get_cbor_info(&p); -- cgit v1.2.3