I wanted to extract the Signer Informations from PKCS#7 Signed Code Image using C/CPP. I wanted to know the openssl API’s. I am Able to extract Using bouncy castle (CMSSignedData).
Please let me know the openssl API’s which I can use in C/CPP to extract the each signers and signer informations and verify the Signers.
is there any API like X509_LOOKUP_buffer() instead of X509_LOOKUP_file() ???
Thanks in advance opensid
I had a similar problem. I had to extract signingTime attribute from a PKCS#7 signature. I couldn’t find the ultimate solution on the Internet but I could pick up bits and parts from various places and came up to this. Maybe there is a nicer/better/safer way, it’s the first time I amd doing this but it seems to work.
In a function I have p_pkcs7SigSize bytes of PKCS#7 signature in a buffer pointing by const void *p_pkcs7Sig. I got signing time by this. I’ve removed the error handling, do not use this code verbose!