Hello
Excuse me by me very poor English
I must to program a digital sign (and verification) component based on PKCS7 files. I
have to sign a
document and this
sign must be out in PKCS7 format file. The document is detached (�not included?). I
think when I'll
verify this sign file
I'd use PKCS7_verify function, but I'm not sure. If I use this function, �Should I
write sign file
with SMIME_write and
read it with SMIME_read?.
I attempt that, but I allways get error. What can I do?
This is part of my code :
/* Read PKCS7 signed file */
if ( ! (p7=SMIME_read_PKCS7(fp_Firma , &bio_pkcs7)) )
return ( ERROR );
/* Open original document to verify sign */
if ( ! (bio_pkcs7=BIO_new_file(FICH_DOCUMENTO, "rb")) )
return ( ERROR );
if ( p7 == NULL )
return ( ERROR );
if ( bio_pkcs7 == NULL )
return ( ERROR );
/* Verify PKCS7 with original document */
if ( ! PKCS7_verify(p7, NULL, NULL, bio_pkcs7, out, PKCS7_NOVERIFY) )
return ERROR;
I'm no verifying certs. I suposse I must do it, but I don't know how to do it
Can anybody help me ?? I'm desperated
Thank you very much
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]