File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -383,6 +383,7 @@ mod tests {
383
383
let cert = include_bytes ! ( "../test/cert.pem" ) ;
384
384
385
385
let ident = Identity :: from_pkcs8 ( cert, key) . unwrap ( ) ;
386
+ let ident2 = ident. clone ( ) ;
386
387
let builder = p ! ( TlsAcceptor :: new( ident) ) ;
387
388
388
389
let listener = p ! ( TcpListener :: bind( "0.0.0.0:0" ) ) ;
@@ -404,6 +405,13 @@ mod tests {
404
405
405
406
let socket = p ! ( TcpStream :: connect( ( "localhost" , port) ) ) ;
406
407
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
+
407
415
builder. add_root_certificate ( root_ca) ;
408
416
let builder = p ! ( builder. build( ) ) ;
409
417
let mut socket = p ! ( builder. connect( "foobar.com" , socket) ) ;
You can’t perform that action at this time.
0 commit comments