You've already forked linux-packaging-mono
Imported Upstream version 4.4.2.4
Former-commit-id: 92904c9c5915c37244316e42ba99e7b934ed7ee2
This commit is contained in:
parent
589d484eee
commit
0b4a830db1
@ -33,7 +33,9 @@ using System.Net;
|
||||
using System.ServiceModel.Channels;
|
||||
using System.ServiceModel.Description;
|
||||
using System.Xml;
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
using WS = System.Web.Services.Description;
|
||||
#endif
|
||||
|
||||
namespace System.ServiceModel.Channels
|
||||
{
|
||||
@ -119,6 +121,7 @@ namespace System.ServiceModel.Channels
|
||||
return false;
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
public override bool CanBuildChannelListener<TChannel> (
|
||||
BindingContext context)
|
||||
{
|
||||
@ -132,6 +135,7 @@ namespace System.ServiceModel.Channels
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
public override T GetProperty<T> (BindingContext context)
|
||||
{
|
||||
@ -141,6 +145,7 @@ namespace System.ServiceModel.Channels
|
||||
return base.GetProperty<T> (context);
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
void IWsdlExportExtension.ExportContract (WsdlExporter exporter,
|
||||
WsdlContractConversionContext context)
|
||||
{
|
||||
@ -192,5 +197,6 @@ namespace System.ServiceModel.Channels
|
||||
transfer_mode == TransferMode.StreamedResponse)
|
||||
assertions.Add (doc.CreateElement ("msf", "Streamed", "http://schemas.microsoft.com/ws/2006/05/framing/policy"));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -43,16 +43,21 @@ namespace System.ServiceModel.Channels
|
||||
{
|
||||
public SslStreamSecurityBindingElement ()
|
||||
{
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
verifier = IdentityVerifier.CreateDefault ();
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
IdentityVerifier verifier;
|
||||
bool require_client_certificate;
|
||||
|
||||
public IdentityVerifier IdentityVerifier {
|
||||
get { return verifier; }
|
||||
set { verifier = value; }
|
||||
}
|
||||
#endif
|
||||
|
||||
bool require_client_certificate;
|
||||
|
||||
public bool RequireClientCertificate {
|
||||
get { return require_client_certificate; }
|
||||
@ -63,10 +68,13 @@ namespace System.ServiceModel.Channels
|
||||
SslStreamSecurityBindingElement other)
|
||||
: base (other)
|
||||
{
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
verifier = other.verifier;
|
||||
#endif
|
||||
require_client_certificate = other.require_client_certificate;
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
[MonoTODO]
|
||||
public StreamUpgradeProvider BuildClientStreamUpgradeProvider (BindingContext context)
|
||||
{
|
||||
@ -87,6 +95,7 @@ namespace System.ServiceModel.Channels
|
||||
"msf", "SslTransportSecurity", PolicyImportHelper.FramingPolicyNS);
|
||||
return element;
|
||||
}
|
||||
#endif
|
||||
|
||||
[MonoTODO]
|
||||
public override IChannelFactory<TChannel>
|
||||
@ -96,6 +105,7 @@ namespace System.ServiceModel.Channels
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
[MonoTODO]
|
||||
public override IChannelListener<TChannel>
|
||||
BuildChannelListener<TChannel> (
|
||||
@ -103,6 +113,7 @@ namespace System.ServiceModel.Channels
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
#endif
|
||||
|
||||
[MonoTODO]
|
||||
public override bool CanBuildChannelFactory<TChannel> (
|
||||
@ -111,12 +122,14 @@ namespace System.ServiceModel.Channels
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
[MonoTODO]
|
||||
public override bool CanBuildChannelListener<TChannel> (
|
||||
BindingContext context)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
#endif
|
||||
|
||||
public override BindingElement Clone ()
|
||||
{
|
||||
@ -129,6 +142,7 @@ namespace System.ServiceModel.Channels
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
#region explicit interface implementations
|
||||
[MonoTODO]
|
||||
void IPolicyExportExtension.ExportPolicy (
|
||||
@ -140,5 +154,6 @@ namespace System.ServiceModel.Channels
|
||||
context.GetBindingAssertions ().Add (transportBinding);
|
||||
}
|
||||
#endregion
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,9 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.ServiceModel.Channels;
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
using System.ServiceModel.Channels.NetTcp;
|
||||
#endif
|
||||
using System.ServiceModel.Description;
|
||||
|
||||
namespace System.ServiceModel.Channels
|
||||
@ -88,9 +90,15 @@ namespace System.ServiceModel.Channels
|
||||
{
|
||||
if (!CanBuildChannelFactory<TChannel> (context))
|
||||
throw new InvalidOperationException (String.Format ("Not supported channel factory type '{0}'", typeof (TChannel)));
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
return new TcpChannelFactory<TChannel> (this, context);
|
||||
#else
|
||||
throw new NotImplementedException ();
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
public override IChannelListener<TChannel>
|
||||
BuildChannelListener<TChannel> (
|
||||
BindingContext context)
|
||||
@ -99,6 +107,7 @@ namespace System.ServiceModel.Channels
|
||||
throw new InvalidOperationException (String.Format ("Not supported channel listener type '{0}'", typeof (TChannel)));
|
||||
return new TcpChannelListener<TChannel> (this, context);
|
||||
}
|
||||
#endif
|
||||
|
||||
public override BindingElement Clone ()
|
||||
{
|
||||
|
@ -56,7 +56,7 @@ namespace System.ServiceModel.Channels
|
||||
max_recv_message_size = other.max_recv_message_size;
|
||||
}
|
||||
|
||||
public bool ManualAddressing {
|
||||
public virtual bool ManualAddressing {
|
||||
get { return manual_addressing; }
|
||||
set { manual_addressing = value; }
|
||||
}
|
||||
|
@ -61,12 +61,14 @@ namespace System.ServiceModel.Channels
|
||||
return context.BuildInnerChannelFactory<TChannel> ();
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
public override IChannelListener<TChannel>
|
||||
BuildChannelListener<TChannel> (
|
||||
BindingContext context)
|
||||
{
|
||||
return context.BuildInnerChannelListener<TChannel> ();
|
||||
}
|
||||
#endif
|
||||
|
||||
public override bool CanBuildChannelFactory<TChannel> (
|
||||
BindingContext context)
|
||||
@ -74,11 +76,13 @@ namespace System.ServiceModel.Channels
|
||||
return context.CanBuildInnerChannelFactory<TChannel> ();
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
public override bool CanBuildChannelListener<TChannel> (
|
||||
BindingContext context)
|
||||
{
|
||||
return context.CanBuildInnerChannelListener<TChannel> ();
|
||||
}
|
||||
#endif
|
||||
|
||||
public override BindingElement Clone ()
|
||||
{
|
||||
@ -89,8 +93,10 @@ namespace System.ServiceModel.Channels
|
||||
{
|
||||
if (typeof (T) == typeof (ISecurityCapabilities))
|
||||
return (T) (object) this;
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
if (typeof (T) == typeof (IdentityVerifier))
|
||||
return (T) (object) IdentityVerifier.CreateDefault ();
|
||||
#endif
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -120,6 +126,7 @@ namespace System.ServiceModel.Channels
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
[MonoTODO]
|
||||
void IPolicyExportExtension.ExportPolicy (
|
||||
MetadataExporter exporter,
|
||||
@ -141,6 +148,7 @@ namespace System.ServiceModel.Channels
|
||||
element.AppendChild (protectionLevel);
|
||||
return element;
|
||||
}
|
||||
#endif
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -25,22 +25,29 @@
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
using System.IdentityModel.Selectors;
|
||||
using System.IdentityModel.Tokens;
|
||||
#endif
|
||||
using System.ServiceModel.Channels;
|
||||
using System.ServiceModel.Security;
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
using ReqType = System.ServiceModel.Security.Tokens.ServiceModelSecurityTokenRequirement;
|
||||
#endif
|
||||
|
||||
namespace System.ServiceModel.Security.Tokens
|
||||
{
|
||||
public class SecureConversationSecurityTokenParameters : SecurityTokenParameters
|
||||
{
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
static readonly ChannelProtectionRequirements default_channel_protection_requirements;
|
||||
#endif
|
||||
static readonly BindingContext dummy_context;
|
||||
|
||||
static SecureConversationSecurityTokenParameters ()
|
||||
{
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
ChannelProtectionRequirements r =
|
||||
new ChannelProtectionRequirements ();
|
||||
r.IncomingSignatureParts.ChannelParts.IsBodyIncluded = true;
|
||||
@ -49,6 +56,7 @@ namespace System.ServiceModel.Security.Tokens
|
||||
r.OutgoingEncryptionParts.ChannelParts.IsBodyIncluded = true;
|
||||
r.MakeReadOnly ();
|
||||
default_channel_protection_requirements = r;
|
||||
#endif
|
||||
|
||||
dummy_context = new BindingContext (
|
||||
new CustomBinding (),
|
||||
@ -56,7 +64,9 @@ namespace System.ServiceModel.Security.Tokens
|
||||
}
|
||||
|
||||
SecurityBindingElement element;
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
ChannelProtectionRequirements requirements;
|
||||
#endif
|
||||
bool cancellable;
|
||||
|
||||
public SecureConversationSecurityTokenParameters ()
|
||||
@ -77,6 +87,7 @@ namespace System.ServiceModel.Security.Tokens
|
||||
{
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
public SecureConversationSecurityTokenParameters (
|
||||
SecurityBindingElement element,
|
||||
bool requireCancellation,
|
||||
@ -89,13 +100,25 @@ namespace System.ServiceModel.Security.Tokens
|
||||
else
|
||||
this.requirements = new ChannelProtectionRequirements (requirements);
|
||||
}
|
||||
#else
|
||||
internal SecureConversationSecurityTokenParameters (
|
||||
SecurityBindingElement element,
|
||||
bool requireCancellation,
|
||||
object dummy)
|
||||
{
|
||||
this.element = element;
|
||||
this.cancellable = requireCancellation;
|
||||
}
|
||||
#endif
|
||||
|
||||
protected SecureConversationSecurityTokenParameters (SecureConversationSecurityTokenParameters source)
|
||||
: base (source)
|
||||
{
|
||||
this.element = (SecurityBindingElement) source.element.Clone ();
|
||||
this.cancellable = source.cancellable;
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
this.requirements = new ChannelProtectionRequirements (default_channel_protection_requirements);
|
||||
#endif
|
||||
}
|
||||
|
||||
public bool RequireCancellation {
|
||||
@ -108,9 +131,11 @@ namespace System.ServiceModel.Security.Tokens
|
||||
set { element = value; }
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
public ChannelProtectionRequirements BootstrapProtectionRequirements {
|
||||
get { return requirements; }
|
||||
}
|
||||
#endif
|
||||
|
||||
// SecurityTokenParameters
|
||||
|
||||
@ -135,13 +160,13 @@ namespace System.ServiceModel.Security.Tokens
|
||||
return new SecureConversationSecurityTokenParameters (this);
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
[MonoTODO]
|
||||
protected override SecurityKeyIdentifierClause CreateKeyIdentifierClause (
|
||||
SecurityToken token, SecurityTokenReferenceStyle referenceStyle)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected internal override void InitializeSecurityTokenRequirement (SecurityTokenRequirement requirement)
|
||||
{
|
||||
@ -154,6 +179,7 @@ namespace System.ServiceModel.Security.Tokens
|
||||
requirement.Properties [ReqType.IssuedSecurityTokenParametersProperty] = this.Clone ();
|
||||
requirement.KeyType = SecurityKeyType.SymmetricKey;
|
||||
}
|
||||
#endif
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
|
@ -25,8 +25,11 @@
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
using System.IdentityModel.Selectors;
|
||||
using System.IdentityModel.Tokens;
|
||||
#endif
|
||||
using System.ServiceModel.Channels;
|
||||
using System.ServiceModel.Security;
|
||||
using System.Text;
|
||||
@ -114,6 +117,7 @@ namespace System.ServiceModel.Security.Tokens
|
||||
|
||||
protected abstract SecurityTokenParameters CloneCore ();
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
protected abstract SecurityKeyIdentifierClause CreateKeyIdentifierClause (
|
||||
SecurityToken token, SecurityTokenReferenceStyle referenceStyle);
|
||||
|
||||
@ -125,11 +129,13 @@ namespace System.ServiceModel.Security.Tokens
|
||||
}
|
||||
|
||||
protected internal abstract void InitializeSecurityTokenRequirement (SecurityTokenRequirement requirement);
|
||||
#endif
|
||||
|
||||
internal BindingContext IssuerBindingContext {
|
||||
set { issuer_binding_context = value; }
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
internal void CallInitializeSecurityTokenRequirement (SecurityTokenRequirement requirement)
|
||||
{
|
||||
if (issuer_binding_context != null)
|
||||
@ -145,5 +151,6 @@ namespace System.ServiceModel.Security.Tokens
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -25,8 +25,10 @@
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
using System.IdentityModel.Selectors;
|
||||
using System.IdentityModel.Tokens;
|
||||
#endif
|
||||
using System.ServiceModel.Security;
|
||||
|
||||
namespace System.ServiceModel.Security.Tokens
|
||||
@ -64,6 +66,7 @@ namespace System.ServiceModel.Security.Tokens
|
||||
return new UserNameSecurityTokenParameters (this);
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
protected override SecurityKeyIdentifierClause CreateKeyIdentifierClause (
|
||||
SecurityToken token, SecurityTokenReferenceStyle referenceStyle)
|
||||
{
|
||||
@ -81,5 +84,6 @@ namespace System.ServiceModel.Security.Tokens
|
||||
requirement.TokenType = SecurityTokenTypes.UserName;
|
||||
requirement.RequireCryptographicToken = true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -1004,6 +1004,7 @@ System.ServiceModel/BasicHttpBinding_4_5.cs
|
||||
System.ServiceModel/BasicHttpsBinding.cs
|
||||
System.ServiceModel/BasicHttpsSecurity.cs
|
||||
System.ServiceModel/NetHttpBinding.cs
|
||||
System.ServiceModel/NetHttpsBinding.cs
|
||||
System.ServiceModel/NetHttpMessageEncoding.cs
|
||||
System.ServiceModel.Channels/CompressionFormat.cs
|
||||
System.ServiceModel.Channels/WebSocketTransportSettings.cs
|
||||
|
@ -79,6 +79,7 @@ namespace System.ServiceModel
|
||||
|
||||
public BasicHttpsSecurity Security {
|
||||
get { return security; }
|
||||
set { security = value; }
|
||||
}
|
||||
|
||||
public override BindingElementCollection
|
||||
|
@ -64,6 +64,7 @@ namespace System.ServiceModel
|
||||
|
||||
public HttpTransportSecurity Transport {
|
||||
get { return transport; }
|
||||
set { transport = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,9 @@ using System;
|
||||
using System.ServiceModel.Channels;
|
||||
using System.ServiceModel.Description;
|
||||
using System.ServiceModel.Dispatcher;
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
using System.Transactions;
|
||||
#endif
|
||||
|
||||
namespace System.ServiceModel
|
||||
{
|
||||
@ -45,7 +47,9 @@ namespace System.ServiceModel
|
||||
MaxItemsInObjectGraph = 0x10000;
|
||||
UseSynchronizationContext = true;
|
||||
ValidateMustUnderstand = true;
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
TransactionIsolationLevel = IsolationLevel.Unspecified;
|
||||
#endif
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
@ -63,8 +67,10 @@ namespace System.ServiceModel
|
||||
[MonoTODO]
|
||||
public int MaxItemsInObjectGraph { get; set; }
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
[MonoTODO]
|
||||
public IsolationLevel TransactionIsolationLevel { get; set; }
|
||||
#endif
|
||||
|
||||
[MonoTODO]
|
||||
public string TransactionTimeout { get; set; }
|
||||
|
@ -27,7 +27,9 @@
|
||||
//
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
using System.IdentityModel.Claims;
|
||||
#endif
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Xml;
|
||||
@ -37,6 +39,7 @@ namespace System.ServiceModel
|
||||
{
|
||||
public class DnsEndpointIdentity : EndpointIdentity
|
||||
{
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
public DnsEndpointIdentity (Claim identity)
|
||||
{
|
||||
Initialize (identity);
|
||||
@ -46,5 +49,11 @@ namespace System.ServiceModel
|
||||
: this (Claim.CreateDnsClaim (dns))
|
||||
{
|
||||
}
|
||||
#else
|
||||
public DnsEndpointIdentity (string dns)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -217,8 +217,11 @@ namespace System.ServiceModel
|
||||
// no special magic), we have to use different approach
|
||||
// that should work either.
|
||||
object proxy = Activator.CreateInstance (type, new object [] {Endpoint, this, address, via});
|
||||
#else
|
||||
#elif !MOBILE && !XAMMAC_4_5
|
||||
object proxy = new ClientRealProxy (typeof (TChannel), new DuplexClientRuntimeChannel (Endpoint, this, address, via), true).GetTransparentProxy ();
|
||||
#else
|
||||
object proxy;
|
||||
throw new NotImplementedException ();
|
||||
#endif
|
||||
|
||||
((IDuplexContextChannel) proxy).CallbackInstance = callbackInstance;
|
||||
|
@ -110,7 +110,7 @@ namespace System.ServiceModel
|
||||
set { reader_quotas = value; }
|
||||
}
|
||||
|
||||
public override abstract string Scheme {
|
||||
public override string Scheme {
|
||||
get;
|
||||
}
|
||||
|
||||
|
@ -31,22 +31,28 @@ namespace System.ServiceModel
|
||||
{
|
||||
public sealed class MessageSecurityOverTcp
|
||||
{
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
SecurityAlgorithmSuite alg_suite;
|
||||
#endif
|
||||
MessageCredentialType client_credential_type;
|
||||
|
||||
internal MessageSecurityOverTcp ()
|
||||
{
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
alg_suite = SecurityAlgorithmSuite.Default;
|
||||
#endif
|
||||
// This default value is *silly* but anyways
|
||||
// such code that does not change this ClientCredentialType
|
||||
// won't work on Mono.
|
||||
client_credential_type = MessageCredentialType.Windows;
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
public SecurityAlgorithmSuite AlgorithmSuite {
|
||||
get { return alg_suite; }
|
||||
set { alg_suite = value; }
|
||||
}
|
||||
#endif
|
||||
|
||||
public MessageCredentialType ClientCredentialType {
|
||||
get { return client_credential_type; }
|
||||
|
@ -27,8 +27,10 @@
|
||||
//
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
using System.IdentityModel.Selectors;
|
||||
using System.IdentityModel.Tokens;
|
||||
#endif
|
||||
using System.ServiceModel.Description;
|
||||
using System.ServiceModel.Channels;
|
||||
using System.ServiceModel.Security;
|
||||
@ -38,6 +40,7 @@ namespace System.ServiceModel
|
||||
{
|
||||
public abstract class MessageSecurityVersion
|
||||
{
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
// Types
|
||||
class MessageSecurityTokenVersion : SecurityTokenVersion
|
||||
{
|
||||
@ -112,6 +115,7 @@ namespace System.ServiceModel
|
||||
SecureConversationVersion = SecureConversationVersion.WSSecureConversationFeb2005;
|
||||
TrustVersion = TrustVersion.WSTrustFeb2005;
|
||||
}
|
||||
this.SecurityVersion = wss11 ? SecurityVersion.WSSecurity11 : SecurityVersion.WSSecurity10;
|
||||
}
|
||||
|
||||
public override BasicSecurityProfileVersion BasicSecurityProfileVersion {
|
||||
@ -122,14 +126,11 @@ namespace System.ServiceModel
|
||||
get { return MessageSecurityTokenVersion.GetVersion (wss11, basic_profile); }
|
||||
}
|
||||
|
||||
public override SecurityVersion SecurityVersion {
|
||||
get { return wss11 ? SecurityVersion.WSSecurity11 : SecurityVersion.WSSecurity10; }
|
||||
}
|
||||
|
||||
public override SecurityPolicyVersion SecurityPolicyVersion {
|
||||
get { return use2007 ? SecurityPolicyVersion.WSSecurityPolicy12 : SecurityPolicyVersion.WSSecurityPolicy11; }
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Static members
|
||||
|
||||
@ -137,12 +138,16 @@ namespace System.ServiceModel
|
||||
|
||||
static MessageSecurityVersion ()
|
||||
{
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
wss10_basic = new MessageSecurityVersionImpl (false, true, false);
|
||||
wss11 = new MessageSecurityVersionImpl (true, false, false);
|
||||
wss11_basic = new MessageSecurityVersionImpl (true, true, false);
|
||||
wss10_2007_basic = new MessageSecurityVersionImpl (false, true, true);
|
||||
wss11_2007_basic = new MessageSecurityVersionImpl (true, true, true);
|
||||
wss11_2007 = new MessageSecurityVersionImpl (true, false, true);
|
||||
#else
|
||||
throw new NotImplementedException ();
|
||||
#endif
|
||||
}
|
||||
|
||||
public static MessageSecurityVersion Default {
|
||||
@ -183,9 +188,11 @@ namespace System.ServiceModel
|
||||
|
||||
public abstract BasicSecurityProfileVersion BasicSecurityProfileVersion { get; }
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
public abstract SecurityTokenVersion SecurityTokenVersion { get; }
|
||||
#endif
|
||||
|
||||
public abstract SecurityVersion SecurityVersion { get; }
|
||||
public SecurityVersion SecurityVersion { get; internal set; }
|
||||
|
||||
public SecureConversationVersion SecureConversationVersion { get; internal set; }
|
||||
|
||||
|
@ -0,0 +1,83 @@
|
||||
// Authors:
|
||||
// Martin Baulig (martin.baulig@xamarin.com)
|
||||
//
|
||||
// Copyright 2012 Xamarin Inc. (http://www.xamarin.com)
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
using System;
|
||||
using System.ServiceModel.Channels;
|
||||
|
||||
namespace System.ServiceModel {
|
||||
[MonoTODO]
|
||||
public class NetHttpsBinding : HttpBindingBase {
|
||||
public NetHttpsBinding ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public NetHttpsBinding (BasicHttpsSecurityMode securityMode)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public NetHttpsBinding (string configurationName)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public NetHttpsBinding (
|
||||
BasicHttpsSecurityMode securityMode, bool reliableSessionEnabled)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public NetHttpMessageEncoding MessageEncoding { get; set; }
|
||||
public OptionalReliableSession ReliableSession { get; set; }
|
||||
public BasicHttpsSecurity Security { get; set; }
|
||||
|
||||
public WebSocketTransportSettings WebSocketSettings {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public override string Scheme {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public override BindingElementCollection CreateBindingElements ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public bool ShouldSerializeReliableSession ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public bool ShouldSerializeSecurity ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -46,7 +46,9 @@ namespace System.ServiceModel
|
||||
XmlDictionaryReaderQuotas reader_quotas
|
||||
= new XmlDictionaryReaderQuotas ();
|
||||
bool transaction_flow;
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
TransactionProtocol transaction_protocol;
|
||||
#endif
|
||||
TcpTransportBindingElement transport;
|
||||
|
||||
public NetTcpBinding ()
|
||||
@ -69,9 +71,13 @@ namespace System.ServiceModel
|
||||
public NetTcpBinding (string configurationName)
|
||||
: this ()
|
||||
{
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
var bindingsSection = ConfigUtil.BindingsSection;
|
||||
var el = bindingsSection.NetTcpBinding.Bindings [configurationName];
|
||||
el.ApplyConfiguration (this);
|
||||
#else
|
||||
throw new NotImplementedException ();
|
||||
#endif
|
||||
}
|
||||
|
||||
internal NetTcpBinding (TcpTransportBindingElement transport,
|
||||
@ -147,10 +153,12 @@ namespace System.ServiceModel
|
||||
set { transaction_flow = value; }
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
public TransactionProtocol TransactionProtocol {
|
||||
get { return transaction_protocol; }
|
||||
set { transaction_protocol = value; }
|
||||
}
|
||||
#endif
|
||||
|
||||
// overrides
|
||||
|
||||
@ -160,18 +168,22 @@ namespace System.ServiceModel
|
||||
|
||||
public override BindingElementCollection CreateBindingElements ()
|
||||
{
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
BindingElement tx = new TransactionFlowBindingElement (TransactionProtocol.WSAtomicTransactionOctober2004);
|
||||
SecurityBindingElement sec = CreateMessageSecurity ();
|
||||
#endif
|
||||
var msg = new BinaryMessageEncodingBindingElement ();
|
||||
if (ReaderQuotas != null)
|
||||
ReaderQuotas.CopyTo (msg.ReaderQuotas);
|
||||
var trsec = CreateTransportSecurity ();
|
||||
BindingElement tr = GetTransport ();
|
||||
List<BindingElement> list = new List<BindingElement> ();
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
if (tx != null)
|
||||
list.Add (tx);
|
||||
if (sec != null)
|
||||
list.Add (sec);
|
||||
#endif
|
||||
list.Add (msg);
|
||||
if (trsec != null)
|
||||
list.Add (trsec);
|
||||
@ -184,6 +196,7 @@ namespace System.ServiceModel
|
||||
return transport.Clone ();
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
// It is problematic, but there is no option to disable establishing security context in this binding unlike WSHttpBinding...
|
||||
SecurityBindingElement CreateMessageSecurity ()
|
||||
{
|
||||
@ -239,6 +252,7 @@ namespace System.ServiceModel
|
||||
// FIXME: requireCancellation
|
||||
element, true, reqs);
|
||||
}
|
||||
#endif
|
||||
|
||||
BindingElement CreateTransportSecurity ()
|
||||
{
|
||||
|
@ -27,7 +27,9 @@
|
||||
//
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
using System.IdentityModel.Claims;
|
||||
#endif
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Xml;
|
||||
@ -37,6 +39,7 @@ namespace System.ServiceModel
|
||||
{
|
||||
public class SpnEndpointIdentity : EndpointIdentity
|
||||
{
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
public SpnEndpointIdentity (Claim identity)
|
||||
{
|
||||
Initialize (identity);
|
||||
@ -46,6 +49,12 @@ namespace System.ServiceModel
|
||||
: this (Claim.CreateSpnClaim (spn))
|
||||
{
|
||||
}
|
||||
#else
|
||||
public SpnEndpointIdentity (string spn)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
#endif
|
||||
|
||||
[MonoTODO]
|
||||
public static TimeSpan SpnLookupTime {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user