Re: storing a certificate chain in a key store
Abhijit Menon-Sen <[email protected]>
| Newsgroups | gmane.comp.encryption.cryptlib |
|---|---|
| Message-ID | <[email protected]> |
At 2009-10-17 17:21:34 +1300, [email protected] wrote: > > With a standard cryptImportCert() That's what I thought, but I must be doing something wrong. I have three certificates in bundle.crt and one in server.crt; both are in text format, i.e. base64 wrapped in BEGIN CERTIFICATE/END CERTIFICATE lines. I put all four certificates into all.crt, read the file contents, and call cryptImportCert(). The result has a CRYPT_CERTINFO_CERTTYPE of CRYPT_CERTFORMAT_CERTIFICATE, not CRYPT_CERTFORMAT_CERTCHAIN. (That was with the server certificate first and the others following it in the file. If instead I put the three bundle.crt certificates first, cryptAddPublicKey() fails.) Do I need to export the chain in some other format? (PKCS #7?) I tried "openssl crl2pkcs7 -nocrl -certfile bundle.crt -certfile server.crt -out all.p7" and using all.p7 in place of all.crt, but then cryptImportCert() fails with CRYPT_ERROR_BADDATA. What am I missing? -- ams _______________________________________________ Cryptlib mailing list [email protected] via Mail: [email protected] 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.