utils: Add function to extract X509 cert validity
X509 uses ASN1 GENERALIZEDTIME or UTCTIME to store certificate validity. pyOpenSSL 0.7 and above allow us to retrieve both “notBefore” and “notAfter” as strings. Parsing them turned out to be a challenge since they can be in a variety of formats (YYYYMMDDhhmmssZ, YYYYMMDDhhmmss+hhmm or YYYMMDDhhmmss-hhmm). This will be used to verify the validity of cluster certificates in LUVerifyCluster. Signed-off-by:Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
Loading
Please register or sign in to comment