mirror of
https://github.com/usual2970/certimate.git
synced 2025-06-16 01:19:50 +00:00
Merge pull request #306 from fudiwei/bugfix/dogecloud-api-error
bugfix #303
This commit is contained in:
commit
741f3ec212
3
internal/pkg/vendors/dogecloud-sdk/client.go
vendored
3
internal/pkg/vendors/dogecloud-sdk/client.go
vendored
@ -153,7 +153,8 @@ func (c *Client) sendReq(method string, path string, data map[string]interface{}
|
|||||||
mime = "application/x-www-form-urlencoded"
|
mime = "application/x-www-form-urlencoded"
|
||||||
}
|
}
|
||||||
|
|
||||||
signStr := path + "\n" + body
|
path = strings.TrimPrefix(path, "/")
|
||||||
|
signStr := "/" + path + "\n" + body
|
||||||
hmacObj := hmac.New(sha1.New, []byte(c.secretKey))
|
hmacObj := hmac.New(sha1.New, []byte(c.secretKey))
|
||||||
hmacObj.Write([]byte(signStr))
|
hmacObj.Write([]byte(signStr))
|
||||||
sign := hex.EncodeToString(hmacObj.Sum(nil))
|
sign := hex.EncodeToString(hmacObj.Sum(nil))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user