Compare commits

...

6 Commits

Author SHA1 Message Date
yoan
44332b9d07 v0.2.16 2024-11-07 08:09:25 +08:00
usual2970
20a23e148c Merge pull request #309 from fudiwei/bugfix/dogecloud-api-error
bugfix #308
2024-11-07 08:06:55 +08:00
RHQYZ
0bcb6206f4 fix #308 2024-11-06 11:07:24 +08:00
yoan
943b9827ee v0.2.15 2024-11-06 07:12:48 +08:00
usual2970
741f3ec212 Merge pull request #306 from fudiwei/bugfix/dogecloud-api-error
bugfix #303
2024-11-06 07:08:12 +08:00
Fu Diwei
8549a17675 fix: #303 2024-11-05 18:16:21 +08:00
3 changed files with 4 additions and 3 deletions

View File

@@ -43,7 +43,7 @@ func (u *DogeCloudUploader) Upload(ctx context.Context, certPem string, privkeyP
// 上传新证书
// REF: https://docs.dogecloud.com/cdn/api-cert-upload
uploadSslCertResp, err := u.sdkClient.UploadCdnCert(certName, certName, privkeyPem)
uploadSslCertResp, err := u.sdkClient.UploadCdnCert(certName, certPem, privkeyPem)
if err != nil {
return nil, xerrors.Wrap(err, "failed to execute sdk request 'cdn.UploadCdnCert'")
}

View File

@@ -153,7 +153,8 @@ func (c *Client) sendReq(method string, path string, data map[string]interface{}
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.Write([]byte(signStr))
sign := hex.EncodeToString(hmacObj.Sum(nil))

View File

@@ -1 +1 @@
export const version = "Certimate v0.2.14";
export const version = "Certimate v0.2.16";