Renew challenge on expiry

This commit is contained in:
Christoph Hagen
2023-12-08 00:24:15 +01:00
parent 0a11d9ff27
commit 1fe03a6906
3 changed files with 32 additions and 9 deletions

View File

@@ -113,6 +113,17 @@ private:
*/
void processMessage(SignedMessage* message);
/**
* @brief Checks that the message is valid and prepares a challenge.
*
* This function is also called when a challenge response arrives too late.
*
* @param message The message to respond to
*
* Note: Prepares the response in the outgoing message buffer.
*/
void checkAndPrepareChallenge(Message* message);
/**
* @brief Prepare a server challenge for a local or socket message.
*

View File

@@ -59,8 +59,11 @@ enum class MessageResult: uint8_t {
/// @brief A message is already being processed
TooManyRequests = 8,
InvalidUrlParameter = 10,
InvalidResponseAuthentication = 11,
/// @brief The received message result was invalid
InvalidMessageResult = 9,
/// @brief An invalid Url parameter was set sending a message to the device over a local connection
InvalidUrlParameter = 10,
};