Vinnyt
Vinnyt

Reputation: 75

OpenSSL code woes

So I'm writing some C code to connect to a server that is expecting me to provide a certificate for authentication. I'm using OpenSSL to do the SSL communications and I've got the socket code worked out, and I have code to do the SSL part worked out to, but what I can't seem to get simply because the docs are so sparse is how to implement the function: SSL_CTX_set_client_cert_cb

If any one has any tips I would greatly appreciate it.

Upvotes: 0

Views: 711

Answers (1)

caf
caf

Reputation: 239331

You do not need to use SSL_CTX_set_client_cert_cb(). The simplest way is to use SSL_use_certificate_file() to set the certificate and SSL_use_PrivateKey_file() to set the corresponding private key, before calling SSL_connect().

Upvotes: 2

Related Questions