@@ -606,7 +606,7 @@ public void PrefersClientCertificateModeDefinedInSniConfig()
606
606
new MockCertificateConfigLoader ( ) ,
607
607
new HttpsConnectionAdapterOptions
608
608
{
609
- ClientCertificateMode = ClientCertificateMode . AllowCertificate
609
+ ClientCertificateMode = ClientCertificateMode . AllowCertificate
610
610
} ,
611
611
fallbackHttpProtocols : HttpProtocols . Http1AndHttp2 ,
612
612
logger : Mock . Of < ILogger < HttpsConnectionMiddleware > > ( ) ) ;
@@ -640,7 +640,7 @@ public void FallsBackToFallbackClientCertificateMode()
640
640
new MockCertificateConfigLoader ( ) ,
641
641
new HttpsConnectionAdapterOptions
642
642
{
643
- ClientCertificateMode = ClientCertificateMode . AllowCertificate
643
+ ClientCertificateMode = ClientCertificateMode . AllowCertificate
644
644
} ,
645
645
fallbackHttpProtocols : HttpProtocols . Http1AndHttp2 ,
646
646
logger : Mock . Of < ILogger < HttpsConnectionMiddleware > > ( ) ) ;
@@ -664,8 +664,17 @@ public void CloneSslOptionsClonesAllProperties()
664
664
665
665
if ( ! RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) )
666
666
{
667
- // The CipherSuitesPolicy ctor throws a PlatformNotSupportedException on Windows.
668
- cipherSuitesPolicy = new CipherSuitesPolicy ( new [ ] { TlsCipherSuite . TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 } ) ;
667
+ try
668
+ {
669
+ // The CipherSuitesPolicy ctor throws a PlatformNotSupportedException on Windows.
670
+ cipherSuitesPolicy = new CipherSuitesPolicy ( new [ ] { TlsCipherSuite . TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 } ) ;
671
+ }
672
+ catch ( PlatformNotSupportedException )
673
+ {
674
+ // The CipherSuitesPolicy ctor throws a PlatformNotSupportedException on Ubuntu 16.04.
675
+ // I don't know exactly which other distros/versions throw PNEs, but it isn't super relevant to this test,
676
+ // so let's just swallow this exception.
677
+ }
669
678
}
670
679
671
680
// Set options properties to non-default values to verify they're copied.
@@ -760,7 +769,7 @@ public X509Certificate2 LoadCertificate(CertificateConfig certInfo, string endpo
760
769
761
770
private class MockConnectionContext : ConnectionContext
762
771
{
763
- public override IDuplexPipe Transport { get => throw new System . NotImplementedException ( ) ; set => throw new System . NotImplementedException ( ) ; }
772
+ public override IDuplexPipe Transport { get => throw new NotImplementedException ( ) ; set => throw new NotImplementedException ( ) ; }
764
773
public override string ConnectionId { get ; set ; } = "MockConnectionId" ;
765
774
public override IFeatureCollection Features { get ; } = new FeatureCollection ( ) ;
766
775
public override IDictionary < object , object > Items { get ; set ; } = new Dictionary < object , object > ( ) ;
0 commit comments