I found that in Python it is achieved in the following way:
from OpenSSL import crypto from cryptography import x509 from cryptography.hazmat.backends import default_backendpkcs12 = crypto.load_pkcs12(open('cert.pfx', "rb").read(), '1234'.encode('ascii'))pem_data = crypto.dump_certificate(crypto.FILETYPE_PEM, pkcs12.get_certificate()) cert = x509.load_pem_x509_certificate(pem_data, default_backend()) print(cert.not_valid_after) Thanks in advance, Regards Juan Francolino