Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client authentication #192

Merged
merged 26 commits into from
Jan 20, 2015
Merged

Client authentication #192

merged 26 commits into from
Jan 20, 2015

Conversation

hannesm
Copy link
Member

@hannesm hannesm commented Oct 3, 2014

this builds on top of SNI! It might not yet be ready for merging (esp. the modification to echo_client should not be merged). any comments are welcome (addresses first half of #171)

@hannesm
Copy link
Member Author

hannesm commented Oct 6, 2014

this contains the server side as well, and works locally with openssl (both sides, s_client and s_server), the whole PR now fixes #171 🎉

@hannesm hannesm changed the title Client authentication (only client side so far) Client authentication Oct 6, 2014
@hannesm hannesm force-pushed the client_auth branch 2 times, most recently from b796ef6 to 46f7593 Compare October 31, 2014 12:29
Conflicts:
	lib/config.ml
	lib/config.mli
once again, the format is slightly different in TLS_1_2
 (signature and hash algorithms are included)
also fix parsing of cas, especially:
 ``(calength + 2) <> len buf`` instead of ``calength <> (len buf) + 2``
now that we export parse_certificate_request(_1_2)
 - parse message depending on protocol_version
 - require RSA_SIGN to be included in types
 - set client_auth field to true
 - set own_certificate and own_private_key for further use

adjust server_hello_done handler
 - send certificate and certificateVerify message (if requested and demanded and provided)
 - send empty certificate if certificaterequest occured and no certificate was found
 - no certificateverify -> continue handshake as usual
…ncoded); if none_if_empty provided, return a 0-length buffer
 - if authenticator is configured, ask for a client certificate (send CertificateRequest)
 - if certificate is provided by client, validate the chain (using the authenticator)
 - verify the signature (using the client certificate key) of the CertificateVerify message
 - store client certificate in session.peer_certificate (and trust anchor in session.trust_anchor)

the application still needs to decide whether the session.peer_certificate is good for it (it might be empty!!!)
pqwy added a commit that referenced this pull request Jan 20, 2015
@pqwy pqwy merged commit fccd439 into master Jan 20, 2015
@pqwy pqwy deleted the client_auth branch January 20, 2015 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants