Hi LongJi Chen!
At a first glance the problem seems very simple:
/* Get client's certificate (note: beware of dynamic allocation) - opt */
client_cert = SSL_get_peer_certificate (ssl);
printf("cli %d\n", client_cert);
if (client_cert == NULL) {
printf ("Client certificate:\n");
[...]
} else
printf ("Client does not have certificate.\n");
The correct code should read if(client_cert != NULL) !!! So you are
trying to access a NULL pointer when that actually indicates an error.
I hope that helps!
F.S.
_____________________________________________________________
Federico Sauter [EMAIL PROTECTED]
Software Entwicklung Tel: +49 89 7465 4778
TESIS Sysware GmbH Fax: +49 89 7465 4788
Implerstra�e 26 * D-81371 M�nchen * Deutschland
LongJi Chen wrote:
> hello,
>
> In serv.cpp and cli.cpp demo programs,
>
> I can't get client's certificte. Could anyone help me?
>
>
>
>
>
> ______________________________________________________________________
> OpenSSL Project http://www.openssl.org
> User Support Mailing List [EMAIL PROTECTED]
> Automated List Manager [EMAIL PROTECTED]
>
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]