Milan Tomic wrote:

Thank you Ted. It compiles now. :>

How can I set client certificate for SSL connection? I keep cert in
sslclient.pfx file.

Best regards,
Milan
You should have a look at the sample code for the SSL book, which is downloadable on http://www.opensslbook.com/code.html The client*.c files show how the SSL connection is handled with different levels of secutiry (no encryption, check server only, use client cert). And I can recommend the book itself, which is an excellent place to look up such information. ;)

The relevant functions are also documented in http://www.openssl.org/docs/ssl/SSL_CTX_use_certificate.html I don't know the format of *.pfx files. You could just try to load it with SSL_CTX_use_certificate_chain_file with different type-constants. Then you'll have to tell OpenSSL which private key to use (which is probably also hidden somewhere in the *.pfx-File) with SSL_CTX_use_PrivateKey or similar functions.

Hope it helps,
Ted
;)

--
PGP Public Key Information
Download complete Key from http://www.convey.de/ted/tedkey_convey.asc
Key fingerprint = 31B0 E029 BCF9 6605 DAC1  B2E1 0CC8 70F4 7AFB 8D26

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to