mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 21:30:24 +00:00
Keep input master key checking consistently (#501)
This commit is contained in:
+2
-2
@@ -792,9 +792,9 @@ void Interpreter::ProcessMasterKey(int argc, char *argv[])
|
||||
else
|
||||
{
|
||||
int keyLength;
|
||||
uint8_t key[16];
|
||||
uint8_t key[OT_MASTER_KEY_SIZE];
|
||||
|
||||
VerifyOrExit((keyLength = Hex2Bin(argv[0], key, sizeof(key))) >= 0, error = kThreadError_Parse);
|
||||
VerifyOrExit((keyLength = Hex2Bin(argv[0], key, sizeof(key))) == OT_MASTER_KEY_SIZE, error = kThreadError_Parse);
|
||||
SuccessOrExit(error = otSetMasterKey(key, static_cast<uint8_t>(keyLength)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user