Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Sep 2004 16:00:35 +0200
From:      Richard Kaestner <richard.kaestner@ycn.com>
To:        freebsd-questions@freebsd.org
Subject:   SSL-programming: no client certificate
Message-ID:  <200409041600.35169.richard.kaestner@ycn.com>

next in thread | raw e-mail | index | archive | help
Hope, this is not too far OT:

I am playing around with a SSL Server / Client=20
(from /usr/src/crypto/openssl/demos/ssl/ )

but I am unable to get the client certificate.
The original example works well - without Client Cert.


What I did:

=2D I copied the code from server.c into the cli.c:
  SSL_CTX_use_certificate_file(ctx, ...,
  SSL_CTX_use_PrivateKey_file(ctx, ...
  SSL_CTX_check_private_key(ctx, ...
  before creating the socket (sd =3D socket (AF_INET, SOCK_STREAM, 0);)

  I also tried with=20
  SSL_use_certificate_file(ssl, ...,
  SSL_use_PrivateKey_file(ssl, ...
  SSL_check_private_key(ssl, ...
  aftre "ssl =3D SSL_new (ctx);"
  ... also no client cert.

=2D added  to server.c:
  "SSL_set_verify(ssl, SSL_VERIFY_PEER, 0);"
  "SSL_set_verify_depth(ssl, 0);"

  "client_cert =3D SSL_get_peer_certificate(ssl);"

whatever I played around, I do not receive the client certificate!

what do I wrong, what am I missing ?????

(using FreeBSD 4.10)

=2D-=20
Mit freundlichen Gr=FC=DFen

Richard K=E4stner
EDV-Beratung
Woerthgasse 17
2500 Baden
Austria



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409041600.35169.richard.kaestner>