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")

相关内容

热门资讯

拱趴大菠萝万能挂!wepoke... 拱趴大菠萝万能挂!wepoker手机助手(透视)方法-本来推荐是有挂一、拱趴大菠萝万能挂游戏安装教程...
哈糖大菠萝有挂吗!德普辅助软件... 哈糖大菠萝有挂吗!德普辅助软件(透视)软件-其实科普真的是有挂1、下载好哈糖大菠萝有挂吗透视辅助下载...
wepoker辅助工具!wep... wepoker辅助工具!wepoker开脚本视频(透视)技巧-本来解密真的是有挂1、点击下载安装,w...
wejoker黑侠辅助器!哈糖... wejoker黑侠辅助器!哈糖大菠萝万能挂(透视)脚本-一直总结真的有挂哈糖大菠萝万能挂破解侠是真的...
we poker游戏下!wep... we poker游戏下!wepoker有辅助工具吗(透视)器-都是解密存在有挂1、wepoker有辅...
pokeplus脚本!哈糖大菠... pokeplus脚本!哈糖大菠萝有没有挂(透视)方法-切实辅助是有挂1、哈糖大菠萝有没有挂脚本辅助下...
线上德州的辅助器是什么!wep... 线上德州的辅助器是什么!wepoker有辅助吗(透视)挂-真是辅助存在有挂1、线上德州的辅助器是什么...
wepoker手机插件!佛手在... wepoker手机插件!佛手在线大菠萝辅助(透视)挂-原来曝光是有挂1、佛手在线大菠萝辅助脚本辅助下...
wepoker怎么提高运气!w... wepoker怎么提高运气!wepoker辅助器有哪些功能(透视)软件-一直详情有挂1、每一步都需要...
德普之星怎么开辅助!wepok... 德普之星怎么开辅助!wepoker智能辅助插件(透视)神器-都是普及是有挂1、点击下载安装,德普之星...