On Wed, Apr 28, 2004, Raven wrote: > Hi. > > I have to write client for some system that is written by other people, > apparently it uses SSL ;) > I can normally establish SSL connection and receive appropriate response, > but problem is that they sent us their certificate file that we should use, > named "users.cer" (single file). > > I googled and loked at various tutorials, but they all involve generating > private key, making certificate out of it, ending it for signing etc. No cer > file usage decribed anywhere. > How do I add .cer certificate usage to standart connection with SSL? > > A code sample 'd be appreciated ;) >
The .cer file can be either PEM or DER format depending on what options are used. If it looks like a text file with a line like -----BEGIN CERTIFICATE----- its PEM. If its a binary file it DER. You can check that with: openssl x509 -in users.cer -text -noout [-inform DER] That wont help you much because the request to "use users.cer" is pretty meaningless. If they want you to use it as a client certificate then you can't because you don't have the private key. If it is a CA certificate then you can add it to your trusted root CAs. The output of the above command may give a hint as to what they want you to do. Steve. -- Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage OpenSSL project core developer and freelance consultant. Funding needed! Details on homepage. Homepage: http://www.drh-consultancy.demon.co.uk ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]