File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -383,6 +383,7 @@ mod tests {
383383 let cert = include_bytes ! ( "../test/cert.pem" ) ;
384384
385385 let ident = Identity :: from_pkcs8 ( cert, key) . unwrap ( ) ;
386+ let ident2 = ident. clone ( ) ;
386387 let builder = p ! ( TlsAcceptor :: new( ident) ) ;
387388
388389 let listener = p ! ( TcpListener :: bind( "0.0.0.0:0" ) ) ;
@@ -404,6 +405,13 @@ mod tests {
404405
405406 let socket = p ! ( TcpStream :: connect( ( "localhost" , port) ) ) ;
406407 let mut builder = TlsConnector :: builder ( ) ;
408+ // FIXME
409+ // This checks that we can successfully add a certificate on the client side.
410+ // Unfortunately, we can not request client certificates through the API of this library,
411+ // otherwise we could check in the server thread that
412+ // socket.peer_certificate().unwrap().is_some()
413+ builder. identity ( ident2) ;
414+
407415 builder. add_root_certificate ( root_ca) ;
408416 let builder = p ! ( builder. build( ) ) ;
409417 let mut socket = p ! ( builder. connect( "foobar.com" , socket) ) ;
You can’t perform that action at this time.
0 commit comments