Example #1
0
            internal static bool AreBindingsMatching(System.ServiceModel.Channels.SecurityBindingElement securityBindingElement, System.ServiceModel.Channels.SecurityBindingElement sbe)
            {
                Type type = typeof(System.ServiceModel.Channels.SecurityBindingElement);

                object[] objArray = new object[] { securityBindingElement, sbe };
                return((bool)InvokeHelper.InvokeStaticMethod(type, "AreBindingsMatching", objArray));
            }
Example #2
0
            internal static bool IsCertificateOverTransportBinding(System.ServiceModel.Channels.SecurityBindingElement bootstrapSecurity)
            {
                Type type = typeof(System.ServiceModel.Channels.SecurityBindingElement);

                object[] objArray = new object[] { bootstrapSecurity };
                return((bool)InvokeHelper.InvokeStaticMethod(type, "IsCertificateOverTransportBinding", objArray));
            }
Example #3
0
            internal static bool IsDefined(SecurityKeyType value)
            {
                Type type = typeof(GenericXmlSecurityToken).Assembly.GetType("System.IdentityModel.Tokens.SecurityKeyTypeHelper");

                object[] objArray = new object[] { value };
                return((bool)InvokeHelper.InvokeStaticMethod(type, "IsDefined", objArray));
            }
Example #4
0
            internal static bool IsSslNegotiationBinding(System.ServiceModel.Channels.SecurityBindingElement bootstrapSecurity, bool p, bool p_3)
            {
                Type type = typeof(System.ServiceModel.Channels.SecurityBindingElement);

                object[] objArray = new object[] { bootstrapSecurity, p, p_3 };
                return((bool)InvokeHelper.InvokeStaticMethod(type, "IsSslNegotiationBinding", objArray));
            }
Example #5
0
            internal static bool IsUserNameForSslBinding(System.ServiceModel.Channels.SecurityBindingElement bootstrapSecurity, bool p)
            {
                Type type = typeof(System.ServiceModel.Channels.SecurityBindingElement);

                object[] objArray = new object[] { bootstrapSecurity, p };
                return((bool)InvokeHelper.InvokeStaticMethod(type, "IsUserNameForSslBinding", objArray));
            }
Example #6
0
            internal static bool IsMutualCertificateBinding(System.ServiceModel.Channels.SecurityBindingElement sbe, bool p)
            {
                Type type = typeof(System.ServiceModel.Channels.SecurityBindingElement);

                object[] objArray = new object[] { sbe, p };
                return((bool)InvokeHelper.InvokeStaticMethod(type, "IsMutualCertificateBinding", objArray));
            }
        private static bool AreBindingsMatching(SecurityBindingElement sbe1, SecurityBindingElement sbe2)
        {
            Type type = typeof(SecurityElementBase);

            object[] objArray = new object[] { sbe1, sbe2 };
            return((bool)InvokeHelper.InvokeStaticMethod(type, "AreBindingsMatching", objArray));
        }
Example #8
0
        internal static bool TryCreate(SecurityBindingElement sbe, Microsoft.ServiceBus.RelayClientAuthenticationType relayClientAuthenticationType, UnifiedSecurityMode mode, HttpRelayTransportSecurity transportSecurity, out BasicHttpRelaySecurity security)
        {
            bool flag;

            security = null;
            BasicHttpRelayMessageSecurity basicHttpRelayMessageSecurity = null;

            if (sbe == null)
            {
                mode = mode & (UnifiedSecurityMode.None | UnifiedSecurityMode.Transport | UnifiedSecurityMode.Both);
            }
            else
            {
                mode = mode & (UnifiedSecurityMode.Message | UnifiedSecurityMode.TransportWithMessageCredential);
                if (!BasicHttpRelayMessageSecurity.TryCreate(sbe, out basicHttpRelayMessageSecurity, out flag))
                {
                    return(false);
                }
            }
            EndToEndBasicHttpSecurityMode endToEndBasicHttpSecurityMode = EndToEndBasicHttpSecurityModeHelper.ToEndToEndBasicHttpSecurityMode(mode);
            bool        flag1            = EndToEndBasicHttpSecurityModeHelper.IsDefined(endToEndBasicHttpSecurityMode);
            CultureInfo invariantCulture = CultureInfo.InvariantCulture;

            object[] str = new object[] { endToEndBasicHttpSecurityMode.ToString() };
            DiagnosticUtility.DebugAssert(flag1, string.Format(invariantCulture, "Invalid BasicHttpSecurityMode value: {0}.", str));
            security = new BasicHttpRelaySecurity(endToEndBasicHttpSecurityMode, relayClientAuthenticationType, transportSecurity, basicHttpRelayMessageSecurity);
            if (sbe == null)
            {
                return(true);
            }
            Type type = typeof(SecurityElementBase);

            object[] objArray = new object[] { security.CreateMessageSecurity(), sbe };
            return((bool)InvokeHelper.InvokeStaticMethod(type, "AreBindingsMatching", objArray));
        }
