mirror of
https://github.com/espressif/openthread.git
synced 2026-07-10 22:30:21 +00:00
[key-manager] add MasterKey class (wrapper over otMasterKey) (#4150)
The `MasterKey` class mainly provides overloads of operators `==` and `!=` which help simplfy the code comparing keys.
This commit is contained in:
committed by
Jonathan Hui
parent
472a03af88
commit
0b220613ab
@@ -131,7 +131,7 @@ otError otThreadSetMasterKey(otInstance *aInstance, const otMasterKey *aKey)
|
||||
VerifyOrExit(aKey != NULL, error = OT_ERROR_INVALID_ARGS);
|
||||
VerifyOrExit(instance.Get<Mle::MleRouter>().GetRole() == OT_DEVICE_ROLE_DISABLED, error = OT_ERROR_INVALID_STATE);
|
||||
|
||||
error = instance.Get<KeyManager>().SetMasterKey(*aKey);
|
||||
error = instance.Get<KeyManager>().SetMasterKey(*static_cast<const MasterKey *>(aKey));
|
||||
instance.Get<MeshCoP::ActiveDataset>().Clear();
|
||||
instance.Get<MeshCoP::PendingDataset>().Clear();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user