Hi all,

I wrote a client which should exchange its cert with the server during the SSL 
handshake.
My client gets the server certificate but the server doesn't get the client crtificate.

Can someone help me to fix the problem at the following source lines ?


The client side:

  ...
  ssl = SSL_new(ctx);
  err = SSL_use_PrivateKey_file(ssl, keyFile, SSL_FILETYPE_PEM);
  if (err == -1)
      error...
  err = SSL_use_certificate_file(ssl, certFile, SSL_FILETYPE_PEM);
  if (err == -1)
      error...
  if (!SSL_check_private_key(ssl))
      error...
  SSL_set_fd(ssl, sd);
  err = SSL_connect(ssl);
  if (err == -1)
      error...
  ...

And the server side:

  ...
  err = SSL_accept(ssl);
  if (err == -1)
     error...
  x509 = SSL_get_peer_certificate(ssl);
but x509 is always NULL.
What should I do to fix this problem ?

Thank you in advance,

Shlomi

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to