From cf7bee3087433c5730aa8a9d47bdd40394703cf0 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Mon, 29 Aug 2022 12:43:10 +0300 Subject: [PATCH] [#326] client: Provide pointers requests for signing Signed-off-by: Evgenii Stratonikov --- client/object_delete.go | 2 +- client/object_get.go | 2 +- client/object_hash.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/object_delete.go b/client/object_delete.go index c0a3174a..4dbb7f66 100644 --- a/client/object_delete.go +++ b/client/object_delete.go @@ -146,7 +146,7 @@ func (c *Client) ObjectDelete(ctx context.Context, prm PrmObjectDelete) (*ResObj key = prm.key } - err := signature.SignServiceMessage(&key, req) + err := signature.SignServiceMessage(&key, &req) if err != nil { return nil, fmt.Errorf("sign request: %w", err) } diff --git a/client/object_get.go b/client/object_get.go index 53aeca99..ea4528d8 100644 --- a/client/object_get.go +++ b/client/object_get.go @@ -433,7 +433,7 @@ func (c *Client) ObjectHead(ctx context.Context, prm PrmObjectHead) (*ResObjectH } // sign the request - err := signature.SignServiceMessage(&key, req) + err := signature.SignServiceMessage(&key, &req) if err != nil { return nil, fmt.Errorf("sign request: %w", err) } diff --git a/client/object_hash.go b/client/object_hash.go index ffcfc518..30ea8e37 100644 --- a/client/object_hash.go +++ b/client/object_hash.go @@ -176,7 +176,7 @@ func (c *Client) ObjectHash(ctx context.Context, prm PrmObjectHash) (*ResObjectH c.prepareRequest(&req, &prm.meta) req.SetBody(&prm.body) - err := signature.SignServiceMessage(&c.prm.key, req) + err := signature.SignServiceMessage(&c.prm.key, &req) if err != nil { return nil, fmt.Errorf("sign request: %w", err) }