@@ -228,14 +228,14 @@ public SslStream(Stream innerStream, bool leaveInnerStreamOpen, RemoteCertificat
228
228
//
229
229
public virtual IAsyncResult BeginAuthenticateAsClient ( string targetHost , AsyncCallback ? asyncCallback , object ? asyncState )
230
230
{
231
- return BeginAuthenticateAsClient ( targetHost , null , SecurityProtocol . SystemDefaultSecurityProtocols , false ,
231
+ return BeginAuthenticateAsClient ( targetHost , null , SslProtocols . None , false ,
232
232
asyncCallback , asyncState ) ;
233
233
}
234
234
235
235
public virtual IAsyncResult BeginAuthenticateAsClient ( string targetHost , X509CertificateCollection ? clientCertificates ,
236
236
bool checkCertificateRevocation , AsyncCallback ? asyncCallback , object ? asyncState )
237
237
{
238
- return BeginAuthenticateAsClient ( targetHost , clientCertificates , SecurityProtocol . SystemDefaultSecurityProtocols , checkCertificateRevocation , asyncCallback , asyncState ) ;
238
+ return BeginAuthenticateAsClient ( targetHost , clientCertificates , SslProtocols . None , checkCertificateRevocation , asyncCallback , asyncState ) ;
239
239
}
240
240
241
241
public virtual IAsyncResult BeginAuthenticateAsClient ( string targetHost , X509CertificateCollection ? clientCertificates ,
@@ -265,15 +265,15 @@ internal IAsyncResult BeginAuthenticateAsClient(SslClientAuthenticationOptions s
265
265
public virtual IAsyncResult BeginAuthenticateAsServer ( X509Certificate serverCertificate , AsyncCallback ? asyncCallback , object ? asyncState )
266
266
267
267
{
268
- return BeginAuthenticateAsServer ( serverCertificate , false , SecurityProtocol . SystemDefaultSecurityProtocols , false ,
268
+ return BeginAuthenticateAsServer ( serverCertificate , false , SslProtocols . None , false ,
269
269
asyncCallback ,
270
270
asyncState ) ;
271
271
}
272
272
273
273
public virtual IAsyncResult BeginAuthenticateAsServer ( X509Certificate serverCertificate , bool clientCertificateRequired ,
274
274
bool checkCertificateRevocation , AsyncCallback ? asyncCallback , object ? asyncState )
275
275
{
276
- return BeginAuthenticateAsServer ( serverCertificate , clientCertificateRequired , SecurityProtocol . SystemDefaultSecurityProtocols , checkCertificateRevocation , asyncCallback , asyncState ) ;
276
+ return BeginAuthenticateAsServer ( serverCertificate , clientCertificateRequired , SslProtocols . None , checkCertificateRevocation , asyncCallback , asyncState ) ;
277
277
}
278
278
279
279
public virtual IAsyncResult BeginAuthenticateAsServer ( X509Certificate serverCertificate , bool clientCertificateRequired ,
@@ -307,12 +307,12 @@ private IAsyncResult BeginAuthenticateAsServer(SslServerAuthenticationOptions ss
307
307
#region Synchronous methods
308
308
public virtual void AuthenticateAsClient ( string targetHost )
309
309
{
310
- AuthenticateAsClient ( targetHost , null , SecurityProtocol . SystemDefaultSecurityProtocols , false ) ;
310
+ AuthenticateAsClient ( targetHost , null , SslProtocols . None , false ) ;
311
311
}
312
312
313
313
public virtual void AuthenticateAsClient ( string targetHost , X509CertificateCollection ? clientCertificates , bool checkCertificateRevocation )
314
314
{
315
- AuthenticateAsClient ( targetHost , clientCertificates , SecurityProtocol . SystemDefaultSecurityProtocols , checkCertificateRevocation ) ;
315
+ AuthenticateAsClient ( targetHost , clientCertificates , SslProtocols . None , checkCertificateRevocation ) ;
316
316
}
317
317
318
318
public virtual void AuthenticateAsClient ( string targetHost , X509CertificateCollection ? clientCertificates , SslProtocols enabledSslProtocols , bool checkCertificateRevocation )
@@ -341,12 +341,12 @@ public void AuthenticateAsClient(SslClientAuthenticationOptions sslClientAuthent
341
341
342
342
public virtual void AuthenticateAsServer ( X509Certificate serverCertificate )
343
343
{
344
- AuthenticateAsServer ( serverCertificate , false , SecurityProtocol . SystemDefaultSecurityProtocols , false ) ;
344
+ AuthenticateAsServer ( serverCertificate , false , SslProtocols . None , false ) ;
345
345
}
346
346
347
347
public virtual void AuthenticateAsServer ( X509Certificate serverCertificate , bool clientCertificateRequired , bool checkCertificateRevocation )
348
348
{
349
- AuthenticateAsServer ( serverCertificate , clientCertificateRequired , SecurityProtocol . SystemDefaultSecurityProtocols , checkCertificateRevocation ) ;
349
+ AuthenticateAsServer ( serverCertificate , clientCertificateRequired , SslProtocols . None , checkCertificateRevocation ) ;
350
350
}
351
351
352
352
public virtual void AuthenticateAsServer ( X509Certificate serverCertificate , bool clientCertificateRequired , SslProtocols enabledSslProtocols , bool checkCertificateRevocation )
@@ -375,7 +375,7 @@ public void AuthenticateAsServer(SslServerAuthenticationOptions sslServerAuthent
375
375
#region Task-based async public methods
376
376
public virtual Task AuthenticateAsClientAsync ( string targetHost ) => AuthenticateAsClientAsync ( targetHost , null , false ) ;
377
377
378
- public virtual Task AuthenticateAsClientAsync ( string targetHost , X509CertificateCollection ? clientCertificates , bool checkCertificateRevocation ) => AuthenticateAsClientAsync ( targetHost , clientCertificates , SecurityProtocol . SystemDefaultSecurityProtocols , checkCertificateRevocation ) ;
378
+ public virtual Task AuthenticateAsClientAsync ( string targetHost , X509CertificateCollection ? clientCertificates , bool checkCertificateRevocation ) => AuthenticateAsClientAsync ( targetHost , clientCertificates , SslProtocols . None , checkCertificateRevocation ) ;
379
379
380
380
public virtual Task AuthenticateAsClientAsync ( string targetHost , X509CertificateCollection ? clientCertificates , SslProtocols enabledSslProtocols , bool checkCertificateRevocation )
381
381
{
@@ -401,7 +401,7 @@ public Task AuthenticateAsClientAsync(SslClientAuthenticationOptions sslClientAu
401
401
}
402
402
403
403
public virtual Task AuthenticateAsServerAsync ( X509Certificate serverCertificate ) =>
404
- AuthenticateAsServerAsync ( serverCertificate , false , SecurityProtocol . SystemDefaultSecurityProtocols , false ) ;
404
+ AuthenticateAsServerAsync ( serverCertificate , false , SslProtocols . None , false ) ;
405
405
406
406
public virtual Task AuthenticateAsServerAsync ( X509Certificate serverCertificate , bool clientCertificateRequired , bool checkCertificateRevocation )
407
407
{
0 commit comments