Rares Dumitrache
2014-10-20 11:25:56 UTC
Hello,
I have a signing certificate with which I sign a message with openssl
command line. I do NOT use -nocerts option, so the signing certificate
should be embedded in the CMS message. I verify that it exists by
retrieving it with command:
openssl cms -verify -in infile.ini -certsout cert_to_test.pem and I
test the certificate and it works.
Now I want to retrieve the certificate in C, using openssl library. I
read the CMS message file, then I read the SMIME and trz to get the
signer. Here is the function called:
pBioFile= BIO_new_file(file, "r");
pCms = SMIME_read_CMS(pBioFile, NULL);
pCms_signer = CMS_get0_SignerInfos(pCms);
sk_CMS_SignerInfo_num(pskCms_signer ) -> return 0 meaning no
certificates were found.
Can anyone help with what am I doing wrong?
Thanks,
Rares
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
I have a signing certificate with which I sign a message with openssl
command line. I do NOT use -nocerts option, so the signing certificate
should be embedded in the CMS message. I verify that it exists by
retrieving it with command:
openssl cms -verify -in infile.ini -certsout cert_to_test.pem and I
test the certificate and it works.
Now I want to retrieve the certificate in C, using openssl library. I
read the CMS message file, then I read the SMIME and trz to get the
signer. Here is the function called:
pBioFile= BIO_new_file(file, "r");
pCms = SMIME_read_CMS(pBioFile, NULL);
pCms_signer = CMS_get0_SignerInfos(pCms);
sk_CMS_SignerInfo_num(pskCms_signer ) -> return 0 meaning no
certificates were found.
Can anyone help with what am I doing wrong?
Thanks,
Rares
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org