@@ -142,7 +142,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
142
142
using ( var connection = server . CreateConnection ( ) )
143
143
{
144
144
var stream = OpenSslStream ( connection . Stream ) ;
145
- await stream . AuthenticateAsClientAsync ( "localhost" , new X509CertificateCollection ( ) , SslProtocols . Tls12 | SslProtocols . Tls11 , false ) ;
145
+ await stream . AuthenticateAsClientAsync ( "localhost" ) ;
146
146
Assert . True ( stream . RemoteCertificate . Equals ( _x509Certificate2 ) ) ;
147
147
}
148
148
}
@@ -172,7 +172,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
172
172
using ( var connection = server . CreateConnection ( ) )
173
173
{
174
174
var stream = OpenSslStream ( connection . Stream ) ;
175
- await stream . AuthenticateAsClientAsync ( "localhost" , new X509CertificateCollection ( ) , SslProtocols . Tls12 | SslProtocols . Tls11 , false ) ;
175
+ await stream . AuthenticateAsClientAsync ( "localhost" ) ;
176
176
Assert . True ( stream . RemoteCertificate . Equals ( _x509Certificate2 ) ) ;
177
177
Assert . Equal ( 1 , selectorCalled ) ;
178
178
}
@@ -207,14 +207,14 @@ void ConfigureListenOptions(ListenOptions listenOptions)
207
207
using ( var connection = server . CreateConnection ( ) )
208
208
{
209
209
var stream = OpenSslStream ( connection . Stream ) ;
210
- await stream . AuthenticateAsClientAsync ( "localhost" , new X509CertificateCollection ( ) , SslProtocols . Tls12 | SslProtocols . Tls11 , false ) ;
210
+ await stream . AuthenticateAsClientAsync ( "localhost" ) ;
211
211
Assert . True ( stream . RemoteCertificate . Equals ( _x509Certificate2 ) ) ;
212
212
Assert . Equal ( 1 , selectorCalled ) ;
213
213
}
214
214
using ( var connection = server . CreateConnection ( ) )
215
215
{
216
216
var stream = OpenSslStream ( connection . Stream ) ;
217
- await stream . AuthenticateAsClientAsync ( "localhost" , new X509CertificateCollection ( ) , SslProtocols . Tls12 | SslProtocols . Tls11 , false ) ;
217
+ await stream . AuthenticateAsClientAsync ( "localhost" ) ;
218
218
Assert . True ( stream . RemoteCertificate . Equals ( _x509Certificate2NoExt ) ) ;
219
219
Assert . Equal ( 2 , selectorCalled ) ;
220
220
}
@@ -274,7 +274,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
274
274
using ( var connection = server . CreateConnection ( ) )
275
275
{
276
276
var stream = OpenSslStream ( connection . Stream ) ;
277
- await stream . AuthenticateAsClientAsync ( "localhost" , new X509CertificateCollection ( ) , SslProtocols . Tls12 | SslProtocols . Tls11 , false ) ;
277
+ await stream . AuthenticateAsClientAsync ( "localhost" ) ;
278
278
Assert . True ( stream . RemoteCertificate . Equals ( _x509Certificate2 ) ) ;
279
279
Assert . Equal ( 1 , selectorCalled ) ;
280
280
}
@@ -340,7 +340,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
340
340
// HttpClient might not send the certificate because it is invalid or it doesn't match any
341
341
// of the certificate authorities sent by the server in the SSL handshake.
342
342
var stream = OpenSslStreamWithCert ( connection . Stream ) ;
343
- await stream . AuthenticateAsClientAsync ( "localhost" , new X509CertificateCollection ( ) , SslProtocols . Tls12 | SslProtocols . Tls11 , false ) ;
343
+ await stream . AuthenticateAsClientAsync ( "localhost" ) ;
344
344
await AssertConnectionResult ( stream , true ) ;
345
345
}
346
346
}
@@ -417,7 +417,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
417
417
using ( var connection = server . CreateConnection ( ) )
418
418
{
419
419
var stream = OpenSslStreamWithCert ( connection . Stream ) ;
420
- await stream . AuthenticateAsClientAsync ( "localhost" , new X509CertificateCollection ( ) , SslProtocols . Tls12 | SslProtocols . Tls11 , false ) ;
420
+ await stream . AuthenticateAsClientAsync ( "localhost" ) ;
421
421
await AssertConnectionResult ( stream , true ) ;
422
422
Assert . True ( clientCertificateValidationCalled ) ;
423
423
}
@@ -444,7 +444,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
444
444
using ( var connection = server . CreateConnection ( ) )
445
445
{
446
446
var stream = OpenSslStreamWithCert ( connection . Stream ) ;
447
- await stream . AuthenticateAsClientAsync ( "localhost" , new X509CertificateCollection ( ) , SslProtocols . Tls12 | SslProtocols . Tls11 , false ) ;
447
+ await stream . AuthenticateAsClientAsync ( "localhost" ) ;
448
448
await AssertConnectionResult ( stream , false ) ;
449
449
}
450
450
}
@@ -469,7 +469,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
469
469
using ( var connection = server . CreateConnection ( ) )
470
470
{
471
471
var stream = OpenSslStreamWithCert ( connection . Stream ) ;
472
- await stream . AuthenticateAsClientAsync ( "localhost" , new X509CertificateCollection ( ) , SslProtocols . Tls12 | SslProtocols . Tls11 , false ) ;
472
+ await stream . AuthenticateAsClientAsync ( "localhost" ) ;
473
473
await AssertConnectionResult ( stream , false ) ;
474
474
}
475
475
}
@@ -494,7 +494,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
494
494
using ( var connection = server . CreateConnection ( ) )
495
495
{
496
496
var stream = OpenSslStreamWithCert ( connection . Stream ) ;
497
- await stream . AuthenticateAsClientAsync ( "localhost" , new X509CertificateCollection ( ) , SslProtocols . Tls12 | SslProtocols . Tls11 , false ) ;
497
+ await stream . AuthenticateAsClientAsync ( "localhost" ) ;
498
498
await AssertConnectionResult ( stream , true ) ;
499
499
}
500
500
}
@@ -528,7 +528,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
528
528
using ( var connection = server . CreateConnection ( ) )
529
529
{
530
530
var stream = OpenSslStreamWithCert ( connection . Stream ) ;
531
- await stream . AuthenticateAsClientAsync ( "localhost" , new X509CertificateCollection ( ) , SslProtocols . Tls12 | SslProtocols . Tls11 , false ) ;
531
+ await stream . AuthenticateAsClientAsync ( "localhost" ) ;
532
532
await AssertConnectionResult ( stream , true ) ;
533
533
}
534
534
}
@@ -609,7 +609,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
609
609
var sslOptions = new SslClientAuthenticationOptions
610
610
{
611
611
TargetHost = "localhost" ,
612
- EnabledSslProtocols = SslProtocols . Tls12 | SslProtocols . Tls11 ,
612
+ EnabledSslProtocols = SslProtocols . None ,
613
613
ApplicationProtocols = new List < SslApplicationProtocol > { SslApplicationProtocol . Http11 , SslApplicationProtocol . Http2 } ,
614
614
} ;
615
615
0 commit comments