SWRU455M February 2017 – October 2020 CC3120 , CC3120MOD , CC3130 , CC3135 , CC3135MOD , CC3220MOD , CC3220MODA , CC3220R , CC3220S , CC3220SF , CC3230S , CC3230SF , CC3235MODAS , CC3235MODASF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
This command is used to create or remove a temporary ECC key-pair with the SECP256R1 curve on a given index. Create and remove operations are done using the sl_NetUtilsCmd API. The key is generated internally by the SimpleLink Wi-Fi device. The key is not persistent over the power cycle, and is overridden if another temporary key is installed on that same index. The operation fails if the desired index is already occupied by a non-temporary key pair.
An example of creating a temporary key pair:
SlNetUtilCryptoCmdKeyMgnt_t keyAttrib;
_i16 Status;
_u16 resultLen;
keyAttrib.ObjId = 1; /* key index is 1 */
keyAttrib.SubCmd = SL_NETUTIL_CRYPTO_TEMP_KEYS_CREATE;
Status = sl_NetUtilCmd(SL_NETUTIL_CRYPTO_CMD_TEMP_KEYS,
(_u8 *)&keyAttrib, sizeof(SlNetUtilCryptoCmdKeyMgnt_t),
NULL,
0,
NULL, &resultLen);
if(Status < 0)
{
/* error */
}