Skip to content

Commit

Permalink
[border-agent] return invalid args when lifetime exceeds 10min (#2567)
Browse files Browse the repository at this point in the history
  • Loading branch information
mia1yang authored Nov 5, 2024
1 parent 736b6fd commit a701edd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/dbus/server/dbus_thread_object_rcp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2036,6 +2036,7 @@ void DBusThreadObjectRcp::ActivateEphemeralKeyModeHandler(DBusRequest &aRequest)
VerifyOrExit(mBorderAgent.GetEphemeralKeyEnabled(), error = OT_ERROR_NOT_CAPABLE);

SuccessOrExit(DBusMessageToTuple(*aRequest.GetMessage(), args), error = OT_ERROR_INVALID_ARGS);
VerifyOrExit(lifetime <= OT_BORDER_AGENT_MAX_EPHEMERAL_KEY_TIMEOUT, error = OT_ERROR_INVALID_ARGS);

SuccessOrExit(mBorderAgent.CreateEphemeralKey(ePskc), error = OT_ERROR_INVALID_ARGS);
otbrLogInfo("Created Ephemeral Key: %s", ePskc.c_str());
Expand Down

0 comments on commit a701edd

Please sign in to comment.