Question is: Exporting timestamp (signing time) from signeddata? I verify my signature before. I have an asn1 signed data to verification.
import cryptography
import OpenSSL
from OpenSSL.crypto import *
from asn1crypto import cms, util, x509, pem, tsp
import os
import sys
import base64bs64 = base64.b64decode(response)
content = cms.ContentInfo.load(bs64)
signed_data = content['content']
encap_content_info = signed_data['encap_content_info']
tst_info = encap_content_info['content']
pk = load_pkcs7_data(FILETYPE_ASN1,bs64)
signers = signed_data['signer_infos']
I want to export time stamp from signed data.
I use this code:
att = cms.CMSAttribute.load(bs64)
oid = att._oid_specs
st = oid['signing_time']
child = st._child_spec
alt = child._alternatives
Another try:
time_Res = tsp.TimeStampedData.load(bs64)
time_content = time_Res['content']
But no result. How can I fix this?
Show all Attributes
Find Attribute by name
Tested with Python:3.5.3 asn1crypto:0.24.0