Reputation: 4774
I read the TLS 1.2 RFC, but i couldn't find (or understand) how client certificate authentication works.
What i understood is that the server may request the client certificate and the client should provide it, but what exactly does it provide? How does the client prove he owns the private key (I assume he gets some challenge and encrypts it, but what exactly does he encrypt)?
I will be happy if someone could shed some light on this part of the protocol.
EDIT : What i'm trying to achieve is man in the middle (like fiddler does for server certificate).
Upvotes: 2
Views: 6197
Reputation: 3286
I can copy/paste from OpenSSL wiki: https://wiki.openssl.org/index.php/SSL_and_TLS_Protocols#Client_Authentication
Basically Client sends the Client Certificate to server that match the CA DN given by Server. Client then sends a Cerificate Verify that uses its private key to prove he owns it.
A Client Certificate authentication requires the client to own a Certificate and have the corresponding private key. Client never sends its private key, but use it to prove he has the corresponding pair key of public key advertised within Certificate.
What he digests? a digest of the whole handshakes exchanges so far. If server manage to verify this with public key and it matches digest of whole handshake so far (computed at server side) then i prove two things :
So yes challenge is in fact whole handshake messages.
Upvotes: 6