storing a certificate chain in a key store

Abhijit Menon-Sen <[email protected]>
Newsgroups gmane.comp.encryption.cryptlib
Message-ID <[email protected]>
Hi.

I cryptKeysetOpen() a CRYPT_KEYSET_FILE store.

I cryptAddPrivateKey() a suitably-labelled RSA private key.

Then I cryptImportCert() from a .crt file, and cryptAddPublicKey() to
the keyset, and all is well.

All of that works well. Now here's the complication: I want to store not
only the certificate that corresponds to the private key, but the chain
of certificates leading to it as well.

I have two files, foo.crt and cabundle.crt, that represent this chain.
Running "openssl verify -verbose -CAfile cabundle.crt foo.crt" says OK,
so I know that all the certificates I need are in those two files.

Google tells me that some Java programs in this situation interoperate
with openssl by exporting the key and certificate chain into a PKCS#12
file and importing from that. While I can export my certificates thus,
cryptlib won't read PKCS#12 files; and the FAQ explains why not. Fine.

What should I be doing instead? How should I import a certificate chain?
(The manual has examples of how to sign, verify, and export chains, but
doesn't say how to import them that I can see.) Once I have the chain
imported, will cryptAddPrivateKey() do the right thing when I try to
store it?

Any help would be very greatly appreciated.

-- 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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.