Commit graph

11 commits

Author SHA1 Message Date
Leonard Lyubich
74e917810a service: support broken apart signable payload of the requests
In previous implementation service package provided types and functions
that wrapped signing/verification of data with session token.
This allowed us to use these functions for signing / verification of
service requests of other packages. To support the expansion of messages
with additional parts that need to be signed, you must be able to easily
expand the signed data with new parts.

To achieve the described goal, this commit makes the following changes:

  * adds GroupSignedPayloads and GroupVerifyPayloads functions;

  * renames SignedDataWithToken to RequestData, DataWithTokenSignAccumulator
    to RequestSignedData, DataWithTokenSignSource to RequestVerifyData;

  * renames SignDataWithSessionToken/VerifyAccumulatedSignaturesWithToken
    function to SignRequestData/VerifyRequestData and makes it to use
    GroupSignedPayloads/GroupVerifyPayloads internally.
2020-06-10 20:37:10 +03:00
Leonard Lyubich
96a6bb4842 object: implement SignedData() and AddSignKey() methods on IntegrityHeader 2020-05-18 16:51:59 +03:00
Leonard Lyubich
1931bd590d object: fix signed payload calculation of HeadRequest message
In previous implementation first byte of buffer for HeadRequest
signed payload was set to 1 if FullHeaders flag was set. Otherwise,
this byte remained unchanged. For correct recording of a signed payload,
it is necessary to explicitly set the first byte with the unset flag.
2020-05-18 12:58:49 +03:00
Leonard Lyubich
2c571718d0 object: add unit test of HeadRequest.ReadSignedData method 2020-05-18 12:58:49 +03:00
Leonard Lyubich
4aac4d093d object: implement signing payload methods on SearchRequest message 2020-05-06 15:09:31 +03:00
Leonard Lyubich
84671cd4aa object: implement signing payload methods on GetRangeHashRequest message 2020-05-06 14:58:29 +03:00
Leonard Lyubich
e784206032 object: implement signing payload methods on GetRangeRequest message 2020-05-06 14:38:39 +03:00
Leonard Lyubich
fc0da3c8fc object: implement signing payload methods on DeleteRequest message 2020-05-06 14:15:07 +03:00
Leonard Lyubich
68f83f5470 object: implement signing payload methods on HeadRequest message 2020-05-06 13:56:59 +03:00
Leonard Lyubich
439221cea8 object: implement signing payload methods on GetRequest message 2020-05-06 13:33:03 +03:00
Leonard Lyubich
78f435a905 object: implement signing payload methods on PutRequest message 2020-05-06 13:16:15 +03:00