mirror of
https://github.com/espressif/openthread.git
synced 2026-08-18 08:29:52 +00:00
[srp-server] accept optional KEY RRs (#6569)
This commit is contained in:
@@ -704,11 +704,10 @@ Error Server::ProcessHostDescriptionInstruction(Host & aHost,
|
||||
Dns::Ecdsa256KeyRecord key;
|
||||
|
||||
VerifyOrExit(record.GetClass() == aZone.GetClass(), error = kErrorFailed);
|
||||
VerifyOrExit(aHost.GetKey() == nullptr, error = kErrorFailed);
|
||||
|
||||
SuccessOrExit(error = aMessage.Read(aOffset, key));
|
||||
VerifyOrExit(key.IsValid(), error = kErrorParse);
|
||||
|
||||
VerifyOrExit(aHost.GetKey() == nullptr || *aHost.GetKey() == key, error = kErrorSecurity);
|
||||
aHost.SetKey(key);
|
||||
|
||||
aOffset += record.GetSize();
|
||||
|
||||
Reference in New Issue
Block a user