Make Client.GetContainer method to return an error if received container
structure does not meet NeoFS API specification.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Implement NonceUUID/SetNonceUUID methods on container structure. Change
implementation of Nonce/SetNonce methods and mark them deprecated.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
GetContainer method reads container structure by identifier from the
network. In some cases it is required to additionally check the
correspondence of the container structure to the identifier as a hash from
the binary representation. To do this, a new function
GetVerifiedContainerStructure is defined to execute the check after
receiving the container.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
- SplitInfo structure in object.HeadResponse
- SplitInfo structure in object.GetRangeResponse
- Raw flag in object.GetRangeRequest
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
In previous implementation Target provided Keys/SetKeys methods which
allowed working with ECDSA keys. There was also a bug in the NewTargetFromV2
function when the binary key differed in format from the ECDSA key. New
BinaryKeys/SetBinaryKeys methods work with binary keys. To work with ECDSA
keys added functions TargetECDSAKeys/SetTargetECDSAKeys. Old methods are
left and marked deprecated.
Type Record provided an interface for adding a Target by Role and a list of
ECDSA keys. New SetTargets method allows to set the list of Target's,
AddTarget function allows to add a single Target. AddFormedTarget works like
old AddTarget method, which is now deprecated.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
GetEACL method of Client receives eACL table with signature, verifies the
signature and return the table. In some cases we need to receive table and
signature regardless of their correctness. New method GetEACLWithSignature
provides such an opportunity.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Extended ACL tables should be signed with RFC-6979 standard. Fix Client
.GetEACL implementation to verify eACL signature with SignRFC6979 option.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
There is a need to set dial timeout in SDK client that is used in case of
internal connection opening. Add DialTimeout option constructor to support
this feature.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
There is a need to set dial timeout in v2 client that is used in case of
internal connection opening. Add DialTimeout option constructor to support
this feature. Remove unused and no longer needed WithGRPCDialContext
function.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
According to API object.Head response contains signature of
object ID rather than signature of object header itself.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>