autodetect passive nfc operation or usb operation

This commit is contained in:
Conor Patrick
2019-02-26 15:04:23 -05:00
parent e2ca7f52db
commit e8d0ad5e7c
9 changed files with 175 additions and 153 deletions

View File

@@ -1536,7 +1536,7 @@ static void ctap_state_init()
ctap_reset_rk();
}
void ctap_init(int init_pin)
void ctap_init()
{
crypto_ecc256_init();
@@ -1591,7 +1591,7 @@ void ctap_init(int init_pin)
exit(1);
}
if (init_pin)
if (! device_is_nfc())
{
crypto_ecc256_make_key_pair(KEY_AGREEMENT_PUB, KEY_AGREEMENT_PRIV);
}