« Return to Thread: problem verifing a CMS enveloppe signature when the certificate is'nt included in enveloppe

problem verifing a CMS enveloppe signature when the certificate is'nt included in enveloppe

by Aymeric-3 :: Rate this Message:

Reply to Author | View in Thread

Hi,
the problem is the keyset returns an error when importing a public key(from
certificate).
I know it's suppose to have a private key first, but I can't have the
private key of my partners, only their certifiates. So what I want is to
verify the signature of a cms enveloppe (received from the partner) that
didn't included the signing certificate (inclusion is not mandatory
according to CMS RFC).




CRYPT_CERTIFICATE cert1;
/* OK inited previously with cryptImportCert from a PEM file */

CRYPT_KEYSET keyset1;
cryptKeysetOpen( &keyset1, CRYPT_UNUSED, CRYPT_KEYSET_FILE, "key.p15",
CRYPT_KEYOPT_CREATE);
/* OK it is empty and ready now  */

cryptAddPublicKey(keyset1, cert1)
/* ERROR -1 meaning PARAM1 so the keyset1  */

/*
The utlimate goal is to
write  cr = cryptSetAttribute( cryptEnvelope, CRYPT_ENVINFO_KEYSET_SIGCHECK,
keyset1);
*/

I don't want to use database connection, I work only with files. Is Cryptlib
providing a solution for verifying signatures without database?
if not is there a simple example for database use?

Help appreciated .




_______________________________________________
Cryptlib mailing list
Cryptlib@... via Mail: cryptlib-request@...
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.

 « Return to Thread: problem verifing a CMS enveloppe signature when the certificate is'nt included in enveloppe