[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:
Abtin Keshavarzian
2024-11-06 09:16:02 +01:00
committed by GitHub
parent fa95df5d6d
commit e43120d903
13 changed files with 21 additions and 21 deletions
+1 -1
View File
@@ -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);