Squashed commit of the following:
commit 1f029f560d96e4c273fbbc6e85cde23956967521 Author: Tnze <cjd001113@outlook.com> Date: Wed Dec 7 11:42:39 2022 +0800 Adjust struct field name commit 3216cc964c87880cfe3d76492a6ad399cb5660e8 Author: patyhank <mlpmmy@gmail.com> Date: Wed Dec 7 11:25:28 2022 +0800 Change PublicKeySignature to V2 commit 3308bd67b29f7734344d83503d41960934f84086 Author: patyhank <mlpmmy@gmail.com> Date: Wed Dec 7 11:19:20 2022 +0800 Change PublicKeySignature to V2
This commit is contained in:
@ -23,6 +23,7 @@ type KeyPairResp struct {
|
||||
PublicKey string `json:"publicKey"`
|
||||
} `json:"keyPair"`
|
||||
PublicKeySignature string `json:"publicKeySignature"`
|
||||
PublicKeySignatureV2 string `json:"publicKeySignatureV2"`
|
||||
ExpiresAt time.Time `json:"expiresAt"`
|
||||
RefreshedAfter time.Time `json:"refreshedAfter"`
|
||||
}
|
||||
@ -32,7 +33,7 @@ func (k KeyPairResp) WriteTo(w io.Writer) (int64, error) {
|
||||
if block == nil {
|
||||
return 0, errors.New("pem decode error: no data is found")
|
||||
}
|
||||
signature, err := base64.StdEncoding.DecodeString(k.PublicKeySignature)
|
||||
signature, err := base64.StdEncoding.DecodeString(k.PublicKeySignatureV2)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user