mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
ATECC: Option to disable I2C transport key
This commit is contained in:
@ -347,7 +347,11 @@ int atmel_ecc_create_pms(int slotId, const uint8_t* peerKey, uint8_t* pms)
|
|||||||
ATECC_GET_ENC_KEY(read_key, sizeof(read_key));
|
ATECC_GET_ENC_KEY(read_key, sizeof(read_key));
|
||||||
|
|
||||||
/* send the encrypted version of the ECDH command */
|
/* send the encrypted version of the ECDH command */
|
||||||
|
#if defined(ATECC_USE_TRANSPORT_KEY) && ATECC_USE_TRANSPORT_KEY
|
||||||
ret = atcab_ecdh_enc(slotId, peerKey, pms, read_key, slotIdEnc);
|
ret = atcab_ecdh_enc(slotId, peerKey, pms, read_key, slotIdEnc);
|
||||||
|
#else
|
||||||
|
ret = atcab_ecdh(slotId, peerKey, pms);
|
||||||
|
#endif
|
||||||
ret = atmel_ecc_translate_err(ret);
|
ret = atmel_ecc_translate_err(ret);
|
||||||
|
|
||||||
/* free the ECDHE slot */
|
/* free the ECDHE slot */
|
||||||
|
@ -60,6 +60,11 @@
|
|||||||
#define ATECC_SLOT_ENC_PARENT (0x7)
|
#define ATECC_SLOT_ENC_PARENT (0x7)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Use a I2C transport key */
|
||||||
|
#ifndef ATECC_USE_TRANSPORT_KEY
|
||||||
|
#define ATECC_USE_TRANSPORT_KEY 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ATECC_KEY_SIZE required for ecc.h */
|
/* ATECC_KEY_SIZE required for ecc.h */
|
||||||
#include <wolfssl/wolfcrypt/ecc.h>
|
#include <wolfssl/wolfcrypt/ecc.h>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user