@@ -142,7 +142,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
142142 using ( var connection = server . CreateConnection ( ) )
143143 {
144144 var stream = OpenSslStream ( connection . Stream ) ;
145- await stream . AuthenticateAsClientAsync ( "localhost" , new X509CertificateCollection ( ) , SslProtocols . Tls12 | SslProtocols . Tls11 , false ) ;
145+ await stream . AuthenticateAsClientAsync ( "localhost" ) ;
146146 Assert . True ( stream . RemoteCertificate . Equals ( _x509Certificate2 ) ) ;
147147 }
148148 }
@@ -172,7 +172,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
172172 using ( var connection = server . CreateConnection ( ) )
173173 {
174174 var stream = OpenSslStream ( connection . Stream ) ;
175- await stream . AuthenticateAsClientAsync ( "localhost" , new X509CertificateCollection ( ) , SslProtocols . Tls12 | SslProtocols . Tls11 , false ) ;
175+ await stream . AuthenticateAsClientAsync ( "localhost" ) ;
176176 Assert . True ( stream . RemoteCertificate . Equals ( _x509Certificate2 ) ) ;
177177 Assert . Equal ( 1 , selectorCalled ) ;
178178 }
@@ -207,14 +207,14 @@ void ConfigureListenOptions(ListenOptions listenOptions)
207207 using ( var connection = server . CreateConnection ( ) )
208208 {
209209 var stream = OpenSslStream ( connection . Stream ) ;
210- await stream . AuthenticateAsClientAsync ( "localhost" , new X509CertificateCollection ( ) , SslProtocols . Tls12 | SslProtocols . Tls11 , false ) ;
210+ await stream . AuthenticateAsClientAsync ( "localhost" ) ;
211211 Assert . True ( stream . RemoteCertificate . Equals ( _x509Certificate2 ) ) ;
212212 Assert . Equal ( 1 , selectorCalled ) ;
213213 }
214214 using ( var connection = server . CreateConnection ( ) )
215215 {
216216 var stream = OpenSslStream ( connection . Stream ) ;
217- await stream . AuthenticateAsClientAsync ( "localhost" , new X509CertificateCollection ( ) , SslProtocols . Tls12 | SslProtocols . Tls11 , false ) ;
217+ await stream . AuthenticateAsClientAsync ( "localhost" ) ;
218218 Assert . True ( stream . RemoteCertificate . Equals ( _x509Certificate2NoExt ) ) ;
219219 Assert . Equal ( 2 , selectorCalled ) ;
220220 }
@@ -274,7 +274,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
274274 using ( var connection = server . CreateConnection ( ) )
275275 {
276276 var stream = OpenSslStream ( connection . Stream ) ;
277- await stream . AuthenticateAsClientAsync ( "localhost" , new X509CertificateCollection ( ) , SslProtocols . Tls12 | SslProtocols . Tls11 , false ) ;
277+ await stream . AuthenticateAsClientAsync ( "localhost" ) ;
278278 Assert . True ( stream . RemoteCertificate . Equals ( _x509Certificate2 ) ) ;
279279 Assert . Equal ( 1 , selectorCalled ) ;
280280 }
@@ -340,7 +340,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
340340 // HttpClient might not send the certificate because it is invalid or it doesn't match any
341341 // of the certificate authorities sent by the server in the SSL handshake.
342342 var stream = OpenSslStreamWithCert ( connection . Stream ) ;
343- await stream . AuthenticateAsClientAsync ( "localhost" , new X509CertificateCollection ( ) , SslProtocols . Tls12 | SslProtocols . Tls11 , false ) ;
343+ await stream . AuthenticateAsClientAsync ( "localhost" ) ;
344344 await AssertConnectionResult ( stream , true ) ;
345345 }
346346 }
@@ -417,7 +417,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
417417 using ( var connection = server . CreateConnection ( ) )
418418 {
419419 var stream = OpenSslStreamWithCert ( connection . Stream ) ;
420- await stream . AuthenticateAsClientAsync ( "localhost" , new X509CertificateCollection ( ) , SslProtocols . Tls12 | SslProtocols . Tls11 , false ) ;
420+ await stream . AuthenticateAsClientAsync ( "localhost" ) ;
421421 await AssertConnectionResult ( stream , true ) ;
422422 Assert . True ( clientCertificateValidationCalled ) ;
423423 }
@@ -444,7 +444,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
444444 using ( var connection = server . CreateConnection ( ) )
445445 {
446446 var stream = OpenSslStreamWithCert ( connection . Stream ) ;
447- await stream . AuthenticateAsClientAsync ( "localhost" , new X509CertificateCollection ( ) , SslProtocols . Tls12 | SslProtocols . Tls11 , false ) ;
447+ await stream . AuthenticateAsClientAsync ( "localhost" ) ;
448448 await AssertConnectionResult ( stream , false ) ;
449449 }
450450 }
@@ -469,7 +469,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
469469 using ( var connection = server . CreateConnection ( ) )
470470 {
471471 var stream = OpenSslStreamWithCert ( connection . Stream ) ;
472- await stream . AuthenticateAsClientAsync ( "localhost" , new X509CertificateCollection ( ) , SslProtocols . Tls12 | SslProtocols . Tls11 , false ) ;
472+ await stream . AuthenticateAsClientAsync ( "localhost" ) ;
473473 await AssertConnectionResult ( stream , false ) ;
474474 }
475475 }
@@ -494,7 +494,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
494494 using ( var connection = server . CreateConnection ( ) )
495495 {
496496 var stream = OpenSslStreamWithCert ( connection . Stream ) ;
497- await stream . AuthenticateAsClientAsync ( "localhost" , new X509CertificateCollection ( ) , SslProtocols . Tls12 | SslProtocols . Tls11 , false ) ;
497+ await stream . AuthenticateAsClientAsync ( "localhost" ) ;
498498 await AssertConnectionResult ( stream , true ) ;
499499 }
500500 }
@@ -528,7 +528,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
528528 using ( var connection = server . CreateConnection ( ) )
529529 {
530530 var stream = OpenSslStreamWithCert ( connection . Stream ) ;
531- await stream . AuthenticateAsClientAsync ( "localhost" , new X509CertificateCollection ( ) , SslProtocols . Tls12 | SslProtocols . Tls11 , false ) ;
531+ await stream . AuthenticateAsClientAsync ( "localhost" ) ;
532532 await AssertConnectionResult ( stream , true ) ;
533533 }
534534 }
@@ -609,7 +609,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
609609 var sslOptions = new SslClientAuthenticationOptions
610610 {
611611 TargetHost = "localhost" ,
612- EnabledSslProtocols = SslProtocols . Tls12 | SslProtocols . Tls11 ,
612+ EnabledSslProtocols = SslProtocols . None ,
613613 ApplicationProtocols = new List < SslApplicationProtocol > { SslApplicationProtocol . Http11 , SslApplicationProtocol . Http2 } ,
614614 } ;
615615
0 commit comments