Skip to content

TlsAcceptor does not request client certificate? #161

Open
@gxtaillon

Description

@gxtaillon

Hello,

I'm trying to use rust-native-tls to setup a bare tls connection that would require client to provide a certificate, however I have not found a way of doing this with TlsAcceptor. There doesn't seem to be a way to set the verification mode and depth.

Using openssl s_server -accept *:10000 -cert server.pem -key server.pem -verify 10 -CAfile root-ca.crt, I can see that when providing a cert on the TlsConnectorBuilder, the client sends the certificate.

The peer_certificate() on the call always return Ok(None), and the server never requests the certificate.

Looking at the tests, requesting the client's certificate doesn't seem to be supported.

assert!(socket.peer_certificate().unwrap().is_none());

Would you welcome a PR?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions