FrameworkFork\Microsoft.Xml\Xml\Dom\XmlDocument.cs (17)
211private WeakReference GetElement(ArrayList elementList, XmlElement elem)
221if ((XmlElement)(elemRef.Target) == elem)
231internal void AddElementWithId(string id, XmlElement elem)
250internal void RemoveElementWithId(string id, XmlElement elem)
326public XmlElement DocumentElement
328get { return (XmlElement)FindChild(XmlNodeType.Element); }
587public XmlElement CreateElement(String name)
596internal void AddDefaultAttributes(XmlElement elem)
627private SchemaElementDecl GetSchemaElementDecl(XmlElement elem)
851public XmlElement CreateElement(String qualifiedName, String namespaceURI)
867public virtual XmlElement GetElementById(string elementId)
876XmlElement elem = (XmlElement)elemRef.Target;
1005public virtual XmlElement CreateElement(string prefix, string localName, string namespaceURI)
1007XmlElement elem = new XmlElement(AddXmlName(prefix, localName, namespaceURI, null), true, this);
1616internal XmlAttribute GetDefaultAttribute(XmlElement elem, string attrPrefix, string attrLocalname, string attrNamespaceURI)
1695XmlElement documentElement = DocumentElement;
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlNodeReader.cs (21)
301return ((XmlElement)_curNode).IsEmpty;
340return ((XmlElement)_curNode).Attributes.Count;
484private String GetAttributeFromElement(XmlElement elem, String name)
499return GetAttributeFromElement((XmlElement)_curNode, name);
501return GetAttributeFromElement((XmlElement)_elemNode, name);
510private String GetAttributeFromElement(XmlElement elem, String name, String ns)
524return GetAttributeFromElement((XmlElement)_curNode, name, ns);
526return GetAttributeFromElement((XmlElement)_elemNode, name, ns);
543return ((XmlElement)_curNode).Attributes[attributeIndex].Value;
546return ((XmlElement)_elemNode).Attributes[attributeIndex].Value;
647private bool MoveToAttributeFromElement(XmlElement elem, String name, String ns)
674return MoveToAttributeFromElement((XmlElement)_curNode, name, namespaceURI);
676return MoveToAttributeFromElement((XmlElement)_elemNode, name, namespaceURI);
705attr = ((XmlElement)_curNode).Attributes[attributeIndex];
715attr = ((XmlElement)_elemNode).Attributes[attributeIndex];
888XmlElement elem = (XmlElement)node;
956XmlElement elem = (XmlElement)node;
1006XmlElement elem = (XmlElement)node;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ReliableSessionBindingElement.cs (12)
330XmlElement assertion = settings.CreateReliabilityAssertion(exporter.PolicyVersion, bindingElements);
336private static XmlElement CreatePolicyElement(PolicyVersion policyVersion, XmlDocument doc)
345private XmlElement CreateReliabilityAssertion(PolicyVersion policyVersion, BindingElementCollection bindingElements)
348XmlElement child = null;
370XmlElement assertion = doc.CreateElement(reliableSessionPrefix, ReliableSessionPolicyStrings.ReliableSessionName, reliableSessionNs);
375XmlElement policy = CreatePolicyElement(policyVersion, doc);
380XmlElement sequenceSTR = doc.CreateElement(reliableSessionPrefix, ReliableSessionPolicyStrings.SequenceSTR, reliableSessionNs);
385XmlElement deliveryAssurance = doc.CreateElement(reliableSessionPrefix, ReliableSessionPolicyStrings.DeliveryAssurance, reliableSessionNs);
388XmlElement nestedPolicy = CreatePolicyElement(policyVersion, doc);
391XmlElement exactlyOnce = doc.CreateElement(reliableSessionPrefix, ReliableSessionPolicyStrings.ExactlyOnce, reliableSessionNs);
397XmlElement inOrder = doc.CreateElement(reliableSessionPrefix, ReliableSessionPolicyStrings.InOrder, reliableSessionNs);
451private static void WriteMillisecondsAttribute(XmlElement childElement, TimeSpan timeSpan)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SecurityBindingElement.cs (6)
1527private static void AddAssertionIfNotNull(PolicyConversionContext policyContext, XmlElement assertion)
1535private static void AddAssertionIfNotNull(PolicyConversionContext policyContext, Collection<XmlElement> assertions)
1545private static void AddAssertionIfNotNull(PolicyConversionContext policyContext, OperationDescription operation, XmlElement assertion)
1553private static void AddAssertionIfNotNull(PolicyConversionContext policyContext, OperationDescription operation, Collection<XmlElement> assertions)
1563private static void AddAssertionIfNotNull(PolicyConversionContext policyContext, MessageDescription message, XmlElement assertion)
1571private static void AddAssertionIfNotNull(PolicyConversionContext policyContext, FaultDescription message, XmlElement assertion)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ImportedPolicyConversionContext.cs (25)
36private ImportedPolicyConversionContext(ServiceEndpoint endpoint, IEnumerable<XmlElement> endpointAssertions,
37Dictionary<OperationDescription, IEnumerable<XmlElement>> operationBindingAssertions,
38Dictionary<MessageDescription, IEnumerable<XmlElement>> messageBindingAssertions,
39Dictionary<FaultDescription, IEnumerable<XmlElement>> faultBindingAssertions,
45_endpointAssertions = new PolicyAssertionCollection(new MaxItemsEnumerable<XmlElement>(endpointAssertions, remainingAssertionsAllowed));
65foreach (KeyValuePair<OperationDescription, IEnumerable<XmlElement>> entry in operationBindingAssertions)
67_operationBindingAssertions[entry.Key].AddRange(new MaxItemsEnumerable<XmlElement>(entry.Value, remainingAssertionsAllowed));
71foreach (KeyValuePair<MessageDescription, IEnumerable<XmlElement>> entry in messageBindingAssertions)
73_messageBindingAssertions[entry.Key].AddRange(new MaxItemsEnumerable<XmlElement>(entry.Value, remainingAssertionsAllowed));
77foreach (KeyValuePair<FaultDescription, IEnumerable<XmlElement>> entry in faultBindingAssertions)
79_faultBindingAssertions[entry.Key].AddRange(new MaxItemsEnumerable<XmlElement>(entry.Value, remainingAssertionsAllowed));
117IEnumerable<Dictionary<MessageDescription, IEnumerable<XmlElement>>> messageAssertionEnumerator;
118IEnumerable<Dictionary<FaultDescription, IEnumerable<XmlElement>>> faultAssertionEnumerator;
119IEnumerable<Dictionary<OperationDescription, IEnumerable<XmlElement>>> operationAssertionEnumerator;
120faultAssertionEnumerator = PolicyIterationHelper.GetCartesianProduct<FaultDescription, IEnumerable<XmlElement>>(policyAlternatives.FaultBindingAlternatives);
121messageAssertionEnumerator = PolicyIterationHelper.GetCartesianProduct<MessageDescription, IEnumerable<XmlElement>>(policyAlternatives.MessageBindingAlternatives);
122operationAssertionEnumerator = PolicyIterationHelper.GetCartesianProduct<OperationDescription, IEnumerable<XmlElement>>(policyAlternatives.OperationBindingAlternatives);
124foreach (Dictionary<FaultDescription, IEnumerable<XmlElement>> faultAssertionsSelection in faultAssertionEnumerator)
126foreach (Dictionary<MessageDescription, IEnumerable<XmlElement>> messageAssertionsSelection in messageAssertionEnumerator)
128foreach (Dictionary<OperationDescription, IEnumerable<XmlElement>> operationAssertionsSelection in operationAssertionEnumerator)
130foreach (IEnumerable<XmlElement> endpointAssertionsSelection in policyAlternatives.EndpointAlternatives)
309public IEnumerable<IEnumerable<XmlElement>> EndpointAlternatives;
310public Dictionary<OperationDescription, IEnumerable<IEnumerable<XmlElement>>> OperationBindingAlternatives;
311public Dictionary<MessageDescription, IEnumerable<IEnumerable<XmlElement>>> MessageBindingAlternatives;
312public Dictionary<FaultDescription, IEnumerable<IEnumerable<XmlElement>>> FaultBindingAlternatives;
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\PolicyAssertionCollection.cs (17)
14public class PolicyAssertionCollection : Collection<XmlElement>
20public PolicyAssertionCollection(IEnumerable<XmlElement> elements)
28internal void AddRange(IEnumerable<XmlElement> elements)
30foreach (XmlElement element in elements)
45XmlElement item = this[i];
52public XmlElement Find(string localName, string namespaceUri)
57public XmlElement Remove(string localName, string namespaceUri)
62private XmlElement Find(string localName, string namespaceUri, bool remove)
71XmlElement item = this[index];
84public Collection<XmlElement> FindAll(string localName, string namespaceUri)
89public Collection<XmlElement> RemoveAll(string localName, string namespaceUri)
94private Collection<XmlElement> FindAll(string localName, string namespaceUri, bool remove)
101Collection<XmlElement> collection = new Collection<XmlElement>();
105XmlElement item = this[index];
121protected override void InsertItem(int index, XmlElement item)
129protected override void SetItem(int index, XmlElement item)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\PolicyReader.cs (42)
23internal delegate void PolicyWarningHandler(XmlElement contextAssertion, string warningMessage);
28internal IEnumerable<IEnumerable<XmlElement>> NormalizePolicy(IEnumerable<XmlElement> policyAssertions)
52private static IEnumerable<XmlElement> s_empty = new PolicyHelper.EmptyEnumerable<XmlElement>();
53private static IEnumerable<IEnumerable<XmlElement>> s_emptyEmpty = new PolicyHelper.SingleEnumerable<IEnumerable<XmlElement>>(new PolicyHelper.EmptyEnumerable<XmlElement>());
62private IEnumerable<IEnumerable<XmlElement>> ReadNode(XmlNode node, XmlElement contextAssertion, YieldLimiter yieldLimiter)
69string warningMsg = string.Format(SRServiceModel.ExceededMaxPolicyComplexity, node.Name, PolicyHelper.GetFragmentIdentifier((XmlElement)node));
76IEnumerable<IEnumerable<XmlElement>> nodes = s_emptyEmpty;
81nodes = ReadNode_PolicyOrAll((XmlElement)node, contextAssertion, yieldLimiter);
84nodes = ReadNode_ExactlyOne((XmlElement)node, contextAssertion, yieldLimiter);
87nodes = ReadNode_Assertion((XmlElement)node, yieldLimiter);
90nodes = ReadNode_PolicyReference((XmlElement)node, contextAssertion, yieldLimiter);
101private IEnumerable<IEnumerable<XmlElement>> ReadNode_PolicyReference(XmlElement element, XmlElement contextAssertion, YieldLimiter yieldLimiter)
117XmlElement policy = _metadataImporter.ResolvePolicyReference(idRef, contextAssertion);
131private IEnumerable<IEnumerable<XmlElement>> ReadNode_Assertion(XmlElement element, YieldLimiter yieldLimiter)
136yield return new PolicyHelper.SingleEnumerable<XmlElement>(element);
139private IEnumerable<IEnumerable<XmlElement>> ReadNode_ExactlyOne(XmlElement element, XmlElement contextAssertion, YieldLimiter yieldLimiter)
145foreach (IEnumerable<XmlElement> alternative in ReadNode(child, contextAssertion, yieldLimiter))
160private IEnumerable<IEnumerable<XmlElement>> ReadNode_PolicyOrAll(XmlElement element, XmlElement contextAssertion, YieldLimiter yieldLimiter)
162IEnumerable<IEnumerable<XmlElement>> target = s_emptyEmpty;
168IEnumerable<IEnumerable<XmlElement>> childPolicy = ReadNode(child, contextAssertion, yieldLimiter);
169target = PolicyHelper.CrossProduct<XmlElement>(target, childPolicy, yieldLimiter);
175internal IEnumerable<IEnumerable<XmlElement>> NormalizePolicy(IEnumerable<XmlElement> policyAssertions)
177IEnumerable<IEnumerable<XmlElement>> target = s_emptyEmpty;
179foreach (XmlElement child in policyAssertions)
181IEnumerable<IEnumerable<XmlElement>> childPolicy = ReadNode(child, child, yieldLimiter);
182target = PolicyHelper.CrossProduct<XmlElement>(target, childPolicy, yieldLimiter);
219internal static string GetFragmentIdentifier(XmlElement element)
243XmlElement currentElement = node as XmlElement;
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlExporter.cs (16)
628XmlElement endpointRef = (XmlElement)XmlDoc.ReadNode(xr).ChildNodes[0];
635XmlElement addressingAssertion;
679XmlElement innerPolicyElement = XmlDoc.CreateElement(MetadataStrings.WSPolicy.Prefix,
683XmlElement responsesAssertion = XmlDoc.CreateElement(MetadataStrings.Addressing10.MetadataPolicy.Prefix,
728ICollection<XmlElement> assertions;
799private void AttachItemPolicy(ICollection<XmlElement> assertions, string key, WsdlNS.ServiceDescription policyWsdl, WsdlNS.DocumentableItem item)
809XmlElement policyReferenceElement = XmlDoc.CreateElement(MetadataStrings.WSPolicy.Prefix,
822private string InsertPolicy(string key, WsdlNS.ServiceDescription policyWsdl, ICollection<XmlElement> assertions)
825XmlElement policyElement = CreatePolicyElement(assertions);
843private XmlElement CreatePolicyElement(ICollection<XmlElement> assertions)
846XmlElement policyElement = XmlDoc.CreateElement(MetadataStrings.WSPolicy.Prefix,
851XmlElement exactlyOneElement = XmlDoc.CreateElement(MetadataStrings.WSPolicy.Prefix,
857XmlElement allElement = XmlDoc.CreateElement(MetadataStrings.WSPolicy.Prefix,
863foreach (XmlElement assertion in assertions)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlImporter.cs (82)
34private readonly Dictionary<string, XmlElement> _policyDocuments = new Dictionary<string, XmlElement>();
98internal override XmlElement ResolvePolicyReference(string policyReference, XmlElement contextAssertion)
615_policyDocuments.Add(doc.Identifier, TryConvert<XmlElement>(doc));
809XmlElement element = extension as XmlElement;
1077XmlElement addressing10Element = wsdlPort.Extensions.Find(AddressingStrings.EndpointReference, Addressing10Strings.Namespace);
1078XmlElement addressing200408Element = wsdlPort.Extensions.Find(AddressingStrings.EndpointReference, Addressing200408Strings.Namespace);
1127XmlElement addressingAssertion = PolicyConversionContext.FindAssertion(context.GetBindingAssertions(),
1132XmlElement policyElement = null;
1135if (node is XmlElement && MetadataSection.IsPolicyElement((XmlElement)node))
1137policyElement = (XmlElement)node;
1152IEnumerable<IEnumerable<XmlElement>> alternatives = importer.NormalizePolicy(new XmlElement[] { policyElement });
1153foreach (IEnumerable<XmlElement> alternative in alternatives)
1155foreach (XmlElement element in alternative)
1332XmlElement policy = PolicyConversionContext.FindAssertion(policyContext.GetBindingAssertions(), key, workaroundNS, true);
1429XmlElement policyElement = CreatePolicyElement(key, value, wsdlBindingQName);
1442private static XmlElement CreatePolicyElement(string elementName, string value, XmlQualifiedName wsdlBindingQName)
1445XmlElement policyElement = XmlDoc.CreateElement(MetadataStrings.WSPolicy.Prefix,
1450XmlElement exactlyOneElement = XmlDoc.CreateElement(MetadataStrings.WSPolicy.Prefix,
1456XmlElement allElement = XmlDoc.CreateElement(MetadataStrings.WSPolicy.Prefix,
1462XmlElement workaroundElement = s_xmlDocument.CreateElement(elementName, workaroundNS);
1565internal static IEnumerable<MetadataSection> CreateMetadataDocuments(WsdlNS.ServiceDescriptionCollection wsdlDocuments, XmlSchemaSet xmlSchemas, IEnumerable<XmlElement> policyDocuments)
1576foreach (XmlElement policyDocument in policyDocuments)
1684private static void AddUnImportedPolicyString(StringBuilder stringBuilder, WsdlNS.NamedItem item, IEnumerable<XmlElement> unimportdPolicy)
1688Dictionary<XmlElement, XmlElement> unique = new Dictionary<XmlElement, XmlElement>();
1690foreach (XmlElement element in unimportdPolicy)
1706private static void WriteElement(XmlElement element, StringBuilder stringBuilder)
1991private IEnumerable<IEnumerable<XmlElement>> GetPolicyAlternatives(WsdlNS.NamedItem item, WsdlNS.ServiceDescription wsdl)
1993Collection<XmlElement> policyElements = new Collection<XmlElement>();
1995foreach (XmlElement element in GetReferencedPolicy(item, wsdl))
2000foreach (XmlElement element in GetEmbeddedPolicy(item))
2010private void LogPolicyNormalizationWarning(XmlElement contextAssertion, string warningMessage)
2069internal static IEnumerable<XmlElement> GetEmbeddedPolicy(WsdlNS.NamedItem item)
2071List<XmlElement> embeddedPolicies = new List<XmlElement>();
2079private IEnumerable<XmlElement> GetReferencedPolicy(WsdlNS.NamedItem item, WsdlNS.ServiceDescription wsdl)
2085XmlElement policy = _policyDictionary.ResolvePolicyReference(policyRef, wsdl);
2115List<XmlElement> policyReferences = new List<XmlElement>();
2121foreach (XmlElement element in policyReferences)
2191IEnumerable<IEnumerable<XmlElement>> wsdlBindingAlternatives = this.GetPolicyAlternatives(endpointContext.WsdlBinding, bindingWsdl);
2194IEnumerable<IEnumerable<XmlElement>> wsdlPortAlternatives = this.GetPolicyAlternatives(endpointContext.WsdlPort, endpointContext.WsdlPort.Service.ServiceDescription);
2195policyAlternatives.EndpointAlternatives = PolicyHelper.CrossProduct<XmlElement>(wsdlBindingAlternatives, wsdlPortAlternatives, new YieldLimiter(_importer.Quotas.MaxYields, _importer));
2205policyAlternatives.OperationBindingAlternatives = new Dictionary<OperationDescription, IEnumerable<IEnumerable<XmlElement>>>(endpointContext.Endpoint.Contract.Operations.Count);
2206policyAlternatives.MessageBindingAlternatives = new Dictionary<MessageDescription, IEnumerable<IEnumerable<XmlElement>>>();
2207policyAlternatives.FaultBindingAlternatives = new Dictionary<FaultDescription, IEnumerable<IEnumerable<XmlElement>>>();
2220IEnumerable<IEnumerable<XmlElement>> operationAlternatives = this.GetPolicyAlternatives(wsdlOperationBinding, bindingWsdl);
2251IEnumerable<IEnumerable<XmlElement>> messageAlternatives = this.GetPolicyAlternatives(wsdlMessageBinding, bindingWsdl);
2267IEnumerable<IEnumerable<XmlElement>> faultAlternatives = this.GetPolicyAlternatives(wsdlFaultBinding, bindingWsdl);
2279internal XmlElement ResolvePolicyReference(string policyReference, XmlElement contextPolicyAssertion)
2287private readonly Dictionary<WsdlNS.ServiceDescription, Dictionary<string, XmlElement>> _embeddedPolicyDictionary = new Dictionary<WsdlNS.ServiceDescription, Dictionary<string, XmlElement>>();
2288private readonly Dictionary<string, XmlElement> _externalPolicyDictionary = new Dictionary<string, XmlElement>();
2289private readonly Dictionary<XmlElement, WsdlNS.ServiceDescription> _policySourceTable = new Dictionary<XmlElement, WsdlNS.ServiceDescription>();
2291internal Dictionary<XmlElement, WsdlNS.ServiceDescription> PolicySourceTable
2305foreach (XmlElement element in WsdlPolicyReader.GetEmbeddedPolicy(wsdl))
2314foreach (KeyValuePair<string, XmlElement> policyDocument in importer._policyDocuments)
2320private void AddEmbeddedPolicy(WsdlImporter importer, WsdlNS.ServiceDescription wsdl, XmlElement element)
2331Dictionary<string, XmlElement> wsdlPolicyDictionary;
2334wsdlPolicyDictionary = new Dictionary<string, XmlElement>();
2349private void AddExternalPolicy(WsdlImporter importer, KeyValuePair<string, XmlElement> policyDocument)
2377internal XmlElement ResolvePolicyReference(string policyReference, XmlElement contextPolicyAssertion)
2379XmlElement policy;
2401internal XmlElement ResolvePolicyReference(string policyReference, WsdlNS.ServiceDescription wsdlDocument)
2403XmlElement policy;
2410Dictionary<string, XmlElement> wsdlPolicyDictionary;
2420private static string CreateKeyFromPolicy(string identifier, XmlElement policyElement)
2427private static string GetFragmentIdentifier(XmlElement element)
2436internal string CreateIdXPath(XmlElement policyAssertion)
2451internal static string CreateIdXPath(WsdlNS.ServiceDescription wsdl, XmlElement element, string key)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\Tokens\IssuedSecurityTokenParameters.cs (36)
34private Collection<XmlElement> _additionalRequestParameters = new Collection<XmlElement>();
56foreach (XmlElement parameter in other._additionalRequestParameters)
58_additionalRequestParameters.Add((XmlElement)parameter.Clone());
99public Collection<XmlElement> AdditionalRequestParameters
231internal void SetRequestParameters(Collection<XmlElement> requestParameters, TrustDriver trustDriver)
239Collection<XmlElement> unknownRequestParameters = new Collection<XmlElement>();
241foreach (XmlElement element in requestParameters)
246Collection<XmlElement> requiredClaims;
258Collection<XmlElement> unrecognizedRequiredClaims = new Collection<XmlElement>();
259foreach (XmlElement claimRequirement in requiredClaims)
303public Collection<XmlElement> CreateRequestParameters(MessageSecurityVersion messageSecurityVersion, SecurityTokenSerializer securityTokenSerializer)
308internal Collection<XmlElement> CreateRequestParameters(TrustDriver driver)
313Collection<XmlElement> result = new Collection<XmlElement>();
328Collection<XmlElement> claimsElements = new Collection<XmlElement>();
332XmlElement element = doc.CreateElement(wsidPrefix, "ClaimType", wsidNamespace);
349Collection<XmlElement> trustNormalizedParameters = NormalizeAdditionalParameters(_additionalRequestParameters,
353foreach (XmlElement parameter in trustNormalizedParameters)
362private Collection<XmlElement> NormalizeAdditionalParameters(Collection<XmlElement> additionalParameters,
369private bool CollectionContainsElementsWithTrustNamespace(Collection<XmlElement> collection, string trustNamespace)
414internal bool DoAlgorithmsMatch(SecurityAlgorithmSuite algorithmSuite, SecurityStandardsManager standardsManager, out Collection<XmlElement> otherRequestParameters)
421otherRequestParameters = new Collection<XmlElement>();
424Collection<XmlElement> trustVersionNormalizedParameterCollection;
434trustVersionNormalizedParameterCollection = new Collection<XmlElement>();
435foreach (XmlElement innerElement in this.AdditionalRequestParameters[0])
448XmlElement element = trustVersionNormalizedParameterCollection[i];
552XmlElement claimTypeRequirement = GetClaimTypeRequirement(parameters.AdditionalRequestParameters, standardsManager);
555XmlElement claimTypeElement = claimTypeRequirement.ChildNodes[0] as XmlElement;
585internal static XmlElement GetClaimTypeRequirement(Collection<XmlElement> additionalRequestParameters, SecurityStandardsManager standardsManager)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\TrustDriver.cs (24)
156public abstract XmlElement CreateKeySizeElement(int keySize);
157public abstract XmlElement CreateKeyTypeElement(SecurityKeyType keyType);
158public abstract XmlElement CreateTokenTypeElement(string tokenTypeUri);
159public abstract XmlElement CreateRequiredClaimsElement(IEnumerable<XmlElement> claimsList);
160public abstract XmlElement CreateUseKeyElement(SecurityKeyIdentifier keyIdentifier, SecurityStandardsManager standardsManager);
161public abstract XmlElement CreateSignWithElement(string signatureAlgorithm);
162public abstract XmlElement CreateEncryptWithElement(string encryptionAlgorithm);
163public abstract XmlElement CreateEncryptionAlgorithmElement(string encryptionAlgorithm);
164public abstract XmlElement CreateCanonicalizationAlgorithmElement(string canonicalicationAlgorithm);
165public abstract XmlElement CreateComputedKeyAlgorithmElement(string computedKeyAlgorithm);
166public abstract Collection<XmlElement> ProcessUnknownRequestParameters(Collection<XmlElement> unknownRequestParameters, Collection<XmlElement> originalRequestParameters);
167public abstract bool TryParseKeySizeElement(XmlElement element, out int keySize);
168public abstract bool TryParseKeyTypeElement(XmlElement element, out SecurityKeyType keyType);
169public abstract bool TryParseTokenTypeElement(XmlElement element, out string tokenType);
170public abstract bool TryParseRequiredClaimsElement(XmlElement element, out Collection<XmlElement> requiredClaims);
172internal virtual bool IsSignWithElement(XmlElement element, out string signatureAlgorithm) { signatureAlgorithm = null; return false; }
173internal virtual bool IsEncryptWithElement(XmlElement element, out string encryptWithAlgorithm) { encryptWithAlgorithm = null; return false; }
174internal virtual bool IsEncryptionAlgorithmElement(XmlElement element, out string encryptionAlgorithm) { encryptionAlgorithm = null; return false; }
175internal virtual bool IsCanonicalizationAlgorithmElement(XmlElement element, out string canonicalizationAlgorithm) { canonicalizationAlgorithm = null; return false; }
176internal virtual bool IsKeyWrapAlgorithmElement(XmlElement element, out string keyWrapAlgorithm) { keyWrapAlgorithm = null; return false; }
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecurityPolicy.cs (259)
123public virtual XmlElement CreateWsspAssertion(string name)
128public virtual bool IsWsspAssertion(XmlElement assertion)
133public virtual bool IsWsspAssertion(XmlElement assertion, string name)
138public virtual bool IsMsspAssertion(XmlElement assertion, string name)
143public virtual bool TryImportWsspAssertion(ICollection<XmlElement> assertions, string name, out XmlElement assertion)
147foreach (XmlElement e in assertions)
160public virtual bool TryImportWsspAssertion(ICollection<XmlElement> assertions, string name)
165public virtual bool TryImportWsspAssertion(ICollection<XmlElement> assertions, string name, bool isOptional)
167foreach (XmlElement e in assertions)
179public virtual XmlElement CreateMsspAssertion(string name)
184public virtual bool CanImportAssertion(ICollection<XmlElement> assertions)
186foreach (XmlElement e in assertions)
225public virtual bool TryImportMsspAssertion(ICollection<XmlElement> assertions, string name)
227foreach (XmlElement e in assertions)
239public virtual XmlElement CreateWspPolicyWrapper(MetadataExporter exporter, params XmlElement[] nestedAssertions)
241XmlElement result = doc.CreateElement(WspPrefix, PolicyName, exporter.PolicyVersion.Namespace);
245foreach (XmlElement e in nestedAssertions)
257public virtual XmlElement CreateWsspSignedPartsAssertion(MessagePartSpecification parts)
264XmlElement result;
285public virtual XmlElement CreateWsspEncryptedPartsAssertion(MessagePartSpecification parts)
292XmlElement result;
313public virtual MessagePartSpecification TryGetProtectedParts(XmlElement assertion)
323else if (node is XmlElement)
325XmlElement element = (XmlElement)node;
359public virtual bool TryImportWsspEncryptedPartsAssertion(ICollection<XmlElement> assertions, out MessagePartSpecification parts, out XmlElement assertion)
373public virtual bool TryImportWsspSignedPartsAssertion(ICollection<XmlElement> assertions, out MessagePartSpecification parts, out XmlElement assertion)
387public virtual XmlElement CreateWsspHeaderAssertion(XmlQualifiedName header)
389XmlElement result = CreateWsspAssertion(HeaderName);
396public virtual XmlElement CreateWsspSymmetricBindingAssertion(MetadataExporter exporter, PolicyConversionContext policyContext, SymmetricSecurityBindingElement binding)
403XmlElement result = CreateWsspAssertion(SymmetricBindingName);
420public virtual bool TryGetNestedPolicyAlternatives(MetadataImporter importer, XmlElement assertion, out Collection<Collection<XmlElement>> alternatives)
424XmlElement policyElement = null;
427if (node is XmlElement && node.LocalName == PolicyName && (node.NamespaceURI == WspNamespace || node.NamespaceURI == Wsp15Namespace))
429policyElement = (XmlElement)node;
440IEnumerable<IEnumerable<XmlElement>> enumerableAlternatives = importer.NormalizePolicy(new XmlElement[] { policyElement });
442alternatives = new Collection<Collection<XmlElement>>();
443foreach (IEnumerable<XmlElement> enumerableAlternative in enumerableAlternatives)
445Collection<XmlElement> alternative = new Collection<XmlElement>();
447foreach (XmlElement e in enumerableAlternative)
457public virtual bool TryImportWsspSymmetricBindingAssertion(MetadataImporter importer, PolicyConversionContext policyContext, ICollection<XmlElement> assertions, out SymmetricSecurityBindingElement binding, out XmlElement assertion)
461Collection<Collection<XmlElement>> alternatives;
466foreach (Collection<XmlElement> alternative in alternatives)
494public virtual XmlElement CreateWsspAsymmetricBindingAssertion(MetadataExporter exporter, PolicyConversionContext policyContext, AsymmetricSecurityBindingElement binding)
501XmlElement result = CreateWsspAssertion(AsymmetricBindingName);
519public virtual bool TryImportWsspAsymmetricBindingAssertion(MetadataImporter importer, PolicyConversionContext policyContext, ICollection<XmlElement> assertions, out AsymmetricSecurityBindingElement binding, out XmlElement assertion)
523Collection<Collection<XmlElement>> alternatives;
528foreach (Collection<XmlElement> alternative in alternatives)
557public virtual XmlElement CreateWsspTransportBindingAssertion(MetadataExporter exporter, TransportSecurityBindingElement binding, XmlElement transportTokenAssertion)
559XmlElement result = CreateWsspAssertion(TransportBindingName);
572public virtual bool TryImportWsspTransportBindingAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, out TransportSecurityBindingElement binding, out XmlElement assertion)
576Collection<Collection<XmlElement>> alternatives;
581foreach (Collection<XmlElement> alternative in alternatives)
583XmlElement transportTokenAssertion;
612public virtual XmlElement CreateWsspWssAssertion(MetadataExporter exporter, SecurityBindingElement binding)
644public virtual bool TryImportWsspWssAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, SecurityBindingElement binding, out XmlElement assertion)
656Collection<Collection<XmlElement>> alternatives;
662foreach (Collection<XmlElement> alternative in alternatives)
683foreach (Collection<XmlElement> alternative in alternatives)
715public virtual XmlElement CreateWsspWss10Assertion(MetadataExporter exporter)
717XmlElement result = CreateWsspAssertion(Wss10Name);
728public virtual XmlElement CreateWsspWss11Assertion(MetadataExporter exporter, bool requireSignatureConfirmation)
730XmlElement result = CreateWsspAssertion(Wss11Name);
743public virtual XmlElement CreateWsspAssertionMustSupportRefKeyIdentifierName()
755public virtual XmlElement CreateWsspAssertionMustSupportRefIssuerSerialName()
767public virtual XmlElement CreateWsspAssertionMustSupportRefThumbprintName()
779public virtual XmlElement CreateWsspAssertionMustSupportRefEncryptedKeyName()
792public virtual XmlElement CreateWsspRequireSignatureConformationAssertion(bool requireSignatureConfirmation)
804public abstract XmlElement CreateWsspTrustAssertion(MetadataExporter exporter, SecurityKeyEntropyMode keyEntropyMode);
806public abstract bool TryImportWsspTrustAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, SecurityBindingElement binding, out XmlElement assertion);
808protected XmlElement CreateWsspTrustAssertion(string trustName, MetadataExporter exporter, SecurityKeyEntropyMode keyEntropyMode)
810XmlElement result = CreateWsspAssertion(trustName);
822protected bool TryImportWsspTrustAssertion(string trustName, MetadataImporter importer, ICollection<XmlElement> assertions, SecurityBindingElement binding, out XmlElement assertion)
834Collection<Collection<XmlElement>> alternatives;
839foreach (Collection<XmlElement> alternative in alternatives)
880public virtual XmlElement CreateWsspRequireClientEntropyAssertion(SecurityKeyEntropyMode keyEntropyMode)
892public virtual XmlElement CreateWsspRequireServerEntropyAssertion(SecurityKeyEntropyMode keyEntropyMode)
904public virtual Collection<XmlElement> CreateWsspSupportingTokensAssertion(MetadataExporter exporter, Collection<SecurityTokenParameters> signed, Collection<SecurityTokenParameters> signedEncrypted, Collection<SecurityTokenParameters> endorsing, Collection<SecurityTokenParameters> signedEndorsing, Collection<SecurityTokenParameters> optionalSigned, Collection<SecurityTokenParameters> optionalSignedEncrypted, Collection<SecurityTokenParameters> optionalEndorsing, Collection<SecurityTokenParameters> optionalSignedEndorsing)
909public virtual Collection<XmlElement> CreateWsspSupportingTokensAssertion(MetadataExporter exporter, Collection<SecurityTokenParameters> signed, Collection<SecurityTokenParameters> signedEncrypted, Collection<SecurityTokenParameters> endorsing, Collection<SecurityTokenParameters> signedEndorsing, Collection<SecurityTokenParameters> optionalSigned, Collection<SecurityTokenParameters> optionalSignedEncrypted, Collection<SecurityTokenParameters> optionalEndorsing, Collection<SecurityTokenParameters> optionalSignedEndorsing, AddressingVersion addressingVersion)
911Collection<XmlElement> supportingTokenAssertions = new Collection<XmlElement>();
914XmlElement supportingTokenAssertion = CreateWsspSignedSupportingTokensAssertion(exporter, signed, signedEncrypted, optionalSigned, optionalSignedEncrypted);
931protected XmlElement CreateWsspSignedSupportingTokensAssertion(MetadataExporter exporter, Collection<SecurityTokenParameters> signed, Collection<SecurityTokenParameters> signedEncrypted, Collection<SecurityTokenParameters> optionalSigned, Collection<SecurityTokenParameters> optionalSignedEncrypted)
933XmlElement result;
944XmlElement policy = CreateWspPolicyWrapper(exporter);
982protected XmlElement CreateWsspEndorsingSupportingTokensAssertion(MetadataExporter exporter, Collection<SecurityTokenParameters> endorsing, Collection<SecurityTokenParameters> optionalEndorsing, AddressingVersion addressingVersion)
987protected XmlElement CreateWsspSignedEndorsingSupportingTokensAssertion(MetadataExporter exporter, Collection<SecurityTokenParameters> signedEndorsing, Collection<SecurityTokenParameters> optionalSignedEndorsing, AddressingVersion addressingVersion)
992protected XmlElement CreateWsspiSupportingTokensAssertion(MetadataExporter exporter, Collection<SecurityTokenParameters> endorsing, Collection<SecurityTokenParameters> optionalEndorsing, AddressingVersion addressingVersion, string assertionName)
994XmlElement result;
1004XmlElement policy = CreateWspPolicyWrapper(exporter);
1044public virtual bool TryImportWsspSupportingTokensAssertion(MetadataImporter importer, PolicyConversionContext policyContext, ICollection<XmlElement> assertions, Collection<SecurityTokenParameters> signed, Collection<SecurityTokenParameters> signedEncrypted, Collection<SecurityTokenParameters> endorsing, Collection<SecurityTokenParameters> signedEndorsing, Collection<SecurityTokenParameters> optionalSigned, Collection<SecurityTokenParameters> optionalSignedEncrypted, Collection<SecurityTokenParameters> optionalEndorsing, Collection<SecurityTokenParameters> optionalSignedEndorsing)
1046XmlElement assertion;
1089protected bool TryImportWsspSignedSupportingTokensAssertion(MetadataImporter importer, PolicyConversionContext policyContext, ICollection<XmlElement> assertions, Collection<SecurityTokenParameters> signed, Collection<SecurityTokenParameters> signedEncrypted, Collection<SecurityTokenParameters> optionalSigned, Collection<SecurityTokenParameters> optionalSignedEncrypted, out XmlElement assertion)
1110Collection<Collection<XmlElement>> alternatives;
1115foreach (Collection<XmlElement> alternative in alternatives)
1169protected bool TryImportWsspEndorsingSupportingTokensAssertion(MetadataImporter importer, PolicyConversionContext policyContext, ICollection<XmlElement> assertions, Collection<SecurityTokenParameters> endorsing, Collection<SecurityTokenParameters> optionalEndorsing, out XmlElement assertion)
1182Collection<Collection<XmlElement>> alternatives;
1187foreach (Collection<XmlElement> alternative in alternatives)
1233protected bool TryImportWsspSignedEndorsingSupportingTokensAssertion(MetadataImporter importer, PolicyConversionContext policyContext, ICollection<XmlElement> assertions, Collection<SecurityTokenParameters> signedEndorsing, Collection<SecurityTokenParameters> optionalSignedEndorsing, out XmlElement assertion)
1246Collection<Collection<XmlElement>> alternatives;
1251foreach (Collection<XmlElement> alternative in alternatives)
1297public virtual XmlElement CreateWsspEncryptSignatureAssertion(PolicyConversionContext policyContext, SecurityBindingElement binding)
1403public virtual XmlElement CreateWsspEncryptBeforeSigningAssertion(MessageProtectionOrder protectionOrder)
1415public virtual XmlElement CreateWsspProtectTokensAssertion(SecurityBindingElement sbe)
1428public virtual bool TryImportMessageProtectionOrderAssertions(ICollection<XmlElement> assertions, out MessageProtectionOrder order)
1446public virtual XmlElement CreateWsspIncludeTimestampAssertion(bool includeTimestamp)
1458public virtual bool TryImportWsspIncludeTimestampAssertion(ICollection<XmlElement> assertions, SecurityBindingElement binding)
1464public virtual bool TryImportWsspProtectTokensAssertion(ICollection<XmlElement> assertions, out bool protectTokens)
1478public virtual XmlElement CreateWsspLayoutAssertion(MetadataExporter exporter, SecurityHeaderLayout layout)
1480XmlElement result = CreateWsspAssertion(LayoutName);
1490public virtual bool TryImportWsspLayoutAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, SecurityBindingElement binding)
1493XmlElement assertion;
1498Collection<Collection<XmlElement>> alternatives;
1502foreach (Collection<XmlElement> alternative in alternatives)
1523public virtual XmlElement CreateLayoutAssertion(SecurityHeaderLayout layout)
1540public virtual bool TryImportLayoutAssertion(ICollection<XmlElement> assertions, out SecurityHeaderLayout layout)
1569public virtual XmlElement CreateWsspAlgorithmSuiteAssertion(MetadataExporter exporter, SecurityAlgorithmSuite suite)
1571XmlElement result = CreateWsspAssertion(AlgorithmSuiteName);
1581public virtual bool TryImportWsspAlgorithmSuiteAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, SecurityBindingElement binding)
1584XmlElement assertion;
1585Collection<Collection<XmlElement>> alternatives;
1590foreach (Collection<XmlElement> alternative in alternatives)
1608public virtual XmlElement CreateAlgorithmSuiteAssertion(SecurityAlgorithmSuite suite)
1615XmlElement result;
1657public virtual bool TryImportAlgorithmSuiteAssertion(ICollection<XmlElement> assertions, out SecurityAlgorithmSuite suite)
1697public virtual XmlElement CreateWsspProtectionTokenAssertion(MetadataExporter exporter, SecurityTokenParameters parameters)
1699XmlElement result = CreateWsspAssertion(ProtectionTokenName);
1711public virtual bool TryImportWsspProtectionTokenAssertion(MetadataImporter importer, PolicyConversionContext policyContext, ICollection<XmlElement> assertions, SymmetricSecurityBindingElement binding)
1715XmlElement assertion;
1716Collection<Collection<XmlElement>> alternatives;
1720foreach (Collection<XmlElement> alternative in alternatives)
1737public virtual bool TryImportWsspInitiatorTokenAssertion(MetadataImporter importer, PolicyConversionContext policyContext, ICollection<XmlElement> assertions, AsymmetricSecurityBindingElement binding)
1741XmlElement assertion;
1742Collection<Collection<XmlElement>> alternatives;
1746foreach (Collection<XmlElement> alternative in alternatives)
1763public virtual bool TryImportWsspRecipientTokenAssertion(MetadataImporter importer, PolicyConversionContext policyContext, ICollection<XmlElement> assertions, AsymmetricSecurityBindingElement binding)
1767XmlElement assertion;
1768Collection<Collection<XmlElement>> alternatives;
1772foreach (Collection<XmlElement> alternative in alternatives)
1789public virtual XmlElement CreateWsspInitiatorTokenAssertion(MetadataExporter exporter, SecurityTokenParameters parameters)
1791XmlElement result = CreateWsspAssertion(InitiatorTokenName);
1802public virtual XmlElement CreateWsspRecipientTokenAssertion(MetadataExporter exporter, SecurityTokenParameters parameters)
1804XmlElement result = CreateWsspAssertion(RecipientTokenName);
1815public virtual XmlElement CreateWsspTransportTokenAssertion(MetadataExporter exporter, XmlElement transportTokenAssertion)
1822XmlElement result = CreateWsspAssertion(TransportTokenName);
1827(XmlElement)(doc.ImportNode(transportTokenAssertion, true))
1833public virtual bool TryImportWsspTransportTokenAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, out XmlElement transportBindingAssertion)
1837XmlElement assertion;
1838Collection<Collection<XmlElement>> alternatives;
1852public virtual XmlElement CreateTokenAssertion(MetadataExporter exporter, SecurityTokenParameters parameters)
1857public virtual XmlElement CreateTokenAssertion(MetadataExporter exporter, SecurityTokenParameters parameters, bool isOptional)
1864XmlElement result;
1911public virtual bool TryImportTokenAssertion(MetadataImporter importer, PolicyConversionContext policyContext, Collection<XmlElement> assertions, out SecurityTokenParameters parameters, out bool isOptional)
1918XmlElement tokenAssertion = assertions[0];
1957public virtual void SetIncludeTokenValue(XmlElement tokenAssertion, SecurityTokenInclusionMode inclusionMode)
1978public virtual bool TryGetIncludeTokenValue(XmlElement assertion, out SecurityTokenInclusionMode mode)
2009public virtual XmlElement CreateWsspRequireDerivedKeysAssertion(bool requireDerivedKeys)
2021public virtual bool TryImportWsspRequireDerivedKeysAssertion(ICollection<XmlElement> assertions, SecurityTokenParameters parameters)
2027public virtual XmlElement CreateWsspKerberosTokenAssertion(MetadataExporter exporter, KerberosSecurityTokenParameters parameters)
2029XmlElement result = CreateWsspAssertion(KerberosTokenName);
2039public virtual bool TryImportWsspKerberosTokenAssertion(MetadataImporter importer, XmlElement assertion, out SecurityTokenParameters parameters)
2044Collection<Collection<XmlElement>> alternatives;
2051foreach (Collection<XmlElement> alternative in alternatives)
2078public virtual XmlElement CreateX509ReferenceStyleAssertion(X509KeyIdentifierClauseType referenceStyle)
2101public virtual bool TryImportX509ReferenceStyleAssertion(ICollection<XmlElement> assertions, X509SecurityTokenParameters parameters)
2119public virtual XmlElement CreateWsspX509TokenAssertion(MetadataExporter exporter, X509SecurityTokenParameters parameters)
2121XmlElement result = CreateWsspAssertion(X509TokenName);
2133public virtual bool TryImportWsspX509TokenAssertion(MetadataImporter importer, XmlElement assertion, out SecurityTokenParameters parameters)
2138Collection<Collection<XmlElement>> alternatives;
2145foreach (Collection<XmlElement> alternative in alternatives)
2174public virtual XmlElement CreateWsspUsernameTokenAssertion(MetadataExporter exporter, UserNameSecurityTokenParameters parameters)
2176XmlElement result = CreateWsspAssertion(UsernameTokenName);
2186public virtual bool TryImportWsspUsernameTokenAssertion(MetadataImporter importer, XmlElement assertion, out SecurityTokenParameters parameters)
2191Collection<Collection<XmlElement>> alternatives;
2198foreach (Collection<XmlElement> alternative in alternatives)
2219public virtual XmlElement CreateWsspRsaTokenAssertion(RsaSecurityTokenParameters parameters)
2221XmlElement result = CreateMsspAssertion(RsaTokenName);
2226public virtual bool TryImportWsspRsaTokenAssertion(MetadataImporter importer, XmlElement assertion, out SecurityTokenParameters parameters)
2231Collection<Collection<XmlElement>> alternatives;
2244public virtual XmlElement CreateReferenceStyleAssertion(SecurityTokenReferenceStyle referenceStyle)
2257public virtual bool TryImportReferenceStyleAssertion(ICollection<XmlElement> assertions, IssuedSecurityTokenParameters parameters)
2271public virtual XmlElement CreateWsspIssuerElement(EndpointAddress issuerAddress, EndpointAddress issuerMetadataAddress)
2273XmlElement result;
2313result = (XmlElement)doc.ReadNode(new XmlTextReader(stream));
2318public virtual bool TryGetIssuer(XmlElement assertion, out EndpointAddress issuer, out EndpointAddress issuerMetadata)
2326if (node is XmlElement && IsWsspAssertion((XmlElement)node, IssuerName))
2372public virtual XmlElement CreateWsspIssuedTokenAssertion(MetadataExporter exporter, IssuedSecurityTokenParameters parameters)
2374XmlElement result = CreateWsspAssertion(IssuedTokenName);
2376XmlElement issuerAssertion = CreateWsspIssuerElement(parameters.IssuerAddress, parameters.IssuerMetadataAddress);
2381XmlElement tokenTemplate = CreateWsspAssertion(RequestSecurityTokenTemplateName);
2383foreach (XmlElement p in parameters.CreateRequestParameters(driver))
2397public virtual bool TryGetRequestSecurityTokenTemplate(XmlElement assertion, out Collection<XmlElement> requestParameters)
2403if (node is XmlElement && IsWsspAssertion((XmlElement)node, RequestSecurityTokenTemplateName))
2405requestParameters = new Collection<XmlElement>();
2408if (p is XmlElement)
2410requestParameters.Add((XmlElement)p);
2419public virtual bool TryImportWsspIssuedTokenAssertion(MetadataImporter importer, PolicyConversionContext policyContext, XmlElement assertion, out SecurityTokenParameters parameters)
2424Collection<Collection<XmlElement>> alternatives;
2427Collection<XmlElement> requestSecurityTokenTemplate;
2436foreach (Collection<XmlElement> alternative in alternatives)
2475public virtual XmlElement CreateWsspMustNotSendCancelAssertion(bool requireCancel)
2479XmlElement result = CreateWsspAssertion(MustNotSendCancelName);
2488public virtual bool TryImportWsspMustNotSendCancelAssertion(ICollection<XmlElement> assertions, out bool requireCancellation)
2494public virtual XmlElement CreateWsspSpnegoContextTokenAssertion(MetadataExporter exporter, SspiSecurityTokenParameters parameters)
2496XmlElement result = CreateWsspAssertion(SpnegoContextTokenName);
2507public virtual bool TryImportWsspSpnegoContextTokenAssertion(MetadataImporter importer, XmlElement assertion, out SecurityTokenParameters parameters)
2512Collection<Collection<XmlElement>> alternatives;
2519foreach (Collection<XmlElement> alternative in alternatives)
2549public abstract XmlElement CreateWsspHttpsTokenAssertion(MetadataExporter exporter, HttpsTransportBindingElement httpsBinding);
2551public abstract bool TryImportWsspHttpsTokenAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, HttpsTransportBindingElement httpsBinding);
2553public virtual bool ContainsWsspHttpsTokenAssertion(ICollection<XmlElement> assertions)
2558public virtual XmlElement CreateMsspRequireClientCertificateAssertion(bool requireClientCertificate)
2570public virtual bool TryImportMsspRequireClientCertificateAssertion(ICollection<XmlElement> assertions, SslSecurityTokenParameters parameters)
2576public virtual XmlElement CreateMsspSslContextTokenAssertion(MetadataExporter exporter, SslSecurityTokenParameters parameters)
2578XmlElement result = CreateMsspAssertion(SslContextTokenName);
2590public virtual bool TryImportMsspSslContextTokenAssertion(MetadataImporter importer, XmlElement assertion, out SecurityTokenParameters parameters)
2595Collection<Collection<XmlElement>> alternatives;
2602foreach (Collection<XmlElement> alternative in alternatives)
2633public virtual XmlElement CreateWsspBootstrapPolicyAssertion(MetadataExporter exporter, SecurityBindingElement bootstrapSecurity)
2689XmlElement nestedPolicy = CreateWspPolicyWrapper(
2693foreach (XmlElement e in sp.FilterWsspPolicyAssertions(policyContext.GetBindingAssertions()))
2697XmlElement result = CreateWsspAssertion(BootstrapPolicyName);
2703public virtual ICollection<XmlElement> FilterWsspPolicyAssertions(ICollection<XmlElement> policyAssertions)
2705Collection<XmlElement> result = new Collection<XmlElement>();
2707foreach (XmlElement assertion in policyAssertions)
2714public virtual bool TryImportWsspBootstrapPolicyAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, SecureConversationSecurityTokenParameters parameters)
2718XmlElement assertion;
2719Collection<Collection<XmlElement>> alternatives;
2771public virtual XmlElement CreateWsspSecureConversationTokenAssertion(MetadataExporter exporter, SecureConversationSecurityTokenParameters parameters)
2773XmlElement result = CreateWsspAssertion(SecureConversationTokenName);
2785public virtual bool TryImportWsspSecureConversationTokenAssertion(MetadataImporter importer, XmlElement assertion, out SecurityTokenParameters parameters)
2790Collection<Collection<XmlElement>> alternatives;
2797foreach (Collection<XmlElement> alternative in alternatives)
3067public static bool TryGetSecurityPolicyDriver(ICollection<XmlElement> assertions, out WSSecurityPolicy securityPolicy)
3093public bool TryGetSecurityPolicyDriver(ICollection<XmlElement> assertions, out WSSecurityPolicy securityPolicy)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecurityPolicy12.cs (59)
51public override XmlElement CreateWsspHttpsTokenAssertion(MetadataExporter exporter, HttpsTransportBindingElement httpsBinding)
56XmlElement result = CreateWsspAssertion(WSSecurityPolicy.HttpsTokenName);
61XmlElement policy = CreateWspPolicyWrapper(exporter);
79public override bool TryImportWsspHttpsTokenAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, HttpsTransportBindingElement httpsBinding)
87XmlElement assertion;
91XmlElement policyElement = null;
94if (node is XmlElement && node.LocalName == WSSecurityPolicy.PolicyName && (node.NamespaceURI == WSSecurityPolicy.WspNamespace || node.NamespaceURI == WSSecurityPolicy.Wsp15Namespace))
96policyElement = (XmlElement)node;
105if (node is XmlElement && node.NamespaceURI == this.WsspNamespaceUri)
131public override Collection<XmlElement> CreateWsspSupportingTokensAssertion(MetadataExporter exporter, Collection<SecurityTokenParameters> signed, Collection<SecurityTokenParameters> signedEncrypted, Collection<SecurityTokenParameters> endorsing, Collection<SecurityTokenParameters> signedEndorsing, Collection<SecurityTokenParameters> optionalSigned, Collection<SecurityTokenParameters> optionalSignedEncrypted, Collection<SecurityTokenParameters> optionalEndorsing, Collection<SecurityTokenParameters> optionalSignedEndorsing, AddressingVersion addressingVersion)
133Collection<XmlElement> supportingTokenAssertions = new Collection<XmlElement>();
136XmlElement supportingTokenAssertion = CreateWsspSignedSupportingTokensAssertion(exporter, signed, optionalSigned);
158public override XmlElement CreateWsspSpnegoContextTokenAssertion(MetadataExporter exporter, SspiSecurityTokenParameters parameters)
160XmlElement result = CreateWsspAssertion(SpnegoContextTokenName);
174public override XmlElement CreateMsspSslContextTokenAssertion(MetadataExporter exporter, SslSecurityTokenParameters parameters)
176XmlElement result = CreateMsspAssertion(SslContextTokenName);
191public override XmlElement CreateWsspSecureConversationTokenAssertion(MetadataExporter exporter, SecureConversationSecurityTokenParameters parameters)
193XmlElement result = CreateWsspAssertion(SecureConversationTokenName);
207private XmlElement CreateWsspMustNotSendAmendAssertion()
209XmlElement result = CreateWsspAssertion(MustNotSendAmendName);
213private XmlElement CreateWsspMustNotSendRenewAssertion()
215XmlElement result = CreateWsspAssertion(MustNotSendRenewName);
219public override bool TryImportWsspSpnegoContextTokenAssertion(MetadataImporter importer, XmlElement assertion, out SecurityTokenParameters parameters)
224Collection<Collection<XmlElement>> alternatives;
231foreach (Collection<XmlElement> alternative in alternatives)
268public override bool TryImportMsspSslContextTokenAssertion(MetadataImporter importer, XmlElement assertion, out SecurityTokenParameters parameters)
273Collection<Collection<XmlElement>> alternatives;
280foreach (Collection<XmlElement> alternative in alternatives)
318public override bool TryImportWsspSecureConversationTokenAssertion(MetadataImporter importer, XmlElement assertion, out SecurityTokenParameters parameters)
323Collection<Collection<XmlElement>> alternatives;
330foreach (Collection<XmlElement> alternative in alternatives)
365public virtual bool TryImportWsspMustNotSendAmendAssertion(ICollection<XmlElement> assertions)
371public virtual bool TryImportWsspMustNotSendRenewAssertion(ICollection<XmlElement> assertions, out bool canRenewSession)
377private XmlElement CreateWsspSignedSupportingTokensAssertion(MetadataExporter exporter, Collection<SecurityTokenParameters> signed, Collection<SecurityTokenParameters> optionalSigned)
379XmlElement result;
388XmlElement policy = CreateWspPolicyWrapper(exporter);
412private XmlElement CreateWsspSignedEncryptedSupportingTokensAssertion(MetadataExporter exporter, Collection<SecurityTokenParameters> signedEncrypted, Collection<SecurityTokenParameters> optionalSignedEncrypted)
414XmlElement result;
423XmlElement policy = CreateWspPolicyWrapper(exporter);
447public override bool TryImportWsspSupportingTokensAssertion(MetadataImporter importer, PolicyConversionContext policyContext, ICollection<XmlElement> assertions, Collection<SecurityTokenParameters> signed, Collection<SecurityTokenParameters> signedEncrypted, Collection<SecurityTokenParameters> endorsing, Collection<SecurityTokenParameters> signedEndorsing, Collection<SecurityTokenParameters> optionalSigned, Collection<SecurityTokenParameters> optionalSignedEncrypted, Collection<SecurityTokenParameters> optionalEndorsing, Collection<SecurityTokenParameters> optionalSignedEndorsing)
449XmlElement assertion;
502private bool TryImportWsspSignedSupportingTokensAssertion(MetadataImporter importer, PolicyConversionContext policyContext, ICollection<XmlElement> assertions, Collection<SecurityTokenParameters> signed, Collection<SecurityTokenParameters> optionalSigned, out XmlElement assertion)
515Collection<Collection<XmlElement>> alternatives;
520foreach (Collection<XmlElement> alternative in alternatives)
550private bool TryImportWsspSignedEncryptedSupportingTokensAssertion(MetadataImporter importer, PolicyConversionContext policyContext, ICollection<XmlElement> assertions, Collection<SecurityTokenParameters> signedEncrypted, Collection<SecurityTokenParameters> optionalSignedEncrypted, out XmlElement assertion)
563Collection<Collection<XmlElement>> alternatives;
568foreach (Collection<XmlElement> alternative in alternatives)
598public override bool TryImportWsspRequireDerivedKeysAssertion(ICollection<XmlElement> assertions, SecurityTokenParameters parameters)
609XmlElement assertion = null;
617public override XmlElement CreateWsspTrustAssertion(MetadataExporter exporter, SecurityKeyEntropyMode keyEntropyMode)
622public override bool TryImportWsspTrustAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, SecurityBindingElement binding, out XmlElement assertion)
627public override XmlElement CreateWsspRsaTokenAssertion(RsaSecurityTokenParameters parameters)
629XmlElement result = CreateWsspAssertion(KeyValueTokenName);
634public override bool TryImportWsspRsaTokenAssertion(MetadataImporter importer, XmlElement assertion, out SecurityTokenParameters parameters)
639Collection<Collection<XmlElement>> alternatives;
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSTrust.cs (72)
92public override bool CanReadTokenCore(XmlElement element)
111public override SecurityKeyIdentifierClause CreateKeyIdentifierClauseFromTokenXmlCore(XmlElement issuedTokenXml,
252private XmlElement GetAppliesToElement(XmlElement rootElement)
260XmlElement elem = (rootElement.ChildNodes[i] as XmlElement);
272private T GetAppliesTo<T>(XmlElement rootXml, XmlObjectSerializer serializer)
274XmlElement appliesToElement = GetAppliesToElement(rootXml);
313private void GetAppliesToQName(XmlElement rootElement, out string localName, out string namespaceUri)
316XmlElement appliesToElement = GetAppliesToElement(rootElement);
351XmlElement element = rstr.RequestSecurityTokenResponseXml.ChildNodes[i] as XmlElement;
356XmlElement combinedHashElement = XmlHelper.GetChildElement(element);
385private BinaryNegotiation GetBinaryNegotiation(XmlElement rootElement)
393XmlElement elem = rootElement.ChildNodes[i] as XmlElement;
421private SecurityToken GetEntropy(XmlElement rootElement, SecurityTokenResolver resolver)
429XmlElement element = rootElement.ChildNodes[i] as XmlElement;
434XmlElement tokenXml = XmlHelper.GetChildElement(element);
445private void GetIssuedAndProofXml(RequestSecurityTokenResponse rstr, out XmlElement issuedTokenXml, out XmlElement proofTokenXml)
453XmlElement elem = rstr.RequestSecurityTokenResponseXml.ChildNodes[i] as XmlElement;
524public static BinaryNegotiation ReadBinaryNegotiation(XmlElement elem)
531protected virtual void ReadReferences(XmlElement rstrXml, out SecurityKeyIdentifierClause requestedAttachedReference,
569internal SecurityKeyIdentifierClause CreateGenericXmlSecurityKeyIdentifierClause(XmlNodeReader reader, XmlElement keyIdentifierReferenceXmlElement)
574internal SecurityKeyIdentifierClause GetKeyIdentifierXmlReferenceClause(XmlElement keyIdentifierReferenceXmlElement)
586protected virtual bool ReadRequestedTokenClosed(XmlElement rstrXml)
591protected virtual void ReadTargets(XmlElement rstXml, out SecurityKeyIdentifierClause renewTarget, out SecurityKeyIdentifierClause closeTarget)
668public override bool TryParseKeySizeElement(XmlElement element, out int keySize)
684public override XmlElement CreateKeySizeElement(int keySize)
691XmlElement result = doc.CreateElement(this.DriverDictionary.Prefix.Value, this.DriverDictionary.KeySize.Value,
697public override XmlElement CreateKeyTypeElement(SecurityKeyType keyType)
707public override bool TryParseKeyTypeElement(XmlElement element, out SecurityKeyType keyType)
727public bool TryParseSymmetricKeyElement(XmlElement element)
737private XmlElement CreateSymmetricKeyTypeElement()
740XmlElement result = doc.CreateElement(this.DriverDictionary.Prefix.Value, this.DriverDictionary.KeyType.Value,
746private bool TryParsePublicKeyElement(XmlElement element)
756private XmlElement CreatePublicKeyTypeElement()
759XmlElement result = doc.CreateElement(this.DriverDictionary.Prefix.Value, this.DriverDictionary.KeyType.Value,
765public override bool TryParseTokenTypeElement(XmlElement element, out string tokenType)
781public override XmlElement CreateTokenTypeElement(string tokenTypeUri)
788XmlElement result = doc.CreateElement(this.DriverDictionary.Prefix.Value, this.DriverDictionary.TokenType.Value,
794public override XmlElement CreateUseKeyElement(SecurityKeyIdentifier keyIdentifier, SecurityStandardsManager standardsManager)
805XmlElement result = doc.CreateElement(this.DriverDictionary.UseKey.Value, this.DriverDictionary.Namespace.Value);
824public override XmlElement CreateSignWithElement(string signatureAlgorithm)
831XmlElement result = doc.CreateElement(this.DriverDictionary.Prefix.Value, this.DriverDictionary.SignWith.Value,
837internal override bool IsSignWithElement(XmlElement element, out string signatureAlgorithm)
842public override XmlElement CreateEncryptWithElement(string encryptionAlgorithm)
849XmlElement result = doc.CreateElement(this.DriverDictionary.Prefix.Value, this.DriverDictionary.EncryptWith.Value,
855public override XmlElement CreateEncryptionAlgorithmElement(string encryptionAlgorithm)
862XmlElement result = doc.CreateElement(this.DriverDictionary.Prefix.Value, this.DriverDictionary.EncryptionAlgorithm.Value,
868internal override bool IsEncryptWithElement(XmlElement element, out string encryptWithAlgorithm)
873internal override bool IsEncryptionAlgorithmElement(XmlElement element, out string encryptionAlgorithm)
878public override XmlElement CreateComputedKeyAlgorithmElement(string algorithm)
885XmlElement result = doc.CreateElement(this.DriverDictionary.Prefix.Value, this.DriverDictionary.ComputedKeyAlgorithm.Value,
891public override XmlElement CreateCanonicalizationAlgorithmElement(string algorithm)
898XmlElement result = doc.CreateElement(this.DriverDictionary.Prefix.Value, this.DriverDictionary.CanonicalizationAlgorithm.Value,
904internal override bool IsCanonicalizationAlgorithmElement(XmlElement element, out string canonicalizationAlgorithm)
909public override bool TryParseRequiredClaimsElement(XmlElement element, out System.Collections.ObjectModel.Collection<XmlElement> requiredClaims)
917requiredClaims = new System.Collections.ObjectModel.Collection<XmlElement>();
919if (node is XmlElement)
923requiredClaims.Add((XmlElement)node);
932public override XmlElement CreateRequiredClaimsElement(IEnumerable<XmlElement> claimsList)
939XmlElement result = doc.CreateElement(this.DriverDictionary.Prefix.Value, this.DriverDictionary.Claims.Value,
941foreach (XmlElement claimElement in claimsList)
943XmlElement element = (XmlElement)doc.ImportNode(claimElement, true);
950protected static bool CheckElement(XmlElement element, string name, string ns, out string value)