mirror of
https://github.com/espressif/openthread.git
synced 2026-08-07 11:17:46 +00:00
[crypto] adding ARM PSA (Platform Security Architecture) support (#6862)
- New format for MAC keys, as a union between literal key and keyrefs. - Modified key_manager to handle both literal keys or keyrefs. - Modified MAC and sub_mac modules to handle both Literal Keys or keyrefs. - Updated Crypto Modules to use abstracted APIs. - New CLIs to handle networkkey and pskc references.
This commit is contained in:
@@ -46,7 +46,7 @@ void TestMinimumPassphrase(void)
|
||||
otInstance * instance = testInitInstance();
|
||||
SuccessOrQuit(ot::MeshCoP::GeneratePskc(passphrase, *reinterpret_cast<const ot::Mac::NetworkName *>("OpenThread"),
|
||||
static_cast<const ot::Mac::ExtendedPanId &>(xpanid), pskc));
|
||||
VerifyOrQuit(memcmp(pskc.m8, expectedPskc, sizeof(pskc)) == 0);
|
||||
VerifyOrQuit(memcmp(pskc.m8, expectedPskc, OT_PSKC_MAX_SIZE) == 0);
|
||||
testFreeInstance(instance);
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ void TestMaximumPassphrase(void)
|
||||
otInstance *instance = testInitInstance();
|
||||
SuccessOrQuit(ot::MeshCoP::GeneratePskc(passphrase, *reinterpret_cast<const ot::Mac::NetworkName *>("OpenThread"),
|
||||
static_cast<const ot::Mac::ExtendedPanId &>(xpanid), pskc));
|
||||
VerifyOrQuit(memcmp(pskc.m8, expectedPskc, sizeof(pskc)) == 0);
|
||||
VerifyOrQuit(memcmp(pskc.m8, expectedPskc, sizeof(pskc.m8)) == 0);
|
||||
testFreeInstance(instance);
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ void TestExampleInSpec(void)
|
||||
otInstance *instance = testInitInstance();
|
||||
SuccessOrQuit(ot::MeshCoP::GeneratePskc(passphrase, *reinterpret_cast<const ot::Mac::NetworkName *>("Test Network"),
|
||||
static_cast<const ot::Mac::ExtendedPanId &>(xpanid), pskc));
|
||||
VerifyOrQuit(memcmp(pskc.m8, expectedPskc, sizeof(pskc)) == 0);
|
||||
VerifyOrQuit(memcmp(pskc.m8, expectedPskc, sizeof(pskc.m8)) == 0);
|
||||
testFreeInstance(instance);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user