Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I was trying to connect to my server over ssl. The server and client are made possible using Openssl. I made the code for study purpose only. I made self signed certificates for clients and servers and i am using openssl s_client to test my server.

Everything works fine without client certificate. But when I gave the client certificate with the s_client it gives me the error.

# openssl s_client -connect localhost:443 -ssl3 -cert client.crt -key client.key
verify error:num=18:self signed certificate
verify return:1
verify return:1
2804:error:14094412:SSL routines:SSL3_READ_BYTES:sslv3 alert bad certificate:s3_pkt.c:1102:SSL alert number 42
2804:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshake failure:s3_pkt.c:539:

The server gives the following error at the same time

2803:error:140890B2:SSL routines:SSL3_GET_CLIENT_CERTIFICATE:no certificate returned:s3_srvr.c:2619:
 I got a connection from ( , 48096)

My client authentication code at server is:

if(verify_client == ON)

        if (!SSL_CTX_load_verify_locations(ctx, RSA_SERVER_CA_CERT, NULL)) 




share|improve this question

closed as off-topic by womble, Michael Hampton Aug 14 at 2:13

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on Server Fault must be about managing information technology systems in a business environment. Home and end-user computing questions may be asked on Super User, and questions about development, testing and development tools may be asked on Stack Overflow." – Michael Hampton
If this question can be reworded to fit the rules in the help center, please edit the question.

I imagine you created a self-signed CA and used it to create the client certificate. Have you added the self-signed CA certificate to your HTTPS enabled app server(apache I guess)? – Andre de Miranda Oct 11 '12 at 9:38