Skip to content

Commit fa6d6f6

Browse files
Enable and fix tests that were affected by CoreFx breaking changes to CRL.
* Fixes #1926 * Fixes #1941
1 parent d7c1718 commit fa6d6f6

File tree

8 files changed

+10
-2
lines changed

8 files changed

+10
-2
lines changed

src/Common/test-runtime/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
"OpenCover": "4.6.519",
9999
"ReportGenerator": "2.4.3",
100100
"Microsoft.NETCore.TestHost": "2.0.0-preview2-25304-01",
101-
"Microsoft.NETCore.App": "2.0.0-preview2-25310-02",
101+
"Microsoft.NETCore.App": "2.1.0-preview1-25323-04",
102102
"Microsoft.DotNet.BuildTools.TestSuite": "1.0.1-prerelease-01001-04",
103103
"xunit.console.netcore": "1.0.3-prerelease-00925-01",
104104
"Microsoft.xunit.netcore.extensions": "1.0.1-prerelease-01001-04",

src/System.Private.ServiceModel/tests/Scenarios/Binding/Custom/CustomBindingTests.4.1.0.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
using Infrastructure.Common;
77
using System;
8+
using System.Security.Cryptography.X509Certificates;
89
using System.ServiceModel;
910
using System.ServiceModel.Channels;
1011
using Xunit;
@@ -31,6 +32,7 @@ public static void DefaultSettings_Tcp_Binary_Echo_RoundTrips_String()
3132

3233
var endpointIdentity = new DnsEndpointIdentity(Endpoints.Tcp_CustomBinding_SslStreamSecurity_HostName);
3334
factory = new ChannelFactory<IWcfService>(binding, new EndpointAddress(new Uri(Endpoints.Tcp_CustomBinding_SslStreamSecurity_Address), endpointIdentity));
35+
factory.Credentials.ServiceCertificate.Authentication.RevocationMode = X509RevocationMode.NoCheck;
3436
serviceProxy = factory.CreateChannel();
3537

3638
// *** EXECUTE *** \\

src/System.Private.ServiceModel/tests/Scenarios/Client/ExpectedExceptions/ExpectedExceptionTests.4.1.0.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,6 @@ public static void TCP_ServiceCertExpired_Throw_MessageSecurityException()
372372
}
373373

374374
[WcfFact]
375-
[Issue(1886, OS = OSID.AnyOSX)]
376375
[OuterLoop]
377376
// Verify product throws SecurityNegotiationException when the service cert is revoked
378377
public static void TCP_ServiceCertRevoked_Throw_SecurityNegotiationException()

src/System.Private.ServiceModel/tests/Scenarios/Security/TransportSecurity/Tcp/ClientCredentialTypeCertificateCanonicalNameTests.4.1.0.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ public static void Certificate_With_CanonicalName_Fqdn_Address_EchoString()
204204
binding.Security.Transport.ClientCredentialType = TcpClientCredentialType.None;
205205

206206
factory = new ChannelFactory<IWcfService>(binding, endpointAddress);
207+
factory.Credentials.ServiceCertificate.Authentication.RevocationMode = X509RevocationMode.NoCheck;
207208
factory.Credentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.ChainTrust;
208209

209210
serviceProxy = factory.CreateChannel();

src/System.Private.ServiceModel/tests/Scenarios/Security/TransportSecurity/Tcp/ClientCredentialTypeTests.4.1.0.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ public static void TcpClientCredentialType_None_With_ServerAltName_EchoString()
133133
endpointAddress = new EndpointAddress(new Uri(Endpoints.Tcp_ClientCredentialType_Certificate_With_ServerAltName_Address));
134134

135135
factory = new ChannelFactory<IWcfService>(binding, endpointAddress);
136+
factory.Credentials.ServiceCertificate.Authentication.RevocationMode = X509RevocationMode.NoCheck;
136137
factory.Credentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.ChainTrust;
137138

138139
serviceProxy = factory.CreateChannel();

src/System.Private.ServiceModel/tests/Scenarios/Security/TransportSecurity/Tcp/ClientCredentialTypeTests.4.1.1.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ public static void NetTcp_SecModeTrans_CertValMode_ChainTrust_Succeeds_ChainTrus
193193
Endpoints.Tcp_CustomBinding_SslStreamSecurity_Address));
194194

195195
factory = new ChannelFactory<IWcfService>(binding, endpointAddress);
196+
factory.Credentials.ServiceCertificate.Authentication.RevocationMode = X509RevocationMode.NoCheck;
196197
factory.Credentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.ChainTrust;
197198

198199
serviceProxy = factory.CreateChannel();

src/System.Private.ServiceModel/tests/Scenarios/Security/TransportSecurity/Tcp/IdentityTests.4.1.0.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
using System;
66
using System.Collections;
7+
using System.Security.Cryptography.X509Certificates;
78
using System.ServiceModel;
89
using System.ServiceModel.Security;
910
using System.Text;
@@ -26,6 +27,7 @@ public static void VerifyServiceIdentityMatchDnsEndpointIdentity()
2627

2728
EndpointAddress endpointAddress = new EndpointAddress(new Uri(Endpoints.Tcp_VerifyDNS_Address), new DnsEndpointIdentity(Endpoints.Tcp_VerifyDNS_HostName));
2829
ChannelFactory<IWcfService> factory = new ChannelFactory<IWcfService>(binding, endpointAddress);
30+
factory.Credentials.ServiceCertificate.Authentication.RevocationMode = X509RevocationMode.NoCheck;
2931
IWcfService serviceProxy = factory.CreateChannel();
3032

3133
try

src/System.Private.ServiceModel/tests/Scenarios/Security/TransportSecurity/Tcp/IdentityTests.4.1.1.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
using System;
66
using System.Collections;
7+
using System.Security.Cryptography.X509Certificates;
78
using System.ServiceModel;
89
using System.ServiceModel.Security;
910
using System.Text;
@@ -26,6 +27,7 @@ public static void ServiceIdentityNotMatch_Throw_MessageSecurityException()
2627

2728
EndpointAddress endpointAddress = new EndpointAddress(new Uri(Endpoints.Tcp_VerifyDNS_Address), new DnsEndpointIdentity("wrongone"));
2829
ChannelFactory<IWcfService> factory = new ChannelFactory<IWcfService>(binding, endpointAddress);
30+
factory.Credentials.ServiceCertificate.Authentication.RevocationMode = X509RevocationMode.NoCheck;
2931
IWcfService serviceProxy = factory.CreateChannel();
3032

3133
try

0 commit comments

Comments
 (0)