-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Allow access to SSLCert/Context from within handler #627
Comments
To be sure, you need to check the |
@seanmonstar, Unless you have any other idea, how I could figure out from the handler, what the SSLCert send by the client is... Yes. |
I'm guessing you want to access http://sfackler.github.io/rust-openssl/doc/v0.6.4/openssl/ssl/struct.SslStream.html#method.get_peer_certificate Perhaps adding a pub fn downcast_ref<T: NetworkStream>(&self) -> Option<&T> {
} |
I am currently trying to implement a basic SSL mutual authentication mechanism using hyper. Through using openssl and making my own SSLContext I am already able to require the client to send a certificate and reject as the server seems appropriate. But within the SSL-verify callback I can't alter the context of request. So, in order to be able to not only have a yes-no but an actual "this certificate belongs to that user", I'd need support to access the ssl certificate/context from within the handler so the application code can decide based on that, but that seems impossible at the moment as they are encapsulated away.
I can provide my code if anyone cares and if someone tells me, what changes would be accepted as a PR would also be willing to make the changes myself. Unless I have missed some way to make that happen.
The text was updated successfully, but these errors were encountered: