Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44332b9d07 | ||
|
|
20a23e148c | ||
|
|
0bcb6206f4 | ||
|
|
943b9827ee | ||
|
|
741f3ec212 | ||
|
|
8549a17675 |
@@ -43,7 +43,7 @@ func (u *DogeCloudUploader) Upload(ctx context.Context, certPem string, privkeyP
|
|||||||
|
|
||||||
// 上传新证书
|
// 上传新证书
|
||||||
// REF: https://docs.dogecloud.com/cdn/api-cert-upload
|
// 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 {
|
if err != nil {
|
||||||
return nil, xerrors.Wrap(err, "failed to execute sdk request 'cdn.UploadCdnCert'")
|
return nil, xerrors.Wrap(err, "failed to execute sdk request 'cdn.UploadCdnCert'")
|
||||||
}
|
}
|
||||||
|
|||||||
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))
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export const version = "Certimate v0.2.14";
|
export const version = "Certimate v0.2.16";
|
||||||
|
|||||||
Reference in New Issue
Block a user