Skip to content

Commit

Permalink
Add transport security support for net.tcp
Browse files Browse the repository at this point in the history
* Add support for SecurityMode.Transport in net.tcp
* Add in support for client X509Certificates for WCF Core
* Add StreamSecurityBindingElement
* Add SslStreamSecurity and supporting components
* Add WindowsStreamSecurity stubs
* Import IdentityModel code around X509 cert, tokens
* Disable failing tests due to WindowsStreamSecurity being stubbed now (dotnet#301)
* Add support for DnsEndpointIdentity

Fixes dotnet#9, dotnet#12, dotnet#81
  • Loading branch information
iamjasonp committed Sep 2, 2015
1 parent c674a2a commit 9e1585c
Show file tree
Hide file tree
Showing 96 changed files with 4,317 additions and 1,281 deletions.
5 changes: 4 additions & 1 deletion src/System.Private.ServiceModel/src/Resources/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -6747,4 +6747,7 @@
<data name="ConfigurationFilesNotSupported" xml:space="preserve">
<value>Configuration files are not supported.</value>
</data>
</root>
<data name="X509ChainBuildFail" xml:space="preserve">
<value>The X.509 certificate {0} chain building failed. The certificate that was used has a trust chain that cannot be verified. Replace the certificate or change the certificateValidationMode. {1}</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
using System.Runtime;
using System.Runtime.Serialization;
using System.Security.Cryptography;
#if FEATURE_CORECLR // X509Certificates
using System.Security.Cryptography.X509Certificates;
#endif // FEATURE_CORECLR
using System.Security.Principal;
using System.ServiceModel;

Expand Down Expand Up @@ -160,7 +163,15 @@ public static Claim CreateUriClaim(Uri uri)
return new Claim(ClaimTypes.Uri, uri, Rights.PossessProperty);
}

#if FEATURE_CORECLR // X509Certificates
public static Claim CreateX500DistinguishedNameClaim(X500DistinguishedName x500DistinguishedName)
{
if (x500DistinguishedName == null)
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("x500DistinguishedName");

return new Claim(ClaimTypes.X500DistinguishedName, x500DistinguishedName, Rights.PossessProperty, ClaimComparer.X500DistinguishedName);
}
#endif // FEATURE_CORECLR

public override bool Equals(object obj)
{
Expand Down
Loading

0 comments on commit 9e1585c

Please sign in to comment.