Imported Upstream version 4.8.0.309

Former-commit-id: 5f9c6ae75f295e057a7d2971f3a6df4656fa8850
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-11-10 13:04:39 +00:00
parent ee1447783b
commit 94b2861243
4912 changed files with 390737 additions and 49310 deletions

View File

@@ -30,7 +30,7 @@ using System.Collections.ObjectModel;
using System.ServiceModel.Description;
using System.ServiceModel.Channels;
using System.ServiceModel.Security;
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
using System.ServiceModel.Channels.Security;
using System.IdentityModel.Selectors;
using System.IdentityModel.Tokens;
@@ -46,7 +46,7 @@ namespace System.ServiceModel.Channels
{
MessageSecurityVersion = MessageSecurityVersion.Default;
endpoint = new SupportingTokenParameters ();
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
DefaultAlgorithmSuite = SecurityAlgorithmSuite.Default;
KeyEntropyMode = SecurityKeyEntropyMode.CombinedEntropy;
operation = new Dictionary<string,SupportingTokenParameters> ();
@@ -63,7 +63,7 @@ namespace System.ServiceModel.Channels
security_header_layout = other.security_header_layout;
msg_security_version = other.msg_security_version;
endpoint = other.endpoint.Clone ();
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
alg_suite = other.alg_suite;
key_entropy_mode = other.key_entropy_mode;
opt_endpoint = other.opt_endpoint.Clone ();
@@ -83,7 +83,7 @@ namespace System.ServiceModel.Channels
MessageSecurityVersion msg_security_version;
SupportingTokenParameters endpoint;
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
SecurityAlgorithmSuite alg_suite;
SecurityKeyEntropyMode key_entropy_mode;
SupportingTokenParameters opt_endpoint;
@@ -109,7 +109,7 @@ namespace System.ServiceModel.Channels
get { return endpoint; }
}
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
public SecurityAlgorithmSuite DefaultAlgorithmSuite {
get { return alg_suite; }
set { alg_suite = value; }
@@ -140,7 +140,7 @@ namespace System.ServiceModel.Channels
[MonoTODO ("Implement for TransportSecurityBindingElement")]
public override bool CanBuildChannelFactory<TChannel> (BindingContext context)
{
#if NET_2_1 || XAMMAC_4_5
#if MOBILE || XAMMAC_4_5
// not sure this should be like this, but there isn't Symmetric/Asymmetric elements in 2.1 anyways.
return context.CanBuildInnerChannelFactory<TChannel> ();
#else
@@ -185,7 +185,7 @@ namespace System.ServiceModel.Channels
protected abstract IChannelFactory<TChannel>
BuildChannelFactoryCore<TChannel> (BindingContext context);
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
[MonoTODO ("Implement for TransportSecurityBindingElement")]
public override bool CanBuildChannelListener<TChannel> (BindingContext context)
{
@@ -272,7 +272,7 @@ namespace System.ServiceModel.Channels
#endif
#region Factory methods
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
public static SymmetricSecurityBindingElement
CreateAnonymousForCertificateBindingElement ()
{
@@ -548,7 +548,7 @@ namespace System.ServiceModel.Channels
SecurityBindingElement bootstrapSecurity, bool requireCancellation,
ChannelProtectionRequirements bootstrapProtectionRequirements)
{
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
SymmetricSecurityBindingElement be =
new SymmetricSecurityBindingElement ();
be.ProtectionTokenParameters =
@@ -565,14 +565,14 @@ namespace System.ServiceModel.Channels
CreateUserNameOverTransportBindingElement ()
{
var be = new TransportSecurityBindingElement ();
#if !NET_2_1 && !XAMMAC_4_5 // FIXME: there should be whatever else to do for 2.1 instead.
#if !MOBILE && !XAMMAC_4_5 // FIXME: there should be whatever else to do for 2.1 instead.
be.EndpointSupportingTokenParameters.SignedEncrypted.Add (new UserNameSecurityTokenParameters ());
#endif
return be;
}
#endregion
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
// It seems almost internal, hardcoded like this (I tried
// custom parameters that sets IssuedTokenSecurityTokenParameters
// like below ones, but that didn't trigger this method).