Exemple #1
0
 public ContextBindingElement(System.Net.Security.ProtectionLevel protectionLevel, System.ServiceModel.Channels.ContextExchangeMechanism contextExchangeMechanism, Uri clientCallbackAddress, bool contextManagementEnabled)
 {
     this.ProtectionLevel          = protectionLevel;
     this.ContextExchangeMechanism = contextExchangeMechanism;
     this.ClientCallbackAddress    = clientCallbackAddress;
     this.ContextManagementEnabled = contextManagementEnabled;
 }
 internal void InitializeFrom(TcpRelayTransportSecurity security)
 {
     if (security == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("security");
     }
     this.ProtectionLevel = security.ProtectionLevel;
 }
 internal MessagePartDescription(MessagePartDescription other)
 {
     this.name  = other.name;
     this.ns    = other.ns;
     this.index = other.index;
     this.type  = other.type;
     this.serializationPosition = other.serializationPosition;
     this.hasProtectionLevel    = other.hasProtectionLevel;
     this.protectionLevel       = other.protectionLevel;
     this.memberInfo            = other.memberInfo;
     this.multiple = other.multiple;
     this.additionalAttributesProvider = other.additionalAttributesProvider;
     this.baseType       = other.baseType;
     this.uniquePartName = other.uniquePartName;
 }
 internal MessagePartDescription(MessagePartDescription other)
 {
     this.name = other.name;
     this.ns = other.ns;
     this.index = other.index;
     this.type = other.type;
     this.serializationPosition = other.serializationPosition;
     this.hasProtectionLevel = other.hasProtectionLevel;
     this.protectionLevel = other.protectionLevel;
     this.memberInfo = other.memberInfo;
     this.multiple = other.multiple;
     this.additionalAttributesProvider = other.additionalAttributesProvider;
     this.baseType = other.baseType;
     this.uniquePartName = other.uniquePartName;
 }
 public WindowsStreamSecurityUpgradeProvider(WindowsStreamSecurityBindingElement bindingElement, BindingContext context, bool isClient) : base(context.Binding)
 {
     this.extractGroupsForWindowsAccounts = true;
     this.protectionLevel = bindingElement.ProtectionLevel;
     this.scheme = context.Binding.Scheme;
     this.isClient = isClient;
     this.listenUri = TransportSecurityHelpers.GetListenUri(context.ListenUriBaseAddress, context.ListenUriRelativeAddress);
     SecurityCredentialsManager manager = context.BindingParameters.Find<SecurityCredentialsManager>();
     if (manager == null)
     {
         if (isClient)
         {
             manager = ClientCredentials.CreateDefaultCredentials();
         }
         else
         {
             manager = ServiceCredentials.CreateDefaultCredentials();
         }
     }
     this.securityTokenManager = manager.CreateSecurityTokenManager();
 }
        public WindowsStreamSecurityUpgradeProvider(WindowsStreamSecurityBindingElement bindingElement, BindingContext context, bool isClient) : base(context.Binding)
        {
            this.extractGroupsForWindowsAccounts = true;
            this.protectionLevel = bindingElement.ProtectionLevel;
            this.scheme          = context.Binding.Scheme;
            this.isClient        = isClient;
            this.listenUri       = TransportSecurityHelpers.GetListenUri(context.ListenUriBaseAddress, context.ListenUriRelativeAddress);
            SecurityCredentialsManager manager = context.BindingParameters.Find <SecurityCredentialsManager>();

            if (manager == null)
            {
                if (isClient)
                {
                    manager = ClientCredentials.CreateDefaultCredentials();
                }
                else
                {
                    manager = ServiceCredentials.CreateDefaultCredentials();
                }
            }
            this.securityTokenManager = manager.CreateSecurityTokenManager();
        }
 internal void ResetProtectionLevel()
 {
     this.protectionLevel = System.Net.Security.ProtectionLevel.None;
     this.hasProtectionLevel = false;
 }
Exemple #8
0
 internal RelayedOnewayTransportSecurity()
 {
     this.protectionLevel = System.Net.Security.ProtectionLevel.EncryptAndSign;
 }
Exemple #9
0
 internal void ResetProtectionLevel()
 {
     this.protectionLevel    = System.Net.Security.ProtectionLevel.None;
     this.hasProtectionLevel = false;
 }
 protected WindowsStreamSecurityBindingElement(WindowsStreamSecurityBindingElement elementToBeCloned) : base(elementToBeCloned)
 {
     this.protectionLevel = elementToBeCloned.protectionLevel;
 }
 public WindowsStreamSecurityBindingElement()
 {
     this.protectionLevel = System.Net.Security.ProtectionLevel.EncryptAndSign;
 }
Exemple #12
0
 public ContextBindingElement(System.Net.Security.ProtectionLevel protectionLevel, System.ServiceModel.Channels.ContextExchangeMechanism contextExchangeMechanism, Uri clientCallbackAddress) : this(protectionLevel, contextExchangeMechanism, clientCallbackAddress, true)
 {
 }
Exemple #13
0
 public ContextBindingElement(System.Net.Security.ProtectionLevel protectionLevel, System.ServiceModel.Channels.ContextExchangeMechanism contextExchangeMechanism) : this(protectionLevel, contextExchangeMechanism, null, true)
 {
 }