Hi all,
I am developing a client-server application and I would like the server to verify the client certificate too.
These are the steps that I have followed on the serber side :
 
    SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER|SSL_VERIFY_CLIENT_ONCE, NULL);
 
    SSL_CTX_use_certificate_file(ctx, CERTF, SSL_FILETYPE_PEM)
    SSL_CTX_use_PrivateKey_file(ctx, KEYF, SSL_FILETYPE_PEM)
    SSL_CTX_check_private_key(ctx)
    SSL_CTX_load_verify_locations(ctx, CAFILE, NULL);
    SSL_CTX_set_default_verify_paths(ctx);
    SSL_CTX_set_client_CA_list(ctx, SSL_load_client_CA_file(CAFILE));
where CAFILE contains the client certificate.
The problem is that when the client connects to the server it suddenly break with the error :
 
    ....no certificate returned...
 
So it seems that the client hasno certificate or it has not loaded it.
But on the client side I have :
 
  SSL_CTX_use_certificate_file(ctx, CERTF, SSL_FILETYPE_PEM)
  SSL_CTX_use_PrivateKey_file(ctx, KEYF, SSL_FILETYPE_PEM) 
  SSL_CTX_check_private_key(ctx)
 
where CERTF contains the client certificate !
 
It's two days that I am trying to understand what is wrong but I cannot figure it out !!!
What I have to do in order to get the client certificate ?
 
Any suggestion will be VERY appreciated.
 
Thanks in advance,
Paolo

    
BEGIN:VCARD
VERSION:2.1
N:Montini;Paolo;;Dr
FN:Paolo Montini
ORG:UCI-ICS;Information and Computer Science
TITLE:Researcher
TEL;WORK;VOICE:949 824 1090
TEL;HOME;VOICE:949 673 6770
TEL;CELL;VOICE:0347 5749989
ADR;WORK:;CS 458 A;;Irvine;California;92612;USA
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:CS 458 A=0D=0AIrvine, California 92612=0D=0AUSA
ADR;HOME:;;547 Promontory Dr. West;Newport Beach;California;92660;USA
LABEL;HOME;ENCODING=QUOTED-PRINTABLE:547 Promontory Dr. West=0D=0ANewport Beach, California 92660=0D=0AUSA
X-WAB-GENDER:2
BDAY:20000313
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
EMAIL;INTERNET:[EMAIL PROTECTED]
REV:20000831T000626Z
END:VCARD

Reply via email to