Imported Upstream version 4.3.2.467

Former-commit-id: 9c2cb47f45fa221e661ab616387c9cda183f283d
This commit is contained in:
Xamarin Public Jenkins
2016-02-22 11:00:01 -05:00
parent f302175246
commit f3e3aab35a
4097 changed files with 122406 additions and 82300 deletions

View File

@ -401,6 +401,7 @@ namespace System.ServiceModel.Configuration
internal const string Soap12WSAddressing10 = "Soap12WSAddressing10";
internal const string Soap12WSAddressingAugust2004 = "Soap12WSAddressingAugust2004";
internal const string SslCertificateAuthentication = "sslCertificateAuthentication";
internal const string SslProtocols = "sslProtocols";
internal const string SslStreamSecuritySectionName = "sslStreamSecurity";
internal const string StandardEndpoint = "standardEndpoint";
internal const string StandardEndpointsSectionName = "standardEndpoints";

View File

@ -1 +1 @@
0d026927dac6a667d11d34c7ee6cb903c3d5c1c6
35c78297859f7342bb6f1137a045ea1bf79b932c

View File

@ -12,4 +12,4 @@ namespace System.ServiceModel.Configuration
public partial class ServiceMetadataEndpointCollectionElement : StandardEndpointCollectionElement<ServiceMetadataEndpoint, ServiceMetadataEndpointElement>
{
}
}
}

View File

@ -5,7 +5,9 @@
namespace System.ServiceModel.Configuration
{
using System.Configuration;
using System.Security.Authentication;
using System.ServiceModel.Channels;
using System.ServiceModel.Security;
public sealed partial class SslStreamSecurityElement : BindingElementExtensionElement
{
@ -21,12 +23,22 @@ namespace System.ServiceModel.Configuration
set { base[ConfigurationStrings.RequireClientCertificate] = value; }
}
[ConfigurationProperty(ConfigurationStrings.SslProtocols, DefaultValue = TransportDefaults.SslProtocols)]
[ServiceModelEnumValidator(typeof(SslProtocolsHelper))]
public SslProtocols SslProtocols
{
get { return (SslProtocols)base[ConfigurationStrings.SslProtocols]; }
private set { base[ConfigurationStrings.SslProtocols] = value; }
}
public override void ApplyConfiguration(BindingElement bindingElement)
{
base.ApplyConfiguration(bindingElement);
SslStreamSecurityBindingElement sslBindingElement =
(SslStreamSecurityBindingElement)bindingElement;
sslBindingElement.RequireClientCertificate = this.RequireClientCertificate;
sslBindingElement.SslProtocols = this.SslProtocols;
}
protected internal override BindingElement CreateBindingElement()
@ -50,6 +62,7 @@ namespace System.ServiceModel.Configuration
SslStreamSecurityElement source = (SslStreamSecurityElement)from;
#pragma warning suppress 56506 // [....], base.CopyFrom() validates the argument
this.RequireClientCertificate = source.RequireClientCertificate;
this.SslProtocols = source.SslProtocols;
}
protected internal override void InitializeFrom(BindingElement bindingElement)
@ -58,6 +71,7 @@ namespace System.ServiceModel.Configuration
SslStreamSecurityBindingElement sslBindingElement
= (SslStreamSecurityBindingElement)bindingElement;
SetPropertyValueIfNotDefaultValue(ConfigurationStrings.RequireClientCertificate, sslBindingElement.RequireClientCertificate);
SetPropertyValueIfNotDefaultValue(ConfigurationStrings.SslProtocols, sslBindingElement.SslProtocols);
}
}
}

View File

@ -13,6 +13,7 @@ namespace System.ServiceModel.Configuration
using System.ServiceModel;
using System.ServiceModel.Security;
using System.ComponentModel;
using System.Security.Authentication;
public sealed partial class TcpTransportSecurityElement : ServiceModelConfigurationElement
{
@ -39,6 +40,14 @@ namespace System.ServiceModel.Configuration
private set { base[ConfigurationStrings.ExtendedProtectionPolicy] = value; }
}
[ConfigurationProperty(ConfigurationStrings.SslProtocols, DefaultValue = TransportDefaults.SslProtocols)]
[ServiceModelEnumValidator(typeof(SslProtocolsHelper))]
public SslProtocols SslProtocols
{
get { return (SslProtocols)base[ConfigurationStrings.SslProtocols]; }
private set { base[ConfigurationStrings.SslProtocols] = value; }
}
internal void ApplyConfiguration(TcpTransportSecurity security)
{
if (security == null)
@ -48,6 +57,7 @@ namespace System.ServiceModel.Configuration
security.ClientCredentialType = this.ClientCredentialType;
security.ProtectionLevel = this.ProtectionLevel;
security.ExtendedProtectionPolicy = ChannelBindingUtility.BuildPolicy(this.ExtendedProtectionPolicy);
security.SslProtocols = this.SslProtocols;
}
internal void InitializeFrom(TcpTransportSecurity security)
@ -59,6 +69,7 @@ namespace System.ServiceModel.Configuration
SetPropertyValueIfNotDefaultValue(ConfigurationStrings.ClientCredentialType, security.ClientCredentialType);
SetPropertyValueIfNotDefaultValue(ConfigurationStrings.ProtectionLevel, security.ProtectionLevel);
ChannelBindingUtility.InitializeFrom(security.ExtendedProtectionPolicy, this.ExtendedProtectionPolicy);
SetPropertyValueIfNotDefaultValue(ConfigurationStrings.SslProtocols, security.SslProtocols);
}
}
}