[#326] client: Provide pointers requests for signing
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
456167e777
commit
cf7bee3087
3 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue