mirror of
https://github.com/certd/certd.git
synced 2025-11-25 09:10:11 +08:00
chore:
This commit is contained in:
@@ -83,7 +83,7 @@ export class AliyunSslClient {
|
||||
method: "POST",
|
||||
};
|
||||
|
||||
this.opts.logger.info("开始上传证书");
|
||||
this.opts.logger.info(`开始上传证书:${req.name}`);
|
||||
const ret: any = await client.request("UploadUserCertificate", params, requestOption);
|
||||
this.checkRet(ret);
|
||||
this.opts.logger.info("证书上传成功:aliyunCertId=", ret.CertId);
|
||||
|
||||
@@ -50,9 +50,22 @@ export class TencentSslClient {
|
||||
const ret = await client.UploadCertificate(params);
|
||||
this.checkRet(ret);
|
||||
this.logger.info("证书上传成功:tencentCertId=", ret.CertificateId);
|
||||
await this.switchCertNotify([ret.CertificateId], true);
|
||||
return ret.CertificateId;
|
||||
}
|
||||
|
||||
async switchCertNotify(certIds: string[], disabled: boolean) {
|
||||
const client = await this.getSslClient();
|
||||
const params = {
|
||||
CertificateIds: certIds,
|
||||
SwitchStatus: disabled ? 1 : 0, //1是忽略通知,0是不忽略
|
||||
};
|
||||
const ret = await client.ModifyCertificatesExpiringNotificationSwitch(params);
|
||||
this.checkRet(ret);
|
||||
this.logger.info(`关闭证书${certIds}过期通知成功`);
|
||||
return ret.RequestId;
|
||||
}
|
||||
|
||||
async deployCertificateInstance(params: any) {
|
||||
const client = await this.getSslClient();
|
||||
const res = await client.DeployCertificateInstance(params);
|
||||
|
||||
Reference in New Issue
Block a user