AWSSSL证书续订和过期之间是否存在重叠时间?
创始人
2024-09-27 13:00:50
0

AWS SSL证书在过期前会自动续订,并且新证书将在旧证书过期前几天发出,所以在一定时间内会存在新旧证书共存的情况。

您可以使用以下代码示例来检查续订和过期时间是否有重叠:

import datetime import boto3

client = boto3.client('acm')

Get details of a certificate

cert_arn = 'arn:aws:acm:region:account-id:certificate/certificate-id' cert_details = client.describe_certificate(CertificateArn=cert_arn)

Get the time when the certificate was issued

issued_time = cert_details['Certificate']['CreatedAt'].replace(tzinfo=None)

Get the time when the certificate will expire

expiry_time = cert_details['Certificate']['NotAfter'].replace(tzinfo=None)

Get the time when the certificate will be renewed

renewal_time = expiry_time - datetime.timedelta(days=30)

Check if there is overlap between renewal and expiry time

if renewal_time >= issued_time and renewal_time <= expiry_time: print("There is overlap between renewal and expiry time") else: print("There is no overlap between renewal and expiry time")

相关内容

热门资讯

推荐一款!拱趴大菠萝有什么挂(... 推荐一款!拱趴大菠萝有什么挂(辅助挂)真是存在有挂(真实有挂辅助教程)1、全新机制【ai辅助工具激活...
程序员教你!wejoker透视... 程序员教你!wejoker透视方法(辅助挂)一贯是真的有挂(发现有挂辅助攻略)1、点击下载安装,脚本...
重大发现!wepoker辅助器... 重大发现!wepoker辅助器官方(辅助挂)本来有挂(有挂秘诀辅助器)一、游戏安装教程牌型概率发牌机...
解密关于!德州私人局脚本(辅助... 解密关于!德州私人局脚本(辅助挂)都是是有挂(有挂教学辅助技巧)1. 选牌创建新账号,点击进入游戏后...
玩家必看分享!德普之星透视辅助... 玩家必看分享!德普之星透视辅助软件下载(辅助挂)竟然真的有挂(有挂功能辅助技巧)1、用户打开应用后不...
科普攻略!wepoker透视有... 科普攻略!wepoker透视有没有(辅助挂)果然存在有挂(有挂攻略辅助插件)1、下载好透视辅助下载之...
一分钟教会你!aapoker辅... 一分钟教会你!aapoker辅助插件工具(辅助挂)其实是真的有挂(有挂头条辅助技巧)一、可以开透视的...
热点推荐!wpk透视辅助方法(... 热点推荐!wpk透视辅助方法(辅助挂)其实真的有挂(有挂工具辅助插件)透视方法中分为三种模型:靠谱、...
热门推荐!wpk辅助软件(辅助... 热门推荐!wpk辅助软件(辅助挂)果然真的是有挂(今日头条辅助脚本)小薇(辅助器软件下载)致您一封信...
我来教大家!hhpoker是真... 我来教大家!hhpoker是真的还是假的(辅助挂)都是真的是有挂(新版有挂辅助技巧)1、破解器简单,...