mirror of
https://github.com/espressif/openthread.git
synced 2026-08-09 20:27:47 +00:00
[coaps] use LinkSecurityMode to determine layer two security usage (#10899)
This commit updates the `CoapSecure`, `Tmf`, and `SecureTransport` modules to use the `LinkSecurityMode` enum and its defined constants to indicate whether or not layer two security should be used. This replaces the use of boolean input parameters with `kWithLinkSecurity` or `kNoLinkSecurity` constants, improving code readability.
This commit is contained in:
@@ -67,7 +67,7 @@ void TestMessage(void)
|
||||
Random::NonCrypto::FillBuffer(writeBuffer, kMaxSize);
|
||||
|
||||
VerifyOrQuit((message = messagePool->Allocate(Message::kTypeIp6)) != nullptr);
|
||||
message->SetLinkSecurityEnabled(Message::kWithLinkSecurity);
|
||||
message->SetLinkSecurityEnabled(kWithLinkSecurity);
|
||||
SuccessOrQuit(message->SetPriority(Message::Priority::kPriorityNet));
|
||||
message->SetType(Message::Type::kType6lowpan);
|
||||
message->SetSubType(Message::SubType::kSubTypeJoinerEntrust);
|
||||
|
||||
Reference in New Issue
Block a user