But I want to get all the certificates that I have put in the certs param of PKCS7_sign, not only the signers.

Andrzej Posiadala wrote:

When you've already read a PKCS#7 message into memory and you have it under PKCS7 * p7 pointer , try this:

STACK_OF(X509) *certs; X509 * tmpCert;
certs = PKCS7_get0_signers(p7, NULL, flags);
for (int i = 0; i < sk_X509_num(certs); i++)
{
tmpCert = sk_X509_value(certs,i) ;
//do sth. with tmpCert
}
sk_X509_free(certs);


For further info take a look at apps/smime.c

Regards
Andrzej Posiadała





Manuel Sánchez Cuenca <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
2004-02-19 13:25
Please respond to openssl-users


To: [EMAIL PROTECTED]
cc: Subject: PKCS#7 certificates



Hello all,


Anybody can tell me how can I get all the certificates enclosed in a PKCS#7 structure.

Best regards.





--
=============================================
Manuel Sanchez Cuenca
Dept. Ingenieria y Tecnologia de Computadores
Universidad de Murcia - Espana
Tlf: +34 968363995 - Fax: 968364151
email: [EMAIL PROTECTED]
www: http://skywalker.dif.um.es/~lolo



______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to