From 94d4e913e549adf300f2c5595e860b62aa267d8e Mon Sep 17 00:00:00 2001 From: Andrei Lalaev Date: Fri, 11 Feb 2022 14:14:20 +0300 Subject: [PATCH] lib: pkcs11: pkcs11_token: fix model number for ATECC608 According to the doc (ATECC608A-TFLXTLS CryptoAuthentication Data Sheet) the fourth output byte of "info" command equals 0x02 for ATECC608A and 0x03 (or greater) for ATECC608B. --- lib/pkcs11/pkcs11_token.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pkcs11/pkcs11_token.c b/lib/pkcs11/pkcs11_token.c index 8d09cbb37..962a877cc 100644 --- a/lib/pkcs11/pkcs11_token.c +++ b/lib/pkcs11/pkcs11_token.c @@ -101,7 +101,7 @@ static char * pkcs11_token_device(ATCADeviceType dev_type, uint8_t info[4]) rv = "ATECC508A"; break; case 0x60: - if (0x02 < info[1]) + if (info[3] >= 0x03) { rv = "ATECC608B"; }