-
Notifications
You must be signed in to change notification settings - Fork 47
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
We need a method to get TlsStream's client cert #33
Comments
Yes, this is necessary information. Not just to extract certain fields, but the whole certificate. @YangzhenZhao already sent pull request #25, which implemented exactly this, but has been rejected because it publicly exposes a rustls type. This is easily fixed, because the rustls certificate type is simply a byte vector: @skade: I can send a pull request if you indicate that such a solution would be accepted. |
I'll reply to the closing comment by @skade on #35 here, so the discussion isn't fragmented all over the place.
I think this makes a lot of sense, when it comes to implementing client auth (i.e. verifying that the client cert matches some criteria). However, a certificate isn't just authentication information that needs to be checked, but also part of the connection payload. Similar to what @Earthson describes in the OP, I need to retrieve the certificate, but not to implement authentication, which I do via the rustls In my opinion rustls has a good approach by offering only a set of correctly implemented |
In the case of X509 client verification, we want to get the certificate of client to extract some extra info(email, name, ...)
but ServerSession is not for public use. https://github.com/async-rs/async-tls/blob/master/src/server.rs#L20
Is it a good idea to have some code like:
The text was updated successfully, but these errors were encountered: