[#30] Client: Add object model for Rules
Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
parent
43e300c773
commit
195854a45b
27 changed files with 677 additions and 155 deletions
|
@ -88,7 +88,6 @@ public static class Verifier
|
|||
return key.VerifyData(data2Verify, sig.Sign.ToByteArray());
|
||||
}
|
||||
|
||||
|
||||
internal static bool VerifyMatryoskaLevel(IMessage body, IMetaHeader meta, IVerificationHeader verification)
|
||||
{
|
||||
if (!verification.MetaSignature.VerifyMessagePart(meta))
|
||||
|
@ -118,12 +117,19 @@ public static class Verifier
|
|||
internal static void CheckResponse(IResponse resp)
|
||||
{
|
||||
if (!resp.Verify())
|
||||
{
|
||||
throw new FormatException($"invalid response, type={resp.GetType()}");
|
||||
}
|
||||
|
||||
var status = resp.MetaHeader.Status.ToModel();
|
||||
if (resp.MetaHeader != null)
|
||||
{
|
||||
var status = resp.MetaHeader.Status.ToModel();
|
||||
|
||||
if (status != null && !status.IsSuccess)
|
||||
throw new FrostFsResponseException(status);
|
||||
if (status != null && !status.IsSuccess)
|
||||
{
|
||||
throw new FrostFsResponseException(status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -138,6 +144,8 @@ public static class Verifier
|
|||
}
|
||||
|
||||
if (!request.Verify())
|
||||
{
|
||||
throw new FrostFsResponseException($"invalid response, type={request.GetType()}");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue