mirror of https://github.com/usual2970/certimate
fix: #512
parent
eb97f7a661
commit
d1aed36154
|
@ -297,7 +297,9 @@ func (d *DeployerProvider) updateListenerCertificate(ctx context.Context, cloudL
|
||||||
var errs []error
|
var errs []error
|
||||||
|
|
||||||
for _, listenerCertificate := range listenerCertificates {
|
for _, listenerCertificate := range listenerCertificates {
|
||||||
if *listenerCertificate.CertificateId == cloudCertId {
|
// 监听证书 ID 格式:${证书 ID}-${地域}
|
||||||
|
certificateId := strings.Split(*listenerCertificate.CertificateId, "-")[0]
|
||||||
|
if certificateId == cloudCertId {
|
||||||
certificateIsAssociated = true
|
certificateIsAssociated = true
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
@ -306,14 +308,14 @@ func (d *DeployerProvider) updateListenerCertificate(ctx context.Context, cloudL
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
listenerCertificateId, err := strconv.ParseInt(*listenerCertificate.CertificateId, 10, 64)
|
certificateIdAsInt64, err := strconv.ParseInt(certificateId, 10, 64)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errs = append(errs, err)
|
errs = append(errs, err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
getUserCertificateDetailReq := &aliyunCas.GetUserCertificateDetailRequest{
|
getUserCertificateDetailReq := &aliyunCas.GetUserCertificateDetailRequest{
|
||||||
CertId: tea.Int64(listenerCertificateId),
|
CertId: tea.Int64(certificateIdAsInt64),
|
||||||
}
|
}
|
||||||
getUserCertificateDetailResp, err := d.sdkClients.cas.GetUserCertificateDetail(getUserCertificateDetailReq)
|
getUserCertificateDetailResp, err := d.sdkClients.cas.GetUserCertificateDetail(getUserCertificateDetailReq)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -332,7 +334,7 @@ func (d *DeployerProvider) updateListenerCertificate(ctx context.Context, cloudL
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
certificateIdsExpired = append(certificateIdsExpired, *listenerCertificate.CertificateId)
|
certificateIdsExpired = append(certificateIdsExpired, certificateId)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(errs) > 0 {
|
if len(errs) > 0 {
|
||||||
|
|
Loading…
Reference in New Issue