Example #9
0
            internal static bool IsIssuedTokenForSslBinding(System.ServiceModel.Channels.SecurityBindingElement bootstrapSecurity, bool p, out System.ServiceModel.Security.Tokens.IssuedSecurityTokenParameters infocardParameters)
            {
                object[] objArray = new object[] { bootstrapSecurity, p, null };
                bool     flag     = (bool)InvokeHelper.InvokeStaticMethod(typeof(System.ServiceModel.Channels.SecurityBindingElement), "IsIssuedTokenForSslBinding", objArray);

                infocardParameters = objArray[2] as System.ServiceModel.Security.Tokens.IssuedSecurityTokenParameters;
                return(flag);
            }
Example #10
0
            internal static bool DoAlgorithmsMatch(System.ServiceModel.Security.Tokens.IssuedSecurityTokenParameters issuedTokenParameters, SecurityAlgorithmSuite securityAlgorithmSuite, object versionSpecificStandardsManager, out Collection <XmlElement> nonAlgorithmRequestParameters)
            {
                object[] objArray = new object[] { securityAlgorithmSuite, versionSpecificStandardsManager, null };
                bool     flag     = (bool)InvokeHelper.InvokeStaticMethod(typeof(System.ServiceModel.Security.Tokens.IssuedSecurityTokenParameters), "DoAlgorithmsMatch", objArray);

                nonAlgorithmRequestParameters = objArray[2] as Collection <XmlElement>;
                return(flag);
            }
Example #11
0
            internal static bool IsSecureConversationBinding(System.ServiceModel.Channels.SecurityBindingElement sbe, bool requireCancellation, out System.ServiceModel.Channels.SecurityBindingElement bootstrapSecurity)
            {
                object[] objArray = new object[] { sbe, requireCancellation, null };
                bool     flag     = (bool)InvokeHelper.InvokeStaticMethod(typeof(System.ServiceModel.Channels.SecurityBindingElement), "IsSecureConversationBinding", objArray);

                bootstrapSecurity = objArray[2] as System.ServiceModel.Channels.SecurityBindingElement;
                return(flag);
            }
Example #12
0
        internal static bool TryCreate(SecurityBindingElement sbe, EndToEndSecurityMode mode, Microsoft.ServiceBus.RelayClientAuthenticationType relayClientAuthenticationType, out NetOnewayRelaySecurity security)
        {
            MessageSecurityOverRelayOneway messageSecurityOverRelayOneway;

            security = null;
            if (!MessageSecurityOverRelayOneway.TryCreate(sbe, out messageSecurityOverRelayOneway))
            {
                messageSecurityOverRelayOneway = null;
            }
            security = new NetOnewayRelaySecurity(mode, relayClientAuthenticationType, null, messageSecurityOverRelayOneway);
            if (sbe == null)
            {
                return(true);
            }
            Type type = typeof(SecurityElementBase);

            object[] objArray = new object[] { security.CreateMessageSecurity(), sbe, false };
            return((bool)InvokeHelper.InvokeStaticMethod(type, "AreBindingsMatching", objArray));
        }
Example #13
0
        internal static bool TryCreate(SecurityBindingElement wsSecurity, EndToEndSecurityMode mode, Microsoft.ServiceBus.RelayClientAuthenticationType relayClientAuthenticationType, bool isReliableSessionEnabled, TcpRelayTransportSecurity tcpTransportSecurity, out NetTcpRelaySecurity security)
        {
            security = null;
            MessageSecurityOverRelayConnection messageSecurityOverRelayConnection = null;

            if ((mode == EndToEndSecurityMode.Message || mode == EndToEndSecurityMode.TransportWithMessageCredential) && !MessageSecurityOverRelayConnection.TryCreate(wsSecurity, isReliableSessionEnabled, out messageSecurityOverRelayConnection))
            {
                return(false);
            }
            security = new NetTcpRelaySecurity(mode, relayClientAuthenticationType, tcpTransportSecurity, messageSecurityOverRelayConnection);
            if (wsSecurity == null)
            {
                return(true);
            }
            Type type = typeof(SecurityElementBase);

            object[] objArray = new object[] { security.CreateMessageSecurity(isReliableSessionEnabled, wsSecurity.MessageSecurityVersion), wsSecurity, false };
            return((bool)InvokeHelper.InvokeStaticMethod(type, "AreBindingsMatching", objArray));
        }
Example #14
0
 internal static bool IsInfoCardParameters(System.ServiceModel.Security.Tokens.IssuedSecurityTokenParameters infocardParameters)
 {
     return((bool)InvokeHelper.InvokeStaticMethod(typeof(System.ServiceModel.Security.Tokens.IssuedSecurityTokenParameters), "IsInfocardParameters", null));
 }
Example #15
0
 internal static System.ServiceModel.Security.Tokens.IssuedSecurityTokenParameters CreateInfoCardParameters(params object[] args)
 {
     return((System.ServiceModel.Security.Tokens.IssuedSecurityTokenParameters)InvokeHelper.InvokeStaticMethod(typeof(System.ServiceModel.Security.Tokens.IssuedSecurityTokenParameters), "CreateInfoCardParameters", args));
 }