libxml-security-java-1.5.6/0000755000175000017500000000000012273503736014352 5ustar tonytonylibxml-security-java-1.5.6/build.xml0000644000175000017500000007277412236161257016211 0ustar tonytony
libxml-security-java-1.5.6/CHANGELOG.txt0000644000175000017500000005644712222244032016403 0ustar tonytonyChangelog for "Apache xml-security" New in v1.5.6: Fixed SANTUARIO-368 - NPE in XMLSignature. New in v1.5.4: Fixed SANTUARIO-337 - ResourceResolver does thread-unsafe handling of the "secureValidation" flag. Fixed SANTUARIO-353 - ReferenceSubTreeData.iterator() does not return nodes in document order. Fixed SANTUARIO-351 - Avoid possible NPE in Unsync OutputStreams. New in v1.5.3: Fixed SANTUARIO-344 - XMLSignature keeps file-handle on xml-file. Fixed SANTUARIO-345 - Support Signature 1.1 KeyInfo Extensions: DEREncodedKeyValue, KeyInfoReference, X509Digest. Fixed SANTUARIO-342 - NullPointer in javax.xml.crypto.KeySelectorException.printStackTrace Fixed SANTUARIO-336 - Multiple race conditions in the ResolverDirectHttp implementation Fixed SANTUARIO-335 - Remove use of X509Certificate getSubjectDN + getIssuerDN. Fixed SANTUARIO-334 - UnsyncByteArrayOutputStream hangs on messages larger 512 MB. New in v1.5.2: Fixed SANTUARIO-313 - Javadocs warnings. Fixed SANTUARIO-309 - Default XMLCipher canonicalizer may decrypt element to the wrong namespace. Fixed SANTUARIO-308 - Canonicalizer error when encrypting multiple elements. Fixed SANTUARIO-310 - Implement KeyResolvers for PrivateKeys and SecretKeys. Fixed SANTUARIO-305 - No way to register internal key resolvers in DECRYPT_MODE. Fixed SANTUARIO-306 - KeySelectors loop Fixed SANTUARIO-304 - No way to distinguish DataReference from a KeyReference when iterating a ReferenceList Fixed SANTUARIO-302 - Need API to martial an independent ReferenceList. Fixed SANTUARIO-301 - Missing KeyInfo element when encrypting multiple elements. New in v1.5.1: Fixed SANTUARIO-300 - decryption/encryption optimization. Fixed SANTUARIO-296 - XMLSignatureInput fails with an IOException if constructed on a BufferedInputStream Fixed SANTUARIO-298 - Xalan is still a required dependency Fixed SANTUARIO-299 - StringIndexOutOfBoundsException is thrown during reference verification (if URI = "#") Fixed SANTUARIO-297 - Exceptions should use a JDK exception cause mechanism New in v1.5.0: Fixed SANTUARIO-295: XMLDSig XPathFilter2Transform bug involving intersect filter Fixed SANTUARIO-282: RSA-OAEP key transport is limited to SHA-1 digests. Fixed SANTUARIO-293: Support XML Encryption 1.1 Key Wrapping test-cases. Fixed SANTUARIO-292: Add the ability to access the dereferenced Elements after signature validation in the non-JSR-105 API. Fixed SANTUARIO-290: Add a secure validation switch for signature processing Fixed SANTUARIO-255: Port JSR 105 code to JDK 1.5. Fixed SANTUARIO-288: Add support for GCM algorithms via a third-party Crypto provider. Fixed SANTUARIO-287: Rename org.jcp package in the 1.5 release. Fixed SANTUARIO-284: ElementProxy#getTextFromChildElement() doesn't get all of the text if the element contains an entity like & Fixed SANTUARIO-273: xml:base attribute not processed correctly in C14N11 canonicalization. Fixed SANTUARIO-260: Review logging Fixed SANTUARIO-257: Use JUnit4 for testing Fixed SANTUARIO-256: Port non-JSR 105 code to use JDK 1.5. Fixed SANTUARIO-269: Register default algorithms/implementations dynamically. Fixed SANTUARIO-283: JSR105 does not retain namespace definitions on Object element when unmarshalling Fixed SANTUARIO-254: Rework org.apache.xml.security.utils.resolver.ResourceResolver. Fixed SANTUARIO-248: Add support for ECDSA signature with SHA-2 message digests + enhancements in ASN.1 to XMLDSIG converter (and viceversa) New in v.1.4.6 Fixed SANTUARIO-284: ElementProxy#getTextFromChildElement() doesn't get all of the text if the element contains an entity like & Fixed SANTUARIO-283: JSR105 does not retain namespace definitions on Object element when unmarshalling Fixed SANTUARIO-281: Invalid signature value when using XMLSignature in two EJB modules on AS Fixed SANTUARIO-102: Private keys must be instance of RSAPrivate or have PKCS#8 encoding Fixed SANTUARIO-273: xml:base attribute not processed correctly in C14N11 canonicalization. New in v1.4.5 Fixed SANTUARIO-250: VerifyMerlinsExamplesFifteen/TwentyThree.java samples should ignore signature-enveloping-hmac-sha1-40.xml Fixed SANTUARIO-191: xml:id attributes are not correctly handled when using c14n11. Fixed SANTUARIO-266: c14n11 produces different signatures using version 1.4.3 and 1.4.4. Fixed SANTUARIO-253: org.apache.xml.security.utils.resolver.ResourceResolver is not thread safe. Fixed SANTUARIO-263: Canonicalizer can't handle dynamical created DOM correctly. Thanks to Martin Koegler. Fixed SANTUARIO-262: Invalid use of String.getBytes(). Thanks to Martin Koegler. New in v1.4.4 Fixed Bug 50248: Concurrency problem on incomplete Init.init() calls. Thanks to Oliver Moehrke. Fixed Bug 50215: test_jsr105 target appears to fail certain tests because of changes to W3C xml-stylesheet spec New in v1.4.4-SNAPSHOT Fixed Bug 50122: JSR 105 TransformService classloading issue Fixed Bug 40897: String comparisons using '==' causes validation errors with some parsers. Fixed Bug 50050: UnsyncByteArrayOutputStream throws ArrayIndexOutOfBoundsException if array length > internal buffer expansion size. Fixed Bug 50036: IdResolver Java API extension. Thanks to Stefan Vladov. Fixed Bug 49493: Cannot resolve PrivateKeys used in Key Transport algorithms. Thanks to Clement Pellerin. Fixed Bug 49577: DOMSubTreeData allows for only one iteration over referenced data. Fixed Bug 49692: Xmlsec 1.4.3 not compatible with xmlbeans 2.4.0. Fixed Bug 49629: Some changes to the build system. Fixed Bug 49483: KeyResolver.registerAtStart() leads to ClassCastException. Thanks to Clement Pellerin. Fixed Bug 49458: StorageResolver always exhausted after first use. Thanks to Clement Pellerin. Fixed Bug 49456: StorageResolver.next() gives ClassCastException. Thanks to Clement Pellerin. Fixed Bug 49450: KeyStoreResolver always exhausted after first use. Thanks to Clement Pellerin. Fixed Bug 49447: KeyStoreResolver iterator returns null for symmetric keys. Thanks to Clement Pellerin. Fixed Bug 48368: Digest Value of References inside Manifest - calculation order problem Fixed Bug 47779: ConcurrentModificationException in XMLUtils. Fixed Bug 47761: xmlns:xml namespace improperly emitted during excl c14n. Thanks to Scott Cantor. Fixed Bug 36526: Out of memory error when signing or verifying big files. Thanks to Agnes Juhasz. Fixed Bug 47784: ClassNotFoundException when init the xml security in OSGi plateform Fixed Bug 47762: contextChild parameter of Transform.getInstance may be null New in v1.4.3 Fixed Bug 47526: XML signature HMAC truncation authentication bypass Fixed Bug 47525: Fix checkstyle problems with source and tests. Fixed Bug 42239: ECDSA signature value interopability patch. Fixed Bug 45744: XPath transform and xml-stylesheet. Fixed Bug 42986: The node inserted at the end of SOAPEnvelope. Fixed Bug 47029: Unnecessary namespace declarations on EncryptedData children. Fixed Bug 44335: Can't validate after invalid validation. Fixed Bug 47260: Improve Java unit testing. Fixed Bug 47265: Some website updates. Fixed Bug 45388: We need a POM file added to the Maven repository. Fixed Bug 47483: Remove JDK 1.5 API dependencies Fixed bug 47057: Downgrade signature verification logging from "info". Thanks to Colm O hEigeartaigh. Fixed bug 42061: Method to disable XMLUtils.addReturnToElement (reopened): changed Base64 code to ignore line breaks, if enabled. Thanks to Colm O hEigeartaigh. Fixed bug 47097: Reusing XMLSignature for signing and verifying fails on same thread. Thanks to Bruno Harbulot. Fixed bug 46732: Failed to add more than one child element to EncryptionMethod. Fixed bug 46101: org.apache.xml.security.utils.IdResolver is not thread safe Fixed bug 45961: verify with own canonicalization method. Thanks to Anton Kosyakov. Fixed bug 45475: XMLSignature::getKeyInfo method modifies document Fixed bug 45811: Fix XMLSec 1.4.2 problems reported by findbugs Fixed bug 45706: Transform.register class loading and recursive instantiation problems Fixed bug 45664: Some calls should be wrapped in AccessController.doPrivileged Fixed bug 45634: Restore XMLUtils.createDSctx method. Fixed bug 45095: log4j.properties in xmlsec sources and builds has side effects in production environment. Thanks to Joachim Rousseau. New in v1.4.2rc1 Fixed bug 44999: DOMException is thrown at XMLSignature creation. Thanks to Giedrius Noreikis. Fixed bug 44863: Improved logging in signature handling. Thanks to Wally Dennis. Fixed bug 44956: Concurrent creation of a XMLSignature instance produces an ArrayIndexOutOfBoundsException. Thanks to Giedrius Noreikis Fixed bug 44991: Concurrent invocation of KeyInfo.getX509Certificate() occasionally fails. Thanks to Giedrius Noreikis New in v1.4.2beta2 Fixed bug 44810: Add support for more XMLDSig algorithms listed in RFC 4051 Fixed bug 44617: Regression when processing XPath transform (additional fix) New in v1.4.2beta1 Fixed bug 44629: Switch order of XML Signature validation steps Fixed bug 44617: Regression when processing XPath transform Fixed bug 44586: XMLX509IssuerSerial.getIssuerName incorrectly escapes '#' in hex values Fixed rfe 42653: Add support for C14N 1.1 to Java implementation. Thanks to Sean Mullan. Fixed bug 44205: XMLX509Certificate.getX509Certificate() results in certificate parsing error. Thanks to Vishal Mahajan. Fixed Bug 44177: when using xslt transformation there is problem with xalan newline. Thanks to Matej Spiller. Small refactor for ElementProxy to get rid of the state, it was an old vestige that where taking space and obfuscating the code. Fixed bug 40897: String comparisons using '==' causes validation errors with some parsers. Thanks Vishal Mahajan Fixed bug 43056: Library does not allow specify provider for private key operations. Thanks to Alon Bar-Lev. Fixed bug 44102: XMLCipher loadEncryptedKey error. Thanks to Butler. Fixed bug 43239: "No installed provider supports this key" when checking a RSA signature against a DSA key before RSA key. Thanks to Matthias Germann. Fixed bug 42597: Unnecessary namespace declarations on Signature children Thanks to Brent Putnam. Fixed bug 42061: Method to disable XMLUtils.addReturnToElement. Thanks to Michael McIntosh. Fixed bug 42865: Problem with empty BaseURI in ResolverLocalFilesystem. Thanks to Frank Cornelis. Fixed bug 43230: Inclusive C14n doesn't always handle xml:space & xml:lang attributes correctly Fixed bug 38668: Add XMLCipher.encryptData method that takes serialized data as parameter. Thanks to Vladimir Ionescu. Fixed bug 42886: Error when removing encrypted content in 1.4.1. Thanks to Julien Taupin and Daniele Gagliardi. Fixed bug 42820: ClassLoader issue causing NoSuchAlgorithmException loading Provider Implementation. Thanks to James Washington. New in 1.4.1 Fixed bug 42239: ECDSA signature value interoperability patch. Thanks to Wolfgang Glas for fix. New in v1.4.1beta1 Fixed bug 41892: XML Security 1.4.0 does not build with IBM's JDK Fixed bug 41927: Cannot canonicalize with XSLT transform. Thanks to Lijun Liao for fix. Fixed bug 41805: Resolution of SAML 1.x ID attributes, incorrect namespace. Thanks to Brent Putman for fix. Fixed bug 41474: two text nodes with the value '\n' in succession within and . Thanks to Lijun Liao for fix. Fixed bug 41510: org.apache.xml.security.keys.content.KeyValue.getPublicKey() returns null for DSA key. Thanks to Stepan Hrbacek for fix. Fixed bug 41569: Cannot specify dynamically a specific JCE Provider with the DSA Signature. Thanks to Julien Pasquier for fix. Fixed bug 41573: XMLCipher StackOverflowError. Thanks to Marek Jablonski for fix. Fixed bug 41462: Xml canonization - UTF-8 encoding issue in Xml security 1.4.0 Thanks to Karol Rewera. Fixed bug 41520: Cannot generate signatures with the same key but different algorithms in sucession. Thanks to Lijun Liao New in 1.4 Fixed bug 40896 New in 1.4RC4 Fixed bug 40880 New in 1.4RC3 Fixed bug 40796 New in 1.4RC2a Fixed bug 40783 New in 1.4RC2 Fixed bug 40512. Made TransformSPI backward compatible. Now it is possible to use implementations for the >1.3 versions paying the performance hit of the old implementation. Fix a small & unneeded java 1.4 dependecy. KeyResolver & ResourceResolver can work like <1.3 mode when used with old implementations. New in 1.4RC1 Fixed bug 40290. Fixed bug 40298. Fixed bug 40360. Changed a little the way the IdResolver works when Document.getElementById fails. Fixed bug 40404. New in v1.4beta2 Optimization in c14n in node-sets. Optimization for the xml:* inheritance in inclusive c14n. Added ECDSA signature thanks Markus Lindner Optimization in RetrievelMethod handling. Don't reparse the bytes into a DOM tree if not needed thanks David Garcia. Fixed bug 40215: Base64 is not working in EBCDIC platform. Thanks to acastro.dit@aeat.es for fix. Big optimizations in XPath2 transformation. Fixed bug 40245 in XPATH2 transformation(only in development version) Fixed bug no resolver for X509Data with just a X509Certificate. Optimization in Base64 to do simple transformation from String to byte[] New in v1.4beta1 Fixed bug 40032. Fixed BUG 40031 Fixed bug when the prefix digital signature uri is not null. Changes in the NodeFilter API in order to let the transformations do some optimizations take into account the c14n order. Optimization in signature transformation in node-sets(xpath, xpath2), 20-40% speed-up. New in v1.4beta0 Fixed bug 38668: Add XMLCipher.encryptData method that takes serialized data as parameter (mullan) Fixed bug 39273: JSR 105 DOMCryptoContext.setIdAttributeNS not working when validating signatures (mullan) Fixed bug 38405: ElementProxy.length() is not working (Java) (mullan) Fixed bug 37708: Different behaviour with NodeSet and RootNode with InclusiveNamespaces (mullan) Fixed bug 37456: Signing throws an exception if custom resource resolver is registered (mullan) Fixed bug 38655 Fixed bug 38444. Fixed bug 38605. Fixed bug 39200(API CHANGE) Refactored the way keyresolver works instead of calling canResolve/resolveX only resolveX is used and if it returns null it means it cannot resolve. Minor Optimizations. Lazy fields initialization, initialize with null and create the object only when needed Registered Class reorder, in several parts the library contains a list of workers that are asked if it can solve a problem. Now the one that said yes is move to the front wishing that the next time it also hits. API Change: Make Transform & TransformSpi reusable between threads. remove setTransform(Transform t) method in TransformSpi and pass the Transform object in enginePerformTransfor methods. Fixed bug 39685: bugs reported by findbugs (mullan) Added support for SHA256 & SHA512 DigestMethods to JSR 105. (mullan) Fix JSR 105 unmarshaling bug: now recognizes PGPData. (mullan) Optimization to not create instances of Signature or MessageDigest objects, but mantain one for thread. Also don't change the key if it was already used. (raul) New in v1.3 Init-Don't fail if a transformation don't have all of its dependecies. Remove XPath initialization from Init and do only when xpath is needed. Resolv-Removed the use of xpath expressions to search the elements to sign/verify, now use only plain DOM searching. Resolvers-Remove wantsOctectStream wantsNodeSet and his returns pair they are not used, right now and some are incorrect. Remove the Use of xalan or xerces class URI Removed the expandSystemId Changed from Vector to List, so we don't need to use classForName everytime and used it just the first time. Removed PRNG,HexDump,Version, X509CertificateValidator Added an unsync buffer outputstream. Changed Symbol table to a more efficient and simple structure Fixed bug 34743 , Submitted by: Lee Coomber Minor speedups in b64, Halved the table lookups. Reduce Object creation during c14n, from one to level to one per c14n. Change all Vector to List(ArrayList), we don't need synchronization safety. *Refactor the way we handle c14n of nodesets: Before this patch every transformation creates a set with the nodes that should be outputed. Every set is obtaining visiting the whole dom tree every time, and then do it other time at c14n time. So it does +1 visitings, very slow and memory costly. Now every transformation just return a NodeFilter that tells if the node is included or not. So only one visiting is done. Unified http://www.w3.org/2002/06/xmldsig-filter2 and http://www.w3.org/2002/04/xmldsig-filter2 transformation implementations. Removed http://www.nue.et-inf.uni-siegen.de/~geuer-pollmann/#xpathFilter transformation Canonicalization tree travesing is not recursive. it gives better memory handling and performance. Fixed bug 33936, Submited by: Raymond Wong Fixed bug 35919, Submited by: Luda out of the box j2se 1.5 ready(no adding xalan in the classpath or endorsed if no xpath transformation is needed) New in v1.2.1 * Fix the memory leak when using xpath or using ResourceResolver and not hitting getElementByIdUsingDOM() [http://issues.apache.org/bugzilla/show_bug.cgi?id=32836] * Fix the bug with using XPath2Filter and inclusive c14n * Fix the bug arrouse in reusing Canonicalizers * Fix base64transformation bug [http://issues.apache.org/bugzilla/show_bug.cgi?id=33393 ] * Fix the XMLsignatureInput reset() bug. * Clean unused jar (xmlParserAPI.jar,etc) and check and stored new versions. * generated the dist jar with version (i.e. xmlsec-1.2.1.jar instead of plain xmlsec.jar) * Clean unused build*.xml files. ############################################################################## # New in v1.0.3 24. May 2002 ############################################################################## IMPORTANT: - The different classes do not call Init.init() any longer. This must be done by YOU in your application. If you miss that, you'll get many AlgorithmNotRegistered exceptions... -------------------------------- Summary: - The software is faster. Especially canonicalization is between factor 5--80 faster than the old one. - Some deprecated methods in the Canonicalizer are deleted. - We support Exclusive Canonicalization - We support the XPath Filter version 2.0 Draft. -------------------------------- Optimizations and speed-up - canonicalization - inclusive c14n is now faster (factor between 5 and 80) - transforms - enveloped-signature is now faster (no XPath ops any more) - base64 is now faster (no XPath ops any more) - c14n is now faster (due to faster c14n algo) -------------------------------- Signature package: - The XMLSignatureInput which is used for passing node sets and octet streams into transforms and which is also the result of transforms uses a java.util.Set now instead of a NodeList for the internal representation of xpath node sets. This allows easier queries in the form: Is node N part of the node set. The implication is that you can also pass a Set which contains the nodes to be canonicalized to the Canonicalizers using public byte[] canonicalizeXPathNodeSet(Set xpathNodeSet) -------------------------------- Canonicalizer: - A bug (well, my understanding of c14n) is corrected regarding the canonicalization of node sets. That bug related to the xml:* attributes. See xmldsig mailing list archive @ w3.org for details. - removed are the methods - public byte[] canonicalize(Node node) - public byte[] canonicalizeDocument(Document doc) - public byte[] canonicalizeSingleNode(Node rootNode) replaced by public byte[] canonicalizeSubtree(Node node) - public byte[] canonicalize(NodeList xpathNodeSet) replaced by public byte[] canonicalizeXPathNodeSet(NodeList xpathNodeSet) - public void setXPath(Object xpath) - public Object getXPath() - public String getXPathString() - public void setXPathNodeSet(NodeList nodeList) These are no longer in use. If you want to c14nize an xpath node set, select it using CachedXPathAPI and then apply canonicalizeXPathNodeSet to the node set. - public void setRemoveNSAttrs(boolean remove) - public boolean getRemoveNSAttrs() The c14nizers do not add any attributes (namespaces or xml:*) to the document, so these method make no sense. - The Canonicalizer now supports "Exclusive XML Canonicalization Version 1.0" , Rev 1.58. For that reason, the c14n methods allow an additional String parameter for passing the inclusive namespaces. public byte[] canonicalizeSubtree(Node node, String inclusiveNamespaces) public byte[] canonicalizeXPathNodeSet(NodeList xpathNodeSet, String inclusiveNamespaces) Such a string looks e.g. like this String inclusiveNamespaces = "ds xenc ex #default"; For more on exclusive c14n, see the spec. If you pass this parameter to the regular (inclusive) c14nizer, you'll get a CanonicalizationException("c14n.Canonicalizer.UnsupportedOperation") -------------------------------- Transforms: - The exclusive c14n is also supported by the transform framework. The parameter for the inclusive namespaces is the class org.apache.xml.security.transforms.params.InclusiveNamespaces If you want to make a Transform like this, do that: Document doc = ...; Transforms transforms = new Transforms(doc); InclusiveNamespaces incNS = new InclusiveNamespaces(doc, "ns2"); transforms.addTransform(Transforms.TRANSFORM_C14N_EXCL_OMIT_COMMENTS, incNS.getElement()); - The XPathContainer for the XPath transform is now moved from the org.apache.xml.security.c14n.helper package to org.apache.xml.security.transforms.params.XPathContainer - The enveloped-signature transform is faster now. We don't do costly XPath operations but 'simple' DOM ops. - Base64 is faster (no XPath ops). - The TransformXPath2Filter is now supported by the package. It can be used by using the identifier Transforms.TRANSFORM_XPATH2FILTER in conjuction with the XPath2FilterContainer for passing parameters. To know what xfilter2 is, see http://www.w3.org/Signature/Drafts/xmldsig-xfilter2/ : Document doc = ...; Transforms transforms = new Transforms(doc); XPath2FilterContainer x2c = // intersect XPath2FilterContainer.newInstanceIntersect(doc, "//a"); // subtract XPath2FilterContainer.newInstanceSubtract(doc, "//a"); // union XPath2FilterContainer.newInstanceUnion(doc, "//a"); transforms.addTransform(Transforms.TRANSFORM_XPATH2FILTER, x2c.getElement()); -------------------------------- libxml-security-java-1.5.6/NOTICE0000644000175000017500000000071711551074155015257 0ustar tonytonyApache Santuario - XML Security for Java Copyright 1999-2011 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). It was originally based on software copyright (c) 2001, Institute for Data Communications Systems, . The development of this software was partly funded by the European Commission in the project in the ISIS Programme. libxml-security-java-1.5.6/samples/0000755000175000017500000000000012273503736016016 5ustar tonytonylibxml-security-java-1.5.6/samples/data/0000755000175000017500000000000012273503736016727 5ustar tonytonylibxml-security-java-1.5.6/samples/data/org/0000755000175000017500000000000012273503736017516 5ustar tonytonylibxml-security-java-1.5.6/samples/data/org/w3c/0000755000175000017500000000000012273503736020212 5ustar tonytonylibxml-security-java-1.5.6/samples/data/org/w3c/www/0000755000175000017500000000000012273503736021036 5ustar tonytonylibxml-security-java-1.5.6/samples/data/org/w3c/www/TR/0000755000175000017500000000000012273503736021363 5ustar tonytonylibxml-security-java-1.5.6/samples/data/org/w3c/www/TR/xml-stylesheet.html0000644000175000017500000003151407356024141025236 0ustar tonytony Associating Style Sheets with XML documents
W3C

Associating Style Sheets with XML documents
Version 1.0

W3C Recommendation 29 June 1999

This version:
http://www.w3.org/1999/06/REC-xml-stylesheet-19990629
Latest version:
http://www.w3.org/TR/xml-stylesheet
Previous version:
http://www.w3.org/TR/1999/xml-stylesheet-19990428
Editor:
James Clark <jjc@jclark.com>

Abstract

This document allows a style sheet to be associated with an XML document by including one or more processing instructions with a target of xml-stylesheet in the document's prolog.

Status of this document

This document has been reviewed by W3C Members and other interested parties and has been endorsed by the Director as a W3C Recommendation. It is a stable document and may be used as reference material or cited as a normative reference from other documents. W3C's role in making the Recommendation is to draw attention to the specification and to promote its widespread deployment. This enhances the functionality and interoperability of the Web.

The list of known errors in this specifications is available at http://www.w3.org/TR/1999/xml-stylesheet-19990629/errata.

Comments on this specification may be sent to <www-xml-stylesheet-comments@w3.org>. The archive of public comments is available at http://w3.org/Archives/Public/www-xml-stylesheet-comments.

A list of current W3C Recommendations and other technical documents can be found at http://www.w3.org/TR.

The Working Group expects additional mechanisms for linking style sheets to XML document to be defined in a future specification.

The use of XML processing instructions in this specification should not be taken as a precedent. The W3C does not anticipate recommending the use of processing instructions in any future specification. The Rationale explains why they were used in this specification.

This document was produced as part of the W3C XML Activity.

Table of contents

1 The xml-stylesheet processing instruction

Appendices

A References
B Rationale

1 The xml-stylesheet processing instruction

Style Sheets can be associated with an XML[XML10] document by using a processing instruction whose target is xml-stylesheet. This processing instruction follows the behaviour of the HTML 4.0 <LINK REL="stylesheet">[HTML40].

The xml-stylesheet processing instruction is parsed in the same way as a start-tag, with the exception that entities other than predefined entities must not be referenced.

The following grammar is given using the same notation as the grammar in the XML Recommendation[XML10]. Symbols in the grammar that are not defined here are defined in the XML Recommendation.

xml-stylesheet processing instruction
[1]    StyleSheetPI    ::=    '<?xml-stylesheet' (S PseudoAtt)* S? '?>'
[2]    PseudoAtt    ::=    Name S? '=' S? PseudoAttValue
[3]    PseudoAttValue    ::=    ('"' ([^"<&] | CharRef | PredefEntityRef)* '"'
| "'" ([^'<&] | CharRef | PredefEntityRef)* "'")
- (Char* '?>' Char*)
[4]    PredefEntityRef    ::=    '&amp;' | '&lt;' | '&gt;' | '&quot;' | '&apos;'

In PseudoAttValue, a CharRef or a PredefEntityRef is interpreted in the same manner as in a normal XML attribute value. The actual value of the pseudo-attribute is the value after each reference is replaced by the character it references. This replacement is not performed automatically by an XML processor.

The xml-stylesheet processing instruction is allowed only in the prolog of an XML document. The syntax of XML constrains where processing instructions are allowed in the prolog; the xml-stylesheet processing instruction is allowed anywhere in the prolog that meets these constraints.

NOTE: If the xml-stylesheet processing instruction occurs in the external DTD subset or in a parameter entity, it is possible that it may not be processed by a non-validating XML processor (see [XML10]).

The following pseudo attributes are defined

href CDATA #REQUIRED
type CDATA #REQUIRED
title CDATA #IMPLIED
media CDATA #IMPLIED
charset CDATA #IMPLIED
alternate (yes|no) "no"

The semantics of the pseudo-attributes are exactly as with <LINK REL="stylesheet"> in HTML 4.0, with the exception of the alternate pseudo-attribute. If alternate="yes" is specified, then the processing instruction has the semantics of <LINK REL="alternate stylesheet"> instead of <LINK REL="stylesheet">.

NOTE: Since the value of the href attribute is a URI reference, it may be a relative URI and it may contain a fragment identifier. In particular the URI reference may contain only a fragment identifier. Such a URI reference is a reference to a part of the document containing the xml-stylesheet processing instruction (see [RFC2396]). The consequence is that the xml-stylesheet processing instruction allows style sheets to be embedded in the same document as the xml-stylesheet processing instruction.

In some cases, style sheets may be linked with an XML document by means external to the document. For example, earlier versions of HTTP [RFC2068] (section 19.6.2.4) allowed style sheets to be associated with XML documents by means of the Link header. Any links to style sheets that are specified externally to the document are considered to occur before the links specified by the xml-stylesheet processing instructions. This is the same as in HTML 4.0 (see section 14.6).

Here are some examples from HTML 4.0 with the corresponding processing instruction:

<LINK href="mystyle.css" rel="style sheet" type="text/css">
<?xml-stylesheet href="mystyle.css" type="text/css"?>

<LINK href="mystyle.css" title="Compact" rel="stylesheet"
type="text/css">
<?xml-stylesheet href="mystyle.css" title="Compact" type="text/css"?>

<LINK href="mystyle.css" title="Medium" rel="alternate stylesheet"
type="text/css">
<?xml-stylesheet alternate="yes" href="mystyle.css" title="Medium"
type="text/css"?>

Multiple xml-stylesheet processing instructions are also allowed with exactly the same semantics as with LINK REL="stylesheet". For example,

<LINK rel="alternate stylesheet" title="compact" href="small-base.css"
type="text/css">
<LINK rel="alternate stylesheet" title="compact" href="small-extras.css"
type="text/css">
<LINK rel="alternate stylesheet" title="big print" href="bigprint.css"
type="text/css">
<LINK rel="stylesheet" href="common.css" type="text/css">

would be equivalent to:

<?xml-stylesheet alternate="yes" title="compact" href="small-base.css"
type="text/css"?>
<?xml-stylesheet alternate="yes" title="compact" href="small-extras.css"
type="text/css"?>
<?xml-stylesheet alternate="yes" title="big print" href="bigprint.css"
type="text/css"?>
<?xml-stylesheet href="common.css" type="text/css"?>

A References

HTML40
World Wide Web Consortium. HTML 4.0 Specification. W3C Recommendation. See http://www.w3.org/TR/REC-html40
RFC2068
R. Fielding, J. Gettys, J. Mogul, H. Frystyk Nielsen, and T. Berners-Lee. Hypertext Transfer Protocol -- HTTP/1.1.. IETF RFC 2068. See http://www.ietf.org/rfc/rfc2068.txt.
RFC2396
T. Berners-Lee, R. Fielding, and L. Masinter. Uniform Resource Identifiers (URI): Generic Syntax. IETF RFC 2396. See http://www.ietf.org/rfc/rfc2396.txt.
XML10
World Wide Web Consortium. Extensible Markup Language (XML) 1.0. W3C Recommendation. See http://www.w3.org/TR/1998/REC-xml-19980210

B Rationale

There was an urgent requirement for a specification for style sheet linking that could be completed in time for the next release from major browser vendors. Only by choosing a simple mechanism closely based on a proven existing mechanism could the specification be completed in time to meet this requirement.

Use of a processing instruction avoids polluting the main document structure with application specific processing information.

The mechanism chosen for this version of the specification is not a constraint on the additional mechanisms planned for future versions. There is no expectation that these will use processing instructions; indeed they may not include the linking information in the source document.

libxml-security-java-1.5.6/samples/data/org/w3c/www/TR/2000/0000755000175000017500000000000012273503736021744 5ustar tonytonylibxml-security-java-1.5.6/samples/data/org/w3c/www/TR/2000/REC-xml-200010060000644000175000017500000057732407402650471024003 0ustar tonytony Extensible Markup Language (XML) 1.0 (Second Edition)

W3C

Extensible Markup Language (XML) 1.0 (Second Edition)

W3C Recommendation 6 October 2000

This version:
http://www.w3.org/TR/2000/REC-xml-20001006 (XHTML, XML, PDF, XHTML review version with color-coded revision indicators)
Latest version:
http://www.w3.org/TR/REC-xml
Previous versions:
http://www.w3.org/TR/2000/WD-xml-2e-20000814
http://www.w3.org/TR/1998/REC-xml-19980210
Editors:
Tim Bray, Textuality and Netscape <tbray@textuality.com>
Jean Paoli, Microsoft <jeanpa@microsoft.com>
C. M. Sperberg-McQueen, University of Illinois at Chicago and Text Encoding Initiative <cmsmcq@uic.edu>
Eve Maler, Sun Microsystems, Inc. <eve.maler@east.sun.com> - Second Edition

Abstract

The Extensible Markup Language (XML) is a subset of SGML that is completely described in this document. Its goal is to enable generic SGML to be served, received, and processed on the Web in the way that is now possible with HTML. XML has been designed for ease of implementation and for interoperability with both SGML and HTML.

Status of this Document

This document has been reviewed by W3C Members and other interested parties and has been endorsed by the Director as a W3C Recommendation. It is a stable document and may be used as reference material or cited as a normative reference from another document. W3C's role in making the Recommendation is to draw attention to the specification and to promote its widespread deployment. This enhances the functionality and interoperability of the Web.

This document specifies a syntax created by subsetting an existing, widely used international text processing standard (Standard Generalized Markup Language, ISO 8879:1986(E) as amended and corrected) for use on the World Wide Web. It is a product of the W3C XML Activity, details of which can be found at http://www.w3.org/XML. The English version of this specification is the only normative version. However, for translations of this document, see http://www.w3.org/XML/#trans. A list of current W3C Recommendations and other technical documents can be found at http://www.w3.org/TR.

This second edition is not a new version of XML (first published 10 February 1998); it merely incorporates the changes dictated by the first-edition errata (available at http://www.w3.org/XML/xml-19980210-errata) as a convenience to readers. The errata list for this second edition is available at http://www.w3.org/XML/xml-V10-2e-errata.

Please report errors in this document to xml-editor@w3.org; archives are available.

Note:

C. M. Sperberg-McQueen's affiliation has changed since the publication of the first edition. He is now at the World Wide Web Consortium, and can be contacted at cmsmcq@w3.org.

Table of Contents

1 Introduction
    1.1 Origin and Goals
    1.2 Terminology
2 Documents
    2.1 Well-Formed XML Documents
    2.2 Characters
    2.3 Common Syntactic Constructs
    2.4 Character Data and Markup
    2.5 Comments
    2.6 Processing Instructions
    2.7 CDATA Sections
    2.8 Prolog and Document Type Declaration
    2.9 Standalone Document Declaration
    2.10 White Space Handling
    2.11 End-of-Line Handling
    2.12 Language Identification
3 Logical Structures
    3.1 Start-Tags, End-Tags, and Empty-Element Tags
    3.2 Element Type Declarations
        3.2.1 Element Content
        3.2.2 Mixed Content
    3.3 Attribute-List Declarations
        3.3.1 Attribute Types
        3.3.2 Attribute Defaults
        3.3.3 Attribute-Value Normalization
    3.4 Conditional Sections
4 Physical Structures
    4.1 Character and Entity References
    4.2 Entity Declarations
        4.2.1 Internal Entities
        4.2.2 External Entities
    4.3 Parsed Entities
        4.3.1 The Text Declaration
        4.3.2 Well-Formed Parsed Entities
        4.3.3 Character Encoding in Entities
    4.4 XML Processor Treatment of Entities and References
        4.4.1 Not Recognized
        4.4.2 Included
        4.4.3 Included If Validating
        4.4.4 Forbidden
        4.4.5 Included in Literal
        4.4.6 Notify
        4.4.7 Bypassed
        4.4.8 Included as PE
    4.5 Construction of Internal Entity Replacement Text
    4.6 Predefined Entities
    4.7 Notation Declarations
    4.8 Document Entity
5 Conformance
    5.1 Validating and Non-Validating Processors
    5.2 Using XML Processors
6 Notation

Appendices

A References
    A.1 Normative References
    A.2 Other References
B Character Classes
C XML and SGML (Non-Normative)
D Expansion of Entity and Character References (Non-Normative)
E Deterministic Content Models (Non-Normative)
F Autodetection of Character Encodings (Non-Normative)
    F.1 Detection Without External Encoding Information
    F.2 Priorities in the Presence of External Encoding Information
G W3C XML Working Group (Non-Normative)
H W3C XML Core Group (Non-Normative)
I Production Notes (Non-Normative)


1 Introduction

Extensible Markup Language, abbreviated XML, describes a class of data objects called XML documents and partially describes the behavior of computer programs which process them. XML is an application profile or restricted form of SGML, the Standard Generalized Markup Language [ISO 8879]. By construction, XML documents are conforming SGML documents.

XML documents are made up of storage units called entities, which contain either parsed or unparsed data. Parsed data is made up of characters, some of which form character data, and some of which form markup. Markup encodes a description of the document's storage layout and logical structure. XML provides a mechanism to impose constraints on the storage layout and logical structure.

[Definition: A software module called an XML processor is used to read XML documents and provide access to their content and structure.] [Definition: It is assumed that an XML processor is doing its work on behalf of another module, called the application.] This specification describes the required behavior of an XML processor in terms of how it must read XML data and the information it must provide to the application.

1.1 Origin and Goals

XML was developed by an XML Working Group (originally known as the SGML Editorial Review Board) formed under the auspices of the World Wide Web Consortium (W3C) in 1996. It was chaired by Jon Bosak of Sun Microsystems with the active participation of an XML Special Interest Group (previously known as the SGML Working Group) also organized by the W3C. The membership of the XML Working Group is given in an appendix. Dan Connolly served as the WG's contact with the W3C.

The design goals for XML are:

  1. XML shall be straightforwardly usable over the Internet.

  2. XML shall support a wide variety of applications.

  3. XML shall be compatible with SGML.

  4. It shall be easy to write programs which process XML documents.

  5. The number of optional features in XML is to be kept to the absolute minimum, ideally zero.

  6. XML documents should be human-legible and reasonably clear.

  7. The XML design should be prepared quickly.

  8. The design of XML shall be formal and concise.

  9. XML documents shall be easy to create.

  10. Terseness in XML markup is of minimal importance.

This specification, together with associated standards (Unicode and ISO/IEC 10646 for characters, Internet RFC 1766 for language identification tags, ISO 639 for language name codes, and ISO 3166 for country name codes), provides all the information necessary to understand XML Version 1.0 and construct computer programs to process it.

This version of the XML specification may be distributed freely, as long as all text and legal notices remain intact.

1.2 Terminology

The terminology used to describe XML documents is defined in the body of this specification. The terms defined in the following list are used in building those definitions and in describing the actions of an XML processor:

may

[Definition: Conforming documents and XML processors are permitted to but need not behave as described.]

must

[Definition: Conforming documents and XML processors are required to behave as described; otherwise they are in error. ]

error

[Definition: A violation of the rules of this specification; results are undefined. Conforming software may detect and report an error and may recover from it.]

fatal error

[Definition: An error which a conforming XML processor must detect and report to the application. After encountering a fatal error, the processor may continue processing the data to search for further errors and may report such errors to the application. In order to support correction of errors, the processor may make unprocessed data from the document (with intermingled character data and markup) available to the application. Once a fatal error is detected, however, the processor must not continue normal processing (i.e., it must not continue to pass character data and information about the document's logical structure to the application in the normal way).]

at user option

[Definition: Conforming software may or must (depending on the modal verb in the sentence) behave as described; if it does, it must provide users a means to enable or disable the behavior described.]

validity constraint

[Definition: A rule which applies to all valid XML documents. Violations of validity constraints are errors; they must, at user option, be reported by validating XML processors.]

well-formedness constraint

[Definition: A rule which applies to all well-formed XML documents. Violations of well-formedness constraints are fatal errors.]

match

[Definition: (Of strings or names:) Two strings or names being compared must be identical. Characters with multiple possible representations in ISO/IEC 10646 (e.g. characters with both precomposed and base+diacritic forms) match only if they have the same representation in both strings. No case folding is performed. (Of strings and rules in the grammar:) A string matches a grammatical production if it belongs to the language generated by that production. (Of content and content models:) An element matches its declaration when it conforms in the fashion described in the constraint [VC: Element Valid].]

for compatibility

[Definition: Marks a sentence describing a feature of XML included solely to ensure that XML remains compatible with SGML.]

for interoperability

[Definition: Marks a sentence describing a non-binding recommendation included to increase the chances that XML documents can be processed by the existing installed base of SGML processors which predate the WebSGML Adaptations Annex to ISO 8879.]

2 Documents

[Definition: A data object is an XML document if it is well-formed, as defined in this specification. A well-formed XML document may in addition be valid if it meets certain further constraints.]

Each XML document has both a logical and a physical structure. Physically, the document is composed of units called entities. An entity may refer to other entities to cause their inclusion in the document. A document begins in a "root" or document entity. Logically, the document is composed of declarations, elements, comments, character references, and processing instructions, all of which are indicated in the document by explicit markup. The logical and physical structures must nest properly, as described in 4.3.2 Well-Formed Parsed Entities.

2.1 Well-Formed XML Documents

[Definition: A textual object is a well-formed XML document if:]

  1. Taken as a whole, it matches the production labeled document.

  2. It meets all the well-formedness constraints given in this specification.

  3. Each of the parsed entities which is referenced directly or indirectly within the document is well-formed.

Document
[1]    document    ::=    prolog element Misc*

Matching the document production implies that:

  1. It contains one or more elements.

  2. [Definition: There is exactly one element, called the root, or document element, no part of which appears in the content of any other element.] For all other elements, if the start-tag is in the content of another element, the end-tag is in the content of the same element. More simply stated, the elements, delimited by start- and end-tags, nest properly within each other.

[Definition: As a consequence of this, for each non-root element C in the document, there is one other element P in the document such that C is in the content of P, but is not in the content of any other element that is in the content of P. P is referred to as the parent of C, and C as a child of P.]

2.2 Characters

[Definition: A parsed entity contains text, a sequence of characters, which may represent markup or character data.] [Definition: A character is an atomic unit of text as specified by ISO/IEC 10646 [ISO/IEC 10646] (see also [ISO/IEC 10646-2000]). Legal characters are tab, carriage return, line feed, and the legal characters of Unicode and ISO/IEC 10646. The versions of these standards cited in A.1 Normative References were current at the time this document was prepared. New characters may be added to these standards by amendments or new editions. Consequently, XML processors must accept any character in the range specified for Char. The use of "compatibility characters", as defined in section 6.8 of [Unicode] (see also D21 in section 3.6 of [Unicode3]), is discouraged.]

Character Range
[2]    Char    ::=    #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] /* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */

The mechanism for encoding character code points into bit patterns may vary from entity to entity. All XML processors must accept the UTF-8 and UTF-16 encodings of 10646; the mechanisms for signaling which of the two is in use, or for bringing other encodings into play, are discussed later, in 4.3.3 Character Encoding in Entities.

2.3 Common Syntactic Constructs

This section defines some symbols used widely in the grammar.

S (white space) consists of one or more space (#x20) characters, carriage returns, line feeds, or tabs.

White Space
[3]    S    ::=    (#x20 | #x9 | #xD | #xA)+

Characters are classified for convenience as letters, digits, or other characters. A letter consists of an alphabetic or syllabic base character or an ideographic character. Full definitions of the specific characters in each class are given in B Character Classes.

[Definition: A Name is a token beginning with a letter or one of a few punctuation characters, and continuing with letters, digits, hyphens, underscores, colons, or full stops, together known as name characters.] Names beginning with the string "xml", or any string which would match (('X'|'x') ('M'|'m') ('L'|'l')), are reserved for standardization in this or future versions of this specification.

Note:

The Namespaces in XML Recommendation [XML Names] assigns a meaning to names containing colon characters. Therefore, authors should not use the colon in XML names except for namespace purposes, but XML processors must accept the colon as a name character.

An Nmtoken (name token) is any mixture of name characters.

Names and Tokens
[4]    NameChar    ::=    Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender
[5]    Name    ::=    (Letter | '_' | ':') (NameChar)*
[6]    Names    ::=    Name (S Name)*
[7]    Nmtoken    ::=    (NameChar)+
[8]    Nmtokens    ::=    Nmtoken (S Nmtoken)*

Literal data is any quoted string not containing the quotation mark used as a delimiter for that string. Literals are used for specifying the content of internal entities (EntityValue), the values of attributes (AttValue), and external identifiers (SystemLiteral). Note that a SystemLiteral can be parsed without scanning for markup.

Literals
[9]    EntityValue    ::=    '"' ([^%&"] | PEReference | Reference)* '"'
|  "'" ([^%&'] | PEReference | Reference)* "'"
[10]    AttValue    ::=    '"' ([^<&"] | Reference)* '"'
|  "'" ([^<&'] | Reference)* "'"
[11]    SystemLiteral    ::=    ('"' [^"]* '"') | ("'" [^']* "'")
[12]    PubidLiteral    ::=    '"' PubidChar* '"' | "'" (PubidChar - "'")* "'"
[13]    PubidChar    ::=    #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]

Note:

Although the EntityValue production allows the definition of an entity consisting of a single explicit < in the literal (e.g., <!ENTITY mylt "<">), it is strongly advised to avoid this practice since any reference to that entity will cause a well-formedness error.

2.4 Character Data and Markup

Text consists of intermingled character data and markup. [Definition: Markup takes the form of start-tags, end-tags, empty-element tags, entity references, character references, comments, CDATA section delimiters, document type declarations, processing instructions, XML declarations, text declarations, and any white space that is at the top level of the document entity (that is, outside the document element and not inside any other markup).]

[Definition: All text that is not markup constitutes the character data of the document.]

The ampersand character (&) and the left angle bracket (<) may appear in their literal form only when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section. If they are needed elsewhere, they must be escaped using either numeric character references or the strings "&amp;" and "&lt;" respectively. The right angle bracket (>) may be represented using the string "&gt;", and must, for compatibility, be escaped using "&gt;" or a character reference when it appears in the string "]]>" in content, when that string is not marking the end of a CDATA section.

In the content of elements, character data is any string of characters which does not contain the start-delimiter of any markup. In a CDATA section, character data is any string of characters not including the CDATA-section-close delimiter, "]]>".

To allow attribute values to contain both single and double quotes, the apostrophe or single-quote character (') may be represented as "&apos;", and the double-quote character (") as "&quot;".

Character Data
[14]    CharData    ::=    [^<&]* - ([^<&]* ']]>' [^<&]*)

2.5 Comments

[Definition: Comments may appear anywhere in a document outside other markup; in addition, they may appear within the document type declaration at places allowed by the grammar. They are not part of the document's character data; an XML processor may, but need not, make it possible for an application to retrieve the text of comments. For compatibility, the string "--" (double-hyphen) must not occur within comments.] Parameter entity references are not recognized within comments.

Comments
[15]    Comment    ::=    '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'

An example of a comment:

<!-- declarations for <head> & <body> -->

Note that the grammar does not allow a comment ending in --->. The following example is not well-formed.

<!-- B+, B, or B--->

2.6 Processing Instructions

[Definition: Processing instructions (PIs) allow documents to contain instructions for applications.]

Processing Instructions
[16]    PI    ::=    '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
[17]    PITarget    ::=    Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))

PIs are not part of the document's character data, but must be passed through to the application. The PI begins with a target (PITarget) used to identify the application to which the instruction is directed. The target names "XML", "xml", and so on are reserved for standardization in this or future versions of this specification. The XML Notation mechanism may be used for formal declaration of PI targets. Parameter entity references are not recognized within processing instructions.

2.7 CDATA Sections

[Definition: CDATA sections may occur anywhere character data may occur; they are used to escape blocks of text containing characters which would otherwise be recognized as markup. CDATA sections begin with the string "<![CDATA[" and end with the string "]]>":]

CDATA Sections
[18]    CDSect    ::=    CDStart CData CDEnd
[19]    CDStart    ::=    '<![CDATA['
[20]    CData    ::=    (Char* - (Char* ']]>' Char*))
[21]    CDEnd    ::=    ']]>'

Within a CDATA section, only the CDEnd string is recognized as markup, so that left angle brackets and ampersands may occur in their literal form; they need not (and cannot) be escaped using "&lt;" and "&amp;". CDATA sections cannot nest.

An example of a CDATA section, in which "<greeting>" and "</greeting>" are recognized as character data, not markup:

<![CDATA[<greeting>Hello, world!</greeting>]]> 

2.8 Prolog and Document Type Declaration

[Definition: XML documents should begin with an XML declaration which specifies the version of XML being used.] For example, the following is a complete XML document, well-formed but not valid:

<?xml version="1.0"?> <greeting>Hello, world!</greeting> 

and so is this:

<greeting>Hello, world!</greeting>

The version number "1.0" should be used to indicate conformance to this version of this specification; it is an error for a document to use the value "1.0" if it does not conform to this version of this specification. It is the intent of the XML working group to give later versions of this specification numbers other than "1.0", but this intent does not indicate a commitment to produce any future versions of XML, nor if any are produced, to use any particular numbering scheme. Since future versions are not ruled out, this construct is provided as a means to allow the possibility of automatic version recognition, should it become necessary. Processors may signal an error if they receive documents labeled with versions they do not support.

The function of the markup in an XML document is to describe its storage and logical structure and to associate attribute-value pairs with its logical structures. XML provides a mechanism, the document type declaration, to define constraints on the logical structure and to support the use of predefined storage units. [Definition: An XML document is valid if it has an associated document type declaration and if the document complies with the constraints expressed in it.]

The document type declaration must appear before the first element in the document.

Prolog
[22]    prolog    ::=    XMLDecl? Misc* (doctypedecl Misc*)?
[23]    XMLDecl    ::=    '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'
[24]    VersionInfo    ::=    S 'version' Eq ("'" VersionNum "'" | '"' VersionNum '"')/* */
[25]    Eq    ::=    S? '=' S?
[26]    VersionNum    ::=    ([a-zA-Z0-9_.:] | '-')+
[27]    Misc    ::=    Comment | PI | S

[Definition: The XML document type declaration contains or points to markup declarations that provide a grammar for a class of documents. This grammar is known as a document type definition, or DTD. The document type declaration can point to an external subset (a special kind of external entity) containing markup declarations, or can contain the markup declarations directly in an internal subset, or can do both. The DTD for a document consists of both subsets taken together.]

[Definition: A markup declaration is an element type declaration, an attribute-list declaration, an entity declaration, or a notation declaration.] These declarations may be contained in whole or in part within parameter entities, as described in the well-formedness and validity constraints below. For further information, see 4 Physical Structures.

Document Type Definition
[28]    doctypedecl    ::=    '<!DOCTYPE' S Name (S ExternalID)? S? ('[' (markupdecl | DeclSep)* ']' S?)? '>' [VC: Root Element Type]
[WFC: External Subset]
/* */
[28a]    DeclSep    ::=    PEReference | S [WFC: PE Between Declarations]
/* */
[29]    markupdecl    ::=    elementdecl | AttlistDecl | EntityDecl | NotationDecl | PI | Comment [VC: Proper Declaration/PE Nesting]
[WFC: PEs in Internal Subset]

Note that it is possible to construct a well-formed document containing a doctypedecl that neither points to an external subset nor contains an internal subset.

The markup declarations may be made up in whole or in part of the replacement text of parameter entities. The productions later in this specification for individual nonterminals (elementdecl, AttlistDecl, and so on) describe the declarations after all the parameter entities have been included.

Parameter entity references are recognized anywhere in the DTD (internal and external subsets and external parameter entities), except in literals, processing instructions, comments, and the contents of ignored conditional sections (see 3.4 Conditional Sections). They are also recognized in entity value literals. The use of parameter entities in the internal subset is restricted as described below.

Validity constraint: Root Element Type

The Name in the document type declaration must match the element type of the root element.

Validity constraint: Proper Declaration/PE Nesting

Parameter-entity replacement text must be properly nested with markup declarations. That is to say, if either the first character or the last character of a markup declaration (markupdecl above) is contained in the replacement text for a parameter-entity reference, both must be contained in the same replacement text.

Well-formedness constraint: PEs in Internal Subset

In the internal DTD subset, parameter-entity references can occur only where markup declarations can occur, not within markup declarations. (This does not apply to references that occur in external parameter entities or to the external subset.)

Well-formedness constraint: External Subset

The external subset, if any, must match the production for extSubset.

Well-formedness constraint: PE Between Declarations

The replacement text of a parameter entity reference in a DeclSep must match the production extSubsetDecl.

Like the internal subset, the external subset and any external parameter entities referenced in a DeclSep must consist of a series of complete markup declarations of the types allowed by the non-terminal symbol markupdecl, interspersed with white space or parameter-entity references. However, portions of the contents of the external subset or of these external parameter entities may conditionally be ignored by using the conditional section construct; this is not allowed in the internal subset.

External Subset
[30]    extSubset    ::=    TextDecl? extSubsetDecl
[31]    extSubsetDecl    ::=    ( markupdecl | conditionalSect | DeclSep)* /* */

The external subset and external parameter entities also differ from the internal subset in that in them, parameter-entity references are permitted within markup declarations, not only between markup declarations.

An example of an XML document with a document type declaration:

<?xml version="1.0"?> <!DOCTYPE greeting SYSTEM "hello.dtd"> <greeting>Hello, world!</greeting> 

The system identifier "hello.dtd" gives the address (a URI reference) of a DTD for the document.

The declarations can also be given locally, as in this example:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE greeting [
  <!ELEMENT greeting (#PCDATA)>
]>
<greeting>Hello, world!</greeting>

If both the external and internal subsets are used, the internal subset is considered to occur before the external subset. This has the effect that entity and attribute-list declarations in the internal subset take precedence over those in the external subset.

2.9 Standalone Document Declaration

Markup declarations can affect the content of the document, as passed from an XML processor to an application; examples are attribute defaults and entity declarations. The standalone document declaration, which may appear as a component of the XML declaration, signals whether or not there are such declarations which appear external to the document entity or in parameter entities. [Definition: An external markup declaration is defined as a markup declaration occurring in the external subset or in a parameter entity (external or internal, the latter being included because non-validating processors are not required to read them).]

Standalone Document Declaration
[32]    SDDecl    ::=    S 'standalone' Eq (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"')) [VC: Standalone Document Declaration]

In a standalone document declaration, the value "yes" indicates that there are no external markup declarations which affect the information passed from the XML processor to the application. The value "no" indicates that there are or may be such external markup declarations. Note that the standalone document declaration only denotes the presence of external declarations; the presence, in a document, of references to external entities, when those entities are internally declared, does not change its standalone status.

If there are no external markup declarations, the standalone document declaration has no meaning. If there are external markup declarations but there is no standalone document declaration, the value "no" is assumed.

Any XML document for which standalone="no" holds can be converted algorithmically to a standalone document, which may be desirable for some network delivery applications.

Validity constraint: Standalone Document Declaration

The standalone document declaration must have the value "no" if any external markup declarations contain declarations of:

  • attributes with default values, if elements to which these attributes apply appear in the document without specifications of values for these attributes, or

  • entities (other than amp, lt, gt, apos, quot), if references to those entities appear in the document, or

  • attributes with values subject to normalization, where the attribute appears in the document with a value which will change as a result of normalization, or

  • element types with element content, if white space occurs directly within any instance of those types.

An example XML declaration with a standalone document declaration:

<?xml version="1.0" standalone='yes'?>

2.10 White Space Handling

In editing XML documents, it is often convenient to use "white space" (spaces, tabs, and blank lines) to set apart the markup for greater readability. Such white space is typically not intended for inclusion in the delivered version of the document. On the other hand, "significant" white space that should be preserved in the delivered version is common, for example in poetry and source code.

An XML processor must always pass all characters in a document that are not markup through to the application. A validating XML processor must also inform the application which of these characters constitute white space appearing in element content.

A special attribute named xml:space may be attached to an element to signal an intention that in that element, white space should be preserved by applications. In valid documents, this attribute, like any other, must be declared if it is used. When declared, it must be given as an enumerated type whose values are one or both of "default" and "preserve". For example:

<!ATTLIST poem  xml:space (default|preserve) 'preserve'>

<!-- -->
<!ATTLIST pre xml:space (preserve) #FIXED 'preserve'>

The value "default" signals that applications' default white-space processing modes are acceptable for this element; the value "preserve" indicates the intent that applications preserve all the white space. This declared intent is considered to apply to all elements within the content of the element where it is specified, unless overriden with another instance of the xml:space attribute.

The root element of any document is considered to have signaled no intentions as regards application space handling, unless it provides a value for this attribute or the attribute is declared with a default value.

2.11 End-of-Line Handling

XML parsed entities are often stored in computer files which, for editing convenience, are organized into lines. These lines are typically separated by some combination of the characters carriage-return (#xD) and line-feed (#xA).

To simplify the tasks of applications, the characters passed to an application by the XML processor must be as if the XML processor normalized all line breaks in external parsed entities (including the document entity) on input, before parsing, by translating both the two-character sequence #xD #xA and any #xD that is not followed by #xA to a single #xA character.

2.12 Language Identification

In document processing, it is often useful to identify the natural or formal language in which the content is written. A special attribute named xml:lang may be inserted in documents to specify the language used in the contents and attribute values of any element in an XML document. In valid documents, this attribute, like any other, must be declared if it is used. The values of the attribute are language identifiers as defined by [IETF RFC 1766], Tags for the Identification of Languages, or its successor on the IETF Standards Track.

Note:

[IETF RFC 1766] tags are constructed from two-letter language codes as defined by [ISO 639], from two-letter country codes as defined by [ISO 3166], or from language identifiers registered with the Internet Assigned Numbers Authority [IANA-LANGCODES]. It is expected that the successor to [IETF RFC 1766] will introduce three-letter language codes for languages not presently covered by [ISO 639].

(Productions 33 through 38 have been removed.)

For example:

<p xml:lang="en">The quick brown fox jumps over the lazy dog.</p>
<p xml:lang="en-GB">What colour is it?</p>
<p xml:lang="en-US">What color is it?</p>
<sp who="Faust" desc='leise' xml:lang="de">
  <l>Habe nun, ach! Philosophie,</l>
  <l>Juristerei, und Medizin</l>
  <l>und leider auch Theologie</l>
  <l>durchaus studiert mit heißem Bemüh'n.</l>
</sp>

The intent declared with xml:lang is considered to apply to all attributes and content of the element where it is specified, unless overridden with an instance of xml:lang on another element within that content.

A simple declaration for xml:lang might take the form

xml:lang NMTOKEN #IMPLIED

but specific default values may also be given, if appropriate. In a collection of French poems for English students, with glosses and notes in English, the xml:lang attribute might be declared this way:

<!ATTLIST poem   xml:lang NMTOKEN 'fr'>
<!ATTLIST gloss  xml:lang NMTOKEN 'en'>
<!ATTLIST note   xml:lang NMTOKEN 'en'>

3 Logical Structures

[Definition: Each XML document contains one or more elements, the boundaries of which are either delimited by start-tags and end-tags, or, for empty elements, by an empty-element tag. Each element has a type, identified by name, sometimes called its "generic identifier" (GI), and may have a set of attribute specifications.] Each attribute specification has a name and a value.

Element
[39]    element    ::=    EmptyElemTag
| STag content ETag [WFC: Element Type Match]
[VC: Element Valid]

This specification does not constrain the semantics, use, or (beyond syntax) names of the element types and attributes, except that names beginning with a match to (('X'|'x')('M'|'m')('L'|'l')) are reserved for standardization in this or future versions of this specification.

Well-formedness constraint: Element Type Match

The Name in an element's end-tag must match the element type in the start-tag.

Validity constraint: Element Valid

An element is valid if there is a declaration matching elementdecl where the Name matches the element type, and one of the following holds:

  1. The declaration matches EMPTY and the element has no content.

  2. The declaration matches children and the sequence of child elements belongs to the language generated by the regular expression in the content model, with optional white space (characters matching the nonterminal S) between the start-tag and the first child element, between child elements, or between the last child element and the end-tag. Note that a CDATA section containing only white space does not match the nonterminal S, and hence cannot appear in these positions.

  3. The declaration matches Mixed and the content consists of character data and child elements whose types match names in the content model.

  4. The declaration matches ANY, and the types of any child elements have been declared.

3.1 Start-Tags, End-Tags, and Empty-Element Tags

[Definition: The beginning of every non-empty XML element is marked by a start-tag.]

Start-tag
[40]    STag    ::=    '<' Name (S Attribute)* S? '>' [WFC: Unique Att Spec]
[41]    Attribute    ::=    Name Eq AttValue [VC: Attribute Value Type]
[WFC: No External Entity References]
[WFC: No < in Attribute Values]

The Name in the start- and end-tags gives the element's type. [Definition: The Name-AttValue pairs are referred to as the attribute specifications of the element], [Definition: with the Name in each pair referred to as the attribute name] and [Definition: the content of the AttValue (the text between the ' or " delimiters) as the attribute value.]Note that the order of attribute specifications in a start-tag or empty-element tag is not significant.

Well-formedness constraint: Unique Att Spec

No attribute name may appear more than once in the same start-tag or empty-element tag.

Validity constraint: Attribute Value Type

The attribute must have been declared; the value must be of the type declared for it. (For attribute types, see 3.3 Attribute-List Declarations.)

Well-formedness constraint: No External Entity References

Attribute values cannot contain direct or indirect entity references to external entities.

Well-formedness constraint: No < in Attribute Values

The replacement text of any entity referred to directly or indirectly in an attribute value must not contain a <.

An example of a start-tag:

<termdef id="dt-dog" term="dog">

[Definition: The end of every element that begins with a start-tag must be marked by an end-tag containing a name that echoes the element's type as given in the start-tag:]

End-tag
[42]    ETag    ::=    '</' Name S? '>'

An example of an end-tag:

</termdef>

[Definition: The text between the start-tag and end-tag is called the element's content:]

Content of Elements
[43]    content    ::=    CharData? ((element | Reference | CDSect | PI | Comment) CharData?)* /* */

[Definition: An element with no content is said to be empty.] The representation of an empty element is either a start-tag immediately followed by an end-tag, or an empty-element tag. [Definition: An empty-element tag takes a special form:]

Tags for Empty Elements
[44]    EmptyElemTag    ::=    '<' Name (S Attribute)* S? '/>' [WFC: Unique Att Spec]

Empty-element tags may be used for any element which has no content, whether or not it is declared using the keyword EMPTY. For interoperability, the empty-element tag should be used, and should only be used, for elements which are declared EMPTY.

Examples of empty elements:

<IMG align="left"
 src="http://www.w3.org/Icons/WWW/w3c_home" />
<br></br>
<br/>

3.2 Element Type Declarations

The element structure of an XML document may, for validation purposes, be constrained using element type and attribute-list declarations. An element type declaration constrains the element's content.

Element type declarations often constrain which element types can appear as children of the element. At user option, an XML processor may issue a warning when a declaration mentions an element type for which no declaration is provided, but this is not an error.

[Definition: An element type declaration takes the form:]

Element Type Declaration
[45]    elementdecl    ::=    '<!ELEMENT' S Name S contentspec S? '>' [VC: Unique Element Type Declaration]
[46]    contentspec    ::=    'EMPTY' | 'ANY' | Mixed | children

where the Name gives the element type being declared.

Validity constraint: Unique Element Type Declaration

No element type may be declared more than once.

Examples of element type declarations:

<!ELEMENT br EMPTY>
<!ELEMENT p (#PCDATA|emph)* >
<!ELEMENT %name.para; %content.para; >
<!ELEMENT container ANY>

3.2.1 Element Content

[Definition: An element type has element content when elements of that type must contain only child elements (no character data), optionally separated by white space (characters matching the nonterminal S).][Definition: In this case, the constraint includes a content model, a simple grammar governing the allowed types of the child elements and the order in which they are allowed to appear.] The grammar is built on content particles (cps), which consist of names, choice lists of content particles, or sequence lists of content particles:

Element-content Models
[47]    children    ::=    (choice | seq) ('?' | '*' | '+')?
[48]    cp    ::=    (Name | choice | seq) ('?' | '*' | '+')?
[49]    choice    ::=    '(' S? cp ( S? '|' S? cp )+ S? ')' /* */
/* */
[VC: Proper Group/PE Nesting]
[50]    seq    ::=    '(' S? cp ( S? ',' S? cp )* S? ')' /* */
[VC: Proper Group/PE Nesting]

where each Name is the type of an element which may appear as a child. Any content particle in a choice list may appear in the element content at the location where the choice list appears in the grammar; content particles occurring in a sequence list must each appear in the element content in the order given in the list. The optional character following a name or list governs whether the element or the content particles in the list may occur one or more (+), zero or more (*), or zero or one times (?). The absence of such an operator means that the element or content particle must appear exactly once. This syntax and meaning are identical to those used in the productions in this specification.

The content of an element matches a content model if and only if it is possible to trace out a path through the content model, obeying the sequence, choice, and repetition operators and matching each element in the content against an element type in the content model. For compatibility, it is an error if an element in the document can match more than one occurrence of an element type in the content model. For more information, see E Deterministic Content Models.

Validity constraint: Proper Group/PE Nesting

Parameter-entity replacement text must be properly nested with parenthesized groups. That is to say, if either of the opening or closing parentheses in a choice, seq, or Mixed construct is contained in the replacement text for a parameter entity, both must be contained in the same replacement text.

For interoperability, if a parameter-entity reference appears in a choice, seq, or Mixed construct, its replacement text should contain at least one non-blank character, and neither the first nor last non-blank character of the replacement text should be a connector (| or ,).

Examples of element-content models:

<!ELEMENT spec (front, body, back?)>
<!ELEMENT div1 (head, (p | list | note)*, div2*)>
<!ELEMENT dictionary-body (%div.mix; | %dict.mix;)*>

3.2.2 Mixed Content

[Definition: An element type has mixed content when elements of that type may contain character data, optionally interspersed with child elements.] In this case, the types of the child elements may be constrained, but not their order or their number of occurrences:

Mixed-content Declaration
[51]    Mixed    ::=    '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*'
| '(' S? '#PCDATA' S? ')' [VC: Proper Group/PE Nesting]
[VC: No Duplicate Types]

where the Names give the types of elements that may appear as children. The keyword #PCDATA derives historically from the term "parsed character data."

Validity constraint: No Duplicate Types

The same name must not appear more than once in a single mixed-content declaration.

Examples of mixed content declarations:

<!ELEMENT p (#PCDATA|a|ul|b|i|em)*>
<!ELEMENT p (#PCDATA | %font; | %phrase; | %special; | %form;)* >
<!ELEMENT b (#PCDATA)>

3.3 Attribute-List Declarations

Attributes are used to associate name-value pairs with elements. Attribute specifications may appear only within start-tags and empty-element tags; thus, the productions used to recognize them appear in 3.1 Start-Tags, End-Tags, and Empty-Element Tags. Attribute-list declarations may be used:

  • To define the set of attributes pertaining to a given element type.

  • To establish type constraints for these attributes.

  • To provide default values for attributes.

[Definition: Attribute-list declarations specify the name, data type, and default value (if any) of each attribute associated with a given element type:]

Attribute-list Declaration
[52]    AttlistDecl    ::=    '<!ATTLIST' S Name AttDef* S? '>'
[53]    AttDef    ::=    S Name S AttType S DefaultDecl

The Name in the AttlistDecl rule is the type of an element. At user option, an XML processor may issue a warning if attributes are declared for an element type not itself declared, but this is not an error. The Name in the AttDef rule is the name of the attribute.

When more than one AttlistDecl is provided for a given element type, the contents of all those provided are merged. When more than one definition is provided for the same attribute of a given element type, the first declaration is binding and later declarations are ignored. For interoperability, writers of DTDs may choose to provide at most one attribute-list declaration for a given element type, at most one attribute definition for a given attribute name in an attribute-list declaration, and at least one attribute definition in each attribute-list declaration. For interoperability, an XML processor may at user option issue a warning when more than one attribute-list declaration is provided for a given element type, or more than one attribute definition is provided for a given attribute, but this is not an error.

3.3.1 Attribute Types

XML attribute types are of three kinds: a string type, a set of tokenized types, and enumerated types. The string type may take any literal string as a value; the tokenized types have varying lexical and semantic constraints. The validity constraints noted in the grammar are applied after the attribute value has been normalized as described in 3.3 Attribute-List Declarations.

Attribute Types
[54]    AttType    ::=    StringType | TokenizedType | EnumeratedType
[55]    StringType    ::=    'CDATA'
[56]    TokenizedType    ::=    'ID' [VC: ID]
[VC: One ID per Element Type]
[VC: ID Attribute Default]
| 'IDREF' [VC: IDREF]
| 'IDREFS' [VC: IDREF]
| 'ENTITY' [VC: Entity Name]
| 'ENTITIES' [VC: Entity Name]
| 'NMTOKEN' [VC: Name Token]
| 'NMTOKENS' [VC: Name Token]

Validity constraint: ID

Values of type ID must match the Name production. A name must not appear more than once in an XML document as a value of this type; i.e., ID values must uniquely identify the elements which bear them.

Validity constraint: One ID per Element Type

No element type may have more than one ID attribute specified.

Validity constraint: ID Attribute Default

An ID attribute must have a declared default of #IMPLIED or #REQUIRED.

Validity constraint: IDREF

Values of type IDREF must match the Name production, and values of type IDREFS must match Names; each Name must match the value of an ID attribute on some element in the XML document; i.e. IDREF values must match the value of some ID attribute.

Validity constraint: Entity Name

Values of type ENTITY must match the Name production, values of type ENTITIES must match Names; each Name must match the name of an unparsed entity declared in the DTD.

Validity constraint: Name Token

Values of type NMTOKEN must match the Nmtoken production; values of type NMTOKENS must match Nmtokens.

[Definition: Enumerated attributes can take one of a list of values provided in the declaration]. There are two kinds of enumerated types:

Enumerated Attribute Types
[57]    EnumeratedType    ::=    NotationType | Enumeration
[58]    NotationType    ::=    'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')' [VC: Notation Attributes]
[VC: One Notation Per Element Type]
[VC: No Notation on Empty Element]
[59]    Enumeration    ::=    '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')' [VC: Enumeration]

A NOTATION attribute identifies a notation, declared in the DTD with associated system and/or public identifiers, to be used in interpreting the element to which the attribute is attached.

Validity constraint: Notation Attributes

Values of this type must match one of the notation names included in the declaration; all notation names in the declaration must be declared.

Validity constraint: One Notation Per Element Type

No element type may have more than one NOTATION attribute specified.

Validity constraint: No Notation on Empty Element

For compatibility, an attribute of type NOTATION must not be declared on an element declared EMPTY.

Validity constraint: Enumeration

Values of this type must match one of the Nmtoken tokens in the declaration.

For interoperability, the same Nmtoken should not occur more than once in the enumerated attribute types of a single element type.

3.3.2 Attribute Defaults

An attribute declaration provides information on whether the attribute's presence is required, and if not, how an XML processor should react if a declared attribute is absent in a document.

Attribute Defaults
[60]    DefaultDecl    ::=    '#REQUIRED' | '#IMPLIED'
| (('#FIXED' S)? AttValue) [VC: Required Attribute]
[VC: Attribute Default Legal]
[WFC: No < in Attribute Values]
[VC: Fixed Attribute Default]

In an attribute declaration, #REQUIRED means that the attribute must always be provided, #IMPLIED that no default value is provided. [Definition: If the declaration is neither #REQUIRED nor #IMPLIED, then the AttValue value contains the declared default value; the #FIXED keyword states that the attribute must always have the default value. If a default value is declared, when an XML processor encounters an omitted attribute, it is to behave as though the attribute were present with the declared default value.]

Validity constraint: Required Attribute

If the default declaration is the keyword #REQUIRED, then the attribute must be specified for all elements of the type in the attribute-list declaration.

Validity constraint: Attribute Default Legal

The declared default value must meet the lexical constraints of the declared attribute type.

Validity constraint: Fixed Attribute Default

If an attribute has a default value declared with the #FIXED keyword, instances of that attribute must match the default value.

Examples of attribute-list declarations:

<!ATTLIST termdef
          id      ID      #REQUIRED
          name    CDATA   #IMPLIED>
<!ATTLIST list
          type    (bullets|ordered|glossary)  "ordered">
<!ATTLIST form
          method  CDATA   #FIXED "POST">

3.3.3 Attribute-Value Normalization

Before the value of an attribute is passed to the application or checked for validity, the XML processor must normalize the attribute value by applying the algorithm below, or by using some other method such that the value passed to the application is the same as that produced by the algorithm.

  1. All line breaks must have been normalized on input to #xA as described in 2.11 End-of-Line Handling, so the rest of this algorithm operates on text normalized in this way.

  2. Begin with a normalized value consisting of the empty string.

  3. For each character, entity reference, or character reference in the unnormalized attribute value, beginning with the first and continuing to the last, do the following:

    • For a character reference, append the referenced character to the normalized value.

    • For an entity reference, recursively apply step 3 of this algorithm to the replacement text of the entity.

    • For a white space character (#x20, #xD, #xA, #x9), append a space character (#x20) to the normalized value.

    • For another character, append the character to the normalized value.

If the attribute type is not CDATA, then the XML processor must further process the normalized attribute value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) characters by a single space (#x20) character.

Note that if the unnormalized attribute value contains a character reference to a white space character other than space (#x20), the normalized value contains the referenced character itself (#xD, #xA or #x9). This contrasts with the case where the unnormalized value contains a white space character (not a reference), which is replaced with a space character (#x20) in the normalized value and also contrasts with the case where the unnormalized value contains an entity reference whose replacement text contains a white space character; being recursively processed, the white space character is replaced with a space character (#x20) in the normalized value.

All attributes for which no declaration has been read should be treated by a non-validating processor as if declared CDATA.

Following are examples of attribute normalization. Given the following declarations:

<!ENTITY d "&#xD;">
<!ENTITY a "&#xA;">
<!ENTITY da "&#xD;&#xA;">

the attribute specifications in the left column below would be normalized to the character sequences of the middle column if the attribute a is declared NMTOKENS and to those of the right columns if a is declared CDATA.

Attribute specification a is NMTOKENS a is CDATA
a="

xyz"
x y z #x20 #x20 x y z
a="&d;&d;A&a;&a;B&da;"
A #x20 B #x20 #x20 A #x20 #x20 B #x20 #x20
a=
"&#xd;&#xd;A&#xa;&#xa;B&#xd;&#xa;"
#xD #xD A #xA #xA B #xD #xA #xD #xD A #xA #xA B #xD #xD

Note that the last example is invalid (but well-formed) if a is declared to be of type NMTOKENS.

3.4 Conditional Sections

[Definition: Conditional sections are portions of the document type declaration external subset which are included in, or excluded from, the logical structure of the DTD based on the keyword which governs them.]

Conditional Section
[61]    conditionalSect    ::=    includeSect | ignoreSect
[62]    includeSect    ::=    '<![' S? 'INCLUDE' S? '[' extSubsetDecl ']]>' /* */
[VC: Proper Conditional Section/PE Nesting]
[63]    ignoreSect    ::=    '<![' S? 'IGNORE' S? '[' ignoreSectContents* ']]>' /* */
[VC: Proper Conditional Section/PE Nesting]
[64]    ignoreSectContents    ::=    Ignore ('<![' ignoreSectContents ']]>' Ignore)*
[65]    Ignore    ::=    Char* - (Char* ('<![' | ']]>') Char*)

Validity constraint: Proper Conditional Section/PE Nesting

If any of the "<![", "[", or "]]>" of a conditional section is contained in the replacement text for a parameter-entity reference, all of them must be contained in the same replacement text.

Like the internal and external DTD subsets, a conditional section may contain one or more complete declarations, comments, processing instructions, or nested conditional sections, intermingled with white space.

If the keyword of the conditional section is INCLUDE, then the contents of the conditional section are part of the DTD. If the keyword of the conditional section is IGNORE, then the contents of the conditional section are not logically part of the DTD. If a conditional section with a keyword of INCLUDE occurs within a larger conditional section with a keyword of IGNORE, both the outer and the inner conditional sections are ignored. The contents of an ignored conditional section are parsed by ignoring all characters after the "[" following the keyword, except conditional section starts "<![" and ends "]]>", until the matching conditional section end is found. Parameter entity references are not recognized in this process.

If the keyword of the conditional section is a parameter-entity reference, the parameter entity must be replaced by its content before the processor decides whether to include or ignore the conditional section.

An example:

<!ENTITY % draft 'INCLUDE' >
<!ENTITY % final 'IGNORE' >

<![%draft;[
<!ELEMENT book (comments*, title, body, supplements?)>
]]>
<![%final;[
<!ELEMENT book (title, body, supplements?)>
]]>

4 Physical Structures

[Definition: An XML document may consist of one or many storage units. These are called entities; they all have content and are all (except for the document entity and the external DTD subset) identified by entity name.] Each XML document has one entity called the document entity, which serves as the starting point for the XML processor and may contain the whole document.

Entities may be either parsed or unparsed. [Definition: A parsed entity's contents are referred to as its replacement text; this text is considered an integral part of the document.]

[Definition: An unparsed entity is a resource whose contents may or may not be text, and if text, may be other than XML. Each unparsed entity has an associated notation, identified by name. Beyond a requirement that an XML processor make the identifiers for the entity and notation available to the application, XML places no constraints on the contents of unparsed entities.]

Parsed entities are invoked by name using entity references; unparsed entities by name, given in the value of ENTITY or ENTITIES attributes.

[Definition: General entities are entities for use within the document content. In this specification, general entities are sometimes referred to with the unqualified term entity when this leads to no ambiguity.] [Definition: Parameter entities are parsed entities for use within the DTD.] These two types of entities use different forms of reference and are recognized in different contexts. Furthermore, they occupy different namespaces; a parameter entity and a general entity with the same name are two distinct entities.

4.1 Character and Entity References

[Definition: A character reference refers to a specific character in the ISO/IEC 10646 character set, for example one not directly accessible from available input devices.]

Character Reference
[66]    CharRef    ::=    '&#' [0-9]+ ';'
| '&#x' [0-9a-fA-F]+ ';' [WFC: Legal Character]

Well-formedness constraint: Legal Character

Characters referred to using character references must match the production for Char.

If the character reference begins with "&#x", the digits and letters up to the terminating ; provide a hexadecimal representation of the character's code point in ISO/IEC 10646. If it begins just with "&#", the digits up to the terminating ; provide a decimal representation of the character's code point.

[Definition: An entity reference refers to the content of a named entity.] [Definition: References to parsed general entities use ampersand (&) and semicolon (;) as delimiters.] [Definition: Parameter-entity references use percent-sign (%) and semicolon (;) as delimiters.]

Entity Reference
[67]    Reference    ::=    EntityRef | CharRef
[68]    EntityRef    ::=    '&' Name ';' [WFC: Entity Declared]
[VC: Entity Declared]
[WFC: Parsed Entity]
[WFC: No Recursion]
[69]    PEReference    ::=    '%' Name ';' [VC: Entity Declared]
[WFC: No Recursion]
[WFC: In DTD]

Well-formedness constraint: Entity Declared

In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with "standalone='yes'", for an entity reference that does not occur within the external subset or a parameter entity, the Name given in the entity reference must match that in an entity declaration that does not occur within the external subset or a parameter entity, except that well-formed documents need not declare any of the following entities: amp, lt, gt, apos, quot. The declaration of a general entity must precede any reference to it which appears in a default value in an attribute-list declaration.

Note that if entities are declared in the external subset or in external parameter entities, a non-validating processor is not obligated to read and process their declarations; for such documents, the rule that an entity must be declared is a well-formedness constraint only if standalone='yes'.

Validity constraint: Entity Declared

In a document with an external subset or external parameter entities with "standalone='no'", the Name given in the entity reference must match that in an entity declaration. For interoperability, valid documents should declare the entities amp, lt, gt, apos, quot, in the form specified in 4.6 Predefined Entities. The declaration of a parameter entity must precede any reference to it. Similarly, the declaration of a general entity must precede any attribute-list declaration containing a default value with a direct or indirect reference to that general entity.

Well-formedness constraint: Parsed Entity

An entity reference must not contain the name of an unparsed entity. Unparsed entities may be referred to only in attribute values declared to be of type ENTITY or ENTITIES.

Well-formedness constraint: No Recursion

A parsed entity must not contain a recursive reference to itself, either directly or indirectly.

Well-formedness constraint: In DTD

Parameter-entity references may only appear in the DTD.

Examples of character and entity references:

Type <key>less-than</key> (&#x3C;) to save options.
This document was prepared on &docdate; and
is classified &security-level;.

Example of a parameter-entity reference:

<!-- declare the parameter entity "ISOLat2"... -->
<!ENTITY % ISOLat2
         SYSTEM "http://www.xml.com/iso/isolat2-xml.entities" >
<!-- ... now reference it. -->
%ISOLat2;

4.2 Entity Declarations

[Definition: Entities are declared thus:]

Entity Declaration
[70]    EntityDecl    ::=    GEDecl | PEDecl
[71]    GEDecl    ::=    '<!ENTITY' S Name S EntityDef S? '>'
[72]    PEDecl    ::=    '<!ENTITY' S '%' S Name S PEDef S? '>'
[73]    EntityDef    ::=    EntityValue | (ExternalID NDataDecl?)
[74]    PEDef    ::=    EntityValue | ExternalID

The Name identifies the entity in an entity reference or, in the case of an unparsed entity, in the value of an ENTITY or ENTITIES attribute. If the same entity is declared more than once, the first declaration encountered is binding; at user option, an XML processor may issue a warning if entities are declared multiple times.

4.2.1 Internal Entities

[Definition: If the entity definition is an EntityValue, the defined entity is called an internal entity. There is no separate physical storage object, and the content of the entity is given in the declaration.] Note that some processing of entity and character references in the literal entity value may be required to produce the correct replacement text: see 4.5 Construction of Internal Entity Replacement Text.

An internal entity is a parsed entity.

Example of an internal entity declaration:

<!ENTITY Pub-Status "This is a pre-release of the
 specification.">

4.2.2 External Entities

[Definition: If the entity is not internal, it is an external entity, declared as follows:]

External Entity Declaration
[75]    ExternalID    ::=    'SYSTEM' S SystemLiteral
| 'PUBLIC' S PubidLiteral S SystemLiteral
[76]    NDataDecl    ::=    S 'NDATA' S Name [VC: Notation Declared]

If the NDataDecl is present, this is a general unparsed entity; otherwise it is a parsed entity.

Validity constraint: Notation Declared

The Name must match the declared name of a notation.

[Definition: The SystemLiteral is called the entity's system identifier. It is a URI reference (as defined in [IETF RFC 2396], updated by [IETF RFC 2732]), meant to be dereferenced to obtain input for the XML processor to construct the entity's replacement text.] It is an error for a fragment identifier (beginning with a # character) to be part of a system identifier. Unless otherwise provided by information outside the scope of this specification (e.g. a special XML element type defined by a particular DTD, or a processing instruction defined by a particular application specification), relative URIs are relative to the location of the resource within which the entity declaration occurs. A URI might thus be relative to the document entity, to the entity containing the external DTD subset, or to some other external parameter entity.

URI references require encoding and escaping of certain characters. The disallowed characters include all non-ASCII characters, plus the excluded characters listed in Section 2.4 of [IETF RFC 2396], except for the number sign (#) and percent sign (%) characters and the square bracket characters re-allowed in [IETF RFC 2732]. Disallowed characters must be escaped as follows:

  1. Each disallowed character is converted to UTF-8 [IETF RFC 2279] as one or more bytes.

  2. Any octets corresponding to a disallowed character are escaped with the URI escaping mechanism (that is, converted to %HH, where HH is the hexadecimal notation of the byte value).

  3. The original character is replaced by the resulting character sequence.

[Definition: In addition to a system identifier, an external identifier may include a public identifier.] An XML processor attempting to retrieve the entity's content may use the public identifier to try to generate an alternative URI reference. If the processor is unable to do so, it must use the URI reference specified in the system literal. Before a match is attempted, all strings of white space in the public identifier must be normalized to single space characters (#x20), and leading and trailing white space must be removed.

Examples of external entity declarations:

<!ENTITY open-hatch
         SYSTEM "http://www.textuality.com/boilerplate/OpenHatch.xml">
<!ENTITY open-hatch
         PUBLIC "-//Textuality//TEXT Standard open-hatch boilerplate//EN"
         "http://www.textuality.com/boilerplate/OpenHatch.xml">
<!ENTITY hatch-pic
         SYSTEM "../grafix/OpenHatch.gif"
         NDATA gif >

4.3 Parsed Entities

4.3.1 The Text Declaration

External parsed entities should each begin with a text declaration.

Text Declaration
[77]    TextDecl    ::=    '<?xml' VersionInfo? EncodingDecl S? '?>'

The text declaration must be provided literally, not by reference to a parsed entity. No text declaration may appear at any position other than the beginning of an external parsed entity. The text declaration in an external parsed entity is not considered part of its replacement text.

4.3.2 Well-Formed Parsed Entities

The document entity is well-formed if it matches the production labeled document. An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. All external parameter entities are well-formed by definition.

Well-Formed External Parsed Entity
[78]    extParsedEnt    ::=    TextDecl? content

An internal general parsed entity is well-formed if its replacement text matches the production labeled content. All internal parameter entities are well-formed by definition.

A consequence of well-formedness in entities is that the logical and physical structures in an XML document are properly nested; no start-tag, end-tag, empty-element tag, element, comment, processing instruction, character reference, or entity reference can begin in one entity and end in another.

4.3.3 Character Encoding in Entities

Each external parsed entity in an XML document may use a different encoding for its characters. All XML processors must be able to read entities in both the UTF-8 and UTF-16 encodings. The terms "UTF-8" and "UTF-16" in this specification do not apply to character encodings with any other labels, even if the encodings or labels are very similar to UTF-8 or UTF-16.

Entities encoded in UTF-16 must begin with the Byte Order Mark described by Annex F of [ISO/IEC 10646], Annex H of [ISO/IEC 10646-2000], section 2.4 of [Unicode], and section 2.7 of [Unicode3] (the ZERO WIDTH NO-BREAK SPACE character, #xFEFF). This is an encoding signature, not part of either the markup or the character data of the XML document. XML processors must be able to use this character to differentiate between UTF-8 and UTF-16 encoded documents.

Although an XML processor is required to read only entities in the UTF-8 and UTF-16 encodings, it is recognized that other encodings are used around the world, and it may be desired for XML processors to read entities that use them. In the absence of external character encoding information (such as MIME headers), parsed entities which are stored in an encoding other than UTF-8 or UTF-16 must begin with a text declaration (see 4.3.1 The Text Declaration) containing an encoding declaration:

Encoding Declaration
[80]    EncodingDecl    ::=    S 'encoding' Eq ('"' EncName '"' | "'" EncName "'" )
[81]    EncName    ::=    [A-Za-z] ([A-Za-z0-9._] | '-')* /* Encoding name contains only Latin characters */

In the document entity, the encoding declaration is part of the XML declaration. The EncName is the name of the encoding used.

In an encoding declaration, the values "UTF-8", "UTF-16", "ISO-10646-UCS-2", and "ISO-10646-UCS-4" should be used for the various encodings and transformations of Unicode / ISO/IEC 10646, the values "ISO-8859-1", "ISO-8859-2", ... "ISO-8859-n" (where n is the part number) should be used for the parts of ISO 8859, and the values "ISO-2022-JP", "Shift_JIS", and "EUC-JP" should be used for the various encoded forms of JIS X-0208-1997. It is recommended that character encodings registered (as charsets) with the Internet Assigned Numbers Authority [IANA-CHARSETS], other than those just listed, be referred to using their registered names; other encodings should use names starting with an "x-" prefix. XML processors should match character encoding names in a case-insensitive way and should either interpret an IANA-registered name as the encoding registered at IANA for that name or treat it as unknown (processors are, of course, not required to support all IANA-registered encodings).

In the absence of information provided by an external transport protocol (e.g. HTTP or MIME), it is an error for an entity including an encoding declaration to be presented to the XML processor in an encoding other than that named in the declaration, or for an entity which begins with neither a Byte Order Mark nor an encoding declaration to use an encoding other than UTF-8. Note that since ASCII is a subset of UTF-8, ordinary ASCII entities do not strictly need an encoding declaration.

It is a fatal error for a TextDecl to occur other than at the beginning of an external entity.

It is a fatal error when an XML processor encounters an entity with an encoding that it is unable to process. It is a fatal error if an XML entity is determined (via default, encoding declaration, or higher-level protocol) to be in a certain encoding but contains octet sequences that are not legal in that encoding. It is also a fatal error if an XML entity contains no encoding declaration and its content is not legal UTF-8 or UTF-16.

Examples of text declarations containing encoding declarations:

<?xml encoding='UTF-8'?>
<?xml encoding='EUC-JP'?>

4.4 XML Processor Treatment of Entities and References

The table below summarizes the contexts in which character references, entity references, and invocations of unparsed entities might appear and the required behavior of an XML processor in each case. The labels in the leftmost column describe the recognition context:

Reference in Content

as a reference anywhere after the start-tag and before the end-tag of an element; corresponds to the nonterminal content.

Reference in Attribute Value

as a reference within either the value of an attribute in a start-tag, or a default value in an attribute declaration; corresponds to the nonterminal AttValue.

Occurs as Attribute Value

as a Name, not a reference, appearing either as the value of an attribute which has been declared as type ENTITY, or as one of the space-separated tokens in the value of an attribute which has been declared as type ENTITIES.

Reference in Entity Value

as a reference within a parameter or internal entity's literal entity value in the entity's declaration; corresponds to the nonterminal EntityValue.

Reference in DTD

as a reference within either the internal or external subsets of the DTD, but outside of an EntityValue, AttValue, PI, Comment, SystemLiteral, PubidLiteral, or the contents of an ignored conditional section (see 3.4 Conditional Sections).

.

Entity Type Character
Parameter Internal General External Parsed General Unparsed
Reference in Content Not recognized Included Included if validating Forbidden Included
Reference in Attribute Value Not recognized Included in literal Forbidden Forbidden Included
Occurs as Attribute Value Not recognized Forbidden Forbidden Notify Not recognized
Reference in EntityValue Included in literal Bypassed Bypassed Forbidden Included
Reference in DTD Included as PE Forbidden Forbidden Forbidden Forbidden

4.4.1 Not Recognized

Outside the DTD, the % character has no special significance; thus, what would be parameter entity references in the DTD are not recognized as markup in content. Similarly, the names of unparsed entities are not recognized except when they appear in the value of an appropriately declared attribute.

4.4.2 Included

[Definition: An entity is included when its replacement text is retrieved and processed, in place of the reference itself, as though it were part of the document at the location the reference was recognized.] The replacement text may contain both character data and (except for parameter entities) markup, which must be recognized in the usual way. (The string "AT&amp;T;" expands to "AT&T;" and the remaining ampersand is not recognized as an entity-reference delimiter.) A character reference is included when the indicated character is processed in place of the reference itself.

4.4.3 Included If Validating

When an XML processor recognizes a reference to a parsed entity, in order to validate the document, the processor must include its replacement text. If the entity is external, and the processor is not attempting to validate the XML document, the processor may, but need not, include the entity's replacement text. If a non-validating processor does not include the replacement text, it must inform the application that it recognized, but did not read, the entity.

This rule is based on the recognition that the automatic inclusion provided by the SGML and XML entity mechanism, primarily designed to support modularity in authoring, is not necessarily appropriate for other applications, in particular document browsing. Browsers, for example, when encountering an external parsed entity reference, might choose to provide a visual indication of the entity's presence and retrieve it for display only on demand.

4.4.4 Forbidden

The following are forbidden, and constitute fatal errors:

  • the appearance of a reference to an unparsed entity.

  • the appearance of any character or general-entity reference in the DTD except within an EntityValue or AttValue.

  • a reference to an external entity in an attribute value.

4.4.5 Included in Literal

When an entity reference appears in an attribute value, or a parameter entity reference appears in a literal entity value, its replacement text is processed in place of the reference itself as though it were part of the document at the location the reference was recognized, except that a single or double quote character in the replacement text is always treated as a normal data character and will not terminate the literal. For example, this is well-formed:

<!--  -->
<!ENTITY % YN '"Yes"' >
<!ENTITY WhatHeSaid "He said %YN;" >

while this is not:

<!ENTITY EndAttr "27'" >
<element attribute='a-&EndAttr;>

4.4.6 Notify

When the name of an unparsed entity appears as a token in the value of an attribute of declared type ENTITY or ENTITIES, a validating processor must inform the application of the system and public (if any) identifiers for both the entity and its associated notation.

4.4.7 Bypassed

When a general entity reference appears in the EntityValue in an entity declaration, it is bypassed and left as is.

4.4.8 Included as PE

Just as with external parsed entities, parameter entities need only be included if validating. When a parameter-entity reference is recognized in the DTD and included, its replacement text is enlarged by the attachment of one leading and one following space (#x20) character; the intent is to constrain the replacement text of parameter entities to contain an integral number of grammatical tokens in the DTD. This behavior does not apply to parameter entity references within entity values; these are described in 4.4.5 Included in Literal.

4.5 Construction of Internal Entity Replacement Text

In discussing the treatment of internal entities, it is useful to distinguish two forms of the entity's value. [Definition: The literal entity value is the quoted string actually present in the entity declaration, corresponding to the non-terminal EntityValue.] [Definition: The replacement text is the content of the entity, after replacement of character references and parameter-entity references.]

The literal entity value as given in an internal entity declaration (EntityValue) may contain character, parameter-entity, and general-entity references. Such references must be contained entirely within the literal entity value. The actual replacement text that is included as described above must contain the replacement text of any parameter entities referred to, and must contain the character referred to, in place of any character references in the literal entity value; however, general-entity references must be left as-is, unexpanded. For example, given the following declarations:

<!ENTITY % pub    "&#xc9;ditions Gallimard" >
<!ENTITY   rights "All rights reserved" >
<!ENTITY   book   "La Peste: Albert Camus,
&#xA9; 1947 %pub;. &rights;" >

then the replacement text for the entity "book" is:

La Peste: Albert Camus,
© 1947 Éditions Gallimard. &rights;

The general-entity reference "&rights;" would be expanded should the reference "&book;" appear in the document's content or an attribute value.

These simple rules may have complex interactions; for a detailed discussion of a difficult example, see D Expansion of Entity and Character References.

4.6 Predefined Entities

[Definition: Entity and character references can both be used to escape the left angle bracket, ampersand, and other delimiters. A set of general entities (amp, lt, gt, apos, quot) is specified for this purpose. Numeric character references may also be used; they are expanded immediately when recognized and must be treated as character data, so the numeric character references "&#60;" and "&#38;" may be used to escape < and & when they occur in character data.]

All XML processors must recognize these entities whether they are declared or not. For interoperability, valid XML documents should declare these entities, like any others, before using them. If the entities lt or amp are declared, they must be declared as internal entities whose replacement text is a character reference to the respective character (less-than sign or ampersand) being escaped; the double escaping is required for these entities so that references to them produce a well-formed result. If the entities gt, apos, or quot are declared, they must be declared as internal entities whose replacement text is the single character being escaped (or a character reference to that character; the double escaping here is unnecessary but harmless). For example:

<!ENTITY lt     "&#38;#60;">
<!ENTITY gt     "&#62;">
<!ENTITY amp    "&#38;#38;">
<!ENTITY apos   "&#39;">
<!ENTITY quot   "&#34;">

4.7 Notation Declarations

[Definition: Notations identify by name the format of unparsed entities, the format of elements which bear a notation attribute, or the application to which a processing instruction is addressed.]

[Definition: Notation declarations provide a name for the notation, for use in entity and attribute-list declarations and in attribute specifications, and an external identifier for the notation which may allow an XML processor or its client application to locate a helper application capable of processing data in the given notation.]

Notation Declarations
[82]    NotationDecl    ::=    '<!NOTATION' S Name S (ExternalID | PublicID) S? '>' [VC: Unique Notation Name]
[83]    PublicID    ::=    'PUBLIC' S PubidLiteral

Validity constraint: Unique Notation Name

Only one notation declaration can declare a given Name.

XML processors must provide applications with the name and external identifier(s) of any notation declared and referred to in an attribute value, attribute definition, or entity declaration. They may additionally resolve the external identifier into the system identifier, file name, or other information needed to allow the application to call a processor for data in the notation described. (It is not an error, however, for XML documents to declare and refer to notations for which notation-specific applications are not available on the system where the XML processor or application is running.)

4.8 Document Entity

[Definition: The document entity serves as the root of the entity tree and a starting-point for an XML processor.] This specification does not specify how the document entity is to be located by an XML processor; unlike other entities, the document entity has no name and might well appear on a processor input stream without any identification at all.

5 Conformance

5.1 Validating and Non-Validating Processors

Conforming XML processors fall into two classes: validating and non-validating.

Validating and non-validating processors alike must report violations of this specification's well-formedness constraints in the content of the document entity and any other parsed entities that they read.

[Definition: Validating processors must, at user option, report violations of the constraints expressed by the declarations in the DTD, and failures to fulfill the validity constraints given in this specification.] To accomplish this, validating XML processors must read and process the entire DTD and all external parsed entities referenced in the document.

Non-validating processors are required to check only the document entity, including the entire internal DTD subset, for well-formedness. [Definition: While they are not required to check the document for validity, they are required to process all the declarations they read in the internal DTD subset and in any parameter entity that they read, up to the first reference to a parameter entity that they do not read; that is to say, they must use the information in those declarations to normalize attribute values, include the replacement text of internal entities, and supply default attribute values.] Except when standalone="yes", they must not process entity declarations or attribute-list declarations encountered after a reference to a parameter entity that is not read, since the entity may have contained overriding declarations.

5.2 Using XML Processors

The behavior of a validating XML processor is highly predictable; it must read every piece of a document and report all well-formedness and validity violations. Less is required of a non-validating processor; it need not read any part of the document other than the document entity. This has two effects that may be important to users of XML processors:

  • Certain well-formedness errors, specifically those that require reading external entities, may not be detected by a non-validating processor. Examples include the constraints entitled Entity Declared, Parsed Entity, and No Recursion, as well as some of the cases described as forbidden in 4.4 XML Processor Treatment of Entities and References.

  • The information passed from the processor to the application may vary, depending on whether the processor reads parameter and external entities. For example, a non-validating processor may not normalize attribute values, include the replacement text of internal entities, or supply default attribute values, where doing so depends on having read declarations in external or parameter entities.

For maximum reliability in interoperating between different XML processors, applications which use non-validating processors should not rely on any behaviors not required of such processors. Applications which require facilities such as the use of default attributes or internal entities which are declared in external entities should use validating XML processors.

6 Notation

The formal grammar of XML is given in this specification using a simple Extended Backus-Naur Form (EBNF) notation. Each rule in the grammar defines one symbol, in the form

symbol ::= expression

Symbols are written with an initial capital letter if they are the start symbol of a regular language, otherwise with an initial lower case letter. Literal strings are quoted.

Within the expression on the right-hand side of a rule, the following expressions are used to match strings of one or more characters:

#xN

where N is a hexadecimal integer, the expression matches the character in ISO/IEC 10646 whose canonical (UCS-4) code value, when interpreted as an unsigned binary number, has the value indicated. The number of leading zeros in the #xN form is insignificant; the number of leading zeros in the corresponding code value is governed by the character encoding in use and is not significant for XML.

[a-zA-Z], [#xN-#xN]

matches any Char with a value in the range(s) indicated (inclusive).

[abc], [#xN#xN#xN]

matches any Char with a value among the characters enumerated. Enumerations and ranges can be mixed in one set of brackets.

[^a-z], [^#xN-#xN]

matches any Char with a value outside the range indicated.

[^abc], [^#xN#xN#xN]

matches any Char with a value not among the characters given. Enumerations and ranges of forbidden values can be mixed in one set of brackets.

"string"

matches a literal string matching that given inside the double quotes.

'string'

matches a literal string matching that given inside the single quotes.

These symbols may be combined to match more complex patterns as follows, where A and B represent simple expressions:

(expression)

expression is treated as a unit and may be combined as described in this list.

A?

matches A or nothing; optional A.

A B

matches A followed by B. This operator has higher precedence than alternation; thus A B | C D is identical to (A B) | (C D).

A | B

matches A or B but not both.

A - B

matches any string that matches A but does not match B.

A+

matches one or more occurrences of A.Concatenation has higher precedence than alternation; thus A+ | B+ is identical to (A+) | (B+).

A*

matches zero or more occurrences of A. Concatenation has higher precedence than alternation; thus A* | B* is identical to (A*) | (B*).

Other notations used in the productions are:

/* ... */

comment.

[ wfc: ... ]

well-formedness constraint; this identifies by name a constraint on well-formed documents associated with a production.

[ vc: ... ]

validity constraint; this identifies by name a constraint on valid documents associated with a production.

A References

A.1 Normative References

IANA-CHARSETS
(Internet Assigned Numbers Authority) Official Names for Character Sets, ed. Keld Simonsen et al. See ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets.
IETF RFC 1766
IETF (Internet Engineering Task Force). RFC 1766: Tags for the Identification of Languages, ed. H. Alvestrand. 1995. (See http://www.ietf.org/rfc/rfc1766.txt.)
ISO/IEC 10646
ISO (International Organization for Standardization). ISO/IEC 10646-1993 (E). Information technology -- Universal Multiple-Octet Coded Character Set (UCS) -- Part 1: Architecture and Basic Multilingual Plane. [Geneva]: International Organization for Standardization, 1993 (plus amendments AM 1 through AM 7).
ISO/IEC 10646-2000
ISO (International Organization for Standardization). ISO/IEC 10646-1:2000. Information technology -- Universal Multiple-Octet Coded Character Set (UCS) -- Part 1: Architecture and Basic Multilingual Plane. [Geneva]: International Organization for Standardization, 2000.
Unicode
The Unicode Consortium. The Unicode Standard, Version 2.0. Reading, Mass.: Addison-Wesley Developers Press, 1996.
Unicode3
The Unicode Consortium. The Unicode Standard, Version 3.0. Reading, Mass.: Addison-Wesley Developers Press, 2000. ISBN 0-201-61633-5.

A.2 Other References

Aho/Ullman
Aho, Alfred V., Ravi Sethi, and Jeffrey D. Ullman. Compilers: Principles, Techniques, and Tools. Reading: Addison-Wesley, 1986, rpt. corr. 1988.
Berners-Lee et al.
Berners-Lee, T., R. Fielding, and L. Masinter. Uniform Resource Identifiers (URI): Generic Syntax and Semantics. 1997. (Work in progress; see updates to RFC1738.)
Brüggemann-Klein
Brüggemann-Klein, Anne. Formal Models in Document Processing. Habilitationsschrift. Faculty of Mathematics at the University of Freiburg, 1993. (See ftp://ftp.informatik.uni-freiburg.de/documents/papers/brueggem/habil.ps.)
Brüggemann-Klein and Wood
Brüggemann-Klein, Anne, and Derick Wood. Deterministic Regular Languages. Universität Freiburg, Institut für Informatik, Bericht 38, Oktober 1991. Extended abstract in A. Finkel, M. Jantzen, Hrsg., STACS 1992, S. 173-184. Springer-Verlag, Berlin 1992. Lecture Notes in Computer Science 577. Full version titled One-Unambiguous Regular Languages in Information and Computation 140 (2): 229-253, February 1998.
Clark
James Clark. Comparison of SGML and XML. See http://www.w3.org/TR/NOTE-sgml-xml-971215.
IANA-LANGCODES
(Internet Assigned Numbers Authority) Registry of Language Tags, ed. Keld Simonsen et al. (See http://www.isi.edu/in-notes/iana/assignments/languages/.)
IETF RFC2141
IETF (Internet Engineering Task Force). RFC 2141: URN Syntax, ed. R. Moats. 1997. (See http://www.ietf.org/rfc/rfc2141.txt.)
IETF RFC 2279
IETF (Internet Engineering Task Force). RFC 2279: UTF-8, a transformation format of ISO 10646, ed. F. Yergeau, 1998. (See http://www.ietf.org/rfc/rfc2279.txt.)
IETF RFC 2376
IETF (Internet Engineering Task Force). RFC 2376: XML Media Types. ed. E. Whitehead, M. Murata. 1998. (See http://www.ietf.org/rfc/rfc2376.txt.)
IETF RFC 2396
IETF (Internet Engineering Task Force). RFC 2396: Uniform Resource Identifiers (URI): Generic Syntax. T. Berners-Lee, R. Fielding, L. Masinter. 1998. (See http://www.ietf.org/rfc/rfc2396.txt.)
IETF RFC 2732
IETF (Internet Engineering Task Force). RFC 2732: Format for Literal IPv6 Addresses in URL's. R. Hinden, B. Carpenter, L. Masinter. 1999. (See http://www.ietf.org/rfc/rfc2732.txt.)
IETF RFC 2781
IETF (Internet Engineering Task Force). RFC 2781: UTF-16, an encoding of ISO 10646, ed. P. Hoffman, F. Yergeau. 2000. (See http://www.ietf.org/rfc/rfc2781.txt.)
ISO 639
(International Organization for Standardization). ISO 639:1988 (E). Code for the representation of names of languages. [Geneva]: International Organization for Standardization, 1988.
ISO 3166
(International Organization for Standardization). ISO 3166-1:1997 (E). Codes for the representation of names of countries and their subdivisions -- Part 1: Country codes [Geneva]: International Organization for Standardization, 1997.
ISO 8879
ISO (International Organization for Standardization). ISO 8879:1986(E). Information processing -- Text and Office Systems -- Standard Generalized Markup Language (SGML). First edition -- 1986-10-15. [Geneva]: International Organization for Standardization, 1986.
ISO/IEC 10744
ISO (International Organization for Standardization). ISO/IEC 10744-1992 (E). Information technology -- Hypermedia/Time-based Structuring Language (HyTime). [Geneva]: International Organization for Standardization, 1992. Extended Facilities Annexe. [Geneva]: International Organization for Standardization, 1996.
WEBSGML
ISO (International Organization for Standardization). ISO 8879:1986 TC2. Information technology -- Document Description and Processing Languages. [Geneva]: International Organization for Standardization, 1998. (See http://www.sgmlsource.com/8879rev/n0029.htm.)
XML Names
Tim Bray, Dave Hollander, and Andrew Layman, editors. Namespaces in XML. Textuality, Hewlett-Packard, and Microsoft. World Wide Web Consortium, 1999. (See http://www.w3.org/TR/REC-xml-names/.)

B Character Classes

Following the characteristics defined in the Unicode standard, characters are classed as base characters (among others, these contain the alphabetic characters of the Latin alphabet), ideographic characters, and combining characters (among others, this class contains most diacritics) Digits and extenders are also distinguished.

Characters
[84]    Letter    ::=    BaseChar | Ideographic
[85]    BaseChar    ::=    [#x0041-#x005A] | [#x0061-#x007A] | [#x00C0-#x00D6] | [#x00D8-#x00F6] | [#x00F8-#x00FF] | [#x0100-#x0131] | [#x0134-#x013E] | [#x0141-#x0148] | [#x014A-#x017E] | [#x0180-#x01C3] | [#x01CD-#x01F0] | [#x01F4-#x01F5] | [#x01FA-#x0217] | [#x0250-#x02A8] | [#x02BB-#x02C1] | #x0386 | [#x0388-#x038A] | #x038C | [#x038E-#x03A1] | [#x03A3-#x03CE] | [#x03D0-#x03D6] | #x03DA | #x03DC | #x03DE | #x03E0 | [#x03E2-#x03F3] | [#x0401-#x040C] | [#x040E-#x044F] | [#x0451-#x045C] | [#x045E-#x0481] | [#x0490-#x04C4] | [#x04C7-#x04C8] | [#x04CB-#x04CC] | [#x04D0-#x04EB] | [#x04EE-#x04F5] | [#x04F8-#x04F9] | [#x0531-#x0556] | #x0559 | [#x0561-#x0586] | [#x05D0-#x05EA] | [#x05F0-#x05F2] | [#x0621-#x063A] | [#x0641-#x064A] | [#x0671-#x06B7] | [#x06BA-#x06BE] | [#x06C0-#x06CE] | [#x06D0-#x06D3] | #x06D5 | [#x06E5-#x06E6] | [#x0905-#x0939] | #x093D | [#x0958-#x0961] | [#x0985-#x098C] | [#x098F-#x0990] | [#x0993-#x09A8] | [#x09AA-#x09B0] | #x09B2 | [#x09B6-#x09B9] | [#x09DC-#x09DD] | [#x09DF-#x09E1] | [#x09F0-#x09F1] | [#x0A05-#x0A0A] | [#x0A0F-#x0A10] | [#x0A13-#x0A28] | [#x0A2A-#x0A30] | [#x0A32-#x0A33] | [#x0A35-#x0A36] | [#x0A38-#x0A39] | [#x0A59-#x0A5C] | #x0A5E | [#x0A72-#x0A74] | [#x0A85-#x0A8B] | #x0A8D | [#x0A8F-#x0A91] | [#x0A93-#x0AA8] | [#x0AAA-#x0AB0] | [#x0AB2-#x0AB3] | [#x0AB5-#x0AB9] | #x0ABD | #x0AE0 | [#x0B05-#x0B0C] | [#x0B0F-#x0B10] | [#x0B13-#x0B28] | [#x0B2A-#x0B30] | [#x0B32-#x0B33] | [#x0B36-#x0B39] | #x0B3D | [#x0B5C-#x0B5D] | [#x0B5F-#x0B61] | [#x0B85-#x0B8A] | [#x0B8E-#x0B90] | [#x0B92-#x0B95] | [#x0B99-#x0B9A] | #x0B9C | [#x0B9E-#x0B9F] | [#x0BA3-#x0BA4] | [#x0BA8-#x0BAA] | [#x0BAE-#x0BB5] | [#x0BB7-#x0BB9] | [#x0C05-#x0C0C] | [#x0C0E-#x0C10] | [#x0C12-#x0C28] | [#x0C2A-#x0C33] | [#x0C35-#x0C39] | [#x0C60-#x0C61] | [#x0C85-#x0C8C] | [#x0C8E-#x0C90] | [#x0C92-#x0CA8] | [#x0CAA-#x0CB3] | [#x0CB5-#x0CB9] | #x0CDE | [#x0CE0-#x0CE1] | [#x0D05-#x0D0C] | [#x0D0E-#x0D10] | [#x0D12-#x0D28] | [#x0D2A-#x0D39] | [#x0D60-#x0D61] | [#x0E01-#x0E2E] | #x0E30 | [#x0E32-#x0E33] | [#x0E40-#x0E45] | [#x0E81-#x0E82] | #x0E84 | [#x0E87-#x0E88] | #x0E8A | #x0E8D | [#x0E94-#x0E97] | [#x0E99-#x0E9F] | [#x0EA1-#x0EA3] | #x0EA5 | #x0EA7 | [#x0EAA-#x0EAB] | [#x0EAD-#x0EAE] | #x0EB0 | [#x0EB2-#x0EB3] | #x0EBD | [#x0EC0-#x0EC4] | [#x0F40-#x0F47] | [#x0F49-#x0F69] | [#x10A0-#x10C5] | [#x10D0-#x10F6] | #x1100 | [#x1102-#x1103] | [#x1105-#x1107] | #x1109 | [#x110B-#x110C] | [#x110E-#x1112] | #x113C | #x113E | #x1140 | #x114C | #x114E | #x1150 | [#x1154-#x1155] | #x1159 | [#x115F-#x1161] | #x1163 | #x1165 | #x1167 | #x1169 | [#x116D-#x116E] | [#x1172-#x1173] | #x1175 | #x119E | #x11A8 | #x11AB | [#x11AE-#x11AF] | [#x11B7-#x11B8] | #x11BA | [#x11BC-#x11C2] | #x11EB | #x11F0 | #x11F9 | [#x1E00-#x1E9B] | [#x1EA0-#x1EF9] | [#x1F00-#x1F15] | [#x1F18-#x1F1D] | [#x1F20-#x1F45] | [#x1F48-#x1F4D] | [#x1F50-#x1F57] | #x1F59 | #x1F5B | #x1F5D | [#x1F5F-#x1F7D] | [#x1F80-#x1FB4] | [#x1FB6-#x1FBC] | #x1FBE | [#x1FC2-#x1FC4] | [#x1FC6-#x1FCC] | [#x1FD0-#x1FD3] | [#x1FD6-#x1FDB] | [#x1FE0-#x1FEC] | [#x1FF2-#x1FF4] | [#x1FF6-#x1FFC] | #x2126 | [#x212A-#x212B] | #x212E | [#x2180-#x2182] | [#x3041-#x3094] | [#x30A1-#x30FA] | [#x3105-#x312C] | [#xAC00-#xD7A3]
[86]    Ideographic    ::=    [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]
[87]    CombiningChar    ::=    [#x0300-#x0345] | [#x0360-#x0361] | [#x0483-#x0486] | [#x0591-#x05A1] | [#x05A3-#x05B9] | [#x05BB-#x05BD] | #x05BF | [#x05C1-#x05C2] | #x05C4 | [#x064B-#x0652] | #x0670 | [#x06D6-#x06DC] | [#x06DD-#x06DF] | [#x06E0-#x06E4] | [#x06E7-#x06E8] | [#x06EA-#x06ED] | [#x0901-#x0903] | #x093C | [#x093E-#x094C] | #x094D | [#x0951-#x0954] | [#x0962-#x0963] | [#x0981-#x0983] | #x09BC | #x09BE | #x09BF | [#x09C0-#x09C4] | [#x09C7-#x09C8] | [#x09CB-#x09CD] | #x09D7 | [#x09E2-#x09E3] | #x0A02 | #x0A3C | #x0A3E | #x0A3F | [#x0A40-#x0A42] | [#x0A47-#x0A48] | [#x0A4B-#x0A4D] | [#x0A70-#x0A71] | [#x0A81-#x0A83] | #x0ABC | [#x0ABE-#x0AC5] | [#x0AC7-#x0AC9] | [#x0ACB-#x0ACD] | [#x0B01-#x0B03] | #x0B3C | [#x0B3E-#x0B43] | [#x0B47-#x0B48] | [#x0B4B-#x0B4D] | [#x0B56-#x0B57] | [#x0B82-#x0B83] | [#x0BBE-#x0BC2] | [#x0BC6-#x0BC8] | [#x0BCA-#x0BCD] | #x0BD7 | [#x0C01-#x0C03] | [#x0C3E-#x0C44] | [#x0C46-#x0C48] | [#x0C4A-#x0C4D] | [#x0C55-#x0C56] | [#x0C82-#x0C83] | [#x0CBE-#x0CC4] | [#x0CC6-#x0CC8] | [#x0CCA-#x0CCD] | [#x0CD5-#x0CD6] | [#x0D02-#x0D03] | [#x0D3E-#x0D43] | [#x0D46-#x0D48] | [#x0D4A-#x0D4D] | #x0D57 | #x0E31 | [#x0E34-#x0E3A] | [#x0E47-#x0E4E] | #x0EB1 | [#x0EB4-#x0EB9] | [#x0EBB-#x0EBC] | [#x0EC8-#x0ECD] | [#x0F18-#x0F19] | #x0F35 | #x0F37 | #x0F39 | #x0F3E | #x0F3F | [#x0F71-#x0F84] | [#x0F86-#x0F8B] | [#x0F90-#x0F95] | #x0F97 | [#x0F99-#x0FAD] | [#x0FB1-#x0FB7] | #x0FB9 | [#x20D0-#x20DC] | #x20E1 | [#x302A-#x302F] | #x3099 | #x309A
[88]    Digit    ::=    [#x0030-#x0039] | [#x0660-#x0669] | [#x06F0-#x06F9] | [#x0966-#x096F] | [#x09E6-#x09EF] | [#x0A66-#x0A6F] | [#x0AE6-#x0AEF] | [#x0B66-#x0B6F] | [#x0BE7-#x0BEF] | [#x0C66-#x0C6F] | [#x0CE6-#x0CEF] | [#x0D66-#x0D6F] | [#x0E50-#x0E59] | [#x0ED0-#x0ED9] | [#x0F20-#x0F29]
[89]    Extender    ::=    #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] | [#x309D-#x309E] | [#x30FC-#x30FE]

The character classes defined here can be derived from the Unicode 2.0 character database as follows:

  • Name start characters must have one of the categories Ll, Lu, Lo, Lt, Nl.

  • Name characters other than Name-start characters must have one of the categories Mc, Me, Mn, Lm, or Nd.

  • Characters in the compatibility area (i.e. with character code greater than #xF900 and less than #xFFFE) are not allowed in XML names.

  • Characters which have a font or compatibility decomposition (i.e. those with a "compatibility formatting tag" in field 5 of the database -- marked by field 5 beginning with a "<") are not allowed.

  • The following characters are treated as name-start characters rather than name characters, because the property file classifies them as Alphabetic: [#x02BB-#x02C1], #x0559, #x06E5, #x06E6.

  • Characters #x20DD-#x20E0 are excluded (in accordance with Unicode 2.0, section 5.14).

  • Character #x00B7 is classified as an extender, because the property list so identifies it.

  • Character #x0387 is added as a name character, because #x00B7 is its canonical equivalent.

  • Characters ':' and '_' are allowed as name-start characters.

  • Characters '-' and '.' are allowed as name characters.

C XML and SGML (Non-Normative)

XML is designed to be a subset of SGML, in that every XML document should also be a conforming SGML document. For a detailed comparison of the additional restrictions that XML places on documents beyond those of SGML, see [Clark].

D Expansion of Entity and Character References (Non-Normative)

This appendix contains some examples illustrating the sequence of entity- and character-reference recognition and expansion, as specified in 4.4 XML Processor Treatment of Entities and References.

If the DTD contains the declaration

<!ENTITY example "<p>An ampersand (&#38;#38;) may be escaped
numerically (&#38;#38;#38;) or with a general entity
(&amp;amp;).</p>" >

then the XML processor will recognize the character references when it parses the entity declaration, and resolve them before storing the following string as the value of the entity "example":

<p>An ampersand (&#38;) may be escaped
numerically (&#38;#38;) or with a general entity
(&amp;amp;).</p>

A reference in the document to "&example;" will cause the text to be reparsed, at which time the start- and end-tags of the p element will be recognized and the three references will be recognized and expanded, resulting in a p element with the following content (all data, no delimiters or markup):

An ampersand (&) may be escaped
numerically (&#38;) or with a general entity
(&amp;).

A more complex example will illustrate the rules and their effects fully. In the following example, the line numbers are solely for reference.

1 <?xml version='1.0'?>
2 <!DOCTYPE test [
3 <!ELEMENT test (#PCDATA) >
4 <!ENTITY % xx '&#37;zz;'>
5 <!ENTITY % zz '&#60;!ENTITY tricky "error-prone" >' >
6 %xx;
7 ]>
8 <test>This sample shows a &tricky; method.</test>

This produces the following:

  • in line 4, the reference to character 37 is expanded immediately, and the parameter entity "xx" is stored in the symbol table with the value "%zz;". Since the replacement text is not rescanned, the reference to parameter entity "zz" is not recognized. (And it would be an error if it were, since "zz" is not yet declared.)

  • in line 5, the character reference "&#60;" is expanded immediately and the parameter entity "zz" is stored with the replacement text "<!ENTITY tricky "error-prone" >", which is a well-formed entity declaration.

  • in line 6, the reference to "xx" is recognized, and the replacement text of "xx" (namely "%zz;") is parsed. The reference to "zz" is recognized in its turn, and its replacement text ("<!ENTITY tricky "error-prone" >") is parsed. The general entity "tricky" has now been declared, with the replacement text "error-prone".

  • in line 8, the reference to the general entity "tricky" is recognized, and it is expanded, so the full content of the test element is the self-describing (and ungrammatical) string This sample shows a error-prone method.

E Deterministic Content Models (Non-Normative)

As noted in 3.2.1 Element Content, it is required that content models in element type declarations be deterministic. This requirement is for compatibility with SGML (which calls deterministic content models "unambiguous"); XML processors built using SGML systems may flag non-deterministic content models as errors.

For example, the content model ((b, c) | (b, d)) is non-deterministic, because given an initial b the XML processor cannot know which b in the model is being matched without looking ahead to see which element follows the b. In this case, the two references to b can be collapsed into a single reference, making the model read (b, (c | d)). An initial b now clearly matches only a single name in the content model. The processor doesn't need to look ahead to see what follows; either c or d would be accepted.

More formally: a finite state automaton may be constructed from the content model using the standard algorithms, e.g. algorithm 3.5 in section 3.9 of Aho, Sethi, and Ullman [Aho/Ullman]. In many such algorithms, a follow set is constructed for each position in the regular expression (i.e., each leaf node in the syntax tree for the regular expression); if any position has a follow set in which more than one following position is labeled with the same element type name, then the content model is in error and may be reported as an error.

Algorithms exist which allow many but not all non-deterministic content models to be reduced automatically to equivalent deterministic models; see Brüggemann-Klein 1991 [Brüggemann-Klein].

F Autodetection of Character Encodings (Non-Normative)

The XML encoding declaration functions as an internal label on each entity, indicating which character encoding is in use. Before an XML processor can read the internal label, however, it apparently has to know what character encoding is in use--which is what the internal label is trying to indicate. In the general case, this is a hopeless situation. It is not entirely hopeless in XML, however, because XML limits the general case in two ways: each implementation is assumed to support only a finite set of character encodings, and the XML encoding declaration is restricted in position and content in order to make it feasible to autodetect the character encoding in use in each entity in normal cases. Also, in many cases other sources of information are available in addition to the XML data stream itself. Two cases may be distinguished, depending on whether the XML entity is presented to the processor without, or with, any accompanying (external) information. We consider the first case first.

F.1 Detection Without External Encoding Information

Because each XML entity not accompanied by external encoding information and not in UTF-8 or UTF-16 encoding must begin with an XML encoding declaration, in which the first characters must be '<?xml', any conforming processor can detect, after two to four octets of input, which of the following cases apply. In reading this list, it may help to know that in UCS-4, '<' is "#x0000003C" and '?' is "#x0000003F", and the Byte Order Mark required of UTF-16 data streams is "#xFEFF". The notation ## is used to denote any byte value except that two consecutive ##s cannot be both 00.

With a Byte Order Mark:

00 00 FE FF UCS-4, big-endian machine (1234 order)
FF FE 00 00 UCS-4, little-endian machine (4321 order)
00 00 FF FE UCS-4, unusual octet order (2143)
FE FF 00 00 UCS-4, unusual octet order (3412)
FE FF ## ## UTF-16, big-endian
FF FE ## ## UTF-16, little-endian
EF BB BF UTF-8

Without a Byte Order Mark:

00 00 00 3C UCS-4 or other encoding with a 32-bit code unit and ASCII characters encoded as ASCII values, in respectively big-endian (1234), little-endian (4321) and two unusual byte orders (2143 and 3412). The encoding declaration must be read to determine which of UCS-4 or other supported 32-bit encodings applies.
3C 00 00 00
00 00 3C 00
00 3C 00 00
00 3C 00 3F UTF-16BE or big-endian ISO-10646-UCS-2 or other encoding with a 16-bit code unit in big-endian order and ASCII characters encoded as ASCII values (the encoding declaration must be read to determine which)
3C 00 3F 00 UTF-16LE or little-endian ISO-10646-UCS-2 or other encoding with a 16-bit code unit in little-endian order and ASCII characters encoded as ASCII values (the encoding declaration must be read to determine which)
3C 3F 78 6D UTF-8, ISO 646, ASCII, some part of ISO 8859, Shift-JIS, EUC, or any other 7-bit, 8-bit, or mixed-width encoding which ensures that the characters of ASCII have their normal positions, width, and values; the actual encoding declaration must be read to detect which of these applies, but since all of these encodings use the same bit patterns for the relevant ASCII characters, the encoding declaration itself may be read reliably
4C 6F A7 94 EBCDIC (in some flavor; the full encoding declaration must be read to tell which code page is in use)
Other UTF-8 without an encoding declaration, or else the data stream is mislabeled (lacking a required encoding declaration), corrupt, fragmentary, or enclosed in a wrapper of some kind

Note:

In cases above which do not require reading the encoding declaration to determine the encoding, section 4.3.3 still requires that the encoding declaration, if present, be read and that the encoding name be checked to match the actual encoding of the entity. Also, it is possible that new character encodings will be invented that will make it necessary to use the encoding declaration to determine the encoding, in cases where this is not required at present.

This level of autodetection is enough to read the XML encoding declaration and parse the character-encoding identifier, which is still necessary to distinguish the individual members of each family of encodings (e.g. to tell UTF-8 from 8859, and the parts of 8859 from each other, or to distinguish the specific EBCDIC code page in use, and so on).

Because the contents of the encoding declaration are restricted to characters from the ASCII repertoire (however encoded), a processor can reliably read the entire encoding declaration as soon as it has detected which family of encodings is in use. Since in practice, all widely used character encodings fall into one of the categories above, the XML encoding declaration allows reasonably reliable in-band labeling of character encodings, even when external sources of information at the operating-system or transport-protocol level are unreliable. Character encodings such as UTF-7 that make overloaded usage of ASCII-valued bytes may fail to be reliably detected.

Once the processor has detected the character encoding in use, it can act appropriately, whether by invoking a separate input routine for each case, or by calling the proper conversion function on each character of input.

Like any self-labeling system, the XML encoding declaration will not work if any software changes the entity's character set or encoding without updating the encoding declaration. Implementors of character-encoding routines should be careful to ensure the accuracy of the internal and external information used to label the entity.

F.2 Priorities in the Presence of External Encoding Information

The second possible case occurs when the XML entity is accompanied by encoding information, as in some file systems and some network protocols. When multiple sources of information are available, their relative priority and the preferred method of handling conflict should be specified as part of the higher-level protocol used to deliver XML. In particular, please refer to [IETF RFC 2376] or its successor, which defines the text/xml and application/xml MIME types and provides some useful guidance. In the interests of interoperability, however, the following rule is recommended.

  • If an XML entity is in a file, the Byte-Order Mark and encoding declaration are used (if present) to determine the character encoding.

G W3C XML Working Group (Non-Normative)

This specification was prepared and approved for publication by the W3C XML Working Group (WG). WG approval of this specification does not necessarily imply that all WG members voted for its approval. The current and former members of the XML WG are:

  • Jon Bosak, Sun (Chair)
  • James Clark (Technical Lead)
  • Tim Bray, Textuality and Netscape (XML Co-editor)
  • Jean Paoli, Microsoft (XML Co-editor)
  • C. M. Sperberg-McQueen, U. of Ill. (XML Co-editor)
  • Dan Connolly, W3C (W3C Liaison)
  • Paula Angerstein, Texcel
  • Steve DeRose, INSO
  • Dave Hollander, HP
  • Eliot Kimber, ISOGEN
  • Eve Maler, ArborText
  • Tom Magliery, NCSA
  • Murray Maloney, SoftQuad, Grif SA, Muzmo and Veo Systems
  • MURATA Makoto (FAMILY Given), Fuji Xerox Information Systems
  • Joel Nava, Adobe
  • Conleth O'Connell, Vignette
  • Peter Sharpe, SoftQuad
  • John Tigue, DataChannel

H W3C XML Core Group (Non-Normative)

The second edition of this specification was prepared by the W3C XML Core Working Group (WG). The members of the WG at the time of publication of this edition were:

  • Paula Angerstein, Vignette
  • Daniel Austin, Ask Jeeves
  • Tim Boland
  • Allen Brown, Microsoft
  • Dan Connolly, W3C (Staff Contact)
  • John Cowan, Reuters Limited
  • John Evdemon, XMLSolutions Corporation
  • Paul Grosso, Arbortext (Co-Chair)
  • Arnaud Le Hors, IBM (Co-Chair)
  • Eve Maler, Sun Microsystems (Second Edition Editor)
  • Jonathan Marsh, Microsoft
  • MURATA Makoto (FAMILY Given), IBM
  • Mark Needleman, Data Research Associates
  • David Orchard, Jamcracker
  • Lew Shannon, NCR
  • Richard Tobin, University of Edinburgh
  • Daniel Veillard, W3C
  • Dan Vint, Lexica
  • Norman Walsh, Sun Microsystems
  • François Yergeau, Alis Technologies (Errata List Editor)
  • Kongyi Zhou, Oracle

I Production Notes (Non-Normative)

This Second Edition was encoded in the XMLspec DTD (which has documentation available). The HTML versions were produced with a combination of the xmlspec.xsl, diffspec.xsl, and REC-xml-2e.xsl XSLT stylesheets. The PDF version was produced with the html2ps facility and a distiller program.

libxml-security-java-1.5.6/samples/data/org/apache/0000755000175000017500000000000012273503736020737 5ustar tonytonylibxml-security-java-1.5.6/samples/data/org/apache/xml/0000755000175000017500000000000012273503736021537 5ustar tonytonylibxml-security-java-1.5.6/samples/data/org/apache/xml/security/0000755000175000017500000000000012273503736023406 5ustar tonytonylibxml-security-java-1.5.6/samples/data/org/apache/xml/security/temp/0000755000175000017500000000000012273503736024353 5ustar tonytonylibxml-security-java-1.5.6/samples/data/org/apache/xml/security/temp/id2.xml0000644000175000017500000000034007356025645025554 0ustar tonytony ]> Das N3 Element Das id2 Element libxml-security-java-1.5.6/samples/data/org/apache/xml/security/temp/id.xml0000644000175000017500000000021607356025645025474 0ustar tonytony ]> libxml-security-java-1.5.6/samples/data/org/apache/xml/security/temp/key/0000755000175000017500000000000012273503736025143 5ustar tonytonylibxml-security-java-1.5.6/samples/data/org/apache/xml/security/temp/key/dsavalue.xml0000644000175000017500000000136507356025645027502 0ustar tonytony

rFto8uPQM6y34FLPmDh40BLJ1rVrC8VeRquuhPZ6jYNFkQuwxnu/wCvIAMhukPBL FET8bJf/b2ef+oqxZajEb+88zlZoyG8g/wMfDBHTxz+CnowLahnCCTYBp5kt7G8q UobJuvjylwj1st7V9Lsu03iXMXtbiriUjFa5gURasN8=

kEjAFpCe4lcUOdwphpzf+tBaUds= oe14R2OtyKx+s+60O5BRNMOYpIg2TU/f15N3bsDErKOWtKXeNK9FS7dWStreDxo2 SSgOonqAd4FuJ/4uva7GgNL4ULIqY7E+mW5iwJ7n/WTELh98mEocsLXkNh24HcH4 BZfSCTruuzmCyjdV1KSqX/Eux04HfCWYmdxN3SQ/qqw= pA5NnZvcd574WRXuOA7ZfC/7Lqt4cB0MRLWtHubtJoVOao9ib5ry4rTk0r6ddnOv AIGKktutzK3ymvKleS3DOrwZQgJ+/BDWDW8kO9R66o6rdjiSobBi/0c2V1+dkqOg jFmKz395mvCOZGhC7fqAVhHat2EjGPMfgSZyABa7+1k=
././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibxml-security-java-1.5.6/samples/data/org/apache/xml/security/temp/key/signature-retrievalmethod-dsavalue.xmllibxml-security-java-1.5.6/samples/data/org/apache/xml/security/temp/key/signature-retrievalmethod-d0000644000175000017500000000134407356025645032512 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= Fj9OwSxpJppDnihohduxEUqu9/p6TR9PpgNGapaiBHGcY2QUDBaOEw== libxml-security-java-1.5.6/samples/data/org/apache/xml/security/temp/key/x509data.xml0000644000175000017500000000232107356025645027226 0ustar tonytony MIICwzCCAiygAwIBAgIGAOZ75QhHMA0GCSqGSIb3DQEBBQUAMG4xCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9yZSBUZWNobm9s b2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMRQwEgYDVQQDEwtYL1NlY3Vy ZSBDQTAeFw0wMTA1MTUxMDA0NDVaFw0wMjA1MTUxMDA0MzdaMGkxCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9yZSBUZWNobm9s b2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMQ8wDQYDVQQDEwZNb3JpZ3Uw gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALT4FJkxu+bB5lOwYa+irIb7sJU7 9sRQbYYnfw35D7NQkig+Lvi2LXXoA6ABull2bF+gu+sgRzezzOs6VsTL8z57TIz2 48HaMInFjOiqSANmzQKlXv1PjXSxSyHRi/3xc8gMfmCxeSPCZ5VpUiQoJ5ZpWcDz /LKvb0l9X0YBzMZlAgMBAAGjcTBvMA4GA1UdDwEB/wQEAwIHgDARBgNVHQ4ECgQI hbis35lIcu8wNQYDVR0SBC4wLIYqaHR0cDovL3d3dy5iYWx0aW1vcmUuY29tL3By b2R1Y3RzL3hzZWN1cmUvMBMGA1UdIwQMMAqACIXsHwqPfxrRMA0GCSqGSIb3DQEB BQUAA4GBAGSBdPou5CWAiyS5/f46m00mIIqO3xl6ZXOc/DRblF4gWnesd2F5v/s6 lAbqK8+wJM6GxvpOkSp6O1q6hZRyzF86QPlXCfhKAXkgzHXtb6PfT2m9t0iawnjy P+oyYofnFU5FFVOCujSrmFx3FCU+Wg6RT3v1jRoM3YfMYZYEzfTT ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibxml-security-java-1.5.6/samples/data/org/apache/xml/security/temp/key/signature-retrievalmethod-x509data.xmllibxml-security-java-1.5.6/samples/data/org/apache/xml/security/temp/key/signature-retrievalmethod-x0000644000175000017500000000401307356025645032532 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= ZrROxIcOSBvt5z2krEhQGSVIo4oAwTJwGAoFiWucvvEtY9k0L2R5RVHBnHCzk5GT kHGaT8SUqtnDeiH6W/2FNfciiV/w1pxURvNcyW8cYCn1B5XF68vILXUaptWf0DKw DvCFS+uLh0ACuEUfpe1Dx1fwB85lpK2iQcpx9dPaC4M= ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/samples/data/org/apache/xml/security/temp/key/retrieval-from-same-doc-key.xmllibxml-security-java-1.5.6/samples/data/org/apache/xml/security/temp/key/retrieval-from-same-doc-key0000644000175000017500000000014307356025645032302 0ustar tonytonylibxml-security-java-1.5.6/samples/data/org/apache/xml/security/temp/key/retrieval-from-same-doc.xml0000644000175000017500000000605507356025645032323 0ustar tonytony MIICwzCCAiygAwIBAgIGAOZ75QhHMA0GCSqGSIb3DQEBBQUAMG4xCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9yZSBUZWNobm9s b2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMRQwEgYDVQQDEwtYL1NlY3Vy ZSBDQTAeFw0wMTA1MTUxMDA0NDVaFw0wMjA1MTUxMDA0MzdaMGkxCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9yZSBUZWNobm9s b2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMQ8wDQYDVQQDEwZNb3JpZ3Uw gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALT4FJkxu+bB5lOwYa+irIb7sJU7 9sRQbYYnfw35D7NQkig+Lvi2LXXoA6ABull2bF+gu+sgRzezzOs6VsTL8z57TIz2 48HaMInFjOiqSANmzQKlXv1PjXSxSyHRi/3xc8gMfmCxeSPCZ5VpUiQoJ5ZpWcDz /LKvb0l9X0YBzMZlAgMBAAGjcTBvMA4GA1UdDwEB/wQEAwIHgDARBgNVHQ4ECgQI hbis35lIcu8wNQYDVR0SBC4wLIYqaHR0cDovL3d3dy5iYWx0aW1vcmUuY29tL3By b2R1Y3RzL3hzZWN1cmUvMBMGA1UdIwQMMAqACIXsHwqPfxrRMA0GCSqGSIb3DQEB BQUAA4GBAGSBdPou5CWAiyS5/f46m00mIIqO3xl6ZXOc/DRblF4gWnesd2F5v/s6 lAbqK8+wJM6GxvpOkSp6O1q6hZRyzF86QPlXCfhKAXkgzHXtb6PfT2m9t0iawnjy P+oyYofnFU5FFVOCujSrmFx3FCU+Wg6RT3v1jRoM3YfMYZYEzfTT This is no valid base64 encoded X509 Certificate so if the XPath ancestor::my:KeyMaterials[@Id="hjdsbadcret"] would have been used this wouldn't resolve to a valid key 60NvZvtdTB+7UnlLp/H24p7h4bs= FnwsSCWT6REW/8QnOjv0BK+r3Ly/4aB++pNnZp9pnz8f7+j33eKSj1soyQLq5zmN FwyeeQhnlTbR1kfve014ub9uHVC9A1cfmGZxQF1DC+enHt+AAPJaa278/ocgpMb5 Gibl4w7e3HAdBn/RJCrFJH77wY2oU5Ob0zIQtECVNJk= ancestor::my:KeyMaterials[@Id="thecert"] libxml-security-java-1.5.6/samples/data/org/apache/xml/security/temp/signature/0000755000175000017500000000000012273503736026354 5ustar tonytonylibxml-security-java-1.5.6/samples/data/org/apache/xml/security/temp/signature/signature-good.xml0000644000175000017500000000513210237440355032021 0ustar tonytony ipbs0UyafkdRIcfIo9zyZLce+CE= W1C5ZT2nQwXd+zIeZ1NUFjx5qn0ERyiLnSeYSS+FDG9yOpK1FK8AVA== MIIC9jCCArQCBDruqiowCwYHKoZIzjgEAwUAMGExCzAJBgNVBAYTAkRFMR0wGwYDVQQKExRVbml2 ZXJzaXR5IG9mIFNpZWdlbjEQMA4GA1UECxMHRkIxMk5VRTEhMB8GA1UEAxMYQ2hyaXN0aWFuIEdl dWVyLVBvbGxtYW5uMB4XDTAxMDUwMTEyMjA1OFoXDTA2MTAyMjEyMjA1OFowYTELMAkGA1UEBhMC REUxHTAbBgNVBAoTFFVuaXZlcnNpdHkgb2YgU2llZ2VuMRAwDgYDVQQLEwdGQjEyTlVFMSEwHwYD VQQDExhDaHJpc3RpYW4gR2V1ZXItUG9sbG1hbm4wggG3MIIBLAYHKoZIzjgEATCCAR8CgYEA/X9T gR11EilS30qcLuzk5/YRt1I870QAwx4/gLZRJmlFXUAiUftZPY1Y+r/F9bow9subVWzXgTuAHTRv 8mZgt2uZUKWkn5/oBHsQIsJPu6nX/rfGG/g7V+fGqKYVDwT7g/bTxR7DAjVUE1oWkTL2dfOuK2HX Ku/yIgMZndFIAccCFQCXYFCPFSMLzLKSuYKi64QL8Fgc9QKBgQD34aCF1ps93su8q1w2uFe5eZSv u/o66oL5V0wLPQeCZ1FZV4661FlP5nEHEIGAtEkWcSPoTCgWE7fPCTKMyKbhPBZ6i1R8jSjgo64e K7OmdZFuo38L+iE1YvH7YnoBJDvMpPG+qFGQiaiD3+Fa5Z8GkotmXoB7VSVkAUw7/s9JKgOBhAAC gYASWfn+G1k/nWntj9jX7Nk5JKaiLZ9BLR16eJJxqff33THLfdGs98Xmh2oRWZVh9PMV8oTP3hpR cRipjZUZVEIqsBlOGTVLCg4H5TJ81JWOiprh+mkhClNqUr8l5Hu7FBSvQB6inryeva7j0aKNiIvK 8vfHTiUZpnyNRhkveBlM0jALBgcqhkjOOAQDBQADLwAwLAIUPDd/UmB9GeHqvGjny30Bvjt0AkUC FA9ab72kKuB5geYGeckbBrcgPnZk /X9TgR11EilS30qcLuzk5/YRt1I870QAwx4/gLZRJmlFXUAiUftZPY1Y+r/F9bow9subVWzXgTuA HTRv8mZgt2uZUKWkn5/oBHsQIsJPu6nX/rfGG/g7V+fGqKYVDwT7g/bTxR7DAjVUE1oWkTL2dfOu K2HXKu/yIgMZndFIAcc= l2BQjxUjC8yykrmCouuEC/BYHPU= 9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJFnEj6EwoFhO3 zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImog9/hWuWfBpKL Zl6Ae1UlZAFMO/7PSSo= Eln5/htZP51p7Y/Y1+zZOSSmoi2fQS0deniScan3990xy33RrPfF5odqEVmVYfTzFfKEz94aUXEY qY2VGVRCKrAZThk1SwoOB+UyfNSVjoqa4fppIQpTalK/JeR7uxQUr0Aeop68nr2u49GijYiLyvL3 x04lGaZ8jUYZL3gZTNI= A text in a box ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibxml-security-java-1.5.6/samples/data/org/apache/xml/security/temp/signature/signature-bad-transform-algo.xmllibxml-security-java-1.5.6/samples/data/org/apache/xml/security/temp/signature/signature-bad-transfo0000644000175000017500000000510610237440355032473 0ustar tonytony ipbs0UyafkdRIcfIo9zyZLce+CE= W1C5ZT2nQwXd+zIeZ1NUFjx5qn0ERyiLnSeYSS+FDG9yOpK1FK8AVA== MIIC9jCCArQCBDruqiowCwYHKoZIzjgEAwUAMGExCzAJBgNVBAYTAkRFMR0wGwYDVQQKExRVbml2 ZXJzaXR5IG9mIFNpZWdlbjEQMA4GA1UECxMHRkIxMk5VRTEhMB8GA1UEAxMYQ2hyaXN0aWFuIEdl dWVyLVBvbGxtYW5uMB4XDTAxMDUwMTEyMjA1OFoXDTA2MTAyMjEyMjA1OFowYTELMAkGA1UEBhMC REUxHTAbBgNVBAoTFFVuaXZlcnNpdHkgb2YgU2llZ2VuMRAwDgYDVQQLEwdGQjEyTlVFMSEwHwYD VQQDExhDaHJpc3RpYW4gR2V1ZXItUG9sbG1hbm4wggG3MIIBLAYHKoZIzjgEATCCAR8CgYEA/X9T gR11EilS30qcLuzk5/YRt1I870QAwx4/gLZRJmlFXUAiUftZPY1Y+r/F9bow9subVWzXgTuAHTRv 8mZgt2uZUKWkn5/oBHsQIsJPu6nX/rfGG/g7V+fGqKYVDwT7g/bTxR7DAjVUE1oWkTL2dfOuK2HX Ku/yIgMZndFIAccCFQCXYFCPFSMLzLKSuYKi64QL8Fgc9QKBgQD34aCF1ps93su8q1w2uFe5eZSv u/o66oL5V0wLPQeCZ1FZV4661FlP5nEHEIGAtEkWcSPoTCgWE7fPCTKMyKbhPBZ6i1R8jSjgo64e K7OmdZFuo38L+iE1YvH7YnoBJDvMpPG+qFGQiaiD3+Fa5Z8GkotmXoB7VSVkAUw7/s9JKgOBhAAC gYASWfn+G1k/nWntj9jX7Nk5JKaiLZ9BLR16eJJxqff33THLfdGs98Xmh2oRWZVh9PMV8oTP3hpR cRipjZUZVEIqsBlOGTVLCg4H5TJ81JWOiprh+mkhClNqUr8l5Hu7FBSvQB6inryeva7j0aKNiIvK 8vfHTiUZpnyNRhkveBlM0jALBgcqhkjOOAQDBQADLwAwLAIUPDd/UmB9GeHqvGjny30Bvjt0AkUC FA9ab72kKuB5geYGeckbBrcgPnZk /X9TgR11EilS30qcLuzk5/YRt1I870QAwx4/gLZRJmlFXUAiUftZPY1Y+r/F9bow9subVWzXgTuA HTRv8mZgt2uZUKWkn5/oBHsQIsJPu6nX/rfGG/g7V+fGqKYVDwT7g/bTxR7DAjVUE1oWkTL2dfOu K2HXKu/yIgMZndFIAcc= l2BQjxUjC8yykrmCouuEC/BYHPU= 9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJFnEj6EwoFhO3 zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImog9/hWuWfBpKL Zl6Ae1UlZAFMO/7PSSo= Eln5/htZP51p7Y/Y1+zZOSSmoi2fQS0deniScan3990xy33RrPfF5odqEVmVYfTzFfKEz94aUXEY qY2VGVRCKrAZThk1SwoOB+UyfNSVjoqa4fppIQpTalK/JeR7uxQUr0Aeop68nr2u49GijYiLyvL3 x04lGaZ8jUYZL3gZTNI= A text in a box ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootlibxml-security-java-1.5.6/samples/data/org/apache/xml/security/temp/signature/signature-bad-sig-algo.xmllibxml-security-java-1.5.6/samples/data/org/apache/xml/security/temp/signature/signature-bad-sig-alg0000644000175000017500000000512210237440355032340 0ustar tonytony ipbs0UyafkdRIcfIo9zyZLce+CE= W1C5ZT2nQwXd+zIeZ1NUFjx5qn0ERyiLnSeYSS+FDG9yOpK1FK8AVA== MIIC9jCCArQCBDruqiowCwYHKoZIzjgEAwUAMGExCzAJBgNVBAYTAkRFMR0wGwYDVQQKExRVbml2 ZXJzaXR5IG9mIFNpZWdlbjEQMA4GA1UECxMHRkIxMk5VRTEhMB8GA1UEAxMYQ2hyaXN0aWFuIEdl dWVyLVBvbGxtYW5uMB4XDTAxMDUwMTEyMjA1OFoXDTA2MTAyMjEyMjA1OFowYTELMAkGA1UEBhMC REUxHTAbBgNVBAoTFFVuaXZlcnNpdHkgb2YgU2llZ2VuMRAwDgYDVQQLEwdGQjEyTlVFMSEwHwYD VQQDExhDaHJpc3RpYW4gR2V1ZXItUG9sbG1hbm4wggG3MIIBLAYHKoZIzjgEATCCAR8CgYEA/X9T gR11EilS30qcLuzk5/YRt1I870QAwx4/gLZRJmlFXUAiUftZPY1Y+r/F9bow9subVWzXgTuAHTRv 8mZgt2uZUKWkn5/oBHsQIsJPu6nX/rfGG/g7V+fGqKYVDwT7g/bTxR7DAjVUE1oWkTL2dfOuK2HX Ku/yIgMZndFIAccCFQCXYFCPFSMLzLKSuYKi64QL8Fgc9QKBgQD34aCF1ps93su8q1w2uFe5eZSv u/o66oL5V0wLPQeCZ1FZV4661FlP5nEHEIGAtEkWcSPoTCgWE7fPCTKMyKbhPBZ6i1R8jSjgo64e K7OmdZFuo38L+iE1YvH7YnoBJDvMpPG+qFGQiaiD3+Fa5Z8GkotmXoB7VSVkAUw7/s9JKgOBhAAC gYASWfn+G1k/nWntj9jX7Nk5JKaiLZ9BLR16eJJxqff33THLfdGs98Xmh2oRWZVh9PMV8oTP3hpR cRipjZUZVEIqsBlOGTVLCg4H5TJ81JWOiprh+mkhClNqUr8l5Hu7FBSvQB6inryeva7j0aKNiIvK 8vfHTiUZpnyNRhkveBlM0jALBgcqhkjOOAQDBQADLwAwLAIUPDd/UmB9GeHqvGjny30Bvjt0AkUC FA9ab72kKuB5geYGeckbBrcgPnZk /X9TgR11EilS30qcLuzk5/YRt1I870QAwx4/gLZRJmlFXUAiUftZPY1Y+r/F9bow9subVWzXgTuA HTRv8mZgt2uZUKWkn5/oBHsQIsJPu6nX/rfGG/g7V+fGqKYVDwT7g/bTxR7DAjVUE1oWkTL2dfOu K2HXKu/yIgMZndFIAcc= l2BQjxUjC8yykrmCouuEC/BYHPU= 9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJFnEj6EwoFhO3 zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImog9/hWuWfBpKL Zl6Ae1UlZAFMO/7PSSo= Eln5/htZP51p7Y/Y1+zZOSSmoi2fQS0deniScan3990xy33RrPfF5odqEVmVYfTzFfKEz94aUXEY qY2VGVRCKrAZThk1SwoOB+UyfNSVjoqa4fppIQpTalK/JeR7uxQUr0Aeop68nr2u49GijYiLyvL3 x04lGaZ8jUYZL3gZTNI= A text in a box ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/samples/data/org/apache/xml/security/temp/signature/signature-bad-c14n-algo.xmllibxml-security-java-1.5.6/samples/data/org/apache/xml/security/temp/signature/signature-bad-c14n-al0000644000175000017500000000511610237440355032157 0ustar tonytony ipbs0UyafkdRIcfIo9zyZLce+CE= W1C5ZT2nQwXd+zIeZ1NUFjx5qn0ERyiLnSeYSS+FDG9yOpK1FK8AVA== MIIC9jCCArQCBDruqiowCwYHKoZIzjgEAwUAMGExCzAJBgNVBAYTAkRFMR0wGwYDVQQKExRVbml2 ZXJzaXR5IG9mIFNpZWdlbjEQMA4GA1UECxMHRkIxMk5VRTEhMB8GA1UEAxMYQ2hyaXN0aWFuIEdl dWVyLVBvbGxtYW5uMB4XDTAxMDUwMTEyMjA1OFoXDTA2MTAyMjEyMjA1OFowYTELMAkGA1UEBhMC REUxHTAbBgNVBAoTFFVuaXZlcnNpdHkgb2YgU2llZ2VuMRAwDgYDVQQLEwdGQjEyTlVFMSEwHwYD VQQDExhDaHJpc3RpYW4gR2V1ZXItUG9sbG1hbm4wggG3MIIBLAYHKoZIzjgEATCCAR8CgYEA/X9T gR11EilS30qcLuzk5/YRt1I870QAwx4/gLZRJmlFXUAiUftZPY1Y+r/F9bow9subVWzXgTuAHTRv 8mZgt2uZUKWkn5/oBHsQIsJPu6nX/rfGG/g7V+fGqKYVDwT7g/bTxR7DAjVUE1oWkTL2dfOuK2HX Ku/yIgMZndFIAccCFQCXYFCPFSMLzLKSuYKi64QL8Fgc9QKBgQD34aCF1ps93su8q1w2uFe5eZSv u/o66oL5V0wLPQeCZ1FZV4661FlP5nEHEIGAtEkWcSPoTCgWE7fPCTKMyKbhPBZ6i1R8jSjgo64e K7OmdZFuo38L+iE1YvH7YnoBJDvMpPG+qFGQiaiD3+Fa5Z8GkotmXoB7VSVkAUw7/s9JKgOBhAAC gYASWfn+G1k/nWntj9jX7Nk5JKaiLZ9BLR16eJJxqff33THLfdGs98Xmh2oRWZVh9PMV8oTP3hpR cRipjZUZVEIqsBlOGTVLCg4H5TJ81JWOiprh+mkhClNqUr8l5Hu7FBSvQB6inryeva7j0aKNiIvK 8vfHTiUZpnyNRhkveBlM0jALBgcqhkjOOAQDBQADLwAwLAIUPDd/UmB9GeHqvGjny30Bvjt0AkUC FA9ab72kKuB5geYGeckbBrcgPnZk /X9TgR11EilS30qcLuzk5/YRt1I870QAwx4/gLZRJmlFXUAiUftZPY1Y+r/F9bow9subVWzXgTuA HTRv8mZgt2uZUKWkn5/oBHsQIsJPu6nX/rfGG/g7V+fGqKYVDwT7g/bTxR7DAjVUE1oWkTL2dfOu K2HXKu/yIgMZndFIAcc= l2BQjxUjC8yykrmCouuEC/BYHPU= 9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJFnEj6EwoFhO3 zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImog9/hWuWfBpKL Zl6Ae1UlZAFMO/7PSSo= Eln5/htZP51p7Y/Y1+zZOSSmoi2fQS0deniScan3990xy33RrPfF5odqEVmVYfTzFfKEz94aUXEY qY2VGVRCKrAZThk1SwoOB+UyfNSVjoqa4fppIQpTalK/JeR7uxQUr0Aeop68nr2u49GijYiLyvL3 x04lGaZ8jUYZL3gZTNI= A text in a box libxml-security-java-1.5.6/samples/data/org/apache/xml/security/temp/nuehomepage0000644000175000017500000000244307356025645026602 0ustar tonytony Home-Page des Instituts fuer Nachrichtenuebermittlung libxml-security-java-1.5.6/samples/data/org/apache/xml/security/temp/extension.xsl0000644000175000017500000000062407356025645027125 0ustar tonytony libxml-security-java-1.5.6/samples/data/at/0000755000175000017500000000000012273503736017333 5ustar tonytonylibxml-security-java-1.5.6/samples/data/at/iaik/0000755000175000017500000000000012273503736020250 5ustar tonytonylibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/0000755000175000017500000000000012273503736021400 5ustar tonytonylibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/signatureAlgorithms/0000755000175000017500000000000012273503736025433 5ustar tonytonylibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/signatureAlgorithms/digestInputs/0000755000175000017500000000000012273503736030115 5ustar tonytony././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/signatureAlgorithms/digestInputs/hMACSignature.firstReference.txtlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/signatureAlgorithms/digestInputs/hMACSignature0000644000175000017500000000015207400451635032464 0ustar tonytonySome text from IAIK././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/signatureAlgorithms/digestInputs/dSASignature.firstReference.txtlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/signatureAlgorithms/digestInputs/dSASignature.0000644000175000017500000000015207400451635032441 0ustar tonytonySome text from IAIK././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/signatureAlgorithms/digestInputs/rSASignature.firstReference.txtlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/signatureAlgorithms/digestInputs/rSASignature.0000644000175000017500000000015207400451635032457 0ustar tonytonySome text from IAIK././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/signatureAlgorithms/digestInputs/hMACShortSignature.firstReference.txtlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/signatureAlgorithms/digestInputs/hMACShortSign0000644000175000017500000000015207400451635032443 0ustar tonytonySome text from IAIKlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/signatureAlgorithms/signatures/0000755000175000017500000000000012273503736027617 5ustar tonytony././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/signatureAlgorithms/signatures/hMACSignature.xmllibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/signatureAlgorithms/signatures/hMACSignature.x0000644000175000017500000000130407400451635032434 0ustar tonytony 1603RGQeH5eHK+jJ2GxGYPhwnzbBBc=r7UpaFBMK5q7i0H3toGvAeFJLs0=Some text from IAIK././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/signatureAlgorithms/signatures/hMACShortSignature.xmllibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/signatureAlgorithms/signatures/hMACShortSignat0000644000175000017500000000125707400451635032501 0ustar tonytony 403RGQeH5eHK+jJ2GxGYPhwnzbBBc=Cx+HU+8=Some text from IAIK././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/signatureAlgorithms/signatures/rSASignature.xmllibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/signatureAlgorithms/signatures/rSASignature.xm0000644000175000017500000000213407400451635032530 0ustar tonytony 3RGQeH5eHK+jJ2GxGYPhwnzbBBc=JbrOi+nMW2K3YyckOpGrmm3UaEfWALq1tuN5WJO018g+Rwteu5wt+Veni3xjZTw8 755M8vGm7QSxnKTMnTHpH+fgMFPXpP3AcnB8CQgu31GV4L+hpslcqnOeMSQj/Wbd BX8TfB1Mcl8eP9P9SgomDRSB+gWTaDnsHL6qdK8lUmE=sDa5yzUv4IJmBY60GZCnkQSAhpG7tgxepi6sj3DlCzxjTtO5MNrjI9sK3WhimpNi NDmagzNEjxP3+x1huxL19GoIxZgr5O7E/F2IInSASVZTQsvWZlNauhRs0KZAszIS FchvrihILLoUf4tzaOSe6jgMEq6IkO0dWVpcFpAjXTc=Aw==Some text from IAIK././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/signatureAlgorithms/signatures/dSASignature.xmllibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/signatureAlgorithms/signatures/dSASignature.xm0000644000175000017500000000254207400451635032515 0ustar tonytony 3RGQeH5eHK+jJ2GxGYPhwnzbBBc=WrfXueeZRTbdpxe3Sam+YDQWvxzragcMRH0SdiL+1zFCPQXn3NdaEA==gn3UnKIFaYTpg3GxNA1dcYOShbJayqOC16w4bpRAhD8KRnqodajByjtwumqXBxL2 sZntPuxTE/OUCme71p84cilhqwI9F6EzPFIjXZ+30Q6V46Ve+bBPx8kgxXLaesPV DyQNu45U2p67cCERxTWC5TWFLp9ZOXmzMlDIhoOWGRc=+lB52vo/OrHoCm31vRbyJNj41xs=T731LjME8FHBfKVck4G1wX1MIFB2hTRQz9n8crLhsrFvoBBIuP8X56kK4eAYBT40 2dVh33FMyNySsVG132ZZcGteV8MZotZYO30y0unh8WY+qqxGDc1OZ3A29/m+Cy4W oF1pXVuBE6kDyzhjVhq9NkpdbBVmF/oQoyCZ4dI0dxM=MBVHib7T0JW8iPaZT++R/2zuoc5SbalCbTHjJDMLe/GWMKzGS8s+FEJldQmZC1R+ r6jIfAY+wjl3k+UTxRTCjqtM34wEBNvvgVHt95AOgBy/Mam9XKqx/dYLlK0jCk7T o/rfWtjhG2BbsJdI6r+68SM0OEBqL5bbYRxRGeWj/P0=Some text from IAIKlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/0000755000175000017500000000000012273503736023576 5ustar tonytonylibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/samples/0000755000175000017500000000000012273503736025242 5ustar tonytonylibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/samples/sampleXMLData.xml0000644000175000017500000000027707400451635030422 0ustar tonytony Hello, world! libxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/samples/sampleBase64EncodedData.txt0000644000175000017500000004257207400451635032313 0ustar tonytonyPCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFu c2l0aW9uYWwvL0VOIj4KPGh0bWw+CjxoZWFkPgo8dGl0bGU+QXNzb2NpYXRpbmcg U3R5bGUgU2hlZXRzIHdpdGggWE1MIGRvY3VtZW50czwvdGl0bGU+CjxsaW5rIHJl bD0ic3R5bGVzaGVldCIgdHlwZT0idGV4dC9jc3MiIGhyZWY9Imh0dHA6Ly93d3cu dzMub3JnL1N0eWxlU2hlZXRzL1RSL1czQy1SRUMiPgo8c3R5bGUgdHlwZT0idGV4 dC9jc3MiPmNvZGUgeyBmb250LWZhbWlseTogbW9ub3NwYWNlIH08L3N0eWxlPgo8 L2hlYWQ+Cjxib2R5Pgo8ZGl2IGNsYXNzPSJoZWFkIj4KPGEgaHJlZj0iaHR0cDov L3d3dy53My5vcmcvIj48aW1nIHNyYz0iaHR0cDovL3d3dy53My5vcmcvSWNvbnMv V1dXL3czY19ob21lIiBhbHQ9IlczQyIgaGVpZ2h0PSI0OCIgd2lkdGg9IjcyIj48 L2E+CjxoMT5Bc3NvY2lhdGluZyBTdHlsZSBTaGVldHMgd2l0aCBYTUwgZG9jdW1l bnRzPGJyPlZlcnNpb24gMS4wPC9oMT4KPGgyPlczQyBSZWNvbW1lbmRhdGlvbiAy OSBKdW5lIDE5OTk8L2gyPgo8ZGw+CjxkdD5UaGlzIHZlcnNpb246PC9kdD4KPGRk Pgo8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzA2L1JFQy14bWwtc3R5 bGVzaGVldC0xOTk5MDYyOSI+aHR0cDovL3d3dy53My5vcmcvMTk5OS8wNi9SRUMt eG1sLXN0eWxlc2hlZXQtMTk5OTA2Mjk8L2E+Cjxicj4KPC9kZD4KPGR0PkxhdGVz dCB2ZXJzaW9uOjwvZHQ+CjxkZD4KPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcv VFIveG1sLXN0eWxlc2hlZXQiPmh0dHA6Ly93d3cudzMub3JnL1RSL3htbC1zdHls ZXNoZWV0PC9hPgo8YnI+CjwvZGQ+CjxkdD5QcmV2aW91cyB2ZXJzaW9uOjwvZHQ+ CjxkZD4KPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcvVFIvMTk5OS94bWwtc3R5 bGVzaGVldC0xOTk5MDQyOCI+aHR0cDovL3d3dy53My5vcmcvVFIvMTk5OS94bWwt c3R5bGVzaGVldC0xOTk5MDQyODwvYT4KPGJyPgo8L2RkPgo8ZHQ+RWRpdG9yOjwv ZHQ+CjxkZD4KCkphbWVzIENsYXJrCjxhIGhyZWY9Im1haWx0bzpqamNAamNsYXJr LmNvbSI+Jmx0O2pqY0BqY2xhcmsuY29tJmd0OzwvYT4KPGJyPgo8L2RkPgo8L2Rs Pgo8cCBjbGFzcz0iY29weXJpZ2h0Ij4KPGEgaHJlZj0iaHR0cDovL3d3dy53My5v cmcvQ29uc29ydGl1bS9MZWdhbC9pcHItbm90aWNlLmh0bWwjQ29weXJpZ2h0Ij4K CQlDb3B5cmlnaHQ8L2E+ICZuYnNwOyZjb3B5OyZuYnNwOyAxOTk5IDxhIGhyZWY9 Imh0dHA6Ly93d3cudzMub3JnIj5XM0M8L2E+CgkJKDxhIGhyZWY9Imh0dHA6Ly93 d3cubGNzLm1pdC5lZHUiPk1JVDwvYT4sCgkJPGEgaHJlZj0iaHR0cDovL3d3dy5p bnJpYS5mci8iPklOUklBPC9hPiwKCQk8YSBocmVmPSJodHRwOi8vd3d3LmtlaW8u YWMuanAvIj5LZWlvPC9hPiApLCBBbGwgUmlnaHRzIFJlc2VydmVkLiBXM0MKCQk8 YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9Db25zb3J0aXVtL0xlZ2FsL2lwci1u b3RpY2UuaHRtbCNMZWdhbCBEaXNjbGFpbWVyIj5saWFiaWxpdHksPC9hPjxhIGhy ZWY9Imh0dHA6Ly93d3cudzMub3JnL0NvbnNvcnRpdW0vTGVnYWwvaXByLW5vdGlj ZS5odG1sI1czQyBUcmFkZW1hcmtzIj50cmFkZW1hcms8L2E+LAoJCTxhIGhyZWY9 Imh0dHA6Ly93d3cudzMub3JnL0NvbnNvcnRpdW0vTGVnYWwvY29weXJpZ2h0LWRv Y3VtZW50cy5odG1sIj5kb2N1bWVudCB1c2UgPC9hPmFuZAoJCTxhIGhyZWY9Imh0 dHA6Ly93d3cudzMub3JnL0NvbnNvcnRpdW0vTGVnYWwvY29weXJpZ2h0LXNvZnR3 YXJlLmh0bWwiPnNvZnR3YXJlIGxpY2Vuc2luZyA8L2E+cnVsZXMgYXBwbHkuCgk8 L3A+CjxociB0aXRsZT0iU2VwYXJhdG9yIGZvciBoZWFkZXIiPgo8L2Rpdj4KPGgy Pgo8YSBuYW1lPSJhYnN0cmFjdCI+QWJzdHJhY3Q8L2E+CjwvaDI+Cgo8cD5UaGlz IGRvY3VtZW50IGFsbG93cyBhIHN0eWxlIHNoZWV0IHRvIGJlIGFzc29jaWF0ZWQg d2l0aCBhbiBYTUwKZG9jdW1lbnQgYnkgaW5jbHVkaW5nIG9uZSBvciBtb3JlIHBy b2Nlc3NpbmcgaW5zdHJ1Y3Rpb25zIHdpdGggYQp0YXJnZXQgb2YgPGNvZGU+eG1s LXN0eWxlc2hlZXQ8L2NvZGU+IGluIHRoZSBkb2N1bWVudCdzIHByb2xvZy48L3A+ Cgo8aDI+CjxhIG5hbWU9InN0YXR1cyI+U3RhdHVzIG9mIHRoaXMgZG9jdW1lbnQ8 L2E+CjwvaDI+Cgo8cD5UaGlzIGRvY3VtZW50IGhhcyBiZWVuIHJldmlld2VkIGJ5 IFczQyBNZW1iZXJzIGFuZCBvdGhlciBpbnRlcmVzdGVkCnBhcnRpZXMgYW5kIGhh cyBiZWVuIGVuZG9yc2VkIGJ5IHRoZSBEaXJlY3RvciBhcyBhIFczQyA8YSBocmVm PSJodHRwOi8vd3d3LnczLm9yZy9Db25zb3J0aXVtL1Byb2Nlc3MvI1JlY3NXM0Mi PlJlY29tbWVuZGF0aW9uPC9hPi4gSXQKaXMgYSBzdGFibGUgZG9jdW1lbnQgYW5k IG1heSBiZSB1c2VkIGFzIHJlZmVyZW5jZSBtYXRlcmlhbCBvciBjaXRlZCBhcwph IG5vcm1hdGl2ZSByZWZlcmVuY2UgZnJvbSBvdGhlciBkb2N1bWVudHMuIFczQydz IHJvbGUgaW4gbWFraW5nIHRoZQpSZWNvbW1lbmRhdGlvbiBpcyB0byBkcmF3IGF0 dGVudGlvbiB0byB0aGUgc3BlY2lmaWNhdGlvbiBhbmQgdG8KcHJvbW90ZSBpdHMg d2lkZXNwcmVhZCBkZXBsb3ltZW50LiBUaGlzIGVuaGFuY2VzIHRoZSBmdW5jdGlv bmFsaXR5IGFuZAppbnRlcm9wZXJhYmlsaXR5IG9mIHRoZSBXZWIuPC9wPgoKPHA+ VGhlIGxpc3Qgb2Yga25vd24gZXJyb3JzIGluIHRoaXMgc3BlY2lmaWNhdGlvbnMg aXMgYXZhaWxhYmxlIGF0CjxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkv MDYvUkVDLXhtbC1zdHlsZXNoZWV0LTE5OTkwNjI5L2VycmF0YSI+aHR0cDovL3d3 dy53My5vcmcvVFIvMTk5OS94bWwtc3R5bGVzaGVldC0xOTk5MDYyOS9lcnJhdGE8 L2E+LjwvcD4KCjxwPkNvbW1lbnRzIG9uIHRoaXMgc3BlY2lmaWNhdGlvbiBtYXkg YmUgc2VudCB0byAmbHQ7PGEgaHJlZj0ibWFpbHRvOnd3dy14bWwtc3R5bGVzaGVl dC1jb21tZW50c0B3My5vcmciPnd3dy14bWwtc3R5bGVzaGVldC1jb21tZW50c0B3 My5vcmc8L2E+Jmd0Oy4gVGhlIGFyY2hpdmUgb2YgcHVibGljCmNvbW1lbnRzIGlz IGF2YWlsYWJsZSBhdCA8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9BcmNoaXZl cy9QdWJsaWMvd3d3LXhtbC1zdHlsZXNoZWV0LWNvbW1lbnRzIj5odHRwOi8vdzMu b3JnL0FyY2hpdmVzL1B1YmxpYy93d3cteG1sLXN0eWxlc2hlZXQtY29tbWVudHM8 L2E+LjwvcD4KCjxwPkEgbGlzdCBvZiBjdXJyZW50IFczQyBSZWNvbW1lbmRhdGlv bnMgYW5kIG90aGVyIHRlY2huaWNhbCBkb2N1bWVudHMKY2FuIGJlIGZvdW5kIGF0 IDxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3JnL1RSIj5odHRwOi8vd3d3LnczLm9y Zy9UUjwvYT4uPC9wPgoKPHA+VGhlIFdvcmtpbmcgR3JvdXAgZXhwZWN0cyBhZGRp dGlvbmFsIG1lY2hhbmlzbXMgZm9yIGxpbmtpbmcgc3R5bGUKc2hlZXRzIHRvIFhN TCBkb2N1bWVudCB0byBiZSBkZWZpbmVkIGluIGEgZnV0dXJlIHNwZWNpZmljYXRp b24uPC9wPgoKPHA+VGhlIHVzZSBvZiBYTUwgcHJvY2Vzc2luZyBpbnN0cnVjdGlv bnMgaW4gdGhpcyBzcGVjaWZpY2F0aW9uIHNob3VsZApub3QgYmUgdGFrZW4gYXMg YSBwcmVjZWRlbnQuICBUaGUgVzNDIGRvZXMgbm90IGFudGljaXBhdGUgcmVjb21t ZW5kaW5nCnRoZSB1c2Ugb2YgcHJvY2Vzc2luZyBpbnN0cnVjdGlvbnMgaW4gYW55 IGZ1dHVyZSBzcGVjaWZpY2F0aW9uLiAgVGhlCjxhIGhyZWY9IiNyYXRpb25hbGUi PlJhdGlvbmFsZTwvYT4gZXhwbGFpbnMgd2h5IHRoZXkgd2VyZSB1c2VkIGluCnRo aXMgc3BlY2lmaWNhdGlvbi48L3A+Cgo8cD5UaGlzIGRvY3VtZW50IHdhcyBwcm9k dWNlZCBhcyBwYXJ0IG9mIHRoZSA8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9Y TUwvQWN0aXZpdHkiPlczQyBYTUwgQWN0aXZpdHk8L2E+LjwvcD4KCgo8aDI+Cjxh IG5hbWU9ImNvbnRlbnRzIj5UYWJsZSBvZiBjb250ZW50czwvYT4KPC9oMj4xIDxh IGhyZWY9IiNUaGUgeG1sLXN0eWxlc2hlZXQgcHJvY2Vzc2luZyBpbnN0cnVjdGlv biI+VGhlIHhtbC1zdHlsZXNoZWV0IHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb248L2E+ Cjxicj4KPGgzPkFwcGVuZGljZXM8L2gzPkEgPGEgaHJlZj0iI1JlZmVyZW5jZXMi PlJlZmVyZW5jZXM8L2E+Cjxicj5CIDxhIGhyZWY9IiNyYXRpb25hbGUiPlJhdGlv bmFsZTwvYT4KPGJyPgo8aHI+Cgo8aDI+CjxhIG5hbWU9IlRoZSB4bWwtc3R5bGVz aGVldCBwcm9jZXNzaW5nIGluc3RydWN0aW9uIj48L2E+MSBUaGUgPGNvZGU+eG1s LXN0eWxlc2hlZXQ8L2NvZGU+IHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb248L2gyPgoK PHA+U3R5bGUgU2hlZXRzIGNhbiBiZSBhc3NvY2lhdGVkIHdpdGggYW4gWE1MPGEg aHJlZj0iI1hNTCI+W1hNTDEwXTwvYT4KZG9jdW1lbnQgYnkgdXNpbmcgYSBwcm9j ZXNzaW5nIGluc3RydWN0aW9uIHdob3NlIHRhcmdldCBpcwo8Y29kZT54bWwtc3R5 bGVzaGVldDwvY29kZT4uICBUaGlzIHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb24gZm9s bG93cyB0aGUKYmVoYXZpb3VyIG9mIHRoZSBIVE1MIDQuMCA8Y29kZT4mbHQ7TElO SwpSRUw9InN0eWxlc2hlZXQiJmd0OzwvY29kZT48YSBocmVmPSIjSFRNTCI+W0hU TUw0MF08L2E+LjwvcD4KCjxwPlRoZSA8Y29kZT54bWwtc3R5bGVzaGVldDwvY29k ZT4gcHJvY2Vzc2luZyBpbnN0cnVjdGlvbiBpcyBwYXJzZWQgaW4KdGhlIHNhbWUg d2F5IGFzIGEgc3RhcnQtdGFnLCB3aXRoIHRoZSBleGNlcHRpb24gdGhhdCBlbnRp dGllcyBvdGhlcgp0aGFuIHByZWRlZmluZWQgZW50aXRpZXMgbXVzdCBub3QgYmUg cmVmZXJlbmNlZC48L3A+Cgo8cD5UaGUgZm9sbG93aW5nIGdyYW1tYXIgaXMgZ2l2 ZW4gdXNpbmcgdGhlIHNhbWUgbm90YXRpb24gYXMgdGhlCmdyYW1tYXIgaW4gdGhl IFhNTCBSZWNvbW1lbmRhdGlvbjxhIGhyZWY9IiNYTUwiPltYTUwxMF08L2E+LiAg U3ltYm9scyBpbiB0aGUKZ3JhbW1hciB0aGF0IGFyZSBub3QgZGVmaW5lZCBoZXJl IGFyZSBkZWZpbmVkIGluIHRoZSBYTUwKUmVjb21tZW5kYXRpb24uPC9wPgoKPGg1 PnhtbC1zdHlsZXNoZWV0IHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb248L2g1Pgo8dGFi bGUgY2xhc3M9InNjcmFwIj4KPHRib2R5Pgo8dHIgdmFsaWduPSJiYXNlbGluZSI+ Cjx0ZD4KPGEgbmFtZT0iTlQtU3R5bGVTaGVldFBJIj48L2E+WzFdJm5ic3A7Jm5i c3A7Jm5ic3A7PC90ZD4KPHRkPlN0eWxlU2hlZXRQSTwvdGQ+Cjx0ZD4mbmJzcDsm bmJzcDsmbmJzcDs6Oj0mbmJzcDsmbmJzcDsmbmJzcDs8L3RkPgo8dGQ+JyZsdDs/ eG1sLXN0eWxlc2hlZXQnICg8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9UUi9S RUMteG1sI05ULVMiPlM8L2E+IDxhIGhyZWY9IiNOVC1Qc2V1ZG9BdHQiPlBzZXVk b0F0dDwvYT4pKiA8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9UUi9SRUMteG1s I05ULVMiPlM8L2E+PyAnPyZndDsnPC90ZD4KPHRkPgo8L3RkPgo8L3RyPgo8dHIg dmFsaWduPSJiYXNlbGluZSI+Cjx0ZD4KPGEgbmFtZT0iTlQtUHNldWRvQXR0Ij48 L2E+WzJdJm5ic3A7Jm5ic3A7Jm5ic3A7PC90ZD4KPHRkPlBzZXVkb0F0dDwvdGQ+ Cjx0ZD4mbmJzcDsmbmJzcDsmbmJzcDs6Oj0mbmJzcDsmbmJzcDsmbmJzcDs8L3Rk Pgo8dGQ+CjxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3JnL1RSL1JFQy14bWwjTlQt TmFtZSI+TmFtZTwvYT4gPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcvVFIvUkVD LXhtbCNOVC1TIj5TPC9hPj8gJz0nIDxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3Jn L1RSL1JFQy14bWwjTlQtUyI+UzwvYT4/IDxhIGhyZWY9IiNOVC1Qc2V1ZG9BdHRW YWx1ZSI+UHNldWRvQXR0VmFsdWU8L2E+CjwvdGQ+Cjx0ZD4KPC90ZD4KPC90cj4K PHRyIHZhbGlnbj0iYmFzZWxpbmUiPgo8dGQ+CjxhIG5hbWU9Ik5ULVBzZXVkb0F0 dFZhbHVlIj48L2E+WzNdJm5ic3A7Jm5ic3A7Jm5ic3A7PC90ZD4KPHRkPlBzZXVk b0F0dFZhbHVlPC90ZD4KPHRkPiZuYnNwOyZuYnNwOyZuYnNwOzo6PSZuYnNwOyZu YnNwOyZuYnNwOzwvdGQ+Cjx0ZD4oJyInIChbXiImbHQ7JmFtcDtdIHwgPGEgaHJl Zj0iaHR0cDovL3d3dy53My5vcmcvVFIvUkVDLXhtbCNOVC1DaGFyUmVmIj5DaGFy UmVmPC9hPiB8IDxhIGhyZWY9IiNOVC1QcmVkZWZFbnRpdHlSZWYiPlByZWRlZkVu dGl0eVJlZjwvYT4pKiAnIic8L3RkPgo8dGQ+CjwvdGQ+CjwvdHI+Cjx0ciB2YWxp Z249ImJhc2VsaW5lIj4KPHRkPgo8L3RkPgo8dGQ+CjwvdGQ+Cjx0ZD4KPC90ZD4K PHRkPnwgIiciIChbXicmbHQ7JmFtcDtdIHwgPGEgaHJlZj0iaHR0cDovL3d3dy53 My5vcmcvVFIvUkVDLXhtbCNOVC1DaGFyUmVmIj5DaGFyUmVmPC9hPiB8IDxhIGhy ZWY9IiNOVC1QcmVkZWZFbnRpdHlSZWYiPlByZWRlZkVudGl0eVJlZjwvYT4pKiAi JyIpPC90ZD4KPHRkPgo8L3RkPgo8L3RyPgo8dHIgdmFsaWduPSJiYXNlbGluZSI+ Cjx0ZD4KPC90ZD4KPHRkPgo8L3RkPgo8dGQ+CjwvdGQ+Cjx0ZD4tICg8YSBocmVm PSJodHRwOi8vd3d3LnczLm9yZy9UUi9SRUMteG1sI05ULUNoYXIiPkNoYXI8L2E+ KiAnPyZndDsnIDxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3JnL1RSL1JFQy14bWwj TlQtQ2hhciI+Q2hhcjwvYT4qKTwvdGQ+Cjx0ZD4KPC90ZD4KPC90cj4KPHRyIHZh bGlnbj0iYmFzZWxpbmUiPgo8dGQ+CjxhIG5hbWU9Ik5ULVByZWRlZkVudGl0eVJl ZiI+PC9hPls0XSZuYnNwOyZuYnNwOyZuYnNwOzwvdGQ+Cjx0ZD5QcmVkZWZFbnRp dHlSZWY8L3RkPgo8dGQ+Jm5ic3A7Jm5ic3A7Jm5ic3A7Ojo9Jm5ic3A7Jm5ic3A7 Jm5ic3A7PC90ZD4KPHRkPicmYW1wO2FtcDsnIHwgJyZhbXA7bHQ7JyB8ICcmYW1w O2d0OycgfCAnJmFtcDtxdW90OycgfCAnJmFtcDthcG9zOyc8L3RkPgo8dGQ+Cjwv dGQ+CjwvdHI+CjwvdGJvZHk+CjwvdGFibGU+Cgo8cD5JbiA8YSBocmVmPSIjTlQt UHNldWRvQXR0VmFsdWUiPlBzZXVkb0F0dFZhbHVlPC9hPiwgYSA8YSBocmVmPSJo dHRwOi8vd3d3LnczLm9yZy9UUi9SRUMteG1sI05ULUNoYXJSZWYiPkNoYXJSZWY8 L2E+IG9yIGEgPGEgaHJlZj0iI05ULVByZWRlZkVudGl0eVJlZiI+UHJlZGVmRW50 aXR5UmVmPC9hPiBpcyBpbnRlcnByZXRlZCBpbiB0aGUKc2FtZSBtYW5uZXIgYXMg aW4gYSBub3JtYWwgWE1MIGF0dHJpYnV0ZSB2YWx1ZS4gIFRoZSBhY3R1YWwgdmFs dWUgb2YKdGhlIHBzZXVkby1hdHRyaWJ1dGUgaXMgdGhlIHZhbHVlIGFmdGVyIGVh Y2ggcmVmZXJlbmNlIGlzIHJlcGxhY2VkIGJ5CnRoZSBjaGFyYWN0ZXIgaXQgcmVm ZXJlbmNlcy4gIFRoaXMgcmVwbGFjZW1lbnQgaXMgbm90IHBlcmZvcm1lZAphdXRv bWF0aWNhbGx5IGJ5IGFuIFhNTCBwcm9jZXNzb3IuPC9wPgoKPHA+VGhlIDxjb2Rl PnhtbC1zdHlsZXNoZWV0PC9jb2RlPiBwcm9jZXNzaW5nIGluc3RydWN0aW9uIGlz IGFsbG93ZWQKb25seSBpbiB0aGUgcHJvbG9nIG9mIGFuIFhNTCBkb2N1bWVudC4g VGhlIHN5bnRheCBvZiBYTUwgY29uc3RyYWlucwp3aGVyZSBwcm9jZXNzaW5nIGlu c3RydWN0aW9ucyBhcmUgYWxsb3dlZCBpbiB0aGUgcHJvbG9nOyB0aGUKPGNvZGU+ eG1sLXN0eWxlc2hlZXQ8L2NvZGU+IHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb24gaXMg YWxsb3dlZCBhbnl3aGVyZQppbiB0aGUgcHJvbG9nIHRoYXQgbWVldHMgdGhlc2Ug Y29uc3RyYWludHMuPC9wPgoKPGJsb2NrcXVvdGU+CjxiPk5PVEU6IDwvYj5JZiB0 aGUgPGNvZGU+eG1sLXN0eWxlc2hlZXQ8L2NvZGU+IHByb2Nlc3NpbmcgaW5zdHJ1 Y3Rpb24Kb2NjdXJzIGluIHRoZSBleHRlcm5hbCBEVEQgc3Vic2V0IG9yIGluIGEg cGFyYW1ldGVyIGVudGl0eSwgaXQgaXMKcG9zc2libGUgdGhhdCBpdCBtYXkgbm90 IGJlIHByb2Nlc3NlZCBieSBhIG5vbi12YWxpZGF0aW5nIFhNTApwcm9jZXNzb3Ig KHNlZSA8YSBocmVmPSIjWE1MIj5bWE1MMTBdPC9hPikuPC9ibG9ja3F1b3RlPgoK PHA+VGhlIGZvbGxvd2luZyBwc2V1ZG8gYXR0cmlidXRlcyBhcmUgZGVmaW5lZDwv cD4KCjxwcmU+aHJlZiBDREFUQSAjUkVRVUlSRUQKdHlwZSBDREFUQSAjUkVRVUlS RUQKdGl0bGUgQ0RBVEEgI0lNUExJRUQKbWVkaWEgQ0RBVEEgI0lNUExJRUQKY2hh cnNldCBDREFUQSAjSU1QTElFRAphbHRlcm5hdGUgKHllc3xubykgIm5vIjwvcHJl PgoKPHA+VGhlIHNlbWFudGljcyBvZiB0aGUgcHNldWRvLWF0dHJpYnV0ZXMgYXJl IGV4YWN0bHkgYXMgd2l0aAo8Y29kZT4mbHQ7TElOSyBSRUw9InN0eWxlc2hlZXQi Jmd0OzwvY29kZT4gaW4gSFRNTCA0LjAsIHdpdGggdGhlCmV4Y2VwdGlvbiBvZiB0 aGUgPGNvZGU+YWx0ZXJuYXRlPC9jb2RlPiBwc2V1ZG8tYXR0cmlidXRlLiAgSWYK PGNvZGU+YWx0ZXJuYXRlPSJ5ZXMiPC9jb2RlPiBpcyBzcGVjaWZpZWQsIHRoZW4g dGhlIHByb2Nlc3NpbmcKaW5zdHJ1Y3Rpb24gaGFzIHRoZSBzZW1hbnRpY3Mgb2Yg PGNvZGU+Jmx0O0xJTksgUkVMPSJhbHRlcm5hdGUKc3R5bGVzaGVldCImZ3Q7PC9j b2RlPiBpbnN0ZWFkIG9mIDxjb2RlPiZsdDtMSU5LClJFTD0ic3R5bGVzaGVldCIm Z3Q7PC9jb2RlPi48L3A+Cgo8YmxvY2txdW90ZT4KPGI+Tk9URTogPC9iPlNpbmNl IHRoZSB2YWx1ZSBvZiB0aGUgPGNvZGU+aHJlZjwvY29kZT4gYXR0cmlidXRlIGlz IGEgVVJJCnJlZmVyZW5jZSwgaXQgbWF5IGJlIGEgcmVsYXRpdmUgVVJJIGFuZCBp dCBtYXkgY29udGFpbiBhIGZyYWdtZW50CmlkZW50aWZpZXIuIEluIHBhcnRpY3Vs YXIgdGhlIFVSSSByZWZlcmVuY2UgbWF5IGNvbnRhaW4gb25seSBhCmZyYWdtZW50 IGlkZW50aWZpZXIuICBTdWNoIGEgVVJJIHJlZmVyZW5jZSBpcyBhIHJlZmVyZW5j ZSB0byBhIHBhcnQgb2YKdGhlIGRvY3VtZW50IGNvbnRhaW5pbmcgdGhlIDxjb2Rl PnhtbC1zdHlsZXNoZWV0PC9jb2RlPiBwcm9jZXNzaW5nCmluc3RydWN0aW9uIChz ZWUgPGEgaHJlZj0iI1JGQzIzOTYiPltSRkMyMzk2XTwvYT4pLiBUaGUgY29uc2Vx dWVuY2UgaXMgdGhhdCB0aGUKPGNvZGU+eG1sLXN0eWxlc2hlZXQ8L2NvZGU+IHBy b2Nlc3NpbmcgaW5zdHJ1Y3Rpb24gYWxsb3dzIHN0eWxlIHNoZWV0cwp0byBiZSBl bWJlZGRlZCBpbiB0aGUgc2FtZSBkb2N1bWVudCBhcyB0aGUgPGNvZGU+eG1sLXN0 eWxlc2hlZXQ8L2NvZGU+CnByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb24uPC9ibG9ja3F1 b3RlPgoKPHA+SW4gc29tZSBjYXNlcywgc3R5bGUgc2hlZXRzIG1heSBiZSBsaW5r ZWQgd2l0aCBhbiBYTUwgZG9jdW1lbnQgYnkKbWVhbnMgZXh0ZXJuYWwgdG8gdGhl IGRvY3VtZW50LiBGb3IgZXhhbXBsZSwgZWFybGllciB2ZXJzaW9ucyBvZiBIVFRQ CjxhIGhyZWY9IiNSRkMyMDY4Ij5bUkZDMjA2OF08L2E+IChzZWN0aW9uIDE5LjYu Mi40KSBhbGxvd2VkIHN0eWxlIHNoZWV0cyB0byBiZQphc3NvY2lhdGVkIHdpdGgg WE1MIGRvY3VtZW50cyBieSBtZWFucyBvZiB0aGUgPGNvZGU+TGluazwvY29kZT4K aGVhZGVyLiAgQW55IGxpbmtzIHRvIHN0eWxlIHNoZWV0cyB0aGF0IGFyZSBzcGVj aWZpZWQgZXh0ZXJuYWxseSB0byB0aGUKZG9jdW1lbnQgYXJlIGNvbnNpZGVyZWQg dG8gb2NjdXIgYmVmb3JlIHRoZSBsaW5rcyBzcGVjaWZpZWQgYnkgdGhlCjxjb2Rl PnhtbC1zdHlsZXNoZWV0PC9jb2RlPiBwcm9jZXNzaW5nIGluc3RydWN0aW9ucy4g IFRoaXMgaXMgdGhlIHNhbWUKYXMgaW4gSFRNTCA0LjAgKHNlZSA8YSBocmVmPSJo dHRwOi8vd3d3LnczLm9yZy9UUi9SRUMtaHRtbDQwL3ByZXNlbnQvc3R5bGVzLmh0 bWwjaC0xNC42Ij5zZWN0aW9uCjE0LjY8L2E+KS48L3A+Cgo8cD5IZXJlIGFyZSBz b21lIGV4YW1wbGVzIGZyb20gSFRNTCA0LjAgd2l0aCB0aGUgY29ycmVzcG9uZGlu Zwpwcm9jZXNzaW5nIGluc3RydWN0aW9uOjwvcD4KCjxwcmU+Jmx0O0xJTksgaHJl Zj0ibXlzdHlsZS5jc3MiIHJlbD0ic3R5bGUgc2hlZXQiIHR5cGU9InRleHQvY3Nz IiZndDsKJmx0Oz94bWwtc3R5bGVzaGVldCBocmVmPSJteXN0eWxlLmNzcyIgdHlw ZT0idGV4dC9jc3MiPyZndDsKCiZsdDtMSU5LIGhyZWY9Im15c3R5bGUuY3NzIiB0 aXRsZT0iQ29tcGFjdCIgcmVsPSJzdHlsZXNoZWV0Igp0eXBlPSJ0ZXh0L2NzcyIm Z3Q7CiZsdDs/eG1sLXN0eWxlc2hlZXQgaHJlZj0ibXlzdHlsZS5jc3MiIHRpdGxl PSJDb21wYWN0IiB0eXBlPSJ0ZXh0L2NzcyI/Jmd0OwoKJmx0O0xJTksgaHJlZj0i bXlzdHlsZS5jc3MiIHRpdGxlPSJNZWRpdW0iIHJlbD0iYWx0ZXJuYXRlIHN0eWxl c2hlZXQiCnR5cGU9InRleHQvY3NzIiZndDsKJmx0Oz94bWwtc3R5bGVzaGVldCBh bHRlcm5hdGU9InllcyIgaHJlZj0ibXlzdHlsZS5jc3MiIHRpdGxlPSJNZWRpdW0i CnR5cGU9InRleHQvY3NzIj8mZ3Q7PC9wcmU+Cgo8cD5NdWx0aXBsZSA8Y29kZT54 bWwtc3R5bGVzaGVldDwvY29kZT4gcHJvY2Vzc2luZyBpbnN0cnVjdGlvbnMgYXJl CmFsc28gYWxsb3dlZCB3aXRoIGV4YWN0bHkgdGhlIHNhbWUgc2VtYW50aWNzIGFz IHdpdGggPGNvZGU+TElOSwpSRUw9InN0eWxlc2hlZXQiPC9jb2RlPi4gRm9yIGV4 YW1wbGUsPC9wPgoKPHByZT4mbHQ7TElOSyByZWw9ImFsdGVybmF0ZSBzdHlsZXNo ZWV0IiB0aXRsZT0iY29tcGFjdCIgaHJlZj0ic21hbGwtYmFzZS5jc3MiCnR5cGU9 InRleHQvY3NzIiZndDsKJmx0O0xJTksgcmVsPSJhbHRlcm5hdGUgc3R5bGVzaGVl dCIgdGl0bGU9ImNvbXBhY3QiIGhyZWY9InNtYWxsLWV4dHJhcy5jc3MiCnR5cGU9 InRleHQvY3NzIiZndDsKJmx0O0xJTksgcmVsPSJhbHRlcm5hdGUgc3R5bGVzaGVl dCIgdGl0bGU9ImJpZyBwcmludCIgaHJlZj0iYmlncHJpbnQuY3NzIgp0eXBlPSJ0 ZXh0L2NzcyImZ3Q7CiZsdDtMSU5LIHJlbD0ic3R5bGVzaGVldCIgaHJlZj0iY29t bW9uLmNzcyIgdHlwZT0idGV4dC9jc3MiJmd0OzwvcHJlPgoKPHA+d291bGQgYmUg ZXF1aXZhbGVudCB0bzo8L3A+Cgo8cHJlPiZsdDs/eG1sLXN0eWxlc2hlZXQgYWx0 ZXJuYXRlPSJ5ZXMiIHRpdGxlPSJjb21wYWN0IiBocmVmPSJzbWFsbC1iYXNlLmNz cyIKdHlwZT0idGV4dC9jc3MiPyZndDsKJmx0Oz94bWwtc3R5bGVzaGVldCBhbHRl cm5hdGU9InllcyIgdGl0bGU9ImNvbXBhY3QiIGhyZWY9InNtYWxsLWV4dHJhcy5j c3MiCnR5cGU9InRleHQvY3NzIj8mZ3Q7CiZsdDs/eG1sLXN0eWxlc2hlZXQgYWx0 ZXJuYXRlPSJ5ZXMiIHRpdGxlPSJiaWcgcHJpbnQiIGhyZWY9ImJpZ3ByaW50LmNz cyIKdHlwZT0idGV4dC9jc3MiPyZndDsKJmx0Oz94bWwtc3R5bGVzaGVldCBocmVm PSJjb21tb24uY3NzIiB0eXBlPSJ0ZXh0L2NzcyI/Jmd0OzwvcHJlPgoKCgo8aHIg dGl0bGU9IlNlcGFyYXRvciBmcm9tIGZvb3RlciI+Cgo8aDI+CjxhIG5hbWU9IlJl ZmVyZW5jZXMiPjwvYT5BIFJlZmVyZW5jZXM8L2gyPgoKPGRsPgoKPGR0Pgo8YSBu YW1lPSJIVE1MIj5IVE1MNDA8L2E+CjwvZHQ+CjxkZD5Xb3JsZCBXaWRlIFdlYgpD b25zb3J0aXVtLiA8aT5IVE1MIDQuMCBTcGVjaWZpY2F0aW9uLjwvaT4gVzNDIFJl Y29tbWVuZGF0aW9uLiBTZWUKPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcvVFIv UkVDLWh0bWw0MCI+aHR0cDovL3d3dy53My5vcmcvVFIvUkVDLWh0bWw0MDwvYT4K PC9kZD4KCjxkdD4KPGEgbmFtZT0iUkZDMjA2OCI+UkZDMjA2ODwvYT4KPC9kdD4K PGRkPlIuIEZpZWxkaW5nLCBKLiBHZXR0eXMsIEouIE1vZ3VsLApILiBGcnlzdHlr IE5pZWxzZW4sIGFuZCBULiBCZXJuZXJzLUxlZS4gIDxpPkh5cGVydGV4dCBUcmFu c2ZlcgpQcm90b2NvbCAtLSBIVFRQLzEuMS48L2k+LiBJRVRGIFJGQyAyMDY4LiBT ZWUgPGEgaHJlZj0iaHR0cDovL3d3dy5pZXRmLm9yZy9yZmMvcmZjMjA2OC50eHQi Pmh0dHA6Ly93d3cuaWV0Zi5vcmcvcmZjL3JmYzIwNjgudHh0PC9hPi48L2RkPgoK PGR0Pgo8YSBuYW1lPSJSRkMyMzk2Ij5SRkMyMzk2PC9hPgo8L2R0Pgo8ZGQ+VC4g QmVybmVycy1MZWUsIFIuIEZpZWxkaW5nLCBhbmQKTC4gTWFzaW50ZXIuICA8aT5V bmlmb3JtIFJlc291cmNlIElkZW50aWZpZXJzIChVUkkpOiBHZW5lcmljClN5bnRh eDwvaT4uIElFVEYgUkZDIDIzOTYuIFNlZSA8YSBocmVmPSJodHRwOi8vd3d3Lmll dGYub3JnL3JmYy9yZmMyMzk2LnR4dCI+aHR0cDovL3d3dy5pZXRmLm9yZy9yZmMv cmZjMjM5Ni50eHQ8L2E+LjwvZGQ+Cgo8ZHQ+CjxhIG5hbWU9IlhNTCI+WE1MMTA8 L2E+CjwvZHQ+CjxkZD5Xb3JsZCBXaWRlIFdlYiBDb25zb3J0aXVtLiA8aT5FeHRl bnNpYmxlCk1hcmt1cCBMYW5ndWFnZSAoWE1MKSAxLjAuPC9pPiBXM0MgUmVjb21t ZW5kYXRpb24uIFNlZSA8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9UUi8xOTk4 L1JFQy14bWwtMTk5ODAyMTAiPmh0dHA6Ly93d3cudzMub3JnL1RSLzE5OTgvUkVD LXhtbC0xOTk4MDIxMDwvYT4KPC9kZD4KCjwvZGw+CgoKCgo8aDI+CjxhIG5hbWU9 InJhdGlvbmFsZSI+PC9hPkIgUmF0aW9uYWxlPC9oMj4KCjxwPlRoZXJlIHdhcyBh biB1cmdlbnQgcmVxdWlyZW1lbnQgZm9yIGEgc3BlY2lmaWNhdGlvbiBmb3Igc3R5 bGUgc2hlZXQKbGlua2luZyB0aGF0IGNvdWxkIGJlIGNvbXBsZXRlZCBpbiB0aW1l IGZvciB0aGUgbmV4dCByZWxlYXNlIGZyb20KbWFqb3IgYnJvd3NlciB2ZW5kb3Jz LiAgT25seSBieSBjaG9vc2luZyBhIHNpbXBsZSBtZWNoYW5pc20gY2xvc2VseQpi YXNlZCBvbiBhIHByb3ZlbiBleGlzdGluZyBtZWNoYW5pc20gY291bGQgdGhlIHNw ZWNpZmljYXRpb24gYmUKY29tcGxldGVkIGluIHRpbWUgdG8gbWVldCB0aGlzIHJl cXVpcmVtZW50LjwvcD4KCjxwPlVzZSBvZiBhIHByb2Nlc3NpbmcgaW5zdHJ1Y3Rp b24gYXZvaWRzIHBvbGx1dGluZyB0aGUgbWFpbiBkb2N1bWVudApzdHJ1Y3R1cmUg d2l0aCBhcHBsaWNhdGlvbiBzcGVjaWZpYyBwcm9jZXNzaW5nIGluZm9ybWF0aW9u LjwvcD4KCjxwPlRoZSBtZWNoYW5pc20gY2hvc2VuIGZvciB0aGlzIHZlcnNpb24g b2YgdGhlIHNwZWNpZmljYXRpb24gaXMgbm90IGEKY29uc3RyYWludCBvbiB0aGUg YWRkaXRpb25hbCBtZWNoYW5pc21zIHBsYW5uZWQgZm9yIGZ1dHVyZSB2ZXJzaW9u cy4KVGhlcmUgaXMgbm8gZXhwZWN0YXRpb24gdGhhdCB0aGVzZSB3aWxsIHVzZSBw cm9jZXNzaW5nIGluc3RydWN0aW9uczsKaW5kZWVkIHRoZXkgbWF5IG5vdCBpbmNs dWRlIHRoZSBsaW5raW5nIGluZm9ybWF0aW9uIGluIHRoZSBzb3VyY2UKZG9jdW1l bnQuPC9wPgoKCgoKPC9ib2R5Pgo8L2h0bWw+Cg== libxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/digestInputs/0000755000175000017500000000000012273503736026260 5ustar tonytony././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/digestInputs/xPathSignature.firstReference.txtlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/digestInputs/xPathSignature.firstRe0000644000175000017500000000015107400451635032557 0ustar tonytonyA text from IAIK././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/digestInputs/xPathSignature.secondReference.txtlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/digestInputs/xPathSignature.secondR0000644000175000017500000000020307400451635032534 0ustar tonytonyA text from IAIK././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/digestInputs/c14NSignature.secondReference.txtlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/digestInputs/c14NSignature.secondRe0000644000175000017500000000024107400451635032324 0ustar tonytony Hello, world! ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/digestInputs/envelopedSignatureSignature.firstReference.txtlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/digestInputs/envelopedSignatureSign0000644000175000017500000000015507400451635032664 0ustar tonytony Some Data from IAIK ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/digestInputs/xPathSignature.thirdReference.txtlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/digestInputs/xPathSignature.thirdRe0000644000175000017500000000015107400451635032542 0ustar tonytonyA text from IAIK././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/digestInputs/base64Signature.firstReference.txtlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/digestInputs/base64Signature.firstR0000644000175000017500000003226007400451635032420 0ustar tonytony Associating Style Sheets with XML documents
W3C

Associating Style Sheets with XML documents
Version 1.0

W3C Recommendation 29 June 1999

This version:
http://www.w3.org/1999/06/REC-xml-stylesheet-19990629
Latest version:
http://www.w3.org/TR/xml-stylesheet
Previous version:
http://www.w3.org/TR/1999/xml-stylesheet-19990428
Editor:
James Clark <jjc@jclark.com>

Abstract

This document allows a style sheet to be associated with an XML document by including one or more processing instructions with a target of xml-stylesheet in the document's prolog.

Status of this document

This document has been reviewed by W3C Members and other interested parties and has been endorsed by the Director as a W3C Recommendation. It is a stable document and may be used as reference material or cited as a normative reference from other documents. W3C's role in making the Recommendation is to draw attention to the specification and to promote its widespread deployment. This enhances the functionality and interoperability of the Web.

The list of known errors in this specifications is available at http://www.w3.org/TR/1999/xml-stylesheet-19990629/errata.

Comments on this specification may be sent to <www-xml-stylesheet-comments@w3.org>. The archive of public comments is available at http://w3.org/Archives/Public/www-xml-stylesheet-comments.

A list of current W3C Recommendations and other technical documents can be found at http://www.w3.org/TR.

The Working Group expects additional mechanisms for linking style sheets to XML document to be defined in a future specification.

The use of XML processing instructions in this specification should not be taken as a precedent. The W3C does not anticipate recommending the use of processing instructions in any future specification. The Rationale explains why they were used in this specification.

This document was produced as part of the W3C XML Activity.

Table of contents

1 The xml-stylesheet processing instruction

Appendices

A References
B Rationale

1 The xml-stylesheet processing instruction

Style Sheets can be associated with an XML[XML10] document by using a processing instruction whose target is xml-stylesheet. This processing instruction follows the behaviour of the HTML 4.0 <LINK REL="stylesheet">[HTML40].

The xml-stylesheet processing instruction is parsed in the same way as a start-tag, with the exception that entities other than predefined entities must not be referenced.

The following grammar is given using the same notation as the grammar in the XML Recommendation[XML10]. Symbols in the grammar that are not defined here are defined in the XML Recommendation.

xml-stylesheet processing instruction
[1]    StyleSheetPI    ::=    '<?xml-stylesheet' (S PseudoAtt)* S? '?>'
[2]    PseudoAtt    ::=    Name S? '=' S? PseudoAttValue
[3]    PseudoAttValue    ::=    ('"' ([^"<&] | CharRef | PredefEntityRef)* '"'
| "'" ([^'<&] | CharRef | PredefEntityRef)* "'")
- (Char* '?>' Char*)
[4]    PredefEntityRef    ::=    '&amp;' | '&lt;' | '&gt;' | '&quot;' | '&apos;'

In PseudoAttValue, a CharRef or a PredefEntityRef is interpreted in the same manner as in a normal XML attribute value. The actual value of the pseudo-attribute is the value after each reference is replaced by the character it references. This replacement is not performed automatically by an XML processor.

The xml-stylesheet processing instruction is allowed only in the prolog of an XML document. The syntax of XML constrains where processing instructions are allowed in the prolog; the xml-stylesheet processing instruction is allowed anywhere in the prolog that meets these constraints.

NOTE: If the xml-stylesheet processing instruction occurs in the external DTD subset or in a parameter entity, it is possible that it may not be processed by a non-validating XML processor (see [XML10]).

The following pseudo attributes are defined

href CDATA #REQUIRED
type CDATA #REQUIRED
title CDATA #IMPLIED
media CDATA #IMPLIED
charset CDATA #IMPLIED
alternate (yes|no) "no"

The semantics of the pseudo-attributes are exactly as with <LINK REL="stylesheet"> in HTML 4.0, with the exception of the alternate pseudo-attribute. If alternate="yes" is specified, then the processing instruction has the semantics of <LINK REL="alternate stylesheet"> instead of <LINK REL="stylesheet">.

NOTE: Since the value of the href attribute is a URI reference, it may be a relative URI and it may contain a fragment identifier. In particular the URI reference may contain only a fragment identifier. Such a URI reference is a reference to a part of the document containing the xml-stylesheet processing instruction (see [RFC2396]). The consequence is that the xml-stylesheet processing instruction allows style sheets to be embedded in the same document as the xml-stylesheet processing instruction.

In some cases, style sheets may be linked with an XML document by means external to the document. For example, earlier versions of HTTP [RFC2068] (section 19.6.2.4) allowed style sheets to be associated with XML documents by means of the Link header. Any links to style sheets that are specified externally to the document are considered to occur before the links specified by the xml-stylesheet processing instructions. This is the same as in HTML 4.0 (see section 14.6).

Here are some examples from HTML 4.0 with the corresponding processing instruction:

<LINK href="mystyle.css" rel="style sheet" type="text/css">
<?xml-stylesheet href="mystyle.css" type="text/css"?>

<LINK href="mystyle.css" title="Compact" rel="stylesheet"
type="text/css">
<?xml-stylesheet href="mystyle.css" title="Compact" type="text/css"?>

<LINK href="mystyle.css" title="Medium" rel="alternate stylesheet"
type="text/css">
<?xml-stylesheet alternate="yes" href="mystyle.css" title="Medium"
type="text/css"?>

Multiple xml-stylesheet processing instructions are also allowed with exactly the same semantics as with LINK REL="stylesheet". For example,

<LINK rel="alternate stylesheet" title="compact" href="small-base.css"
type="text/css">
<LINK rel="alternate stylesheet" title="compact" href="small-extras.css"
type="text/css">
<LINK rel="alternate stylesheet" title="big print" href="bigprint.css"
type="text/css">
<LINK rel="stylesheet" href="common.css" type="text/css">

would be equivalent to:

<?xml-stylesheet alternate="yes" title="compact" href="small-base.css"
type="text/css"?>
<?xml-stylesheet alternate="yes" title="compact" href="small-extras.css"
type="text/css"?>
<?xml-stylesheet alternate="yes" title="big print" href="bigprint.css"
type="text/css"?>
<?xml-stylesheet href="common.css" type="text/css"?>

A References

HTML40
World Wide Web Consortium. HTML 4.0 Specification. W3C Recommendation. See http://www.w3.org/TR/REC-html40
RFC2068
R. Fielding, J. Gettys, J. Mogul, H. Frystyk Nielsen, and T. Berners-Lee. Hypertext Transfer Protocol -- HTTP/1.1.. IETF RFC 2068. See http://www.ietf.org/rfc/rfc2068.txt.
RFC2396
T. Berners-Lee, R. Fielding, and L. Masinter. Uniform Resource Identifiers (URI): Generic Syntax. IETF RFC 2396. See http://www.ietf.org/rfc/rfc2396.txt.
XML10
World Wide Web Consortium. Extensible Markup Language (XML) 1.0. W3C Recommendation. See http://www.w3.org/TR/1998/REC-xml-19980210

B Rationale

There was an urgent requirement for a specification for style sheet linking that could be completed in time for the next release from major browser vendors. Only by choosing a simple mechanism closely based on a proven existing mechanism could the specification be completed in time to meet this requirement.

Use of a processing instruction avoids polluting the main document structure with application specific processing information.

The mechanism chosen for this version of the specification is not a constraint on the additional mechanisms planned for future versions. There is no expectation that these will use processing instructions; indeed they may not include the linking information in the source document.

././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/digestInputs/c14NSignature.firstReference.txtlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/digestInputs/c14NSignature.firstRef0000644000175000017500000000014707400451635032353 0ustar tonytony Hello, world! libxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/signatures/0000755000175000017500000000000012273503736025762 5ustar tonytony././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/signatures/xPathSignature.xml.3.inputlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/signatures/xPathSignature.xml.3.inp0000644000175000017500000000013307400451635032371 0ustar tonytonyA text from IAIK././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/signatures/base64DecodeSignature.xmllibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/signatures/base64DecodeSignature.xm0000644000175000017500000000225207400451635032377 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs=CFDfVk22iawglDdrEIygmWhpPrj0DyWnxLhPBSgHXp6i31oVbicHAOvThv7TyVKd eE6K2b5AKOErBwVncngMBmpwtJIoKOgUhgNe4DskfeSdk44OJkT63h0EJxJhUHqz NtBe7QrmynpbFnOedDDZwMA9/I8RU0Eq/jikz9nqNdU=sDa5yzUv4IJmBY60GZCnkQSAhpG7tgxepi6sj3DlCzxjTtO5MNrjI9sK3WhimpNi NDmagzNEjxP3+x1huxL19GoIxZgr5O7E/F2IInSASVZTQsvWZlNauhRs0KZAszIS FchvrihILLoUf4tzaOSe6jgMEq6IkO0dWVpcFpAjXTc=Aw==libxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/signatures/xPathSignature.xml0000644000175000017500000000353207400451635031451 0ustar tonytony Xg7huUaHvGjhk11T6cBa5jKiCAM=a1YkQDH/XGdccOaiyxOrP6AQBeM=ancestor-or-self::dsig:ObjectXg7huUaHvGjhk11T6cBa5jKiCAM=dRM9axVQYPMd0vfzkbstaG8taNTtJA9sF9ze3/xW6AeW9KCguIjHpmG2kAuDJheZ RXRO9et+whWzrX8daHchUu6RDbkkL5tOBcMnyKJiPD03NRxut7AWtkFKLhhxzRds +EA7X0uNf59UIanLlMiGh3+ROzctwyO0z8vbKqjGxYU=sDa5yzUv4IJmBY60GZCnkQSAhpG7tgxepi6sj3DlCzxjTtO5MNrjI9sK3WhimpNi NDmagzNEjxP3+x1huxL19GoIxZgr5O7E/F2IInSASVZTQsvWZlNauhRs0KZAszIS FchvrihILLoUf4tzaOSe6jgMEq6IkO0dWVpcFpAjXTc=Aw==A text from IAIK././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/signatures/xPathSignature.xml.1.inputlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/signatures/xPathSignature.xml.1.inp0000644000175000017500000000020307400451635032365 0ustar tonytonyA text from IAIKlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/signatures/c14nSignature.xml0000644000175000017500000000276007400451635031134 0ustar tonytony R8S/QfGgzSmfIg0qpQthdjJQGuk=IGE++R3JwgZ17hxfT3VoGmvNBjU=cmn28RkAxN5587v+EPof2okKiUkJivh0wKNHK9FuhbA+xUBWsucUFXrNCrug57s4 xQFsQtXjVKPn+LGehnhvxZqd0MEK0GLndRk2dKogbtX/tc55BsyT1jRDGpeIxqNR OnwTleWlp9tMenLPPsa3vMrzXXUqup2A/J7/mZaNnUY=sDa5yzUv4IJmBY60GZCnkQSAhpG7tgxepi6sj3DlCzxjTtO5MNrjI9sK3WhimpNi NDmagzNEjxP3+x1huxL19GoIxZgr5O7E/F2IInSASVZTQsvWZlNauhRs0KZAszIS FchvrihILLoUf4tzaOSe6jgMEq6IkO0dWVpcFpAjXTc=Aw==././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/signatures/envelopedSignatureSignature.xmllibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/signatures/envelopedSignatureSignat0000644000175000017500000000237207400451635032716 0ustar tonytony cWFVogsTJUrmoCbGrFoP2mE+F5U=l82qilvUhkstzFG8tjTY/DAlWmhMTPz6fhnaIM6qetH9/qagjtrceEwGnc8Q7G20 laxPg+tjXa9qSHB9wUmOgu5axN3oNsncZxukCi7pmmujflMsXfJKl7jTXweYyKU5 5tJgeJM3Mnjm4QiAE1X9Ftne4UKFFg4348RUWnlZWBE=sDa5yzUv4IJmBY60GZCnkQSAhpG7tgxepi6sj3DlCzxjTtO5MNrjI9sK3WhimpNi NDmagzNEjxP3+x1huxL19GoIxZgr5O7E/F2IInSASVZTQsvWZlNauhRs0KZAszIS FchvrihILLoUf4tzaOSe6jgMEq6IkO0dWVpcFpAjXTc=Aw== Some Data from IAIK ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/signatures/xPathSignature.xml.0.inputlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/signatures/xPathSignature.xml.0.inp0000644000175000017500000000015107400451635032366 0ustar tonytonyA text from IAIK././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/signatures/xPathSignature.xml.2.inputlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/transforms/signatures/xPathSignature.xml.2.inp0000644000175000017500000000015107400451635032370 0ustar tonytonyA text from IAIKlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/readme.txt0000644000175000017500000001675307400451635023406 0ustar tonytony************************************************************** This file contains a description of sample sigantures produced with the IAIK Signature Library (IXSIL). Author: Gregor Karlinger Date: 15. 11. 2001 IXSIL Build: 1010 ************************************************************** signatureAlgorithms/dSASignature.xml ------------------------------------ Simple signature using DSA as signature algorithm. DSA public key is encoded as KeyValue. The input used for the digest computation can be found in file "../digestInputs/dSASignature.firstReference.txt". signatureAlgorithms/rSASignature.xml ------------------------------------ Simple signature using RSA as signature algorithm. RSA public key is encoded as KeyValue. The input used for the digest computation can be found in file "../digestInputs/rSASignature.firstReference.txt". signatureAlgorithms/hMACSignature.xml ------------------------------------- Simple signature using HMAC as authentication algorithm. The secret key is "secret".getBytes("ASCII"). The input used for the digest computation can be found in file "../digestInputs/hMACSignature.firstReference.txt". signatureAlgorithms/hMACShortSignature.xml ------------------------------------------ Simple signature using HMAC as authentication algorithm. HMAC output length is limited to 40 bits. The secret key is "secret".getBytes("ASCII"). The input used for the digest computation can be found in file "../digestInputs/hMACShortSignature.firstReference.txt". coreFeatures/signatureTypesSignature.xml ---------------------------------------- Signature containing several References to demonstrate IXSIL's ability to work with enveloping, enveloped and detached signatures. * The first Reference refers to an external source (http) - detached signature. * The second Reference refers to an external source (file system) - detached signature. The external file is "../samples/sampleTextData.txt" * The third Reference refers to XML data that is a sibling of the XML Signature, but within the same document - detached signature The input used for the digest computation can be found in file "../digestInputs/signatureTypesSignature.thirdReference.txt". * The fourth Reference refers to an external XML file and uses an XPath transform to select parts of the document for signing - detached signature. The external file is "../samples/sampleXMLData.xml" The input used for the digest computation can be found in file "../digestInputs/signatureTypesSignature.fourthReference.txt". * The fifth Reference refers to data in an Object of the signature via an ID reference - enveloping signature. The input used for the digest computation can be found in file "../digestInputs/signatureTypesSignature.fifthReference.txt". * The sixth Reference refers to data in an Object of the signature via an empty URI (URI="") and using an XPath transform to select the data for signing - enveloping signature. The input used for the digest computation can be found in file "../digestInputs/signatureTypesSignature.sixthReference.txt". * The seventh Reference refers to the signature document itself (URI="") and uses an enveloped signature transform - enveloped signature The input used for the digest computation can be found in file "../digestInputs/signatureTypesSignature.seventhReference.txt". coreFeatures/manifestSignature.xml ---------------------------------- Signature containing a Reference to a Manifest element that is stored in an Object container within the Signature. The input used for the digest computation can be found in file "../digestInputs/manifestSignature.firstReference.txt". * The first Reference in the Manifest refers to the whole signature document and uses an enveloped signature trans- form to cut out the Signature element. The input used for the digest computation can be found in file "../digestInputs/manifestSignature.manifest.firstReference.txt". * The second Reference in the Manifest refers an external resource (file system). The external file is "../samples/sampleXMLData.xml". The input used for the digest computation can be found in file "../digestInputs/manifestSignature.manifest.secondReference.txt". coreFeatures/anonymousReferenceSignature.xml -------------------------------------------- Signature containing an anonymous Reference, i.e. the URI attribute of the Reference is missing. In such a case, the application must provide the hint where to find the corres- ponding data. In this case, the data can be found in file "../samples/anonymousReferenceContent.xml". The input used for the digest computation can be found in file "../digestInputs/anonymousReferenceSignature.firstReference.txt". transforms/base64DecodeSignature.xml ------------------------------------ Signature containing a Reference to a base64 encoded file. The Reference contains a Base64 transform, i.e. the file will be decoded prior to digest computation. The encoded file is "../samples/sampleBase64EncodedData.txt". The input used for the digest computation can be found in file "../digestInputs/base64Signature.firstReference.txt". transforms/c14nSignature.xml ---------------------------- Signature containing two References to an XML file. The XML file is "../samples/sampleXMLData.xml". * The first Reference contains a canonical XML transform, that is, comments in the XML file will be removed at transformation. The input used for the digest computation can be found in file "../digestInputs/c14nSignature.firstReference.txt". * The second Reference contains a canonical XML transform with comments, that is, comments in the XML file will be preserved at transformation. The input used for the digest computation can be found in file "../digestInputs/c14nSignature.secondReference.txt". transforms/envelopedSignatureSignature.xml ------------------------------------------ Signature containing a single Reference to the signature file itself (URI=""). The Reference contains an enveloped signature transform to cut out the Signature structure from the XML. The input used for the digest computation can be found in file "../digestInputs/envelopedSignatureSignature.firstReference.txt". transforms/xPathSignature.xml ----------------------------- Signature containing three internal References to demonstrate document subset selection. * The first Reference contains a reference-only URI ("#objectId"). This means that the XML element with its ID attribute set to the value "objectId" is selected; comments will be suppressed. Finally a canonical XML transfrom will be performed prior to digest computation. The input used for the digest computation can be found in file "../digestInputs/xPathSignature.firstReference.txt". * The second Reference also contains a reference-only URI ("#xpointer(id('objectId'))"). This also means that the XML element with its ID attribute set to the value "objectId" is selected; but contrary to the first Reference, this time comments are preserved. Finally a canonical XML transfrom (preserving comments option chosen) will be performed prior to digest computation. The input used for the digest computation can be found in file "../digestInputs/xPathSignature.secondReference.txt". libxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/0000755000175000017500000000000012273503736024027 5ustar tonytonylibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/samples/0000755000175000017500000000000012273503736025473 5ustar tonytonylibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/samples/sampleXMLData.xml0000644000175000017500000000046107400451635030646 0ustar tonytony ] > Some Data from IAIK ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/samples/anonymousReferenceContent.xmllibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/samples/anonymousReferenceContent0000644000175000017500000000026007400451635032612 0ustar tonytony This XML file is referenced via an anonymous Reference in the XML signature. libxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/samples/sampleTextData.txt0000644000175000017500000000003607400451635031147 0ustar tonytonySome text from IAIK in a file.libxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/digestInputs/0000755000175000017500000000000012273503736026511 5ustar tonytony././@LongLink0000000000000000000000000000017700000000000011572 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/digestInputs/anonymousReferenceSignature.firstReference.txtlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/digestInputs/anonymousReferenceSi0000644000175000017500000000020607400451635032571 0ustar tonytony This XML file is referenced via an anonymous Reference in the XML signature. ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/digestInputs/manifestReference.firstReference.txtlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/digestInputs/manifestReference.fi0000644000175000017500000000144507400451635032456 0ustar tonytonyKQuoZseibY3bIurUFbyYhLCm9nY=oUqpQ+ekAvoeCRjlMc1EXzrFJJA=././@LongLink0000000000000000000000000000017700000000000011572 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/digestInputs/manifestReference.manifest.secondReference.txtlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/digestInputs/manifestReference.ma0000644000175000017500000000015707400451635032454 0ustar tonytony Some Data from IAIK ././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/digestInputs/manifestReference.manifest.firstReference.txtlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/digestInputs/manifestReference.ma0000644000175000017500000000017307400451635032452 0ustar tonytony Some Data from IAIK ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/digestInputs/signatureTypesSignature.seventhReference.txtlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/digestInputs/signatureTypesSignat0000644000175000017500000000017307400451635032625 0ustar tonytony Some Data from IAIK ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/digestInputs/signatureTypesSignature.thirdReference.txtlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/digestInputs/signatureTypesSignat0000644000175000017500000000014007400451635032617 0ustar tonytony Some Data from IAIK ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/digestInputs/signatureTypesSignature.sixthReference.txtlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/digestInputs/signatureTypesSignat0000644000175000017500000000021107400451635032616 0ustar tonytonyA text from IAIK././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/digestInputs/signatureTypesSignature.fourthReference.txtlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/digestInputs/signatureTypesSignat0000644000175000017500000000013607400451635032624 0ustar tonytony Some Data from IAIK ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/digestInputs/signatureTypesSignature.fifthReference.txtlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/digestInputs/signatureTypesSignat0000644000175000017500000000021107400451635032616 0ustar tonytonyA text from IAIKlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/signatures/0000755000175000017500000000000012273503736026213 5ustar tonytony././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/signatures/anonymousReferenceSignature.xmllibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/signatures/anonymousReferenceSign0000644000175000017500000000220407400451635032620 0ustar tonytony 7Hfp3yTdKKBv0d7M0ozNxCu7V98=mU+8/j7vFJGXG6Xw/VgVRIcRQNl5LtoHV6lHNPqrHXF6SZNQxze6lXvIv/MINnAk oZvVWz4sMYoddP6wXaeQJwDPjzO1EQNe2Un73J/njmzZDfIJqSah1SG+zSteMR6m J68nKznbRTdxnOknBo+rZirXiAsPgudRR6NUyXn+D8A=sDa5yzUv4IJmBY60GZCnkQSAhpG7tgxepi6sj3DlCzxjTtO5MNrjI9sK3WhimpNi NDmagzNEjxP3+x1huxL19GoIxZgr5O7E/F2IInSASVZTQsvWZlNauhRs0KZAszIS FchvrihILLoUf4tzaOSe6jgMEq6IkO0dWVpcFpAjXTc=Aw==libxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/signatures/manifestSignature.xml0000644000175000017500000000322207405060203032410 0ustar tonytony ]> 1kF5aUeRTi9Jul2Qz3DmbZ0Od7I=M2bF8w1IQvdEedQ6SB9w8zaWc+KDNigoysBviNpifB6htymPhoW+1NBboygfkmAy 8GSsOhmQ7gbpHoljjm2QPmZmo8BIt7ZGy7izhww1WZiIQxmqczIEaiPeBcsgsxDW SfOh7Ev9YXFfLF4UxJ59dfTR3ZTb9CVzGf6CSG4xXJk=sDa5yzUv4IJmBY60GZCnkQSAhpG7tgxepi6sj3DlCzxjTtO5MNrjI9sK3WhimpNi NDmagzNEjxP3+x1huxL19GoIxZgr5O7E/F2IInSASVZTQsvWZlNauhRs0KZAszIS FchvrihILLoUf4tzaOSe6jgMEq6IkO0dWVpcFpAjXTc=Aw==UXcq2OOH+aMla4fb5UOnYuaY9uQ= Some Data from IAIK ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootlibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/signatures/signatureTypesSignature.xmllibxml-security-java-1.5.6/samples/data/at/iaik/ixsil/coreFeatures/signatures/signatureTypesSignatur0000644000175000017500000000624307400451635032702 0ustar tonytony ]> N2sjZsKr2W1kw6UP7mcWwrz7T5I=VyGBEakUjlOuKT4WBI+tDm0tYe0=ancestor-or-self::iaik:DataItem9yMFLtkwiTVLvQaCOzE6+o4HrQE=ancestor-or-self::iaik:DataItemRdeNc+MfZeY8uqSLq8AtQ6DBygs=3x8tHtIyVobZMQ7ZoBIHyiFU7Fk=ancestor-or-self::dsig:Object3x8tHtIyVobZMQ7ZoBIHyiFU7Fk=KQuoZseibY3bIurUFbyYhLCm9nY=gCAp0wt+ZIG3+GmZA7KKXfCA5d5Qbi7GY5BhMpxVA2BxmVe9M4vmC2h+hcBzCRmH wjAuaIkPYxPCaiD/SSa4i27ufMNJbbxMi8AGWPRRtgfOG+/KQZrrvUQtpnxS3c16 81ClcivlTA1wKVM7xKJOn8li/8IldJNm1ZgN8JQS8sk=sDa5yzUv4IJmBY60GZCnkQSAhpG7tgxepi6sj3DlCzxjTtO5MNrjI9sK3WhimpNi NDmagzNEjxP3+x1huxL19GoIxZgr5O7E/F2IInSASVZTQsvWZlNauhRs0KZAszIS FchvrihILLoUf4tzaOSe6jgMEq6IkO0dWVpcFpAjXTc=Aw==A text from IAIK Some Data from IAIK libxml-security-java-1.5.6/samples/data/com/0000755000175000017500000000000012273503736017505 5ustar tonytonylibxml-security-java-1.5.6/samples/data/com/pothole/0000755000175000017500000000000012273503736021157 5ustar tonytonylibxml-security-java-1.5.6/samples/data/com/pothole/xmldsig/0000755000175000017500000000000012273503736022626 5ustar tonytonylibxml-security-java-1.5.6/samples/data/com/pothole/xmldsig/xml-stylesheet.txt0000644000175000017500000004257207357332275026375 0ustar tonytonyPCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFu c2l0aW9uYWwvL0VOIj4KPGh0bWw+CjxoZWFkPgo8dGl0bGU+QXNzb2NpYXRpbmcg U3R5bGUgU2hlZXRzIHdpdGggWE1MIGRvY3VtZW50czwvdGl0bGU+CjxsaW5rIHJl bD0ic3R5bGVzaGVldCIgdHlwZT0idGV4dC9jc3MiIGhyZWY9Imh0dHA6Ly93d3cu dzMub3JnL1N0eWxlU2hlZXRzL1RSL1czQy1SRUMiPgo8c3R5bGUgdHlwZT0idGV4 dC9jc3MiPmNvZGUgeyBmb250LWZhbWlseTogbW9ub3NwYWNlIH08L3N0eWxlPgo8 L2hlYWQ+Cjxib2R5Pgo8ZGl2IGNsYXNzPSJoZWFkIj4KPGEgaHJlZj0iaHR0cDov L3d3dy53My5vcmcvIj48aW1nIHNyYz0iaHR0cDovL3d3dy53My5vcmcvSWNvbnMv V1dXL3czY19ob21lIiBhbHQ9IlczQyIgaGVpZ2h0PSI0OCIgd2lkdGg9IjcyIj48 L2E+CjxoMT5Bc3NvY2lhdGluZyBTdHlsZSBTaGVldHMgd2l0aCBYTUwgZG9jdW1l bnRzPGJyPlZlcnNpb24gMS4wPC9oMT4KPGgyPlczQyBSZWNvbW1lbmRhdGlvbiAy OSBKdW5lIDE5OTk8L2gyPgo8ZGw+CjxkdD5UaGlzIHZlcnNpb246PC9kdD4KPGRk Pgo8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzA2L1JFQy14bWwtc3R5 bGVzaGVldC0xOTk5MDYyOSI+aHR0cDovL3d3dy53My5vcmcvMTk5OS8wNi9SRUMt eG1sLXN0eWxlc2hlZXQtMTk5OTA2Mjk8L2E+Cjxicj4KPC9kZD4KPGR0PkxhdGVz dCB2ZXJzaW9uOjwvZHQ+CjxkZD4KPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcv VFIveG1sLXN0eWxlc2hlZXQiPmh0dHA6Ly93d3cudzMub3JnL1RSL3htbC1zdHls ZXNoZWV0PC9hPgo8YnI+CjwvZGQ+CjxkdD5QcmV2aW91cyB2ZXJzaW9uOjwvZHQ+ CjxkZD4KPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcvVFIvMTk5OS94bWwtc3R5 bGVzaGVldC0xOTk5MDQyOCI+aHR0cDovL3d3dy53My5vcmcvVFIvMTk5OS94bWwt c3R5bGVzaGVldC0xOTk5MDQyODwvYT4KPGJyPgo8L2RkPgo8ZHQ+RWRpdG9yOjwv ZHQ+CjxkZD4KCkphbWVzIENsYXJrCjxhIGhyZWY9Im1haWx0bzpqamNAamNsYXJr LmNvbSI+Jmx0O2pqY0BqY2xhcmsuY29tJmd0OzwvYT4KPGJyPgo8L2RkPgo8L2Rs Pgo8cCBjbGFzcz0iY29weXJpZ2h0Ij4KPGEgaHJlZj0iaHR0cDovL3d3dy53My5v cmcvQ29uc29ydGl1bS9MZWdhbC9pcHItbm90aWNlLmh0bWwjQ29weXJpZ2h0Ij4K CQlDb3B5cmlnaHQ8L2E+ICZuYnNwOyZjb3B5OyZuYnNwOyAxOTk5IDxhIGhyZWY9 Imh0dHA6Ly93d3cudzMub3JnIj5XM0M8L2E+CgkJKDxhIGhyZWY9Imh0dHA6Ly93 d3cubGNzLm1pdC5lZHUiPk1JVDwvYT4sCgkJPGEgaHJlZj0iaHR0cDovL3d3dy5p bnJpYS5mci8iPklOUklBPC9hPiwKCQk8YSBocmVmPSJodHRwOi8vd3d3LmtlaW8u YWMuanAvIj5LZWlvPC9hPiApLCBBbGwgUmlnaHRzIFJlc2VydmVkLiBXM0MKCQk8 YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9Db25zb3J0aXVtL0xlZ2FsL2lwci1u b3RpY2UuaHRtbCNMZWdhbCBEaXNjbGFpbWVyIj5saWFiaWxpdHksPC9hPjxhIGhy ZWY9Imh0dHA6Ly93d3cudzMub3JnL0NvbnNvcnRpdW0vTGVnYWwvaXByLW5vdGlj ZS5odG1sI1czQyBUcmFkZW1hcmtzIj50cmFkZW1hcms8L2E+LAoJCTxhIGhyZWY9 Imh0dHA6Ly93d3cudzMub3JnL0NvbnNvcnRpdW0vTGVnYWwvY29weXJpZ2h0LWRv Y3VtZW50cy5odG1sIj5kb2N1bWVudCB1c2UgPC9hPmFuZAoJCTxhIGhyZWY9Imh0 dHA6Ly93d3cudzMub3JnL0NvbnNvcnRpdW0vTGVnYWwvY29weXJpZ2h0LXNvZnR3 YXJlLmh0bWwiPnNvZnR3YXJlIGxpY2Vuc2luZyA8L2E+cnVsZXMgYXBwbHkuCgk8 L3A+CjxociB0aXRsZT0iU2VwYXJhdG9yIGZvciBoZWFkZXIiPgo8L2Rpdj4KPGgy Pgo8YSBuYW1lPSJhYnN0cmFjdCI+QWJzdHJhY3Q8L2E+CjwvaDI+Cgo8cD5UaGlz IGRvY3VtZW50IGFsbG93cyBhIHN0eWxlIHNoZWV0IHRvIGJlIGFzc29jaWF0ZWQg d2l0aCBhbiBYTUwKZG9jdW1lbnQgYnkgaW5jbHVkaW5nIG9uZSBvciBtb3JlIHBy b2Nlc3NpbmcgaW5zdHJ1Y3Rpb25zIHdpdGggYQp0YXJnZXQgb2YgPGNvZGU+eG1s LXN0eWxlc2hlZXQ8L2NvZGU+IGluIHRoZSBkb2N1bWVudCdzIHByb2xvZy48L3A+ Cgo8aDI+CjxhIG5hbWU9InN0YXR1cyI+U3RhdHVzIG9mIHRoaXMgZG9jdW1lbnQ8 L2E+CjwvaDI+Cgo8cD5UaGlzIGRvY3VtZW50IGhhcyBiZWVuIHJldmlld2VkIGJ5 IFczQyBNZW1iZXJzIGFuZCBvdGhlciBpbnRlcmVzdGVkCnBhcnRpZXMgYW5kIGhh cyBiZWVuIGVuZG9yc2VkIGJ5IHRoZSBEaXJlY3RvciBhcyBhIFczQyA8YSBocmVm PSJodHRwOi8vd3d3LnczLm9yZy9Db25zb3J0aXVtL1Byb2Nlc3MvI1JlY3NXM0Mi PlJlY29tbWVuZGF0aW9uPC9hPi4gSXQKaXMgYSBzdGFibGUgZG9jdW1lbnQgYW5k IG1heSBiZSB1c2VkIGFzIHJlZmVyZW5jZSBtYXRlcmlhbCBvciBjaXRlZCBhcwph IG5vcm1hdGl2ZSByZWZlcmVuY2UgZnJvbSBvdGhlciBkb2N1bWVudHMuIFczQydz IHJvbGUgaW4gbWFraW5nIHRoZQpSZWNvbW1lbmRhdGlvbiBpcyB0byBkcmF3IGF0 dGVudGlvbiB0byB0aGUgc3BlY2lmaWNhdGlvbiBhbmQgdG8KcHJvbW90ZSBpdHMg d2lkZXNwcmVhZCBkZXBsb3ltZW50LiBUaGlzIGVuaGFuY2VzIHRoZSBmdW5jdGlv bmFsaXR5IGFuZAppbnRlcm9wZXJhYmlsaXR5IG9mIHRoZSBXZWIuPC9wPgoKPHA+ VGhlIGxpc3Qgb2Yga25vd24gZXJyb3JzIGluIHRoaXMgc3BlY2lmaWNhdGlvbnMg aXMgYXZhaWxhYmxlIGF0CjxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkv MDYvUkVDLXhtbC1zdHlsZXNoZWV0LTE5OTkwNjI5L2VycmF0YSI+aHR0cDovL3d3 dy53My5vcmcvVFIvMTk5OS94bWwtc3R5bGVzaGVldC0xOTk5MDYyOS9lcnJhdGE8 L2E+LjwvcD4KCjxwPkNvbW1lbnRzIG9uIHRoaXMgc3BlY2lmaWNhdGlvbiBtYXkg YmUgc2VudCB0byAmbHQ7PGEgaHJlZj0ibWFpbHRvOnd3dy14bWwtc3R5bGVzaGVl dC1jb21tZW50c0B3My5vcmciPnd3dy14bWwtc3R5bGVzaGVldC1jb21tZW50c0B3 My5vcmc8L2E+Jmd0Oy4gVGhlIGFyY2hpdmUgb2YgcHVibGljCmNvbW1lbnRzIGlz IGF2YWlsYWJsZSBhdCA8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9BcmNoaXZl cy9QdWJsaWMvd3d3LXhtbC1zdHlsZXNoZWV0LWNvbW1lbnRzIj5odHRwOi8vdzMu b3JnL0FyY2hpdmVzL1B1YmxpYy93d3cteG1sLXN0eWxlc2hlZXQtY29tbWVudHM8 L2E+LjwvcD4KCjxwPkEgbGlzdCBvZiBjdXJyZW50IFczQyBSZWNvbW1lbmRhdGlv bnMgYW5kIG90aGVyIHRlY2huaWNhbCBkb2N1bWVudHMKY2FuIGJlIGZvdW5kIGF0 IDxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3JnL1RSIj5odHRwOi8vd3d3LnczLm9y Zy9UUjwvYT4uPC9wPgoKPHA+VGhlIFdvcmtpbmcgR3JvdXAgZXhwZWN0cyBhZGRp dGlvbmFsIG1lY2hhbmlzbXMgZm9yIGxpbmtpbmcgc3R5bGUKc2hlZXRzIHRvIFhN TCBkb2N1bWVudCB0byBiZSBkZWZpbmVkIGluIGEgZnV0dXJlIHNwZWNpZmljYXRp b24uPC9wPgoKPHA+VGhlIHVzZSBvZiBYTUwgcHJvY2Vzc2luZyBpbnN0cnVjdGlv bnMgaW4gdGhpcyBzcGVjaWZpY2F0aW9uIHNob3VsZApub3QgYmUgdGFrZW4gYXMg YSBwcmVjZWRlbnQuICBUaGUgVzNDIGRvZXMgbm90IGFudGljaXBhdGUgcmVjb21t ZW5kaW5nCnRoZSB1c2Ugb2YgcHJvY2Vzc2luZyBpbnN0cnVjdGlvbnMgaW4gYW55 IGZ1dHVyZSBzcGVjaWZpY2F0aW9uLiAgVGhlCjxhIGhyZWY9IiNyYXRpb25hbGUi PlJhdGlvbmFsZTwvYT4gZXhwbGFpbnMgd2h5IHRoZXkgd2VyZSB1c2VkIGluCnRo aXMgc3BlY2lmaWNhdGlvbi48L3A+Cgo8cD5UaGlzIGRvY3VtZW50IHdhcyBwcm9k dWNlZCBhcyBwYXJ0IG9mIHRoZSA8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9Y TUwvQWN0aXZpdHkiPlczQyBYTUwgQWN0aXZpdHk8L2E+LjwvcD4KCgo8aDI+Cjxh IG5hbWU9ImNvbnRlbnRzIj5UYWJsZSBvZiBjb250ZW50czwvYT4KPC9oMj4xIDxh IGhyZWY9IiNUaGUgeG1sLXN0eWxlc2hlZXQgcHJvY2Vzc2luZyBpbnN0cnVjdGlv biI+VGhlIHhtbC1zdHlsZXNoZWV0IHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb248L2E+ Cjxicj4KPGgzPkFwcGVuZGljZXM8L2gzPkEgPGEgaHJlZj0iI1JlZmVyZW5jZXMi PlJlZmVyZW5jZXM8L2E+Cjxicj5CIDxhIGhyZWY9IiNyYXRpb25hbGUiPlJhdGlv bmFsZTwvYT4KPGJyPgo8aHI+Cgo8aDI+CjxhIG5hbWU9IlRoZSB4bWwtc3R5bGVz aGVldCBwcm9jZXNzaW5nIGluc3RydWN0aW9uIj48L2E+MSBUaGUgPGNvZGU+eG1s LXN0eWxlc2hlZXQ8L2NvZGU+IHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb248L2gyPgoK PHA+U3R5bGUgU2hlZXRzIGNhbiBiZSBhc3NvY2lhdGVkIHdpdGggYW4gWE1MPGEg aHJlZj0iI1hNTCI+W1hNTDEwXTwvYT4KZG9jdW1lbnQgYnkgdXNpbmcgYSBwcm9j ZXNzaW5nIGluc3RydWN0aW9uIHdob3NlIHRhcmdldCBpcwo8Y29kZT54bWwtc3R5 bGVzaGVldDwvY29kZT4uICBUaGlzIHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb24gZm9s bG93cyB0aGUKYmVoYXZpb3VyIG9mIHRoZSBIVE1MIDQuMCA8Y29kZT4mbHQ7TElO SwpSRUw9InN0eWxlc2hlZXQiJmd0OzwvY29kZT48YSBocmVmPSIjSFRNTCI+W0hU TUw0MF08L2E+LjwvcD4KCjxwPlRoZSA8Y29kZT54bWwtc3R5bGVzaGVldDwvY29k ZT4gcHJvY2Vzc2luZyBpbnN0cnVjdGlvbiBpcyBwYXJzZWQgaW4KdGhlIHNhbWUg d2F5IGFzIGEgc3RhcnQtdGFnLCB3aXRoIHRoZSBleGNlcHRpb24gdGhhdCBlbnRp dGllcyBvdGhlcgp0aGFuIHByZWRlZmluZWQgZW50aXRpZXMgbXVzdCBub3QgYmUg cmVmZXJlbmNlZC48L3A+Cgo8cD5UaGUgZm9sbG93aW5nIGdyYW1tYXIgaXMgZ2l2 ZW4gdXNpbmcgdGhlIHNhbWUgbm90YXRpb24gYXMgdGhlCmdyYW1tYXIgaW4gdGhl IFhNTCBSZWNvbW1lbmRhdGlvbjxhIGhyZWY9IiNYTUwiPltYTUwxMF08L2E+LiAg U3ltYm9scyBpbiB0aGUKZ3JhbW1hciB0aGF0IGFyZSBub3QgZGVmaW5lZCBoZXJl IGFyZSBkZWZpbmVkIGluIHRoZSBYTUwKUmVjb21tZW5kYXRpb24uPC9wPgoKPGg1 PnhtbC1zdHlsZXNoZWV0IHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb248L2g1Pgo8dGFi bGUgY2xhc3M9InNjcmFwIj4KPHRib2R5Pgo8dHIgdmFsaWduPSJiYXNlbGluZSI+ Cjx0ZD4KPGEgbmFtZT0iTlQtU3R5bGVTaGVldFBJIj48L2E+WzFdJm5ic3A7Jm5i c3A7Jm5ic3A7PC90ZD4KPHRkPlN0eWxlU2hlZXRQSTwvdGQ+Cjx0ZD4mbmJzcDsm bmJzcDsmbmJzcDs6Oj0mbmJzcDsmbmJzcDsmbmJzcDs8L3RkPgo8dGQ+JyZsdDs/ eG1sLXN0eWxlc2hlZXQnICg8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9UUi9S RUMteG1sI05ULVMiPlM8L2E+IDxhIGhyZWY9IiNOVC1Qc2V1ZG9BdHQiPlBzZXVk b0F0dDwvYT4pKiA8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9UUi9SRUMteG1s I05ULVMiPlM8L2E+PyAnPyZndDsnPC90ZD4KPHRkPgo8L3RkPgo8L3RyPgo8dHIg dmFsaWduPSJiYXNlbGluZSI+Cjx0ZD4KPGEgbmFtZT0iTlQtUHNldWRvQXR0Ij48 L2E+WzJdJm5ic3A7Jm5ic3A7Jm5ic3A7PC90ZD4KPHRkPlBzZXVkb0F0dDwvdGQ+ Cjx0ZD4mbmJzcDsmbmJzcDsmbmJzcDs6Oj0mbmJzcDsmbmJzcDsmbmJzcDs8L3Rk Pgo8dGQ+CjxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3JnL1RSL1JFQy14bWwjTlQt TmFtZSI+TmFtZTwvYT4gPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcvVFIvUkVD LXhtbCNOVC1TIj5TPC9hPj8gJz0nIDxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3Jn L1RSL1JFQy14bWwjTlQtUyI+UzwvYT4/IDxhIGhyZWY9IiNOVC1Qc2V1ZG9BdHRW YWx1ZSI+UHNldWRvQXR0VmFsdWU8L2E+CjwvdGQ+Cjx0ZD4KPC90ZD4KPC90cj4K PHRyIHZhbGlnbj0iYmFzZWxpbmUiPgo8dGQ+CjxhIG5hbWU9Ik5ULVBzZXVkb0F0 dFZhbHVlIj48L2E+WzNdJm5ic3A7Jm5ic3A7Jm5ic3A7PC90ZD4KPHRkPlBzZXVk b0F0dFZhbHVlPC90ZD4KPHRkPiZuYnNwOyZuYnNwOyZuYnNwOzo6PSZuYnNwOyZu YnNwOyZuYnNwOzwvdGQ+Cjx0ZD4oJyInIChbXiImbHQ7JmFtcDtdIHwgPGEgaHJl Zj0iaHR0cDovL3d3dy53My5vcmcvVFIvUkVDLXhtbCNOVC1DaGFyUmVmIj5DaGFy UmVmPC9hPiB8IDxhIGhyZWY9IiNOVC1QcmVkZWZFbnRpdHlSZWYiPlByZWRlZkVu dGl0eVJlZjwvYT4pKiAnIic8L3RkPgo8dGQ+CjwvdGQ+CjwvdHI+Cjx0ciB2YWxp Z249ImJhc2VsaW5lIj4KPHRkPgo8L3RkPgo8dGQ+CjwvdGQ+Cjx0ZD4KPC90ZD4K PHRkPnwgIiciIChbXicmbHQ7JmFtcDtdIHwgPGEgaHJlZj0iaHR0cDovL3d3dy53 My5vcmcvVFIvUkVDLXhtbCNOVC1DaGFyUmVmIj5DaGFyUmVmPC9hPiB8IDxhIGhy ZWY9IiNOVC1QcmVkZWZFbnRpdHlSZWYiPlByZWRlZkVudGl0eVJlZjwvYT4pKiAi JyIpPC90ZD4KPHRkPgo8L3RkPgo8L3RyPgo8dHIgdmFsaWduPSJiYXNlbGluZSI+ Cjx0ZD4KPC90ZD4KPHRkPgo8L3RkPgo8dGQ+CjwvdGQ+Cjx0ZD4tICg8YSBocmVm PSJodHRwOi8vd3d3LnczLm9yZy9UUi9SRUMteG1sI05ULUNoYXIiPkNoYXI8L2E+ KiAnPyZndDsnIDxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3JnL1RSL1JFQy14bWwj TlQtQ2hhciI+Q2hhcjwvYT4qKTwvdGQ+Cjx0ZD4KPC90ZD4KPC90cj4KPHRyIHZh bGlnbj0iYmFzZWxpbmUiPgo8dGQ+CjxhIG5hbWU9Ik5ULVByZWRlZkVudGl0eVJl ZiI+PC9hPls0XSZuYnNwOyZuYnNwOyZuYnNwOzwvdGQ+Cjx0ZD5QcmVkZWZFbnRp dHlSZWY8L3RkPgo8dGQ+Jm5ic3A7Jm5ic3A7Jm5ic3A7Ojo9Jm5ic3A7Jm5ic3A7 Jm5ic3A7PC90ZD4KPHRkPicmYW1wO2FtcDsnIHwgJyZhbXA7bHQ7JyB8ICcmYW1w O2d0OycgfCAnJmFtcDtxdW90OycgfCAnJmFtcDthcG9zOyc8L3RkPgo8dGQ+Cjwv dGQ+CjwvdHI+CjwvdGJvZHk+CjwvdGFibGU+Cgo8cD5JbiA8YSBocmVmPSIjTlQt UHNldWRvQXR0VmFsdWUiPlBzZXVkb0F0dFZhbHVlPC9hPiwgYSA8YSBocmVmPSJo dHRwOi8vd3d3LnczLm9yZy9UUi9SRUMteG1sI05ULUNoYXJSZWYiPkNoYXJSZWY8 L2E+IG9yIGEgPGEgaHJlZj0iI05ULVByZWRlZkVudGl0eVJlZiI+UHJlZGVmRW50 aXR5UmVmPC9hPiBpcyBpbnRlcnByZXRlZCBpbiB0aGUKc2FtZSBtYW5uZXIgYXMg aW4gYSBub3JtYWwgWE1MIGF0dHJpYnV0ZSB2YWx1ZS4gIFRoZSBhY3R1YWwgdmFs dWUgb2YKdGhlIHBzZXVkby1hdHRyaWJ1dGUgaXMgdGhlIHZhbHVlIGFmdGVyIGVh Y2ggcmVmZXJlbmNlIGlzIHJlcGxhY2VkIGJ5CnRoZSBjaGFyYWN0ZXIgaXQgcmVm ZXJlbmNlcy4gIFRoaXMgcmVwbGFjZW1lbnQgaXMgbm90IHBlcmZvcm1lZAphdXRv bWF0aWNhbGx5IGJ5IGFuIFhNTCBwcm9jZXNzb3IuPC9wPgoKPHA+VGhlIDxjb2Rl PnhtbC1zdHlsZXNoZWV0PC9jb2RlPiBwcm9jZXNzaW5nIGluc3RydWN0aW9uIGlz IGFsbG93ZWQKb25seSBpbiB0aGUgcHJvbG9nIG9mIGFuIFhNTCBkb2N1bWVudC4g VGhlIHN5bnRheCBvZiBYTUwgY29uc3RyYWlucwp3aGVyZSBwcm9jZXNzaW5nIGlu c3RydWN0aW9ucyBhcmUgYWxsb3dlZCBpbiB0aGUgcHJvbG9nOyB0aGUKPGNvZGU+ eG1sLXN0eWxlc2hlZXQ8L2NvZGU+IHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb24gaXMg YWxsb3dlZCBhbnl3aGVyZQppbiB0aGUgcHJvbG9nIHRoYXQgbWVldHMgdGhlc2Ug Y29uc3RyYWludHMuPC9wPgoKPGJsb2NrcXVvdGU+CjxiPk5PVEU6IDwvYj5JZiB0 aGUgPGNvZGU+eG1sLXN0eWxlc2hlZXQ8L2NvZGU+IHByb2Nlc3NpbmcgaW5zdHJ1 Y3Rpb24Kb2NjdXJzIGluIHRoZSBleHRlcm5hbCBEVEQgc3Vic2V0IG9yIGluIGEg cGFyYW1ldGVyIGVudGl0eSwgaXQgaXMKcG9zc2libGUgdGhhdCBpdCBtYXkgbm90 IGJlIHByb2Nlc3NlZCBieSBhIG5vbi12YWxpZGF0aW5nIFhNTApwcm9jZXNzb3Ig KHNlZSA8YSBocmVmPSIjWE1MIj5bWE1MMTBdPC9hPikuPC9ibG9ja3F1b3RlPgoK PHA+VGhlIGZvbGxvd2luZyBwc2V1ZG8gYXR0cmlidXRlcyBhcmUgZGVmaW5lZDwv cD4KCjxwcmU+aHJlZiBDREFUQSAjUkVRVUlSRUQKdHlwZSBDREFUQSAjUkVRVUlS RUQKdGl0bGUgQ0RBVEEgI0lNUExJRUQKbWVkaWEgQ0RBVEEgI0lNUExJRUQKY2hh cnNldCBDREFUQSAjSU1QTElFRAphbHRlcm5hdGUgKHllc3xubykgIm5vIjwvcHJl PgoKPHA+VGhlIHNlbWFudGljcyBvZiB0aGUgcHNldWRvLWF0dHJpYnV0ZXMgYXJl IGV4YWN0bHkgYXMgd2l0aAo8Y29kZT4mbHQ7TElOSyBSRUw9InN0eWxlc2hlZXQi Jmd0OzwvY29kZT4gaW4gSFRNTCA0LjAsIHdpdGggdGhlCmV4Y2VwdGlvbiBvZiB0 aGUgPGNvZGU+YWx0ZXJuYXRlPC9jb2RlPiBwc2V1ZG8tYXR0cmlidXRlLiAgSWYK PGNvZGU+YWx0ZXJuYXRlPSJ5ZXMiPC9jb2RlPiBpcyBzcGVjaWZpZWQsIHRoZW4g dGhlIHByb2Nlc3NpbmcKaW5zdHJ1Y3Rpb24gaGFzIHRoZSBzZW1hbnRpY3Mgb2Yg PGNvZGU+Jmx0O0xJTksgUkVMPSJhbHRlcm5hdGUKc3R5bGVzaGVldCImZ3Q7PC9j b2RlPiBpbnN0ZWFkIG9mIDxjb2RlPiZsdDtMSU5LClJFTD0ic3R5bGVzaGVldCIm Z3Q7PC9jb2RlPi48L3A+Cgo8YmxvY2txdW90ZT4KPGI+Tk9URTogPC9iPlNpbmNl IHRoZSB2YWx1ZSBvZiB0aGUgPGNvZGU+aHJlZjwvY29kZT4gYXR0cmlidXRlIGlz IGEgVVJJCnJlZmVyZW5jZSwgaXQgbWF5IGJlIGEgcmVsYXRpdmUgVVJJIGFuZCBp dCBtYXkgY29udGFpbiBhIGZyYWdtZW50CmlkZW50aWZpZXIuIEluIHBhcnRpY3Vs YXIgdGhlIFVSSSByZWZlcmVuY2UgbWF5IGNvbnRhaW4gb25seSBhCmZyYWdtZW50 IGlkZW50aWZpZXIuICBTdWNoIGEgVVJJIHJlZmVyZW5jZSBpcyBhIHJlZmVyZW5j ZSB0byBhIHBhcnQgb2YKdGhlIGRvY3VtZW50IGNvbnRhaW5pbmcgdGhlIDxjb2Rl PnhtbC1zdHlsZXNoZWV0PC9jb2RlPiBwcm9jZXNzaW5nCmluc3RydWN0aW9uIChz ZWUgPGEgaHJlZj0iI1JGQzIzOTYiPltSRkMyMzk2XTwvYT4pLiBUaGUgY29uc2Vx dWVuY2UgaXMgdGhhdCB0aGUKPGNvZGU+eG1sLXN0eWxlc2hlZXQ8L2NvZGU+IHBy b2Nlc3NpbmcgaW5zdHJ1Y3Rpb24gYWxsb3dzIHN0eWxlIHNoZWV0cwp0byBiZSBl bWJlZGRlZCBpbiB0aGUgc2FtZSBkb2N1bWVudCBhcyB0aGUgPGNvZGU+eG1sLXN0 eWxlc2hlZXQ8L2NvZGU+CnByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb24uPC9ibG9ja3F1 b3RlPgoKPHA+SW4gc29tZSBjYXNlcywgc3R5bGUgc2hlZXRzIG1heSBiZSBsaW5r ZWQgd2l0aCBhbiBYTUwgZG9jdW1lbnQgYnkKbWVhbnMgZXh0ZXJuYWwgdG8gdGhl IGRvY3VtZW50LiBGb3IgZXhhbXBsZSwgZWFybGllciB2ZXJzaW9ucyBvZiBIVFRQ CjxhIGhyZWY9IiNSRkMyMDY4Ij5bUkZDMjA2OF08L2E+IChzZWN0aW9uIDE5LjYu Mi40KSBhbGxvd2VkIHN0eWxlIHNoZWV0cyB0byBiZQphc3NvY2lhdGVkIHdpdGgg WE1MIGRvY3VtZW50cyBieSBtZWFucyBvZiB0aGUgPGNvZGU+TGluazwvY29kZT4K aGVhZGVyLiAgQW55IGxpbmtzIHRvIHN0eWxlIHNoZWV0cyB0aGF0IGFyZSBzcGVj aWZpZWQgZXh0ZXJuYWxseSB0byB0aGUKZG9jdW1lbnQgYXJlIGNvbnNpZGVyZWQg dG8gb2NjdXIgYmVmb3JlIHRoZSBsaW5rcyBzcGVjaWZpZWQgYnkgdGhlCjxjb2Rl PnhtbC1zdHlsZXNoZWV0PC9jb2RlPiBwcm9jZXNzaW5nIGluc3RydWN0aW9ucy4g IFRoaXMgaXMgdGhlIHNhbWUKYXMgaW4gSFRNTCA0LjAgKHNlZSA8YSBocmVmPSJo dHRwOi8vd3d3LnczLm9yZy9UUi9SRUMtaHRtbDQwL3ByZXNlbnQvc3R5bGVzLmh0 bWwjaC0xNC42Ij5zZWN0aW9uCjE0LjY8L2E+KS48L3A+Cgo8cD5IZXJlIGFyZSBz b21lIGV4YW1wbGVzIGZyb20gSFRNTCA0LjAgd2l0aCB0aGUgY29ycmVzcG9uZGlu Zwpwcm9jZXNzaW5nIGluc3RydWN0aW9uOjwvcD4KCjxwcmU+Jmx0O0xJTksgaHJl Zj0ibXlzdHlsZS5jc3MiIHJlbD0ic3R5bGUgc2hlZXQiIHR5cGU9InRleHQvY3Nz IiZndDsKJmx0Oz94bWwtc3R5bGVzaGVldCBocmVmPSJteXN0eWxlLmNzcyIgdHlw ZT0idGV4dC9jc3MiPyZndDsKCiZsdDtMSU5LIGhyZWY9Im15c3R5bGUuY3NzIiB0 aXRsZT0iQ29tcGFjdCIgcmVsPSJzdHlsZXNoZWV0Igp0eXBlPSJ0ZXh0L2NzcyIm Z3Q7CiZsdDs/eG1sLXN0eWxlc2hlZXQgaHJlZj0ibXlzdHlsZS5jc3MiIHRpdGxl PSJDb21wYWN0IiB0eXBlPSJ0ZXh0L2NzcyI/Jmd0OwoKJmx0O0xJTksgaHJlZj0i bXlzdHlsZS5jc3MiIHRpdGxlPSJNZWRpdW0iIHJlbD0iYWx0ZXJuYXRlIHN0eWxl c2hlZXQiCnR5cGU9InRleHQvY3NzIiZndDsKJmx0Oz94bWwtc3R5bGVzaGVldCBh bHRlcm5hdGU9InllcyIgaHJlZj0ibXlzdHlsZS5jc3MiIHRpdGxlPSJNZWRpdW0i CnR5cGU9InRleHQvY3NzIj8mZ3Q7PC9wcmU+Cgo8cD5NdWx0aXBsZSA8Y29kZT54 bWwtc3R5bGVzaGVldDwvY29kZT4gcHJvY2Vzc2luZyBpbnN0cnVjdGlvbnMgYXJl CmFsc28gYWxsb3dlZCB3aXRoIGV4YWN0bHkgdGhlIHNhbWUgc2VtYW50aWNzIGFz IHdpdGggPGNvZGU+TElOSwpSRUw9InN0eWxlc2hlZXQiPC9jb2RlPi4gRm9yIGV4 YW1wbGUsPC9wPgoKPHByZT4mbHQ7TElOSyByZWw9ImFsdGVybmF0ZSBzdHlsZXNo ZWV0IiB0aXRsZT0iY29tcGFjdCIgaHJlZj0ic21hbGwtYmFzZS5jc3MiCnR5cGU9 InRleHQvY3NzIiZndDsKJmx0O0xJTksgcmVsPSJhbHRlcm5hdGUgc3R5bGVzaGVl dCIgdGl0bGU9ImNvbXBhY3QiIGhyZWY9InNtYWxsLWV4dHJhcy5jc3MiCnR5cGU9 InRleHQvY3NzIiZndDsKJmx0O0xJTksgcmVsPSJhbHRlcm5hdGUgc3R5bGVzaGVl dCIgdGl0bGU9ImJpZyBwcmludCIgaHJlZj0iYmlncHJpbnQuY3NzIgp0eXBlPSJ0 ZXh0L2NzcyImZ3Q7CiZsdDtMSU5LIHJlbD0ic3R5bGVzaGVldCIgaHJlZj0iY29t bW9uLmNzcyIgdHlwZT0idGV4dC9jc3MiJmd0OzwvcHJlPgoKPHA+d291bGQgYmUg ZXF1aXZhbGVudCB0bzo8L3A+Cgo8cHJlPiZsdDs/eG1sLXN0eWxlc2hlZXQgYWx0 ZXJuYXRlPSJ5ZXMiIHRpdGxlPSJjb21wYWN0IiBocmVmPSJzbWFsbC1iYXNlLmNz cyIKdHlwZT0idGV4dC9jc3MiPyZndDsKJmx0Oz94bWwtc3R5bGVzaGVldCBhbHRl cm5hdGU9InllcyIgdGl0bGU9ImNvbXBhY3QiIGhyZWY9InNtYWxsLWV4dHJhcy5j c3MiCnR5cGU9InRleHQvY3NzIj8mZ3Q7CiZsdDs/eG1sLXN0eWxlc2hlZXQgYWx0 ZXJuYXRlPSJ5ZXMiIHRpdGxlPSJiaWcgcHJpbnQiIGhyZWY9ImJpZ3ByaW50LmNz cyIKdHlwZT0idGV4dC9jc3MiPyZndDsKJmx0Oz94bWwtc3R5bGVzaGVldCBocmVm PSJjb21tb24uY3NzIiB0eXBlPSJ0ZXh0L2NzcyI/Jmd0OzwvcHJlPgoKCgo8aHIg dGl0bGU9IlNlcGFyYXRvciBmcm9tIGZvb3RlciI+Cgo8aDI+CjxhIG5hbWU9IlJl ZmVyZW5jZXMiPjwvYT5BIFJlZmVyZW5jZXM8L2gyPgoKPGRsPgoKPGR0Pgo8YSBu YW1lPSJIVE1MIj5IVE1MNDA8L2E+CjwvZHQ+CjxkZD5Xb3JsZCBXaWRlIFdlYgpD b25zb3J0aXVtLiA8aT5IVE1MIDQuMCBTcGVjaWZpY2F0aW9uLjwvaT4gVzNDIFJl Y29tbWVuZGF0aW9uLiBTZWUKPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcvVFIv UkVDLWh0bWw0MCI+aHR0cDovL3d3dy53My5vcmcvVFIvUkVDLWh0bWw0MDwvYT4K PC9kZD4KCjxkdD4KPGEgbmFtZT0iUkZDMjA2OCI+UkZDMjA2ODwvYT4KPC9kdD4K PGRkPlIuIEZpZWxkaW5nLCBKLiBHZXR0eXMsIEouIE1vZ3VsLApILiBGcnlzdHlr IE5pZWxzZW4sIGFuZCBULiBCZXJuZXJzLUxlZS4gIDxpPkh5cGVydGV4dCBUcmFu c2ZlcgpQcm90b2NvbCAtLSBIVFRQLzEuMS48L2k+LiBJRVRGIFJGQyAyMDY4LiBT ZWUgPGEgaHJlZj0iaHR0cDovL3d3dy5pZXRmLm9yZy9yZmMvcmZjMjA2OC50eHQi Pmh0dHA6Ly93d3cuaWV0Zi5vcmcvcmZjL3JmYzIwNjgudHh0PC9hPi48L2RkPgoK PGR0Pgo8YSBuYW1lPSJSRkMyMzk2Ij5SRkMyMzk2PC9hPgo8L2R0Pgo8ZGQ+VC4g QmVybmVycy1MZWUsIFIuIEZpZWxkaW5nLCBhbmQKTC4gTWFzaW50ZXIuICA8aT5V bmlmb3JtIFJlc291cmNlIElkZW50aWZpZXJzIChVUkkpOiBHZW5lcmljClN5bnRh eDwvaT4uIElFVEYgUkZDIDIzOTYuIFNlZSA8YSBocmVmPSJodHRwOi8vd3d3Lmll dGYub3JnL3JmYy9yZmMyMzk2LnR4dCI+aHR0cDovL3d3dy5pZXRmLm9yZy9yZmMv cmZjMjM5Ni50eHQ8L2E+LjwvZGQ+Cgo8ZHQ+CjxhIG5hbWU9IlhNTCI+WE1MMTA8 L2E+CjwvZHQ+CjxkZD5Xb3JsZCBXaWRlIFdlYiBDb25zb3J0aXVtLiA8aT5FeHRl bnNpYmxlCk1hcmt1cCBMYW5ndWFnZSAoWE1MKSAxLjAuPC9pPiBXM0MgUmVjb21t ZW5kYXRpb24uIFNlZSA8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9UUi8xOTk4 L1JFQy14bWwtMTk5ODAyMTAiPmh0dHA6Ly93d3cudzMub3JnL1RSLzE5OTgvUkVD LXhtbC0xOTk4MDIxMDwvYT4KPC9kZD4KCjwvZGw+CgoKCgo8aDI+CjxhIG5hbWU9 InJhdGlvbmFsZSI+PC9hPkIgUmF0aW9uYWxlPC9oMj4KCjxwPlRoZXJlIHdhcyBh biB1cmdlbnQgcmVxdWlyZW1lbnQgZm9yIGEgc3BlY2lmaWNhdGlvbiBmb3Igc3R5 bGUgc2hlZXQKbGlua2luZyB0aGF0IGNvdWxkIGJlIGNvbXBsZXRlZCBpbiB0aW1l IGZvciB0aGUgbmV4dCByZWxlYXNlIGZyb20KbWFqb3IgYnJvd3NlciB2ZW5kb3Jz LiAgT25seSBieSBjaG9vc2luZyBhIHNpbXBsZSBtZWNoYW5pc20gY2xvc2VseQpi YXNlZCBvbiBhIHByb3ZlbiBleGlzdGluZyBtZWNoYW5pc20gY291bGQgdGhlIHNw ZWNpZmljYXRpb24gYmUKY29tcGxldGVkIGluIHRpbWUgdG8gbWVldCB0aGlzIHJl cXVpcmVtZW50LjwvcD4KCjxwPlVzZSBvZiBhIHByb2Nlc3NpbmcgaW5zdHJ1Y3Rp b24gYXZvaWRzIHBvbGx1dGluZyB0aGUgbWFpbiBkb2N1bWVudApzdHJ1Y3R1cmUg d2l0aCBhcHBsaWNhdGlvbiBzcGVjaWZpYyBwcm9jZXNzaW5nIGluZm9ybWF0aW9u LjwvcD4KCjxwPlRoZSBtZWNoYW5pc20gY2hvc2VuIGZvciB0aGlzIHZlcnNpb24g b2YgdGhlIHNwZWNpZmljYXRpb24gaXMgbm90IGEKY29uc3RyYWludCBvbiB0aGUg YWRkaXRpb25hbCBtZWNoYW5pc21zIHBsYW5uZWQgZm9yIGZ1dHVyZSB2ZXJzaW9u cy4KVGhlcmUgaXMgbm8gZXhwZWN0YXRpb24gdGhhdCB0aGVzZSB3aWxsIHVzZSBw cm9jZXNzaW5nIGluc3RydWN0aW9uczsKaW5kZWVkIHRoZXkgbWF5IG5vdCBpbmNs dWRlIHRoZSBsaW5raW5nIGluZm9ybWF0aW9uIGluIHRoZSBzb3VyY2UKZG9jdW1l bnQuPC9wPgoKCgoKPC9ib2R5Pgo8L2h0bWw+Cg== libxml-security-java-1.5.6/samples/data/xmldsig-core-schema.xsd0000644000175000017500000002406511520042450023272 0ustar tonytony ]> libxml-security-java-1.5.6/samples/data/keystore.jks0000644000175000017500000000231611520042450021270 0ustar tonytonytest4H00 +*w0jԉ.Nu@b<㼲?mVČd߾}}ꃟ-F/XX:_7?J@V 0K"ӳQl ?2qeƓ?mJC/GOpK:[.(:9zj#Qmf+*/>wLP3f4ڽPyBwAtU=?ыy^!VuUK>#ĭA351u=~,uCahJV;ڕb/S}[mI΀ùOܽ"= +_}vwL׌ 5Zb=[& L{Md\8b} 3 Jz=s8cWkuoX.50900:*0 *H80a1 0 UDE10U University of Siegen10U FB12NUE1!0UChristian Geuer-Pollmann0 010501122058Z 061022122058Z0a1 0 UDE10U University of Siegen10U FB12NUE1!0UChristian Geuer-Pollmann00,*H80Su)RJ.Rvd0x OŬNlibxml-security-java-1.5.6/samples/data/ie/0000755000175000017500000000000012273503736017324 5ustar tonytonylibxml-security-java-1.5.6/samples/data/ie/baltimore/0000755000175000017500000000000012273503736021302 5ustar tonytonylibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/0000755000175000017500000000000012273503736024404 5ustar tonytonylibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/0000755000175000017500000000000012273503736031774 5ustar tonytony././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-x509-is.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/sig0000644000175000017500000000163710052374102032472 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= bmKMy/w1DO9dHA6E7Dt0B8IFkYAj1/UD3TqcdqIcfkMT7evE8+NBgg== CN=Another Transient CA,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE 1017792003066 ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/xml-stylesheet.b64libxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/xml0000644000175000017500000004257210052374102032513 0ustar tonytonyPCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFu c2l0aW9uYWwvL0VOIj4KPGh0bWw+CjxoZWFkPgo8dGl0bGU+QXNzb2NpYXRpbmcg U3R5bGUgU2hlZXRzIHdpdGggWE1MIGRvY3VtZW50czwvdGl0bGU+CjxsaW5rIHJl bD0ic3R5bGVzaGVldCIgdHlwZT0idGV4dC9jc3MiIGhyZWY9Imh0dHA6Ly93d3cu dzMub3JnL1N0eWxlU2hlZXRzL1RSL1czQy1SRUMiPgo8c3R5bGUgdHlwZT0idGV4 dC9jc3MiPmNvZGUgeyBmb250LWZhbWlseTogbW9ub3NwYWNlIH08L3N0eWxlPgo8 L2hlYWQ+Cjxib2R5Pgo8ZGl2IGNsYXNzPSJoZWFkIj4KPGEgaHJlZj0iaHR0cDov L3d3dy53My5vcmcvIj48aW1nIHNyYz0iaHR0cDovL3d3dy53My5vcmcvSWNvbnMv V1dXL3czY19ob21lIiBhbHQ9IlczQyIgaGVpZ2h0PSI0OCIgd2lkdGg9IjcyIj48 L2E+CjxoMT5Bc3NvY2lhdGluZyBTdHlsZSBTaGVldHMgd2l0aCBYTUwgZG9jdW1l bnRzPGJyPlZlcnNpb24gMS4wPC9oMT4KPGgyPlczQyBSZWNvbW1lbmRhdGlvbiAy OSBKdW5lIDE5OTk8L2gyPgo8ZGw+CjxkdD5UaGlzIHZlcnNpb246PC9kdD4KPGRk Pgo8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzA2L1JFQy14bWwtc3R5 bGVzaGVldC0xOTk5MDYyOSI+aHR0cDovL3d3dy53My5vcmcvMTk5OS8wNi9SRUMt eG1sLXN0eWxlc2hlZXQtMTk5OTA2Mjk8L2E+Cjxicj4KPC9kZD4KPGR0PkxhdGVz dCB2ZXJzaW9uOjwvZHQ+CjxkZD4KPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcv VFIveG1sLXN0eWxlc2hlZXQiPmh0dHA6Ly93d3cudzMub3JnL1RSL3htbC1zdHls ZXNoZWV0PC9hPgo8YnI+CjwvZGQ+CjxkdD5QcmV2aW91cyB2ZXJzaW9uOjwvZHQ+ CjxkZD4KPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcvVFIvMTk5OS94bWwtc3R5 bGVzaGVldC0xOTk5MDQyOCI+aHR0cDovL3d3dy53My5vcmcvVFIvMTk5OS94bWwt c3R5bGVzaGVldC0xOTk5MDQyODwvYT4KPGJyPgo8L2RkPgo8ZHQ+RWRpdG9yOjwv ZHQ+CjxkZD4KCkphbWVzIENsYXJrCjxhIGhyZWY9Im1haWx0bzpqamNAamNsYXJr LmNvbSI+Jmx0O2pqY0BqY2xhcmsuY29tJmd0OzwvYT4KPGJyPgo8L2RkPgo8L2Rs Pgo8cCBjbGFzcz0iY29weXJpZ2h0Ij4KPGEgaHJlZj0iaHR0cDovL3d3dy53My5v cmcvQ29uc29ydGl1bS9MZWdhbC9pcHItbm90aWNlLmh0bWwjQ29weXJpZ2h0Ij4K CQlDb3B5cmlnaHQ8L2E+ICZuYnNwOyZjb3B5OyZuYnNwOyAxOTk5IDxhIGhyZWY9 Imh0dHA6Ly93d3cudzMub3JnIj5XM0M8L2E+CgkJKDxhIGhyZWY9Imh0dHA6Ly93 d3cubGNzLm1pdC5lZHUiPk1JVDwvYT4sCgkJPGEgaHJlZj0iaHR0cDovL3d3dy5p bnJpYS5mci8iPklOUklBPC9hPiwKCQk8YSBocmVmPSJodHRwOi8vd3d3LmtlaW8u YWMuanAvIj5LZWlvPC9hPiApLCBBbGwgUmlnaHRzIFJlc2VydmVkLiBXM0MKCQk8 YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9Db25zb3J0aXVtL0xlZ2FsL2lwci1u b3RpY2UuaHRtbCNMZWdhbCBEaXNjbGFpbWVyIj5saWFiaWxpdHksPC9hPjxhIGhy ZWY9Imh0dHA6Ly93d3cudzMub3JnL0NvbnNvcnRpdW0vTGVnYWwvaXByLW5vdGlj ZS5odG1sI1czQyBUcmFkZW1hcmtzIj50cmFkZW1hcms8L2E+LAoJCTxhIGhyZWY9 Imh0dHA6Ly93d3cudzMub3JnL0NvbnNvcnRpdW0vTGVnYWwvY29weXJpZ2h0LWRv Y3VtZW50cy5odG1sIj5kb2N1bWVudCB1c2UgPC9hPmFuZAoJCTxhIGhyZWY9Imh0 dHA6Ly93d3cudzMub3JnL0NvbnNvcnRpdW0vTGVnYWwvY29weXJpZ2h0LXNvZnR3 YXJlLmh0bWwiPnNvZnR3YXJlIGxpY2Vuc2luZyA8L2E+cnVsZXMgYXBwbHkuCgk8 L3A+CjxociB0aXRsZT0iU2VwYXJhdG9yIGZvciBoZWFkZXIiPgo8L2Rpdj4KPGgy Pgo8YSBuYW1lPSJhYnN0cmFjdCI+QWJzdHJhY3Q8L2E+CjwvaDI+Cgo8cD5UaGlz IGRvY3VtZW50IGFsbG93cyBhIHN0eWxlIHNoZWV0IHRvIGJlIGFzc29jaWF0ZWQg d2l0aCBhbiBYTUwKZG9jdW1lbnQgYnkgaW5jbHVkaW5nIG9uZSBvciBtb3JlIHBy b2Nlc3NpbmcgaW5zdHJ1Y3Rpb25zIHdpdGggYQp0YXJnZXQgb2YgPGNvZGU+eG1s LXN0eWxlc2hlZXQ8L2NvZGU+IGluIHRoZSBkb2N1bWVudCdzIHByb2xvZy48L3A+ Cgo8aDI+CjxhIG5hbWU9InN0YXR1cyI+U3RhdHVzIG9mIHRoaXMgZG9jdW1lbnQ8 L2E+CjwvaDI+Cgo8cD5UaGlzIGRvY3VtZW50IGhhcyBiZWVuIHJldmlld2VkIGJ5 IFczQyBNZW1iZXJzIGFuZCBvdGhlciBpbnRlcmVzdGVkCnBhcnRpZXMgYW5kIGhh cyBiZWVuIGVuZG9yc2VkIGJ5IHRoZSBEaXJlY3RvciBhcyBhIFczQyA8YSBocmVm PSJodHRwOi8vd3d3LnczLm9yZy9Db25zb3J0aXVtL1Byb2Nlc3MvI1JlY3NXM0Mi PlJlY29tbWVuZGF0aW9uPC9hPi4gSXQKaXMgYSBzdGFibGUgZG9jdW1lbnQgYW5k IG1heSBiZSB1c2VkIGFzIHJlZmVyZW5jZSBtYXRlcmlhbCBvciBjaXRlZCBhcwph IG5vcm1hdGl2ZSByZWZlcmVuY2UgZnJvbSBvdGhlciBkb2N1bWVudHMuIFczQydz IHJvbGUgaW4gbWFraW5nIHRoZQpSZWNvbW1lbmRhdGlvbiBpcyB0byBkcmF3IGF0 dGVudGlvbiB0byB0aGUgc3BlY2lmaWNhdGlvbiBhbmQgdG8KcHJvbW90ZSBpdHMg d2lkZXNwcmVhZCBkZXBsb3ltZW50LiBUaGlzIGVuaGFuY2VzIHRoZSBmdW5jdGlv bmFsaXR5IGFuZAppbnRlcm9wZXJhYmlsaXR5IG9mIHRoZSBXZWIuPC9wPgoKPHA+ VGhlIGxpc3Qgb2Yga25vd24gZXJyb3JzIGluIHRoaXMgc3BlY2lmaWNhdGlvbnMg aXMgYXZhaWxhYmxlIGF0CjxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkv MDYvUkVDLXhtbC1zdHlsZXNoZWV0LTE5OTkwNjI5L2VycmF0YSI+aHR0cDovL3d3 dy53My5vcmcvVFIvMTk5OS94bWwtc3R5bGVzaGVldC0xOTk5MDYyOS9lcnJhdGE8 L2E+LjwvcD4KCjxwPkNvbW1lbnRzIG9uIHRoaXMgc3BlY2lmaWNhdGlvbiBtYXkg YmUgc2VudCB0byAmbHQ7PGEgaHJlZj0ibWFpbHRvOnd3dy14bWwtc3R5bGVzaGVl dC1jb21tZW50c0B3My5vcmciPnd3dy14bWwtc3R5bGVzaGVldC1jb21tZW50c0B3 My5vcmc8L2E+Jmd0Oy4gVGhlIGFyY2hpdmUgb2YgcHVibGljCmNvbW1lbnRzIGlz IGF2YWlsYWJsZSBhdCA8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9BcmNoaXZl cy9QdWJsaWMvd3d3LXhtbC1zdHlsZXNoZWV0LWNvbW1lbnRzIj5odHRwOi8vdzMu b3JnL0FyY2hpdmVzL1B1YmxpYy93d3cteG1sLXN0eWxlc2hlZXQtY29tbWVudHM8 L2E+LjwvcD4KCjxwPkEgbGlzdCBvZiBjdXJyZW50IFczQyBSZWNvbW1lbmRhdGlv bnMgYW5kIG90aGVyIHRlY2huaWNhbCBkb2N1bWVudHMKY2FuIGJlIGZvdW5kIGF0 IDxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3JnL1RSIj5odHRwOi8vd3d3LnczLm9y Zy9UUjwvYT4uPC9wPgoKPHA+VGhlIFdvcmtpbmcgR3JvdXAgZXhwZWN0cyBhZGRp dGlvbmFsIG1lY2hhbmlzbXMgZm9yIGxpbmtpbmcgc3R5bGUKc2hlZXRzIHRvIFhN TCBkb2N1bWVudCB0byBiZSBkZWZpbmVkIGluIGEgZnV0dXJlIHNwZWNpZmljYXRp b24uPC9wPgoKPHA+VGhlIHVzZSBvZiBYTUwgcHJvY2Vzc2luZyBpbnN0cnVjdGlv bnMgaW4gdGhpcyBzcGVjaWZpY2F0aW9uIHNob3VsZApub3QgYmUgdGFrZW4gYXMg YSBwcmVjZWRlbnQuICBUaGUgVzNDIGRvZXMgbm90IGFudGljaXBhdGUgcmVjb21t ZW5kaW5nCnRoZSB1c2Ugb2YgcHJvY2Vzc2luZyBpbnN0cnVjdGlvbnMgaW4gYW55 IGZ1dHVyZSBzcGVjaWZpY2F0aW9uLiAgVGhlCjxhIGhyZWY9IiNyYXRpb25hbGUi PlJhdGlvbmFsZTwvYT4gZXhwbGFpbnMgd2h5IHRoZXkgd2VyZSB1c2VkIGluCnRo aXMgc3BlY2lmaWNhdGlvbi48L3A+Cgo8cD5UaGlzIGRvY3VtZW50IHdhcyBwcm9k dWNlZCBhcyBwYXJ0IG9mIHRoZSA8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9Y TUwvQWN0aXZpdHkiPlczQyBYTUwgQWN0aXZpdHk8L2E+LjwvcD4KCgo8aDI+Cjxh IG5hbWU9ImNvbnRlbnRzIj5UYWJsZSBvZiBjb250ZW50czwvYT4KPC9oMj4xIDxh IGhyZWY9IiNUaGUgeG1sLXN0eWxlc2hlZXQgcHJvY2Vzc2luZyBpbnN0cnVjdGlv biI+VGhlIHhtbC1zdHlsZXNoZWV0IHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb248L2E+ Cjxicj4KPGgzPkFwcGVuZGljZXM8L2gzPkEgPGEgaHJlZj0iI1JlZmVyZW5jZXMi PlJlZmVyZW5jZXM8L2E+Cjxicj5CIDxhIGhyZWY9IiNyYXRpb25hbGUiPlJhdGlv bmFsZTwvYT4KPGJyPgo8aHI+Cgo8aDI+CjxhIG5hbWU9IlRoZSB4bWwtc3R5bGVz aGVldCBwcm9jZXNzaW5nIGluc3RydWN0aW9uIj48L2E+MSBUaGUgPGNvZGU+eG1s LXN0eWxlc2hlZXQ8L2NvZGU+IHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb248L2gyPgoK PHA+U3R5bGUgU2hlZXRzIGNhbiBiZSBhc3NvY2lhdGVkIHdpdGggYW4gWE1MPGEg aHJlZj0iI1hNTCI+W1hNTDEwXTwvYT4KZG9jdW1lbnQgYnkgdXNpbmcgYSBwcm9j ZXNzaW5nIGluc3RydWN0aW9uIHdob3NlIHRhcmdldCBpcwo8Y29kZT54bWwtc3R5 bGVzaGVldDwvY29kZT4uICBUaGlzIHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb24gZm9s bG93cyB0aGUKYmVoYXZpb3VyIG9mIHRoZSBIVE1MIDQuMCA8Y29kZT4mbHQ7TElO SwpSRUw9InN0eWxlc2hlZXQiJmd0OzwvY29kZT48YSBocmVmPSIjSFRNTCI+W0hU TUw0MF08L2E+LjwvcD4KCjxwPlRoZSA8Y29kZT54bWwtc3R5bGVzaGVldDwvY29k ZT4gcHJvY2Vzc2luZyBpbnN0cnVjdGlvbiBpcyBwYXJzZWQgaW4KdGhlIHNhbWUg d2F5IGFzIGEgc3RhcnQtdGFnLCB3aXRoIHRoZSBleGNlcHRpb24gdGhhdCBlbnRp dGllcyBvdGhlcgp0aGFuIHByZWRlZmluZWQgZW50aXRpZXMgbXVzdCBub3QgYmUg cmVmZXJlbmNlZC48L3A+Cgo8cD5UaGUgZm9sbG93aW5nIGdyYW1tYXIgaXMgZ2l2 ZW4gdXNpbmcgdGhlIHNhbWUgbm90YXRpb24gYXMgdGhlCmdyYW1tYXIgaW4gdGhl IFhNTCBSZWNvbW1lbmRhdGlvbjxhIGhyZWY9IiNYTUwiPltYTUwxMF08L2E+LiAg U3ltYm9scyBpbiB0aGUKZ3JhbW1hciB0aGF0IGFyZSBub3QgZGVmaW5lZCBoZXJl IGFyZSBkZWZpbmVkIGluIHRoZSBYTUwKUmVjb21tZW5kYXRpb24uPC9wPgoKPGg1 PnhtbC1zdHlsZXNoZWV0IHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb248L2g1Pgo8dGFi bGUgY2xhc3M9InNjcmFwIj4KPHRib2R5Pgo8dHIgdmFsaWduPSJiYXNlbGluZSI+ Cjx0ZD4KPGEgbmFtZT0iTlQtU3R5bGVTaGVldFBJIj48L2E+WzFdJm5ic3A7Jm5i c3A7Jm5ic3A7PC90ZD4KPHRkPlN0eWxlU2hlZXRQSTwvdGQ+Cjx0ZD4mbmJzcDsm bmJzcDsmbmJzcDs6Oj0mbmJzcDsmbmJzcDsmbmJzcDs8L3RkPgo8dGQ+JyZsdDs/ eG1sLXN0eWxlc2hlZXQnICg8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9UUi9S RUMteG1sI05ULVMiPlM8L2E+IDxhIGhyZWY9IiNOVC1Qc2V1ZG9BdHQiPlBzZXVk b0F0dDwvYT4pKiA8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9UUi9SRUMteG1s I05ULVMiPlM8L2E+PyAnPyZndDsnPC90ZD4KPHRkPgo8L3RkPgo8L3RyPgo8dHIg dmFsaWduPSJiYXNlbGluZSI+Cjx0ZD4KPGEgbmFtZT0iTlQtUHNldWRvQXR0Ij48 L2E+WzJdJm5ic3A7Jm5ic3A7Jm5ic3A7PC90ZD4KPHRkPlBzZXVkb0F0dDwvdGQ+ Cjx0ZD4mbmJzcDsmbmJzcDsmbmJzcDs6Oj0mbmJzcDsmbmJzcDsmbmJzcDs8L3Rk Pgo8dGQ+CjxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3JnL1RSL1JFQy14bWwjTlQt TmFtZSI+TmFtZTwvYT4gPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcvVFIvUkVD LXhtbCNOVC1TIj5TPC9hPj8gJz0nIDxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3Jn L1RSL1JFQy14bWwjTlQtUyI+UzwvYT4/IDxhIGhyZWY9IiNOVC1Qc2V1ZG9BdHRW YWx1ZSI+UHNldWRvQXR0VmFsdWU8L2E+CjwvdGQ+Cjx0ZD4KPC90ZD4KPC90cj4K PHRyIHZhbGlnbj0iYmFzZWxpbmUiPgo8dGQ+CjxhIG5hbWU9Ik5ULVBzZXVkb0F0 dFZhbHVlIj48L2E+WzNdJm5ic3A7Jm5ic3A7Jm5ic3A7PC90ZD4KPHRkPlBzZXVk b0F0dFZhbHVlPC90ZD4KPHRkPiZuYnNwOyZuYnNwOyZuYnNwOzo6PSZuYnNwOyZu YnNwOyZuYnNwOzwvdGQ+Cjx0ZD4oJyInIChbXiImbHQ7JmFtcDtdIHwgPGEgaHJl Zj0iaHR0cDovL3d3dy53My5vcmcvVFIvUkVDLXhtbCNOVC1DaGFyUmVmIj5DaGFy UmVmPC9hPiB8IDxhIGhyZWY9IiNOVC1QcmVkZWZFbnRpdHlSZWYiPlByZWRlZkVu dGl0eVJlZjwvYT4pKiAnIic8L3RkPgo8dGQ+CjwvdGQ+CjwvdHI+Cjx0ciB2YWxp Z249ImJhc2VsaW5lIj4KPHRkPgo8L3RkPgo8dGQ+CjwvdGQ+Cjx0ZD4KPC90ZD4K PHRkPnwgIiciIChbXicmbHQ7JmFtcDtdIHwgPGEgaHJlZj0iaHR0cDovL3d3dy53 My5vcmcvVFIvUkVDLXhtbCNOVC1DaGFyUmVmIj5DaGFyUmVmPC9hPiB8IDxhIGhy ZWY9IiNOVC1QcmVkZWZFbnRpdHlSZWYiPlByZWRlZkVudGl0eVJlZjwvYT4pKiAi JyIpPC90ZD4KPHRkPgo8L3RkPgo8L3RyPgo8dHIgdmFsaWduPSJiYXNlbGluZSI+ Cjx0ZD4KPC90ZD4KPHRkPgo8L3RkPgo8dGQ+CjwvdGQ+Cjx0ZD4tICg8YSBocmVm PSJodHRwOi8vd3d3LnczLm9yZy9UUi9SRUMteG1sI05ULUNoYXIiPkNoYXI8L2E+ KiAnPyZndDsnIDxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3JnL1RSL1JFQy14bWwj TlQtQ2hhciI+Q2hhcjwvYT4qKTwvdGQ+Cjx0ZD4KPC90ZD4KPC90cj4KPHRyIHZh bGlnbj0iYmFzZWxpbmUiPgo8dGQ+CjxhIG5hbWU9Ik5ULVByZWRlZkVudGl0eVJl ZiI+PC9hPls0XSZuYnNwOyZuYnNwOyZuYnNwOzwvdGQ+Cjx0ZD5QcmVkZWZFbnRp dHlSZWY8L3RkPgo8dGQ+Jm5ic3A7Jm5ic3A7Jm5ic3A7Ojo9Jm5ic3A7Jm5ic3A7 Jm5ic3A7PC90ZD4KPHRkPicmYW1wO2FtcDsnIHwgJyZhbXA7bHQ7JyB8ICcmYW1w O2d0OycgfCAnJmFtcDtxdW90OycgfCAnJmFtcDthcG9zOyc8L3RkPgo8dGQ+Cjwv dGQ+CjwvdHI+CjwvdGJvZHk+CjwvdGFibGU+Cgo8cD5JbiA8YSBocmVmPSIjTlQt UHNldWRvQXR0VmFsdWUiPlBzZXVkb0F0dFZhbHVlPC9hPiwgYSA8YSBocmVmPSJo dHRwOi8vd3d3LnczLm9yZy9UUi9SRUMteG1sI05ULUNoYXJSZWYiPkNoYXJSZWY8 L2E+IG9yIGEgPGEgaHJlZj0iI05ULVByZWRlZkVudGl0eVJlZiI+UHJlZGVmRW50 aXR5UmVmPC9hPiBpcyBpbnRlcnByZXRlZCBpbiB0aGUKc2FtZSBtYW5uZXIgYXMg aW4gYSBub3JtYWwgWE1MIGF0dHJpYnV0ZSB2YWx1ZS4gIFRoZSBhY3R1YWwgdmFs dWUgb2YKdGhlIHBzZXVkby1hdHRyaWJ1dGUgaXMgdGhlIHZhbHVlIGFmdGVyIGVh Y2ggcmVmZXJlbmNlIGlzIHJlcGxhY2VkIGJ5CnRoZSBjaGFyYWN0ZXIgaXQgcmVm ZXJlbmNlcy4gIFRoaXMgcmVwbGFjZW1lbnQgaXMgbm90IHBlcmZvcm1lZAphdXRv bWF0aWNhbGx5IGJ5IGFuIFhNTCBwcm9jZXNzb3IuPC9wPgoKPHA+VGhlIDxjb2Rl PnhtbC1zdHlsZXNoZWV0PC9jb2RlPiBwcm9jZXNzaW5nIGluc3RydWN0aW9uIGlz IGFsbG93ZWQKb25seSBpbiB0aGUgcHJvbG9nIG9mIGFuIFhNTCBkb2N1bWVudC4g VGhlIHN5bnRheCBvZiBYTUwgY29uc3RyYWlucwp3aGVyZSBwcm9jZXNzaW5nIGlu c3RydWN0aW9ucyBhcmUgYWxsb3dlZCBpbiB0aGUgcHJvbG9nOyB0aGUKPGNvZGU+ eG1sLXN0eWxlc2hlZXQ8L2NvZGU+IHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb24gaXMg YWxsb3dlZCBhbnl3aGVyZQppbiB0aGUgcHJvbG9nIHRoYXQgbWVldHMgdGhlc2Ug Y29uc3RyYWludHMuPC9wPgoKPGJsb2NrcXVvdGU+CjxiPk5PVEU6IDwvYj5JZiB0 aGUgPGNvZGU+eG1sLXN0eWxlc2hlZXQ8L2NvZGU+IHByb2Nlc3NpbmcgaW5zdHJ1 Y3Rpb24Kb2NjdXJzIGluIHRoZSBleHRlcm5hbCBEVEQgc3Vic2V0IG9yIGluIGEg cGFyYW1ldGVyIGVudGl0eSwgaXQgaXMKcG9zc2libGUgdGhhdCBpdCBtYXkgbm90 IGJlIHByb2Nlc3NlZCBieSBhIG5vbi12YWxpZGF0aW5nIFhNTApwcm9jZXNzb3Ig KHNlZSA8YSBocmVmPSIjWE1MIj5bWE1MMTBdPC9hPikuPC9ibG9ja3F1b3RlPgoK PHA+VGhlIGZvbGxvd2luZyBwc2V1ZG8gYXR0cmlidXRlcyBhcmUgZGVmaW5lZDwv cD4KCjxwcmU+aHJlZiBDREFUQSAjUkVRVUlSRUQKdHlwZSBDREFUQSAjUkVRVUlS RUQKdGl0bGUgQ0RBVEEgI0lNUExJRUQKbWVkaWEgQ0RBVEEgI0lNUExJRUQKY2hh cnNldCBDREFUQSAjSU1QTElFRAphbHRlcm5hdGUgKHllc3xubykgIm5vIjwvcHJl PgoKPHA+VGhlIHNlbWFudGljcyBvZiB0aGUgcHNldWRvLWF0dHJpYnV0ZXMgYXJl IGV4YWN0bHkgYXMgd2l0aAo8Y29kZT4mbHQ7TElOSyBSRUw9InN0eWxlc2hlZXQi Jmd0OzwvY29kZT4gaW4gSFRNTCA0LjAsIHdpdGggdGhlCmV4Y2VwdGlvbiBvZiB0 aGUgPGNvZGU+YWx0ZXJuYXRlPC9jb2RlPiBwc2V1ZG8tYXR0cmlidXRlLiAgSWYK PGNvZGU+YWx0ZXJuYXRlPSJ5ZXMiPC9jb2RlPiBpcyBzcGVjaWZpZWQsIHRoZW4g dGhlIHByb2Nlc3NpbmcKaW5zdHJ1Y3Rpb24gaGFzIHRoZSBzZW1hbnRpY3Mgb2Yg PGNvZGU+Jmx0O0xJTksgUkVMPSJhbHRlcm5hdGUKc3R5bGVzaGVldCImZ3Q7PC9j b2RlPiBpbnN0ZWFkIG9mIDxjb2RlPiZsdDtMSU5LClJFTD0ic3R5bGVzaGVldCIm Z3Q7PC9jb2RlPi48L3A+Cgo8YmxvY2txdW90ZT4KPGI+Tk9URTogPC9iPlNpbmNl IHRoZSB2YWx1ZSBvZiB0aGUgPGNvZGU+aHJlZjwvY29kZT4gYXR0cmlidXRlIGlz IGEgVVJJCnJlZmVyZW5jZSwgaXQgbWF5IGJlIGEgcmVsYXRpdmUgVVJJIGFuZCBp dCBtYXkgY29udGFpbiBhIGZyYWdtZW50CmlkZW50aWZpZXIuIEluIHBhcnRpY3Vs YXIgdGhlIFVSSSByZWZlcmVuY2UgbWF5IGNvbnRhaW4gb25seSBhCmZyYWdtZW50 IGlkZW50aWZpZXIuICBTdWNoIGEgVVJJIHJlZmVyZW5jZSBpcyBhIHJlZmVyZW5j ZSB0byBhIHBhcnQgb2YKdGhlIGRvY3VtZW50IGNvbnRhaW5pbmcgdGhlIDxjb2Rl PnhtbC1zdHlsZXNoZWV0PC9jb2RlPiBwcm9jZXNzaW5nCmluc3RydWN0aW9uIChz ZWUgPGEgaHJlZj0iI1JGQzIzOTYiPltSRkMyMzk2XTwvYT4pLiBUaGUgY29uc2Vx dWVuY2UgaXMgdGhhdCB0aGUKPGNvZGU+eG1sLXN0eWxlc2hlZXQ8L2NvZGU+IHBy b2Nlc3NpbmcgaW5zdHJ1Y3Rpb24gYWxsb3dzIHN0eWxlIHNoZWV0cwp0byBiZSBl bWJlZGRlZCBpbiB0aGUgc2FtZSBkb2N1bWVudCBhcyB0aGUgPGNvZGU+eG1sLXN0 eWxlc2hlZXQ8L2NvZGU+CnByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb24uPC9ibG9ja3F1 b3RlPgoKPHA+SW4gc29tZSBjYXNlcywgc3R5bGUgc2hlZXRzIG1heSBiZSBsaW5r ZWQgd2l0aCBhbiBYTUwgZG9jdW1lbnQgYnkKbWVhbnMgZXh0ZXJuYWwgdG8gdGhl IGRvY3VtZW50LiBGb3IgZXhhbXBsZSwgZWFybGllciB2ZXJzaW9ucyBvZiBIVFRQ CjxhIGhyZWY9IiNSRkMyMDY4Ij5bUkZDMjA2OF08L2E+IChzZWN0aW9uIDE5LjYu Mi40KSBhbGxvd2VkIHN0eWxlIHNoZWV0cyB0byBiZQphc3NvY2lhdGVkIHdpdGgg WE1MIGRvY3VtZW50cyBieSBtZWFucyBvZiB0aGUgPGNvZGU+TGluazwvY29kZT4K aGVhZGVyLiAgQW55IGxpbmtzIHRvIHN0eWxlIHNoZWV0cyB0aGF0IGFyZSBzcGVj aWZpZWQgZXh0ZXJuYWxseSB0byB0aGUKZG9jdW1lbnQgYXJlIGNvbnNpZGVyZWQg dG8gb2NjdXIgYmVmb3JlIHRoZSBsaW5rcyBzcGVjaWZpZWQgYnkgdGhlCjxjb2Rl PnhtbC1zdHlsZXNoZWV0PC9jb2RlPiBwcm9jZXNzaW5nIGluc3RydWN0aW9ucy4g IFRoaXMgaXMgdGhlIHNhbWUKYXMgaW4gSFRNTCA0LjAgKHNlZSA8YSBocmVmPSJo dHRwOi8vd3d3LnczLm9yZy9UUi9SRUMtaHRtbDQwL3ByZXNlbnQvc3R5bGVzLmh0 bWwjaC0xNC42Ij5zZWN0aW9uCjE0LjY8L2E+KS48L3A+Cgo8cD5IZXJlIGFyZSBz b21lIGV4YW1wbGVzIGZyb20gSFRNTCA0LjAgd2l0aCB0aGUgY29ycmVzcG9uZGlu Zwpwcm9jZXNzaW5nIGluc3RydWN0aW9uOjwvcD4KCjxwcmU+Jmx0O0xJTksgaHJl Zj0ibXlzdHlsZS5jc3MiIHJlbD0ic3R5bGUgc2hlZXQiIHR5cGU9InRleHQvY3Nz IiZndDsKJmx0Oz94bWwtc3R5bGVzaGVldCBocmVmPSJteXN0eWxlLmNzcyIgdHlw ZT0idGV4dC9jc3MiPyZndDsKCiZsdDtMSU5LIGhyZWY9Im15c3R5bGUuY3NzIiB0 aXRsZT0iQ29tcGFjdCIgcmVsPSJzdHlsZXNoZWV0Igp0eXBlPSJ0ZXh0L2NzcyIm Z3Q7CiZsdDs/eG1sLXN0eWxlc2hlZXQgaHJlZj0ibXlzdHlsZS5jc3MiIHRpdGxl PSJDb21wYWN0IiB0eXBlPSJ0ZXh0L2NzcyI/Jmd0OwoKJmx0O0xJTksgaHJlZj0i bXlzdHlsZS5jc3MiIHRpdGxlPSJNZWRpdW0iIHJlbD0iYWx0ZXJuYXRlIHN0eWxl c2hlZXQiCnR5cGU9InRleHQvY3NzIiZndDsKJmx0Oz94bWwtc3R5bGVzaGVldCBh bHRlcm5hdGU9InllcyIgaHJlZj0ibXlzdHlsZS5jc3MiIHRpdGxlPSJNZWRpdW0i CnR5cGU9InRleHQvY3NzIj8mZ3Q7PC9wcmU+Cgo8cD5NdWx0aXBsZSA8Y29kZT54 bWwtc3R5bGVzaGVldDwvY29kZT4gcHJvY2Vzc2luZyBpbnN0cnVjdGlvbnMgYXJl CmFsc28gYWxsb3dlZCB3aXRoIGV4YWN0bHkgdGhlIHNhbWUgc2VtYW50aWNzIGFz IHdpdGggPGNvZGU+TElOSwpSRUw9InN0eWxlc2hlZXQiPC9jb2RlPi4gRm9yIGV4 YW1wbGUsPC9wPgoKPHByZT4mbHQ7TElOSyByZWw9ImFsdGVybmF0ZSBzdHlsZXNo ZWV0IiB0aXRsZT0iY29tcGFjdCIgaHJlZj0ic21hbGwtYmFzZS5jc3MiCnR5cGU9 InRleHQvY3NzIiZndDsKJmx0O0xJTksgcmVsPSJhbHRlcm5hdGUgc3R5bGVzaGVl dCIgdGl0bGU9ImNvbXBhY3QiIGhyZWY9InNtYWxsLWV4dHJhcy5jc3MiCnR5cGU9 InRleHQvY3NzIiZndDsKJmx0O0xJTksgcmVsPSJhbHRlcm5hdGUgc3R5bGVzaGVl dCIgdGl0bGU9ImJpZyBwcmludCIgaHJlZj0iYmlncHJpbnQuY3NzIgp0eXBlPSJ0 ZXh0L2NzcyImZ3Q7CiZsdDtMSU5LIHJlbD0ic3R5bGVzaGVldCIgaHJlZj0iY29t bW9uLmNzcyIgdHlwZT0idGV4dC9jc3MiJmd0OzwvcHJlPgoKPHA+d291bGQgYmUg ZXF1aXZhbGVudCB0bzo8L3A+Cgo8cHJlPiZsdDs/eG1sLXN0eWxlc2hlZXQgYWx0 ZXJuYXRlPSJ5ZXMiIHRpdGxlPSJjb21wYWN0IiBocmVmPSJzbWFsbC1iYXNlLmNz cyIKdHlwZT0idGV4dC9jc3MiPyZndDsKJmx0Oz94bWwtc3R5bGVzaGVldCBhbHRl cm5hdGU9InllcyIgdGl0bGU9ImNvbXBhY3QiIGhyZWY9InNtYWxsLWV4dHJhcy5j c3MiCnR5cGU9InRleHQvY3NzIj8mZ3Q7CiZsdDs/eG1sLXN0eWxlc2hlZXQgYWx0 ZXJuYXRlPSJ5ZXMiIHRpdGxlPSJiaWcgcHJpbnQiIGhyZWY9ImJpZ3ByaW50LmNz cyIKdHlwZT0idGV4dC9jc3MiPyZndDsKJmx0Oz94bWwtc3R5bGVzaGVldCBocmVm PSJjb21tb24uY3NzIiB0eXBlPSJ0ZXh0L2NzcyI/Jmd0OzwvcHJlPgoKCgo8aHIg dGl0bGU9IlNlcGFyYXRvciBmcm9tIGZvb3RlciI+Cgo8aDI+CjxhIG5hbWU9IlJl ZmVyZW5jZXMiPjwvYT5BIFJlZmVyZW5jZXM8L2gyPgoKPGRsPgoKPGR0Pgo8YSBu YW1lPSJIVE1MIj5IVE1MNDA8L2E+CjwvZHQ+CjxkZD5Xb3JsZCBXaWRlIFdlYgpD b25zb3J0aXVtLiA8aT5IVE1MIDQuMCBTcGVjaWZpY2F0aW9uLjwvaT4gVzNDIFJl Y29tbWVuZGF0aW9uLiBTZWUKPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcvVFIv UkVDLWh0bWw0MCI+aHR0cDovL3d3dy53My5vcmcvVFIvUkVDLWh0bWw0MDwvYT4K PC9kZD4KCjxkdD4KPGEgbmFtZT0iUkZDMjA2OCI+UkZDMjA2ODwvYT4KPC9kdD4K PGRkPlIuIEZpZWxkaW5nLCBKLiBHZXR0eXMsIEouIE1vZ3VsLApILiBGcnlzdHlr IE5pZWxzZW4sIGFuZCBULiBCZXJuZXJzLUxlZS4gIDxpPkh5cGVydGV4dCBUcmFu c2ZlcgpQcm90b2NvbCAtLSBIVFRQLzEuMS48L2k+LiBJRVRGIFJGQyAyMDY4LiBT ZWUgPGEgaHJlZj0iaHR0cDovL3d3dy5pZXRmLm9yZy9yZmMvcmZjMjA2OC50eHQi Pmh0dHA6Ly93d3cuaWV0Zi5vcmcvcmZjL3JmYzIwNjgudHh0PC9hPi48L2RkPgoK PGR0Pgo8YSBuYW1lPSJSRkMyMzk2Ij5SRkMyMzk2PC9hPgo8L2R0Pgo8ZGQ+VC4g QmVybmVycy1MZWUsIFIuIEZpZWxkaW5nLCBhbmQKTC4gTWFzaW50ZXIuICA8aT5V bmlmb3JtIFJlc291cmNlIElkZW50aWZpZXJzIChVUkkpOiBHZW5lcmljClN5bnRh eDwvaT4uIElFVEYgUkZDIDIzOTYuIFNlZSA8YSBocmVmPSJodHRwOi8vd3d3Lmll dGYub3JnL3JmYy9yZmMyMzk2LnR4dCI+aHR0cDovL3d3dy5pZXRmLm9yZy9yZmMv cmZjMjM5Ni50eHQ8L2E+LjwvZGQ+Cgo8ZHQ+CjxhIG5hbWU9IlhNTCI+WE1MMTA8 L2E+CjwvZHQ+CjxkZD5Xb3JsZCBXaWRlIFdlYiBDb25zb3J0aXVtLiA8aT5FeHRl bnNpYmxlCk1hcmt1cCBMYW5ndWFnZSAoWE1MKSAxLjAuPC9pPiBXM0MgUmVjb21t ZW5kYXRpb24uIFNlZSA8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9UUi8xOTk4 L1JFQy14bWwtMTk5ODAyMTAiPmh0dHA6Ly93d3cudzMub3JnL1RSLzE5OTgvUkVD LXhtbC0xOTk4MDIxMDwvYT4KPC9kZD4KCjwvZGw+CgoKCgo8aDI+CjxhIG5hbWU9 InJhdGlvbmFsZSI+PC9hPkIgUmF0aW9uYWxlPC9oMj4KCjxwPlRoZXJlIHdhcyBh biB1cmdlbnQgcmVxdWlyZW1lbnQgZm9yIGEgc3BlY2lmaWNhdGlvbiBmb3Igc3R5 bGUgc2hlZXQKbGlua2luZyB0aGF0IGNvdWxkIGJlIGNvbXBsZXRlZCBpbiB0aW1l IGZvciB0aGUgbmV4dCByZWxlYXNlIGZyb20KbWFqb3IgYnJvd3NlciB2ZW5kb3Jz LiAgT25seSBieSBjaG9vc2luZyBhIHNpbXBsZSBtZWNoYW5pc20gY2xvc2VseQpi YXNlZCBvbiBhIHByb3ZlbiBleGlzdGluZyBtZWNoYW5pc20gY291bGQgdGhlIHNw ZWNpZmljYXRpb24gYmUKY29tcGxldGVkIGluIHRpbWUgdG8gbWVldCB0aGlzIHJl cXVpcmVtZW50LjwvcD4KCjxwPlVzZSBvZiBhIHByb2Nlc3NpbmcgaW5zdHJ1Y3Rp b24gYXZvaWRzIHBvbGx1dGluZyB0aGUgbWFpbiBkb2N1bWVudApzdHJ1Y3R1cmUg d2l0aCBhcHBsaWNhdGlvbiBzcGVjaWZpYyBwcm9jZXNzaW5nIGluZm9ybWF0aW9u LjwvcD4KCjxwPlRoZSBtZWNoYW5pc20gY2hvc2VuIGZvciB0aGlzIHZlcnNpb24g b2YgdGhlIHNwZWNpZmljYXRpb24gaXMgbm90IGEKY29uc3RyYWludCBvbiB0aGUg YWRkaXRpb25hbCBtZWNoYW5pc21zIHBsYW5uZWQgZm9yIGZ1dHVyZSB2ZXJzaW9u cy4KVGhlcmUgaXMgbm8gZXhwZWN0YXRpb24gdGhhdCB0aGVzZSB3aWxsIHVzZSBw cm9jZXNzaW5nIGluc3RydWN0aW9uczsKaW5kZWVkIHRoZXkgbWF5IG5vdCBpbmNs dWRlIHRoZSBsaW5raW5nIGluZm9ybWF0aW9uIGluIHRoZSBzb3VyY2UKZG9jdW1l bnQuPC9wPgoKCgoKPC9ib2R5Pgo8L2h0bWw+Cg== ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/certs/libxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/cer0000755000175000017500000000000012273503736032466 5ustar tonytony././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/certs/lugh.crtlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/cer0000644000175000017500000000152310377666730032500 0ustar tonytony0O0!Ħ0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020403000021Z 120402225946Z0f1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure1 0 ULugh00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2HvX0䔹PkVt݂NF[MrvK'.́MEH'CU|()5U9%= ~Ȭc>!eL jН_$Pe7 f+Lck<Ȑc:080U0U Y"P0U# 0 V0Z2}0 *H800-lܛ^[O|2&tCsci!tֵcD././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/certs/macha.crtlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/cer0000644000175000017500000000152410377666730032501 0ustar tonytony0P0!{0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020403000003Z 120402225946Z0g1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10 UMacha00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2]h"D㶤Lw'WIGބ}Z<IVs$9p[8Z0N`E?Y;~07;:080U0U 3Ay0U# 0 V0Z2}0 *H800->3WLܜ[:+r<)֒jn @././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/certs/nemain.crtlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/cer0000644000175000017500000000152410377666730032501 0ustar tonytony0P0!0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020403000008Z 120402225946Z0h1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10 UNemain00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2|sO5(#  $h Ā߰ $ fW+zmTSƫokSa&/HV@Ԇs t-Ļ\wU!$cGR\o/T0vQnԋFgRd:080U0U tħҜ0U# 0 V0Z2}0 *H8/0,$/5)M7faJKQ}Xx>?_~ ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/certs/mullan.crtlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/cer0000644000175000017500000000127110763336446032475 0ustar tonytony00sGͷr0 *H80@10 &,dcom10 &,dsun10U Sean Mullan0 080304205618Z 080602205618Z0@10 &,dcom10 &,dsun10U Sean Mullan00,*H80Su)RJ.RI[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2Φ: H././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/certs/xmldsig.jkslibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/cer0000644000175000017500000001566010372164212032466 0ustar tonytonymachalۥX.509T0P0!{0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020403000003Z 120402225946Z0g1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10 UMacha00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2]h"D㶤Lw'WIGބ}Z<IVs$9p[8Z0N`E?Y;~07;:080U0U 3Ay0U# 0 V0Z2}0 *H800->3WLܜ[:+r<)֒jn @calX.509^0Z0!:<0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020402235946Z 120402225946Z0v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2Φ: HbadbljX.509R0N0!gJ0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020402235957Z 120402225946Z0f1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure1 0 UBadb00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2Bn.Es,ŎP_.xB~˖⭢@g 7O9/c7{`ydw)¸lvb!%8;s56#:GSp&)*Ht1 FFߣ:080U0U j50U# 0 V0Z2}0 *H8/0,R?R&c:}kt5>iq{F\NoulughlX.509S0O0!Ħ0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020403000021Z 120402225946Z0f1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure1 0 ULugh00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2HvX0䔹PkVt݂NF[MrvK'.́MEH'CU|()5U9%= ~Ȭc>!eL jН_$Pe7 f+Lck<Ȑc:080U0U Y"P0U# 0 V0Z2}0 *H800-lܛ^[O|2&tCsci!tֵcDnemainl@X.509T0P0!0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020403000008Z 120402225946Z0h1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10 UNemain00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2|sO5(#  $h Ā߰ $ fW+zmTSƫokSa&/HV@Ԇs t-Ļ\wU!$cGR\o/T0vQnԋFgRd:080U0U tħҜ0U# 0 V0Z2}0 *H8/0,$/5)M7faJKQ}Xx>?_~ balorlX.509S0O0!G0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020403000015Z 120402225946Z0g1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10 UBalor00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2n[eK 7#7Ra6J'*8\YMxĕ ;p6|"oYSL.C8)6r+f K~[AOftQ=d3s8#b\82 suW_:080U0U m0U# 0 V0Z2}0 *H8/0,CƃN_o!ydazڥd]_Ղ߭morigulX.509T0P0!Q0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020402235952Z 120402225946Z0h1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10 UMorigu00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2}M@ϔcCGOaQ~Ȼ)=nYC*RL(Sϒ+=P$i9,xE4h;հ┉Ek"=R,cڳ;"Wn:080U0U .8K0U# 0 V0Z2}0 *H8/0,B8|I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2`1qU::ߎ~M<jrTTLY^gm߼Ւ($kCW7d9̈́ʯ,jXl_QO W$"SDET*P$d\E>XC:080U0U 1˅0U# 0 V0Z2}0 *H8/0,43N'FDT;@x,*RԎY5zv *fl././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/certs/badb.crtlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/cer0000644000175000017500000000152210377666730032477 0ustar tonytony0N0!gJ0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020402235957Z 120402225946Z0f1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure1 0 UBadb00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2Bn.Es,ŎP_.xB~˖⭢@g 7O9/c7{`ydw)¸lvb!%8;s56#:GSp&)*Ht1 FFߣ:080U0U j50U# 0 V0Z2}0 *H8/0,R?R&c:}kt5>iq{F\Nou././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/certs/crllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/cer0000644000175000017500000000067310377666730032505 0ustar tonytony-----BEGIN CRL----- MIIBJDCB5AIBATAJBgcqhkjOOAQDMHYxCzAJBgNVBAYTAklFMQ8wDQYDVQQIEwZE dWJsaW4xJDAiBgNVBAoTG0JhbHRpbW9yZSBUZWNobm9sb2dpZXMgTHRkLjERMA8G A1UECxMIWC9TZWN1cmUxHTAbBgNVBAMTFEFub3RoZXIgVHJhbnNpZW50IENBFw0w MjA0MDQwMjE2NThaFw0xMTA0MDIwMjE2NThaMBkwFwIGAOz5Id5/Fw0wMjA0MDQw MjE2NThaoCMwITATBgNVHSMEDDAKgAiKHFYwWjISfTAKBgNVHRQEAwIBADAJBgcq hkjOOAQDAzAAMC0CFCEIm38fvGzSJHms284hUs9dNB8nAhUAjEtZr0TGgc6sVRVk krEgltdo7Jw= -----END CRL----- ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/certs/balor.crtlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/cer0000644000175000017500000000152310377666730032500 0ustar tonytony0O0!G0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020403000015Z 120402225946Z0g1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10 UBalor00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2n[eK 7#7Ra6J'*8\YMxĕ ;p6|"oYSL.C8)6r+f K~[AOftQ=d3s8#b\82 suW_:080U0U m0U# 0 V0Z2}0 *H8/0,CƃN_o!ydazڥd]_Ղ߭././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/certs/morigu.crtlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/cer0000644000175000017500000000152410377666730032501 0ustar tonytony0P0!Q0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020402235952Z 120402225946Z0h1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10 UMorigu00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2}M@ϔcCGOaQ~Ȼ)=nYC*RL(Sϒ+=P$i9,xE4h;հ┉Ek"=R,cڳ;"Wn:080U0U .8K0U# 0 V0Z2}0 *H8/0,B8|I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2`1qU::ߎ~M<jrTTLY^gm߼Ւ($kCW7d9̈́ʯ,jXl_QO W$"SDET*P$d\E>XC:080U0U 1˅0U# 0 V0Z2}0 *H8/0,43N'FDT;@x,*RԎ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature.tmpllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/sig0000644000175000017500000002635710052374102032500 0ustar tonytony ]> foo bar aaaa aaaa self::text() aaaa ancestor-or-self::dsig:SignedInfo and count(ancestor-or-self::dsig:Reference | here()/ancestor::dsig:Reference[1]) > count(ancestor-or-self::dsig:Reference) or count(ancestor-or-self::node() | id('notaries')) = count(ancestor-or-self::node()) aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa ancestor-or-self::dsig:X509Data I am the text. SSBhbSB0aGUgdGV4dC4= aaaa aaaa Notaries
aaaa
192.168.21.138 CN=Merlin Hughes,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE CN=Transient CA,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE 1017788370348 MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS 8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1 MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU 2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q 4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch 3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx 0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D 451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7 PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5 NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25 4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==
bar
././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/sig0000644000175000017500000003312610052374102032470 0ustar tonytony ]> foo bar 60NvZvtdTB+7UnlLp/H24p7h4bs= 60NvZvtdTB+7UnlLp/H24p7h4bs= self::text() zyjp8GJOX69990Kkqw8ioPXGExk= ancestor-or-self::dsig:SignedInfo and count(ancestor-or-self::dsig:Reference | here()/ancestor::dsig:Reference[1]) > count(ancestor-or-self::dsig:Reference) or count(ancestor-or-self::node() | id('notaries')) = count(ancestor-or-self::node()) tQiE3GUKiBenPyp3J0Ei6rJMFv4= zyjp8GJOX69990Kkqw8ioPXGExk= qg4HFwsN+/WX32uH85WlJU9l45k= ETlEI3y7hvvAtMe9wQSz7LhbHEE= J/O0HhdaPXxx49fgGWMESL09GpA= J/O0HhdaPXxx49fgGWMESL09GpA= J/O0HhdaPXxx49fgGWMESL09GpA= MkL9CX8yeABBth1RChyPx58Ls8w= yamSIokKmjA3hB/s3Fu07wDO3vM= yamSIokKmjA3hB/s3Fu07wDO3vM= yamSIokKmjA3hB/s3Fu07wDO3vM= 419CYgyTWOTGYGBhzieWklNf7Bk= VzK45P9Ksjqq5oXlKQpkGgB2CNY= 7/9fR+NIDz9owc1Lfsxu1JBr8uo= qURlo3LSq4TWQtygBZJ0iXQ9E14= WvZUJAJ/3QNqzQvwne2vvy7U5Pck8ZZ5UTa6pIwR7GE+PoGi6A1kyw== ancestor-or-self::dsig:X509Data I am the text. SSBhbSB0aGUgdGV4dC4= 60NvZvtdTB+7UnlLp/H24p7h4bs= qURlo3LSq4TWQtygBZJ0iXQ9E14= Notaries
c7wq5XKos6RqNVJyFy7/fl6+sAs=
192.168.21.138 CN=Merlin Hughes,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE CN=Transient CA,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE 1017788370348 MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS 8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1 MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU 2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q 4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch 3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx 0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D 451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7 PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5 NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25 4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==
bar
././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-x509-crt.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/sig0000644000175000017500000000374610052374102032475 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= GCQVmBq+1H7e9IjvKfe+egLM1Jlp3L1JCGkl9SlJ0eaDh2MKYUUnHA== MIIDUDCCAxCgAwIBAgIGAOz5IVHTMAkGByqGSM44BAMwdjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEdMBsGA1UEAxMUQW5vdGhlciBUcmFu c2llbnQgQ0EwHhcNMDIwNDAyMjM1OTUyWhcNMTIwNDAyMjI1OTQ2WjBoMQswCQYD VQQGEwJJRTEPMA0GA1UECBMGRHVibGluMSQwIgYDVQQKExtCYWx0aW1vcmUgVGVj aG5vbG9naWVzIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMQ8wDQYDVQQDEwZNb3Jp Z3UwggG2MIIBKwYHKoZIzjgEATCCAR4CgYEAhIqwSieM0aAez+6H71gqCfBnwG3d Pu7JAElb13GkwXRw9RfPh0VtIVjhDJbyKAIuzCk5r54ccRixa8TQ2vWVwodQ9eru 7jUknAc2rVEAV5mJTrBr7UUve/X9PWsCDN6lXvFLiJp/Pi/F0cyV/CAp+jIp+rol TXOhUz9qEjnFYMMCFQCYS/p4gmsHgo3R89EAE/Hc0dhyWQKBgCWG5hn8DM+1rv5s TkJBqyZJXNzy4z974s3sAGURfBBGTpB9kFxfxNt480TxkWeDhR+39DMA5TEAsRPu QoB6Tgl7K2nNzRdgJjK4YkBObgX1ljWkAnnJCZSbC8Nh2VpkniV0bM79HnsS+eCf 8bi2qOOiLSzHeOrtzO8PB0YeeTLQA4GEAAKBgH1NBJ9Az5TwY4tDE0dPYVHHABt+ yLspnT3k9G6YWUMFhZ/+3RuqEPjnKrPfUoXTTJGIACgPU3/PkqwrPVD0JMdpOcnZ LHiJ/P7QRQeMwDRoBrs7genB1bDd4pSJrEUcjrkA5uRrIj2Z5fL+UuLiLGPO2rM7 BNQRIq3QFPdX++NuozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIK7Ljjh +EsfMBMGA1UdIwQMMAqACIocVjBaMhJ9MAkGByqGSM44BAMDLwAwLAIUEJJCOHw8 ppxoRyz3s+Vmb4NKIfMCFDgJoZn9zh/3WoYNBURODwLvyBOy ././@LongLink0000000000000000000000000000020200000000000011557 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-b64-dsa.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/sig0000644000175000017500000000310010052374102032455 0ustar tonytony N6pjx3OY2VRHMmLhoAV8HmMu2nc= KgAeq8e0yUNfFz+mFlZ3QgyQNMciV+Z3BoDQDvQNker7pazEnJmOIA==

3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi 89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=

hDLcFK0GO/Hz1arxOOvsgM/VLyU= nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM 8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA= cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv +OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=
c29tZSB0ZXh0
././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-x509-ski.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/sig0000644000175000017500000000133110052374102032461 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= F9nEU1Us48iKTml8n7E4wt7HtFJ5gaLIgox0J9WbujGndW0oQJbeGg== hf10xKfSnIg= ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-keyname.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/sig0000644000175000017500000000124010052374102032460 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= JkJ3GplEU0iDbqSv7ZOXhvv3zeM1KmP+CLphhoc+NPYqpGYQiW6O6w== Lugh ././@LongLink0000000000000000000000000000020000000000000011555 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-external-b64-dsa.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/sig0000644000175000017500000000310310052374102032460 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= IhOlAjMFaZtkEju5R5bi528h1HpDa4A21sudZynhJRRLjZuQIHZ3eQ==

3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi 89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=

hDLcFK0GO/Hz1arxOOvsgM/VLyU= nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM 8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA= cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv +OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=
././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-rsa.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/sig0000644000175000017500000000217710052374102032472 0ustar tonytony 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= ov3HOoPN0w71N3DdGNhN+dSzQm6NJFUB5qGKRp9Q986nVzMb8wCIVxCQu+x3vMtq p4/R3KEcPtEJSaoR+thGq++GPIh2mZXyWJs3xHy9P4xmoTVwli7/l7s8ebDSmnbZ 7xZU4Iy1BSMZSxGKnRG+Z/0GJIfTz8jhH6wCe3l03L4= q07hpxA5DGFfvJFZueFl/LI85XxQxrvqgVugL25V090A9MrlLBg5PmAsxFTe+G6a xvWJQwYOVHj/nuiCnNLa9a7uAtPFiTtW+v5H3wlLaY3ws4atRBNOQlYkIBp38sTf QBkk4i8PEU1GQ2M0CLIJq4/2Akfv1wxzSQ9+8oWkArc= AQAB some text ././@LongLink0000000000000000000000000000020400000000000011561 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-hmac-sha1.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/sig0000644000175000017500000000113510052374102032463 0ustar tonytony 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= JElPttIT4Am7Q+MNoMyv+WDfAZw= some text ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloped-dsa.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/sig0000644000175000017500000000324510052374102032467 0ustar tonytony fdy6S2NLpnT4fMdokUHSHsmpcvo= Z4pBb+o+XOKWME7CpLyXuNqyIYdXOcGvthfUf+ZDLL5immPx+3tK8Q==

3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi 89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=

hDLcFK0GO/Hz1arxOOvsgM/VLyU= nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM 8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA= cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv +OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=
././@LongLink0000000000000000000000000000020700000000000011564 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-hmac-sha1-40.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/sig0000644000175000017500000000121410052374102032461 0ustar tonytony 40 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= HHiqvCU= some text ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-x509-sn.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/sig0000644000175000017500000000143510052374102032466 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= MUOjiqG0dbjvR6+qYYPL85nKSt2FeZGQBQkYudv48KyJhJLG1Bp+bA== CN=Badb,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE ././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-dsa.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/sig0000644000175000017500000000271310052374102032466 0ustar tonytony 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= PfD92lkxKgc2OKvF4p0ba6cJj6d1eqIDx5Q1hvVYTviotje23Snunw==

3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi 89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=

hDLcFK0GO/Hz1arxOOvsgM/VLyU= nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM 8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA= cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv +OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=
some text
././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-x509-crt-crl.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/sig0000644000175000017500000000472210052374102032470 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= WF6EaX66f8CdGE6NafmzdLpb/1OVYX4kBNsqgGIqHR5JZAu4HpbVQQ== MIIDTjCCAw6gAwIBAgIGAOz5Id5/MAkGByqGSM44BAMwdjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEdMBsGA1UEAxMUQW5vdGhlciBUcmFu c2llbnQgQ0EwHhcNMDIwNDAzMDAwMDI4WhcNMTIwNDAyMjI1OTQ2WjBmMQswCQYD VQQGEwJJRTEPMA0GA1UECBMGRHVibGluMSQwIgYDVQQKExtCYWx0aW1vcmUgVGVj aG5vbG9naWVzIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMQ0wCwYDVQQDEwRCcmVz MIIBtjCCASsGByqGSM44BAEwggEeAoGBAISKsEonjNGgHs/uh+9YKgnwZ8Bt3T7u yQBJW9dxpMF0cPUXz4dFbSFY4QyW8igCLswpOa+eHHEYsWvE0Nr1lcKHUPXq7u41 JJwHNq1RAFeZiU6wa+1FL3v1/T1rAgzepV7xS4iafz4vxdHMlfwgKfoyKfq6JU1z oVM/ahI5xWDDAhUAmEv6eIJrB4KN0fPRABPx3NHYclkCgYAlhuYZ/AzPta7+bE5C QasmSVzc8uM/e+LN7ABlEXwQRk6QfZBcX8TbePNE8ZFng4Uft/QzAOUxALET7kKA ek4Jeytpzc0XYCYyuGJATm4F9ZY1pAJ5yQmUmwvDYdlaZJ4ldGzO/R57Evngn/G4 tqjjoi0sx3jq7czvDwdGHnky0AOBhAACgYBgvDFxw1U6Ou2G6P/+347Jfk2wPB1/ atr4p3JUVLuT0ExZG6np+rKiXmcBbYKbAhMY37zVkroR9bwo+NgaJGubQ4ex5Y1X N2Q5gIHNhNfKr8G4LPVqWGxf/lFPDYxX3ezqBJPpJCJTREX7s6Hp/VTV2SpQlySv +GRcFKJFPlhD9aM6MDgwDgYDVR0PAQH/BAQDAgeAMBEGA1UdDgQKBAiC+5gx0MHL hTATBgNVHSMEDDAKgAiKHFYwWjISfTAJBgcqhkjOOAQDAy8AMCwCFDTcM5i61uqq /aveERhOJ6NG/LubAhREVDtAeNbTEywXr4O7KvEEvFLUjg== MIIBJDCB5AIBATAJBgcqhkjOOAQDMHYxCzAJBgNVBAYTAklFMQ8wDQYDVQQIEwZE dWJsaW4xJDAiBgNVBAoTG0JhbHRpbW9yZSBUZWNobm9sb2dpZXMgTHRkLjERMA8G A1UECxMIWC9TZWN1cmUxHTAbBgNVBAMTFEFub3RoZXIgVHJhbnNpZW50IENBFw0w MjA0MDQwMjE2NThaFw0xMTA0MDIwMjE2NThaMBkwFwIGAOz5Id5/Fw0wMjA0MDQw MjE2NThaoCMwITATBgNVHSMEDDAKgAiKHFYwWjISfTAKBgNVHRQEAwIBADAJBgcq hkjOOAQDAzAAMC0CFCEIm38fvGzSJHms284hUs9dNB8nAhUAjEtZr0TGgc6sVRVk krEgltdo7Jw= ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-external-dsa.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/sig0000644000175000017500000000267610052374102032476 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= LaL1/t/XodYvDJDgSEbq47GX8ltnlx3FFURdi7o+UFVi+zLf0WyWaQ==

3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi 89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=

hDLcFK0GO/Hz1arxOOvsgM/VLyU= nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM 8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA= cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv +OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=
././@LongLink0000000000000000000000000000021200000000000011560 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-retrievalmethod-rawx509crt.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/sig0000644000175000017500000000135610052374102032470 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= SNB5FI193RFXoG2j8Z9bXWgW7BMPICqNob4Hjh08oou4tkhGxz4+pg== libxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/0000755000175000017500000000000012273503736031014 5ustar tonytony././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/signature.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/signatur0000644000175000017500000003051707357133753032606 0ustar tonytony ]> foo bar 60NvZvtdTB+7UnlLp/H24p7h4bs= 60NvZvtdTB+7UnlLp/H24p7h4bs= self::text() zyjp8GJOX69990Kkqw8ioPXGExk= ancestor-or-self::dsig:SignedInfo and count(ancestor-or-self::dsig:Reference | here()/ancestor::dsig:Reference[1]) > count(ancestor-or-self::dsig:Reference) or count(ancestor-or-self::node() | id('notaries')) = count(ancestor-or-self::node()) DkRNHKuQgDiTy9XAAMGbyydg3BI= zyjp8GJOX69990Kkqw8ioPXGExk= X9dMPL0KeDZXh9GE3vLcOtPsYjI= 7tHLZrC0kqOhPCiYu/WusgG4tBo= zbVZy3ycg7CyFcPzNs0C6bA3qio= zbVZy3ycg7CyFcPzNs0C6bA3qio= zbVZy3ycg7CyFcPzNs0C6bA3qio= ar0/7EQyRfUZmrPPcTQFdVCt2PY= 0aW4L0GoFzYUo4gyZSfoyZBhpuc= 0aW4L0GoFzYUo4gyZSfoyZBhpuc= 0aW4L0GoFzYUo4gyZSfoyZBhpuc= 1puYWb36Z5TIDmEIVd/JLR3iD8Y= MMtXLCswiEDurKMgg2r+vBPlk8Q= 7eI/P8mppgkqXqW0+at2UGj06qs= l/bqIouk6Gs8eEjG0Tad0MJJgWw= SiMb9su56spmMlNjrWWKdkgj1hDhveaWCx5Bwpj5AuJ6T3Zy68NJ/A== ancestor-or-self::dsig:X509Data I am the text. SSBhbSB0aGUgdGV4dC4= 60NvZvtdTB+7UnlLp/H24p7h4bs= l/bqIouk6Gs8eEjG0Tad0MJJgWw= Notaries
c7wq5XKos6RqNVJyFy7/fl6+sAs=
192.168.21.138 CN=Merlin Hughes,O=Baltimore Technologies\, Ltd.,ST=Dublin,C=IE CN=Test DSA CA,O=Baltimore Technologies\, Ltd.,ST=Dublin,C=IE 970849936 MIIDNzCCAvWgAwIBAgIEOd3+kDAJBgcqhkjOOAQDMFsxCzAJBgNVBAYTAklFMQ8w DQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9yZSBUZWNobm9sb2dpZXMs IEx0ZC4xFDASBgNVBAMTC1Rlc3QgRFNBIENBMB4XDTAwMTAwNjE2MzIxNVoXDTAx MTAwNjE2MzIxNFowXTELMAkGA1UEBhMCSUUxDzANBgNVBAgTBkR1YmxpbjElMCMG A1UEChMcQmFsdGltb3JlIFRlY2hub2xvZ2llcywgTHRkLjEWMBQGA1UEAxMNTWVy bGluIEh1Z2hlczCCAbYwggErBgcqhkjOOAQBMIIBHgKBgQDaJjfDTrawMHf8MiUt Y54b37hSmYNnR3KpGT10uU1Dqppcju06uN0iGbqf947DjkBC25hKnqykK31xBw0E CPbYq/KC98kghdf2xJCu6B8aqJ95K9jdVflJ3WP7PQxJn+fmM23zy6HYLXVICpfq etdNj/VHCShZE3bdJiE6VobSFQIVAPQecqS2PaTDprcQnkwx4MHTRXhrAoGAMuGA lqeB1ax+vyO2+Osubjhl7pHxLu47RIH+/M52DjESA9KMSrwzsYx8yNR2WooByrE0 t6fu0VncK7UK8olO4t7wpv2z4AFQPRVCKFwo0qgn5aKIkICGMlrRy81avb27wGcW othx3iPPMtFXtoDqK0JItaI9R8zc1msFhM1GKMYDgYQAAoGActA8YGxrtngg/zKV vqEOefnwmViFztcnPBYPlJsvh6yKI4iDm68fnp4Mi3RrJ6bZAygFrUIQLxLjV+OJ tgJAEto0xAs+Mehuq1DkSFEpP3oDzCTOsrOiS1DwQe4oIb7zVk/9l7aPtJMHW0LV lMdwZNFNNJoqMcT2ZfCPrfvYvQ2jRzBFMB4GA1UdEQQXMBWBE21lcmxpbkBiYWx0 aW1vcmUuaWUwDgYDVR0PAQH/BAQDAgeAMBMGA1UdIwQMMAqACEJZQG0KwRbPMAkG ByqGSM44BAMDMQAwLgIVAK4skWEFYgrggaJA8vYAwSjg12+KAhUAwHTo7wd4tENw 9LAKPklQ/74fH18=
bar
././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/bad-signature.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/bad-sign0000644000175000017500000003051310407572337032425 0ustar tonytony ]> foo bar 60NvZvtdTB+7UnlLp/H24p7h4bs= 60NvZvtdTB+7UnlLp/H24p7h4bs= self::text() zyjp8GJOX69990Kkqw8ioPXGExk= ancestor-or-self::dsig:SignedInfo and count(ancestor-or-self::dsig:Reference | here()/ancestor::dsig:Reference[1]) > count(ancestor-or-self::dsig:Reference) or count(ancestor-or-self::node() | id('notaries')) = count(ancestor-or-self::node()) DkRNHKuQgDiTy9XAAMGbyydg3BI= zyjp8GJOX69990Kkqw8ioPXGExk= X9dMPL0KeDZXh9GE3vLcOtPsYjI= 7tHLZrC0kqOhPCiYu/WusgG4tBo= zbVZy3ycg7CyFcPzNs0C6bA3qio= zbVZy3ycg7CyFcPzNs0C6bA3qio= zbVZy3ycg7CyFcPzNs0C6bA3qio= ar0/7EQyRfUZmrPPcTQFdVCt2PY= 0aW4L0GoFzYUo4gyZSfoyZBhpuc= 0aW4L0GoFzYUo4gyZSfoyZBhpuc= 0aW4L0GoFzYUo4gyZSfoyZBhpuc= 1puYWb36Z5TIDmEIVd/JLR3iD8Y= MMtXLCswiEDurKMgg2r+vBPlk8Q= 7eI/P8mppgkqXqW0+at2UGj06qs= l/bqIouk6Gs8eEjG0Tad0MJJgWw= SiMb9su56spmMlNjrWWKdkgj1hDhveaWCx5Bwpj5AuJ6T3Zy68NJ/A== ancestor-or-self::dsig:X509Data I am the bad text. aBADSIGN 60NvZvtdTB+7UnlLp/H24p7h4bs= l/bqIouk6Gs8eEjG0Tad0MJJgWw= Notaries
c7wq5XKos6RqNVJyFy7/fl6+sAs=
192.168.21.138 CN=Merlin Hughes,O=Baltimore Technologies\, Ltd.,ST=Dublin,C=IE CN=Test DSA CA,O=Baltimore Technologies\, Ltd.,ST=Dublin,C=IE 970849936 MIIDNzCCAvWgAwIBAgIEOd3+kDAJBgcqhkjOOAQDMFsxCzAJBgNVBAYTAklFMQ8w DQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9yZSBUZWNobm9sb2dpZXMs IEx0ZC4xFDASBgNVBAMTC1Rlc3QgRFNBIENBMB4XDTAwMTAwNjE2MzIxNVoXDTAx MTAwNjE2MzIxNFowXTELMAkGA1UEBhMCSUUxDzANBgNVBAgTBkR1YmxpbjElMCMG A1UEChMcQmFsdGltb3JlIFRlY2hub2xvZ2llcywgTHRkLjEWMBQGA1UEAxMNTWVy bGluIEh1Z2hlczCCAbYwggErBgcqhkjOOAQBMIIBHgKBgQDaJjfDTrawMHf8MiUt Y54b37hSmYNnR3KpGT10uU1Dqppcju06uN0iGbqf947DjkBC25hKnqykK31xBw0E CPbYq/KC98kghdf2xJCu6B8aqJ95K9jdVflJ3WP7PQxJn+fmM23zy6HYLXVICpfq etdNj/VHCShZE3bdJiE6VobSFQIVAPQecqS2PaTDprcQnkwx4MHTRXhrAoGAMuGA lqeB1ax+vyO2+Osubjhl7pHxLu47RIH+/M52DjESA9KMSrwzsYx8yNR2WooByrE0 t6fu0VncK7UK8olO4t7wpv2z4AFQPRVCKFwo0qgn5aKIkICGMlrRy81avb27wGcW othx3iPPMtFXtoDqK0JItaI9R8zc1msFhM1GKMYDgYQAAoGActA8YGxrtngg/zKV vqEOefnwmViFztcnPBYPlJsvh6yKI4iDm68fnp4Mi3RrJ6bZAygFrUIQLxLjV+OJ tgJAEto0xAs+Mehuq1DkSFEpP3oDzCTOsrOiS1DwQe4oIb7zVk/9l7aPtJMHW0LV lMdwZNFNNJoqMcT2ZfCPrfvYvQ2jRzBFMB4GA1UdEQQXMBWBE21lcmxpbkBiYWx0 aW1vcmUuaWUwDgYDVR0PAQH/BAQDAgeAMBMGA1UdIwQMMAqACEJZQG0KwRbPMAkG ByqGSM44BAMDMQAwLgIVAK4skWEFYgrggaJA8vYAwSjg12+KAhUAwHTo7wd4tENw 9LAKPklQ/74fH18=
bar
libxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/0000755000175000017500000000000012273503736030755 5ustar tonytony././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloping-b64-dsa.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signatur0000644000175000017500000000572307356340570032544 0ustar tonytony N6pjx3OY2VRHMmLhoAV8HmMu2nc= W+lrPJcfT0Uyj/AXyu9X2XLsTvBo6Rs8GNZUNUT4/+wx3HYuv/BovQ==

rFto8uPQM6y34FLPmDh40BLJ1rVrC8VeRquuhPZ6jYNFkQuwxnu/wCvIAMhukPBL FET8bJf/b2ef+oqxZajEb+88zlZoyG8g/wMfDBHTxz+CnowLahnCCTYBp5kt7G8q UobJuvjylwj1st7V9Lsu03iXMXtbiriUjFa5gURasN8=

kEjAFpCe4lcUOdwphpzf+tBaUds= oe14R2OtyKx+s+60O5BRNMOYpIg2TU/f15N3bsDErKOWtKXeNK9FS7dWStreDxo2 SSgOonqAd4FuJ/4uva7GgNL4ULIqY7E+mW5iwJ7n/WTELh98mEocsLXkNh24HcH4 BZfSCTruuzmCyjdV1KSqX/Eux04HfCWYmdxN3SQ/qqw= pA5NnZvcd574WRXuOA7ZfC/7Lqt4cB0MRLWtHubtJoVOao9ib5ry4rTk0r6ddnOv AIGKktutzK3ymvKleS3DOrwZQgJ+/BDWDW8kO9R66o6rdjiSobBi/0c2V1+dkqOg jFmKz395mvCOZGhC7fqAVhHat2EjGPMfgSZyABa7+1k=
MIIDbTCCAyygAwIBAgIGAOCdrKxkMAkGByqGSM44BAMwezELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjElMCMGA1UEChMcQmFsdGltb3JlIFRlY2hub2xvZ2ll cywgTHRkLjERMA8GA1UECxMIWC9TZWN1cmUxITAfBgNVBAMTGFgvU2VjdXJlIDEw MjQtYml0IERTQSBDQTAeFw0wMDA3MjcxNzEzMzNaFw0wMTA3MjcxNzEzMjZaMHwx CzAJBgNVBAYTAklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9y ZSBUZWNobm9sb2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMSIwIAYDVQQD ExlYL1NlY3VyZSAxMDI0LWJpdCBEU0EgY3J0MIIBuDCCASwGByqGSM44BAEwggEf AoGBAKxbaPLj0DOst+BSz5g4eNASyda1awvFXkarroT2eo2DRZELsMZ7v8AryADI bpDwSxRE/GyX/29nn/qKsWWoxG/vPM5WaMhvIP8DHwwR08c/gp6MC2oZwgk2AaeZ LexvKlKGybr48pcI9bLe1fS7LtN4lzF7W4q4lIxWuYFEWrDfAhUAkEjAFpCe4lcU Odwphpzf+tBaUdsCgYEAoe14R2OtyKx+s+60O5BRNMOYpIg2TU/f15N3bsDErKOW tKXeNK9FS7dWStreDxo2SSgOonqAd4FuJ/4uva7GgNL4ULIqY7E+mW5iwJ7n/WTE Lh98mEocsLXkNh24HcH4BZfSCTruuzmCyjdV1KSqX/Eux04HfCWYmdxN3SQ/qqwD gYUAAoGBAKQOTZ2b3Hee+FkV7jgO2Xwv+y6reHAdDES1rR7m7SaFTmqPYm+a8uK0 5NK+nXZzrwCBipLbrcyt8prypXktwzq8GUICfvwQ1g1vJDvUeuqOq3Y4kqGwYv9H NldfnZKjoIxZis9/eZrwjmRoQu36gFYR2rdhIxjzH4EmcgAWu/tZozswOTAPBgNV HQ8BAf8EBQMDAIAAMBEGA1UdDgQKBAiA4IML4dndEDATBgNVHSMEDDAKgAiHoMnY nDxZUDAJBgcqhkjOOAQDAzAAMC0CFQCEXa1E2ueJ8WMX5nP1lCcBWhxC2wIUGUCB b6M6Oj3NQAJbnZsdY63rKa0=
c29tZSB0ZXh0
././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-external-b64-dsa.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signatur0000644000175000017500000000571507356340570032545 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= gU0blQcXJFHR5MhUIb2Clq7bcT+NfxOG5yLFUd3Y85QNfTaR5vu+6Q==

rFto8uPQM6y34FLPmDh40BLJ1rVrC8VeRquuhPZ6jYNFkQuwxnu/wCvIAMhukPBL FET8bJf/b2ef+oqxZajEb+88zlZoyG8g/wMfDBHTxz+CnowLahnCCTYBp5kt7G8q UobJuvjylwj1st7V9Lsu03iXMXtbiriUjFa5gURasN8=

kEjAFpCe4lcUOdwphpzf+tBaUds= oe14R2OtyKx+s+60O5BRNMOYpIg2TU/f15N3bsDErKOWtKXeNK9FS7dWStreDxo2 SSgOonqAd4FuJ/4uva7GgNL4ULIqY7E+mW5iwJ7n/WTELh98mEocsLXkNh24HcH4 BZfSCTruuzmCyjdV1KSqX/Eux04HfCWYmdxN3SQ/qqw= pA5NnZvcd574WRXuOA7ZfC/7Lqt4cB0MRLWtHubtJoVOao9ib5ry4rTk0r6ddnOv AIGKktutzK3ymvKleS3DOrwZQgJ+/BDWDW8kO9R66o6rdjiSobBi/0c2V1+dkqOg jFmKz395mvCOZGhC7fqAVhHat2EjGPMfgSZyABa7+1k=
MIIDbTCCAyygAwIBAgIGAOCdrKxkMAkGByqGSM44BAMwezELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjElMCMGA1UEChMcQmFsdGltb3JlIFRlY2hub2xvZ2ll cywgTHRkLjERMA8GA1UECxMIWC9TZWN1cmUxITAfBgNVBAMTGFgvU2VjdXJlIDEw MjQtYml0IERTQSBDQTAeFw0wMDA3MjcxNzEzMzNaFw0wMTA3MjcxNzEzMjZaMHwx CzAJBgNVBAYTAklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9y ZSBUZWNobm9sb2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMSIwIAYDVQQD ExlYL1NlY3VyZSAxMDI0LWJpdCBEU0EgY3J0MIIBuDCCASwGByqGSM44BAEwggEf AoGBAKxbaPLj0DOst+BSz5g4eNASyda1awvFXkarroT2eo2DRZELsMZ7v8AryADI bpDwSxRE/GyX/29nn/qKsWWoxG/vPM5WaMhvIP8DHwwR08c/gp6MC2oZwgk2AaeZ LexvKlKGybr48pcI9bLe1fS7LtN4lzF7W4q4lIxWuYFEWrDfAhUAkEjAFpCe4lcU Odwphpzf+tBaUdsCgYEAoe14R2OtyKx+s+60O5BRNMOYpIg2TU/f15N3bsDErKOW tKXeNK9FS7dWStreDxo2SSgOonqAd4FuJ/4uva7GgNL4ULIqY7E+mW5iwJ7n/WTE Lh98mEocsLXkNh24HcH4BZfSCTruuzmCyjdV1KSqX/Eux04HfCWYmdxN3SQ/qqwD gYUAAoGBAKQOTZ2b3Hee+FkV7jgO2Xwv+y6reHAdDES1rR7m7SaFTmqPYm+a8uK0 5NK+nXZzrwCBipLbrcyt8prypXktwzq8GUICfvwQ1g1vJDvUeuqOq3Y4kqGwYv9H NldfnZKjoIxZis9/eZrwjmRoQu36gFYR2rdhIxjzH4EmcgAWu/tZozswOTAPBgNV HQ8BAf8EBQMDAIAAMBEGA1UdDgQKBAiA4IML4dndEDATBgNVHSMEDDAKgAiHoMnY nDxZUDAJBgcqhkjOOAQDAzAAMC0CFQCEXa1E2ueJ8WMX5nP1lCcBWhxC2wIUGUCB b6M6Oj3NQAJbnZsdY63rKa0=
././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloping-rsa.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signatur0000644000175000017500000000217707356340570032544 0ustar tonytony 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= TTx2opM6OcMi6zlasWEhP992di482KhTo80pgheFySZcpvorB47i8FkgDjftdxbn 2xlrZh0rp0v2dVVxWtLFjUpvN/Z+fkG/AXiT3kAhzRBqmYYYZxIuCtQM57yoBrIh /nSy3HWs5wDqroFAx9q52qMMbKNbnwHG6Y/K1ZiVnNg= qe5VYmNxjeUSQDEI5lkHNDXxfXpXj95Ni7tcQ9DHDSgUJ1m2dNwKublDVQZDmmlf HJ2n/us+EZTZNUST4GqublhgzcCCvYq9dbU8oqiEz0ktTIWCPy36UvQcaRwufpiV RFaTDNPqjkjWPrM2cnpfyoI7ydbVCBRfI9zISQiR0Mk= AQAB some text ././@LongLink0000000000000000000000000000017700000000000011572 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloping-hmac-sha1.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signatur0000644000175000017500000000113507360355355032537 0ustar tonytony 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= JElPttIT4Am7Q+MNoMyv+WDfAZw= some text ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloped-dsa.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signatur0000644000175000017500000000612707405103163032531 0ustar tonytony K8M/lPbKnuMDsO0Uzuj75lQtzQI= DpEylhQoiUKBoKWmYfajXO7LZxiDYgVtUtCNyTgwZgoChzorA2nhkQ==

rFto8uPQM6y34FLPmDh40BLJ1rVrC8VeRquuhPZ6jYNFkQuwxnu/wCvIAMhukPBL FET8bJf/b2ef+oqxZajEb+88zlZoyG8g/wMfDBHTxz+CnowLahnCCTYBp5kt7G8q UobJuvjylwj1st7V9Lsu03iXMXtbiriUjFa5gURasN8=

kEjAFpCe4lcUOdwphpzf+tBaUds= oe14R2OtyKx+s+60O5BRNMOYpIg2TU/f15N3bsDErKOWtKXeNK9FS7dWStreDxo2 SSgOonqAd4FuJ/4uva7GgNL4ULIqY7E+mW5iwJ7n/WTELh98mEocsLXkNh24HcH4 BZfSCTruuzmCyjdV1KSqX/Eux04HfCWYmdxN3SQ/qqw= pA5NnZvcd574WRXuOA7ZfC/7Lqt4cB0MRLWtHubtJoVOao9ib5ry4rTk0r6ddnOv AIGKktutzK3ymvKleS3DOrwZQgJ+/BDWDW8kO9R66o6rdjiSobBi/0c2V1+dkqOg jFmKz395mvCOZGhC7fqAVhHat2EjGPMfgSZyABa7+1k=
MIIDbTCCAyygAwIBAgIGAOCdrKxkMAkGByqGSM44BAMwezELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjElMCMGA1UEChMcQmFsdGltb3JlIFRlY2hub2xvZ2ll cywgTHRkLjERMA8GA1UECxMIWC9TZWN1cmUxITAfBgNVBAMTGFgvU2VjdXJlIDEw MjQtYml0IERTQSBDQTAeFw0wMDA3MjcxNzEzMzNaFw0wMTA3MjcxNzEzMjZaMHwx CzAJBgNVBAYTAklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9y ZSBUZWNobm9sb2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMSIwIAYDVQQD ExlYL1NlY3VyZSAxMDI0LWJpdCBEU0EgY3J0MIIBuDCCASwGByqGSM44BAEwggEf AoGBAKxbaPLj0DOst+BSz5g4eNASyda1awvFXkarroT2eo2DRZELsMZ7v8AryADI bpDwSxRE/GyX/29nn/qKsWWoxG/vPM5WaMhvIP8DHwwR08c/gp6MC2oZwgk2AaeZ LexvKlKGybr48pcI9bLe1fS7LtN4lzF7W4q4lIxWuYFEWrDfAhUAkEjAFpCe4lcU Odwphpzf+tBaUdsCgYEAoe14R2OtyKx+s+60O5BRNMOYpIg2TU/f15N3bsDErKOW tKXeNK9FS7dWStreDxo2SSgOonqAd4FuJ/4uva7GgNL4ULIqY7E+mW5iwJ7n/WTE Lh98mEocsLXkNh24HcH4BZfSCTruuzmCyjdV1KSqX/Eux04HfCWYmdxN3SQ/qqwD gYUAAoGBAKQOTZ2b3Hee+FkV7jgO2Xwv+y6reHAdDES1rR7m7SaFTmqPYm+a8uK0 5NK+nXZzrwCBipLbrcyt8prypXktwzq8GUICfvwQ1g1vJDvUeuqOq3Y4kqGwYv9H NldfnZKjoIxZis9/eZrwjmRoQu36gFYR2rdhIxjzH4EmcgAWu/tZozswOTAPBgNV HQ8BAf8EBQMDAIAAMBEGA1UdDgQKBAiA4IML4dndEDATBgNVHSMEDDAKgAiHoMnY nDxZUDAJBgcqhkjOOAQDAzAAMC0CFQCEXa1E2ueJ8WMX5nP1lCcBWhxC2wIUGUCB b6M6Oj3NQAJbnZsdY63rKa0=
././@LongLink0000000000000000000000000000020200000000000011557 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloping-hmac-sha1-40.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signatur0000644000175000017500000000121407360355355032535 0ustar tonytony 40 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= HHiqvCU= some text ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloping-dsa.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signatur0000644000175000017500000000553607356340570032546 0ustar tonytony 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= SVsFIWuARkAaD9HZXhNASHShx38UZiDS3IsIb2DS1eBUdD4V70E6MA==

rFto8uPQM6y34FLPmDh40BLJ1rVrC8VeRquuhPZ6jYNFkQuwxnu/wCvIAMhukPBL FET8bJf/b2ef+oqxZajEb+88zlZoyG8g/wMfDBHTxz+CnowLahnCCTYBp5kt7G8q UobJuvjylwj1st7V9Lsu03iXMXtbiriUjFa5gURasN8=

kEjAFpCe4lcUOdwphpzf+tBaUds= oe14R2OtyKx+s+60O5BRNMOYpIg2TU/f15N3bsDErKOWtKXeNK9FS7dWStreDxo2 SSgOonqAd4FuJ/4uva7GgNL4ULIqY7E+mW5iwJ7n/WTELh98mEocsLXkNh24HcH4 BZfSCTruuzmCyjdV1KSqX/Eux04HfCWYmdxN3SQ/qqw= pA5NnZvcd574WRXuOA7ZfC/7Lqt4cB0MRLWtHubtJoVOao9ib5ry4rTk0r6ddnOv AIGKktutzK3ymvKleS3DOrwZQgJ+/BDWDW8kO9R66o6rdjiSobBi/0c2V1+dkqOg jFmKz395mvCOZGhC7fqAVhHat2EjGPMfgSZyABa7+1k=
MIIDbTCCAyygAwIBAgIGAOCdrKxkMAkGByqGSM44BAMwezELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjElMCMGA1UEChMcQmFsdGltb3JlIFRlY2hub2xvZ2ll cywgTHRkLjERMA8GA1UECxMIWC9TZWN1cmUxITAfBgNVBAMTGFgvU2VjdXJlIDEw MjQtYml0IERTQSBDQTAeFw0wMDA3MjcxNzEzMzNaFw0wMTA3MjcxNzEzMjZaMHwx CzAJBgNVBAYTAklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9y ZSBUZWNobm9sb2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMSIwIAYDVQQD ExlYL1NlY3VyZSAxMDI0LWJpdCBEU0EgY3J0MIIBuDCCASwGByqGSM44BAEwggEf AoGBAKxbaPLj0DOst+BSz5g4eNASyda1awvFXkarroT2eo2DRZELsMZ7v8AryADI bpDwSxRE/GyX/29nn/qKsWWoxG/vPM5WaMhvIP8DHwwR08c/gp6MC2oZwgk2AaeZ LexvKlKGybr48pcI9bLe1fS7LtN4lzF7W4q4lIxWuYFEWrDfAhUAkEjAFpCe4lcU Odwphpzf+tBaUdsCgYEAoe14R2OtyKx+s+60O5BRNMOYpIg2TU/f15N3bsDErKOW tKXeNK9FS7dWStreDxo2SSgOonqAd4FuJ/4uva7GgNL4ULIqY7E+mW5iwJ7n/WTE Lh98mEocsLXkNh24HcH4BZfSCTruuzmCyjdV1KSqX/Eux04HfCWYmdxN3SQ/qqwD gYUAAoGBAKQOTZ2b3Hee+FkV7jgO2Xwv+y6reHAdDES1rR7m7SaFTmqPYm+a8uK0 5NK+nXZzrwCBipLbrcyt8prypXktwzq8GUICfvwQ1g1vJDvUeuqOq3Y4kqGwYv9H NldfnZKjoIxZis9/eZrwjmRoQu36gFYR2rdhIxjzH4EmcgAWu/tZozswOTAPBgNV HQ8BAf8EBQMDAIAAMBEGA1UdDgQKBAiA4IML4dndEDATBgNVHSMEDDAKgAiHoMnY nDxZUDAJBgcqhkjOOAQDAzAAMC0CFQCEXa1E2ueJ8WMX5nP1lCcBWhxC2wIUGUCB b6M6Oj3NQAJbnZsdY63rKa0=
some text
././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-external-dsa.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signatur0000644000175000017500000000552107356340570032540 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= Fj9OwSxpJppDnihohduxEUqu9/p6TR9PpgNGapaiBHGcY2QUDBaOEw==

rFto8uPQM6y34FLPmDh40BLJ1rVrC8VeRquuhPZ6jYNFkQuwxnu/wCvIAMhukPBL FET8bJf/b2ef+oqxZajEb+88zlZoyG8g/wMfDBHTxz+CnowLahnCCTYBp5kt7G8q UobJuvjylwj1st7V9Lsu03iXMXtbiriUjFa5gURasN8=

kEjAFpCe4lcUOdwphpzf+tBaUds= oe14R2OtyKx+s+60O5BRNMOYpIg2TU/f15N3bsDErKOWtKXeNK9FS7dWStreDxo2 SSgOonqAd4FuJ/4uva7GgNL4ULIqY7E+mW5iwJ7n/WTELh98mEocsLXkNh24HcH4 BZfSCTruuzmCyjdV1KSqX/Eux04HfCWYmdxN3SQ/qqw= pA5NnZvcd574WRXuOA7ZfC/7Lqt4cB0MRLWtHubtJoVOao9ib5ry4rTk0r6ddnOv AIGKktutzK3ymvKleS3DOrwZQgJ+/BDWDW8kO9R66o6rdjiSobBi/0c2V1+dkqOg jFmKz395mvCOZGhC7fqAVhHat2EjGPMfgSZyABa7+1k=
MIIDbTCCAyygAwIBAgIGAOCdrKxkMAkGByqGSM44BAMwezELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjElMCMGA1UEChMcQmFsdGltb3JlIFRlY2hub2xvZ2ll cywgTHRkLjERMA8GA1UECxMIWC9TZWN1cmUxITAfBgNVBAMTGFgvU2VjdXJlIDEw MjQtYml0IERTQSBDQTAeFw0wMDA3MjcxNzEzMzNaFw0wMTA3MjcxNzEzMjZaMHwx CzAJBgNVBAYTAklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9y ZSBUZWNobm9sb2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMSIwIAYDVQQD ExlYL1NlY3VyZSAxMDI0LWJpdCBEU0EgY3J0MIIBuDCCASwGByqGSM44BAEwggEf AoGBAKxbaPLj0DOst+BSz5g4eNASyda1awvFXkarroT2eo2DRZELsMZ7v8AryADI bpDwSxRE/GyX/29nn/qKsWWoxG/vPM5WaMhvIP8DHwwR08c/gp6MC2oZwgk2AaeZ LexvKlKGybr48pcI9bLe1fS7LtN4lzF7W4q4lIxWuYFEWrDfAhUAkEjAFpCe4lcU Odwphpzf+tBaUdsCgYEAoe14R2OtyKx+s+60O5BRNMOYpIg2TU/f15N3bsDErKOW tKXeNK9FS7dWStreDxo2SSgOonqAd4FuJ/4uva7GgNL4ULIqY7E+mW5iwJ7n/WTE Lh98mEocsLXkNh24HcH4BZfSCTruuzmCyjdV1KSqX/Eux04HfCWYmdxN3SQ/qqwD gYUAAoGBAKQOTZ2b3Hee+FkV7jgO2Xwv+y6reHAdDES1rR7m7SaFTmqPYm+a8uK0 5NK+nXZzrwCBipLbrcyt8prypXktwzq8GUICfvwQ1g1vJDvUeuqOq3Y4kqGwYv9H NldfnZKjoIxZis9/eZrwjmRoQu36gFYR2rdhIxjzH4EmcgAWu/tZozswOTAPBgNV HQ8BAf8EBQMDAIAAMBEGA1UdDgQKBAiA4IML4dndEDATBgNVHSMEDDAKgAiHoMnY nDxZUDAJBgcqhkjOOAQDAzAAMC0CFQCEXa1E2ueJ8WMX5nP1lCcBWhxC2wIUGUCB b6M6Oj3NQAJbnZsdY63rKa0=
libxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/0000755000175000017500000000000012273503736031125 5ustar tonytony././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signature-x509-is.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signatu0000644000175000017500000000202507356023536032522 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= pjlt4UQxI954TIicsctTxRk4qC4tF/h2Y0kmivXvyUU8EPoaCH8bIrcFWz7I7C3P 7NZi341itjSWA9cFnSBKboBPvKxPMMmYShsVMFBDyB2jiF1T3Qc4C/E0BJpR/Ntn uBUNBPNxC0TUjuS7fIYku3NpVVbIv1OP0OqWNi0KDN0= CN=X/Secure CA,OU=X/Secure,O=Baltimore Technologies\, Ltd.,ST=Dublin,C=IE 989921098912 libxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/certs/0000755000175000017500000000000012273503736032245 5ustar tonytony././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/certs/lugh.crtlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/certs/l0000644000175000017500000000130507356023536032423 0ustar tonytony00*{40  *H 0n1 0 UIE10 UDublin1%0#U Baltimore Technologies, Ltd.10U X/Secure10U X/Secure CA0 010515100518Z 020515100437Z0g1 0 UIE10 UDublin1%0#U Baltimore Technologies, Ltd.10U X/Secure1 0 ULugh00  *H 0*NkZ֋"<iά+U2ザcrڄ~$5/hZYb>xUaQWD#<,2 k{[d2m pPw v} "ˁ"Kp1Iq0o0U0U aZ)jw05U.0,*http://www.baltimore.com/products/xsecure/0U# 0  0  *H m >fg/`6#&s+ȖZ҆f?tRT K{4a2 ,,%N{ .0q]AW%5\ՀI ITkGz^././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/certs/nocertifiacte.crtlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/certs/n0000644000175000017500000000256007356023536032431 0ustar tonytonyExample Signatures[1] [1] http://www.w3.org/Signature/Drafts/xmldsig-core/Overview.html This is an exercise over some key information types, interop of which is required for certain standardisation processes. . signature-keyname.xml . signature-retrievalmethod-rawx509crt.xml . signature-x509-crt-crl.xml . signature-x509-crt.xml . signature-x509-is.xml . signature-x509-ski.xml . signature-x509-sn.xml . certs/*.crt To resolve the key associated with the KeyName in `signature-keyname.xml' you must perform a cunning transformation from the name `Xxx' to the certificate that resides in the directory `certs/' that has a subject name containing the common name `Xxx'. The transformation from this key name to the filename under which the certificate is stored `certs/xxx.crt' is a trade secret encryption process, the circumvention of which may expose you to civil and criminal prosecution under the DMCA and other applicable laws. To resolve the key associated with the X509Data in `signature-x509-is.xml', `signature-x509-ski.xml' and `signature-x509-sn.xml' you need to resolve the identified certificate from those in the `certs' directory. In `signature-x509-crt-crl.xml' an X.509 CRL is present which has revoked the X.509 certificate used for signing. So verification should be qualified. Merlin Hughes Baltimore Technologies, Ltd. Tuesday, May 15, 2001 ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/certs/macha.crtlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/certs/m0000644000175000017500000000130607356023536032425 0ustar tonytony00+{<0  *H 0n1 0 UIE10 UDublin1%0#U Baltimore Technologies, Ltd.10U X/Secure10U X/Secure CA0 010515100458Z 020515100437Z0h1 0 UIE10 UDublin1%0#U Baltimore Technologies, Ltd.10U X/Secure10 UMacha00  *H 0Ham{Hu9$F ٩+5| H"Љ;^淕?@ر 8H)xxL1yaٻ2ZQMݯӮV`(@OAC; S;Idr&Dcq0o0U0U U2.L05U.0,*http://www.baltimore.com/products/xsecure/0U# 0  0  *H [1W nNAp[Į%:Uh]Ǥ2[l gwhY5SQIB=05U.0,*http://www.baltimore.com/products/xsecure/0U# 0  0  *H  -|F^@&?ٟQi>Y:-D W]'o4aWe 1:3[Wy{cRO#-~|IVȝ"{Gh|9 '~/Q 3w././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/certs/badb.crtlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/certs/b0000644000175000017500000000130507356023536032411 0ustar tonytony00*{0  *H 0n1 0 UIE10 UDublin1%0#U Baltimore Technologies, Ltd.10U X/Secure10U X/Secure CA0 010515100450Z 020515100437Z0g1 0 UIE10 UDublin1%0#U Baltimore Technologies, Ltd.10U X/Secure1 0 UBadb00  *H 0@Fc<Y+@X%` #=:l<'~Qe5"s~Iz: QM=,Ϡ ɞ'4, x/x}oGKO]q0o0U0U ba05U.0,*http://www.baltimore.com/products/xsecure/0U# 0  0  *H sWuֲc}UUf%'S篕.&j `M ra-u8ǁ2I+ \wqCCtFn ·E@ v\cfh@()5,././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/certs/balor.crtlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/certs/b0000644000175000017500000000130607356023536032412 0ustar tonytony00+{iE0  *H 0n1 0 UIE10 UDublin1%0#U Baltimore Technologies, Ltd.10U X/Secure10U X/Secure CA0 010515100510Z 020515100437Z0h1 0 UIE10 UDublin1%0#U Baltimore Technologies, Ltd.10U X/Secure10 UBalor00  *H 07^c76Gn2APO敃 ^vȏC+5GM໰z$ȽrrTou3n\;"ݷBd,vG!QX8#.-uYvl_ G7:V>{L0ŌHf^OtK!ыs ~`y#giR$('iYoI}_Feq0o0U0U ߙHr05U.0,*http://www.baltimore.com/products/xsecure/0U# 0  0  *H dt.%$:M& zes4[^ Zwway:+ϰ$ΆN*z;Zr_:@W Jy uoOiHx?2bNES4\w%>ZO{ ݇a././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/certs/bres.crtlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/certs/b0000644000175000017500000000130507356023536032411 0ustar tonytony00*{堙0  *H 0n1 0 UIE10 UDublin1%0#U Baltimore Technologies, Ltd.10U X/Secure10U X/Secure CA0 010515100524Z 020515100437Z0g1 0 UIE10 UDublin1%0#U Baltimore Technologies, Ltd.10U X/Secure1 0 UBres00  *H 0BDɑp#pr$SRЛ!.PCIᄍ;!>1K6؄d1VxYlPe6*C]rfxLL݇ȹ$407(jV;,k .q0o0U0U Usb05U.0,*http://www.baltimore.com/products/xsecure/0U# 0  0  *H 3.~Qz)7@m ZA7ykt'EDbGDƖ7"vR?AT2|Z,XA%3}p)"TCLe7:dƏ~"u././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/Readme.txtlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/Readme.0000644000175000017500000000256007357133753032333 0ustar tonytonyExample Signatures[1] [1] http://www.w3.org/Signature/Drafts/xmldsig-core/Overview.html This is an exercise over some key information types, interop of which is required for certain standardisation processes. . signature-keyname.xml . signature-retrievalmethod-rawx509crt.xml . signature-x509-crt-crl.xml . signature-x509-crt.xml . signature-x509-is.xml . signature-x509-ski.xml . signature-x509-sn.xml . certs/*.crt To resolve the key associated with the KeyName in `signature-keyname.xml' you must perform a cunning transformation from the name `Xxx' to the certificate that resides in the directory `certs/' that has a subject name containing the common name `Xxx'. The transformation from this key name to the filename under which the certificate is stored `certs/xxx.crt' is a trade secret encryption process, the circumvention of which may expose you to civil and criminal prosecution under the DMCA and other applicable laws. To resolve the key associated with the X509Data in `signature-x509-is.xml', `signature-x509-ski.xml' and `signature-x509-sn.xml' you need to resolve the identified certificate from those in the `certs' directory. In `signature-x509-crt-crl.xml' an X.509 CRL is present which has revoked the X.509 certificate used for signing. So verification should be qualified. Merlin Hughes Baltimore Technologies, Ltd. Tuesday, May 15, 2001 ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signature-x509-crt.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signatu0000644000175000017500000000361507356023536032530 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= ZrROxIcOSBvt5z2krEhQGSVIo4oAwTJwGAoFiWucvvEtY9k0L2R5RVHBnHCzk5GT kHGaT8SUqtnDeiH6W/2FNfciiV/w1pxURvNcyW8cYCn1B5XF68vILXUaptWf0DKw DvCFS+uLh0ACuEUfpe1Dx1fwB85lpK2iQcpx9dPaC4M= MIICwzCCAiygAwIBAgIGAOZ75QhHMA0GCSqGSIb3DQEBBQUAMG4xCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9yZSBUZWNobm9s b2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMRQwEgYDVQQDEwtYL1NlY3Vy ZSBDQTAeFw0wMTA1MTUxMDA0NDVaFw0wMjA1MTUxMDA0MzdaMGkxCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9yZSBUZWNobm9s b2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMQ8wDQYDVQQDEwZNb3JpZ3Uw gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALT4FJkxu+bB5lOwYa+irIb7sJU7 9sRQbYYnfw35D7NQkig+Lvi2LXXoA6ABull2bF+gu+sgRzezzOs6VsTL8z57TIz2 48HaMInFjOiqSANmzQKlXv1PjXSxSyHRi/3xc8gMfmCxeSPCZ5VpUiQoJ5ZpWcDz /LKvb0l9X0YBzMZlAgMBAAGjcTBvMA4GA1UdDwEB/wQEAwIHgDARBgNVHQ4ECgQI hbis35lIcu8wNQYDVR0SBC4wLIYqaHR0cDovL3d3dy5iYWx0aW1vcmUuY29tL3By b2R1Y3RzL3hzZWN1cmUvMBMGA1UdIwQMMAqACIXsHwqPfxrRMA0GCSqGSIb3DQEB BQUAA4GBAGSBdPou5CWAiyS5/f46m00mIIqO3xl6ZXOc/DRblF4gWnesd2F5v/s6 lAbqK8+wJM6GxvpOkSp6O1q6hZRyzF86QPlXCfhKAXkgzHXtb6PfT2m9t0iawnjy P+oyYofnFU5FFVOCujSrmFx3FCU+Wg6RT3v1jRoM3YfMYZYEzfTT ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signature-x509-ski.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signatu0000644000175000017500000000152707356023536032530 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= odQDs0dMckjo3hrQVZfx73SBDAR75bKaa/voefbB2f+uKvLMQDF1CeB8wA7vmlDV oJJe3/18vvawSjWgIowN/KR7EZwkcvtw9hnb1QYEddX+CueeCfdEvp553nIPtibg z+77wAbVq1VCOEspx3gn9DZcLJeGHkaeeTQNplYkn84= iIg+zElCPZ0= ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signature-keyname.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signatu0000644000175000017500000000143607356023536032527 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= KTe1H5Hjp8hwahNFoUqHDuPJNNqhS1U3BBBH5/gByItNIwV18nMiLq4KunzFnOqD xzTuO0/T+wsoYC1xOEuCDxyIujNCaJfLh+rCi5THulnc8KSHHEoPQ+7fA1VjmO31 2iw1iENOi7m//wzKlIHuxZCJ5nvolT21PV6nSE4DHlA= Lugh ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signature-x509-sn.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signatu0000644000175000017500000000163507356023536032530 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= L5EGwmlRmiKHu0SuMEhEwAzFK3uNWidqgpc+ZJws8pyD/uTZKdS93GMXlyMup4Dj +E8+AFNj8zJ2JtQUBCkyTOS6XjMvSU4Q4/tlm6srjROtIvqpnwfUF0zEw5YswmlF TpZY92EUQEiAErDt9LL9ZOy3fTAbyxs0WCzQEGoODE8= CN=Badb,OU=X/Secure,O=Baltimore Technologies\, Ltd.,ST=Dublin,C=IE ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signature-x509-crt-crl.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signatu0000644000175000017500000000501507356023536032524 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= DrNVqKOilPswEwCilZ3EkjFyQof5BJAbAdi2I8qZuJAsL7d180nWe/xPAURHC6IR t2xJkNgCxrgdpy9//2UzaeE65URi2THgbPW1fhrp6dVeJyhiq9YfJ0Ofn7oeADkt kd3jZipUUG7UGQ0oz3bMaZ6OaGYLkygnUXWh5EHpg4A= MIICwTCCAiqgAwIBAgIGAOZ75aCZMA0GCSqGSIb3DQEBBQUAMG4xCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9yZSBUZWNobm9s b2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMRQwEgYDVQQDEwtYL1NlY3Vy ZSBDQTAeFw0wMTA1MTUxMDA1MjRaFw0wMjA1MTUxMDA0MzdaMGcxCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9yZSBUZWNobm9s b2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMQ0wCwYDVQQDEwRCcmVzMIGf MA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDAQtREqcPJkeGXcCORs/SwcHLh9ySw tQNTUvTQm54hBLbTLhJQ20NJf46Z4YSNoaI7IT4x8fiv+JZLNrQc2ISGZBibMVZ4 4ZvSWYls7d9QurRltvQ2oCqDhUMSXcGY3HJmeEzITIfdh6bIuSQ0sDAXNygVhGr/ vVaUOyxr1AoutQIDAQABo3EwbzAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIz2 q1W6c2KTMDUGA1UdEgQuMCyGKmh0dHA6Ly93d3cuYmFsdGltb3JlLmNvbS9wcm9k dWN0cy94c2VjdXJlLzATBgNVHSMEDDAKgAiF7B8Kj38a0TANBgkqhkiG9w0BAQUF AAOBgQAzFhnxji5+UdJ6tbfRKTfhQG0JWrWiQRy0N3lrAXQnpQBFjOjtRPRiR5ST vRQbRNrGljegIpoFFK12Uj9BxP6x+uZUqzKDfFqWEN0s9Y9YQdkl+DN9jZZwgK6N KYGqh43HIoPKGb1UQ93tTGW+F4ygNxHluvO1Ovtku8aPBn4idQ== MIIBdjCB4AIBATANBgkqhkiG9w0BAQUFADBuMQswCQYDVQQGEwJJRTEPMA0GA1UE CBMGRHVibGluMSUwIwYDVQQKExxCYWx0aW1vcmUgVGVjaG5vbG9naWVzLCBMdGQu MREwDwYDVQQLEwhYL1NlY3VyZTEUMBIGA1UEAxMLWC9TZWN1cmUgQ0EXDTAxMDUx NTEwNDUwMFoXDTAxMDkyMDEwNDUwMFowGTAXAgYA5nvloJkXDTAxMDUxNTEwNDUw MFqgIzAhMAoGA1UdFAQDAgEAMBMGA1UdIwQMMAqACIXsHwqPfxrRMA0GCSqGSIb3 DQEBBQUAA4GBADVPiyJ4Q+Kr3B/GGmh/KbVtSPv5x1zffGxp1XwV5cVOmksVrKNx rCw86K0ZLxVgy1rIql8+i1b9u3Ozuo6VhU0el/NF2Tto2jAyy0j+PPK2Xv1/ATQx J2PK+Ty9vkm+7jjurfeJVvAC8D+WFBAh/JWIzmMXA8cMBfTFBRPhZQao ././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootlibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signature-retrievalmethod-rawx509crt.xmllibxml-security-java-1.5.6/samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signatu0000644000175000017500000000155407356023536032530 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= FnwsSCWT6REW/8QnOjv0BK+r3Ly/4aB++pNnZp9pnz8f7+j33eKSj1soyQLq5zmN FwyeeQhnlTbR1kfve014ub9uHVC9A1cfmGZxQF1DC+enHt+AAPJaa278/ocgpMb5 Gibl4w7e3HAdBn/RJCrFJH77wY2oU5Ob0zIQtECVNJk= libxml-security-java-1.5.6/samples/org/0000755000175000017500000000000012273503736016605 5ustar tonytonylibxml-security-java-1.5.6/samples/org/apache/0000755000175000017500000000000012273503736020026 5ustar tonytonylibxml-security-java-1.5.6/samples/org/apache/xml/0000755000175000017500000000000012273503736020626 5ustar tonytonylibxml-security-java-1.5.6/samples/org/apache/xml/security/0000755000175000017500000000000012273503736022475 5ustar tonytonylibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/0000755000175000017500000000000012273503736024141 5ustar tonytonylibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/keys/0000755000175000017500000000000012273503736025114 5ustar tonytonylibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/keys/CreateKeyInfo.java0000644000175000017500000000507111551074155030446 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.keys; import java.io.FileInputStream; import java.math.BigInteger; import java.security.KeyStore; import java.security.cert.X509Certificate; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.keys.content.X509Data; import org.apache.xml.security.keys.content.keyvalues.RSAKeyValue; import org.apache.xml.security.utils.XMLUtils; /** * Class CreateKeyInfo * * @author $Author: coheigea $ * @version $Revision: 1091490 $ */ public class CreateKeyInfo { /** * Method main * * @param unused * @throws Exception */ public static void main(String unused[]) throws Exception { KeyStore ks = KeyStore.getInstance("JKS"); FileInputStream fis = new FileInputStream( "samples/data/keystore.jks"); ks.load(fis, "xmlsecurity".toCharArray()); javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); org.w3c.dom.Document doc = db.newDocument(); KeyInfo ki = new KeyInfo(doc); doc.appendChild(ki.getElement()); ki.setId("myKI"); ki.addKeyName("A simple key"); X509Certificate cert = (X509Certificate) ks.getCertificate("test"); ki.addKeyValue(cert.getPublicKey()); X509Data x509Data = new X509Data(doc); ki.add(x509Data); x509Data.addCertificate(cert); x509Data.addSubjectName("Subject name"); x509Data.addIssuerSerial("Subject nfsdfhs", 6786); ki.add(new RSAKeyValue(doc, new BigInteger("678"), new BigInteger("6870"))); XMLUtils.outputDOMc14nWithComments(doc, System.out); } } libxml-security-java-1.5.6/samples/org/apache/xml/security/samples/encryption/0000755000175000017500000000000012273503736026333 5ustar tonytonylibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/encryption/Decrypter.java0000755000175000017500000001156011671643306031144 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.encryption; import java.io.File; import java.io.FileOutputStream; import java.security.Key; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.DESedeKeySpec; import org.apache.xml.security.encryption.XMLCipher; import org.apache.xml.security.utils.JavaUtils; import org.apache.xml.security.utils.EncryptionConstants; import org.w3c.dom.Document; import org.w3c.dom.Element; import javax.xml.transform.TransformerFactory; import javax.xml.transform.Transformer; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.OutputKeys; /** * This sample demonstrates how to decrypt data inside an xml document. * * @author Vishal Mahajan (Sun Microsystems) */ public class Decrypter { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog( Decrypter.class.getName()); static { org.apache.xml.security.Init.init(); } private static Document loadEncryptionDocument() throws Exception { String fileName = "build/encryptedInfo.xml"; File encryptionFile = new File(fileName); javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); Document document = db.parse(encryptionFile); System.out.println( "Encryption document loaded from " + encryptionFile.toURI().toURL().toString() ); return document; } private static SecretKey loadKeyEncryptionKey() throws Exception { String fileName = "build/kek"; String jceAlgorithmName = "DESede"; File kekFile = new File(fileName); DESedeKeySpec keySpec = new DESedeKeySpec(JavaUtils.getBytesFromFile(fileName)); SecretKeyFactory skf = SecretKeyFactory.getInstance(jceAlgorithmName); SecretKey key = skf.generateSecret(keySpec); System.out.println( "Key encryption key loaded from " + kekFile.toURI().toURL().toString() ); return key; } private static void outputDocToFile(Document doc, String fileName) throws Exception { File encryptionFile = new File(fileName); FileOutputStream f = new FileOutputStream(encryptionFile); TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(); transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); DOMSource source = new DOMSource(doc); StreamResult result = new StreamResult(f); transformer.transform(source, result); f.close(); System.out.println( "Wrote document containing decrypted data to " + encryptionFile.toURI().toURL().toString() ); } public static void main(String unused[]) throws Exception { Document document = loadEncryptionDocument(); Element encryptedDataElement = (Element) document.getElementsByTagNameNS( EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_ENCRYPTEDDATA).item(0); /* * Load the key to be used for decrypting the xml data * encryption key. */ Key kek = loadKeyEncryptionKey(); String providerName = "BC"; XMLCipher xmlCipher = XMLCipher.getInstance(); /* * The key to be used for decrypting xml data would be obtained * from the keyinfo of the EncrypteData using the kek. */ xmlCipher.init(XMLCipher.DECRYPT_MODE, null); xmlCipher.setKEK(kek); /* * The following doFinal call replaces the encrypted data with * decrypted contents in the document. */ xmlCipher.doFinal(document, encryptedDataElement); outputDocToFile(document, "build/decryptedInfo.xml"); } } libxml-security-java-1.5.6/samples/org/apache/xml/security/samples/encryption/Encrypter.java0000755000175000017500000001524511671643306031162 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.encryption; import java.io.File; import java.io.FileOutputStream; import java.security.Key; import javax.crypto.SecretKey; import javax.crypto.KeyGenerator; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.encryption.XMLCipher; import org.apache.xml.security.encryption.EncryptedData; import org.apache.xml.security.encryption.EncryptedKey; import org.apache.xml.security.utils.Constants; import org.w3c.dom.Document; import org.w3c.dom.Element; import javax.xml.transform.TransformerFactory; import javax.xml.transform.Transformer; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.OutputKeys; /** * This sample demonstrates how to encrypt data inside an xml document. * * @author Vishal Mahajan (Sun Microsystems) */ public class Encrypter { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog( Encrypter.class.getName()); static { org.apache.xml.security.Init.init(); } private static Document createSampleDocument() throws Exception { javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); Document document = db.newDocument(); /** * Build a sample document. It will look something like: * * * Some simple text * */ Element root = document.createElementNS("http://www.apache.org/ns/#app1", "apache:RootElement"); root.setAttributeNS( Constants.NamespaceSpecNS, "xmlns:apache", "http://www.apache.org/ns/#app1" ); document.appendChild(root); root.appendChild(document.createTextNode("\n")); Element childElement = document.createElementNS("http://www.apache.org/ns/#app1", "apache:foo"); childElement.appendChild( document.createTextNode("Some simple text")); root.appendChild(childElement); root.appendChild(document.createTextNode("\n")); return document; } private static SecretKey GenerateAndStoreKeyEncryptionKey() throws Exception { String jceAlgorithmName = "DESede"; KeyGenerator keyGenerator = KeyGenerator.getInstance(jceAlgorithmName); SecretKey kek = keyGenerator.generateKey(); byte[] keyBytes = kek.getEncoded(); File kekFile = new File("build/kek"); FileOutputStream f = new FileOutputStream(kekFile); f.write(keyBytes); f.close(); System.out.println("Key encryption key stored in " + kekFile.toURI().toURL().toString()); return kek; } private static SecretKey GenerateDataEncryptionKey() throws Exception { String jceAlgorithmName = "AES"; KeyGenerator keyGenerator = KeyGenerator.getInstance(jceAlgorithmName); keyGenerator.init(128); return keyGenerator.generateKey(); } private static void outputDocToFile(Document doc, String fileName) throws Exception { File encryptionFile = new File(fileName); FileOutputStream f = new FileOutputStream(encryptionFile); TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(); transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); DOMSource source = new DOMSource(doc); StreamResult result = new StreamResult(f); transformer.transform(source, result); f.close(); System.out.println( "Wrote document containing encrypted data to " + encryptionFile.toURI().toURL().toString() ); } public static void main(String unused[]) throws Exception { Document document = createSampleDocument(); /* * Get a key to be used for encrypting the element. * Here we are generating an AES key. */ Key symmetricKey = GenerateDataEncryptionKey(); /* * Get a key to be used for encrypting the symmetric key. * Here we are generating a DESede key. */ Key kek = GenerateAndStoreKeyEncryptionKey(); String algorithmURI = XMLCipher.TRIPLEDES_KeyWrap; XMLCipher keyCipher = XMLCipher.getInstance(algorithmURI); keyCipher.init(XMLCipher.WRAP_MODE, kek); EncryptedKey encryptedKey = keyCipher.encryptKey(document, symmetricKey); /* * Let us encrypt the contents of the document element. */ Element rootElement = document.getDocumentElement(); algorithmURI = XMLCipher.AES_128; XMLCipher xmlCipher = XMLCipher.getInstance(algorithmURI); xmlCipher.init(XMLCipher.ENCRYPT_MODE, symmetricKey); /* * Setting keyinfo inside the encrypted data being prepared. */ EncryptedData encryptedData = xmlCipher.getEncryptedData(); KeyInfo keyInfo = new KeyInfo(document); keyInfo.add(encryptedKey); encryptedData.setKeyInfo(keyInfo); /* * doFinal - * "true" below indicates that we want to encrypt element's content * and not the element itself. Also, the doFinal method would * modify the document by replacing the EncrypteData element * for the data to be encrypted. */ xmlCipher.doFinal(document, rootElement, true); /* * Output the document containing the encrypted information into * a file. */ outputDocToFile(document, "build/encryptedInfo.xml"); } } libxml-security-java-1.5.6/samples/org/apache/xml/security/samples/DSNamespaceContext.java0000644000175000017500000000400311671643306030470 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import javax.xml.namespace.NamespaceContext; /** * A NamespaceContext implementation for digital signatures */ public class DSNamespaceContext implements NamespaceContext { private Map namespaceMap = new HashMap(); public DSNamespaceContext() { namespaceMap.put("ds", "http://www.w3.org/2000/09/xmldsig#"); } public DSNamespaceContext(Map namespaces) { this(); namespaceMap.putAll(namespaces); } public String getNamespaceURI(String arg0) { return namespaceMap.get(arg0); } public void putPrefix(String prefix, String namespace) { namespaceMap.put(prefix, namespace); } public String getPrefix(String arg0) { for (String key : namespaceMap.keySet()) { String value = namespaceMap.get(key); if (value.equals(arg0)) { return key; } } return null; } public Iterator getPrefixes(String arg0) { return namespaceMap.keySet().iterator(); } } libxml-security-java-1.5.6/samples/org/apache/xml/security/samples/utils/0000755000175000017500000000000012273503736025301 5ustar tonytonylibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/utils/Base64Sample.java0000644000175000017500000000705411672103701030326 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.utils; import java.math.BigInteger; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.utils.Base64; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Text; /** * Sample usage for Base64 class * * @author $Author: coheigea $ */ public class Base64Sample { /** * Method main * * @param unused * @throws Exception */ public static void main(String[] unused) throws Exception { org.apache.xml.security.Init.init(); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.newDocument(); BigInteger bi = new BigInteger("43268743267463264169236328648732694167862" + "349613278648732164986132849761329543543" + "874618327964897164823698416236345435435" + "491823648913268496218974698126498712698" + "426861432892343242343243242342342354354" + "349613278648732164986132849761329543543" + "874618327964897164823698416236345435435" + "491823648913268496218974698126498712698" + "426861432892343242343243242342342354354" + "349613278648732164986132849761329543543" + "874618327964897164823698416236345435435" + "491823648913268496218974698126498712698" + "426861432892343242343243242342342354354" + "349613278648732164986132849761329543543" + "874618327964897164823698416236345435435" + "491823648913268496218974698126498712698" + "426861432892343242343243242342342354354" + "349613278648732164986132849761329543543" + "874618327964897164823698416236345435435" + "491823648913268496218974698126498712698" + "426861432892343242343243242342342354354" + "3246874621496829136"); Text base64text = doc.createTextNode(Base64.encode(bi)); Element root = doc.createElementNS(null, "Base64"); doc.appendChild(root); root.appendChild(base64text); Canonicalizer c14n = Canonicalizer.getInstance(Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS); System.out.println(new String(c14n.canonicalizeSubtree(doc))); } } libxml-security-java-1.5.6/samples/org/apache/xml/security/samples/utils/resolver/0000755000175000017500000000000012273503736027142 5ustar tonytony././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/utils/resolver/OfflineResolver.javalibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/utils/resolver/OfflineResolver.ja0000644000175000017500000001411411645020260032547 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.utils.resolver; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.net.URISyntaxException; import java.util.HashMap; import java.util.Map; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.utils.resolver.ResourceResolverException; import org.apache.xml.security.utils.resolver.ResourceResolverSpi; import org.w3c.dom.Attr; /** * This class helps us home users to resolve http URIs without a network * connection * * @author $Author: coheigea $ */ public class OfflineResolver extends ResourceResolverSpi { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(OfflineResolver.class.getName()); /** Field _uriMap */ static Map _uriMap = null; /** Field _mimeMap */ static Map _mimeMap = null; static { org.apache.xml.security.Init.init(); OfflineResolver._uriMap = new HashMap(); OfflineResolver._mimeMap = new HashMap(); OfflineResolver.register("http://www.w3.org/TR/xml-stylesheet", "samples/data/org/w3c/www/TR/xml-stylesheet.html", "text/html"); OfflineResolver.register("http://www.w3.org/TR/2000/REC-xml-20001006", "samples/data/org/w3c/www/TR/2000/REC-xml-20001006", "text/xml"); OfflineResolver.register("http://www.nue.et-inf.uni-siegen.de/index.html", "samples/data/org/apache/xml/security/temp/nuehomepage", "text/html"); OfflineResolver.register("http://www.nue.et-inf.uni-siegen.de/~geuer-pollmann/id2.xml", "samples/data/org/apache/xml/security/temp/id2.xml", "text/xml"); OfflineResolver.register("http://xmldsig.pothole.com/xml-stylesheet.txt", "samples/data/com/pothole/xmldsig/xml-stylesheet.txt", "text/xml"); OfflineResolver.register("http://www.w3.org/Signature/2002/04/xml-stylesheet.b64", "samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/xml-stylesheet.b64", "text/plain"); } /** * Method engineResolve * * @param uri * @param BaseURI * * @throws ResourceResolverException */ public XMLSignatureInput engineResolve(Attr uri, String BaseURI) throws ResourceResolverException { try { String URI = uri.getNodeValue(); if (OfflineResolver._uriMap.containsKey(URI)) { String newURI = OfflineResolver._uriMap.get(URI); log.debug("Mapped " + URI + " to " + newURI); InputStream is = new FileInputStream(newURI); log.debug("Available bytes = " + is.available()); XMLSignatureInput result = new XMLSignatureInput(is); // XMLSignatureInput result = new XMLSignatureInput(inputStream); result.setSourceURI(URI); result.setMIMEType((String) OfflineResolver._mimeMap.get(URI)); return result; } else { Object exArgs[] = {"The URI " + URI + " is not configured for offline work"}; throw new ResourceResolverException("generic.EmptyMessage", exArgs, uri, BaseURI); } } catch (IOException ex) { throw new ResourceResolverException("generic.EmptyMessage", ex, uri, BaseURI); } } /** * We resolve http URIs without fragment... * * @param uri * @param BaseURI * */ public boolean engineCanResolve(Attr uri, String BaseURI) { String uriNodeValue = uri.getNodeValue(); if (uriNodeValue.equals("") || uriNodeValue.startsWith("#")) { return false; } try { URI uriNew = getNewURI(uri.getNodeValue(), BaseURI); if (uriNew.getScheme().equals("http")) { log.debug("I state that I can resolve " + uriNew.toString()); return true; } log.debug("I state that I can't resolve " + uriNew.toString()); } catch (URISyntaxException ex) { // } return false; } /** * Method register * * @param URI * @param filename * @param MIME */ private static void register(String URI, String filename, String MIME) { OfflineResolver._uriMap.put(URI, filename); OfflineResolver._mimeMap.put(URI, MIME); } private static URI getNewURI(String uri, String baseURI) throws URISyntaxException { URI newUri = null; if (baseURI == null || "".equals(baseURI)) { newUri = new URI(uri); } else { newUri = new URI(baseURI).resolve(uri); } // if the URI contains a fragment, ignore it if (newUri.getFragment() != null) { URI uriNewNoFrag = new URI(newUri.getScheme(), newUri.getSchemeSpecificPart(), null); return uriNewNoFrag; } return newUri; } } libxml-security-java-1.5.6/samples/org/apache/xml/security/samples/MyResolver.java0000644000175000017500000000317411551074155027114 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples; import java.io.ByteArrayInputStream; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.utils.resolver.ResourceResolverSpi; import org.w3c.dom.Attr; /** * @author $Author: coheigea $ */ public class MyResolver extends ResourceResolverSpi { /** * Method engineResolve * @inheritDoc * @param uri * @param BaseURI * */ public XMLSignatureInput engineResolve(Attr uri, String BaseURI) { ByteArrayInputStream is = new ByteArrayInputStream("string".getBytes()); return new XMLSignatureInput(is); } /** * Method engineCanResolve * @inheritDoc * @param uri * @param BaseURI * */ public boolean engineCanResolve(Attr uri, String BaseURI) { return true; } } libxml-security-java-1.5.6/samples/org/apache/xml/security/samples/transforms/0000755000175000017500000000000012273503736026337 5ustar tonytony././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootlibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/transforms/SampleTransformEnvelopedSignature.javalibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/transforms/SampleTransformEnvelop0000644000175000017500000001077011672356625032742 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.transforms; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.samples.DSNamespaceContext; import org.apache.xml.security.samples.SampleUtils; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; import org.w3c.dom.Node; /** * This class demonstrates the use of a Transform forEnveloped Signature. * * @author Christian Geuer-Pollmann * @version %I%, %G% */ public class SampleTransformEnvelopedSignature { /** * Method main * * @param args * @throws Exception */ public static void main(String args[]) throws Exception { String inputStr = "" + "\n" + "" + "\n" + " text in Data" + "\n" + "" + "\n" + " " + "\n" + " " + "\n" + " " + "\n" // + " " + "\n" + " " + "\n" + " " + "\n" + " " + "\n" + " " + "\n" + " " + "\n" + " " + " " + "\n" + " " + "\n" + " " + "\n" + " " + "\n" + " " + "\n" + " " + "\n" + " " + "\n" + " " + "\n" + " " + "\n" + " " + "\n" + "" + "\n" ; org.apache.xml.security.Init.init(); javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); org.w3c.dom.Document doc = db.parse(new java.io.ByteArrayInputStream(inputStr.getBytes())); XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); xpath.setNamespaceContext(new DSNamespaceContext()); String expression = "//ds:Signature[@Id='SignatureToBeOmitted']//ds:Transforms"; Element transformsElem = (Element) xpath.evaluate(expression, doc, XPathConstants.NODE); Transforms transforms = new Transforms(transformsElem, "memory://"); XMLSignatureInput input = new XMLSignatureInput((Node) doc); // input.setCanonicalizerURI(Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS); XMLSignatureInput result = transforms.performTransforms(input); System.out.println(new String(result.getBytes())); } } ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/transforms/SampleTransformXPath2Filter2.javalibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/transforms/SampleTransformXPath2F0000644000175000017500000001765611672356625032560 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.transforms; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.transforms.params.XPath2FilterContainer; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.ElementProxy; import org.apache.xml.security.utils.JavaUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Sample for the XML Signature XPath Filter v2.0 * * @author $Author: coheigea $ * @see XPath Filter v2.0 (TR) * @see * XPath Filter v2.0 (editors copy) */ public class SampleTransformXPath2Filter2 { /** * Method main * * @param args * @throws Exception */ public static void main(String args[]) throws Exception { org.apache.xml.security.Init.init(); boolean verbose = true; create("build/withComments.xml", true, verbose); System.out.println(); System.out.println(); System.out.println(); create("build/omitComments.xml", false, verbose); System.out.println(); System.out.println(); System.out.println(); check("build/withComments.xml"); } /** * Method create * * @param filename * @param withComments * @param verbose * @throws Exception */ public static void create( String filename, boolean withComments, boolean verbose ) throws Exception { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); DocumentBuilder db = dbf.newDocumentBuilder(); String inputDoc = ""; Document doc = db.parse(new ByteArrayInputStream(inputDoc.getBytes())); XMLSignature sig = new XMLSignature(doc, null, XMLSignature.ALGO_ID_MAC_HMAC_SHA1); doc.getDocumentElement().appendChild(sig.getElement()); sig.getElement().setAttributeNS( Constants.NamespaceSpecNS, "xmlns:" + ElementProxy.getDefaultPrefix(Transforms.TRANSFORM_XPATH2FILTER), Transforms.TRANSFORM_XPATH2FILTER ); doc.getDocumentElement().appendChild(doc.createTextNode("\n")); Transforms transforms = new Transforms(doc); transforms.addTransform(Transforms.TRANSFORM_XPATH2FILTER, XPath2FilterContainer.newInstanceIntersect(doc, "//E").getElement()); transforms.addTransform(Transforms.TRANSFORM_XPATH2FILTER, XPath2FilterContainer.newInstanceUnion(doc, "//B").getElement()); transforms.addTransform(Transforms.TRANSFORM_XPATH2FILTER, XPath2FilterContainer.newInstanceSubtract(doc, "//C").getElement()); transforms.addTransform(Transforms.TRANSFORM_XPATH2FILTER, XPath2FilterContainer.newInstanceUnion(doc, "//F").getElement()); transforms.addTransform(Transforms.TRANSFORM_XPATH2FILTER, XPath2FilterContainer.newInstanceSubtract(doc, "//G").getElement()); transforms.addTransform(Transforms.TRANSFORM_XPATH2FILTER, XPath2FilterContainer.newInstanceUnion(doc, "//H").getElement()); sig.addDocument("", transforms); String secretKey = "secret"; sig.getKeyInfo().addKeyName("The UTF-8 octets of \"" + secretKey + "\" are used for signing (" + secretKey.length() + " octets)"); sig.sign(sig.createSecretKey(secretKey.getBytes())); Canonicalizer c14n = Canonicalizer.getInstance(Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS); byte[] full = c14n.canonicalizeSubtree(doc); FileOutputStream fos = new FileOutputStream(filename); try { fos.write(full); } finally { fos.close(); } if (verbose) { System.out.println( "-------------------------------------------------------------"); System.out.println("Input to the transforms is"); System.out.println( "-------------------------------------------------------------"); System.out.println( new String(sig.getSignedInfo().item(0).getContentsBeforeTransformation().getBytes()) ); System.out.println( "-------------------------------------------------------------"); System.out .println("The signed octets (output of the transforms) are "); System.out.println( "-------------------------------------------------------------"); System.out.println( new String(sig.getSignedInfo().item(0).getTransformsOutput().getBytes()) ); System.out.println( "-------------------------------------------------------------"); System.out.println("The document is "); System.out.println( "-------------------------------------------------------------"); System.out.println(new String(full)); System.out.println( "-------------------------------------------------------------"); } } /** * Method check * * @param filename * @throws Exception */ public static void check(String filename) throws Exception { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.parse(new FileInputStream(filename)); NodeList sigs = doc.getElementsByTagNameNS(Constants.SignatureSpecNS, Constants._TAG_SIGNATURE); XMLSignature sig = new XMLSignature((Element)sigs.item(0), new File(filename).toURI().toURL().toString()); boolean check = sig.checkSignatureValue(sig.createSecretKey("secret".getBytes())); System.out.println( "-------------------------------------------------------------"); System.out.println("Verification of " + filename + ": " + check); System.out.println( "-------------------------------------------------------------"); System.out.println(new String(sig.getSignedInfo().item(0).getTransformsOutput().getBytes())); System.out.println( "-------------------------------------------------------------"); JavaUtils.writeBytesToFilename( "build/1.html", sig.getSignedInfo().item(0).getHTMLRepresentation().getBytes() ); } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/transforms/SampleTransformNone.javalibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/transforms/SampleTransformNone.ja0000644000175000017500000000431011551074155032602 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.transforms; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.transforms.Transform; import org.apache.xml.security.transforms.TransformSpi; /** * Implements a null transform which leaved the input unmodified. * * @author Christian Geuer-Pollmann */ public class SampleTransformNone extends TransformSpi { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(SampleTransformNone.class.getName()); /** Field implementedTransformURI */ public static final String implementedTransformURI = "http://www.xmlsecurity.org/NS/Transforms#none"; static { org.apache.xml.security.Init.init(); } /** * Method engineGetURI * * */ protected String engineGetURI() { return SampleTransformNone.implementedTransformURI; } public boolean wantsOctetStream () { return true; } public boolean wantsNodeSet () { return true; } public boolean returnsOctetStream () { return true; } public boolean returnsNodeSet () { return true; } /** * Method enginePerformTransform * * @param input * */ protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input, Transform _transformObject) { return input; } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/transforms/SampleTransformXSLT.javalibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/transforms/SampleTransformXSLT.ja0000644000175000017500000001476011551074155032507 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.transforms; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.transforms.Transforms; /** * This class demonstrates the use of a Transform for XSLT. The * xsl:stylesheet is directly embedded in the ds:Transform, * so the {@link Transform} object is created by using the Element. * * @author Christian Geuer-Pollmann * @version %I%, %G% */ public class SampleTransformXSLT { /** * Method main * * @param args * @throws Exception */ public static void main(String args[]) throws Exception { org.apache.xml.security.Init.init(); String transformStr = "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + " \n" + "\n" + "\n" + "\n" + "Order is: \n" + " \n" + "\n" + "\n" + "\n" + " Family is: \n" + " \n" + "\n" + "\n" + " SubFamily is \n" + " \n" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + "\n" ; String inputStr = "\n" + "\n" + "\n" + " \n" + " Great Tinamou.\n" + " Highland Tinamou.\n" + " Little Tinamou.\n" + " Thicket Tinamou.\n" + " Slaty-breasted Tinamou.\n" + " Choco Tinamou.\n" + " \n" + " \n" + " \n" + " \n" + " Red-throated Loon.\n" + " Arctic Loon.\n" + " Pacific Loon.\n" + " Common Loon.\n" + " Yellow-billed Loon.\n" + " \n" + " \n" + " \n" + " \n" + " Least Grebe.\n" + " Pied-billed Grebe.\n" + " Atitlan Grebe.\n" + " Horned Grebe.\n" + " Red-necked Grebe.\n" + " Eared Grebe.\n" + " Western Grebe.\n" + " Clark's Grebe.\n" + " \n" + " \n" + "\n" ; javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); org.w3c.dom.Document doc = db.parse(new java.io.ByteArrayInputStream(transformStr.getBytes())); Transforms t = new Transforms(doc.getDocumentElement(), "memory://"); XMLSignatureInput result = t.performTransforms(new XMLSignatureInput(inputStr.getBytes())); System.out.println(new String(result.getBytes())); } } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/transforms/SampleTransformChaining.javalibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/transforms/SampleTransformChainin0000644000175000017500000001160611672356625032702 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.transforms; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.samples.DSNamespaceContext; import org.apache.xml.security.samples.SampleUtils; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * This class demonstrates the use of a Transform for XSLT. The * xsl:stylesheet is directly embedded in the ds:Transform, * so the {@link Transform} object is created by using the Element. * * @author Christian Geuer-Pollmann * @version %I%, %G% */ public class SampleTransformChaining { /** * Method main * * @param args * @throws Exception */ public static void main(String args[]) throws Exception { String inputStr = "" + "\n" + "" + "\n" + " " + "\n" + " PGNvbnRhaW5lcj4KICAgPGU+SGVsbG8sIDwhLS0gY29tbWVudCAtLT4gd29ybGQhPC9lPgogICA8" + "\n" + " T3JkZXIgTmFtZT0nVElOQU1JRk9STUVTJyB4bWxucz0naHR0cDovL3NmZGZnLyc+CiAgICAgIDxG" + "\n" + " YW1pbHkgTmFtZT0nVElOQU1JREFFJz4KICAgICAgICAgPFNwZWNpZXMgU2NpZW50aWZpY19OYW1l" + "\n" + " PSdDcnlwdHVyZWxsdXMgYm91Y2FyZGknPlNsYXR5LWJyZWFzdGVkIFRpbmFtb3UuPC9TcGVjaWVz" + "\n" + " PgogICAgICA8L0ZhbWlseT4KICAgPC9PcmRlcj4KICAgPE9yZGVyIE5hbWU9J1BPRElDSVBFRElG" + "\n" + " T1JNRVMnLz4KPC9jb250YWluZXI+Cg==" + "\n" + " " + "\n" + "" + "\n" + " " + "\n" + " " + "\n" + " " + "\n" + " \n" + " \n" + " \n" + " ancestor::BASE64" + " \n" + " \n" + " \n" + " \n" + " \n" + " not(self::container) " + " \n" + " \n" + " \n" + " " + "\n" + " " + "\n" + " " + "\n" + " " + "" + "\n" ; org.apache.xml.security.Init.init(); javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); org.w3c.dom.Document doc = db.parse(new java.io.ByteArrayInputStream(inputStr.getBytes())); XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); xpath.setNamespaceContext(new DSNamespaceContext()); String expression = "//ds:Transforms[1]"; Element transformsElement = (Element) xpath.evaluate(expression, doc, XPathConstants.NODE); Transforms transforms = new Transforms(transformsElement, "memory://"); XMLSignatureInput input = new XMLSignatureInput(doc); // execute Transforms XMLSignatureInput result = transforms.performTransforms(input); // output result System.out.println(new String(result.getBytes())); } } ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/transforms/SampleTransformXPathHereFunc.javalibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/transforms/SampleTransformXPathHe0000644000175000017500000001065711672356625032637 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.transforms; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.samples.DSNamespaceContext; import org.apache.xml.security.samples.SampleUtils; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; import org.w3c.dom.Node; /** * This class demonstrates the use of a Transform for XSLT. The * xsl:stylesheet is directly embedded in the ds:Transform, * so the {@link Transform} object is created by using the Element. * * @author Christian Geuer-Pollmann * @version %I%, %G% */ public class SampleTransformXPathHereFunc { /** * Method main * * @param args * @throws Exception */ public static void main(String args[]) throws Exception { String inputStr = "" + "\n" + "" + "\n" + " text in Data" + "\n" + "" + "\n" + " " + "\n" + " " + "\n" + " " + "\n" + " " + "\n" + " count(ancestor-or-self::ds:Signature | here()/ancestor::ds:Signature[1]) > count(ancestor-or-self::ds:Signature)" + "\n" + " " + "\n" + " " + "\n" + " " + "\n" + " " + "\n" + " " + "\n" + " " + "\n" + " " + "\n" + " " + "\n" + " " + "\n" + " " + "" ; org.apache.xml.security.Init.init(); javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); org.w3c.dom.Document doc = db.parse(new java.io.ByteArrayInputStream(inputStr.getBytes())); XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); xpath.setNamespaceContext(new DSNamespaceContext()); String expression = "/Document/ds:Signature[1]/ds:SignedInfo/ds:Reference[1]/ds:Transforms"; Element transformsElem = (Element) xpath.evaluate(expression, doc, XPathConstants.NODE); Transforms transforms = new Transforms(transformsElem, "memory://"); XMLSignatureInput input = new XMLSignatureInput((Node) doc); // input.setCanonicalizerURI(Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS); XMLSignatureInput result = transforms.performTransforms(input); System.out.println(new String(result.getBytes())); } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/transforms/SampleTransformXPath.javalibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/transforms/SampleTransformXPath.j0000644000175000017500000001034011672356625032577 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.transforms; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.transforms.Transforms; /** * This class demonstrates the use of a Transform for XSLT. The * xsl:stylesheet is directly embedded in the ds:Transform, * so the {@link Transform} object is created by using the Element. * * @author Christian Geuer-Pollmann * @version %I%, %G% */ public class SampleTransformXPath { /** * Method main * * @param args * @throws Exception */ public static void main(String args[]) throws Exception { String transformStr = "\n" + "\n" + "\n" // + " (self::match:Order | self::text()[string(parent::e)=\"Hello, world!\"])\n" // + " //@*\n" + " \n" // + " not(ancestor-or-self::ds:Signature)\n" + " self::text()[ancestor-or-self::node()=/Class/e[1]]\n" + "\n" + "\n" ; String inputStr = "" + "\n" + "" + "\n" + " Hello, world!" + "\n" + " " + "\n" + " " + "\n" + " Slaty-breasted Tinamou." + "\n" + " " + "\n" + " " + "\n" + " " + "\n" + "" + "\n" + " " + "\n" + " " + "\n" + " " + "\n" + " " + "\n" // + " " + "\n" + " " + "\n" + " " + "\n" + " " + "\n" + " " + "" + "\n" ; org.apache.xml.security.Init.init(); javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); org.w3c.dom.Document doc = db.parse(new java.io.ByteArrayInputStream(transformStr.getBytes())); String BaseURI = null; Transforms transforms = new Transforms(doc.getDocumentElement(), BaseURI); XMLSignatureInput input = new XMLSignatureInput(inputStr.getBytes()); // input.setCanonicalizerURI(Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS); XMLSignatureInput result = transforms.performTransforms(input); System.out.println(new String(result.getBytes())); } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/transforms/SampleTransformXPath2Filter.javalibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/transforms/SampleTransformXPath2F0000644000175000017500000001720211672356625032543 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.transforms; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.transforms.params.XPath2FilterContainer; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.JavaUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Sample for the XML Signature XPath Filter v2.0 * * @author $Author: coheigea $ * @see XPath Filter v2.0 (TR) * @see XPath Filter v2.0 (editors copy) */ public class SampleTransformXPath2Filter { /** * Method main * * @param args * @throws Exception */ public static void main(String args[]) throws Exception { org.apache.xml.security.Init.init(); boolean verbose = true; create("build/withComments.xml", true, verbose); System.out.println(); System.out.println(); System.out.println(); create("build/omitComments.xml", false, verbose); System.out.println(); System.out.println(); System.out.println(); check("build/withComments.xml"); } /** * Method create * * @param filename * @param withComments * @param verbose * @throws Exception */ public static void create( String filename, boolean withComments, boolean verbose ) throws Exception { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); DocumentBuilder db = dbf.newDocumentBuilder(); String inputDoc = "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + ""; Document doc = db.parse(new ByteArrayInputStream(inputDoc.getBytes())); XMLSignature sig = new XMLSignature(doc, null, XMLSignature.ALGO_ID_MAC_HMAC_SHA1); doc.getDocumentElement().appendChild(sig.getElement()); doc.getDocumentElement().appendChild(doc.createTextNode("\n")); Transforms transforms = new Transforms(doc); String filters[][] = {{XPath2FilterContainer.INTERSECT, "//ToBeSigned"}, {XPath2FilterContainer.SUBTRACT, "//NotToBeSigned"}, {XPath2FilterContainer.UNION, "//ReallyToBeSigned"}}; transforms.addTransform( Transforms.TRANSFORM_XPATH2FILTER, XPath2FilterContainer.newInstances(doc, filters) ); if (withComments) { transforms.addTransform(Transforms.TRANSFORM_C14N_WITH_COMMENTS); } sig.addDocument("#xpointer(/)", transforms); String secretKey = "secret"; sig.getKeyInfo().addKeyName("The UTF-8 octets of \"" + secretKey + "\" are used for signing (" + secretKey.length() + " octets)"); sig.sign(sig.createSecretKey(secretKey.getBytes())); Canonicalizer c14n = Canonicalizer.getInstance(Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS); byte[] full = c14n.canonicalizeSubtree(doc); FileOutputStream fos = new FileOutputStream(filename); try { fos.write(full); } finally { fos.close(); } if (verbose) { System.out.println( "-------------------------------------------------------------"); System.out.println("Input to the transforms is"); System.out.println( "-------------------------------------------------------------"); System.out.println( new String(sig.getSignedInfo().item(0).getContentsBeforeTransformation().getBytes()) ); System.out.println( "-------------------------------------------------------------"); System.out.println("The signed octets (output of the transforms) are "); System.out.println( "-------------------------------------------------------------"); System.out.println( new String(sig.getSignedInfo().item(0).getTransformsOutput().getBytes()) ); System.out.println( "-------------------------------------------------------------"); System.out.println("The document is "); System.out.println( "-------------------------------------------------------------"); System.out.println(new String(full)); System.out.println( "-------------------------------------------------------------"); } JavaUtils.writeBytesToFilename( "build/xfilter2.html", sig.getSignedInfo().item(0).getHTMLRepresentation().getBytes() ); } /** * Method check * * @param filename * @throws Exception */ public static void check(String filename) throws Exception { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.parse(new FileInputStream(filename)); NodeList sigs = doc.getElementsByTagNameNS(Constants.SignatureSpecNS, Constants._TAG_SIGNATURE); XMLSignature sig = new XMLSignature((Element)sigs.item(0), new File(filename).toURI().toURL().toString()); boolean check = sig.checkSignatureValue(sig.createSecretKey("secret".getBytes())); System.out.println( "-------------------------------------------------------------"); System.out.println("Verification of " + filename + ": " + check); System.out.println( "-------------------------------------------------------------"); System.out.println(new String(sig.getSignedInfo().item(0).getTransformsOutput().getBytes())); System.out.println( "-------------------------------------------------------------"); } } libxml-security-java-1.5.6/samples/org/apache/xml/security/samples/SampleUtils.java0000644000175000017500000000310411551074155027240 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples; import org.apache.xml.security.utils.Constants; import org.w3c.dom.Document; import org.w3c.dom.Element; public class SampleUtils { /** * Method createDSctx * * @param doc * @param prefix * @param namespace * @return the element. */ public static Element createDSctx (Document doc, String prefix, String namespace) { if ((prefix == null) || (prefix.trim().length() == 0)) { throw new IllegalArgumentException("You must supply a prefix"); } Element ctx = doc.createElementNS(null, "namespaceContext"); ctx.setAttributeNS (Constants.NamespaceSpecNS, "xmlns:" + prefix.trim(), namespace); return ctx; } } libxml-security-java-1.5.6/samples/org/apache/xml/security/samples/AxisVerifier.java0000644000175000017500000000654711704017634027413 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples; import java.io.File; import java.io.FileInputStream; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.utils.Constants; import org.w3c.dom.Element; /** * @author $Author: coheigea $ */ public class AxisVerifier { /** * Method main * * @param unused * @throws Exception */ public static void main(String unused[]) throws Exception { org.apache.xml.security.Init.init(); File signatureFile = new File(AxisSigner.AXIS_SIGNATURE_FILENAME); javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); org.w3c.dom.Document doc = db.parse(new FileInputStream(signatureFile)); String BaseURI = signatureFile.toURI().toURL().toString(); XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); DSNamespaceContext context = new DSNamespaceContext(); xpath.setNamespaceContext(context); String expression = "//ds:Signature[1]"; Element sigElement = (Element) xpath.evaluate(expression, doc, XPathConstants.NODE); expression = "//env:Body[1]"; context.putPrefix("env", "http://www.w3.org/2001/12/soap-envelope"); Element bodyElement = (Element) xpath.evaluate(expression, doc, XPathConstants.NODE); bodyElement.setIdAttributeNS("http://schemas.xmlsoap.org/soap/security/2000-12", "id", true); XMLSignature sig = new XMLSignature(sigElement, BaseURI); boolean verify = sig.checkSignatureValue(sig.getKeyInfo().getPublicKey()); System.out.println("The signature is" + (verify ? " " : " not ") + "valid"); for (int i = 0; i < sig.getSignedInfo().getSignedContentLength(); i++) { boolean thisOneWasSigned = sig.getSignedInfo().getVerificationResult(i); if (thisOneWasSigned) { System.out.println("--- Signed Content follows ---"); System.out.println(new String(sig.getSignedInfo().getSignedContentItem(i))); } } System.out.println(""); System.out.println("Prior transforms"); System.out.println( new String(sig.getSignedInfo().getReferencedContentBeforeTransformsItem(0).getBytes()) ); } } libxml-security-java-1.5.6/samples/org/apache/xml/security/samples/canonicalization/0000755000175000017500000000000012273503736027466 5ustar tonytonylibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/canonicalization/CanonDirect.java0000644000175000017500000000617411551074155032526 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.canonicalization; import java.io.ByteArrayInputStream; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.apache.xml.security.c14n.Canonicalizer; import org.w3c.dom.Document; /** * * * @author Christian Geuer-Pollmann */ public class CanonDirect { static String input = "" + "]>\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ©\n" + " \n" + " \n" + " \n" + "\n" ; /** * Method main * * @param args * @throws Exception */ public static void main(String args[]) throws Exception { org.apache.xml.security.Init.init(); DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance(); dfactory.setNamespaceAware(true); dfactory.setValidating(true); DocumentBuilder documentBuilder = dfactory.newDocumentBuilder(); // this is to throw away all validation warnings documentBuilder.setErrorHandler(new org.apache.xml.security.utils.IgnoreAllErrorHandler()); byte inputBytes[] = input.getBytes(); Document doc = documentBuilder.parse(new ByteArrayInputStream(inputBytes)); // after playing around, we have our document now Canonicalizer c14n = Canonicalizer.getInstance( "http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"); byte outputBytes[] = c14n.canonicalizeSubtree(doc); System.out.println(new String(outputBytes)); } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/canonicalization/CanonSubTree.javalibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/canonicalization/CanonSubTree.jav0000644000175000017500000000764611551074155032531 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.canonicalization; import java.io.ByteArrayInputStream; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.samples.DSNamespaceContext; import org.apache.xml.security.samples.SampleUtils; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; /** * * @author Christian Geuer-Pollmann */ public class CanonSubTree { static String input = "" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " 60NvZvtdTB+7UnlLp/H24p7h4bs=\n" + " \n" + " \n" + " \n" + " fKMmy9GYF2s8rLFrZdVugTOFuWx19ccX7jh5HqFd4vMOY7LWAj52ykjSdvtW3fNY\n" + " PPYGC4MFL19oPSId5GEsMtFMpGXB3XaCtoKjMCHQsN3+kom8YnGf7Ge1JNRcGty5\n" + " 0UsoP6Asj47+QR7QECT64uoziha4WRDVyXjDrg24W+U=\n" + " \n" + " \n" + " Lugh\n" + " \n" + "\n" ; /** * Method main * * @param args * @throws Exception */ public static void main(String args[]) throws Exception { org.apache.xml.security.Init.init(); DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance(); dfactory.setNamespaceAware(true); dfactory.setValidating(true); DocumentBuilder documentBuilder = dfactory.newDocumentBuilder(); // this is to throw away all validation warnings documentBuilder.setErrorHandler(new org.apache.xml.security.utils.IgnoreAllErrorHandler()); byte inputBytes[] = input.getBytes(); Document doc = documentBuilder.parse(new ByteArrayInputStream(inputBytes)); Canonicalizer c14n = Canonicalizer .getInstance("http://www.w3.org/TR/2001/REC-xml-c14n-20010315"); XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); xpath.setNamespaceContext(new DSNamespaceContext()); String expression = "//ds:SignedInfo[1]"; Element signedInfo = (Element) xpath.evaluate(expression, doc, XPathConstants.NODE); byte outputBytes[] = c14n.canonicalizeSubtree(signedInfo); if (outputBytes != null) { System.out.println(new String(outputBytes)); } } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootlibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/canonicalization/CanonByTransform.javalibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/canonicalization/CanonByTransform0000644000175000017500000000704011551074155032633 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.canonicalization; import java.io.ByteArrayInputStream; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.transforms.Transforms; import org.w3c.dom.Document; import org.w3c.dom.Node; /** * @author Christian Geuer-Pollmann */ public class CanonByTransform { static String input = "" + "]>\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ©\n" + " \n" + " \n" + " \n" + "\n" ; /** * Method main * * @param args * @throws Exception */ public static void main(String args[]) throws Exception { org.apache.xml.security.Init.init(); DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance(); dfactory.setNamespaceAware(true); dfactory.setValidating(true); DocumentBuilder documentBuilder = dfactory.newDocumentBuilder(); // this is to throw away all validation warnings documentBuilder.setErrorHandler(new org.apache.xml.security.utils.IgnoreAllErrorHandler()); byte inputBytes[] = input.getBytes(); Document inputDoc = documentBuilder.parse(new ByteArrayInputStream(inputBytes)); // after playing around, we have our document now XMLSignatureInput signatureInput = new XMLSignatureInput((Node) inputDoc); Document transformDoc = documentBuilder.newDocument(); Transforms c14nTrans = new Transforms(transformDoc); transformDoc.appendChild(c14nTrans.getElement()); c14nTrans.addTransform("http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"); XMLSignatureInput c14nResult = c14nTrans.performTransforms(signatureInput); byte outputBytes[] = c14nResult.getBytes(); System.out.println(new String(outputBytes)); } } libxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/0000755000175000017500000000000012273503736026142 5ustar tonytony././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/VerifyMerlinsExamplesFifteen.javalibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/VerifyMerlinsExamplesFi0000644000175000017500000001467411561005360032642 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.signature; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.samples.DSNamespaceContext; import org.apache.xml.security.samples.SampleUtils; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * * @author $Author: mullan $ */ public class VerifyMerlinsExamplesFifteen { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(VerifyMerlinsExamplesFifteen.class.getName()); /** Field schemaValidate */ static final boolean schemaValidate = false; /** Field signatureSchemaFile */ static final String signatureSchemaFile = "samples/data/xmldsig-core-schema.xsd"; static { org.apache.xml.security.Init.init(); } /** * Method main * * @param unused */ public static void main(String unused[]) { if (schemaValidate) { System.out.println("We do schema-validation"); } else { System.out.println("We do not schema-validation"); } javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); if (VerifyMerlinsExamplesSixteen.schemaValidate) { dbf.setAttribute("http://apache.org/xml/features/validation/schema", Boolean.TRUE); dbf.setAttribute("http://apache.org/xml/features/dom/defer-node-expansion", Boolean.TRUE); dbf.setValidating(true); dbf.setAttribute("http://xml.org/sax/features/validation", Boolean.TRUE); dbf.setAttribute("http://apache.org/xml/properties/schema/external-schemaLocation", Constants.SignatureSpecNS + " " + VerifyMerlinsExamplesSixteen.signatureSchemaFile); } dbf.setNamespaceAware(true); dbf.setAttribute("http://xml.org/sax/features/namespaces", Boolean.TRUE); String merlinsDir = "samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/"; String filenames[] = { merlinsDir + "signature-enveloping-hmac-sha1.xml", merlinsDir + "signature-enveloped-dsa.xml", merlinsDir + "signature-enveloping-b64-dsa.xml", merlinsDir + "signature-enveloping-dsa.xml", merlinsDir + "signature-enveloping-rsa.xml", merlinsDir + "signature-external-b64-dsa.xml", merlinsDir + "signature-external-dsa.xml" }; try { verifyHMAC(dbf, filenames[0]); } catch (Exception ex) { ex.printStackTrace(); } for (int i = 1; i < filenames.length; i++) { String signatureFileName = filenames[i]; try { VerifyMerlinsExamplesSixteen.verify(dbf, signatureFileName); } catch (Exception ex) { ex.printStackTrace(); } } } /** * Method verify * * @param dbf * @param filename * @throws Exception */ public static void verifyHMAC(DocumentBuilderFactory dbf, String filename) throws Exception { File f = new File(filename); System.out.println("Try to verify " + f.toURI().toURL().toString()); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); if (VerifyMerlinsExamplesSixteen.schemaValidate) { db.setErrorHandler(new org.apache.xml.security.utils .IgnoreAllErrorHandler()); db.setEntityResolver(new org.xml.sax.EntityResolver() { public org.xml.sax.InputSource resolveEntity(String publicId, String systemId) throws org.xml.sax.SAXException { if (systemId.endsWith("xmldsig-core-schema.xsd")) { try { return new org.xml.sax.InputSource(new FileInputStream(signatureSchemaFile)); } catch (FileNotFoundException ex) { throw new org.xml.sax.SAXException(ex); } } else { return null; } } }); } org.w3c.dom.Document doc = db.parse(new java.io.FileInputStream(f)); XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); xpath.setNamespaceContext(new DSNamespaceContext()); String expression = "//ds:Signature[1]"; Element sigElement = (Element) xpath.evaluate(expression, doc, XPathConstants.NODE); XMLSignature signature = new XMLSignature(sigElement, f.toURI().toURL().toString()); // signature.addResourceResolver(new OfflineResolver()); byte keybytes[] = "secret".getBytes("ASCII"); javax.crypto.SecretKey sk = signature.createSecretKey(keybytes); System.out.println("The XML signature in file " + f.toURI().toURL().toString() + " is " + (signature.checkSignatureValue(sk) ? "valid (good)" : "invalid !!!!! (bad)")); } } ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootlibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/CreateMerlinsExampleTwentyThree.javalibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/CreateMerlinsExampleTwe0000644000175000017500000004335711704017634032625 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.signature; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.security.KeyStore; import java.security.PrivateKey; import java.security.cert.X509Certificate; import org.apache.xml.security.keys.content.RetrievalMethod; import org.apache.xml.security.keys.content.X509Data; import org.apache.xml.security.keys.content.x509.XMLX509Certificate; import org.apache.xml.security.keys.content.x509.XMLX509IssuerSerial; import org.apache.xml.security.keys.content.x509.XMLX509SubjectName; import org.apache.xml.security.samples.utils.resolver.OfflineResolver; import org.apache.xml.security.signature.Manifest; import org.apache.xml.security.signature.ObjectContainer; import org.apache.xml.security.signature.Reference; import org.apache.xml.security.signature.SignatureProperties; import org.apache.xml.security.signature.SignatureProperty; import org.apache.xml.security.signature.SignedInfo; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.transforms.params.XPathContainer; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.ElementProxy; import org.apache.xml.security.utils.JavaUtils; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; /** * * @author $Author: coheigea $ */ public class CreateMerlinsExampleTwentyThree { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(CreateMerlinsExampleTwentyThree.class.getName()); static { org.apache.xml.security.Init.init(); } /** * Method main * * @param unused * @throws Exception */ public static void main(String unused[]) throws Exception { ElementProxy.setDefaultPrefix(Constants.SignatureSpecNS, "ds"); String keystoreType = "JKS"; String keystoreFile = "samples/data/keystore.jks"; String keystorePass = "xmlsecurity"; String privateKeyAlias = "test"; String privateKeyPass = "xmlsecurity"; String certificateAlias = "test"; File signatureFile = new File("build/merlinsTwentyThreeRecreatedNoRetrievalMethod.xml"); KeyStore ks = KeyStore.getInstance(keystoreType); FileInputStream fis = new FileInputStream(keystoreFile); ks.load(fis, keystorePass.toCharArray()); PrivateKey privateKey = (PrivateKey) ks.getKey(privateKeyAlias, privateKeyPass.toCharArray()); if (privateKey == null) { throw new RuntimeException("Private key is null"); } X509Certificate cert = (X509Certificate) ks.getCertificate(certificateAlias); javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); org.w3c.dom.Document doc = db.newDocument(); ////////////////////////////////////////////////// Element envelope = doc.createElementNS("http://www.usps.gov/", "Envelope"); envelope.setAttributeNS(Constants.NamespaceSpecNS, "xmlns", "http://www.usps.gov/"); envelope.setAttributeNS(Constants.NamespaceSpecNS, "xmlns:foo", "http://www.usps.gov/foo"); envelope.appendChild(doc.createTextNode("\n")); doc.appendChild(doc.createComment(" Preamble ")); doc.appendChild(envelope); doc.appendChild(doc.createComment(" Postamble ")); Element dearSir = doc.createElementNS("http://www.usps.gov/", "DearSir"); dearSir.appendChild(doc.createTextNode("foo")); envelope.appendChild(dearSir); envelope.appendChild(doc.createTextNode("\n")); Element body = doc.createElementNS("http://www.usps.gov/", "Body"); body.appendChild(doc.createTextNode("bar")); envelope.appendChild(body); envelope.appendChild(doc.createTextNode("\n")); Element YoursSincerely = doc.createElementNS("http://www.usps.gov/", "YoursSincerely"); YoursSincerely.appendChild(doc.createTextNode("\n")); envelope.appendChild(YoursSincerely); Element PostScript = doc.createElementNS("http://www.usps.gov/", "PostScript"); PostScript.appendChild(doc.createTextNode("bar")); envelope.appendChild(PostScript); Element Notaries = doc.createElementNS(null, "Notaries"); Notaries.setAttributeNS(Constants.NamespaceSpecNS, "xmlns", ""); Notaries.setAttributeNS(null, "Id", "notaries"); Notaries.setIdAttributeNS(null, "Id", true); { Element Notary = doc.createElementNS(null, "Notary"); Notary.setAttributeNS(null, "name", "Great, A. T."); Notaries.appendChild(Notary); } { Element Notary = doc.createElementNS(null, "Notary"); Notary.setAttributeNS(null, "name", "Hun, A. T."); Notaries.appendChild(Notary); } envelope.appendChild(Notaries); envelope.appendChild(doc.createComment(" Commentary ")); ////////////////////////////////////////////////// String BaseURI = signatureFile.toURI().toURL().toString(); XMLSignature sig = new XMLSignature(doc, BaseURI, XMLSignature.ALGO_ID_SIGNATURE_DSA); YoursSincerely.appendChild(sig.getElement()); sig.setId("signature"); /* * Add the Objects */ // object-1 { ObjectContainer object1 = new ObjectContainer(doc); object1.setId("object-1"); object1.setMimeType("text/plain"); object1.appendChild(doc.createTextNode("I am the text.")); sig.appendObject(object1); } // object-2 { ObjectContainer object2 = new ObjectContainer(doc); object2.setId("object-2"); object2.setMimeType("text/plain"); object2.setEncoding("http://www.w3.org/2000/09/xmldsig#base64"); object2.appendChild(doc.createTextNode("SSBhbSB0aGUgdGV4dC4=")); sig.appendObject(object2); } // object-3 { ObjectContainer object = new ObjectContainer(doc); object.setId("object-3"); Element nonc = doc.createElementNS(null, "NonCommentandus"); nonc.setAttributeNS(Constants.NamespaceSpecNS, "xmlns", ""); nonc.appendChild(doc.createComment(" Commentandum ")); object.appendChild(doc.createTextNode("\n ")); object.appendChild(nonc); object.appendChild(doc.createTextNode("\n ")); sig.appendObject(object); } // object number 4 { ObjectContainer object = new ObjectContainer(doc); object.appendChild(createObject4(sig)); sig.appendObject(object); } // object number 4 { ObjectContainer object = new ObjectContainer(doc); SignatureProperties sps = new SignatureProperties(doc); sps.setId("signature-properties-1"); SignatureProperty sp = new SignatureProperty(doc, "#signature"); Element signedAdress = doc.createElementNS("urn:demo", "SignedAddress"); signedAdress.setAttributeNS(Constants.NamespaceSpecNS, "xmlns", "urn:demo"); Element IP = doc.createElementNS("urn:demo", "IP"); IP.appendChild(doc.createTextNode("192.168.21.138")); signedAdress.appendChild(IP); sp.appendChild(signedAdress); sps.addSignatureProperty(sp); object.appendChild(sps.getElement()); sig.appendObject(object); } { ObjectContainer object = new ObjectContainer(doc); object.setId("object-4"); X509Data x509data = new X509Data(doc); x509data.add(new XMLX509SubjectName(doc, cert)); x509data.add(new XMLX509IssuerSerial(doc, cert)); x509data.add(new XMLX509Certificate(doc, cert)); object.appendChild(x509data.getElement()); sig.appendObject(object); } /* * Add References */ sig.getSignedInfo().addResourceResolver( new org.apache.xml.security.samples.utils.resolver.OfflineResolver()); sig.addDocument("http://www.w3.org/TR/xml-stylesheet"); { Transforms transforms = new Transforms(doc); transforms.addTransform(Transforms.TRANSFORM_BASE64_DECODE); sig.addDocument("http://xmldsig.pothole.com/xml-stylesheet.txt", transforms, Constants.ALGO_ID_DIGEST_SHA1); } { Transforms transforms = new Transforms(doc); XPathContainer xpathC = new XPathContainer(doc); xpathC.setXPath("self::text()"); transforms.addTransform(Transforms.TRANSFORM_XPATH, xpathC.getElementPlusReturns()); sig.addDocument("#object-1", transforms, Constants.ALGO_ID_DIGEST_SHA1, null, "http://www.w3.org/2000/09/xmldsig#Object"); } { Transforms transforms = new Transforms(doc); transforms.addTransform(Transforms.TRANSFORM_BASE64_DECODE); sig.addDocument("#object-2", transforms, Constants.ALGO_ID_DIGEST_SHA1, null, "http://www.w3.org/2000/09/xmldsig#Object"); } sig.addDocument("#manifest-1", null, Constants.ALGO_ID_DIGEST_SHA1, null, "http://www.w3.org/2000/09/xmldsig#Manifest"); sig.addDocument("#signature-properties-1", null, Constants.ALGO_ID_DIGEST_SHA1, null, "http://www.w3.org/2000/09/xmldsig#SignatureProperties"); { Transforms transforms = new Transforms(doc); transforms.addTransform(Transforms.TRANSFORM_ENVELOPED_SIGNATURE); sig.addDocument("", transforms, Constants.ALGO_ID_DIGEST_SHA1); } { Transforms transforms = new Transforms(doc); transforms.addTransform(Transforms.TRANSFORM_ENVELOPED_SIGNATURE); transforms.addTransform(Transforms.TRANSFORM_C14N_WITH_COMMENTS); sig.addDocument("", transforms, Constants.ALGO_ID_DIGEST_SHA1); } { Transforms transforms = new Transforms(doc); transforms.addTransform(Transforms.TRANSFORM_ENVELOPED_SIGNATURE); sig.addDocument("#xpointer(/)", transforms, Constants.ALGO_ID_DIGEST_SHA1); } { Transforms transforms = new Transforms(doc); transforms.addTransform(Transforms.TRANSFORM_ENVELOPED_SIGNATURE); transforms.addTransform(Transforms.TRANSFORM_C14N_WITH_COMMENTS); sig.addDocument("#xpointer(/)", transforms, Constants.ALGO_ID_DIGEST_SHA1); } { sig.addDocument("#object-3", null, Constants.ALGO_ID_DIGEST_SHA1, null, "http://www.w3.org/2000/09/xmldsig#Object"); } { Transforms transforms = new Transforms(doc); transforms.addTransform(Transforms.TRANSFORM_C14N_WITH_COMMENTS); sig.addDocument("#object-3", transforms, Constants.ALGO_ID_DIGEST_SHA1, null, "http://www.w3.org/2000/09/xmldsig#Object"); } { sig.addDocument("#xpointer(id('object-3'))", null, Constants.ALGO_ID_DIGEST_SHA1, null, "http://www.w3.org/2000/09/xmldsig#Object"); } { Transforms transforms = new Transforms(doc); transforms.addTransform(Transforms.TRANSFORM_C14N_WITH_COMMENTS); sig.addDocument("#xpointer(id('object-3'))", transforms, Constants.ALGO_ID_DIGEST_SHA1, null, "http://www.w3.org/2000/09/xmldsig#Object"); } { sig.addDocument("#manifest-reference-1", null, Constants.ALGO_ID_DIGEST_SHA1, "reference-1", "http://www.w3.org/2000/09/xmldsig#Reference"); } { sig.addDocument("#reference-1", null, Constants.ALGO_ID_DIGEST_SHA1, "reference-2", "http://www.w3.org/2000/09/xmldsig#Reference"); } { sig.addDocument("#reference-2", null, Constants.ALGO_ID_DIGEST_SHA1, null, "http://www.w3.org/2000/09/xmldsig#Reference"); } /* * Add KeyInfo and sign() */ { Transforms retrievalTransforms = new Transforms(doc); XPathContainer xpathC = new XPathContainer(doc); xpathC.setXPathNamespaceContext("ds", Constants.SignatureSpecNS); xpathC.setXPath("ancestor-or-self::ds:X509Data"); retrievalTransforms.addTransform(Transforms.TRANSFORM_XPATH, xpathC.getElement()); sig.getKeyInfo().add( new RetrievalMethod( doc, "#object-4", retrievalTransforms, "http://www.w3.org/2000/09/xmldsig#X509Data")); System.out.println("Start signing"); sig.sign(privateKey); System.out.println("Finished signing"); } FileOutputStream f = new FileOutputStream(signatureFile); XMLUtils.outputDOMc14nWithComments(doc, f); f.close(); System.out.println("Wrote signature to " + BaseURI); SignedInfo s = sig.getSignedInfo(); for (int i = 0; i < s.getLength(); i++) { Reference r = s.item(i); String fn = "build/merlin16_"+i+".html"; System.out.println("Wrote Reference " + i + " to file " + fn); JavaUtils.writeBytesToFilename(fn, r.getHTMLRepresentation().getBytes()); } } /** * Method createObject4 * * @param sig * * @throws Exception */ public static Element createObject4(XMLSignature sig) throws Exception { Document doc = sig.getElement().getOwnerDocument(); String BaseURI = sig.getBaseURI(); Manifest manifest = new Manifest(doc); manifest.addResourceResolver(new OfflineResolver()); manifest.setId("manifest-1"); manifest.addDocument(BaseURI, "http://www.w3.org/TR/xml-stylesheet", null, Constants.ALGO_ID_DIGEST_SHA1, "manifest-reference-1", null); manifest.addDocument(BaseURI, "#reference-1", null, Constants.ALGO_ID_DIGEST_SHA1, null, "http://www.w3.org/2000/09/xmldsig#Reference"); String xslt = "" + "\n" + " \n" + " \n" + " \n" + " \n" + " Notaries\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "
\n" + " \n" + "
\n" + " \n" + " \n" + "
\n" + "
\n" ; javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); org.w3c.dom.Document docxslt = db.parse(new ByteArrayInputStream(xslt.getBytes())); Node xslElem = docxslt.getDocumentElement(); Node xslElemImported = doc.importNode(xslElem, true); Transforms transforms = new Transforms(doc); transforms.addTransform(Transforms.TRANSFORM_XSLT, (Element) xslElemImported); manifest.addDocument(BaseURI, "#notaries", transforms, Constants.ALGO_ID_DIGEST_SHA1, null, null); return manifest.getElement(); } } libxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/TestSignature.java0000644000175000017500000001420311551074155031602 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.signature; import java.io.File; import java.security.PublicKey; import java.security.cert.X509Certificate; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.keys.storage.StorageResolver; import org.apache.xml.security.samples.utils.resolver.OfflineResolver; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.samples.DSNamespaceContext; import org.apache.xml.security.samples.SampleUtils; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * Class TestSignature * * @author $Author: coheigea $ */ public class TestSignature { /** * Method main * * @param unused */ public static void main(String unused[]) { javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); String merlinsDir = "samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/"; String ourDir = "samples/data/org/apache/xml/security/temp/key/"; String filenames[] = { merlinsDir + /* 0 */ "signature-keyname.xml", merlinsDir + /* 1 */ "signature-retrievalmethod-rawx509crt.xml", merlinsDir + /* 2 */ "signature-x509-crt-crl.xml", merlinsDir + /* 3 */ "signature-x509-crt.xml", merlinsDir + /* 4 */ "signature-x509-is.xml", merlinsDir + /* 5 */ "signature-x509-ski.xml", merlinsDir + /* 6 */ "signature-x509-sn.xml", ourDir + /* 7 */ "signature-retrievalmethod-x509data.xml" }; int start = 0; int end = filenames.length; // int end = filenames.length; for (int file_to_verify = start; file_to_verify < end; file_to_verify++) { try { String filename = filenames[file_to_verify]; File f = new File(filename); System.out.println(""); System.out.println("#########################################################"); System.out.println("Try to verify " + f.toURL().toString()); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); org.w3c.dom.Document doc = db.parse(new java.io.FileInputStream(filename)); XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); xpath.setNamespaceContext(new DSNamespaceContext()); String expression = "//ds:Signature[1]"; Element sigElement = (Element) xpath.evaluate(expression, doc, XPathConstants.NODE); //Creates a XMLSignature from the element and uses the filename as //the baseURI. That URI is prepended to all relative URIs. XMLSignature signature = new XMLSignature(sigElement, (new File(filename)).toURI().toURL().toString()); signature.addResourceResolver(new OfflineResolver()); //Get the KeyInfo object, which might contain some clues as to what //key was used to create the signature. It might also contain the //full cert. KeyInfo ki = signature.getKeyInfo(); ki.addStorageResolver( new StorageResolver( new org.apache.xml.security.keys.storage.implementations .CertsInFilesystemDirectoryResolver(merlinsDir + "certs"))); if (ki != null) { //First try to see if it is an X509Cert X509Certificate cert = signature.getKeyInfo().getX509Certificate(); if (cert != null) { //check if the signature is valid using the cert System.out.println("Check: " + signature.checkSignatureValue(cert)); } else { //Maybe it's a public key PublicKey pk = signature.getKeyInfo().getPublicKey(); if (pk != null) { //check if the signature is valid using the public key System.out.println("Check: " + signature.checkSignatureValue(pk)); } else { //No X509Cert or PublicKey could be found. System.out.println("Could not find Certificate or PublicKey"); } } } else { //If the signature did not contain any KeyInfo element System.out.println("Could not find ds:KeyInfo"); } } catch (Exception ex) { ex.printStackTrace(); } } } } ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/SignaturePropertiesSample.javalibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/SignaturePropertiesSamp0000644000175000017500000000644511551074155032731 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.signature; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.signature.ObjectContainer; import org.apache.xml.security.signature.SignatureProperties; import org.apache.xml.security.signature.SignatureProperty; import org.apache.xml.security.signature.XMLSignature; import org.w3c.dom.Document; /** * Class SignaturePropertiesSample * * @author $Author: coheigea $ */ public class SignaturePropertiesSample { /** * Method main * * @param args * @throws Exception */ public static void main(String args[]) throws Exception { org.apache.xml.security.Init.init(); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.newDocument(); XMLSignature sig = new XMLSignature(doc, null, XMLSignature.ALGO_ID_MAC_HMAC_SHA1); doc.appendChild(sig.getElement()); SignatureProperty prop1 = new SignatureProperty(doc, "http://www.xmlsecurity.org/#target", "prop1"); prop1.getElement().appendChild(doc.createTextNode("\n some data for this property\n")); SignatureProperties props = new SignatureProperties(doc); props.addSignatureProperty(prop1); ObjectContainer object = new ObjectContainer(doc); object.appendChild(doc.createTextNode("\n")); object.appendChild(props.getElement()); object.appendChild(doc.createTextNode("\n")); sig.appendObject(object); sig.addDocument("#prop1"); String secretKey = "secret"; sig.getKeyInfo().addKeyName("The UTF-8 octets of \"" + secretKey + "\" are used for signing (" + secretKey.length() + " octets)"); sig.sign(sig.createSecretKey(secretKey.getBytes())); Canonicalizer c14n = Canonicalizer.getInstance(Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS); System.out.println("---------------------------------------"); System.out.println(new String(c14n.canonicalizeSubtree(doc))); System.out.println("---------------------------------------"); System.out.println(new String(sig.getSignedInfo().item(0).getTransformsOutput().getBytes())); System.out.println("---------------------------------------"); } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/VerifyCollectableSignature.javalibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/VerifyCollectableSignat0000644000175000017500000001020411672356625032633 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.signature; import java.io.File; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.signature.SignedInfo; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.samples.DSNamespaceContext; import org.apache.xml.security.samples.SampleUtils; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * * @author $Author: coheigea $ */ public class VerifyCollectableSignature { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(VerifyCollectableSignature.class.getName()); static { org.apache.xml.security.Init.init(); } /** * Method main * * @param unused * @throws Exception */ public static void main(String unused[]) throws Exception { javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); dbf.setAttribute("http://xml.org/sax/features/namespaces", Boolean.TRUE); try { File signatureFile = new File("build/collectableSignature.xml"); String BaseURI = signatureFile.toURI().toURL().toString(); System.out.println("Try to verify " + signatureFile.toURI().toURL().toString()); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); db.setErrorHandler(new org.apache.xml.security.utils.IgnoreAllErrorHandler()); org.w3c.dom.Document doc = db.parse(new java.io.FileInputStream(signatureFile)); XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); xpath.setNamespaceContext(new DSNamespaceContext()); String expression = "//ds:Signature[1]"; NodeList signatureElems = (NodeList) xpath.evaluate(expression, doc, XPathConstants.NODESET); for (int i = 0; i < signatureElems.getLength(); i++) { Element sigElement = (Element) signatureElems.item(i); XMLSignature signature = new XMLSignature(sigElement, BaseURI); byte[] secretKey = "secretValue".getBytes(); System.out.println( "The XML signature number " + i + " in file " + BaseURI + " is " + (signature.checkSignatureValue( signature.createSecretKey( CreateCollectableSignature.passphrase.getBytes() ) ) ? "valid (good)" : "invalid !!!!! (bad)")); SignedInfo s = signature.getSignedInfo(); for (int j = 0; j < s.getSignedContentLength(); j++) { System.out.println("################ Signed Resource " + i + "/" + j + " ################"); System.out.println(new String(s.getSignedContentItem(j))); System.out.println(); } } } catch (Exception ex) { ex.printStackTrace(); } } } libxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/contract/0000755000175000017500000000000012273503736027757 5ustar tonytony././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/contract/ThreeSignerContractSign.javalibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/contract/ThreeSignerCon0000644000175000017500000003222711672356625032574 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.signature.contract; import java.io.File; import java.io.FileOutputStream; import org.apache.xml.security.keys.content.KeyName; import org.apache.xml.security.signature.SignedInfo; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.transforms.params.XPathContainer; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * In the past the protokol to sign data (like a contract) from more than one people * looks like this: * 1. A signs the hash of the data => SignatureA * 2. B signs SignatureA => SignatureB * 3. C signs SignatureB => SignatureC * * To verify e.g. signature C the following steps were necessary: * 1. Verify signature C thereby decrypt SignatureC (SignatureB) * 2. Verify signature B thereby decrypt SignatureB (SignatureA) * 3. Verify signature A thereby decrypt SignatureA (hash of the data) * 4. Compare the calculated hash of the sent contract with the decrypted SignatureA result * * XML-Signatures are more flexible in this way. * It is possible to sign data in steps from different signers and * verify a signature independent from the others signatures. * Furthermore all the signed data and the signatures can be hold in one file. * * @author Rene Kollmorgen */ public class ThreeSignerContractSign { static { org.apache.xml.security.Init.init(); // org.apache.xml.security.utils.Constants.setSignatureSpecNSprefix(""); } /** * Method main * * @param unused * @throws Exception */ public static void main(String unused[]) throws Exception { File signatureFile = new File("build/threeSignerContract.xml"); String BaseURI = signatureFile.toURI().toURL().toString(); javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); org.w3c.dom.Document doc = db.newDocument(); Element contract = doc.createElementNS(null, "contract"); // create contract //////////////////////////////////////////// doc.appendChild(contract); // beautifying ////// Element condition1 = doc.createElementNS(null, "condition1"); condition1.setAttributeNS(null, "Id", "cond1"); condition1.appendChild( doc.createTextNode( "condition1 not covered in first signature, only " + "binding for the second and third signer")); Element condition2 = doc.createElementNS(null, "condition2"); condition2.appendChild(doc.createTextNode("condition2")); Element condition3 = doc.createElementNS(null, "condition3"); condition3.appendChild(doc.createTextNode("condition3")); contract.appendChild(doc.createTextNode("\n")); contract.appendChild(condition1); contract.appendChild(doc.createTextNode("\n")); contract.appendChild(condition2); contract.appendChild(doc.createTextNode("\n")); contract.appendChild(condition3); contract.appendChild(doc.createTextNode("\n")); String id1 = "firstSigner"; String id2 = "secondSigner"; String id3 = "thirdSigner"; // sign the whole contract and no signature and exclude condition1 String xp1Old = "not(ancestor-or-self::ds:Signature)" + " and not(ancestor-or-self::node()[@Id='cond1'])"; // sign the contract with condition2 and codition3 and no signature String xp1 = "not(ancestor-or-self::ds:Signature)" + "\n" + " and (" + "\n" + " (ancestor-or-self::node() = /contract/condition2) " + "\n" + " or (ancestor-or-self::node() = /contract/condition3) " + "\n" + " or (self::node() = /contract) " + "\n" + " or ((parent::node() = /contract) and (self::text()))" + "\n" + ")"; // sign the whole contract and no signature but the first String xp2 = "not(ancestor-or-self::ds:Signature)" + "\n" + " or ancestor-or-self::ds:Signature[@Id='" + id1 + "']"; // sign the whole contract and no signature but the first and the second String xp3 = "not(ancestor-or-self::ds:Signature)" + "\n" + " or ancestor-or-self::ds:Signature[@Id='" + id1 + "']" + "\n" + " or ancestor-or-self::ds:Signature[@Id='" + id2 + "']"; ////////////////////////////////////////////////////////////////// // first signer ////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////// { XMLSignature firstSigner = new XMLSignature(doc, BaseURI, XMLSignature.ALGO_ID_MAC_HMAC_SHA1); firstSigner.setId(id1); contract.appendChild(firstSigner.getElement()); String rootnamespace = contract.getNamespaceURI(); boolean rootprefixed = (rootnamespace != null) && (rootnamespace.length() > 0); String rootlocalname = contract.getNodeName(); Transforms transforms = new Transforms(doc); XPathContainer xpath = new XPathContainer(doc); xpath.setXPathNamespaceContext("ds", Constants.SignatureSpecNS); xpath.setXPath("\n" + xp1 + "\n"); transforms.addTransform(Transforms.TRANSFORM_XPATH, xpath.getElementPlusReturns()); firstSigner.addDocument("", transforms, Constants.ALGO_ID_DIGEST_SHA1); { // not really secure /////////////////// firstSigner.getKeyInfo().add(new KeyName(doc, "First signer key")); //////////////////////////////////////////////// System.out.println("First signer: Start signing"); firstSigner.sign( firstSigner.createSecretKey("First signer key".getBytes())); System.out.println("First signer: Finished signing"); } SignedInfo s = firstSigner.getSignedInfo(); for (int i = 0; i < s.getSignedContentLength(); i++) { System.out.println("################ Signed Resource " + i + " ################"); System.out.println(new String(s.getSignedContentItem(i))); System.out.println(); } } ////////////////////////////////////////////////////////////////// // second signer ///////////////////////////////////////////////// ////////////////////////////////////////////////////////////////// { XMLSignature secondSigner = new XMLSignature(doc, BaseURI, XMLSignature.ALGO_ID_MAC_HMAC_SHA1); secondSigner.setId(id2); contract.appendChild(secondSigner.getElement()); Transforms transforms2 = new Transforms(doc); XPathContainer xpath2 = new XPathContainer(doc); xpath2.setXPathNamespaceContext("ds", Constants.SignatureSpecNS); xpath2.setXPath("\n" + xp2 + "\n"); transforms2.addTransform(Transforms.TRANSFORM_XPATH, xpath2.getElementPlusReturns()); secondSigner.addDocument("", transforms2, Constants.ALGO_ID_DIGEST_SHA1); { secondSigner.getKeyInfo().add(new KeyName(doc, "Second signer key")); System.out.println("Second signer: Start signing"); secondSigner.sign( secondSigner.createSecretKey("Second signer key".getBytes())); System.out.println("Second signer: Finished signing"); } SignedInfo s2 = secondSigner.getSignedInfo(); for (int i = 0; i < s2.getSignedContentLength(); i++) { System.out.println("################ Signed Resource " + i + " ################"); System.out.println(new String(s2.getSignedContentItem(i))); System.out.println(); } } ////////////////////////////////////////////////////////////////// // third signer ////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////// { XMLSignature thirdSigner = new XMLSignature(doc, BaseURI, XMLSignature.ALGO_ID_MAC_HMAC_SHA1); thirdSigner.setId(id3); contract.appendChild(thirdSigner.getElement()); Transforms transforms3 = new Transforms(doc); XPathContainer xpath3 = new XPathContainer(doc); xpath3.setXPathNamespaceContext("ds", Constants.SignatureSpecNS); xpath3.setXPath("\n" + xp3 + "\n"); transforms3.addTransform(Transforms.TRANSFORM_XPATH, xpath3.getElementPlusReturns()); thirdSigner.addDocument("", transforms3, Constants.ALGO_ID_DIGEST_SHA1); { thirdSigner.getKeyInfo().add(new KeyName(doc, "Third signer key")); System.out.println("Third signer: Start signing"); thirdSigner.sign( thirdSigner.createSecretKey("Third signer key".getBytes())); System.out.println("Third signer: Finished signing"); } SignedInfo s3 = thirdSigner.getSignedInfo(); for (int i = 0; i < s3.getSignedContentLength(); i++) { System.out.println("################ Signed Resource " + i + " ################"); System.out.println(new String(s3.getSignedContentItem(i))); System.out.println(); } } ////////////////////////////////////////////////////////////////// // forth signer ////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////// { XMLSignature forthSigner = new XMLSignature(doc, BaseURI, XMLSignature.ALGO_ID_MAC_HMAC_SHA1); forthSigner.setId("sig4"); contract.appendChild(forthSigner.getElement()); { // first of all, add the basic document without signatures Transforms transforms4 = new Transforms(doc); XPathContainer xpath4 = new XPathContainer(doc); xpath4.setXPathNamespaceContext("ds", Constants.SignatureSpecNS); xpath4.setXPath("\n" + "not(ancestor-or-self::ds:Signature)" + "\n"); transforms4.addTransform(Transforms.TRANSFORM_XPATH, xpath4.getElementPlusReturns()); forthSigner.addDocument("", transforms4, Constants.ALGO_ID_DIGEST_SHA1); } { // then add the different signatures forthSigner.addDocument("#xpointer(id('firstSigner'))", null, Constants.ALGO_ID_DIGEST_SHA1, null, "ds:Signature"); } { forthSigner.getKeyInfo().add(new KeyName(doc, "Forth signer key")); System.out.println("Forth signer: Start signing"); forthSigner.sign( forthSigner.createSecretKey("Forth signer key".getBytes())); System.out.println("Forth signer: Finished signing"); } SignedInfo s4 = forthSigner.getSignedInfo(); for (int i = 0; i < s4.getSignedContentLength(); i++) { System.out.println("################ Signed Resource " + i + " ################"); System.out.println(new String(s4.getSignedContentItem(i))); System.out.println(); } } ////////////////////////////////////////////////////////////////// // write away files ////////////////////////////////////////////////////////////////// { FileOutputStream f = new FileOutputStream(signatureFile); XMLUtils.outputDOMc14nWithComments(doc, f); f.close(); System.out.println("Wrote signature to " + BaseURI); } } } ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootlibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/contract/ThreeSignerContractVerify.javalibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/contract/ThreeSignerCon0000644000175000017500000000735511672356625032600 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.signature.contract; import java.io.File; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.samples.DSNamespaceContext; import org.apache.xml.security.samples.SampleUtils; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * * @author Rene Kollmorgen */ public class ThreeSignerContractVerify { static { org.apache.xml.security.Init.init(); } /** * Method main * * @param unused * @throws Exception */ public static void main(String unused[]) throws Exception { javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); dbf.setAttribute("http://xml.org/sax/features/namespaces", Boolean.TRUE); try { //File signatureFile = new File("collectableSignature.xml"); File signatureFile = new File("build/threeSignerContract.xml"); String BaseURI = signatureFile.toURI().toURL().toString(); System.out.println("Try to verify " + signatureFile.toURI().toURL().toString()); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); db.setErrorHandler(new org.apache.xml.security.utils.IgnoreAllErrorHandler()); org.w3c.dom.Document doc = db.parse(new java.io.FileInputStream(signatureFile)); XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); xpath.setNamespaceContext(new DSNamespaceContext()); String expression = "//ds:Signature[1]"; NodeList signatureElems = (NodeList) xpath.evaluate(expression, doc, XPathConstants.NODESET); for (int i = 0; i < signatureElems.getLength(); i++) { Element sigElement = (Element) signatureElems.item(i); XMLSignature signature = new XMLSignature(sigElement, BaseURI); //byte[] secretKey = "secretValue".getBytes(); Element keyName = (Element) sigElement.getElementsByTagNameNS( Constants.SignatureSpecNS, "KeyName").item(0); String keyValue = keyName.getFirstChild().getNodeValue(); System.out.println("The signature number " + (i + 1) + " is " + (signature.checkSignatureValue( signature.createSecretKey( keyValue.getBytes())) ? "valid (good)" : "invalid !!!!! (bad)")); } } catch (Exception ex) { ex.printStackTrace(); } } } ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/VerifyMerlinsExamplesTwentyThree.javalibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/VerifyMerlinsExamplesTw0000644000175000017500000001700011561005360032660 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.signature; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.security.PublicKey; import java.security.cert.X509Certificate; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.samples.DSNamespaceContext; import org.apache.xml.security.samples.SampleUtils; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * * @author $Author: mullan $ */ public class VerifyMerlinsExamplesTwentyThree { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(VerifyMerlinsExamplesTwentyThree.class.getName()); /** Field schemaValidate */ static final boolean schemaValidate = false; /** Field signatureSchemaFile */ static final String signatureSchemaFile = "samples/data/xmldsig-core-schema.xsd"; static { org.apache.xml.security.Init.init(); } /** * Method main * * @param unused */ public static void main(String unused[]) { if (schemaValidate) { System.out.println("We do schema-validation"); } else { System.out.println("We do not schema-validation"); } javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); if (VerifyMerlinsExamplesTwentyThree.schemaValidate) { dbf.setAttribute("http://apache.org/xml/features/validation/schema", Boolean.TRUE); dbf.setAttribute("http://apache.org/xml/features/dom/defer-node-expansion", Boolean.TRUE); dbf.setValidating(true); dbf.setAttribute("http://xml.org/sax/features/validation", Boolean.TRUE); dbf.setAttribute("http://apache.org/xml/properties/schema/external-schemaLocation", Constants.SignatureSpecNS + " " + VerifyMerlinsExamplesTwentyThree.signatureSchemaFile); } dbf.setNamespaceAware(true); dbf.setAttribute("http://xml.org/sax/features/namespaces", Boolean.TRUE); String merlinsDir = "samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/"; String filenames[] = { // "23signature.xml" // "merlinsTwentyThreeRecreated.xml" merlinsDir + "signature.xml", merlinsDir + "signature-enveloped-dsa.xml", merlinsDir + "signature-enveloping-b64-dsa.xml", merlinsDir + "signature-enveloping-dsa.xml", merlinsDir + "signature-enveloping-hmac-sha1.xml", merlinsDir + "signature-enveloping-rsa.xml", merlinsDir + "signature-external-b64-dsa.xml", merlinsDir + "signature-external-dsa.xml" }; int start = 0; int end = filenames.length; for (int i = start; i < end; i++) { String signatureFileName = filenames[i]; try { verify(dbf, signatureFileName); } catch (Exception ex) { ex.printStackTrace(); } } } /** * Method verify * * @param dbf * @param filename * @throws Exception */ public static void verify(DocumentBuilderFactory dbf, String filename) throws Exception { File f = new File(filename); System.out.println("Try to verify " + f.toURI().toURL().toString()); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); if (VerifyMerlinsExamplesTwentyThree.schemaValidate) { db.setErrorHandler(new org.apache.xml.security.utils.IgnoreAllErrorHandler()); db.setEntityResolver(new org.xml.sax.EntityResolver() { public org.xml.sax.InputSource resolveEntity(String publicId, String systemId) throws org.xml.sax.SAXException { if (systemId.endsWith("xmldsig-core-schema.xsd")) { try { return new org.xml.sax.InputSource(new FileInputStream(signatureSchemaFile)); } catch (FileNotFoundException ex) { throw new org.xml.sax.SAXException(ex); } } else { return null; } } }); } org.w3c.dom.Document doc = db.parse(new java.io.FileInputStream(f)); XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); xpath.setNamespaceContext(new DSNamespaceContext()); String expression = "//ds:Signature[1]"; Element sigElement = (Element) xpath.evaluate(expression, doc, XPathConstants.NODE); XMLSignature signature = new XMLSignature(sigElement, f.toURI().toURL().toString()); signature.getSignedInfo() .addResourceResolver(new org.apache.xml.security.samples.utils.resolver.OfflineResolver()); signature.setFollowNestedManifests(false); KeyInfo ki = signature.getKeyInfo(); if (ki != null) { X509Certificate cert = signature.getKeyInfo().getX509Certificate(); if (cert != null) { System.out.println("The XML signature in file " + f.toURI().toURL().toString() + " is " + (signature.checkSignatureValue(cert) ? "valid (good)" : "invalid !!!!! (bad)")); } else { PublicKey pk = signature.getKeyInfo().getPublicKey(); if (pk != null) { System.out.println("The XML signature in file " + f.toURI().toURL().toString() + " is " + (signature.checkSignatureValue(pk) ? "valid (good)" : "invalid !!!!! (bad)")); } else { System.out.println( "Did not find a public key, so I can't check the signature"); } } } else { System.out.println("Did not find a KeyInfo"); } } } libxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/HereSigner.java0000644000175000017500000001263611672356625031055 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.signature; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.security.KeyStore; import java.security.PrivateKey; import java.security.cert.X509Certificate; import org.apache.xml.security.signature.ObjectContainer; import org.apache.xml.security.signature.SignedInfo; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.transforms.params.XPathContainer; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.ElementProxy; import org.apache.xml.security.utils.HelperNodeList; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * @author $Author: coheigea $ */ public class HereSigner { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(HereSigner.class.getName()); static { org.apache.xml.security.Init.init(); } /** * Method main * * @param unused * @throws Exception */ public static void main(String unused[]) throws Exception { String keystoreType = "JKS"; String keystoreFile = "samples/data/keystore.jks"; String keystorePass = "xmlsecurity"; String privateKeyAlias = "test"; String privateKeyPass = "xmlsecurity"; String certificateAlias = "test"; File signatureFile = new File("build/hereSignature.xml"); KeyStore ks = KeyStore.getInstance(keystoreType); FileInputStream fis = new FileInputStream(keystoreFile); ks.load(fis, keystorePass.toCharArray()); PrivateKey privateKey = (PrivateKey) ks.getKey(privateKeyAlias, privateKeyPass.toCharArray()); javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); org.w3c.dom.Document doc = db.newDocument(); String BaseURI = signatureFile.toURI().toURL().toString(); ElementProxy.setDefaultPrefix(Constants.SignatureSpecNS, "prof"); XMLSignature sig = new XMLSignature(doc, BaseURI, XMLSignature.ALGO_ID_SIGNATURE_DSA); doc.appendChild(sig.getElement()); sig.getSignedInfo() .addResourceResolver(new org.apache.xml.security.samples.utils.resolver.OfflineResolver()); { ObjectContainer ob1 = new ObjectContainer(doc); ob1.setId("object-1"); ob1.appendChild(doc.createTextNode("\nSigned Text\n")); Element c = doc.createElementNS(null, "element"); c.setAttributeNS(null, "name", "val"); ob1.appendChild(c); sig.appendObject(ob1); Transforms transforms = new Transforms(doc); XPathContainer xc = new XPathContainer(doc); xc.setXPathNamespaceContext("prof", Constants.SignatureSpecNS); String xpath = "\n" + "count(" + "\n" + " ancestor-or-self::prof:Object " + "\n" + " | " + "\n" + " here()/ancestor::prof:Signature[1]/child::prof:Object[@Id='object-1']" + "\n" + ") <= count(" + "\n" + " ancestor-or-self::prof:Object" + "\n" + ") " + "\n"; xc.setXPath(xpath); HelperNodeList nl = new HelperNodeList(); nl.appendChild(doc.createTextNode("\n")); nl.appendChild(xc.getElement()); nl.appendChild(doc.createTextNode("\n")); transforms.addTransform(Transforms.TRANSFORM_XPATH, nl); transforms.addTransform(Transforms.TRANSFORM_C14N_WITH_COMMENTS); sig.addDocument("", transforms, Constants.ALGO_ID_DIGEST_SHA1); } { X509Certificate cert = (X509Certificate) ks.getCertificate(certificateAlias); sig.addKeyInfo(cert); sig.addKeyInfo(cert.getPublicKey()); System.out.println("Start signing"); sig.sign(privateKey); System.out.println("Finished signing"); } SignedInfo s = sig.getSignedInfo(); for (int i = 0; i < s.getSignedContentLength(); i++) { System.out.println(new String(s.getSignedContentItem(i))); } FileOutputStream f = new FileOutputStream(signatureFile); XMLUtils.outputDOMc14nWithComments(doc, f); f.close(); System.out.println("Wrote signature to " + BaseURI); } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/CreateCollectableSignature.javalibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/CreateCollectableSignat0000644000175000017500000001460011672356625032576 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.signature; import java.io.File; import java.io.FileOutputStream; import org.apache.xml.security.keys.content.KeyName; import org.apache.xml.security.signature.SignedInfo; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.transforms.params.XPathContainer; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * These ones can be used to create Signatures which can be collected * using your text editors cut-and-paste feature to create a file wich * contains multiple signatures which remain valid after cut-and-paste. * * This program creates a Signature which can be used for cut-and-paste to be * put into a larger document. * * @author $Author: coheigea $ */ public class CreateCollectableSignature { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(CreateCollectableSignature.class.getName()); /** Field passphrase */ public static final String passphrase = "The super-mega-secret public static passphrase"; static { org.apache.xml.security.Init.init(); // org.apache.xml.security.utils.Constants.setSignatureSpecNSprefix(""); } /** * Method main * * @param unused * @throws Exception */ public static void main(String unused[]) throws Exception { File signatureFile = new File("build/collectableSignature.xml"); String BaseURI = signatureFile.toURI().toURL().toString(); javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); org.w3c.dom.Document doc = db.newDocument(); Element rootElement = doc.createElementNS(null, "root"); doc.appendChild(rootElement); Element signedResourceElement = doc.createElementNS(null, "signedContent"); signedResourceElement.appendChild(doc.createTextNode("Signed Text\n")); rootElement.appendChild(signedResourceElement); XMLSignature sig = new XMLSignature(doc, BaseURI, XMLSignature.ALGO_ID_MAC_HMAC_SHA1); signedResourceElement.appendChild(sig.getElement()); { String rootnamespace = signedResourceElement.getNamespaceURI(); boolean rootprefixed = (rootnamespace != null) && (rootnamespace.length() > 0); String rootlocalname = signedResourceElement.getNodeName(); Transforms transforms = new Transforms(doc); XPathContainer xpath = new XPathContainer(doc); xpath.setXPathNamespaceContext("ds", Constants.SignatureSpecNS); if (rootprefixed) { xpath.setXPathNamespaceContext("root", rootnamespace); } String xpathStr = "\n" + "count( " + "\n" + " ancestor-or-self::" + (rootprefixed ? "root:" : "") + rootlocalname + "" + "\n" + " | " + "\n" + " here()/ancestor::" + (rootprefixed ? "root:" : "") + rootlocalname + "[1] " + "\n" + ") <= count( " + "\n" + " ancestor-or-self::" + (rootprefixed ? "root:" : "") + rootlocalname + "" + "\n" + ") " + "\n" + " and " + "\n" + "count( " + "\n" + " ancestor-or-self::ds:Signature " + "\n" + " | " + "\n" + " here()/ancestor::ds:Signature[1] " + "\n" + ") > count( " + "\n" + " ancestor-or-self::ds:Signature " + "\n" + ") " + "\n" ; xpath.setXPath(xpathStr); transforms.addTransform(Transforms.TRANSFORM_XPATH, xpath.getElementPlusReturns()); sig.addDocument("", transforms, Constants.ALGO_ID_DIGEST_SHA1); } { sig.getKeyInfo().add(new KeyName(doc, CreateCollectableSignature.passphrase)); System.out.println("Start signing"); sig.sign(sig.createSecretKey(CreateCollectableSignature.passphrase.getBytes())); System.out.println("Finished signing"); } FileOutputStream f = new FileOutputStream(signatureFile); XMLUtils.outputDOMc14nWithComments(doc, f); f.close(); System.out.println("Wrote signature to " + BaseURI); SignedInfo s = sig.getSignedInfo(); for (int i = 0; i < s.getSignedContentLength(); i++) { System.out.println("################ Signed Resource " + i + " ################"); System.out.println(new String(s.getSignedContentItem(i))); System.out.println(); } } } libxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/CreateSignature.java0000644000175000017500000001541611671643306032100 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.signature; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.security.KeyStore; import java.security.PrivateKey; import java.security.cert.X509Certificate; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.ElementProxy; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * @author $Author: coheigea $ */ public class CreateSignature { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(CreateSignature.class.getName()); static { org.apache.xml.security.Init.init(); } /** * Method main * * @param unused * @throws Exception */ public static void main(String unused[]) throws Exception { ElementProxy.setDefaultPrefix(Constants.SignatureSpecNS, "ds"); //All the parameters for the keystore String keystoreType = "JKS"; String keystoreFile = "samples/data/keystore.jks"; String keystorePass = "xmlsecurity"; String privateKeyAlias = "test"; String privateKeyPass = "xmlsecurity"; String certificateAlias = "test"; File signatureFile = new File("build/signature.xml"); KeyStore ks = KeyStore.getInstance(keystoreType); FileInputStream fis = new FileInputStream(keystoreFile); //load the keystore ks.load(fis, keystorePass.toCharArray()); //get the private key for signing. PrivateKey privateKey = (PrivateKey) ks.getKey(privateKeyAlias, privateKeyPass.toCharArray()); javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); //XML Signature needs to be namespace aware dbf.setNamespaceAware(true); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); org.w3c.dom.Document doc = db.newDocument(); //Build a sample document. It will look something like: // //Some simple text // // doc.appendChild(doc.createComment(" Comment before ")); Element root = doc.createElementNS("http://www.apache.org/ns/#app1", "apache:RootElement"); root.setAttributeNS(null, "attr1", "test1"); root.setAttributeNS(null, "attr2", "test2"); root.setAttributeNS(Constants.NamespaceSpecNS, "xmlns:foo", "http://example.org/#foo"); root.setAttributeNS("http://example.org/#foo", "foo:attr1", "foo's test"); root.setAttributeNS(Constants.NamespaceSpecNS, "xmlns:apache", "http://www.apache.org/ns/#app1"); doc.appendChild(root); root.appendChild(doc.createTextNode("Some simple text\n")); //The BaseURI is the URI that's used to prepend to relative URIs String BaseURI = signatureFile.toURI().toURL().toString(); //Create an XML Signature object from the document, BaseURI and //signature algorithm (in this case DSA) XMLSignature sig = new XMLSignature(doc, BaseURI, XMLSignature.ALGO_ID_SIGNATURE_DSA); //Append the signature element to the root element before signing because //this is going to be an enveloped signature. //This means the signature is going to be enveloped by the document. //Two other possible forms are enveloping where the document is inside the //signature and detached where they are seperate. //Note that they can be mixed in 1 signature with seperate references as //shown below. root.appendChild(sig.getElement()); doc.appendChild(doc.createComment(" Comment after ")); sig.getSignedInfo().addResourceResolver( new org.apache.xml.security.samples.utils.resolver.OfflineResolver() ); { //create the transforms object for the Document/Reference Transforms transforms = new Transforms(doc); //First we have to strip away the signature element (it's not part of the //signature calculations). The enveloped transform can be used for this. transforms.addTransform(Transforms.TRANSFORM_ENVELOPED_SIGNATURE); //Part of the signature element needs to be canonicalized. It is a kind //of normalizing algorithm for XML. For more information please take a //look at the W3C XML Digital Signature webpage. transforms.addTransform(Transforms.TRANSFORM_C14N_WITH_COMMENTS); //Add the above Document/Reference sig.addDocument("", transforms, Constants.ALGO_ID_DIGEST_SHA1); } { //Add in 2 external URIs. This is a detached Reference. // // When sign() is called, two network connections are made. -- well, // not really, as we use the OfflineResolver which acts as a proxy for // these two resouces ;-)) // sig.addDocument("http://www.w3.org/TR/xml-stylesheet"); sig.addDocument("http://www.nue.et-inf.uni-siegen.de/index.html"); } { //Add in the KeyInfo for the certificate that we used the private key of X509Certificate cert = (X509Certificate) ks.getCertificate(certificateAlias); sig.addKeyInfo(cert); sig.addKeyInfo(cert.getPublicKey()); System.out.println("Start signing"); sig.sign(privateKey); System.out.println("Finished signing"); } FileOutputStream f = new FileOutputStream(signatureFile); XMLUtils.outputDOMc14nWithComments(doc, f); f.close(); System.out.println("Wrote signature to " + BaseURI); } } ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/CreateEnvelopingSignature.javalibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/CreateEnvelopingSignatu0000644000175000017500000001042411671643306032652 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.signature; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.security.KeyStore; import java.security.PrivateKey; import java.security.cert.X509Certificate; import org.apache.xml.security.signature.ObjectContainer; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * @author $Author: coheigea $ */ public class CreateEnvelopingSignature { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(CreateSignature.class.getName()); static { org.apache.xml.security.Init.init(); } /** * Method main * * @param unused * @throws Exception */ public static void main(String unused[]) throws Exception { String keystoreType = "JKS"; String keystoreFile = "samples/data/keystore.jks"; String keystorePass = "xmlsecurity"; String privateKeyAlias = "test"; String privateKeyPass = "xmlsecurity"; String certificateAlias = "test"; File signatureFile = new File("build/signature.xml"); KeyStore ks = KeyStore.getInstance(keystoreType); FileInputStream fis = new FileInputStream(keystoreFile); ks.load(fis, keystorePass.toCharArray()); PrivateKey privateKey = (PrivateKey) ks.getKey(privateKeyAlias, privateKeyPass.toCharArray()); javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); org.w3c.dom.Document doc = db.newDocument(); String BaseURI = signatureFile.toURI().toURL().toString(); XMLSignature sig = new XMLSignature(doc, BaseURI, XMLSignature.ALGO_ID_SIGNATURE_DSA); doc.appendChild(sig.getElement()); { ObjectContainer obj = new ObjectContainer(doc); Element anElement = doc.createElementNS(null, "InsideObject"); anElement.appendChild(doc.createTextNode("A text in a box")); obj.appendChild(anElement); String Id = "TheFirstObject"; obj.setId(Id); sig.appendObject(obj); Transforms transforms = new Transforms(doc); transforms.addTransform(Transforms.TRANSFORM_C14N_WITH_COMMENTS); sig.addDocument("#" + Id, transforms, Constants.ALGO_ID_DIGEST_SHA1); } { X509Certificate cert = (X509Certificate) ks.getCertificate(certificateAlias); sig.addKeyInfo(cert); sig.addKeyInfo(cert.getPublicKey()); System.out.println("Start signing"); sig.sign(privateKey); System.out.println("Finished signing"); } FileOutputStream f = new FileOutputStream(signatureFile); XMLUtils.outputDOMc14nWithComments(doc, f); f.close(); System.out.println("Wrote signature to " + BaseURI); for (int i = 0; i < sig.getSignedInfo().getSignedContentLength(); i++) { System.out.println("--- Signed Content follows ---"); System.out.println(new String(sig.getSignedInfo().getSignedContentItem(i))); } } } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/NullURIReferenceResolver.javalibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/NullURIReferenceResolve0000644000175000017500000000767611551074155032552 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.signature; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.utils.resolver.ResourceResolverException; import org.apache.xml.security.utils.resolver.ResourceResolverSpi; import org.w3c.dom.Attr; /** * This is a sample ResourceResolver who demonstrated how References without * URI attribuet could be handled. * * @author $Author: coheigea $ */ public class NullURIReferenceResolver extends ResourceResolverSpi { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(NullURIReferenceResolver.class.getName()); /** Field _data[] */ byte _data[] = null; /** Field _data2[][] */ byte _data2[][] = null; /** Field _count */ int _count = -1; /** * Constructor NullURIReferenceResolver * * @param data */ public NullURIReferenceResolver(byte[] data) { _data = data; _count = -1; } /** * Constructor NullURIReferenceResolver * * @param data */ public NullURIReferenceResolver(byte[][] data) { _data2 = data; _count = 0; } /** * Method engineResolve * * @param uri * @param BaseURI * * @throws ResourceResolverException */ public XMLSignatureInput engineResolve(Attr uri, String BaseURI) throws ResourceResolverException { XMLSignatureInput result = null; if ((this._data != null) && (this._count == -1)) { // we always return the same stuff; result = new XMLSignatureInput(this._data); result.setSourceURI("memory://null"); result.setMIMEType("text/txt"); } else if ((this._data == null) && (this._count != -1)) { if (this._count < this._data2.length) { result = new XMLSignatureInput(this._data2[this._count]); result.setSourceURI("memory://" + this._count); this._count++; result.setMIMEType("text/txt"); } else { String errMsg = "You did not supply enough data!!! There are only " + (this._data2.length) + " byte[] arrays"; Object exArgs[] = { errMsg }; throw new ResourceResolverException("empty", exArgs, uri, BaseURI); } } else { Object exArgs[] = { "You did not supply data !!!" }; throw new ResourceResolverException("empty", exArgs, uri, BaseURI); } return result; } /** * Method engineCanResolve * * @param uri * @param BaseURI * */ public boolean engineCanResolve(Attr uri, String BaseURI) { if (uri == null) { if ((this._data != null) && (this._count == -1)) { return true; } else if ((this._data == null) && (this._count != -1)) { return true; } } return false; } /** * Method engineGetPropertyKeys * * */ public String[] engineGetPropertyKeys() { return null; } } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/CreateMerlinsExampleSixteen.javalibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/CreateMerlinsExampleSix0000644000175000017500000004324211704017634032622 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.signature; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.security.KeyStore; import java.security.PrivateKey; import java.security.cert.X509Certificate; import org.apache.xml.security.keys.content.RetrievalMethod; import org.apache.xml.security.keys.content.X509Data; import org.apache.xml.security.keys.content.x509.XMLX509Certificate; import org.apache.xml.security.keys.content.x509.XMLX509IssuerSerial; import org.apache.xml.security.keys.content.x509.XMLX509SubjectName; import org.apache.xml.security.samples.utils.resolver.OfflineResolver; import org.apache.xml.security.signature.Manifest; import org.apache.xml.security.signature.ObjectContainer; import org.apache.xml.security.signature.Reference; import org.apache.xml.security.signature.SignatureProperties; import org.apache.xml.security.signature.SignatureProperty; import org.apache.xml.security.signature.SignedInfo; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.transforms.params.XPathContainer; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.ElementProxy; import org.apache.xml.security.utils.JavaUtils; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; /** * * @author $Author: coheigea $ */ public class CreateMerlinsExampleSixteen { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(CreateMerlinsExampleSixteen.class.getName()); static { org.apache.xml.security.Init.init(); } /** * Method main * * @param unused * @throws Exception */ public static void main(String unused[]) throws Exception { ElementProxy.setDefaultPrefix(Constants.SignatureSpecNS, "ds"); String keystoreType = "JKS"; String keystoreFile = "samples/data/keystore.jks"; String keystorePass = "xmlsecurity"; String privateKeyAlias = "test"; String privateKeyPass = "xmlsecurity"; String certificateAlias = "test"; File signatureFile = new File("build/merlinsSixteenRecreatedNoRetrievalMethod.xml"); KeyStore ks = KeyStore.getInstance(keystoreType); FileInputStream fis = new FileInputStream(keystoreFile); ks.load(fis, keystorePass.toCharArray()); PrivateKey privateKey = (PrivateKey) ks.getKey(privateKeyAlias, privateKeyPass.toCharArray()); if (privateKey == null) { throw new RuntimeException("Private key is null"); } X509Certificate cert = (X509Certificate) ks.getCertificate(certificateAlias); javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); org.w3c.dom.Document doc = db.newDocument(); ////////////////////////////////////////////////// Element envelope = doc.createElementNS("http://www.usps.gov/", "Envelope"); envelope.setAttributeNS(Constants.NamespaceSpecNS, "xmlns", "http://www.usps.gov/"); envelope.setAttributeNS(Constants.NamespaceSpecNS, "xmlns:foo", "http://www.usps.gov/foo"); envelope.appendChild(doc.createTextNode("\n")); doc.appendChild(doc.createComment(" Preamble ")); doc.appendChild(envelope); doc.appendChild(doc.createComment(" Postamble ")); Element dearSir = doc.createElementNS("http://www.usps.gov/", "DearSir"); dearSir.appendChild(doc.createTextNode("foo")); envelope.appendChild(dearSir); envelope.appendChild(doc.createTextNode("\n")); Element body = doc.createElementNS("http://www.usps.gov/", "Body"); body.appendChild(doc.createTextNode("bar")); envelope.appendChild(body); envelope.appendChild(doc.createTextNode("\n")); Element YoursSincerely = doc.createElementNS("http://www.usps.gov/", "YoursSincerely"); YoursSincerely.appendChild(doc.createTextNode("\n")); envelope.appendChild(YoursSincerely); Element PostScript = doc.createElementNS("http://www.usps.gov/", "PostScript"); PostScript.appendChild(doc.createTextNode("bar")); envelope.appendChild(PostScript); Element Notaries = doc.createElementNS(null, "Notaries"); Notaries.setAttributeNS(Constants.NamespaceSpecNS, "xmlns", ""); Notaries.setAttributeNS(null, "Id", "notaries"); Notaries.setIdAttributeNS(null, "Id", true); { Element Notary = doc.createElementNS(null, "Notary"); Notary.setAttributeNS(null, "name", "Great, A. T."); Notaries.appendChild(Notary); } { Element Notary = doc.createElementNS(null, "Notary"); Notary.setAttributeNS(null, "name", "Hun, A. T."); Notaries.appendChild(Notary); } envelope.appendChild(Notaries); envelope.appendChild(doc.createComment(" Commentary ")); ////////////////////////////////////////////////// String BaseURI = signatureFile.toURI().toURL().toString(); XMLSignature sig = new XMLSignature(doc, BaseURI, XMLSignature.ALGO_ID_SIGNATURE_DSA); YoursSincerely.appendChild(sig.getElement()); sig.setId("signature"); /* * Add the Objects */ // object-1 { ObjectContainer object1 = new ObjectContainer(doc); object1.setId("object-1"); object1.setMimeType("text/plain"); object1.appendChild(doc.createTextNode("I am the text.")); sig.appendObject(object1); } // object-2 { ObjectContainer object2 = new ObjectContainer(doc); object2.setId("object-2"); object2.setMimeType("text/plain"); object2.setEncoding("http://www.w3.org/2000/09/xmldsig#base64"); object2.appendChild(doc.createTextNode("SSBhbSB0aGUgdGV4dC4=")); sig.appendObject(object2); } // object-3 { ObjectContainer object = new ObjectContainer(doc); object.setId("object-3"); Element nonc = doc.createElementNS(null, "NonCommentandus"); nonc.setAttributeNS(Constants.NamespaceSpecNS, "xmlns", ""); nonc.appendChild(doc.createComment(" Commentandum ")); object.appendChild(doc.createTextNode("\n ")); object.appendChild(nonc); object.appendChild(doc.createTextNode("\n ")); sig.appendObject(object); } // object number 4 { ObjectContainer object = new ObjectContainer(doc); object.appendChild(createObject4(sig)); sig.appendObject(object); } // object number 4 { ObjectContainer object = new ObjectContainer(doc); SignatureProperties sps = new SignatureProperties(doc); sps.setId("signature-properties-1"); SignatureProperty sp = new SignatureProperty(doc, "#signature"); Element signedAdress = doc.createElementNS("urn:demo", "SignedAddress"); signedAdress.setAttributeNS(Constants.NamespaceSpecNS, "xmlns", "urn:demo"); Element IP = doc.createElementNS("urn:demo", "IP"); IP.appendChild(doc.createTextNode("192.168.21.138")); signedAdress.appendChild(IP); sp.appendChild(signedAdress); sps.addSignatureProperty(sp); object.appendChild(sps.getElement()); sig.appendObject(object); } { ObjectContainer object = new ObjectContainer(doc); object.setId("object-4"); X509Data x509data = new X509Data(doc); x509data.add(new XMLX509SubjectName(doc, cert)); x509data.add(new XMLX509IssuerSerial(doc, cert)); x509data.add(new XMLX509Certificate(doc, cert)); object.appendChild(x509data.getElement()); sig.appendObject(object); } /* * Add References */ sig.getSignedInfo().addResourceResolver( new org.apache.xml.security.samples.utils.resolver.OfflineResolver()); sig.addDocument("http://www.w3.org/TR/xml-stylesheet"); { Transforms transforms = new Transforms(doc); transforms.addTransform(Transforms.TRANSFORM_BASE64_DECODE); sig.addDocument("http://xmldsig.pothole.com/xml-stylesheet.txt", transforms, Constants.ALGO_ID_DIGEST_SHA1); } { Transforms transforms = new Transforms(doc); XPathContainer xpathC = new XPathContainer(doc); xpathC.setXPath("self::text()"); transforms.addTransform(Transforms.TRANSFORM_XPATH, xpathC.getElementPlusReturns()); sig.addDocument("#object-1", transforms, Constants.ALGO_ID_DIGEST_SHA1, null, "http://www.w3.org/2000/09/xmldsig#Object"); } { Transforms transforms = new Transforms(doc); transforms.addTransform(Transforms.TRANSFORM_BASE64_DECODE); sig.addDocument("#object-2", transforms, Constants.ALGO_ID_DIGEST_SHA1, null, "http://www.w3.org/2000/09/xmldsig#Object"); } sig.addDocument("#manifest-1", null, Constants.ALGO_ID_DIGEST_SHA1, null, "http://www.w3.org/2000/09/xmldsig#Manifest"); sig.addDocument("#signature-properties-1", null, Constants.ALGO_ID_DIGEST_SHA1, null, "http://www.w3.org/2000/09/xmldsig#SignatureProperties"); { Transforms transforms = new Transforms(doc); transforms.addTransform(Transforms.TRANSFORM_ENVELOPED_SIGNATURE); sig.addDocument("", transforms, Constants.ALGO_ID_DIGEST_SHA1); } { Transforms transforms = new Transforms(doc); transforms.addTransform(Transforms.TRANSFORM_ENVELOPED_SIGNATURE); transforms.addTransform(Transforms.TRANSFORM_C14N_WITH_COMMENTS); sig.addDocument("", transforms, Constants.ALGO_ID_DIGEST_SHA1); } { Transforms transforms = new Transforms(doc); transforms.addTransform(Transforms.TRANSFORM_ENVELOPED_SIGNATURE); sig.addDocument("#xpointer(/)", transforms, Constants.ALGO_ID_DIGEST_SHA1); } { Transforms transforms = new Transforms(doc); transforms.addTransform(Transforms.TRANSFORM_ENVELOPED_SIGNATURE); transforms.addTransform(Transforms.TRANSFORM_C14N_WITH_COMMENTS); sig.addDocument("#xpointer(/)", transforms, Constants.ALGO_ID_DIGEST_SHA1); } { sig.addDocument("#object-3", null, Constants.ALGO_ID_DIGEST_SHA1, null, "http://www.w3.org/2000/09/xmldsig#Object"); } { Transforms transforms = new Transforms(doc); transforms.addTransform(Transforms.TRANSFORM_C14N_WITH_COMMENTS); sig.addDocument("#object-3", transforms, Constants.ALGO_ID_DIGEST_SHA1, null, "http://www.w3.org/2000/09/xmldsig#Object"); } { sig.addDocument("#xpointer(id('object-3'))", null, Constants.ALGO_ID_DIGEST_SHA1, null, "http://www.w3.org/2000/09/xmldsig#Object"); } { Transforms transforms = new Transforms(doc); transforms.addTransform(Transforms.TRANSFORM_C14N_WITH_COMMENTS); sig.addDocument("#xpointer(id('object-3'))", transforms, Constants.ALGO_ID_DIGEST_SHA1, null, "http://www.w3.org/2000/09/xmldsig#Object"); } { sig.addDocument("#manifest-reference-1", null, Constants.ALGO_ID_DIGEST_SHA1, "reference-1", "http://www.w3.org/2000/09/xmldsig#Reference"); } { sig.addDocument("#reference-1", null, Constants.ALGO_ID_DIGEST_SHA1, "reference-2", "http://www.w3.org/2000/09/xmldsig#Reference"); } { sig.addDocument("#reference-2", null, Constants.ALGO_ID_DIGEST_SHA1, null, "http://www.w3.org/2000/09/xmldsig#Reference"); } /* * Add KeyInfo and sign() */ { Transforms retrievalTransforms = new Transforms(doc); XPathContainer xpathC = new XPathContainer(doc); xpathC.setXPathNamespaceContext("ds", Constants.SignatureSpecNS); xpathC.setXPath("ancestor-or-self::ds:X509Data"); retrievalTransforms.addTransform(Transforms.TRANSFORM_XPATH, xpathC.getElement()); sig.getKeyInfo().add( new RetrievalMethod( doc, "#object-4", retrievalTransforms, "http://www.w3.org/2000/09/xmldsig#X509Data")); System.out.println("Start signing"); sig.sign(privateKey); System.out.println("Finished signing"); } FileOutputStream f = new FileOutputStream(signatureFile); XMLUtils.outputDOMc14nWithComments(doc, f); f.close(); System.out.println("Wrote signature to " + BaseURI); SignedInfo s = sig.getSignedInfo(); for (int i = 0; i < s.getLength(); i++) { Reference r = s.item(i); String fn = "build/merlin16_"+i+".html"; System.out.println("Wrote Reference " + i + " to file " + fn); JavaUtils.writeBytesToFilename(fn, r.getHTMLRepresentation().getBytes()); } } /** * Method createObject4 * * @param sig * * @throws Exception */ public static Element createObject4(XMLSignature sig) throws Exception { Document doc = sig.getElement().getOwnerDocument(); String BaseURI = sig.getBaseURI(); Manifest manifest = new Manifest(doc); manifest.addResourceResolver(new OfflineResolver()); manifest.setId("manifest-1"); manifest.addDocument(BaseURI, "http://www.w3.org/TR/xml-stylesheet", null, Constants.ALGO_ID_DIGEST_SHA1, "manifest-reference-1", null); manifest.addDocument(BaseURI, "#reference-1", null, Constants.ALGO_ID_DIGEST_SHA1, null, "http://www.w3.org/2000/09/xmldsig#Reference"); String xslt = "" + "\n" + " \n" + " \n" + " \n" + " \n" + " Notaries\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "
\n" + " \n" + "
\n" + " \n" + " \n" + "
\n" + "
\n" ; javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); org.w3c.dom.Document docxslt = db.parse(new ByteArrayInputStream(xslt.getBytes())); Node xslElem = docxslt.getDocumentElement(); Node xslElemImported = doc.importNode(xslElem, true); Transforms transforms = new Transforms(doc); transforms.addTransform(Transforms.TRANSFORM_XSLT, (Element) xslElemImported); manifest.addDocument(BaseURI, "#notaries", transforms, Constants.ALGO_ID_DIGEST_SHA1, null, null); return manifest.getElement(); } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/VerifyMerlinsExamplesSixteen.javalibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/VerifyMerlinsExamplesSi0000644000175000017500000001550711672103701032654 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.signature; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.security.PublicKey; import java.security.cert.X509Certificate; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.samples.DSNamespaceContext; import org.apache.xml.security.samples.SampleUtils; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * * @author $Author: coheigea $ */ public class VerifyMerlinsExamplesSixteen { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(VerifyMerlinsExamplesSixteen.class.getName()); /** Field schemaValidate */ static final boolean schemaValidate = false; /** Field signatureSchemaFile */ static final String signatureSchemaFile = "samples/data/xmldsig-core-schema.xsd"; static { org.apache.xml.security.Init.init(); } /** * Method main * * @param unused */ public static void main(String unused[]) { if (schemaValidate) { System.out.println("We do schema-validation"); } else { System.out.println("We do not schema-validation"); } javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); if (VerifyMerlinsExamplesSixteen.schemaValidate) { dbf.setAttribute("http://apache.org/xml/features/validation/schema", Boolean.TRUE); dbf.setAttribute("http://apache.org/xml/features/dom/defer-node-expansion", Boolean.TRUE); dbf.setValidating(true); dbf.setAttribute("http://xml.org/sax/features/validation", Boolean.TRUE); dbf.setAttribute("http://apache.org/xml/properties/schema/external-schemaLocation", Constants.SignatureSpecNS + " " + VerifyMerlinsExamplesSixteen.signatureSchemaFile); } dbf.setNamespaceAware(true); dbf.setAttribute("http://xml.org/sax/features/namespaces", Boolean.TRUE); String filenames[] = { "samples/data/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/signature.xml" }; int start = 0; int end = filenames.length; for (int i = start; i < end; i++) { String signatureFileName = filenames[i]; try { verify(dbf, signatureFileName); } catch (Exception ex) { ex.printStackTrace(); } } } /** * Method verify * * @param dbf * @param filename * @throws Exception */ public static void verify(DocumentBuilderFactory dbf, String filename) throws Exception { File f = new File(filename); System.out.println("Try to verify " + f.toURL().toString()); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); if (VerifyMerlinsExamplesSixteen.schemaValidate) { db.setErrorHandler(new org.apache.xml.security.utils .IgnoreAllErrorHandler()); db.setEntityResolver(new org.xml.sax.EntityResolver() { public org.xml.sax.InputSource resolveEntity(String publicId, String systemId) throws org.xml.sax.SAXException { if (systemId.endsWith("xmldsig-core-schema.xsd")) { try { return new org.xml.sax.InputSource(new FileInputStream(signatureSchemaFile)); } catch (FileNotFoundException ex) { throw new org.xml.sax.SAXException(ex); } } else { return null; } } }); } org.w3c.dom.Document doc = db.parse(new java.io.FileInputStream(f)); XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); xpath.setNamespaceContext(new DSNamespaceContext()); String expression = "//ds:Signature[1]"; Element sigElement = (Element) xpath.evaluate(expression, doc, XPathConstants.NODE); XMLSignature signature = new XMLSignature(sigElement, f.toURI().toURL().toString()); signature.getSignedInfo().addResourceResolver( new org.apache.xml.security.samples.utils.resolver.OfflineResolver() ); signature.setFollowNestedManifests(false); KeyInfo ki = signature.getKeyInfo(); if (ki != null) { X509Certificate cert = signature.getKeyInfo().getX509Certificate(); if (cert != null) { System.out.println("The XML signature in file " + f.toURI().toURL().toString() + " is " + (signature.checkSignatureValue(cert) ? "valid (good)" : "invalid !!!!! (bad)")); } else { PublicKey pk = signature.getKeyInfo().getPublicKey(); if (pk != null) { System.out.println("The XML signature in file " + f.toURI().toURL().toString() + " is " + (signature.checkSignatureValue(pk) ? "valid (good)" : "invalid !!!!! (bad)")); } else { System.out.println( "Did not find a public key, so I can't check the signature"); } } } else { System.out.println("Did not find a KeyInfo"); } } } libxml-security-java-1.5.6/samples/org/apache/xml/security/samples/signature/VerifySignature.java0000644000175000017500000001432311671643306032135 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.signature; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.security.PublicKey; import java.security.cert.X509Certificate; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.samples.utils.resolver.OfflineResolver; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.samples.DSNamespaceContext; import org.apache.xml.security.samples.SampleUtils; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * @author $Author: coheigea $ */ public class VerifySignature { static { org.apache.xml.security.Init.init(); } /** * Method main * * @param unused */ public static void main(String unused[]) { boolean schemaValidate = false; final String signatureSchemaFile = "samples/data/xmldsig-core-schema.xsd"; String signatureFileName = "build/signature.xml"; if (schemaValidate) { System.out.println("We do schema-validation"); } javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); if (schemaValidate) { dbf.setAttribute("http://apache.org/xml/features/validation/schema", Boolean.TRUE); dbf.setAttribute("http://apache.org/xml/features/dom/defer-node-expansion", Boolean.TRUE); dbf.setValidating(true); dbf.setAttribute("http://xml.org/sax/features/validation", Boolean.TRUE); } dbf.setNamespaceAware(true); dbf.setAttribute("http://xml.org/sax/features/namespaces", Boolean.TRUE); if (schemaValidate) { dbf.setAttribute("http://apache.org/xml/properties/schema/external-schemaLocation", Constants.SignatureSpecNS + " " + signatureSchemaFile); } try { File f = new File(signatureFileName); System.out.println("Try to verify " + f.toURI().toURL().toString()); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); db.setErrorHandler(new org.apache.xml.security.utils.IgnoreAllErrorHandler()); if (schemaValidate) { db.setEntityResolver(new org.xml.sax.EntityResolver() { public org.xml.sax.InputSource resolveEntity( String publicId, String systemId ) throws org.xml.sax.SAXException { if (systemId.endsWith("xmldsig-core-schema.xsd")) { try { return new org.xml.sax.InputSource( new FileInputStream(signatureSchemaFile)); } catch (FileNotFoundException ex) { throw new org.xml.sax.SAXException(ex); } } else { return null; } } }); } org.w3c.dom.Document doc = db.parse(new java.io.FileInputStream(f)); XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); xpath.setNamespaceContext(new DSNamespaceContext()); String expression = "//ds:Signature[1]"; Element sigElement = (Element) xpath.evaluate(expression, doc, XPathConstants.NODE); XMLSignature signature = new XMLSignature(sigElement, f.toURI().toURL().toString()); signature.addResourceResolver(new OfflineResolver()); KeyInfo ki = signature.getKeyInfo(); if (ki != null) { if (ki.containsX509Data()) { System.out.println("Could find a X509Data element in the KeyInfo"); } X509Certificate cert = signature.getKeyInfo().getX509Certificate(); if (cert != null) { System.out.println("The XML signature in file " + f.toURI().toURL().toString() + " is " + (signature.checkSignatureValue(cert) ? "valid (good)" : "invalid !!!!! (bad)")); } else { System.out.println("Did not find a Certificate"); PublicKey pk = signature.getKeyInfo().getPublicKey(); if (pk != null) { System.out.println("The XML signature in file " + f.toURI().toURL().toString() + " is " + (signature.checkSignatureValue(pk) ? "valid (good)" : "invalid !!!!! (bad)")); } else { System.out.println( "Did not find a public key, so I can't check the signature"); } } } else { System.out.println("Did not find a KeyInfo"); } } catch (Exception ex) { ex.printStackTrace(); } } } libxml-security-java-1.5.6/samples/org/apache/xml/security/samples/iaik/0000755000175000017500000000000012273503736025056 5ustar tonytonylibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/iaik/IAIKInterOp.java0000644000175000017500000002074611551074155027744 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.iaik; import java.io.File; import java.security.PublicKey; import java.security.cert.X509Certificate; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.samples.DSNamespaceContext; import org.apache.xml.security.samples.SampleUtils; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.apache.xml.security.utils.resolver.ResourceResolverSpi; import org.apache.xml.security.utils.resolver.implementations.ResolverAnonymous; import org.w3c.dom.Element; /** * @author $Author: coheigea $ */ public class IAIKInterOp { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(IAIKInterOp.class.getName()); /** Field schemaValidate */ static final boolean schemaValidate = false; /** Field signatureSchemaFile */ static final String signatureSchemaFile = "samples/data/xmldsig-core-schema.xsd"; static { org.apache.xml.security.Init.init(); } /** * Method main * * @param unused */ public static void main(String unused[]) { if (schemaValidate) { System.out.println("We do schema-validation"); } else { System.out.println("We do not schema-validation"); } javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); if (IAIKInterOp.schemaValidate) { dbf.setAttribute("http://apache.org/xml/features/validation/schema", Boolean.TRUE); dbf.setAttribute("http://apache.org/xml/features/dom/defer-node-expansion", Boolean.TRUE); dbf.setValidating(true); dbf.setAttribute("http://xml.org/sax/features/validation", Boolean.TRUE); dbf.setAttribute("http://apache.org/xml/properties/schema/external-schemaLocation", Constants.SignatureSpecNS + " " + IAIKInterOp.signatureSchemaFile); } dbf.setNamespaceAware(true); dbf.setAttribute("http://xml.org/sax/features/namespaces", Boolean.TRUE); String gregorsDir = "samples/data/at/iaik/ixsil/"; String filenames[] = { gregorsDir + "signatureAlgorithms/signatures/hMACSignature.xml" ,gregorsDir + "signatureAlgorithms/signatures/hMACShortSignature.xml" ,gregorsDir + "signatureAlgorithms/signatures/dSASignature.xml" ,gregorsDir + "signatureAlgorithms/signatures/rSASignature.xml" ,gregorsDir + "transforms/signatures/base64DecodeSignature.xml" ,gregorsDir + "transforms/signatures/c14nSignature.xml" ,gregorsDir + "coreFeatures/signatures/manifestSignature.xml" ,gregorsDir + "transforms/signatures/xPathSignature.xml" ,gregorsDir + "coreFeatures/signatures/signatureTypesSignature.xml" ,gregorsDir + "transforms/signatures/envelopedSignatureSignature.xml" }; verifyAnonymous(gregorsDir, dbf); for (int i = 0; i < 2; i++) { String signatureFileName = filenames[i]; try { org.apache.xml.security.samples.signature .VerifyMerlinsExamplesFifteen.verifyHMAC(dbf, signatureFileName); } catch (Exception ex) { System.out.println("The XML signature in file " + signatureFileName + " crashed the application (bad)"); ex.printStackTrace(); System.out.println(); } } for (int i = 2; i < filenames.length; i++) { String signatureFileName = filenames[i]; try { org.apache.xml.security.samples.signature .VerifyMerlinsExamplesSixteen.verify(dbf, signatureFileName); } catch (Exception ex) { System.out.println("The XML signature in file " + signatureFileName + " crashed the application (bad)"); ex.printStackTrace(); System.out.println(); } } for (int i = 2; i < filenames.length; i++) { String signatureFileName = filenames[i]; try { org.apache.xml.security.samples.signature .VerifyMerlinsExamplesTwentyThree.verify(dbf, signatureFileName); } catch (Exception ex) { System.out.println("The XML signature in file " + signatureFileName + " crashed the application (bad)"); ex.printStackTrace(); System.out.println(); } } } public static void verifyAnonymous(String gregorsDir, DocumentBuilderFactory dbf) { String filename = gregorsDir + "coreFeatures/signatures/anonymousReferenceSignature.xml"; try { String anonymousRef = gregorsDir + "coreFeatures/samples/anonymousReferenceContent.xml"; ResourceResolverSpi resolver = new ResolverAnonymous(anonymousRef); File f = new File(filename); System.out.println("Try to verify " + f.toURI().toURL().toString()); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); org.w3c.dom.Document doc = db.parse(new java.io.FileInputStream(f)); XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); xpath.setNamespaceContext(new DSNamespaceContext()); String expression = "//ds:Signature[1]"; Element sigElement = (Element) xpath.evaluate(expression, doc, XPathConstants.NODE); XMLSignature signature = new XMLSignature(sigElement, f.toURI().toURL().toString()); signature.setFollowNestedManifests(false); signature.addResourceResolver(resolver); KeyInfo ki = signature.getKeyInfo(); if (ki != null) { X509Certificate cert = signature.getKeyInfo().getX509Certificate(); if (cert != null) { System.out.println( "The XML signature in file " + f.toURI().toURL().toString() + " is " + (signature.checkSignatureValue(cert) ? "valid (good)" : "invalid !!!!! (bad)") ); } else { PublicKey pk = signature.getKeyInfo().getPublicKey(); if (pk != null) { System.out.println( "The XML signature in file " + f.toURI().toURL().toString() + " is " + (signature.checkSignatureValue(pk) ? "valid (good)" : "invalid !!!!! (bad)") ); } else { System.out.println("Did not find a public key, so I can't check the signature"); } } } else { System.out.println("Did not find a KeyInfo"); } } catch (Exception ex) { System.out.println("The XML signature in file " + filename + " crashed the application (bad)"); ex.printStackTrace(); System.out.println(); } } } libxml-security-java-1.5.6/samples/org/apache/xml/security/samples/AxisSigner.java0000644000175000017500000001214411704017634027055 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.security.KeyStore; import java.security.PrivateKey; import java.security.cert.X509Certificate; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * @author $Author: coheigea $ */ public class AxisSigner { /** Field AXIS_SIGNATURE_FILENAME */ public static final String AXIS_SIGNATURE_FILENAME = "build/axisSignature.xml"; /** * Method main * * @param unused * @throws Exception */ public static void main(String unused[]) throws Exception { org.apache.xml.security.Init.init(); String keystoreType = "JKS"; String keystoreFile = "samples/data/keystore.jks"; String keystorePass = "xmlsecurity"; String privateKeyAlias = "test"; String privateKeyPass = "xmlsecurity"; String certificateAlias = "test"; File signatureFile = new File(AXIS_SIGNATURE_FILENAME); KeyStore ks = KeyStore.getInstance(keystoreType); FileInputStream fis = new FileInputStream(keystoreFile); ks.load(fis, keystorePass.toCharArray()); PrivateKey privateKey = (PrivateKey) ks.getKey(privateKeyAlias, privateKeyPass.toCharArray()); javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); org.w3c.dom.Document doc = db.newDocument(); /* * Start SOAP infrastructure code. This is to be made compatible with Axis. * */ String soapNS = "http://www.w3.org/2001/12/soap-envelope"; String SOAPSECNS = "http://schemas.xmlsoap.org/soap/security/2000-12"; Element envelopeElement = doc.createElementNS(soapNS, "env:Envelope"); envelopeElement.setAttributeNS(Constants.NamespaceSpecNS, "xmlns:env", soapNS); doc.appendChild(envelopeElement); Element headerElem = doc.createElementNS(soapNS, "env:Header"); Element bodyElem = doc.createElementNS(soapNS, "env:Body"); envelopeElement.appendChild(doc.createTextNode("\n")); envelopeElement.appendChild(headerElem); envelopeElement.appendChild(doc.createTextNode("\n")); envelopeElement.appendChild(bodyElem); envelopeElement.appendChild(doc.createTextNode("\n")); bodyElem.appendChild( doc.createTextNode("This is signed together with it's Body ancestor") ); bodyElem.setAttributeNS(SOAPSECNS, "SOAP-SEC:id", "Body"); bodyElem.setIdAttributeNS(SOAPSECNS, "id", true); Element soapSignatureElem = doc.createElementNS(SOAPSECNS, "SOAP-SEC:Signature"); envelopeElement.setAttributeNS(Constants.NamespaceSpecNS, "xmlns:SOAP-SEC", SOAPSECNS); envelopeElement.setAttributeNS(null, "actor", "some-uri"); envelopeElement.setAttributeNS(null, "mustUnderstand", "1"); envelopeElement.appendChild(doc.createTextNode("\n")); headerElem.appendChild(soapSignatureElem); /* * * End SOAP infrastructure code. This is to be made compatible with Axis. */ String BaseURI = signatureFile.toURI().toURL().toString(); XMLSignature sig = new XMLSignature(doc, BaseURI, XMLSignature.ALGO_ID_SIGNATURE_DSA); soapSignatureElem.appendChild(sig.getElement()); { sig.addDocument("#Body"); } { X509Certificate cert = (X509Certificate) ks.getCertificate(certificateAlias); sig.addKeyInfo(cert); sig.addKeyInfo(cert.getPublicKey()); sig.sign(privateKey); } FileOutputStream f = new FileOutputStream(signatureFile); XMLUtils.outputDOMc14nWithComments(doc, f); f.close(); System.out.println("Wrote signature to " + BaseURI); for (int i = 0; i < sig.getSignedInfo().getSignedContentLength(); i++) { System.out.println("--- Signed Content follows ---"); System.out.println(new String(sig.getSignedInfo().getSignedContentItem(i))); } } } libxml-security-java-1.5.6/samples/org/apache/xml/security/samples/algorithms/0000755000175000017500000000000012273503736026312 5ustar tonytonylibxml-security-java-1.5.6/samples/org/apache/xml/security/samples/algorithms/HMacSHA1RoundTrip.java0000644000175000017500000001171011551074155032245 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.samples.algorithms; import java.io.File; import java.io.FileInputStream; import java.security.KeyStore; import java.security.PrivateKey; import java.security.PublicKey; import java.security.cert.X509Certificate; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.apache.xml.security.algorithms.SignatureAlgorithm; import org.apache.xml.security.utils.Base64; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; /** * * @author $Author: coheigea $ */ public class HMacSHA1RoundTrip { static { org.apache.xml.security.Init.init(); } /** * Method main * * @param unused * @throws Exception */ public static void main(String unused[]) throws Exception { String keystoreType = "JKS"; String keystoreFile = "samples/data/keystore.jks"; String keystorePass = "xmlsecurity"; String privateKeyAlias = "test"; String privateKeyPass = "xmlsecurity"; String certificateAlias = "test"; File signatureFile = new File("signature.xml"); KeyStore ks = KeyStore.getInstance(keystoreType); FileInputStream fis = new FileInputStream(keystoreFile); ks.load(fis, keystorePass.toCharArray()); PrivateKey privateKey = (PrivateKey) ks.getKey(privateKeyAlias, privateKeyPass.toCharArray()); X509Certificate cert = (X509Certificate) ks.getCertificate(certificateAlias); PublicKey publicKey = cert.getPublicKey(); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.newDocument(); SignatureAlgorithm sa = new SignatureAlgorithm(doc, "http://www.w3.org/2000/09/xmldsig#dsa-sha1"); sa.initSign(privateKey); sa.update("sdjhfkjashkjf".getBytes()); byte signatureValue[] = sa.sign(); System.out.println(Base64.encode(signatureValue)); doc.appendChild(sa.getElement()); XMLUtils.outputDOM(doc, System.out); System.out.println(""); System.out.println(""); SignatureAlgorithm verifier = new SignatureAlgorithm(doc.getDocumentElement(), "file:"); verifier.initVerify(publicKey); verifier.update("sdjhfkjashkjf".getBytes()); boolean result = verifier.verify(signatureValue); if (result) { System.out.println("It verified"); } else { System.out.println("It failed"); } } /** * Method mainSha1 * * @param unused * @throws Exception */ public static void mainSha1(String unused[]) throws Exception { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.newDocument(); SignatureAlgorithm sa = new SignatureAlgorithm(doc, "http://www.w3.org/2000/09/xmldsig#hmac-sha1", 33); byte keybytes[] = "01234567890123456789".getBytes(); SecretKey sk = new SecretKeySpec(keybytes, sa.getJCEAlgorithmString()); sa.initSign(sk); sa.update("sdjhfkjashkjf".getBytes()); byte signatureValue[] = sa.sign(); System.out.println(Base64.encode(signatureValue)); doc.appendChild(sa.getElement()); XMLUtils.outputDOM(doc, System.out); System.out.println(""); System.out.println(""); javax.crypto.Mac a; SignatureAlgorithm verifier = new SignatureAlgorithm(doc.getDocumentElement(), "file:"); SecretKey pk = new SecretKeySpec("01234567890123456789".getBytes(), verifier.getJCEAlgorithmString()); verifier.initVerify(pk); verifier.update("sdjhfkjashkjf".getBytes()); boolean result = verifier.verify(signatureValue); if (result) { System.out.println("It verified"); } else { System.out.println("It failed"); } } } libxml-security-java-1.5.6/samples/javax/0000755000175000017500000000000012273503736017127 5ustar tonytonylibxml-security-java-1.5.6/samples/javax/xml/0000755000175000017500000000000012273503736017727 5ustar tonytonylibxml-security-java-1.5.6/samples/javax/xml/crypto/0000755000175000017500000000000012273503736021247 5ustar tonytonylibxml-security-java-1.5.6/samples/javax/xml/crypto/dsig/0000755000175000017500000000000012273503736022175 5ustar tonytonylibxml-security-java-1.5.6/samples/javax/xml/crypto/dsig/samples/0000755000175000017500000000000012273503736023641 5ustar tonytonylibxml-security-java-1.5.6/samples/javax/xml/crypto/dsig/samples/envelope.xml0000644000175000017500000000005410372164212026165 0ustar tonytony libxml-security-java-1.5.6/samples/javax/xml/crypto/dsig/samples/GenEnveloping.java0000644000175000017500000001400611661560700027237 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package javax.xml.crypto.dsig.samples; import javax.xml.crypto.*; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dom.*; import javax.xml.crypto.dsig.dom.DOMSignContext; import javax.xml.crypto.dsig.keyinfo.*; import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.OutputStream; import java.security.*; import java.util.Collections; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.transform.*; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import org.w3c.dom.Document; import org.w3c.dom.Node; /** * This is a simple example of generating an Enveloping XML * Signature using the JSR 105 API. The signature in this case references a * local URI that points to an Object element. * The resulting signature will look like (certificate and * signature values will be different): * *

 * 
 *   
 *     
 *     
 *     
 *       
 *       7/XTsHaBSOnJ/jXD5v0zL6VKYsk=
 *     
 *   
 *   
 *     RpMRbtMHLa0siSS+BwUpLIEmTfh/0fsld2JYQWZzCzfa5kBTz25+XA==
 *   
 *   
 *     
 *       
 *         

* /KaCzo4Syrom78z3EQ5SbbB4sF7ey80etKII864WF64B81uRpH5t9jQTxeEu0Imbz * RMqzVDZkVG9xD7nN1kuFw== *

* * li7dzDacuo67Jg7mtqEm2TRuOMU= * * * Z4Rxsnqc9E7pGknFFH2xqaryRPBaQ01khpMdLRQnG541Awtx/XPaF5Bpsy4pNWMOH * CBiNU0NogpsQW5QvnlMpA== * * * wbEUaCgHZXqK4qLvbdYrAc6+Do0XVcsziCJqxzn4cJJRxwc3E1xnEXHscVgr1Cql9 * i5fanOKQbFXzmb+bChqig== * *
*
*
* some text *
* *
*/ public class GenEnveloping { // // Synopis: java GenEnveloping [output] // // where "output" is the name of a file that will contain the // generated signature. If not specified, standard ouput will be used. // public static void main(String[] args) throws Exception { // First, create the DOM XMLSignatureFactory that will be used to // generate the XMLSignature String providerName = System.getProperty ("jsr105Provider", "org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI"); XMLSignatureFactory fac = XMLSignatureFactory.getInstance("DOM", (Provider) Class.forName(providerName).newInstance()); // Next, create a Reference to a same-document URI that is an Object // element and specify the SHA1 digest algorithm Reference ref = fac.newReference("#object", fac.newDigestMethod(DigestMethod.SHA1, null)); // Next, create the referenced Object DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); Document doc = dbf.newDocumentBuilder().newDocument(); Node text = doc.createTextNode("some text"); XMLStructure content = new DOMStructure(text); XMLObject obj = fac.newXMLObject (Collections.singletonList(content), "object", null, null); // Create the SignedInfo SignedInfo si = fac.newSignedInfo( fac.newCanonicalizationMethod (CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS, (C14NMethodParameterSpec) null), fac.newSignatureMethod(SignatureMethod.DSA_SHA1, null), Collections.singletonList(ref)); // Create a DSA KeyPair KeyPairGenerator kpg = KeyPairGenerator.getInstance("DSA"); kpg.initialize(512); KeyPair kp = kpg.generateKeyPair(); // Create a KeyValue containing the DSA PublicKey that was generated KeyInfoFactory kif = fac.getKeyInfoFactory(); KeyValue kv = kif.newKeyValue(kp.getPublic()); // Create a KeyInfo and add the KeyValue to it KeyInfo ki = kif.newKeyInfo(Collections.singletonList(kv)); // Create the XMLSignature (but don't sign it yet) XMLSignature signature = fac.newXMLSignature(si, ki, Collections.singletonList(obj), null, null); // Create a DOMSignContext and specify the DSA PrivateKey for signing // and the document location of the XMLSignature DOMSignContext dsc = new DOMSignContext(kp.getPrivate(), doc); // Lastly, generate the enveloping signature using the PrivateKey signature.sign(dsc); // output the resulting document OutputStream os; if (args.length > 0) { os = new FileOutputStream(args[0]); } else { os = System.out; } TransformerFactory tf = TransformerFactory.newInstance(); Transformer trans = tf.newTransformer(); trans.transform(new DOMSource(doc), new StreamResult(os)); } } libxml-security-java-1.5.6/samples/javax/xml/crypto/dsig/samples/envelopedSignature.xml0000644000175000017500000000334510372164212030221 0ustar tonytony uooqbWYa5VCqcJCbuymBKqm17vY=eO7K1BdC0kzNvr1HpMf4hKoWsvl+oI04nMw55GO+Z5hyI6By3Oihow==

/KaCzo4Syrom78z3EQ5SbbB4sF7ey80etKII864WF64B81uRpH5t9jQTxeEu0ImbzRMqzVDZkVG9 xD7nN1kuFw==

li7dzDacuo67Jg7mtqEm2TRuOMU=Z4Rxsnqc9E7pGknFFH2xqaryRPBaQ01khpMdLRQnG541Awtx/XPaF5Bpsy4pNWMOHCBiNU0Nogps QW5QvnlMpA==OqFi0sGpvroi6Ut3m154QNWc6gavH3j2ZoRPDW7qVBbgk7XompuKvZe1owz0yvxq+1K+mWbL7ST+ t5nr6UFBCg==
libxml-security-java-1.5.6/samples/javax/xml/crypto/dsig/samples/Validate.java0000644000175000017500000001440211661560700026230 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package javax.xml.crypto.dsig.samples; import javax.xml.crypto.*; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dom.*; import javax.xml.crypto.dsig.dom.DOMValidateContext; import javax.xml.crypto.dsig.keyinfo.*; import java.io.FileInputStream; import java.security.*; import java.util.Iterator; import java.util.List; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; import org.w3c.dom.NodeList; /** * This is a simple example of validating an XML * Signature using the JSR 105 API. It assumes the key needed to * validate the signature is contained in a KeyValue KeyInfo. */ public class Validate { // // Synopsis: java Validate [document] // // where "document" is the name of a file containing the XML document // to be validated. // public static void main(String[] args) throws Exception { // Instantiate the document to be validated DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); Document doc = dbf.newDocumentBuilder().parse(new FileInputStream(args[0])); // Find Signature element NodeList nl = doc.getElementsByTagNameNS(XMLSignature.XMLNS, "Signature"); if (nl.getLength() == 0) { throw new Exception("Cannot find Signature element"); } // Create a DOM XMLSignatureFactory that will be used to unmarshal the // document containing the XMLSignature String providerName = System.getProperty ("jsr105Provider", "org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI"); XMLSignatureFactory fac = XMLSignatureFactory.getInstance("DOM", (Provider) Class.forName(providerName).newInstance()); // Create a DOMValidateContext and specify a KeyValue KeySelector // and document context DOMValidateContext valContext = new DOMValidateContext (new KeyValueKeySelector(), nl.item(0)); // unmarshal the XMLSignature XMLSignature signature = fac.unmarshalXMLSignature(valContext); // Validate the XMLSignature (generated above) boolean coreValidity = signature.validate(valContext); // Check core validation status if (coreValidity == false) { System.err.println("Signature failed core validation"); boolean sv = signature.getSignatureValue().validate(valContext); System.out.println("signature validation status: " + sv); // check the validation status of each Reference Iterator i = signature.getSignedInfo().getReferences().iterator(); for (int j = 0; i.hasNext(); j++) { boolean refValid = ((Reference) i.next()).validate(valContext); System.out.println("ref[" + j + "] validity status: " + refValid); } } else { System.out.println("Signature passed core validation"); } } /** * KeySelector which retrieves the public key out of the * KeyValue element and returns it. * NOTE: If the key algorithm doesn't match signature algorithm, * then the public key will be ignored. */ private static class KeyValueKeySelector extends KeySelector { public KeySelectorResult select(KeyInfo keyInfo, KeySelector.Purpose purpose, AlgorithmMethod method, XMLCryptoContext context) throws KeySelectorException { if (keyInfo == null) { throw new KeySelectorException("Null KeyInfo object!"); } SignatureMethod sm = (SignatureMethod) method; List list = keyInfo.getContent(); for (int i = 0; i < list.size(); i++) { XMLStructure xmlStructure = (XMLStructure) list.get(i); if (xmlStructure instanceof KeyValue) { PublicKey pk = null; try { pk = ((KeyValue)xmlStructure).getPublicKey(); } catch (KeyException ke) { throw new KeySelectorException(ke); } // make sure algorithm is compatible with method if (algEquals(sm.getAlgorithm(), pk.getAlgorithm())) { return new SimpleKeySelectorResult(pk); } } } throw new KeySelectorException("No KeyValue element found!"); } //@@@FIXME: this should also work for key types other than DSA/RSA static boolean algEquals(String algURI, String algName) { if (algName.equalsIgnoreCase("DSA") && algURI.equalsIgnoreCase(SignatureMethod.DSA_SHA1)) { return true; } else if (algName.equalsIgnoreCase("RSA") && algURI.equalsIgnoreCase(SignatureMethod.RSA_SHA1)) { return true; } else if (algName.equalsIgnoreCase("EC") && algURI.equalsIgnoreCase("http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256")) { return true; } else { return false; } } } private static class SimpleKeySelectorResult implements KeySelectorResult { private PublicKey pk; SimpleKeySelectorResult(PublicKey pk) { this.pk = pk; } public Key getKey() { return pk; } } } libxml-security-java-1.5.6/samples/javax/xml/crypto/dsig/samples/GenDetached.java0000644000175000017500000001420111654523221026626 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package javax.xml.crypto.dsig.samples; import javax.xml.crypto.*; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dom.*; import javax.xml.crypto.dsig.dom.DOMSignContext; import javax.xml.crypto.dsig.keyinfo.*; import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec; import java.io.FileOutputStream; import java.io.OutputStream; import java.security.*; import java.util.Collections; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.transform.*; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import org.w3c.dom.Document; /** * This is a simple example of generating a Detached XML * Signature using the JSR 105 API. The resulting signature will look * like (key and signature values will be different): * *

 * 
 *   
 *     
 *     
 *     
 *       
 *       60NvZvtdTB+7UnlLp/H24p7h4bs=
 *     
 *   
 *   
 *     DpEylhQoiUKBoKWmYfajXO7LZxiDYgVtUtCNyTgwZgoChzorA2nhkQ==
 *   
 *   
 *     
 *       
 *	   

* rFto8uPQM6y34FLPmDh40BLJ1rVrC8VeRquuhPZ6jYNFkQuwxnu/wCvIAMhukPBL * FET8bJf/b2ef+oqxZajEb+88zlZoyG8g/wMfDBHTxz+CnowLahnCCTYBp5kt7G8q * UobJuvjylwj1st7V9Lsu03iXMXtbiriUjFa5gURasN8= *

* * kEjAFpCe4lcUOdwphpzf+tBaUds= * * * oe14R2OtyKx+s+60O5BRNMOYpIg2TU/f15N3bsDErKOWtKXeNK9FS7dWStreDxo2 * SSgOonqAd4FuJ/4uva7GgNL4ULIqY7E+mW5iwJ7n/WTELh98mEocsLXkNh24HcH4 * BZfSCTruuzmCyjdV1KSqX/Eux04HfCWYmdxN3SQ/qqw= * * * pA5NnZvcd574WRXuOA7ZfC/7Lqt4cB0MRLWtHubtJoVOao9ib5ry4rTk0r6ddnOv * AIGKktutzK3ymvKleS3DOrwZQgJ+/BDWDW8kO9R66o6rdjiSobBi/0c2V1+dkqOg * jFmKz395mvCOZGhC7fqAVhHat2EjGPMfgSZyABa7+1k= * *
*
*
*
*
*/ public class GenDetached { // // Synopsis: java GenDetached [output] // // where output is the name of the file that will contain the detached // signature. If not specified, standard output is used. // public static void main(String[] args) throws Exception { // First, create a DOM XMLSignatureFactory that will be used to // generate the XMLSignature and marshal it to DOM. String providerName = System.getProperty ("jsr105Provider", "org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI"); XMLSignatureFactory fac = XMLSignatureFactory.getInstance("DOM", (Provider) Class.forName(providerName).newInstance()); // Create a Reference to an external URI that will be digested // using the SHA1 digest algorithm Reference ref = fac.newReference( "http://www.w3.org/TR/xml-stylesheet", fac.newDigestMethod(DigestMethod.SHA1, null) ); // Create the SignedInfo SignedInfo si = fac.newSignedInfo( fac.newCanonicalizationMethod (CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS, (C14NMethodParameterSpec) null), fac.newSignatureMethod(SignatureMethod.DSA_SHA1, null), Collections.singletonList(ref)); // Create a DSA KeyPair KeyPairGenerator kpg = KeyPairGenerator.getInstance("DSA"); kpg.initialize(512); KeyPair kp = kpg.generateKeyPair(); // Create a KeyValue containing the DSA PublicKey that was generated KeyInfoFactory kif = fac.getKeyInfoFactory(); KeyValue kv = kif.newKeyValue(kp.getPublic()); // Create a KeyInfo and add the KeyValue to it KeyInfo ki = kif.newKeyInfo(Collections.singletonList(kv)); // Create the XMLSignature (but don't sign it yet) XMLSignature signature = fac.newXMLSignature(si, ki); // Create the Document that will hold the resulting XMLSignature DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); // must be set Document doc = dbf.newDocumentBuilder().newDocument(); // Create a DOMSignContext and set the signing Key to the DSA // PrivateKey and specify where the XMLSignature should be inserted // in the target document (in this case, the document root) DOMSignContext signContext = new DOMSignContext(kp.getPrivate(), doc); // Marshal, generate (and sign) the detached XMLSignature. The DOM // Document will contain the XML Signature if this method returns // successfully. signature.sign(signContext); // output the resulting document OutputStream os; if (args.length > 0) { os = new FileOutputStream(args[0]); } else { os = System.out; } TransformerFactory tf = TransformerFactory.newInstance(); Transformer trans = tf.newTransformer(); trans.transform(new DOMSource(doc), new StreamResult(os)); } } libxml-security-java-1.5.6/samples/javax/xml/crypto/dsig/samples/GenEnveloped.java0000644000175000017500000001466611661560700027066 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package javax.xml.crypto.dsig.samples; import javax.xml.crypto.*; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dom.*; import javax.xml.crypto.dsig.dom.DOMSignContext; import javax.xml.crypto.dsig.keyinfo.*; import javax.xml.crypto.dsig.spec.*; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.OutputStream; import java.security.*; import java.util.Collections; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.transform.*; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import org.w3c.dom.Document; /** * This is a simple example of generating an Enveloped XML * Signature using the JSR 105 API. The resulting signature will look * like (key and signature values will be different): * *

 *
 * 
 *   
 *     
 *     
 *     
 *       
 *         
 *       
 *       
 *       K8M/lPbKnuMDsO0Uzuj75lQtzQI=
 *     
 *   
 *   
 *     DpEylhQoiUKBoKWmYfajXO7LZxiDYgVtUtCNyTgwZgoChzorA2nhkQ==
 *   
 *   
 *     
 *       
 *         

* rFto8uPQM6y34FLPmDh40BLJ1rVrC8VeRquuhPZ6jYNFkQuwxnu/wCvIAMhukPBL * FET8bJf/b2ef+oqxZajEb+88zlZoyG8g/wMfDBHTxz+CnowLahnCCTYBp5kt7G8q * UobJuvjylwj1st7V9Lsu03iXMXtbiriUjFa5gURasN8= *

* * kEjAFpCe4lcUOdwphpzf+tBaUds= * * * oe14R2OtyKx+s+60O5BRNMOYpIg2TU/f15N3bsDErKOWtKXeNK9FS7dWStreDxo2 * SSgOonqAd4FuJ/4uva7GgNL4ULIqY7E+mW5iwJ7n/WTELh98mEocsLXkNh24HcH4 * BZfSCTruuzmCyjdV1KSqX/Eux04HfCWYmdxN3SQ/qqw= * * * pA5NnZvcd574WRXuOA7ZfC/7Lqt4cB0MRLWtHubtJoVOao9ib5ry4rTk0r6ddnOv * AIGKktutzK3ymvKleS3DOrwZQgJ+/BDWDW8kO9R66o6rdjiSobBi/0c2V1+dkqOg * jFmKz395mvCOZGhC7fqAVhHat2EjGPMfgSZyABa7+1k= * *
*
*
*
*
*
*/ public class GenEnveloped { // // Synopsis: java GenEnveloped [document] [output] // // where "document" is the name of a file containing the XML document // to be signed, and "output" is the name of the file to store the // signed document. The 2nd argument is optional - if not specified, // standard output will be used. // public static void main(String[] args) throws Exception { // Create a DOM XMLSignatureFactory that will be used to generate the // enveloped signature String providerName = System.getProperty ("jsr105Provider", "org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI"); XMLSignatureFactory fac = XMLSignatureFactory.getInstance("DOM", (Provider) Class.forName(providerName).newInstance()); // Create a Reference to the enveloped document (in this case we are // signing the whole document, so a URI of "" signifies that) and // also specify the SHA1 digest algorithm and the ENVELOPED Transform. Reference ref = fac.newReference ("", fac.newDigestMethod(DigestMethod.SHA1, null), Collections.singletonList (fac.newTransform (Transform.ENVELOPED, (TransformParameterSpec) null)), null, null); // Create the SignedInfo SignedInfo si = fac.newSignedInfo (fac.newCanonicalizationMethod (CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS, (C14NMethodParameterSpec) null), fac.newSignatureMethod(SignatureMethod.DSA_SHA1, null), Collections.singletonList(ref)); // Create a DSA KeyPair KeyPairGenerator kpg = KeyPairGenerator.getInstance("DSA"); kpg.initialize(512); KeyPair kp = kpg.generateKeyPair(); // Create a KeyValue containing the DSA PublicKey that was generated KeyInfoFactory kif = fac.getKeyInfoFactory(); KeyValue kv = kif.newKeyValue(kp.getPublic()); // Create a KeyInfo and add the KeyValue to it KeyInfo ki = kif.newKeyInfo(Collections.singletonList(kv)); // Instantiate the document to be signed DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); Document doc = dbf.newDocumentBuilder().parse(new FileInputStream(args[0])); // Create a DOMSignContext and specify the DSA PrivateKey and // location of the resulting XMLSignature's parent element DOMSignContext dsc = new DOMSignContext (kp.getPrivate(), doc.getDocumentElement()); // Create the XMLSignature (but don't sign it yet) XMLSignature signature = fac.newXMLSignature(si, ki); // Marshal, generate (and sign) the enveloped signature signature.sign(dsc); // output the resulting document OutputStream os; if (args.length > 1) { os = new FileOutputStream(args[1]); } else { os = System.out; } TransformerFactory tf = TransformerFactory.newInstance(); Transformer trans = tf.newTransformer(); trans.transform(new DOMSource(doc), new StreamResult(os)); } } libxml-security-java-1.5.6/contrib/0000755000175000017500000000000012273503736016012 5ustar tonytonylibxml-security-java-1.5.6/contrib/santuario-release.sh0000755000175000017500000000422211672621135021770 0ustar tonytony#!/bin/sh # # Copyright (c) The Apache Software Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # if [ -z "${SANTUARIO_SRC_ROOT}" ] then echo "Assuming Santuario source tree is the CWD..." SANTUARIO_SRC_ROOT=`pwd` fi if [ -z "${SANTUARIO_VERSION}" ] then SANTUARIO_VERSION=SNAPSHOT echo "Setting SANTUARIO_VERSION to ${SANTUARIO_VERSION}" fi if [ -z "${SANTUARIO_STAGE_ROOT}" ] then SANTUARIO_STAGE_ROOT=/tmp/$(id -u -nr)/stage_santuario/${SANTUARIO_VERSION} echo "Setting SANTUARIO_STAGE_ROOT to ${SANTUARIO_STAGE_ROOT}" fi # # set up the staging area # rm -rf ${SANTUARIO_STAGE_ROOT} mkdir -p ${SANTUARIO_STAGE_ROOT}/dist mkdir -p ${SANTUARIO_STAGE_ROOT}/maven/org/apache/santuario/xmlsec/${SANTUARIO_VERSION} # # Build and stage through maven; copy the Jartifact built by Maven to the dist # cd ${SANTUARIO_SRC_ROOT} mvn clean || exit 1 mvn -Prelease install || exit 1 cp -r ${M2_REPO}/org/apache/santuario/xmlsec/${SANTUARIO_VERSION} ${SANTUARIO_STAGE_ROOT}/maven/org/apache/santuario/xmlsec # # Build and stage the distribution using ant # ant clean compile ant build.jar cp -r ${M2_REPO}/org/apache/santuario/xmlsec/${SANTUARIO_VERSION}/xmlsec-${SANTUARIO_VERSION}.jar build ant dist || exit 1 cp -r build/*.zip ${SANTUARIO_STAGE_ROOT}/dist # # Sign and hash the release bits # cd ${SANTUARIO_STAGE_ROOT}/dist for i in * do gpg --detach-sign --armor $i gpg --verify $i.asc done for i in *.zip do md5sum $i > $i.md5 done cd ${SANTUARIO_STAGE_ROOT}/maven/org/apache/santuario/xmlsec/${SANTUARIO_VERSION} for i in * do gpg --detach-sign --armor $i gpg --verify $i.asc done for i in *.jar *.pom do md5sum $i > $i.md5 done libxml-security-java-1.5.6/.settings/0000755000175000017500000000000012273503736016270 5ustar tonytonylibxml-security-java-1.5.6/.settings/org.eclipse.jdt.core.prefs0000644000175000017500000005371511517572127023265 0ustar tonytony#Tue Jan 25 10:14:10 GMT 2011 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=1.5 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.source=1.5 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=18 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=18 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=18 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=0 org.eclipse.jdt.core.formatter.alignment_for_binary_expression=18 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=32 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=49 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=18 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=18 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=18 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 org.eclipse.jdt.core.formatter.blank_lines_after_package=1 org.eclipse.jdt.core.formatter.blank_lines_before_field=0 org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 org.eclipse.jdt.core.formatter.blank_lines_before_method=1 org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 org.eclipse.jdt.core.formatter.blank_lines_before_package=0 org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true org.eclipse.jdt.core.formatter.comment.format_block_comments=true org.eclipse.jdt.core.formatter.comment.format_header=false org.eclipse.jdt.core.formatter.comment.format_html=true org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true org.eclipse.jdt.core.formatter.comment.format_line_comments=true org.eclipse.jdt.core.formatter.comment.format_source_code=true org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true org.eclipse.jdt.core.formatter.comment.indent_root_tags=true org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert org.eclipse.jdt.core.formatter.comment.line_length=110 org.eclipse.jdt.core.formatter.compact_else_if=true org.eclipse.jdt.core.formatter.continuation_indentation=1 org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=1 org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_empty_lines=false org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false org.eclipse.jdt.core.formatter.indentation.size=8 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=do not insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.join_lines_in_comments=true org.eclipse.jdt.core.formatter.join_wrapped_lines=true org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false org.eclipse.jdt.core.formatter.lineSplit=110 org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true org.eclipse.jdt.core.formatter.tabulation.char=space org.eclipse.jdt.core.formatter.tabulation.size=4 org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true libxml-security-java-1.5.6/libs/0000755000175000017500000000000012273503736015303 5ustar tonytonylibxml-security-java-1.5.6/libs/xml-apis.NOTICE.txt0000644000175000017500000000143110312074505020542 0ustar tonytony ========================================================================= == NOTICE file corresponding to section 4(d) of the Apache License, == == Version 2.0, in this case for the Apache xml-commons xml-apis == == distribution. == ========================================================================= This product includes software developed by The Apache Software Foundation (http://www.apache.org/). Portions of this software were originally based on the following: - software copyright (c) 1999, IBM Corporation., http://www.ibm.com. - software copyright (c) 1999, Sun Microsystems., http://www.sun.com. - software copyright (c) 2000 World Wide Web Consortium, http://www.w3.org libxml-security-java-1.5.6/libs/commons-logging.LICENSE.txt0000644000175000017500000002613610312074505022221 0ustar tonytony Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. libxml-security-java-1.5.6/libs/xercesImpl.LICENSE.txt0000644000175000017500000002613510312074505021234 0ustar tonytony Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. libxml-security-java-1.5.6/libs/xalan.LICENSE.txt0000644000175000017500000002613610312074505020225 0ustar tonytony Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. libxml-security-java-1.5.6/libs/serializer.LICENSE.txt0000644000175000017500000002613510312074505021272 0ustar tonytony Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. libxml-security-java-1.5.6/libs/.cvsignore0000644000175000017500000000002110022663342017262 0ustar tonytonyjce*.jar bc*.jar libxml-security-java-1.5.6/libs/serializer.NOTICE.txt0000644000175000017500000000154210312074505021164 0ustar tonytony ========================================================================= == NOTICE file corresponding to section 4(d) of the Apache License, == == Version 2.0, in this case for the Apache Xalan serializer == == distribution. == ========================================================================= This product includes software developed by IBM Corporation (http://www.ibm.com) and The Apache Software Foundation (http://www.apache.org/). Portions of this software was originally based on the following: - software copyright (c) 1999-2002, Lotus Development Corporation., http://www.lotus.com. - software copyright (c) 2001-2002, Sun Microsystems., http://www.sun.com. - software copyright (c) 2003, IBM Corporation., http://www.ibm.com. libxml-security-java-1.5.6/libs/xml-apis.LICENSE.txt0000644000175000017500000002613510312074505020653 0ustar tonytony Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. libxml-security-java-1.5.6/libs/xalan.NOTICE.txt0000644000175000017500000000414610312074505020121 0ustar tonytony ========================================================================= == NOTICE file corresponding to section 4(d) of the Apache License, == == Version 2.0, in this case for the Apache Xalan distribution. == ========================================================================= This product includes software developed by The Apache Software Foundation (http://www.apache.org/). Portions of this software was originally based on the following: - software copyright (c) 1999-2002, Lotus Development Corporation., http://www.lotus.com. - software copyright (c) 2001-2002, Sun Microsystems., http://www.sun.com. - software copyright (c) 2003, IBM Corporation., http://www.ibm.com. - voluntary contributions made by Ovidiu Predescu on behalf of the Apache Software Foundation that was originally developed at Hewlett Packard Company. The binary distribution package (ie. jars, samples and documentation) of this product includes software developed by the following: - The Apache Software Foundation - Xerces Java - see xercesImpl.README.txt - JAXP 1.3 APIs - see xml-apis.README.txt - Bytecode Engineering Library - see BCEL.README.txt - Regular Expression - see regexp.README.txt - Scott Hudson, Frank Flannery, C. Scott Ananian - CUP Parser Generator runtime (javacup\runtime) - see runtime.README.txt The source distribution package (ie. all source and tools required to build Xalan Java) of this product includes software developed by the following: - The Apache Software Foundation - Xerces Java - see xercesImpl.README.txt - JAXP 1.3 APIs - see xml-apis.README.txt - Bytecode Engineering Library - see BCEL.README.txt - Regular Expression - see regexp.README.txt - Ant - see ant.README.txt - Stylebook doc tool - see stylebook-1.0-b3_xalan-2.README.txt - Elliot Joel Berk and C. Scott Ananian - Lexical Analyzer Generator (JLex) - see JLex.README.txt libxml-security-java-1.5.6/libs/commons-logging.NOTICE.txt0000644000175000017500000000014610312074505022111 0ustar tonytonyThis product includes software developed by The Apache Software Foundation (http://www.apache.org/). libxml-security-java-1.5.6/libs/xercesImpl.NOTICE.txt0000644000175000017500000000146210312074505021127 0ustar tonytony ========================================================================= == NOTICE file corresponding to section 4(d) of the Apache License, == == Version 2.0, in this case for the Apache Xerces distribution. == ========================================================================= This product includes software developed by The Apache Software Foundation (http://www.apache.org/). Portions of this software were originally based on the following: - software copyright (c) 1999, IBM Corporation., http://www.ibm.com. - software copyright (c) 1999, Sun Microsystems., http://www.sun.com. - voluntary contributions made by Paul Eng on behalf of the Apache Software Foundation that were originally developed at iClick, Inc., software copyright (c) 1999.libxml-security-java-1.5.6/.cvsignore0000644000175000017500000000005310162773106016343 0ustar tonytony.classpath .project *.properties build bin libxml-security-java-1.5.6/LICENSE0000644000175000017500000002613610011351505015346 0ustar tonytony Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. libxml-security-java-1.5.6/src/0000755000175000017500000000000012273503733015136 5ustar tonytonylibxml-security-java-1.5.6/src/main/0000755000175000017500000000000012273503733016062 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/0000755000175000017500000000000012273503733017003 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/0000755000175000017500000000000012273503733017572 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/0000755000175000017500000000000012273503733021013 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/jcp/0000755000175000017500000000000012273503733021567 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/0000755000175000017500000000000012273503733022367 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/0000755000175000017500000000000012273503733023315 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/0000755000175000017500000000000012273503733025131 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/SignerOutputStream.java0000644000175000017500000000371611654523221031623 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: SignerOutputStream.java,v 1.2 2005/09/15 14:29:02 mullan Exp $ */ package org.apache.jcp.xml.dsig.internal; import java.io.ByteArrayOutputStream; import java.security.Signature; import java.security.SignatureException; /** * Derived from Apache sources and changed to use java.security.Signature * objects as input instead of * org.apache.xml.security.algorithms.SignatureAlgorithm objects. * * @author raul * @author Sean Mullan */ public class SignerOutputStream extends ByteArrayOutputStream { private final Signature sig; public SignerOutputStream(Signature sig) { this.sig = sig; } @Override public void write(int arg0) { super.write(arg0); try { sig.update((byte)arg0); } catch (SignatureException e) { throw new RuntimeException(e); } } @Override public void write(byte[] arg0, int arg1, int arg2) { super.write(arg0, arg1, arg2); try { sig.update(arg0, arg1, arg2); } catch (SignatureException e) { throw new RuntimeException(e); } } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/0000755000175000017500000000000012273503733025710 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/Utils.java0000644000175000017500000000710312162344464027655 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: Utils.java 1496535 2013-06-25 16:45:40Z mullan $ */ package org.apache.jcp.xml.dsig.internal.dom; import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.io.IOException; import java.util.*; import javax.xml.crypto.XMLCryptoContext; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; /** * Miscellaneous static utility methods for use in JSR 105 RI. * * @author Sean Mullan */ public final class Utils { private Utils() {} public static byte[] readBytesFromStream(InputStream is) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); byte[] buf = new byte[1024]; while (true) { int read = is.read(buf); if (read == -1) { // EOF break; } baos.write(buf, 0, read); if (read < 1024) { break; } } return baos.toByteArray(); } /** * Converts an Iterator to a Set of Nodes, according to the XPath * Data Model. * * @param i the Iterator * @return the Set of Nodes */ static Set toNodeSet(Iterator i) { Set nodeSet = new HashSet(); while (i.hasNext()) { Node n = i.next(); nodeSet.add(n); // insert attributes nodes to comply with XPath if (n.getNodeType() == Node.ELEMENT_NODE) { NamedNodeMap nnm = n.getAttributes(); for (int j = 0, length = nnm.getLength(); j < length; j++) { nodeSet.add(nnm.item(j)); } } } return nodeSet; } /** * Returns the ID from a same-document URI (ex: "#id") */ public static String parseIdFromSameDocumentURI(String uri) { if (uri.length() == 0) { return null; } String id = uri.substring(1); if (id != null && id.startsWith("xpointer(id(")) { int i1 = id.indexOf('\''); int i2 = id.indexOf('\'', i1+1); id = id.substring(i1+1, i2); } return id; } /** * Returns true if uri is a same-document URI, false otherwise. */ public static boolean sameDocumentURI(String uri) { return (uri != null && (uri.length() == 0 || uri.charAt(0) == '#')); } static boolean secureValidation(XMLCryptoContext xc) { if (xc == null) { return false; } return getBoolean(xc, "org.apache.jcp.xml.dsig.secureValidation"); } private static boolean getBoolean(XMLCryptoContext xc, String name) { Boolean value = (Boolean)xc.getProperty(name); return (value != null && value.booleanValue()); } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheNodeSetData.java0000644000175000017500000000606212162331204032001 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: ApacheNodeSetData.java 1496512 2013-06-25 15:08:52Z mullan $ */ package org.apache.jcp.xml.dsig.internal.dom; import java.util.Collections; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; import javax.xml.crypto.NodeSetData; import org.w3c.dom.Node; import org.apache.xml.security.signature.NodeFilter; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.utils.XMLUtils; public class ApacheNodeSetData implements ApacheData, NodeSetData { private XMLSignatureInput xi; public ApacheNodeSetData(XMLSignatureInput xi) { this.xi = xi; } public Iterator iterator() { // If nodefilters are set, must execute them first to create node-set if (xi.getNodeFilters() != null && !xi.getNodeFilters().isEmpty()) { return Collections.unmodifiableSet (getNodeSet(xi.getNodeFilters())).iterator(); } try { return Collections.unmodifiableSet(xi.getNodeSet()).iterator(); } catch (Exception e) { // should not occur throw new RuntimeException ("unrecoverable error retrieving nodeset", e); } } public XMLSignatureInput getXMLSignatureInput() { return xi; } private Set getNodeSet(List nodeFilters) { if (xi.isNeedsToBeExpanded()) { XMLUtils.circumventBug2650 (XMLUtils.getOwnerDocument(xi.getSubNode())); } Set inputSet = new LinkedHashSet(); XMLUtils.getSet(xi.getSubNode(), inputSet, null, !xi.isExcludeComments()); Set nodeSet = new LinkedHashSet(); for (Node currentNode : inputSet) { Iterator it = nodeFilters.iterator(); boolean skipNode = false; while (it.hasNext() && !skipNode) { NodeFilter nf = it.next(); if (nf.isNodeInclude(currentNode) != 1) { skipNode = true; } } if (!skipNode) { nodeSet.add(currentNode); } } return nodeSet; } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignedInfo.java0000644000175000017500000002647012236002743031143 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMSignedInfo.java 1538756 2013-11-04 20:38:59Z mullan $ */ package org.apache.jcp.xml.dsig.internal.dom; import javax.xml.crypto.*; import javax.xml.crypto.dom.DOMCryptoContext; import javax.xml.crypto.dsig.*; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.io.OutputStream; import java.io.IOException; import java.security.Provider; import java.util.*; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.apache.xml.security.utils.Base64; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.UnsyncBufferedOutputStream; /** * DOM-based implementation of SignedInfo. * * @author Sean Mullan */ public final class DOMSignedInfo extends DOMStructure implements SignedInfo { /** * The maximum number of references per Manifest, if secure validation is enabled. */ public static final int MAXIMUM_REFERENCE_COUNT = 30; private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(DOMSignedInfo.class); /** Signature - NOT Recommended RSAwithMD5 */ private static final String ALGO_ID_SIGNATURE_NOT_RECOMMENDED_RSA_MD5 = Constants.MoreAlgorithmsSpecNS + "rsa-md5"; /** HMAC - NOT Recommended HMAC-MD5 */ private static final String ALGO_ID_MAC_HMAC_NOT_RECOMMENDED_MD5 = Constants.MoreAlgorithmsSpecNS + "hmac-md5"; private List references; private CanonicalizationMethod canonicalizationMethod; private SignatureMethod signatureMethod; private String id; private Document ownerDoc; private Element localSiElem; private InputStream canonData; /** * Creates a DOMSignedInfo from the specified parameters. Use * this constructor when the Id is not specified. * * @param cm the canonicalization method * @param sm the signature method * @param references the list of references. The list is copied. * @throws NullPointerException if * cm, sm, or references is * null * @throws IllegalArgumentException if references is empty * @throws ClassCastException if any of the references are not of * type Reference */ public DOMSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List references) { if (cm == null || sm == null || references == null) { throw new NullPointerException(); } this.canonicalizationMethod = cm; this.signatureMethod = sm; this.references = Collections.unmodifiableList( new ArrayList(references)); if (this.references.isEmpty()) { throw new IllegalArgumentException("list of references must " + "contain at least one entry"); } for (int i = 0, size = this.references.size(); i < size; i++) { Object obj = this.references.get(i); if (!(obj instanceof Reference)) { throw new ClassCastException("list of references contains " + "an illegal type"); } } } /** * Creates a DOMSignedInfo from the specified parameters. * * @param cm the canonicalization method * @param sm the signature method * @param references the list of references. The list is copied. * @param id an optional identifer that will allow this * SignedInfo to be referenced by other signatures and * objects * @throws NullPointerException if cm, sm, * or references is null * @throws IllegalArgumentException if references is empty * @throws ClassCastException if any of the references are not of * type Reference */ public DOMSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List references, String id) { this(cm, sm, references); this.id = id; } /** * Creates a DOMSignedInfo from an element. * * @param siElem a SignedInfo element */ public DOMSignedInfo(Element siElem, XMLCryptoContext context, Provider provider) throws MarshalException { localSiElem = siElem; ownerDoc = siElem.getOwnerDocument(); // get Id attribute, if specified id = DOMUtils.getAttributeValue(siElem, "Id"); // unmarshal CanonicalizationMethod Element cmElem = DOMUtils.getFirstChildElement(siElem, "CanonicalizationMethod"); canonicalizationMethod = new DOMCanonicalizationMethod(cmElem, context, provider); // unmarshal SignatureMethod Element smElem = DOMUtils.getNextSiblingElement(cmElem, "SignatureMethod"); signatureMethod = DOMSignatureMethod.unmarshal(smElem); boolean secVal = Utils.secureValidation(context); String signatureMethodAlgorithm = signatureMethod.getAlgorithm(); if (secVal && ((ALGO_ID_MAC_HMAC_NOT_RECOMMENDED_MD5.equals(signatureMethodAlgorithm) || ALGO_ID_SIGNATURE_NOT_RECOMMENDED_RSA_MD5.equals(signatureMethodAlgorithm)))) { throw new MarshalException( "It is forbidden to use algorithm " + signatureMethod + " when secure validation is enabled" ); } // unmarshal References ArrayList refList = new ArrayList(5); Element refElem = DOMUtils.getNextSiblingElement(smElem, "Reference"); refList.add(new DOMReference(refElem, context, provider)); refElem = DOMUtils.getNextSiblingElement(refElem); while (refElem != null) { String name = refElem.getLocalName(); if (!name.equals("Reference")) { throw new MarshalException("Invalid element name: " + name + ", expected Reference"); } refList.add(new DOMReference(refElem, context, provider)); if (secVal && (refList.size() > MAXIMUM_REFERENCE_COUNT)) { String error = "A maxiumum of " + MAXIMUM_REFERENCE_COUNT + " " + "references per Manifest are allowed with secure validation"; throw new MarshalException(error); } refElem = DOMUtils.getNextSiblingElement(refElem); } references = Collections.unmodifiableList(refList); } public CanonicalizationMethod getCanonicalizationMethod() { return canonicalizationMethod; } public SignatureMethod getSignatureMethod() { return signatureMethod; } public String getId() { return id; } public List getReferences() { return references; } public InputStream getCanonicalizedData() { return canonData; } public void canonicalize(XMLCryptoContext context, ByteArrayOutputStream bos) throws XMLSignatureException { if (context == null) { throw new NullPointerException("context cannot be null"); } OutputStream os = new UnsyncBufferedOutputStream(bos); try { os.close(); } catch (IOException e) { if (log.isDebugEnabled()) { log.debug(e); } // Impossible } DOMSubTreeData subTree = new DOMSubTreeData(localSiElem, true); try { ((DOMCanonicalizationMethod) canonicalizationMethod).canonicalize(subTree, context, bos); } catch (TransformException te) { throw new XMLSignatureException(te); } byte[] signedInfoBytes = bos.toByteArray(); // this whole block should only be done if logging is enabled if (log.isDebugEnabled()) { log.debug("Canonicalized SignedInfo:"); StringBuilder sb = new StringBuilder(signedInfoBytes.length); for (int i = 0; i < signedInfoBytes.length; i++) { sb.append((char)signedInfoBytes[i]); } log.debug(sb.toString()); log.debug("Data to be signed/verified:" + Base64.encode(signedInfoBytes)); } this.canonData = new ByteArrayInputStream(signedInfoBytes); } public void marshal(Node parent, String dsPrefix, DOMCryptoContext context) throws MarshalException { ownerDoc = DOMUtils.getOwnerDocument(parent); Element siElem = DOMUtils.createElement(ownerDoc, "SignedInfo", XMLSignature.XMLNS, dsPrefix); // create and append CanonicalizationMethod element DOMCanonicalizationMethod dcm = (DOMCanonicalizationMethod)canonicalizationMethod; dcm.marshal(siElem, dsPrefix, context); // create and append SignatureMethod element ((DOMStructure)signatureMethod).marshal(siElem, dsPrefix, context); // create and append Reference elements for (Reference reference : references) { ((DOMReference)reference).marshal(siElem, dsPrefix, context); } // append Id attribute DOMUtils.setAttributeID(siElem, "Id", id); parent.appendChild(siElem); localSiElem = siElem; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof SignedInfo)) { return false; } SignedInfo osi = (SignedInfo)o; boolean idEqual = (id == null ? osi.getId() == null : id.equals(osi.getId())); return (canonicalizationMethod.equals(osi.getCanonicalizationMethod()) && signatureMethod.equals(osi.getSignatureMethod()) && references.equals(osi.getReferences()) && idEqual); } @Override public int hashCode() { int result = 17; if (id != null) { result = 31 * result + id.hashCode(); } result = 31 * result + canonicalizationMethod.hashCode(); result = 31 * result + signatureMethod.hashCode(); result = 31 * result + references.hashCode(); return result; } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMReference.java0000644000175000017500000006222312236002743031010 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Portions copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * =========================================================================== * * (C) Copyright IBM Corp. 2003 All Rights Reserved. * * =========================================================================== */ /* * $Id: DOMReference.java 1538756 2013-11-04 20:38:59Z mullan $ */ package org.apache.jcp.xml.dsig.internal.dom; import javax.xml.crypto.*; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dom.DOMCryptoContext; import javax.xml.crypto.dom.DOMURIReference; import java.io.*; import java.net.URI; import java.net.URISyntaxException; import java.security.*; import java.util.*; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.apache.jcp.xml.dsig.internal.DigesterOutputStream; import org.apache.xml.security.algorithms.MessageDigestAlgorithm; import org.apache.xml.security.exceptions.Base64DecodingException; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.utils.Base64; import org.apache.xml.security.utils.UnsyncBufferedOutputStream; /** * DOM-based implementation of Reference. * * @author Sean Mullan * @author Joyce Leung */ public final class DOMReference extends DOMStructure implements Reference, DOMURIReference { /** * The maximum number of transforms per reference, if secure validation is enabled. */ public static final int MAXIMUM_TRANSFORM_COUNT = 5; /** * Look up useC14N11 system property. If true, an explicit C14N11 transform * will be added if necessary when generating the signature. See section * 3.1.1 of http://www.w3.org/2007/xmlsec/Drafts/xmldsig-core/ for more info. * * If true, overrides the same property if set in the XMLSignContext. */ private static boolean useC14N11 = AccessController.doPrivileged(new PrivilegedAction() { public Boolean run() { return Boolean.valueOf(Boolean.getBoolean ("com.sun.org.apache.xml.internal.security.useC14N11")); } }); private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(DOMReference.class); private final DigestMethod digestMethod; private final String id; private final List transforms; private List allTransforms; private final Data appliedTransformData; private Attr here; private final String uri; private final String type; private byte[] digestValue; private byte[] calcDigestValue; private Element refElem; private boolean digested = false; private boolean validated = false; private boolean validationStatus; private Data derefData; private InputStream dis; private MessageDigest md; private Provider provider; /** * Creates a Reference from the specified parameters. * * @param uri the URI (may be null) * @param type the type (may be null) * @param dm the digest method * @param transforms a list of {@link Transform}s. The list * is defensively copied to protect against subsequent modification. * May be null or empty. * @param id the reference ID (may be null) * @return a Reference * @throws NullPointerException if dm is null * @throws ClassCastException if any of the transforms are * not of type Transform */ public DOMReference(String uri, String type, DigestMethod dm, List transforms, String id, Provider provider) { this(uri, type, dm, null, null, transforms, id, null, provider); } public DOMReference(String uri, String type, DigestMethod dm, List appliedTransforms, Data result, List transforms, String id, Provider provider) { this(uri, type, dm, appliedTransforms, result, transforms, id, null, provider); } public DOMReference(String uri, String type, DigestMethod dm, List appliedTransforms, Data result, List transforms, String id, byte[] digestValue, Provider provider) { if (dm == null) { throw new NullPointerException("DigestMethod must be non-null"); } if (appliedTransforms == null) { this.allTransforms = new ArrayList(); } else { this.allTransforms = new ArrayList(appliedTransforms); for (int i = 0, size = this.allTransforms.size(); i < size; i++) { if (!(this.allTransforms.get(i) instanceof Transform)) { throw new ClassCastException ("appliedTransforms["+i+"] is not a valid type"); } } } if (transforms == null) { this.transforms = Collections.emptyList(); } else { this.transforms = new ArrayList(transforms); for (int i = 0, size = this.transforms.size(); i < size; i++) { if (!(this.transforms.get(i) instanceof Transform)) { throw new ClassCastException ("transforms["+i+"] is not a valid type"); } } this.allTransforms.addAll(this.transforms); } this.digestMethod = dm; this.uri = uri; if ((uri != null) && (!uri.equals(""))) { try { new URI(uri); } catch (URISyntaxException e) { throw new IllegalArgumentException(e.getMessage()); } } this.type = type; this.id = id; if (digestValue != null) { this.digestValue = (byte[])digestValue.clone(); this.digested = true; } this.appliedTransformData = result; this.provider = provider; } /** * Creates a DOMReference from an element. * * @param refElem a Reference element */ public DOMReference(Element refElem, XMLCryptoContext context, Provider provider) throws MarshalException { boolean secVal = Utils.secureValidation(context); // unmarshal Transforms, if specified Element nextSibling = DOMUtils.getFirstChildElement(refElem); List transforms = new ArrayList(5); if (nextSibling.getLocalName().equals("Transforms")) { Element transformElem = DOMUtils.getFirstChildElement(nextSibling, "Transform"); transforms.add(new DOMTransform(transformElem, context, provider)); transformElem = DOMUtils.getNextSiblingElement(transformElem); while (transformElem != null) { String localName = transformElem.getLocalName(); if (!localName.equals("Transform")) { throw new MarshalException( "Invalid element name: " + localName + ", expected Transform"); } transforms.add (new DOMTransform(transformElem, context, provider)); if (secVal && (transforms.size() > MAXIMUM_TRANSFORM_COUNT)) { String error = "A maxiumum of " + MAXIMUM_TRANSFORM_COUNT + " " + "transforms per Reference are allowed with secure validation"; throw new MarshalException(error); } transformElem = DOMUtils.getNextSiblingElement(transformElem); } nextSibling = DOMUtils.getNextSiblingElement(nextSibling); } if (!nextSibling.getLocalName().equals("DigestMethod")) { throw new MarshalException("Invalid element name: " + nextSibling.getLocalName() + ", expected DigestMethod"); } // unmarshal DigestMethod Element dmElem = nextSibling; this.digestMethod = DOMDigestMethod.unmarshal(dmElem); String digestMethodAlgorithm = this.digestMethod.getAlgorithm(); if (secVal && MessageDigestAlgorithm.ALGO_ID_DIGEST_NOT_RECOMMENDED_MD5.equals(digestMethodAlgorithm)) { throw new MarshalException( "It is forbidden to use algorithm " + digestMethod + " when secure validation is enabled" ); } // unmarshal DigestValue Element dvElem = DOMUtils.getNextSiblingElement(dmElem, "DigestValue"); try { this.digestValue = Base64.decode(dvElem); } catch (Base64DecodingException bde) { throw new MarshalException(bde); } // check for extra elements if (DOMUtils.getNextSiblingElement(dvElem) != null) { throw new MarshalException( "Unexpected element after DigestValue element"); } // unmarshal attributes this.uri = DOMUtils.getAttributeValue(refElem, "URI"); Attr attr = refElem.getAttributeNodeNS(null, "Id"); if (attr != null) { this.id = attr.getValue(); refElem.setIdAttributeNode(attr, true); } else { this.id = null; } this.type = DOMUtils.getAttributeValue(refElem, "Type"); this.here = refElem.getAttributeNodeNS(null, "URI"); this.refElem = refElem; this.transforms = transforms; this.allTransforms = transforms; this.appliedTransformData = null; this.provider = provider; } public DigestMethod getDigestMethod() { return digestMethod; } public String getId() { return id; } public String getURI() { return uri; } public String getType() { return type; } public List getTransforms() { return Collections.unmodifiableList(allTransforms); } public byte[] getDigestValue() { return (digestValue == null ? null : (byte[])digestValue.clone()); } public byte[] getCalculatedDigestValue() { return (calcDigestValue == null ? null : (byte[])calcDigestValue.clone()); } public void marshal(Node parent, String dsPrefix, DOMCryptoContext context) throws MarshalException { if (log.isDebugEnabled()) { log.debug("Marshalling Reference"); } Document ownerDoc = DOMUtils.getOwnerDocument(parent); refElem = DOMUtils.createElement(ownerDoc, "Reference", XMLSignature.XMLNS, dsPrefix); // set attributes DOMUtils.setAttributeID(refElem, "Id", id); DOMUtils.setAttribute(refElem, "URI", uri); DOMUtils.setAttribute(refElem, "Type", type); // create and append Transforms element if (!allTransforms.isEmpty()) { Element transformsElem = DOMUtils.createElement(ownerDoc, "Transforms", XMLSignature.XMLNS, dsPrefix); refElem.appendChild(transformsElem); for (Transform transform : allTransforms) { ((DOMStructure)transform).marshal(transformsElem, dsPrefix, context); } } // create and append DigestMethod element ((DOMDigestMethod)digestMethod).marshal(refElem, dsPrefix, context); // create and append DigestValue element if (log.isDebugEnabled()) { log.debug("Adding digestValueElem"); } Element digestValueElem = DOMUtils.createElement(ownerDoc, "DigestValue", XMLSignature.XMLNS, dsPrefix); if (digestValue != null) { digestValueElem.appendChild (ownerDoc.createTextNode(Base64.encode(digestValue))); } refElem.appendChild(digestValueElem); parent.appendChild(refElem); here = refElem.getAttributeNodeNS(null, "URI"); } public void digest(XMLSignContext signContext) throws XMLSignatureException { Data data = null; if (appliedTransformData == null) { data = dereference(signContext); } else { data = appliedTransformData; } digestValue = transform(data, signContext); // insert digestValue into DigestValue element String encodedDV = Base64.encode(digestValue); if (log.isDebugEnabled()) { log.debug("Reference object uri = " + uri); } Element digestElem = DOMUtils.getLastChildElement(refElem); if (digestElem == null) { throw new XMLSignatureException("DigestValue element expected"); } DOMUtils.removeAllChildren(digestElem); digestElem.appendChild (refElem.getOwnerDocument().createTextNode(encodedDV)); digested = true; if (log.isDebugEnabled()) { log.debug("Reference digesting completed"); } } public boolean validate(XMLValidateContext validateContext) throws XMLSignatureException { if (validateContext == null) { throw new NullPointerException("validateContext cannot be null"); } if (validated) { return validationStatus; } Data data = dereference(validateContext); calcDigestValue = transform(data, validateContext); if (log.isDebugEnabled()) { log.debug("Expected digest: " + Base64.encode(digestValue)); log.debug("Actual digest: " + Base64.encode(calcDigestValue)); } validationStatus = Arrays.equals(digestValue, calcDigestValue); validated = true; return validationStatus; } public Data getDereferencedData() { return derefData; } public InputStream getDigestInputStream() { return dis; } private Data dereference(XMLCryptoContext context) throws XMLSignatureException { Data data = null; // use user-specified URIDereferencer if specified; otherwise use deflt URIDereferencer deref = context.getURIDereferencer(); if (deref == null) { deref = DOMURIDereferencer.INSTANCE; } try { data = deref.dereference(this, context); if (log.isDebugEnabled()) { log.debug("URIDereferencer class name: " + deref.getClass().getName()); log.debug("Data class name: " + data.getClass().getName()); } } catch (URIReferenceException ure) { throw new XMLSignatureException(ure); } return data; } private byte[] transform(Data dereferencedData, XMLCryptoContext context) throws XMLSignatureException { if (md == null) { try { md = MessageDigest.getInstance (((DOMDigestMethod)digestMethod).getMessageDigestAlgorithm()); } catch (NoSuchAlgorithmException nsae) { throw new XMLSignatureException(nsae); } } md.reset(); DigesterOutputStream dos; Boolean cache = (Boolean) context.getProperty("javax.xml.crypto.dsig.cacheReference"); if (cache != null && cache.booleanValue()) { this.derefData = copyDerefData(dereferencedData); dos = new DigesterOutputStream(md, true); } else { dos = new DigesterOutputStream(md); } OutputStream os = null; Data data = dereferencedData; try { os = new UnsyncBufferedOutputStream(dos); for (int i = 0, size = transforms.size(); i < size; i++) { DOMTransform transform = (DOMTransform)transforms.get(i); if (i < size - 1) { data = transform.transform(data, context); } else { data = transform.transform(data, context, os); } } if (data != null) { XMLSignatureInput xi; // explicitly use C14N 1.1 when generating signature // first check system property, then context property boolean c14n11 = useC14N11; String c14nalg = CanonicalizationMethod.INCLUSIVE; if (context instanceof XMLSignContext) { if (!c14n11) { Boolean prop = (Boolean)context.getProperty ("org.apache.xml.security.useC14N11"); c14n11 = (prop != null && prop.booleanValue()); if (c14n11) { c14nalg = "http://www.w3.org/2006/12/xml-c14n11"; } } else { c14nalg = "http://www.w3.org/2006/12/xml-c14n11"; } } if (data instanceof ApacheData) { xi = ((ApacheData)data).getXMLSignatureInput(); } else if (data instanceof OctetStreamData) { xi = new XMLSignatureInput (((OctetStreamData)data).getOctetStream()); } else if (data instanceof NodeSetData) { TransformService spi = null; if (provider == null) { spi = TransformService.getInstance(c14nalg, "DOM"); } else { try { spi = TransformService.getInstance(c14nalg, "DOM", provider); } catch (NoSuchAlgorithmException nsae) { spi = TransformService.getInstance(c14nalg, "DOM"); } } data = spi.transform(data, context); xi = new XMLSignatureInput (((OctetStreamData)data).getOctetStream()); } else { throw new XMLSignatureException("unrecognized Data type"); } boolean secVal = Utils.secureValidation(context); xi.setSecureValidation(secVal); if (context instanceof XMLSignContext && c14n11 && !xi.isOctetStream() && !xi.isOutputStreamSet()) { TransformService spi = null; if (provider == null) { spi = TransformService.getInstance(c14nalg, "DOM"); } else { try { spi = TransformService.getInstance(c14nalg, "DOM", provider); } catch (NoSuchAlgorithmException nsae) { spi = TransformService.getInstance(c14nalg, "DOM"); } } DOMTransform t = new DOMTransform(spi); Element transformsElem = null; String dsPrefix = DOMUtils.getSignaturePrefix(context); if (allTransforms.isEmpty()) { transformsElem = DOMUtils.createElement( refElem.getOwnerDocument(), "Transforms", XMLSignature.XMLNS, dsPrefix); refElem.insertBefore(transformsElem, DOMUtils.getFirstChildElement(refElem)); } else { transformsElem = DOMUtils.getFirstChildElement(refElem); } t.marshal(transformsElem, dsPrefix, (DOMCryptoContext)context); allTransforms.add(t); xi.updateOutputStream(os, true); } else { xi.updateOutputStream(os); } } os.flush(); if (cache != null && cache.booleanValue()) { this.dis = dos.getInputStream(); } return dos.getDigestValue(); } catch (NoSuchAlgorithmException e) { throw new XMLSignatureException(e); } catch (TransformException e) { throw new XMLSignatureException(e); } catch (MarshalException e) { throw new XMLSignatureException(e); } catch (IOException e) { throw new XMLSignatureException(e); } catch (org.apache.xml.security.c14n.CanonicalizationException e) { throw new XMLSignatureException(e); } finally { if (os != null) { try { os.close(); } catch (IOException e) { throw new XMLSignatureException(e); } } if (dos != null) { try { dos.close(); } catch (IOException e) { throw new XMLSignatureException(e); } } } } public Node getHere() { return here; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Reference)) { return false; } Reference oref = (Reference)o; boolean idsEqual = (id == null ? oref.getId() == null : id.equals(oref.getId())); boolean urisEqual = (uri == null ? oref.getURI() == null : uri.equals(oref.getURI())); boolean typesEqual = (type == null ? oref.getType() == null : type.equals(oref.getType())); boolean digestValuesEqual = Arrays.equals(digestValue, oref.getDigestValue()); return digestMethod.equals(oref.getDigestMethod()) && idsEqual && urisEqual && typesEqual && allTransforms.equals(oref.getTransforms()) && digestValuesEqual; } @Override public int hashCode() { int result = 17; if (id != null) { result = 31 * result + id.hashCode(); } if (uri != null) { result = 31 * result + uri.hashCode(); } if (type != null) { result = 31 * result + type.hashCode(); } if (digestValue != null) { result = 31 * result + Arrays.hashCode(digestValue); } result = 31 * result + digestMethod.hashCode(); result = 31 * result + allTransforms.hashCode(); return result; } boolean isDigested() { return digested; } private static Data copyDerefData(Data dereferencedData) { if (dereferencedData instanceof ApacheData) { // need to make a copy of the Data ApacheData ad = (ApacheData)dereferencedData; XMLSignatureInput xsi = ad.getXMLSignatureInput(); if (xsi.isNodeSet()) { try { final Set s = xsi.getNodeSet(); return new NodeSetData() { public Iterator iterator() { return s.iterator(); } }; } catch (Exception e) { // log a warning log.warn("cannot cache dereferenced data: " + e); return null; } } else if (xsi.isElement()) { return new DOMSubTreeData (xsi.getSubNode(), xsi.isExcludeComments()); } else if (xsi.isOctetStream() || xsi.isByteArray()) { try { return new OctetStreamData (xsi.getOctetStream(), xsi.getSourceURI(), xsi.getMIMEType()); } catch (IOException ioe) { // log a warning log.warn("cannot cache dereferenced data: " + ioe); return null; } } } return dereferencedData; } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMHMACSignatureMethod.javalibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMHMACSignatureMethod0000644000175000017500000002275411750472047031742 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMHMACSignatureMethod.java 1333415 2012-05-03 12:03:51Z coheigea $ */ package org.apache.jcp.xml.dsig.internal.dom; import javax.xml.crypto.*; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.spec.HMACParameterSpec; import javax.xml.crypto.dsig.spec.SignatureMethodParameterSpec; import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException; import java.security.Key; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.security.SignatureException; import java.security.spec.AlgorithmParameterSpec; import javax.crypto.Mac; import javax.crypto.SecretKey; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.apache.jcp.xml.dsig.internal.MacOutputStream; /** * DOM-based implementation of HMAC SignatureMethod. * * @author Sean Mullan */ public abstract class DOMHMACSignatureMethod extends AbstractDOMSignatureMethod { private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(DOMHMACSignatureMethod.class); // see RFC 4051 for these algorithm definitions static final String HMAC_SHA256 = "http://www.w3.org/2001/04/xmldsig-more#hmac-sha256"; static final String HMAC_SHA384 = "http://www.w3.org/2001/04/xmldsig-more#hmac-sha384"; static final String HMAC_SHA512 = "http://www.w3.org/2001/04/xmldsig-more#hmac-sha512"; private Mac hmac; private int outputLength; private boolean outputLengthSet; private SignatureMethodParameterSpec params; /** * Creates a DOMHMACSignatureMethod with the specified params * * @param params algorithm-specific parameters (may be null) * @throws InvalidAlgorithmParameterException if params are inappropriate */ DOMHMACSignatureMethod(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException { checkParams((SignatureMethodParameterSpec)params); this.params = (SignatureMethodParameterSpec)params; } /** * Creates a DOMHMACSignatureMethod from an element. * * @param smElem a SignatureMethod element */ DOMHMACSignatureMethod(Element smElem) throws MarshalException { Element paramsElem = DOMUtils.getFirstChildElement(smElem); if (paramsElem != null) { params = unmarshalParams(paramsElem); } try { checkParams(params); } catch (InvalidAlgorithmParameterException iape) { throw new MarshalException(iape); } } void checkParams(SignatureMethodParameterSpec params) throws InvalidAlgorithmParameterException { if (params != null) { if (!(params instanceof HMACParameterSpec)) { throw new InvalidAlgorithmParameterException ("params must be of type HMACParameterSpec"); } outputLength = ((HMACParameterSpec)params).getOutputLength(); outputLengthSet = true; if (log.isDebugEnabled()) { log.debug("Setting outputLength from HMACParameterSpec to: " + outputLength); } } } public final AlgorithmParameterSpec getParameterSpec() { return params; } SignatureMethodParameterSpec unmarshalParams(Element paramsElem) throws MarshalException { outputLength = Integer.valueOf(paramsElem.getFirstChild().getNodeValue()).intValue(); outputLengthSet = true; if (log.isDebugEnabled()) { log.debug("unmarshalled outputLength: " + outputLength); } return new HMACParameterSpec(outputLength); } void marshalParams(Element parent, String prefix) throws MarshalException { Document ownerDoc = DOMUtils.getOwnerDocument(parent); Element hmacElem = DOMUtils.createElement(ownerDoc, "HMACOutputLength", XMLSignature.XMLNS, prefix); hmacElem.appendChild(ownerDoc.createTextNode (String.valueOf(outputLength))); parent.appendChild(hmacElem); } boolean verify(Key key, SignedInfo si, byte[] sig, XMLValidateContext context) throws InvalidKeyException, SignatureException, XMLSignatureException { if (key == null || si == null || sig == null) { throw new NullPointerException(); } if (!(key instanceof SecretKey)) { throw new InvalidKeyException("key must be SecretKey"); } if (hmac == null) { try { hmac = Mac.getInstance(getJCAAlgorithm()); } catch (NoSuchAlgorithmException nsae) { throw new XMLSignatureException(nsae); } } if (outputLengthSet && outputLength < getDigestLength()) { throw new XMLSignatureException ("HMACOutputLength must not be less than " + getDigestLength()); } hmac.init((SecretKey)key); ((DOMSignedInfo)si).canonicalize(context, new MacOutputStream(hmac)); byte[] result = hmac.doFinal(); return MessageDigest.isEqual(sig, result); } byte[] sign(Key key, SignedInfo si, XMLSignContext context) throws InvalidKeyException, XMLSignatureException { if (key == null || si == null) { throw new NullPointerException(); } if (!(key instanceof SecretKey)) { throw new InvalidKeyException("key must be SecretKey"); } if (hmac == null) { try { hmac = Mac.getInstance(getJCAAlgorithm()); } catch (NoSuchAlgorithmException nsae) { throw new XMLSignatureException(nsae); } } if (outputLengthSet && outputLength < getDigestLength()) { throw new XMLSignatureException ("HMACOutputLength must not be less than " + getDigestLength()); } hmac.init((SecretKey)key); ((DOMSignedInfo)si).canonicalize(context, new MacOutputStream(hmac)); return hmac.doFinal(); } boolean paramsEqual(AlgorithmParameterSpec spec) { if (getParameterSpec() == spec) { return true; } if (!(spec instanceof HMACParameterSpec)) { return false; } HMACParameterSpec ospec = (HMACParameterSpec)spec; return (outputLength == ospec.getOutputLength()); } Type getAlgorithmType() { return Type.HMAC; } /** * Returns the output length of the hash/digest. */ abstract int getDigestLength(); static final class SHA1 extends DOMHMACSignatureMethod { SHA1(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException { super(params); } SHA1(Element dmElem) throws MarshalException { super(dmElem); } public String getAlgorithm() { return SignatureMethod.HMAC_SHA1; } String getJCAAlgorithm() { return "HmacSHA1"; } int getDigestLength() { return 160; } } static final class SHA256 extends DOMHMACSignatureMethod { SHA256(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException { super(params); } SHA256(Element dmElem) throws MarshalException { super(dmElem); } public String getAlgorithm() { return HMAC_SHA256; } String getJCAAlgorithm() { return "HmacSHA256"; } int getDigestLength() { return 256; } } static final class SHA384 extends DOMHMACSignatureMethod { SHA384(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException { super(params); } SHA384(Element dmElem) throws MarshalException { super(dmElem); } public String getAlgorithm() { return HMAC_SHA384; } String getJCAAlgorithm() { return "HmacSHA384"; } int getDigestLength() { return 384; } } static final class SHA512 extends DOMHMACSignatureMethod { SHA512(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException { super(params); } SHA512(Element dmElem) throws MarshalException { super(dmElem); } public String getAlgorithm() { return HMAC_SHA512; } String getJCAAlgorithm() { return "HmacSHA512"; } int getDigestLength() { return 512; } } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.javalibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.jav0000644000175000017500000004104511750472047032062 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMSignatureMethod.java 1333415 2012-05-03 12:03:51Z coheigea $ */ package org.apache.jcp.xml.dsig.internal.dom; import javax.xml.crypto.*; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.spec.SignatureMethodParameterSpec; import java.io.IOException; import java.security.*; import java.security.spec.AlgorithmParameterSpec; import org.w3c.dom.Element; import org.apache.xml.security.algorithms.implementations.SignatureECDSA; import org.apache.jcp.xml.dsig.internal.SignerOutputStream; /** * DOM-based abstract implementation of SignatureMethod. * * @author Sean Mullan */ public abstract class DOMSignatureMethod extends AbstractDOMSignatureMethod { private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(DOMSignatureMethod.class); private SignatureMethodParameterSpec params; private Signature signature; // see RFC 4051 for these algorithm definitions static final String RSA_SHA256 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"; static final String RSA_SHA384 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"; static final String RSA_SHA512 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"; static final String ECDSA_SHA1 = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"; static final String ECDSA_SHA256 = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"; static final String ECDSA_SHA384 = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384"; static final String ECDSA_SHA512 = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512"; /** * Creates a DOMSignatureMethod. * * @param params the algorithm-specific params (may be null) * @throws InvalidAlgorithmParameterException if the parameters are not * appropriate for this signature method */ DOMSignatureMethod(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException { if (params != null && !(params instanceof SignatureMethodParameterSpec)) { throw new InvalidAlgorithmParameterException ("params must be of type SignatureMethodParameterSpec"); } checkParams((SignatureMethodParameterSpec)params); this.params = (SignatureMethodParameterSpec)params; } /** * Creates a DOMSignatureMethod from an element. This ctor * invokes the {@link #unmarshalParams unmarshalParams} method to * unmarshal any algorithm-specific input parameters. * * @param smElem a SignatureMethod element */ DOMSignatureMethod(Element smElem) throws MarshalException { Element paramsElem = DOMUtils.getFirstChildElement(smElem); if (paramsElem != null) { params = unmarshalParams(paramsElem); } try { checkParams(params); } catch (InvalidAlgorithmParameterException iape) { throw new MarshalException(iape); } } static SignatureMethod unmarshal(Element smElem) throws MarshalException { String alg = DOMUtils.getAttributeValue(smElem, "Algorithm"); if (alg.equals(SignatureMethod.RSA_SHA1)) { return new SHA1withRSA(smElem); } else if (alg.equals(RSA_SHA256)) { return new SHA256withRSA(smElem); } else if (alg.equals(RSA_SHA384)) { return new SHA384withRSA(smElem); } else if (alg.equals(RSA_SHA512)) { return new SHA512withRSA(smElem); } else if (alg.equals(SignatureMethod.DSA_SHA1)) { return new SHA1withDSA(smElem); } else if (alg.equals(ECDSA_SHA1)) { return new SHA1withECDSA(smElem); } else if (alg.equals(ECDSA_SHA256)) { return new SHA256withECDSA(smElem); } else if (alg.equals(ECDSA_SHA384)) { return new SHA384withECDSA(smElem); } else if (alg.equals(ECDSA_SHA512)) { return new SHA512withECDSA(smElem); } else if (alg.equals(SignatureMethod.HMAC_SHA1)) { return new DOMHMACSignatureMethod.SHA1(smElem); } else if (alg.equals(DOMHMACSignatureMethod.HMAC_SHA256)) { return new DOMHMACSignatureMethod.SHA256(smElem); } else if (alg.equals(DOMHMACSignatureMethod.HMAC_SHA384)) { return new DOMHMACSignatureMethod.SHA384(smElem); } else if (alg.equals(DOMHMACSignatureMethod.HMAC_SHA512)) { return new DOMHMACSignatureMethod.SHA512(smElem); } else { throw new MarshalException ("unsupported SignatureMethod algorithm: " + alg); } } public final AlgorithmParameterSpec getParameterSpec() { return params; } boolean verify(Key key, SignedInfo si, byte[] sig, XMLValidateContext context) throws InvalidKeyException, SignatureException, XMLSignatureException { if (key == null || si == null || sig == null) { throw new NullPointerException(); } if (!(key instanceof PublicKey)) { throw new InvalidKeyException("key must be PublicKey"); } if (signature == null) { try { Provider p = (Provider)context.getProperty ("org.jcp.xml.dsig.internal.dom.SignatureProvider"); signature = (p == null) ? Signature.getInstance(getJCAAlgorithm()) : Signature.getInstance(getJCAAlgorithm(), p); } catch (NoSuchAlgorithmException nsae) { throw new XMLSignatureException(nsae); } } signature.initVerify((PublicKey)key); if (log.isDebugEnabled()) { log.debug("Signature provider:" + signature.getProvider()); log.debug("verifying with key: " + key); } ((DOMSignedInfo)si).canonicalize(context, new SignerOutputStream(signature)); try { Type type = getAlgorithmType(); if (type == Type.DSA) { return signature.verify(convertXMLDSIGtoASN1(sig)); } else if (type == Type.ECDSA) { return signature.verify(SignatureECDSA.convertXMLDSIGtoASN1(sig)); } else { return signature.verify(sig); } } catch (IOException ioe) { throw new XMLSignatureException(ioe); } } byte[] sign(Key key, SignedInfo si, XMLSignContext context) throws InvalidKeyException, XMLSignatureException { if (key == null || si == null) { throw new NullPointerException(); } if (!(key instanceof PrivateKey)) { throw new InvalidKeyException("key must be PrivateKey"); } if (signature == null) { try { Provider p = (Provider)context.getProperty ("org.jcp.xml.dsig.internal.dom.SignatureProvider"); signature = (p == null) ? Signature.getInstance(getJCAAlgorithm()) : Signature.getInstance(getJCAAlgorithm(), p); } catch (NoSuchAlgorithmException nsae) { throw new XMLSignatureException(nsae); } } signature.initSign((PrivateKey)key); if (log.isDebugEnabled()) { log.debug("Signature provider:" + signature.getProvider()); log.debug("Signing with key: " + key); } ((DOMSignedInfo)si).canonicalize(context, new SignerOutputStream(signature)); try { Type type = getAlgorithmType(); if (type == Type.DSA) { return convertASN1toXMLDSIG(signature.sign()); } else if (type == Type.ECDSA) { return SignatureECDSA.convertASN1toXMLDSIG(signature.sign()); } else { return signature.sign(); } } catch (SignatureException se) { throw new XMLSignatureException(se); } catch (IOException ioe) { throw new XMLSignatureException(ioe); } } /** * Converts an ASN.1 DSA value to a XML Signature DSA Value. * * The JAVA JCE DSA Signature algorithm creates ASN.1 encoded (r,s) value * pairs; the XML Signature requires the core BigInteger values. * * @param asn1Bytes * * @throws IOException * @see 6.4.1 DSA */ private static byte[] convertASN1toXMLDSIG(byte asn1Bytes[]) throws IOException { byte rLength = asn1Bytes[3]; int i; for (i = rLength; (i > 0) && (asn1Bytes[(4 + rLength) - i] == 0); i--); byte sLength = asn1Bytes[5 + rLength]; int j; for (j = sLength; (j > 0) && (asn1Bytes[(6 + rLength + sLength) - j] == 0); j--); if ((asn1Bytes[0] != 48) || (asn1Bytes[1] != asn1Bytes.length - 2) || (asn1Bytes[2] != 2) || (i > 20) || (asn1Bytes[4 + rLength] != 2) || (j > 20)) { throw new IOException("Invalid ASN.1 format of DSA signature"); } else { byte xmldsigBytes[] = new byte[40]; System.arraycopy(asn1Bytes, (4+rLength)-i, xmldsigBytes, 20-i, i); System.arraycopy(asn1Bytes, (6+rLength+sLength)-j, xmldsigBytes, 40 - j, j); return xmldsigBytes; } } /** * Converts a XML Signature DSA Value to an ASN.1 DSA value. * * The JAVA JCE DSA Signature algorithm creates ASN.1 encoded (r,s) value * pairs; the XML Signature requires the core BigInteger values. * * @param xmldsigBytes * * @throws IOException * @see 6.4.1 DSA */ private static byte[] convertXMLDSIGtoASN1(byte xmldsigBytes[]) throws IOException { if (xmldsigBytes.length != 40) { throw new IOException("Invalid XMLDSIG format of DSA signature"); } int i; for (i = 20; (i > 0) && (xmldsigBytes[20 - i] == 0); i--); int j = i; if (xmldsigBytes[20 - i] < 0) { j += 1; } int k; for (k = 20; (k > 0) && (xmldsigBytes[40 - k] == 0); k--); int l = k; if (xmldsigBytes[40 - k] < 0) { l += 1; } byte asn1Bytes[] = new byte[6 + j + l]; asn1Bytes[0] = 48; asn1Bytes[1] = (byte)(4 + j + l); asn1Bytes[2] = 2; asn1Bytes[3] = (byte)j; System.arraycopy(xmldsigBytes, 20 - i, asn1Bytes, (4 + j) - i, i); asn1Bytes[4 + j] = 2; asn1Bytes[5 + j] = (byte) l; System.arraycopy(xmldsigBytes, 40 - k, asn1Bytes, (6 + j + l) - k, k); return asn1Bytes; } static final class SHA1withRSA extends DOMSignatureMethod { SHA1withRSA(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException { super(params); } SHA1withRSA(Element dmElem) throws MarshalException { super(dmElem); } public String getAlgorithm() { return SignatureMethod.RSA_SHA1; } String getJCAAlgorithm() { return "SHA1withRSA"; } Type getAlgorithmType() { return Type.RSA; } } static final class SHA256withRSA extends DOMSignatureMethod { SHA256withRSA(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException { super(params); } SHA256withRSA(Element dmElem) throws MarshalException { super(dmElem); } public String getAlgorithm() { return RSA_SHA256; } String getJCAAlgorithm() { return "SHA256withRSA"; } Type getAlgorithmType() { return Type.RSA; } } static final class SHA384withRSA extends DOMSignatureMethod { SHA384withRSA(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException { super(params); } SHA384withRSA(Element dmElem) throws MarshalException { super(dmElem); } public String getAlgorithm() { return RSA_SHA384; } String getJCAAlgorithm() { return "SHA384withRSA"; } Type getAlgorithmType() { return Type.RSA; } } static final class SHA512withRSA extends DOMSignatureMethod { SHA512withRSA(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException { super(params); } SHA512withRSA(Element dmElem) throws MarshalException { super(dmElem); } public String getAlgorithm() { return RSA_SHA512; } String getJCAAlgorithm() { return "SHA512withRSA"; } Type getAlgorithmType() { return Type.RSA; } } static final class SHA1withDSA extends DOMSignatureMethod { SHA1withDSA(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException { super(params); } SHA1withDSA(Element dmElem) throws MarshalException { super(dmElem); } public String getAlgorithm() { return SignatureMethod.DSA_SHA1; } String getJCAAlgorithm() { return "SHA1withDSA"; } Type getAlgorithmType() { return Type.DSA; } } static final class SHA1withECDSA extends DOMSignatureMethod { SHA1withECDSA(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException { super(params); } SHA1withECDSA(Element dmElem) throws MarshalException { super(dmElem); } public String getAlgorithm() { return ECDSA_SHA1; } String getJCAAlgorithm() { return "SHA1withECDSA"; } Type getAlgorithmType() { return Type.ECDSA; } } static final class SHA256withECDSA extends DOMSignatureMethod { SHA256withECDSA(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException { super(params); } SHA256withECDSA(Element dmElem) throws MarshalException { super(dmElem); } public String getAlgorithm() { return ECDSA_SHA256; } String getJCAAlgorithm() { return "SHA256withECDSA"; } Type getAlgorithmType() { return Type.ECDSA; } } static final class SHA384withECDSA extends DOMSignatureMethod { SHA384withECDSA(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException { super(params); } SHA384withECDSA(Element dmElem) throws MarshalException { super(dmElem); } public String getAlgorithm() { return ECDSA_SHA384; } String getJCAAlgorithm() { return "SHA384withECDSA"; } Type getAlgorithmType() { return Type.ECDSA; } } static final class SHA512withECDSA extends DOMSignatureMethod { SHA512withECDSA(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException { super(params); } SHA512withECDSA(Element dmElem) throws MarshalException { super(dmElem); } public String getAlgorithm() { return ECDSA_SHA512; } String getJCAAlgorithm() { return "SHA512withECDSA"; } Type getAlgorithmType() { return Type.ECDSA; } } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMCanonicalizationMethod.javalibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMCanonicalizationMet0000644000175000017500000001120612162373556032133 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMCanonicalizationMethod.java 1496622 2013-06-25 20:02:54Z mullan $ */ package org.apache.jcp.xml.dsig.internal.dom; import java.io.OutputStream; import java.security.InvalidAlgorithmParameterException; import java.security.Provider; import java.security.spec.AlgorithmParameterSpec; import org.w3c.dom.Element; import javax.xml.crypto.*; import javax.xml.crypto.dsig.*; /** * DOM-based abstract implementation of CanonicalizationMethod. * * @author Sean Mullan */ public class DOMCanonicalizationMethod extends DOMTransform implements CanonicalizationMethod { /** * Creates a DOMCanonicalizationMethod. * * @param spi TransformService */ public DOMCanonicalizationMethod(TransformService spi) throws InvalidAlgorithmParameterException { super(spi); if (!(spi instanceof ApacheCanonicalizer) && !isC14Nalg(spi.getAlgorithm())) { throw new InvalidAlgorithmParameterException("Illegal CanonicalizationMethod"); } } /** * Creates a DOMCanonicalizationMethod from an element. This * ctor invokes the abstract {@link #unmarshalParams unmarshalParams} * method to unmarshal any algorithm-specific input parameters. * * @param cmElem a CanonicalizationMethod element */ public DOMCanonicalizationMethod(Element cmElem, XMLCryptoContext context, Provider provider) throws MarshalException { super(cmElem, context, provider); if (!(spi instanceof ApacheCanonicalizer) && !isC14Nalg(spi.getAlgorithm())) { throw new MarshalException("Illegal CanonicalizationMethod"); } } /** * Canonicalizes the specified data using the underlying canonicalization * algorithm. This is a convenience method that is equivalent to invoking * the {@link #transform transform} method. * * @param data the data to be canonicalized * @param xc the XMLCryptoContext containing * additional context (may be null if not applicable) * @return the canonicalized data * @throws NullPointerException if data is null * @throws TransformException if an unexpected error occurs while * canonicalizing the data */ public Data canonicalize(Data data, XMLCryptoContext xc) throws TransformException { return transform(data, xc); } public Data canonicalize(Data data, XMLCryptoContext xc, OutputStream os) throws TransformException { return transform(data, xc, os); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof CanonicalizationMethod)) { return false; } CanonicalizationMethod ocm = (CanonicalizationMethod)o; return (getAlgorithm().equals(ocm.getAlgorithm()) && DOMUtils.paramsEqual(getParameterSpec(), ocm.getParameterSpec())); } @Override public int hashCode() { int result = 17; result = 31 * result + getAlgorithm().hashCode(); AlgorithmParameterSpec spec = getParameterSpec(); if (spec != null) { result = 31 * result + spec.hashCode(); } return result; } private static boolean isC14Nalg(String alg) { return alg.equals(CanonicalizationMethod.INCLUSIVE) || alg.equals(CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS) || alg.equals(CanonicalizationMethod.EXCLUSIVE) || alg.equals(CanonicalizationMethod.EXCLUSIVE_WITH_COMMENTS) || alg.equals(DOMCanonicalXMLC14N11Method.C14N_11) || alg.equals(DOMCanonicalXMLC14N11Method.C14N_11_WITH_COMMENTS); } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureProperties.javalibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureProperties0000644000175000017500000001422412236002743032206 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMSignatureProperties.java 1538756 2013-11-04 20:38:59Z mullan $ */ package org.apache.jcp.xml.dsig.internal.dom; import javax.xml.crypto.*; import javax.xml.crypto.dom.DOMCryptoContext; import javax.xml.crypto.dsig.*; import java.util.*; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * DOM-based implementation of SignatureProperties. * * @author Sean Mullan */ public final class DOMSignatureProperties extends DOMStructure implements SignatureProperties { private final String id; private final List properties; /** * Creates a DOMSignatureProperties from the specified * parameters. * * @param properties a list of one or more {@link SignatureProperty}s. The * list is defensively copied to protect against subsequent modification. * @param id the Id (may be null) * @return a DOMSignatureProperties * @throws ClassCastException if properties contains any * entries that are not of type {@link SignatureProperty} * @throws IllegalArgumentException if properties is empty * @throws NullPointerException if properties */ public DOMSignatureProperties(List properties, String id) { if (properties == null) { throw new NullPointerException("properties cannot be null"); } else if (properties.isEmpty()) { throw new IllegalArgumentException("properties cannot be empty"); } else { this.properties = Collections.unmodifiableList( new ArrayList(properties)); for (int i = 0, size = this.properties.size(); i < size; i++) { if (!(this.properties.get(i) instanceof SignatureProperty)) { throw new ClassCastException ("properties["+i+"] is not a valid type"); } } } this.id = id; } /** * Creates a DOMSignatureProperties from an element. * * @param propsElem a SignatureProperties element * @throws MarshalException if a marshalling error occurs */ public DOMSignatureProperties(Element propsElem, XMLCryptoContext context) throws MarshalException { // unmarshal attributes Attr attr = propsElem.getAttributeNodeNS(null, "Id"); if (attr != null) { id = attr.getValue(); propsElem.setIdAttributeNode(attr, true); } else { id = null; } NodeList nodes = propsElem.getChildNodes(); int length = nodes.getLength(); List properties = new ArrayList(length); for (int i = 0; i < length; i++) { Node child = nodes.item(i); if (child.getNodeType() == Node.ELEMENT_NODE) { String name = child.getLocalName(); if (!name.equals("SignatureProperty")) { throw new MarshalException("Invalid element name: " + name + ", expected SignatureProperty"); } properties.add(new DOMSignatureProperty((Element)child, context)); } } if (properties.isEmpty()) { throw new MarshalException("properties cannot be empty"); } else { this.properties = Collections.unmodifiableList(properties); } } public List getProperties() { return properties; } public String getId() { return id; } public void marshal(Node parent, String dsPrefix, DOMCryptoContext context) throws MarshalException { Document ownerDoc = DOMUtils.getOwnerDocument(parent); Element propsElem = DOMUtils.createElement(ownerDoc, "SignatureProperties", XMLSignature.XMLNS, dsPrefix); // set attributes DOMUtils.setAttributeID(propsElem, "Id", id); // create and append any properties for (SignatureProperty property : properties) { ((DOMSignatureProperty)property).marshal(propsElem, dsPrefix, context); } parent.appendChild(propsElem); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof SignatureProperties)) { return false; } SignatureProperties osp = (SignatureProperties)o; boolean idsEqual = (id == null ? osp.getId() == null : id.equals(osp.getId())); return (properties.equals(osp.getProperties()) && idsEqual); } @Override public int hashCode() { int result = 17; if (id != null) { result = 31 * result + id.hashCode(); } result = 31 * result + properties.hashCode(); return result; } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMEnvelopedTransform.javalibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMEnvelopedTransform.0000644000175000017500000000303411654523221032062 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMEnvelopedTransform.java 1197150 2011-11-03 14:34:57Z coheigea $ */ package org.apache.jcp.xml.dsig.internal.dom; import java.security.InvalidAlgorithmParameterException; import javax.xml.crypto.dsig.spec.TransformParameterSpec; /** * DOM-based implementation of Enveloped Signature Transform. * (Uses Apache XML-Sec Transform implementation) * * @author Sean Mullan */ public final class DOMEnvelopedTransform extends ApacheTransform { public void init(TransformParameterSpec params) throws InvalidAlgorithmParameterException { if (params != null) { throw new InvalidAlgorithmParameterException("params must be null"); } } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMKeyName.java0000644000175000017500000000562312162373556030457 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMKeyName.java 1496622 2013-06-25 20:02:54Z mullan $ */ package org.apache.jcp.xml.dsig.internal.dom; import javax.xml.crypto.*; import javax.xml.crypto.dom.DOMCryptoContext; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.keyinfo.KeyName; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; /** * DOM-based implementation of KeyName. * * @author Sean Mullan */ public final class DOMKeyName extends DOMStructure implements KeyName { private final String name; /** * Creates a DOMKeyName. * * @param name the name of the key identifier * @throws NullPointerException if name is null */ public DOMKeyName(String name) { if (name == null) { throw new NullPointerException("name cannot be null"); } this.name = name; } /** * Creates a DOMKeyName from a KeyName element. * * @param knElem a KeyName element */ public DOMKeyName(Element knElem) { name = knElem.getFirstChild().getNodeValue(); } public String getName() { return name; } public void marshal(Node parent, String dsPrefix, DOMCryptoContext context) throws MarshalException { Document ownerDoc = DOMUtils.getOwnerDocument(parent); // prepend namespace prefix, if necessary Element knElem = DOMUtils.createElement(ownerDoc, "KeyName", XMLSignature.XMLNS, dsPrefix); knElem.appendChild(ownerDoc.createTextNode(name)); parent.appendChild(knElem); } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof KeyName)) { return false; } KeyName okn = (KeyName)obj; return name.equals(okn.getName()); } @Override public int hashCode() { int result = 17; result = 31 * result + name.hashCode(); return result; } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMDigestMethod.java0000644000175000017500000002307312162373556031505 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMDigestMethod.java 1496622 2013-06-25 20:02:54Z mullan $ */ package org.apache.jcp.xml.dsig.internal.dom; import javax.xml.crypto.*; import javax.xml.crypto.dom.DOMCryptoContext; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.spec.DigestMethodParameterSpec; import java.security.InvalidAlgorithmParameterException; import java.security.spec.AlgorithmParameterSpec; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; /** * DOM-based abstract implementation of DigestMethod. * * @author Sean Mullan */ public abstract class DOMDigestMethod extends DOMStructure implements DigestMethod { static final String SHA384 = "http://www.w3.org/2001/04/xmldsig-more#sha384"; // see RFC 4051 private DigestMethodParameterSpec params; /** * Creates a DOMDigestMethod. * * @param params the algorithm-specific params (may be null) * @throws InvalidAlgorithmParameterException if the parameters are not * appropriate for this digest method */ DOMDigestMethod(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException { if (params != null && !(params instanceof DigestMethodParameterSpec)) { throw new InvalidAlgorithmParameterException ("params must be of type DigestMethodParameterSpec"); } checkParams((DigestMethodParameterSpec)params); this.params = (DigestMethodParameterSpec)params; } /** * Creates a DOMDigestMethod from an element. This constructor * invokes the abstract {@link #unmarshalParams unmarshalParams} method to * unmarshal any algorithm-specific input parameters. * * @param dmElem a DigestMethod element */ DOMDigestMethod(Element dmElem) throws MarshalException { Element paramsElem = DOMUtils.getFirstChildElement(dmElem); if (paramsElem != null) { params = unmarshalParams(paramsElem); } try { checkParams(params); } catch (InvalidAlgorithmParameterException iape) { throw new MarshalException(iape); } } static DigestMethod unmarshal(Element dmElem) throws MarshalException { String alg = DOMUtils.getAttributeValue(dmElem, "Algorithm"); if (alg.equals(DigestMethod.SHA1)) { return new SHA1(dmElem); } else if (alg.equals(DigestMethod.SHA256)) { return new SHA256(dmElem); } else if (alg.equals(SHA384)) { return new SHA384(dmElem); } else if (alg.equals(DigestMethod.SHA512)) { return new SHA512(dmElem); } else { throw new MarshalException("unsupported DigestMethod algorithm: " + alg); } } /** * Checks if the specified parameters are valid for this algorithm. By * default, this method throws an exception if parameters are specified * since most DigestMethod algorithms do not have parameters. Subclasses * should override it if they have parameters. * * @param params the algorithm-specific params (may be null) * @throws InvalidAlgorithmParameterException if the parameters are not * appropriate for this digest method */ void checkParams(DigestMethodParameterSpec params) throws InvalidAlgorithmParameterException { if (params != null) { throw new InvalidAlgorithmParameterException("no parameters " + "should be specified for the " + getMessageDigestAlgorithm() + " DigestMethod algorithm"); } } public final AlgorithmParameterSpec getParameterSpec() { return params; } /** * Unmarshals DigestMethodParameterSpec from the specified * Element. By default, this method throws an exception since * most DigestMethod algorithms do not have parameters. Subclasses should * override it if they have parameters. * * @param paramsElem the Element holding the input params * @return the algorithm-specific DigestMethodParameterSpec * @throws MarshalException if the parameters cannot be unmarshalled */ DigestMethodParameterSpec unmarshalParams(Element paramsElem) throws MarshalException { throw new MarshalException("no parameters should " + "be specified for the " + getMessageDigestAlgorithm() + " DigestMethod algorithm"); } /** * This method invokes the abstract {@link #marshalParams marshalParams} * method to marshal any algorithm-specific parameters. */ public void marshal(Node parent, String prefix, DOMCryptoContext context) throws MarshalException { Document ownerDoc = DOMUtils.getOwnerDocument(parent); Element dmElem = DOMUtils.createElement(ownerDoc, "DigestMethod", XMLSignature.XMLNS, prefix); DOMUtils.setAttribute(dmElem, "Algorithm", getAlgorithm()); if (params != null) { marshalParams(dmElem, prefix); } parent.appendChild(dmElem); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof DigestMethod)) { return false; } DigestMethod odm = (DigestMethod)o; boolean paramsEqual = (params == null ? odm.getParameterSpec() == null : params.equals(odm.getParameterSpec())); return (getAlgorithm().equals(odm.getAlgorithm()) && paramsEqual); } @Override public int hashCode() { int result = 17; if (params != null) { result = 31 * result + params.hashCode(); } result = 31 * result + getAlgorithm().hashCode(); return result; } /** * Marshals the algorithm-specific parameters to an Element and * appends it to the specified parent element. By default, this method * throws an exception since most DigestMethod algorithms do not have * parameters. Subclasses should override it if they have parameters. * * @param parent the parent element to append the parameters to * @param the namespace prefix to use * @throws MarshalException if the parameters cannot be marshalled */ void marshalParams(Element parent, String prefix) throws MarshalException { throw new MarshalException("no parameters should " + "be specified for the " + getMessageDigestAlgorithm() + " DigestMethod algorithm"); } /** * Returns the MessageDigest standard algorithm name. */ abstract String getMessageDigestAlgorithm(); static final class SHA1 extends DOMDigestMethod { SHA1(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException { super(params); } SHA1(Element dmElem) throws MarshalException { super(dmElem); } public String getAlgorithm() { return DigestMethod.SHA1; } String getMessageDigestAlgorithm() { return "SHA-1"; } } static final class SHA256 extends DOMDigestMethod { SHA256(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException { super(params); } SHA256(Element dmElem) throws MarshalException { super(dmElem); } public String getAlgorithm() { return DigestMethod.SHA256; } String getMessageDigestAlgorithm() { return "SHA-256"; } } static final class SHA384 extends DOMDigestMethod { SHA384(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException { super(params); } SHA384(Element dmElem) throws MarshalException { super(dmElem); } public String getAlgorithm() { return SHA384; } String getMessageDigestAlgorithm() { return "SHA-384"; } } static final class SHA512 extends DOMDigestMethod { SHA512(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException { super(params); } SHA512(Element dmElem) throws MarshalException { super(dmElem); } public String getAlgorithm() { return DigestMethod.SHA512; } String getMessageDigestAlgorithm() { return "SHA-512"; } } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMUtils.java0000644000175000017500000003424712236002743030217 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMUtils.java 1538756 2013-11-04 20:38:59Z mullan $ */ package org.apache.jcp.xml.dsig.internal.dom; import java.util.*; import java.security.spec.AlgorithmParameterSpec; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import javax.xml.crypto.*; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.spec.*; /** * Useful static DOM utility methods. * * @author Sean Mullan */ public class DOMUtils { // class cannot be instantiated private DOMUtils() {} /** * Returns the owner document of the specified node. * * @param node the node * @return the owner document */ public static Document getOwnerDocument(Node node) { if (node.getNodeType() == Node.DOCUMENT_NODE) { return (Document)node; } else { return node.getOwnerDocument(); } } /** * Creates an element in the specified namespace, with the specified tag * and namespace prefix. * * @param doc the owner document * @param tag the tag * @param nsURI the namespace URI * @param prefix the namespace prefix * @return the newly created element */ public static Element createElement(Document doc, String tag, String nsURI, String prefix) { String qName = (prefix == null || prefix.length() == 0) ? tag : prefix + ":" + tag; return doc.createElementNS(nsURI, qName); } /** * Sets an element's attribute (using DOM level 2) with the * specified value and namespace prefix. * * @param elem the element to set the attribute on * @param name the name of the attribute * @param value the attribute value. If null, no attribute is set. */ public static void setAttribute(Element elem, String name, String value) { if (value == null) { return; } elem.setAttributeNS(null, name, value); } /** * Sets an element's attribute (using DOM level 2) with the * specified value and namespace prefix AND registers the ID value with * the specified element. This is for resolving same-document * ID references. * * @param elem the element to set the attribute on * @param name the name of the attribute * @param value the attribute value. If null, no attribute is set. */ public static void setAttributeID(Element elem, String name, String value) { if (value == null) { return; } elem.setAttributeNS(null, name, value); elem.setIdAttributeNS(null, name, true); } /** * Returns the first child element of the specified node, or null if there * is no such element. * * @param node the node * @return the first child element of the specified node, or null if there * is no such element * @throws NullPointerException if node == null */ public static Element getFirstChildElement(Node node) { Node child = node.getFirstChild(); while (child != null && child.getNodeType() != Node.ELEMENT_NODE) { child = child.getNextSibling(); } return (Element)child; } /** * Returns the first child element of the specified node and checks that * the local name is equal to {@code localName}. * * @param node the node * @return the first child element of the specified node * @throws NullPointerException if {@code node == null} * @throws MarshalException if no such element or the local name is not * equal to {@code localName} */ public static Element getFirstChildElement(Node node, String localName) throws MarshalException { return verifyElement(getFirstChildElement(node), localName); } private static Element verifyElement(Element elem, String localName) throws MarshalException { if (elem == null) { throw new MarshalException("Missing " + localName + " element"); } String name = elem.getLocalName(); if (!name.equals(localName)) { throw new MarshalException("Invalid element name: " + name + ", expected " + localName); } return elem; } /** * Returns the last child element of the specified node, or null if there * is no such element. * * @param node the node * @return the last child element of the specified node, or null if there * is no such element * @throws NullPointerException if node == null */ public static Element getLastChildElement(Node node) { Node child = node.getLastChild(); while (child != null && child.getNodeType() != Node.ELEMENT_NODE) { child = child.getPreviousSibling(); } return (Element)child; } /** * Returns the next sibling element of the specified node, or null if there * is no such element. * * @param node the node * @return the next sibling element of the specified node, or null if there * is no such element * @throws NullPointerException if node == null */ public static Element getNextSiblingElement(Node node) { Node sibling = node.getNextSibling(); while (sibling != null && sibling.getNodeType() != Node.ELEMENT_NODE) { sibling = sibling.getNextSibling(); } return (Element)sibling; } /** * Returns the next sibling element of the specified node and checks that * the local name is equal to {@code localName}. * * @param node the node * @return the next sibling element of the specified node * @throws NullPointerException if {@code node == null} * @throws MarshalException if no such element or the local name is not * equal to {@code localName} */ public static Element getNextSiblingElement(Node node, String localName) throws MarshalException { return verifyElement(getNextSiblingElement(node), localName); } /** * Returns the attribute value for the attribute with the specified name. * Returns null if there is no such attribute, or * the empty string if the attribute value is empty. * *

This works around a limitation of the DOM * Element.getAttributeNode method, which does not distinguish * between an unspecified attribute and an attribute with a value of * "" (it returns "" for both cases). * * @param elem the element containing the attribute * @param name the name of the attribute * @return the attribute value (may be null if unspecified) */ public static String getAttributeValue(Element elem, String name) { Attr attr = elem.getAttributeNodeNS(null, name); return (attr == null) ? null : attr.getValue(); } /** * Returns a Set of Nodes, backed by the specified * NodeList. * * @param nl the NodeList * @return a Set of Nodes */ public static Set nodeSet(NodeList nl) { return new NodeSet(nl); } static class NodeSet extends AbstractSet { private NodeList nl; public NodeSet(NodeList nl) { this.nl = nl; } public int size() { return nl.getLength(); } public Iterator iterator() { return new Iterator() { int index = 0; public void remove() { throw new UnsupportedOperationException(); } public Node next() { if (!hasNext()) { throw new NoSuchElementException(); } return nl.item(index++); } public boolean hasNext() { return index < nl.getLength() ? true : false; } }; } } /** * Returns the prefix associated with the specified namespace URI * * @param context contains the namespace map * @param nsURI the namespace URI * @return the prefix associated with the specified namespace URI, or * null if not set */ public static String getNSPrefix(XMLCryptoContext context, String nsURI) { if (context != null) { return context.getNamespacePrefix (nsURI, context.getDefaultNamespacePrefix()); } else { return null; } } /** * Returns the prefix associated with the XML Signature namespace URI * * @param context contains the namespace map * @return the prefix associated with the specified namespace URI, or * null if not set */ public static String getSignaturePrefix(XMLCryptoContext context) { return getNSPrefix(context, XMLSignature.XMLNS); } /** * Removes all children nodes from the specified node. * * @param node the parent node whose children are to be removed */ public static void removeAllChildren(Node node) { NodeList children = node.getChildNodes(); for (int i = 0, length = children.getLength(); i < length; i++) { node.removeChild(children.item(i)); } } /** * Compares 2 nodes for equality. Implementation is not complete. */ public static boolean nodesEqual(Node thisNode, Node otherNode) { if (thisNode == otherNode) { return true; } if (thisNode.getNodeType() != otherNode.getNodeType()) { return false; } // FIXME - test content, etc return true; } /** * Checks if child element has same owner document before * appending to the parent, and imports it to the parent's document * if necessary. */ public static void appendChild(Node parent, Node child) { Document ownerDoc = getOwnerDocument(parent); if (child.getOwnerDocument() != ownerDoc) { parent.appendChild(ownerDoc.importNode(child, true)); } else { parent.appendChild(child); } } public static boolean paramsEqual(AlgorithmParameterSpec spec1, AlgorithmParameterSpec spec2) { if (spec1 == spec2) { return true; } if (spec1 instanceof XPathFilter2ParameterSpec && spec2 instanceof XPathFilter2ParameterSpec) { return paramsEqual((XPathFilter2ParameterSpec)spec1, (XPathFilter2ParameterSpec)spec2); } if (spec1 instanceof ExcC14NParameterSpec && spec2 instanceof ExcC14NParameterSpec) { return paramsEqual((ExcC14NParameterSpec) spec1, (ExcC14NParameterSpec)spec2); } if (spec1 instanceof XPathFilterParameterSpec && spec2 instanceof XPathFilterParameterSpec) { return paramsEqual((XPathFilterParameterSpec)spec1, (XPathFilterParameterSpec)spec2); } if (spec1 instanceof XSLTTransformParameterSpec && spec2 instanceof XSLTTransformParameterSpec) { return paramsEqual((XSLTTransformParameterSpec)spec1, (XSLTTransformParameterSpec)spec2); } return false; } private static boolean paramsEqual(XPathFilter2ParameterSpec spec1, XPathFilter2ParameterSpec spec2) { @SuppressWarnings("unchecked") List types = spec1.getXPathList(); @SuppressWarnings("unchecked") List otypes = spec2.getXPathList(); int size = types.size(); if (size != otypes.size()) { return false; } for (int i = 0; i < size; i++) { XPathType type = types.get(i); XPathType otype = otypes.get(i); if (!type.getExpression().equals(otype.getExpression()) || !type.getNamespaceMap().equals(otype.getNamespaceMap()) || type.getFilter() != otype.getFilter()) { return false; } } return true; } private static boolean paramsEqual(ExcC14NParameterSpec spec1, ExcC14NParameterSpec spec2) { return spec1.getPrefixList().equals(spec2.getPrefixList()); } private static boolean paramsEqual(XPathFilterParameterSpec spec1, XPathFilterParameterSpec spec2) { return (spec1.getXPath().equals(spec2.getXPath()) && spec1.getNamespaceMap().equals(spec2.getNamespaceMap())); } private static boolean paramsEqual(XSLTTransformParameterSpec spec1, XSLTTransformParameterSpec spec2) { XMLStructure ostylesheet = spec2.getStylesheet(); if (!(ostylesheet instanceof javax.xml.crypto.dom.DOMStructure)) { return false; } Node ostylesheetElem = ((javax.xml.crypto.dom.DOMStructure) ostylesheet).getNode(); XMLStructure stylesheet = spec1.getStylesheet(); Node stylesheetElem = ((javax.xml.crypto.dom.DOMStructure) stylesheet).getNode(); return nodesEqual(stylesheetElem, ostylesheetElem); } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheData.java0000644000175000017500000000242111750731244030524 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: ApacheData.java 1333869 2012-05-04 10:42:44Z coheigea $ */ package org.apache.jcp.xml.dsig.internal.dom; import javax.xml.crypto.Data; import org.apache.xml.security.signature.XMLSignatureInput; /** * XMLSignatureInput Data wrapper. * * @author Sean Mullan */ public interface ApacheData extends Data { /** * Returns the XMLSignatureInput. */ XMLSignatureInput getXMLSignatureInput(); } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMStructure.java0000644000175000017500000000312211654523221031105 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMStructure.java 1197150 2011-11-03 14:34:57Z coheigea $ */ package org.apache.jcp.xml.dsig.internal.dom; import javax.xml.crypto.MarshalException; import javax.xml.crypto.XMLStructure; import javax.xml.crypto.dom.DOMCryptoContext; import org.w3c.dom.Node; /** * DOM-based abstract implementation of XMLStructure. * * @author Sean Mullan */ public abstract class DOMStructure implements XMLStructure { public final boolean isFeatureSupported(String feature) { if (feature == null) { throw new NullPointerException(); } else { return false; } } public abstract void marshal(Node parent, String dsPrefix, DOMCryptoContext context) throws MarshalException; } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/AbstractDOMSignatureMethod.javalibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/AbstractDOMSignatureMe0000644000175000017500000001767512162373556032127 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.jcp.xml.dsig.internal.dom; import java.security.Key; import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException; import java.security.SignatureException; import java.security.spec.AlgorithmParameterSpec; import javax.xml.crypto.MarshalException; import javax.xml.crypto.dom.DOMCryptoContext; import javax.xml.crypto.dsig.SignatureMethod; import javax.xml.crypto.dsig.SignedInfo; import javax.xml.crypto.dsig.XMLSignature; import javax.xml.crypto.dsig.XMLSignatureException; import javax.xml.crypto.dsig.XMLSignContext; import javax.xml.crypto.dsig.XMLValidateContext; import javax.xml.crypto.dsig.spec.SignatureMethodParameterSpec; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; /** * An abstract class representing a SignatureMethod. Subclasses implement * a specific XML DSig signature algorithm. */ abstract class AbstractDOMSignatureMethod extends DOMStructure implements SignatureMethod { // denotes the type of signature algorithm enum Type { DSA, RSA, ECDSA, HMAC } /** * Verifies the passed-in signature with the specified key, using the * underlying Signature or Mac algorithm. * * @param key the verification key * @param si the SignedInfo * @param sig the signature bytes to be verified * @param context the XMLValidateContext * @return true if the signature verified successfully, * false if not * @throws NullPointerException if key, si or * sig are null * @throws InvalidKeyException if the key is improperly encoded, of * the wrong type, or parameters are missing, etc * @throws SignatureException if an unexpected error occurs, such * as the passed in signature is improperly encoded * @throws XMLSignatureException if an unexpected error occurs */ abstract boolean verify(Key key, SignedInfo si, byte[] sig, XMLValidateContext context) throws InvalidKeyException, SignatureException, XMLSignatureException; /** * Signs the bytes with the specified key, using the underlying * Signature or Mac algorithm. * * @param key the signing key * @param si the SignedInfo * @param context the XMLSignContext * @return the signature * @throws NullPointerException if key or * si are null * @throws InvalidKeyException if the key is improperly encoded, of * the wrong type, or parameters are missing, etc * @throws XMLSignatureException if an unexpected error occurs */ abstract byte[] sign(Key key, SignedInfo si, XMLSignContext context) throws InvalidKeyException, XMLSignatureException; /** * Returns the java.security.Signature or javax.crypto.Mac standard * algorithm name. */ abstract String getJCAAlgorithm(); /** * Returns the type of signature algorithm. */ abstract Type getAlgorithmType(); /** * This method invokes the {@link #marshalParams marshalParams} * method to marshal any algorithm-specific parameters. */ public void marshal(Node parent, String dsPrefix, DOMCryptoContext context) throws MarshalException { Document ownerDoc = DOMUtils.getOwnerDocument(parent); Element smElem = DOMUtils.createElement(ownerDoc, "SignatureMethod", XMLSignature.XMLNS, dsPrefix); DOMUtils.setAttribute(smElem, "Algorithm", getAlgorithm()); if (getParameterSpec() != null) { marshalParams(smElem, dsPrefix); } parent.appendChild(smElem); } /** * Marshals the algorithm-specific parameters to an Element and * appends it to the specified parent element. By default, this method * throws an exception since most SignatureMethod algorithms do not have * parameters. Subclasses should override it if they have parameters. * * @param parent the parent element to append the parameters to * @param paramsPrefix the algorithm parameters prefix to use * @throws MarshalException if the parameters cannot be marshalled */ void marshalParams(Element parent, String paramsPrefix) throws MarshalException { throw new MarshalException("no parameters should " + "be specified for the " + getAlgorithm() + " SignatureMethod algorithm"); } /** * Unmarshals SignatureMethodParameterSpec from the specified * Element. By default, this method throws an exception since * most SignatureMethod algorithms do not have parameters. Subclasses should * override it if they have parameters. * * @param paramsElem the Element holding the input params * @return the algorithm-specific SignatureMethodParameterSpec * @throws MarshalException if the parameters cannot be unmarshalled */ SignatureMethodParameterSpec unmarshalParams(Element paramsElem) throws MarshalException { throw new MarshalException("no parameters should " + "be specified for the " + getAlgorithm() + " SignatureMethod algorithm"); } /** * Checks if the specified parameters are valid for this algorithm. By * default, this method throws an exception if parameters are specified * since most SignatureMethod algorithms do not have parameters. Subclasses * should override it if they have parameters. * * @param params the algorithm-specific params (may be null) * @throws InvalidAlgorithmParameterException if the parameters are not * appropriate for this signature method */ void checkParams(SignatureMethodParameterSpec params) throws InvalidAlgorithmParameterException { if (params != null) { throw new InvalidAlgorithmParameterException("no parameters " + "should be specified for the " + getAlgorithm() + " SignatureMethod algorithm"); } } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof SignatureMethod)) { return false; } SignatureMethod osm = (SignatureMethod)o; return (getAlgorithm().equals(osm.getAlgorithm()) && paramsEqual(osm.getParameterSpec())); } @Override public int hashCode() { int result = 17; result = 31 * result + getAlgorithm().hashCode(); AlgorithmParameterSpec spec = getParameterSpec(); if (spec != null) { result = 31 * result + spec.hashCode(); } return result; } /** * Returns true if parameters are equal; false otherwise. * * Subclasses should override this method to compare algorithm-specific * parameters. */ boolean paramsEqual(AlgorithmParameterSpec spec) { return (getParameterSpec() == spec); } } ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMXPathFilter2Transform.javalibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMXPathFilter2Transfo0000644000175000017500000001432111661523757032015 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * =========================================================================== * * (C) Copyright IBM Corp. 2003 All Rights Reserved. * * =========================================================================== */ /* * Portions copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMXPathFilter2Transform.java 1203789 2011-11-18 18:46:07Z mullan $ */ package org.apache.jcp.xml.dsig.internal.dom; import javax.xml.crypto.*; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.spec.TransformParameterSpec; import javax.xml.crypto.dsig.spec.XPathType; import javax.xml.crypto.dsig.spec.XPathFilter2ParameterSpec; import java.security.InvalidAlgorithmParameterException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import org.w3c.dom.Attr; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; /** * DOM-based implementation of XPath Filter 2.0 Transform. * (Uses Apache XML-Sec Transform implementation) * * @author Joyce Leung */ public final class DOMXPathFilter2Transform extends ApacheTransform { public void init(TransformParameterSpec params) throws InvalidAlgorithmParameterException { if (params == null) { throw new InvalidAlgorithmParameterException("params are required"); } else if (!(params instanceof XPathFilter2ParameterSpec)) { throw new InvalidAlgorithmParameterException ("params must be of type XPathFilter2ParameterSpec"); } this.params = params; } public void init(XMLStructure parent, XMLCryptoContext context) throws InvalidAlgorithmParameterException { super.init(parent, context); try { unmarshalParams(DOMUtils.getFirstChildElement(transformElem)); } catch (MarshalException me) { throw new InvalidAlgorithmParameterException(me); } } private void unmarshalParams(Element curXPathElem) throws MarshalException { List list = new ArrayList(); while (curXPathElem != null) { String xPath = curXPathElem.getFirstChild().getNodeValue(); String filterVal = DOMUtils.getAttributeValue(curXPathElem, "Filter"); if (filterVal == null) { throw new MarshalException("filter cannot be null"); } XPathType.Filter filter = null; if (filterVal.equals("intersect")) { filter = XPathType.Filter.INTERSECT; } else if (filterVal.equals("subtract")) { filter = XPathType.Filter.SUBTRACT; } else if (filterVal.equals("union")) { filter = XPathType.Filter.UNION; } else { throw new MarshalException("Unknown XPathType filter type" + filterVal); } NamedNodeMap attributes = curXPathElem.getAttributes(); if (attributes != null) { int length = attributes.getLength(); Map namespaceMap = new HashMap(length); for (int i = 0; i < length; i++) { Attr attr = (Attr)attributes.item(i); String prefix = attr.getPrefix(); if (prefix != null && prefix.equals("xmlns")) { namespaceMap.put(attr.getLocalName(), attr.getValue()); } } list.add(new XPathType(xPath, filter, namespaceMap)); } else { list.add(new XPathType(xPath, filter)); } curXPathElem = DOMUtils.getNextSiblingElement(curXPathElem); } this.params = new XPathFilter2ParameterSpec(list); } public void marshalParams(XMLStructure parent, XMLCryptoContext context) throws MarshalException { super.marshalParams(parent, context); XPathFilter2ParameterSpec xp = (XPathFilter2ParameterSpec)getParameterSpec(); String prefix = DOMUtils.getNSPrefix(context, Transform.XPATH2); String qname = (prefix == null || prefix.length() == 0) ? "xmlns" : "xmlns:" + prefix; @SuppressWarnings("unchecked") List xpathList = xp.getXPathList(); for (XPathType xpathType : xpathList) { Element elem = DOMUtils.createElement(ownerDoc, "XPath", Transform.XPATH2, prefix); elem.appendChild (ownerDoc.createTextNode(xpathType.getExpression())); DOMUtils.setAttribute(elem, "Filter", xpathType.getFilter().toString()); elem.setAttributeNS("http://www.w3.org/2000/xmlns/", qname, Transform.XPATH2); // add namespace attributes, if necessary @SuppressWarnings("unchecked") Set> entries = xpathType.getNamespaceMap().entrySet(); for (Map.Entry entry : entries) { elem.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:" + entry.getKey(), entry.getValue()); } transformElem.appendChild(elem); } } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMCanonicalXMLC14N11Method.javalibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMCanonicalXMLC14N11M0000644000175000017500000000567712234743735031334 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. */ /* * $Id$ */ package org.apache.jcp.xml.dsig.internal.dom; import javax.xml.crypto.*; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.spec.TransformParameterSpec; import java.security.InvalidAlgorithmParameterException; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.c14n.InvalidCanonicalizerException; /** * DOM-based implementation of CanonicalizationMethod for Canonical XML 1.1 * (with or without comments). Uses Apache XML-Sec Canonicalizer. * * @author Sean Mullan */ public final class DOMCanonicalXMLC14N11Method extends ApacheCanonicalizer { public static final String C14N_11 = "http://www.w3.org/2006/12/xml-c14n11"; public static final String C14N_11_WITH_COMMENTS = "http://www.w3.org/2006/12/xml-c14n11#WithComments"; public void init(TransformParameterSpec params) throws InvalidAlgorithmParameterException { if (params != null) { throw new InvalidAlgorithmParameterException("no parameters " + "should be specified for Canonical XML 1.1 algorithm"); } } public Data transform(Data data, XMLCryptoContext xc) throws TransformException { // ignore comments if dereferencing same-document URI that requires // you to omit comments, even if the Transform says otherwise - // this is to be compliant with section 4.3.3.3 of W3C Rec. if (data instanceof DOMSubTreeData) { DOMSubTreeData subTree = (DOMSubTreeData) data; if (subTree.excludeComments()) { try { apacheCanonicalizer = Canonicalizer.getInstance(C14N_11); boolean secVal = Utils.secureValidation(xc); apacheCanonicalizer.setSecureValidation(secVal); } catch (InvalidCanonicalizerException ice) { throw new TransformException ("Couldn't find Canonicalizer for: " + C14N_11 + ": " + ice.getMessage(), ice); } } } return canonicalize(data, xc); } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMKeyValue.java0000644000175000017500000005066212236002743030643 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMKeyValue.java 1538756 2013-11-04 20:38:59Z mullan $ */ package org.apache.jcp.xml.dsig.internal.dom; import javax.xml.crypto.*; import javax.xml.crypto.dom.DOMCryptoContext; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.keyinfo.KeyValue; // import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.security.AccessController; import java.security.KeyException; import java.security.KeyFactory; import java.security.NoSuchAlgorithmException; import java.security.PrivilegedActionException; import java.security.PrivilegedExceptionAction; import java.security.PublicKey; import java.security.interfaces.DSAParams; import java.security.interfaces.DSAPublicKey; import java.security.interfaces.ECPublicKey; import java.security.interfaces.RSAPublicKey; import java.security.spec.DSAPublicKeySpec; import java.security.spec.ECParameterSpec; import java.security.spec.ECPoint; import java.security.spec.ECPublicKeySpec; import java.security.spec.EllipticCurve; import java.security.spec.InvalidKeySpecException; import java.security.spec.KeySpec; import java.security.spec.RSAPublicKeySpec; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.apache.xml.security.exceptions.Base64DecodingException; import org.apache.xml.security.utils.Base64; import org.apache.xml.security.utils.ClassLoaderUtils; /** * DOM-based implementation of KeyValue. * * @author Sean Mullan */ public abstract class DOMKeyValue extends DOMStructure implements KeyValue { private static final String XMLDSIG_11_XMLNS = "http://www.w3.org/2009/xmldsig11#"; private final PublicKey publicKey; public DOMKeyValue(PublicKey key) throws KeyException { if (key == null) { throw new NullPointerException("key cannot be null"); } this.publicKey = key; } /** * Creates a DOMKeyValue from an element. * * @param kvtElem a KeyValue child element */ public DOMKeyValue(Element kvtElem) throws MarshalException { this.publicKey = unmarshalKeyValue(kvtElem); } static KeyValue unmarshal(Element kvElem) throws MarshalException { Element kvtElem = DOMUtils.getFirstChildElement(kvElem); if (kvtElem.getLocalName().equals("DSAKeyValue")) { return new DSA(kvtElem); } else if (kvtElem.getLocalName().equals("RSAKeyValue")) { return new RSA(kvtElem); } else if (kvtElem.getLocalName().equals("ECKeyValue")) { return new EC(kvtElem); } else { return new Unknown(kvtElem); } } public PublicKey getPublicKey() throws KeyException { if (publicKey == null) { throw new KeyException("can't convert KeyValue to PublicKey"); } else { return publicKey; } } public void marshal(Node parent, String dsPrefix, DOMCryptoContext context) throws MarshalException { Document ownerDoc = DOMUtils.getOwnerDocument(parent); // create KeyValue element Element kvElem = DOMUtils.createElement(ownerDoc, "KeyValue", XMLSignature.XMLNS, dsPrefix); marshalPublicKey(kvElem, ownerDoc, dsPrefix, context); parent.appendChild(kvElem); } abstract void marshalPublicKey(Node parent, Document doc, String dsPrefix, DOMCryptoContext context) throws MarshalException; abstract PublicKey unmarshalKeyValue(Element kvtElem) throws MarshalException; private static PublicKey generatePublicKey(KeyFactory kf, KeySpec keyspec) { try { return kf.generatePublic(keyspec); } catch (InvalidKeySpecException e) { //@@@ should dump exception to log return null; } } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof KeyValue)) { return false; } try { KeyValue kv = (KeyValue)obj; if (publicKey == null ) { if (kv.getPublicKey() != null) { return false; } } else if (!publicKey.equals(kv.getPublicKey())) { return false; } } catch (KeyException ke) { // no practical way to determine if the keys are equal return false; } return true; } @Override public int hashCode() { int result = 17; if (publicKey != null) { result = 31 * result + publicKey.hashCode(); } return result; } static final class RSA extends DOMKeyValue { // RSAKeyValue CryptoBinaries private DOMCryptoBinary modulus, exponent; private KeyFactory rsakf; RSA(PublicKey key) throws KeyException { super(key); RSAPublicKey rkey = (RSAPublicKey)key; exponent = new DOMCryptoBinary(rkey.getPublicExponent()); modulus = new DOMCryptoBinary(rkey.getModulus()); } RSA(Element elem) throws MarshalException { super(elem); } void marshalPublicKey(Node parent, Document doc, String dsPrefix, DOMCryptoContext context) throws MarshalException { Element rsaElem = DOMUtils.createElement(doc, "RSAKeyValue", XMLSignature.XMLNS, dsPrefix); Element modulusElem = DOMUtils.createElement(doc, "Modulus", XMLSignature.XMLNS, dsPrefix); Element exponentElem = DOMUtils.createElement(doc, "Exponent", XMLSignature.XMLNS, dsPrefix); modulus.marshal(modulusElem, dsPrefix, context); exponent.marshal(exponentElem, dsPrefix, context); rsaElem.appendChild(modulusElem); rsaElem.appendChild(exponentElem); parent.appendChild(rsaElem); } PublicKey unmarshalKeyValue(Element kvtElem) throws MarshalException { if (rsakf == null) { try { rsakf = KeyFactory.getInstance("RSA"); } catch (NoSuchAlgorithmException e) { throw new RuntimeException ("unable to create RSA KeyFactory: " + e.getMessage()); } } Element modulusElem = DOMUtils.getFirstChildElement(kvtElem, "Modulus"); modulus = new DOMCryptoBinary(modulusElem.getFirstChild()); Element exponentElem = DOMUtils.getNextSiblingElement(modulusElem, "Exponent"); exponent = new DOMCryptoBinary(exponentElem.getFirstChild()); RSAPublicKeySpec spec = new RSAPublicKeySpec(modulus.getBigNum(), exponent.getBigNum()); return generatePublicKey(rsakf, spec); } } static final class DSA extends DOMKeyValue { // DSAKeyValue CryptoBinaries private DOMCryptoBinary p, q, g, y, j; //, seed, pgen; private KeyFactory dsakf; DSA(PublicKey key) throws KeyException { super(key); DSAPublicKey dkey = (DSAPublicKey) key; DSAParams params = dkey.getParams(); p = new DOMCryptoBinary(params.getP()); q = new DOMCryptoBinary(params.getQ()); g = new DOMCryptoBinary(params.getG()); y = new DOMCryptoBinary(dkey.getY()); } DSA(Element elem) throws MarshalException { super(elem); } void marshalPublicKey(Node parent, Document doc, String dsPrefix, DOMCryptoContext context) throws MarshalException { Element dsaElem = DOMUtils.createElement(doc, "DSAKeyValue", XMLSignature.XMLNS, dsPrefix); // parameters J, Seed & PgenCounter are not included Element pElem = DOMUtils.createElement(doc, "P", XMLSignature.XMLNS, dsPrefix); Element qElem = DOMUtils.createElement(doc, "Q", XMLSignature.XMLNS, dsPrefix); Element gElem = DOMUtils.createElement(doc, "G", XMLSignature.XMLNS, dsPrefix); Element yElem = DOMUtils.createElement(doc, "Y", XMLSignature.XMLNS, dsPrefix); p.marshal(pElem, dsPrefix, context); q.marshal(qElem, dsPrefix, context); g.marshal(gElem, dsPrefix, context); y.marshal(yElem, dsPrefix, context); dsaElem.appendChild(pElem); dsaElem.appendChild(qElem); dsaElem.appendChild(gElem); dsaElem.appendChild(yElem); parent.appendChild(dsaElem); } PublicKey unmarshalKeyValue(Element kvtElem) throws MarshalException { if (dsakf == null) { try { dsakf = KeyFactory.getInstance("DSA"); } catch (NoSuchAlgorithmException e) { throw new RuntimeException ("unable to create DSA KeyFactory: " + e.getMessage()); } } Element curElem = DOMUtils.getFirstChildElement(kvtElem); // check for P and Q if (curElem.getLocalName().equals("P")) { p = new DOMCryptoBinary(curElem.getFirstChild()); curElem = DOMUtils.getNextSiblingElement(curElem, "Q"); q = new DOMCryptoBinary(curElem.getFirstChild()); curElem = DOMUtils.getNextSiblingElement(curElem); } if (curElem.getLocalName().equals("G")) { g = new DOMCryptoBinary(curElem.getFirstChild()); curElem = DOMUtils.getNextSiblingElement(curElem, "Y"); } y = new DOMCryptoBinary(curElem.getFirstChild()); curElem = DOMUtils.getNextSiblingElement(curElem); if (curElem != null && curElem.getLocalName().equals("J")) { j = new DOMCryptoBinary(curElem.getFirstChild()); // curElem = DOMUtils.getNextSiblingElement(curElem); } /* if (curElem != null) { seed = new DOMCryptoBinary(curElem.getFirstChild()); curElem = DOMUtils.getNextSiblingElement(curElem); pgen = new DOMCryptoBinary(curElem.getFirstChild()); } */ //@@@ do we care about j, pgenCounter or seed? DSAPublicKeySpec spec = new DSAPublicKeySpec(y.getBigNum(), p.getBigNum(), q.getBigNum(), g.getBigNum()); return generatePublicKey(dsakf, spec); } } static final class EC extends DOMKeyValue { // ECKeyValue CryptoBinaries private byte[] ecPublicKey; private KeyFactory eckf; private ECParameterSpec ecParams; private Method encodePoint, decodePoint, getCurveName, getECParameterSpec; EC(PublicKey key) throws KeyException { super(key); ECPublicKey ecKey = (ECPublicKey)key; ECPoint ecPoint = ecKey.getW(); ecParams = ecKey.getParams(); try { AccessController.doPrivileged( new PrivilegedExceptionAction() { public Void run() throws ClassNotFoundException, NoSuchMethodException { getMethods(); return null; } } ); } catch (PrivilegedActionException pae) { throw new KeyException("ECKeyValue not supported", pae.getException()); } Object[] args = new Object[] { ecPoint, ecParams.getCurve() }; try { ecPublicKey = (byte[])encodePoint.invoke(null, args); } catch (IllegalAccessException iae) { throw new KeyException(iae); } catch (InvocationTargetException ite) { throw new KeyException(ite); } } EC(Element dmElem) throws MarshalException { super(dmElem); } void getMethods() throws ClassNotFoundException, NoSuchMethodException { Class c = ClassLoaderUtils.loadClass("sun.security.ec.ECParameters", DOMKeyValue.class); Class[] params = new Class[] { ECPoint.class, EllipticCurve.class }; encodePoint = c.getMethod("encodePoint", params); params = new Class[] { ECParameterSpec.class }; getCurveName = c.getMethod("getCurveName", params); params = new Class[] { byte[].class, EllipticCurve.class }; decodePoint = c.getMethod("decodePoint", params); c = ClassLoaderUtils.loadClass("sun.security.ec.NamedCurve", DOMKeyValue.class); params = new Class[] { String.class }; getECParameterSpec = c.getMethod("getECParameterSpec", params); } void marshalPublicKey(Node parent, Document doc, String dsPrefix, DOMCryptoContext context) throws MarshalException { String prefix = DOMUtils.getNSPrefix(context, XMLDSIG_11_XMLNS); Element ecKeyValueElem = DOMUtils.createElement(doc, "ECKeyValue", XMLDSIG_11_XMLNS, prefix); Element namedCurveElem = DOMUtils.createElement(doc, "NamedCurve", XMLDSIG_11_XMLNS, prefix); Element publicKeyElem = DOMUtils.createElement(doc, "PublicKey", XMLDSIG_11_XMLNS, prefix); Object[] args = new Object[] { ecParams }; try { String oid = (String) getCurveName.invoke(null, args); DOMUtils.setAttribute(namedCurveElem, "URI", "urn:oid:" + oid); } catch (IllegalAccessException iae) { throw new MarshalException(iae); } catch (InvocationTargetException ite) { throw new MarshalException(ite); } String qname = (prefix == null || prefix.length() == 0) ? "xmlns" : "xmlns:" + prefix; namedCurveElem.setAttributeNS("http://www.w3.org/2000/xmlns/", qname, XMLDSIG_11_XMLNS); ecKeyValueElem.appendChild(namedCurveElem); String encoded = Base64.encode(ecPublicKey); publicKeyElem.appendChild (DOMUtils.getOwnerDocument(publicKeyElem).createTextNode(encoded)); ecKeyValueElem.appendChild(publicKeyElem); parent.appendChild(ecKeyValueElem); } PublicKey unmarshalKeyValue(Element kvtElem) throws MarshalException { if (eckf == null) { try { eckf = KeyFactory.getInstance("EC"); } catch (NoSuchAlgorithmException e) { throw new RuntimeException ("unable to create EC KeyFactory: " + e.getMessage()); } } try { AccessController.doPrivileged( new PrivilegedExceptionAction() { public Void run() throws ClassNotFoundException, NoSuchMethodException { getMethods(); return null; } } ); } catch (PrivilegedActionException pae) { throw new MarshalException("ECKeyValue not supported", pae.getException()); } ECParameterSpec ecParams = null; Element curElem = DOMUtils.getFirstChildElement(kvtElem); if (curElem.getLocalName().equals("ECParameters")) { throw new UnsupportedOperationException ("ECParameters not supported"); } else if (curElem.getLocalName().equals("NamedCurve")) { String uri = DOMUtils.getAttributeValue(curElem, "URI"); // strip off "urn:oid" if (uri.startsWith("urn:oid:")) { String oid = uri.substring(8); try { Object[] args = new Object[] { oid }; ecParams = (ECParameterSpec) getECParameterSpec.invoke(null, args); } catch (IllegalAccessException iae) { throw new MarshalException(iae); } catch (InvocationTargetException ite) { throw new MarshalException(ite); } } else { throw new MarshalException("Invalid NamedCurve URI"); } } else { throw new MarshalException("Invalid ECKeyValue"); } curElem = DOMUtils.getNextSiblingElement(curElem, "PublicKey"); ECPoint ecPoint = null; try { Object[] args = new Object[] { Base64.decode(curElem), ecParams.getCurve() }; ecPoint = (ECPoint)decodePoint.invoke(null, args); } catch (Base64DecodingException bde) { throw new MarshalException("Invalid EC PublicKey", bde); } catch (IllegalAccessException iae) { throw new MarshalException(iae); } catch (InvocationTargetException ite) { throw new MarshalException(ite); } /* ecPoint = sun.security.ec.ECParameters.decodePoint( Base64.decode(curElem), ecParams.getCurve()); */ ECPublicKeySpec spec = new ECPublicKeySpec(ecPoint, ecParams); return generatePublicKey(eckf, spec); } } static final class Unknown extends DOMKeyValue { private javax.xml.crypto.dom.DOMStructure externalPublicKey; Unknown(Element elem) throws MarshalException { super(elem); } PublicKey unmarshalKeyValue(Element kvElem) throws MarshalException { externalPublicKey = new javax.xml.crypto.dom.DOMStructure(kvElem); return null; } void marshalPublicKey(Node parent, Document doc, String dsPrefix, DOMCryptoContext context) throws MarshalException { parent.appendChild(externalPublicKey.getNode()); } } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMTransform.java0000644000175000017500000001724712162373556031106 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMTransform.java 1496622 2013-06-25 20:02:54Z mullan $ */ package org.apache.jcp.xml.dsig.internal.dom; import java.io.OutputStream; import java.security.InvalidAlgorithmParameterException; import java.security.NoSuchAlgorithmException; import java.security.Provider; import java.security.spec.AlgorithmParameterSpec; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import javax.xml.crypto.*; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dom.DOMCryptoContext; import javax.xml.crypto.dsig.dom.DOMSignContext; /** * DOM-based abstract implementation of Transform. * * @author Sean Mullan */ public class DOMTransform extends DOMStructure implements Transform { protected TransformService spi; /** * Creates a DOMTransform. * * @param spi the TransformService */ public DOMTransform(TransformService spi) { this.spi = spi; } /** * Creates a DOMTransform from an element. This constructor * invokes the abstract {@link #unmarshalParams unmarshalParams} method to * unmarshal any algorithm-specific input parameters. * * @param transElem a Transform element */ public DOMTransform(Element transElem, XMLCryptoContext context, Provider provider) throws MarshalException { String algorithm = DOMUtils.getAttributeValue(transElem, "Algorithm"); if (provider == null) { try { spi = TransformService.getInstance(algorithm, "DOM"); } catch (NoSuchAlgorithmException e1) { throw new MarshalException(e1); } } else { try { spi = TransformService.getInstance(algorithm, "DOM", provider); } catch (NoSuchAlgorithmException nsae) { try { spi = TransformService.getInstance(algorithm, "DOM"); } catch (NoSuchAlgorithmException e2) { throw new MarshalException(e2); } } } try { spi.init(new javax.xml.crypto.dom.DOMStructure(transElem), context); } catch (InvalidAlgorithmParameterException iape) { throw new MarshalException(iape); } } public final AlgorithmParameterSpec getParameterSpec() { return spi.getParameterSpec(); } public final String getAlgorithm() { return spi.getAlgorithm(); } /** * This method invokes the abstract {@link #marshalParams marshalParams} * method to marshal any algorithm-specific parameters. */ public void marshal(Node parent, String dsPrefix, DOMCryptoContext context) throws MarshalException { Document ownerDoc = DOMUtils.getOwnerDocument(parent); Element transformElem = null; if (parent.getLocalName().equals("Transforms")) { transformElem = DOMUtils.createElement(ownerDoc, "Transform", XMLSignature.XMLNS, dsPrefix); } else { transformElem = DOMUtils.createElement(ownerDoc, "CanonicalizationMethod", XMLSignature.XMLNS, dsPrefix); } DOMUtils.setAttribute(transformElem, "Algorithm", getAlgorithm()); spi.marshalParams(new javax.xml.crypto.dom.DOMStructure(transformElem), context); parent.appendChild(transformElem); } /** * Transforms the specified data using the underlying transform algorithm. * * @param data the data to be transformed * @param sc the XMLCryptoContext containing * additional context (may be null if not applicable) * @return the transformed data * @throws NullPointerException if data is null * @throws XMLSignatureException if an unexpected error occurs while * executing the transform */ public Data transform(Data data, XMLCryptoContext xc) throws TransformException { return spi.transform(data, xc); } /** * Transforms the specified data using the underlying transform algorithm. * * @param data the data to be transformed * @param sc the XMLCryptoContext containing * additional context (may be null if not applicable) * @param os the OutputStream that should be used to write * the transformed data to * @return the transformed data * @throws NullPointerException if data is null * @throws XMLSignatureException if an unexpected error occurs while * executing the transform */ public Data transform(Data data, XMLCryptoContext xc, OutputStream os) throws TransformException { return spi.transform(data, xc, os); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Transform)) { return false; } Transform otransform = (Transform)o; return (getAlgorithm().equals(otransform.getAlgorithm()) && DOMUtils.paramsEqual(getParameterSpec(), otransform.getParameterSpec())); } @Override public int hashCode() { int result = 17; result = 31 * result + getAlgorithm().hashCode(); AlgorithmParameterSpec spec = getParameterSpec(); if (spec != null) { result = 31 * result + spec.hashCode(); } return result; } /** * Transforms the specified data using the underlying transform algorithm. * This method invokes the {@link #marshal marshal} method and passes it * the specified DOMSignContext before transforming the data. * * @param data the data to be transformed * @param sc the XMLCryptoContext containing * additional context (may be null if not applicable) * @param context the marshalling context * @return the transformed data * @throws MarshalException if an exception occurs while marshalling * @throws NullPointerException if data or context * is null * @throws XMLSignatureException if an unexpected error occurs while * executing the transform */ Data transform(Data data, XMLCryptoContext xc, DOMSignContext context) throws MarshalException, TransformException { marshal(context.getParent(), DOMUtils.getSignaturePrefix(context), context); return transform(data, xc); } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheOctetStreamData.javalibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheOctetStreamData.0000644000175000017500000000312011654523221032027 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: ApacheOctetStreamData.java 1197150 2011-11-03 14:34:57Z coheigea $ */ package org.apache.jcp.xml.dsig.internal.dom; import java.io.IOException; import javax.xml.crypto.OctetStreamData; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.signature.XMLSignatureInput; public class ApacheOctetStreamData extends OctetStreamData implements ApacheData { private XMLSignatureInput xi; public ApacheOctetStreamData(XMLSignatureInput xi) throws CanonicalizationException, IOException { super(xi.getOctetStream(), xi.getSourceURI(), xi.getMIMEType()); this.xi = xi; } public XMLSignatureInput getXMLSignatureInput() { return xi; } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMXSLTTransform.java0000644000175000017500000000521311654523221031576 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMXSLTTransform.java 1197150 2011-11-03 14:34:57Z coheigea $ */ package org.apache.jcp.xml.dsig.internal.dom; import java.security.InvalidAlgorithmParameterException; import org.w3c.dom.Element; import org.w3c.dom.Node; import javax.xml.crypto.*; import javax.xml.crypto.dsig.spec.TransformParameterSpec; import javax.xml.crypto.dsig.spec.XSLTTransformParameterSpec; /** * DOM-based implementation of XSLT Transform. * (Uses Apache XML-Sec Transform implementation) * * @author Sean Mullan */ public final class DOMXSLTTransform extends ApacheTransform { public void init(TransformParameterSpec params) throws InvalidAlgorithmParameterException { if (params == null) { throw new InvalidAlgorithmParameterException("params are required"); } if (!(params instanceof XSLTTransformParameterSpec)) { throw new InvalidAlgorithmParameterException("unrecognized params"); } this.params = params; } public void init(XMLStructure parent, XMLCryptoContext context) throws InvalidAlgorithmParameterException { super.init(parent, context); unmarshalParams(DOMUtils.getFirstChildElement(transformElem)); } private void unmarshalParams(Element sheet) { this.params = new XSLTTransformParameterSpec (new javax.xml.crypto.dom.DOMStructure(sheet)); } public void marshalParams(XMLStructure parent, XMLCryptoContext context) throws MarshalException { super.marshalParams(parent, context); XSLTTransformParameterSpec xp = (XSLTTransformParameterSpec) getParameterSpec(); Node xsltElem = ((javax.xml.crypto.dom.DOMStructure) xp.getStylesheet()).getNode(); DOMUtils.appendChild(transformElem, xsltElem); } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSubTreeData.java0000644000175000017500000001415111750472047031262 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id$ */ package org.apache.jcp.xml.dsig.internal.dom; import javax.xml.crypto.NodeSetData; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.ListIterator; import java.util.NoSuchElementException; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; /** * This is a subtype of NodeSetData that represents a dereferenced * same-document URI as the root of a subdocument. The main reason is * for efficiency and performance, as some transforms can operate * directly on the subdocument and there is no need to convert it * first to an XPath node-set. */ public class DOMSubTreeData implements NodeSetData { private boolean excludeComments; private Node root; public DOMSubTreeData(Node root, boolean excludeComments) { this.root = root; this.excludeComments = excludeComments; } public Iterator iterator() { return new DelayedNodeIterator(root, excludeComments); } public Node getRoot() { return root; } public boolean excludeComments() { return excludeComments; } /** * This is an Iterator that contains a backing node-set that is * not populated until the caller first attempts to advance the iterator. */ static class DelayedNodeIterator implements Iterator { private Node root; private List nodeSet; private ListIterator li; private boolean withComments; DelayedNodeIterator(Node root, boolean excludeComments) { this.root = root; this.withComments = !excludeComments; } public boolean hasNext() { if (nodeSet == null) { nodeSet = dereferenceSameDocumentURI(root); li = nodeSet.listIterator(); } return li.hasNext(); } public Node next() { if (nodeSet == null) { nodeSet = dereferenceSameDocumentURI(root); li = nodeSet.listIterator(); } if (li.hasNext()) { return li.next(); } else { throw new NoSuchElementException(); } } public void remove() { throw new UnsupportedOperationException(); } /** * Dereferences a same-document URI fragment. * * @param node the node (document or element) referenced by the * URI fragment. If null, returns an empty set. * @return a set of nodes (minus any comment nodes) */ private List dereferenceSameDocumentURI(Node node) { List nodeSet = new ArrayList(); if (node != null) { nodeSetMinusCommentNodes(node, nodeSet, null); } return nodeSet; } /** * Recursively traverses the subtree, and returns an XPath-equivalent * node-set of all nodes traversed, excluding any comment nodes, * if specified. * * @param node the node to traverse * @param nodeSet the set of nodes traversed so far * @param the previous sibling node */ @SuppressWarnings("fallthrough") private void nodeSetMinusCommentNodes(Node node, List nodeSet, Node prevSibling) { switch (node.getNodeType()) { case Node.ELEMENT_NODE : NamedNodeMap attrs = node.getAttributes(); if (attrs != null) { for (int i = 0, len = attrs.getLength(); i < len; i++) { nodeSet.add(attrs.item(i)); } } nodeSet.add(node); Node pSibling = null; for (Node child = node.getFirstChild(); child != null; child = child.getNextSibling()) { nodeSetMinusCommentNodes(child, nodeSet, pSibling); pSibling = child; } break; case Node.DOCUMENT_NODE : pSibling = null; for (Node child = node.getFirstChild(); child != null; child = child.getNextSibling()) { nodeSetMinusCommentNodes(child, nodeSet, pSibling); pSibling = child; } break; case Node.TEXT_NODE : case Node.CDATA_SECTION_NODE: // emulate XPath which only returns the first node in // contiguous text/cdata nodes if (prevSibling != null && (prevSibling.getNodeType() == Node.TEXT_NODE || prevSibling.getNodeType() == Node.CDATA_SECTION_NODE)) { return; } nodeSet.add(node); break; case Node.PROCESSING_INSTRUCTION_NODE : nodeSet.add(node); break; case Node.COMMENT_NODE: if (withComments) { nodeSet.add(node); } } } } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMX509IssuerSerial.javalibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMX509IssuerSerial.ja0000644000175000017500000001146712236002743031567 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMX509IssuerSerial.java 1538756 2013-11-04 20:38:59Z mullan $ */ package org.apache.jcp.xml.dsig.internal.dom; import javax.xml.crypto.*; import javax.xml.crypto.dom.DOMCryptoContext; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.keyinfo.X509IssuerSerial; import java.math.BigInteger; import javax.security.auth.x500.X500Principal; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; /** * DOM-based implementation of X509IssuerSerial. * * @author Sean Mullan */ public final class DOMX509IssuerSerial extends DOMStructure implements X509IssuerSerial { private final String issuerName; private final BigInteger serialNumber; /** * Creates a DOMX509IssuerSerial containing the specified * issuer distinguished name/serial number pair. * * @param issuerName the X.509 issuer distinguished name in RFC 2253 * String format * @param serialNumber the serial number * @throws IllegalArgumentException if the format of issuerName * is not RFC 2253 compliant * @throws NullPointerException if issuerName or * serialNumber is null */ public DOMX509IssuerSerial(String issuerName, BigInteger serialNumber) { if (issuerName == null) { throw new NullPointerException("issuerName cannot be null"); } if (serialNumber == null) { throw new NullPointerException("serialNumber cannot be null"); } // check that issuer distinguished name conforms to RFC 2253 new X500Principal(issuerName); this.issuerName = issuerName; this.serialNumber = serialNumber; } /** * Creates a DOMX509IssuerSerial from an element. * * @param isElem an X509IssuerSerial element */ public DOMX509IssuerSerial(Element isElem) throws MarshalException { Element iNElem = DOMUtils.getFirstChildElement(isElem, "X509IssuerName"); Element sNElem = DOMUtils.getNextSiblingElement(iNElem, "X509SerialNumber"); issuerName = iNElem.getFirstChild().getNodeValue(); serialNumber = new BigInteger(sNElem.getFirstChild().getNodeValue()); } public String getIssuerName() { return issuerName; } public BigInteger getSerialNumber() { return serialNumber; } public void marshal(Node parent, String dsPrefix, DOMCryptoContext context) throws MarshalException { Document ownerDoc = DOMUtils.getOwnerDocument(parent); Element isElem = DOMUtils.createElement(ownerDoc, "X509IssuerSerial", XMLSignature.XMLNS, dsPrefix); Element inElem = DOMUtils.createElement(ownerDoc, "X509IssuerName", XMLSignature.XMLNS, dsPrefix); Element snElem = DOMUtils.createElement(ownerDoc, "X509SerialNumber", XMLSignature.XMLNS, dsPrefix); inElem.appendChild(ownerDoc.createTextNode(issuerName)); snElem.appendChild(ownerDoc.createTextNode(serialNumber.toString())); isElem.appendChild(inElem); isElem.appendChild(snElem); parent.appendChild(isElem); } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof X509IssuerSerial)) { return false; } X509IssuerSerial ois = (X509IssuerSerial)obj; return (issuerName.equals(ois.getIssuerName()) && serialNumber.equals(ois.getSerialNumber())); } @Override public int hashCode() { int result = 17; result = 31 * result + issuerName.hashCode(); result = 31 * result + serialNumber.hashCode(); return result; } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.javalibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory0000644000175000017500000003121412162650001032032 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMXMLSignatureFactory.java 1497081 2013-06-26 20:33:05Z mullan $ */ package org.apache.jcp.xml.dsig.internal.dom; import javax.xml.crypto.*; import javax.xml.crypto.dom.DOMCryptoContext; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.dom.DOMValidateContext; import javax.xml.crypto.dsig.keyinfo.*; import javax.xml.crypto.dsig.spec.*; import java.security.InvalidAlgorithmParameterException; import java.security.NoSuchAlgorithmException; import java.util.List; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; /** * DOM-based implementation of XMLSignatureFactory. * * @author Sean Mullan */ public final class DOMXMLSignatureFactory extends XMLSignatureFactory { /** * Initializes a new instance of this class. */ public DOMXMLSignatureFactory() {} public XMLSignature newXMLSignature(SignedInfo si, KeyInfo ki) { return new DOMXMLSignature(si, ki, null, null, null); } @SuppressWarnings("unchecked") public XMLSignature newXMLSignature(SignedInfo si, KeyInfo ki, List objects, String id, String signatureValueId) { return new DOMXMLSignature(si, ki, objects, id, signatureValueId); } public Reference newReference(String uri, DigestMethod dm) { return newReference(uri, dm, null, null, null); } @SuppressWarnings("unchecked") public Reference newReference(String uri, DigestMethod dm, List transforms, String type, String id) { return new DOMReference(uri, type, dm, transforms, id, getProvider()); } @SuppressWarnings("unchecked") public Reference newReference(String uri, DigestMethod dm, List appliedTransforms, Data result, List transforms, String type, String id) { if (appliedTransforms == null) { throw new NullPointerException("appliedTransforms cannot be null"); } if (appliedTransforms.isEmpty()) { throw new NullPointerException("appliedTransforms cannot be empty"); } if (result == null) { throw new NullPointerException("result cannot be null"); } return new DOMReference (uri, type, dm, appliedTransforms, result, transforms, id, getProvider()); } @SuppressWarnings("unchecked") public Reference newReference(String uri, DigestMethod dm, List transforms, String type, String id, byte[] digestValue) { if (digestValue == null) { throw new NullPointerException("digestValue cannot be null"); } return new DOMReference (uri, type, dm, null, null, transforms, id, digestValue, getProvider()); } @SuppressWarnings("unchecked") public SignedInfo newSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List references) { return newSignedInfo(cm, sm, references, null); } @SuppressWarnings("unchecked") public SignedInfo newSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List references, String id) { return new DOMSignedInfo(cm, sm, references, id); } // Object factory methods @SuppressWarnings("unchecked") public XMLObject newXMLObject(List content, String id, String mimeType, String encoding) { return new DOMXMLObject(content, id, mimeType, encoding); } @SuppressWarnings("unchecked") public Manifest newManifest(List references) { return newManifest(references, null); } @SuppressWarnings("unchecked") public Manifest newManifest(List references, String id) { return new DOMManifest(references, id); } @SuppressWarnings("unchecked") public SignatureProperties newSignatureProperties(List props, String id) { return new DOMSignatureProperties(props, id); } @SuppressWarnings("unchecked") public SignatureProperty newSignatureProperty (List info, String target, String id) { return new DOMSignatureProperty(info, target, id); } public XMLSignature unmarshalXMLSignature(XMLValidateContext context) throws MarshalException { if (context == null) { throw new NullPointerException("context cannot be null"); } return unmarshal(((DOMValidateContext) context).getNode(), context); } public XMLSignature unmarshalXMLSignature(XMLStructure xmlStructure) throws MarshalException { if (xmlStructure == null) { throw new NullPointerException("xmlStructure cannot be null"); } if (!(xmlStructure instanceof javax.xml.crypto.dom.DOMStructure)) { throw new ClassCastException("xmlStructure must be of type DOMStructure"); } return unmarshal (((javax.xml.crypto.dom.DOMStructure) xmlStructure).getNode(), new UnmarshalContext()); } private static class UnmarshalContext extends DOMCryptoContext { UnmarshalContext() {} } private XMLSignature unmarshal(Node node, XMLCryptoContext context) throws MarshalException { node.normalize(); Element element = null; if (node.getNodeType() == Node.DOCUMENT_NODE) { element = ((Document) node).getDocumentElement(); } else if (node.getNodeType() == Node.ELEMENT_NODE) { element = (Element) node; } else { throw new MarshalException ("Signature element is not a proper Node"); } // check tag String tag = element.getLocalName(); if (tag == null) { throw new MarshalException("Document implementation must " + "support DOM Level 2 and be namespace aware"); } if (tag.equals("Signature")) { return new DOMXMLSignature(element, context, getProvider()); } else { throw new MarshalException("invalid Signature tag: " + tag); } } public boolean isFeatureSupported(String feature) { if (feature == null) { throw new NullPointerException(); } else { return false; } } public DigestMethod newDigestMethod(String algorithm, DigestMethodParameterSpec params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException { if (algorithm == null) { throw new NullPointerException(); } if (algorithm.equals(DigestMethod.SHA1)) { return new DOMDigestMethod.SHA1(params); } else if (algorithm.equals(DigestMethod.SHA256)) { return new DOMDigestMethod.SHA256(params); } else if (algorithm.equals(DOMDigestMethod.SHA384)) { return new DOMDigestMethod.SHA384(params); } else if (algorithm.equals(DigestMethod.SHA512)) { return new DOMDigestMethod.SHA512(params); } else { throw new NoSuchAlgorithmException("unsupported algorithm"); } } public SignatureMethod newSignatureMethod(String algorithm, SignatureMethodParameterSpec params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException { if (algorithm == null) { throw new NullPointerException(); } if (algorithm.equals(SignatureMethod.RSA_SHA1)) { return new DOMSignatureMethod.SHA1withRSA(params); } else if (algorithm.equals(DOMSignatureMethod.RSA_SHA256)) { return new DOMSignatureMethod.SHA256withRSA(params); } else if (algorithm.equals(DOMSignatureMethod.RSA_SHA384)) { return new DOMSignatureMethod.SHA384withRSA(params); } else if (algorithm.equals(DOMSignatureMethod.RSA_SHA512)) { return new DOMSignatureMethod.SHA512withRSA(params); } else if (algorithm.equals(SignatureMethod.DSA_SHA1)) { return new DOMSignatureMethod.SHA1withDSA(params); } else if (algorithm.equals(SignatureMethod.HMAC_SHA1)) { return new DOMHMACSignatureMethod.SHA1(params); } else if (algorithm.equals(DOMHMACSignatureMethod.HMAC_SHA256)) { return new DOMHMACSignatureMethod.SHA256(params); } else if (algorithm.equals(DOMHMACSignatureMethod.HMAC_SHA384)) { return new DOMHMACSignatureMethod.SHA384(params); } else if (algorithm.equals(DOMHMACSignatureMethod.HMAC_SHA512)) { return new DOMHMACSignatureMethod.SHA512(params); } else if (algorithm.equals(DOMSignatureMethod.ECDSA_SHA1)) { return new DOMSignatureMethod.SHA1withECDSA(params); } else if (algorithm.equals(DOMSignatureMethod.ECDSA_SHA256)) { return new DOMSignatureMethod.SHA256withECDSA(params); } else if (algorithm.equals(DOMSignatureMethod.ECDSA_SHA384)) { return new DOMSignatureMethod.SHA384withECDSA(params); } else if (algorithm.equals(DOMSignatureMethod.ECDSA_SHA512)) { return new DOMSignatureMethod.SHA512withECDSA(params); } else { throw new NoSuchAlgorithmException("unsupported algorithm"); } } public Transform newTransform(String algorithm, TransformParameterSpec params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException { TransformService spi; if (getProvider() == null) { spi = TransformService.getInstance(algorithm, "DOM"); } else { try { spi = TransformService.getInstance(algorithm, "DOM", getProvider()); } catch (NoSuchAlgorithmException nsae) { spi = TransformService.getInstance(algorithm, "DOM"); } } spi.init(params); return new DOMTransform(spi); } public Transform newTransform(String algorithm, XMLStructure params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException { TransformService spi; if (getProvider() == null) { spi = TransformService.getInstance(algorithm, "DOM"); } else { try { spi = TransformService.getInstance(algorithm, "DOM", getProvider()); } catch (NoSuchAlgorithmException nsae) { spi = TransformService.getInstance(algorithm, "DOM"); } } if (params == null) { spi.init(null); } else { spi.init(params, null); } return new DOMTransform(spi); } public CanonicalizationMethod newCanonicalizationMethod(String algorithm, C14NMethodParameterSpec params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException { TransformService spi; if (getProvider() == null) { spi = TransformService.getInstance(algorithm, "DOM"); } else { try { spi = TransformService.getInstance(algorithm, "DOM", getProvider()); } catch (NoSuchAlgorithmException nsae) { spi = TransformService.getInstance(algorithm, "DOM"); } } spi.init(params); return new DOMCanonicalizationMethod(spi); } public CanonicalizationMethod newCanonicalizationMethod(String algorithm, XMLStructure params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException { TransformService spi; if (getProvider() == null) { spi = TransformService.getInstance(algorithm, "DOM"); } else { try { spi = TransformService.getInstance(algorithm, "DOM", getProvider()); } catch (NoSuchAlgorithmException nsae) { spi = TransformService.getInstance(algorithm, "DOM"); } } if (params == null) { spi.init(null); } else { spi.init(params, null); } return new DOMCanonicalizationMethod(spi); } public URIDereferencer getURIDereferencer() { return DOMURIDereferencer.INSTANCE; } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMXPathTransform.java0000644000175000017500000001012511661523757032042 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMXPathTransform.java 1203789 2011-11-18 18:46:07Z mullan $ */ package org.apache.jcp.xml.dsig.internal.dom; import javax.xml.crypto.*; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.spec.TransformParameterSpec; import javax.xml.crypto.dsig.spec.XPathFilterParameterSpec; import java.security.InvalidAlgorithmParameterException; import java.util.HashMap; import java.util.Map; import java.util.Set; import org.w3c.dom.Attr; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; /** * DOM-based implementation of XPath Filtering Transform. * (Uses Apache XML-Sec Transform implementation) * * @author Sean Mullan */ public final class DOMXPathTransform extends ApacheTransform { public void init(TransformParameterSpec params) throws InvalidAlgorithmParameterException { if (params == null) { throw new InvalidAlgorithmParameterException("params are required"); } else if (!(params instanceof XPathFilterParameterSpec)) { throw new InvalidAlgorithmParameterException ("params must be of type XPathFilterParameterSpec"); } this.params = params; } public void init(XMLStructure parent, XMLCryptoContext context) throws InvalidAlgorithmParameterException { super.init(parent, context); unmarshalParams(DOMUtils.getFirstChildElement(transformElem)); } private void unmarshalParams(Element paramsElem) { String xPath = paramsElem.getFirstChild().getNodeValue(); // create a Map of namespace prefixes NamedNodeMap attributes = paramsElem.getAttributes(); if (attributes != null) { int length = attributes.getLength(); Map namespaceMap = new HashMap(length); for (int i = 0; i < length; i++) { Attr attr = (Attr)attributes.item(i); String prefix = attr.getPrefix(); if (prefix != null && prefix.equals("xmlns")) { namespaceMap.put(attr.getLocalName(), attr.getValue()); } } this.params = new XPathFilterParameterSpec(xPath, namespaceMap); } else { this.params = new XPathFilterParameterSpec(xPath); } } public void marshalParams(XMLStructure parent, XMLCryptoContext context) throws MarshalException { super.marshalParams(parent, context); XPathFilterParameterSpec xp = (XPathFilterParameterSpec)getParameterSpec(); Element xpathElem = DOMUtils.createElement(ownerDoc, "XPath", XMLSignature.XMLNS, DOMUtils.getSignaturePrefix(context)); xpathElem.appendChild(ownerDoc.createTextNode(xp.getXPath())); // add namespace attributes, if necessary @SuppressWarnings("unchecked") Set> entries = xp.getNamespaceMap().entrySet(); for (Map.Entry entry : entries) { xpathElem.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:" + entry.getKey(), entry.getValue()); } transformElem.appendChild(xpathElem); } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMCryptoBinary.java0000644000175000017500000000611211654523221031534 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMCryptoBinary.java 1197150 2011-11-03 14:34:57Z coheigea $ */ package org.apache.jcp.xml.dsig.internal.dom; import java.math.BigInteger; import javax.xml.crypto.*; import javax.xml.crypto.dom.DOMCryptoContext; import org.w3c.dom.Node; import org.w3c.dom.Text; import org.apache.xml.security.utils.Base64; /** * A DOM-based representation of the XML CryptoBinary simple type * as defined in the W3C specification for XML-Signature Syntax and Processing. * The XML Schema Definition is defined as: * *

* <simpleType name="CryptoBinary"> * <restriction base = "base64Binary"> * </restriction> * </simpleType> * * * @author Sean Mullan */ public final class DOMCryptoBinary extends DOMStructure { private final BigInteger bigNum; private final String value; /** * Create a DOMCryptoBinary instance from the specified * BigInteger * * @param bigNum the arbitrary-length integer * @throws NullPointerException if bigNum is null */ public DOMCryptoBinary(BigInteger bigNum) { if (bigNum == null) { throw new NullPointerException("bigNum is null"); } this.bigNum = bigNum; // convert to bitstring value = Base64.encode(bigNum); } /** * Creates a DOMCryptoBinary from a node. * * @param cbNode a CryptoBinary text node * @throws MarshalException if value cannot be decoded (invalid format) */ public DOMCryptoBinary(Node cbNode) throws MarshalException { value = cbNode.getNodeValue(); try { bigNum = Base64.decodeBigIntegerFromText((Text) cbNode); } catch (Exception ex) { throw new MarshalException(ex); } } /** * Returns the BigInteger that this object contains. * * @return the BigInteger that this object contains */ public BigInteger getBigNum() { return bigNum; } public void marshal(Node parent, String prefix, DOMCryptoContext context) throws MarshalException { parent.appendChild (DOMUtils.getOwnerDocument(parent).createTextNode(value)); } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java0000644000175000017500000001216412162642400032003 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMKeyInfoFactory.java 1497059 2013-06-26 19:46:08Z mullan $ */ package org.apache.jcp.xml.dsig.internal.dom; import java.math.BigInteger; import java.security.KeyException; import java.security.PublicKey; import java.util.List; import javax.xml.crypto.*; import javax.xml.crypto.dom.DOMCryptoContext; import javax.xml.crypto.dsig.keyinfo.*; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; /** * DOM-based implementation of KeyInfoFactory. * * @author Sean Mullan */ public final class DOMKeyInfoFactory extends KeyInfoFactory { public DOMKeyInfoFactory() { } public KeyInfo newKeyInfo(List content) { return newKeyInfo(content, null); } @SuppressWarnings("unchecked") public KeyInfo newKeyInfo(List content, String id) { return new DOMKeyInfo(content, id); } public KeyName newKeyName(String name) { return new DOMKeyName(name); } public KeyValue newKeyValue(PublicKey key) throws KeyException { String algorithm = key.getAlgorithm(); if (algorithm.equals("DSA")) { return new DOMKeyValue.DSA(key); } else if (algorithm.equals("RSA")) { return new DOMKeyValue.RSA(key); } else if (algorithm.equals("EC")) { return new DOMKeyValue.EC(key); } else { throw new KeyException("unsupported key algorithm: " + algorithm); } } public PGPData newPGPData(byte[] keyId) { return newPGPData(keyId, null, null); } @SuppressWarnings("unchecked") public PGPData newPGPData(byte[] keyId, byte[] keyPacket, List other) { return new DOMPGPData(keyId, keyPacket, other); } @SuppressWarnings("unchecked") public PGPData newPGPData(byte[] keyPacket, List other) { return new DOMPGPData(keyPacket, other); } public RetrievalMethod newRetrievalMethod(String uri) { return newRetrievalMethod(uri, null, null); } @SuppressWarnings("unchecked") public RetrievalMethod newRetrievalMethod(String uri, String type, List transforms) { if (uri == null) { throw new NullPointerException("uri must not be null"); } return new DOMRetrievalMethod(uri, type, transforms); } @SuppressWarnings("unchecked") public X509Data newX509Data(List content) { return new DOMX509Data(content); } public X509IssuerSerial newX509IssuerSerial(String issuerName, BigInteger serialNumber) { return new DOMX509IssuerSerial(issuerName, serialNumber); } public boolean isFeatureSupported(String feature) { if (feature == null) { throw new NullPointerException(); } else { return false; } } public URIDereferencer getURIDereferencer() { return DOMURIDereferencer.INSTANCE; } public KeyInfo unmarshalKeyInfo(XMLStructure xmlStructure) throws MarshalException { if (xmlStructure == null) { throw new NullPointerException("xmlStructure cannot be null"); } if (!(xmlStructure instanceof javax.xml.crypto.dom.DOMStructure)) { throw new ClassCastException("xmlStructure must be of type DOMStructure"); } Node node = ((javax.xml.crypto.dom.DOMStructure) xmlStructure).getNode(); node.normalize(); Element element = null; if (node.getNodeType() == Node.DOCUMENT_NODE) { element = ((Document) node).getDocumentElement(); } else if (node.getNodeType() == Node.ELEMENT_NODE) { element = (Element) node; } else { throw new MarshalException ("xmlStructure does not contain a proper Node"); } // check tag String tag = element.getLocalName(); if (tag == null) { throw new MarshalException("Document implementation must " + "support DOM Level 2 and be namespace aware"); } if (tag.equals("KeyInfo")) { return new DOMKeyInfo(element, new UnmarshalContext(), getProvider()); } else { throw new MarshalException("invalid KeyInfo tag: " + tag); } } private static class UnmarshalContext extends DOMCryptoContext { UnmarshalContext() {} } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMXMLObject.java0000644000175000017500000002115412162373556030712 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMXMLObject.java 1496622 2013-06-25 20:02:54Z mullan $ */ package org.apache.jcp.xml.dsig.internal.dom; import javax.xml.crypto.*; import javax.xml.crypto.dom.DOMCryptoContext; import javax.xml.crypto.dsig.*; import java.security.Provider; import java.util.*; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * DOM-based implementation of XMLObject. * * @author Sean Mullan */ public final class DOMXMLObject extends DOMStructure implements XMLObject { private final String id; private final String mimeType; private final String encoding; private final List content; private Element objectElem; /** * Creates an XMLObject from the specified parameters. * * @param content a list of {@link XMLStructure}s. The list * is defensively copied to protect against subsequent modification. * May be null or empty. * @param id the Id (may be null) * @param mimeType the mime type (may be null) * @param encoding the encoding (may be null) * @return an XMLObject * @throws ClassCastException if content contains any * entries that are not of type {@link XMLStructure} */ public DOMXMLObject(List content, String id, String mimeType, String encoding) { if (content == null || content.isEmpty()) { this.content = Collections.emptyList(); } else { this.content = Collections.unmodifiableList( new ArrayList(content)); for (int i = 0, size = this.content.size(); i < size; i++) { if (!(this.content.get(i) instanceof XMLStructure)) { throw new ClassCastException ("content["+i+"] is not a valid type"); } } } this.id = id; this.mimeType = mimeType; this.encoding = encoding; } /** * Creates an XMLObject from an element. * * @param objElem an Object element * @throws MarshalException if there is an error when unmarshalling */ public DOMXMLObject(Element objElem, XMLCryptoContext context, Provider provider) throws MarshalException { // unmarshal attributes this.encoding = DOMUtils.getAttributeValue(objElem, "Encoding"); Attr attr = objElem.getAttributeNodeNS(null, "Id"); if (attr != null) { this.id = attr.getValue(); objElem.setIdAttributeNode(attr, true); } else { this.id = null; } this.mimeType = DOMUtils.getAttributeValue(objElem, "MimeType"); NodeList nodes = objElem.getChildNodes(); int length = nodes.getLength(); List content = new ArrayList(length); for (int i = 0; i < length; i++) { Node child = nodes.item(i); if (child.getNodeType() == Node.ELEMENT_NODE) { Element childElem = (Element)child; String tag = childElem.getLocalName(); if (tag.equals("Manifest")) { content.add(new DOMManifest(childElem, context, provider)); continue; } else if (tag.equals("SignatureProperties")) { content.add(new DOMSignatureProperties(childElem, context)); continue; } else if (tag.equals("X509Data")) { content.add(new DOMX509Data(childElem)); continue; } //@@@FIXME: check for other dsig structures } content.add(new javax.xml.crypto.dom.DOMStructure(child)); } if (content.isEmpty()) { this.content = Collections.emptyList(); } else { this.content = Collections.unmodifiableList(content); } this.objectElem = objElem; } public List getContent() { return content; } public String getId() { return id; } public String getMimeType() { return mimeType; } public String getEncoding() { return encoding; } public void marshal(Node parent, String dsPrefix, DOMCryptoContext context) throws MarshalException { Document ownerDoc = DOMUtils.getOwnerDocument(parent); Element objElem = objectElem != null ? objectElem : null; if (objElem == null) { objElem = DOMUtils.createElement(ownerDoc, "Object", XMLSignature.XMLNS, dsPrefix); // set attributes DOMUtils.setAttributeID(objElem, "Id", id); DOMUtils.setAttribute(objElem, "MimeType", mimeType); DOMUtils.setAttribute(objElem, "Encoding", encoding); // create and append any elements and mixed content, if necessary for (XMLStructure object : content) { if (object instanceof DOMStructure) { ((DOMStructure)object).marshal(objElem, dsPrefix, context); } else { javax.xml.crypto.dom.DOMStructure domObject = (javax.xml.crypto.dom.DOMStructure)object; DOMUtils.appendChild(objElem, domObject.getNode()); } } } parent.appendChild(objElem); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof XMLObject)) { return false; } XMLObject oxo = (XMLObject)o; boolean idsEqual = (id == null ? oxo.getId() == null : id.equals(oxo.getId())); boolean encodingsEqual = (encoding == null ? oxo.getEncoding() == null : encoding.equals(oxo.getEncoding())); boolean mimeTypesEqual = (mimeType == null ? oxo.getMimeType() == null : mimeType.equals(oxo.getMimeType())); @SuppressWarnings("unchecked") List oxoContent = oxo.getContent(); return (idsEqual && encodingsEqual && mimeTypesEqual && equalsContent(oxoContent)); } @Override public int hashCode() { int result = 17; if (id != null) { result = 31 * result + id.hashCode(); } if (encoding != null) { result = 31 * result + encoding.hashCode(); } if (mimeType != null) { result = 31 * result + mimeType.hashCode(); } result = 31 * result + content.hashCode(); return result; } private boolean equalsContent(List otherContent) { if (content.size() != otherContent.size()) { return false; } for (int i = 0, osize = otherContent.size(); i < osize; i++) { XMLStructure oxs = otherContent.get(i); XMLStructure xs = content.get(i); if (oxs instanceof javax.xml.crypto.dom.DOMStructure) { if (!(xs instanceof javax.xml.crypto.dom.DOMStructure)) { return false; } Node onode = ((javax.xml.crypto.dom.DOMStructure)oxs).getNode(); Node node = ((javax.xml.crypto.dom.DOMStructure)xs).getNode(); if (!DOMUtils.nodesEqual(node, onode)) { return false; } } else { if (!(xs.equals(oxs))) { return false; } } } return true; } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMBase64Transform.javalibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMBase64Transform.jav0000644000175000017500000000302411654523221031665 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMBase64Transform.java 1197150 2011-11-03 14:34:57Z coheigea $ */ package org.apache.jcp.xml.dsig.internal.dom; import java.security.InvalidAlgorithmParameterException; import javax.xml.crypto.dsig.spec.TransformParameterSpec; /** * DOM-based implementation of Base64 Encoding Transform. * (Uses Apache XML-Sec Transform implementation) * * @author Sean Mullan */ public final class DOMBase64Transform extends ApacheTransform { public void init(TransformParameterSpec params) throws InvalidAlgorithmParameterException { if (params != null) { throw new InvalidAlgorithmParameterException("params must be null"); } } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMX509Data.java0000644000175000017500000002612212162373556030362 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMX509Data.java 1496622 2013-06-25 20:02:54Z mullan $ */ package org.apache.jcp.xml.dsig.internal.dom; import java.io.ByteArrayInputStream; import java.security.cert.*; import java.util.*; import javax.xml.crypto.*; import javax.xml.crypto.dom.DOMCryptoContext; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.keyinfo.X509IssuerSerial; import javax.xml.crypto.dsig.keyinfo.X509Data; import javax.security.auth.x500.X500Principal; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.apache.xml.security.exceptions.Base64DecodingException; import org.apache.xml.security.utils.Base64; /** * DOM-based implementation of X509Data. * * @author Sean Mullan */ //@@@ check for illegal combinations of data violating MUSTs in W3c spec public final class DOMX509Data extends DOMStructure implements X509Data { private final List content; private CertificateFactory cf; /** * Creates a DOMX509Data. * * @param content a list of one or more X.509 data types. Valid types are * {@link String} (subject names), byte[] (subject key ids), * {@link java.security.cert.X509Certificate}, {@link X509CRL}, * or {@link javax.xml.dsig.XMLStructure} ({@link X509IssuerSerial} * objects or elements from an external namespace). The list is * defensively copied to protect against subsequent modification. * @return a X509Data * @throws NullPointerException if content is null * @throws IllegalArgumentException if content is empty * @throws ClassCastException if content contains any entries * that are not of one of the valid types mentioned above */ public DOMX509Data(List content) { if (content == null) { throw new NullPointerException("content cannot be null"); } List contentCopy = new ArrayList(content); if (contentCopy.isEmpty()) { throw new IllegalArgumentException("content cannot be empty"); } for (int i = 0, size = contentCopy.size(); i < size; i++) { Object x509Type = contentCopy.get(i); if (x509Type instanceof String) { new X500Principal((String)x509Type); } else if (!(x509Type instanceof byte[]) && !(x509Type instanceof X509Certificate) && !(x509Type instanceof X509CRL) && !(x509Type instanceof XMLStructure)) { throw new ClassCastException ("content["+i+"] is not a valid X509Data type"); } } this.content = Collections.unmodifiableList(contentCopy); } /** * Creates a DOMX509Data from an element. * * @param xdElem an X509Data element * @throws MarshalException if there is an error while unmarshalling */ public DOMX509Data(Element xdElem) throws MarshalException { // get all children nodes NodeList nl = xdElem.getChildNodes(); int length = nl.getLength(); List content = new ArrayList(length); for (int i = 0; i < length; i++) { Node child = nl.item(i); // ignore all non-Element nodes if (child.getNodeType() != Node.ELEMENT_NODE) { continue; } Element childElem = (Element)child; String localName = childElem.getLocalName(); if (localName.equals("X509Certificate")) { content.add(unmarshalX509Certificate(childElem)); } else if (localName.equals("X509IssuerSerial")) { content.add(new DOMX509IssuerSerial(childElem)); } else if (localName.equals("X509SubjectName")) { content.add(childElem.getFirstChild().getNodeValue()); } else if (localName.equals("X509SKI")) { try { content.add(Base64.decode(childElem)); } catch (Base64DecodingException bde) { throw new MarshalException("cannot decode X509SKI", bde); } } else if (localName.equals("X509CRL")) { content.add(unmarshalX509CRL(childElem)); } else { content.add(new javax.xml.crypto.dom.DOMStructure(childElem)); } } this.content = Collections.unmodifiableList(content); } public List getContent() { return content; } public void marshal(Node parent, String dsPrefix, DOMCryptoContext context) throws MarshalException { Document ownerDoc = DOMUtils.getOwnerDocument(parent); Element xdElem = DOMUtils.createElement(ownerDoc, "X509Data", XMLSignature.XMLNS, dsPrefix); // append children and preserve order for (int i = 0, size = content.size(); i < size; i++) { Object object = content.get(i); if (object instanceof X509Certificate) { marshalCert((X509Certificate)object,xdElem,ownerDoc,dsPrefix); } else if (object instanceof XMLStructure) { if (object instanceof X509IssuerSerial) { ((DOMX509IssuerSerial)object).marshal (xdElem, dsPrefix, context); } else { javax.xml.crypto.dom.DOMStructure domContent = (javax.xml.crypto.dom.DOMStructure)object; DOMUtils.appendChild(xdElem, domContent.getNode()); } } else if (object instanceof byte[]) { marshalSKI((byte[])object, xdElem, ownerDoc, dsPrefix); } else if (object instanceof String) { marshalSubjectName((String)object, xdElem, ownerDoc,dsPrefix); } else if (object instanceof X509CRL) { marshalCRL((X509CRL)object, xdElem, ownerDoc, dsPrefix); } } parent.appendChild(xdElem); } private void marshalSKI(byte[] skid, Node parent, Document doc, String dsPrefix) { Element skidElem = DOMUtils.createElement(doc, "X509SKI", XMLSignature.XMLNS, dsPrefix); skidElem.appendChild(doc.createTextNode(Base64.encode(skid))); parent.appendChild(skidElem); } private void marshalSubjectName(String name, Node parent, Document doc, String dsPrefix) { Element snElem = DOMUtils.createElement(doc, "X509SubjectName", XMLSignature.XMLNS, dsPrefix); snElem.appendChild(doc.createTextNode(name)); parent.appendChild(snElem); } private void marshalCert(X509Certificate cert, Node parent, Document doc, String dsPrefix) throws MarshalException { Element certElem = DOMUtils.createElement(doc, "X509Certificate", XMLSignature.XMLNS, dsPrefix); try { certElem.appendChild(doc.createTextNode (Base64.encode(cert.getEncoded()))); } catch (CertificateEncodingException e) { throw new MarshalException("Error encoding X509Certificate", e); } parent.appendChild(certElem); } private void marshalCRL(X509CRL crl, Node parent, Document doc, String dsPrefix) throws MarshalException { Element crlElem = DOMUtils.createElement(doc, "X509CRL", XMLSignature.XMLNS, dsPrefix); try { crlElem.appendChild(doc.createTextNode (Base64.encode(crl.getEncoded()))); } catch (CRLException e) { throw new MarshalException("Error encoding X509CRL", e); } parent.appendChild(crlElem); } private X509Certificate unmarshalX509Certificate(Element elem) throws MarshalException { try { ByteArrayInputStream bs = unmarshalBase64Binary(elem); return (X509Certificate)cf.generateCertificate(bs); } catch (CertificateException e) { throw new MarshalException("Cannot create X509Certificate", e); } } private X509CRL unmarshalX509CRL(Element elem) throws MarshalException { try { ByteArrayInputStream bs = unmarshalBase64Binary(elem); return (X509CRL)cf.generateCRL(bs); } catch (CRLException e) { throw new MarshalException("Cannot create X509CRL", e); } } private ByteArrayInputStream unmarshalBase64Binary(Element elem) throws MarshalException { try { if (cf == null) { cf = CertificateFactory.getInstance("X.509"); } return new ByteArrayInputStream(Base64.decode(elem)); } catch (CertificateException e) { throw new MarshalException("Cannot create CertificateFactory", e); } catch (Base64DecodingException bde) { throw new MarshalException("Cannot decode Base64-encoded val", bde); } } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof X509Data)) { return false; } X509Data oxd = (X509Data)o; @SuppressWarnings("unchecked") List ocontent = oxd.getContent(); int size = content.size(); if (size != ocontent.size()) { return false; } for (int i = 0; i < size; i++) { Object x = content.get(i); Object ox = ocontent.get(i); if (x instanceof byte[]) { if (!(ox instanceof byte[]) || !Arrays.equals((byte[])x, (byte[])ox)) { return false; } } else { if (!(x.equals(ox))) { return false; } } } return true; } @Override public int hashCode() { int result = 17; result = 31 * result + content.hashCode(); return result; } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMCanonicalXMLC14NMethod.javalibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMCanonicalXMLC14NMet0000644000175000017500000000563612234743735031516 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMCanonicalXMLC14NMethod.java 1537956 2013-11-01 15:25:17Z coheigea $ */ package org.apache.jcp.xml.dsig.internal.dom; import javax.xml.crypto.*; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.spec.TransformParameterSpec; import java.security.InvalidAlgorithmParameterException; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.c14n.InvalidCanonicalizerException; /** * DOM-based implementation of CanonicalizationMethod for Canonical XML * (with or without comments). Uses Apache XML-Sec Canonicalizer. * * @author Sean Mullan */ public final class DOMCanonicalXMLC14NMethod extends ApacheCanonicalizer { public void init(TransformParameterSpec params) throws InvalidAlgorithmParameterException { if (params != null) { throw new InvalidAlgorithmParameterException("no parameters " + "should be specified for Canonical XML C14N algorithm"); } } public Data transform(Data data, XMLCryptoContext xc) throws TransformException { // ignore comments if dereferencing same-document URI that requires // you to omit comments, even if the Transform says otherwise - // this is to be compliant with section 4.3.3.3 of W3C Rec. if (data instanceof DOMSubTreeData) { DOMSubTreeData subTree = (DOMSubTreeData) data; if (subTree.excludeComments()) { try { apacheCanonicalizer = Canonicalizer.getInstance (CanonicalizationMethod.INCLUSIVE); boolean secVal = Utils.secureValidation(xc); apacheCanonicalizer.setSecureValidation(secVal); } catch (InvalidCanonicalizerException ice) { throw new TransformException ("Couldn't find Canonicalizer for: " + CanonicalizationMethod.INCLUSIVE + ": " + ice.getMessage(), ice); } } } return canonicalize(data, xc); } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMManifest.java0000644000175000017500000001353212236002743030657 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMManifest.java 1538756 2013-11-04 20:38:59Z mullan $ */ package org.apache.jcp.xml.dsig.internal.dom; import javax.xml.crypto.*; import javax.xml.crypto.dom.DOMCryptoContext; import javax.xml.crypto.dsig.*; import java.security.Provider; import java.util.*; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; /** * DOM-based implementation of Manifest. * * @author Sean Mullan */ public final class DOMManifest extends DOMStructure implements Manifest { private final List references; private final String id; /** * Creates a DOMManifest containing the specified * list of {@link Reference}s and optional id. * * @param references a list of one or more References. The list * is defensively copied to protect against subsequent modification. * @param id the id (may be null * @throws NullPointerException if references is * null * @throws IllegalArgumentException if references is empty * @throws ClassCastException if references contains any * entries that are not of type {@link Reference} */ public DOMManifest(List references, String id) { if (references == null) { throw new NullPointerException("references cannot be null"); } this.references = Collections.unmodifiableList(new ArrayList(references)); if (this.references.isEmpty()) { throw new IllegalArgumentException("list of references must " + "contain at least one entry"); } for (int i = 0, size = this.references.size(); i < size; i++) { if (!(this.references.get(i) instanceof Reference)) { throw new ClassCastException ("references["+i+"] is not a valid type"); } } this.id = id; } /** * Creates a DOMManifest from an element. * * @param manElem a Manifest element */ public DOMManifest(Element manElem, XMLCryptoContext context, Provider provider) throws MarshalException { Attr attr = manElem.getAttributeNodeNS(null, "Id"); if (attr != null) { this.id = attr.getValue(); manElem.setIdAttributeNode(attr, true); } else { this.id = null; } boolean secVal = Utils.secureValidation(context); Element refElem = DOMUtils.getFirstChildElement(manElem, "Reference"); List refs = new ArrayList(); refs.add(new DOMReference(refElem, context, provider)); refElem = DOMUtils.getNextSiblingElement(refElem); while (refElem != null) { String localName = refElem.getLocalName(); if (!localName.equals("Reference")) { throw new MarshalException("Invalid element name: " + localName + ", expected Reference"); } refs.add(new DOMReference(refElem, context, provider)); if (secVal && (refs.size() > DOMSignedInfo.MAXIMUM_REFERENCE_COUNT)) { String error = "A maxiumum of " + DOMSignedInfo.MAXIMUM_REFERENCE_COUNT + " " + "references per Manifest are allowed with secure validation"; throw new MarshalException(error); } refElem = DOMUtils.getNextSiblingElement(refElem); } this.references = Collections.unmodifiableList(refs); } public String getId() { return id; } public List getReferences() { return references; } public void marshal(Node parent, String dsPrefix, DOMCryptoContext context) throws MarshalException { Document ownerDoc = DOMUtils.getOwnerDocument(parent); Element manElem = DOMUtils.createElement(ownerDoc, "Manifest", XMLSignature.XMLNS, dsPrefix); DOMUtils.setAttributeID(manElem, "Id", id); // add references for (Reference ref : references) { ((DOMReference)ref).marshal(manElem, dsPrefix, context); } parent.appendChild(manElem); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Manifest)) { return false; } Manifest oman = (Manifest)o; boolean idsEqual = (id == null ? oman.getId() == null : id.equals(oman.getId())); return (idsEqual && references.equals(oman.getReferences())); } @Override public int hashCode() { int result = 17; if (id != null) { result = 31 * result + id.hashCode(); } result = 31 * result + references.hashCode(); return result; } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMKeyInfo.java0000644000175000017500000001776312162373556030502 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMKeyInfo.java 1496622 2013-06-25 20:02:54Z mullan $ */ package org.apache.jcp.xml.dsig.internal.dom; import javax.xml.crypto.*; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.keyinfo.KeyInfo; import javax.xml.crypto.dom.*; import java.security.Provider; import java.util.*; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * DOM-based implementation of KeyInfo. * * @author Sean Mullan */ public final class DOMKeyInfo extends DOMStructure implements KeyInfo { private final String id; private final List keyInfoTypes; /** * Creates a DOMKeyInfo. * * @param content a list of one or more {@link XMLStructure}s representing * key information types. The list is defensively copied to protect * against subsequent modification. * @param id an ID attribute * @throws NullPointerException if content is null * @throws IllegalArgumentException if content is empty * @throws ClassCastException if content contains any entries * that are not of type {@link XMLStructure} */ public DOMKeyInfo(List content, String id) { if (content == null) { throw new NullPointerException("content cannot be null"); } this.keyInfoTypes = Collections.unmodifiableList(new ArrayList(content)); if (this.keyInfoTypes.isEmpty()) { throw new IllegalArgumentException("content cannot be empty"); } for (int i = 0, size = this.keyInfoTypes.size(); i < size; i++) { if (!(this.keyInfoTypes.get(i) instanceof XMLStructure)) { throw new ClassCastException ("content["+i+"] is not a valid KeyInfo type"); } } this.id = id; } /** * Creates a DOMKeyInfo from XML. * * @param kiElem KeyInfo element */ public DOMKeyInfo(Element kiElem, XMLCryptoContext context, Provider provider) throws MarshalException { // get Id attribute, if specified Attr attr = kiElem.getAttributeNodeNS(null, "Id"); if (attr != null) { id = attr.getValue(); kiElem.setIdAttributeNode(attr, true); } else { id = null; } // get all children nodes NodeList nl = kiElem.getChildNodes(); int length = nl.getLength(); if (length < 1) { throw new MarshalException ("KeyInfo must contain at least one type"); } List content = new ArrayList(length); for (int i = 0; i < length; i++) { Node child = nl.item(i); // ignore all non-Element nodes if (child.getNodeType() != Node.ELEMENT_NODE) { continue; } Element childElem = (Element)child; String localName = childElem.getLocalName(); if (localName.equals("X509Data")) { content.add(new DOMX509Data(childElem)); } else if (localName.equals("KeyName")) { content.add(new DOMKeyName(childElem)); } else if (localName.equals("KeyValue")) { content.add(DOMKeyValue.unmarshal(childElem)); } else if (localName.equals("RetrievalMethod")) { content.add(new DOMRetrievalMethod(childElem, context, provider)); } else if (localName.equals("PGPData")) { content.add(new DOMPGPData(childElem)); } else { //may be MgmtData, SPKIData or element from other namespace content.add(new javax.xml.crypto.dom.DOMStructure((childElem))); } } keyInfoTypes = Collections.unmodifiableList(content); } public String getId() { return id; } public List getContent() { return keyInfoTypes; } public void marshal(XMLStructure parent, XMLCryptoContext context) throws MarshalException { if (parent == null) { throw new NullPointerException("parent is null"); } if (!(parent instanceof javax.xml.crypto.dom.DOMStructure)) { throw new ClassCastException("parent must be of type DOMStructure"); } Node pNode = ((javax.xml.crypto.dom.DOMStructure)parent).getNode(); String dsPrefix = DOMUtils.getSignaturePrefix(context); Element kiElem = DOMUtils.createElement (DOMUtils.getOwnerDocument(pNode), "KeyInfo", XMLSignature.XMLNS, dsPrefix); if (dsPrefix == null || dsPrefix.length() == 0) { kiElem.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns", XMLSignature.XMLNS); } else { kiElem.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:" + dsPrefix, XMLSignature.XMLNS); } marshal(pNode, kiElem, null, dsPrefix, (DOMCryptoContext)context); } public void marshal(Node parent, String dsPrefix, DOMCryptoContext context) throws MarshalException { marshal(parent, null, dsPrefix, context); } public void marshal(Node parent, Node nextSibling, String dsPrefix, DOMCryptoContext context) throws MarshalException { Document ownerDoc = DOMUtils.getOwnerDocument(parent); Element kiElem = DOMUtils.createElement(ownerDoc, "KeyInfo", XMLSignature.XMLNS, dsPrefix); marshal(parent, kiElem, nextSibling, dsPrefix, context); } private void marshal(Node parent, Element kiElem, Node nextSibling, String dsPrefix, DOMCryptoContext context) throws MarshalException { // create and append KeyInfoType elements for (XMLStructure kiType : keyInfoTypes) { if (kiType instanceof DOMStructure) { ((DOMStructure)kiType).marshal(kiElem, dsPrefix, context); } else { DOMUtils.appendChild(kiElem, ((javax.xml.crypto.dom.DOMStructure)kiType).getNode()); } } // append id attribute DOMUtils.setAttributeID(kiElem, "Id", id); parent.insertBefore(kiElem, nextSibling); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof KeyInfo)) { return false; } KeyInfo oki = (KeyInfo)o; boolean idsEqual = (id == null ? oki.getId() == null : id.equals(oki.getId())); return (keyInfoTypes.equals(oki.getContent()) && idsEqual); } @Override public int hashCode() { int result = 17; if (id != null) { result = 31 * result + id.hashCode(); } result = 31 * result + keyInfoTypes.hashCode(); return result; } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMURIDereferencer.javalibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMURIDereferencer.jav0000644000175000017500000001062412234743735031733 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMURIDereferencer.java 1537956 2013-11-01 15:25:17Z coheigea $ */ package org.apache.jcp.xml.dsig.internal.dom; import org.w3c.dom.Attr; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.apache.xml.security.Init; import org.apache.xml.security.utils.XMLUtils; import org.apache.xml.security.utils.resolver.ResourceResolver; import org.apache.xml.security.signature.XMLSignatureInput; import javax.xml.crypto.*; import javax.xml.crypto.dom.*; /** * DOM-based implementation of URIDereferencer. * * @author Sean Mullan */ public class DOMURIDereferencer implements URIDereferencer { static final URIDereferencer INSTANCE = new DOMURIDereferencer(); private DOMURIDereferencer() { // need to call org.apache.xml.security.Init.init() // before calling any apache security code Init.init(); } public Data dereference(URIReference uriRef, XMLCryptoContext context) throws URIReferenceException { if (uriRef == null) { throw new NullPointerException("uriRef cannot be null"); } if (context == null) { throw new NullPointerException("context cannot be null"); } DOMURIReference domRef = (DOMURIReference) uriRef; Attr uriAttr = (Attr) domRef.getHere(); String uri = uriRef.getURI(); DOMCryptoContext dcc = (DOMCryptoContext) context; String baseURI = context.getBaseURI(); boolean secVal = Utils.secureValidation(context); // Check if same-document URI and already registered on the context if (uri != null && uri.length() != 0 && uri.charAt(0) == '#') { String id = uri.substring(1); if (id.startsWith("xpointer(id(")) { int i1 = id.indexOf('\''); int i2 = id.indexOf('\'', i1+1); id = id.substring(i1+1, i2); } Node referencedElem = dcc.getElementById(id); if (referencedElem != null) { if (secVal) { Element start = referencedElem.getOwnerDocument().getDocumentElement(); if (!XMLUtils.protectAgainstWrappingAttack(start, (Element)referencedElem, id)) { String error = "Multiple Elements with the same ID " + id + " were detected"; throw new URIReferenceException(error); } } XMLSignatureInput result = new XMLSignatureInput(referencedElem); result.setSecureValidation(secVal); if (!uri.substring(1).startsWith("xpointer(id(")) { result.setExcludeComments(true); } result.setMIMEType("text/xml"); if (baseURI != null && baseURI.length() > 0) { result.setSourceURI(baseURI.concat(uriAttr.getNodeValue())); } else { result.setSourceURI(uriAttr.getNodeValue()); } return new ApacheNodeSetData(result); } } try { ResourceResolver apacheResolver = ResourceResolver.getInstance(uriAttr, baseURI, secVal); XMLSignatureInput in = apacheResolver.resolve(uriAttr, baseURI, secVal); if (in.isOctetStream()) { return new ApacheOctetStreamData(in); } else { return new ApacheNodeSetData(in); } } catch (Exception e) { throw new URIReferenceException(e); } } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/XMLDSigRI.java0000644000175000017500000001453512157624522030226 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * =========================================================================== * * (C) Copyright IBM Corp. 2003 All Rights Reserved. * * =========================================================================== */ /* * Portions copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: XMLDSigRI.java 1493807 2013-06-17 15:20:50Z coheigea $ */ package org.apache.jcp.xml.dsig.internal.dom; import java.util.*; import java.security.*; import javax.xml.crypto.dsig.*; /** * The XMLDSig RI Provider. * * @author Joyce Leung */ /** * Defines the XMLDSigRI provider. */ public final class XMLDSigRI extends Provider { static final long serialVersionUID = -5049765099299494554L; private static final String INFO = "Apache Santuario XMLDSig " + "(DOM XMLSignatureFactory; DOM KeyInfoFactory; " + "C14N 1.0, C14N 1.1, Exclusive C14N, Base64, Enveloped, XPath, " + "XPath2, XSLT TransformServices)"; public XMLDSigRI() { /* We are the ApacheXMLDSig provider */ super("ApacheXMLDSig", 1.56, INFO); final Map map = new HashMap(); map.put("XMLSignatureFactory.DOM", "org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignatureFactory"); map.put("KeyInfoFactory.DOM", "org.apache.jcp.xml.dsig.internal.dom.DOMKeyInfoFactory"); // Inclusive C14N map.put("TransformService." + CanonicalizationMethod.INCLUSIVE, "org.apache.jcp.xml.dsig.internal.dom.DOMCanonicalXMLC14NMethod"); map.put("Alg.Alias.TransformService.INCLUSIVE", CanonicalizationMethod.INCLUSIVE); map.put("TransformService." + CanonicalizationMethod.INCLUSIVE + " MechanismType", "DOM"); // InclusiveWithComments C14N map.put("TransformService." + CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS, "org.apache.jcp.xml.dsig.internal.dom.DOMCanonicalXMLC14NMethod"); map.put("Alg.Alias.TransformService.INCLUSIVE_WITH_COMMENTS", CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS); map.put("TransformService." + CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS + " MechanismType", "DOM"); // Inclusive C14N 1.1 map.put("TransformService.http://www.w3.org/2006/12/xml-c14n11", "org.apache.jcp.xml.dsig.internal.dom.DOMCanonicalXMLC14N11Method"); map.put("TransformService.http://www.w3.org/2006/12/xml-c14n11" + " MechanismType", "DOM"); // InclusiveWithComments C14N 1.1 map.put("TransformService.http://www.w3.org/2006/12/xml-c14n11#WithComments", "org.apache.jcp.xml.dsig.internal.dom.DOMCanonicalXMLC14N11Method"); map.put("TransformService.http://www.w3.org/2006/12/xml-c14n11#WithComments" + " MechanismType", "DOM"); // Exclusive C14N map.put("TransformService." + CanonicalizationMethod.EXCLUSIVE, "org.apache.jcp.xml.dsig.internal.dom.DOMExcC14NMethod"); map.put("Alg.Alias.TransformService.EXCLUSIVE", CanonicalizationMethod.EXCLUSIVE); map.put("TransformService." + CanonicalizationMethod.EXCLUSIVE + " MechanismType", "DOM"); // ExclusiveWithComments C14N map.put("TransformService." + CanonicalizationMethod.EXCLUSIVE_WITH_COMMENTS, "org.apache.jcp.xml.dsig.internal.dom.DOMExcC14NMethod"); map.put("Alg.Alias.TransformService.EXCLUSIVE_WITH_COMMENTS", CanonicalizationMethod.EXCLUSIVE_WITH_COMMENTS); map.put("TransformService." + CanonicalizationMethod.EXCLUSIVE_WITH_COMMENTS + " MechanismType", "DOM"); // Base64 Transform map.put("TransformService." + Transform.BASE64, "org.apache.jcp.xml.dsig.internal.dom.DOMBase64Transform"); map.put("Alg.Alias.TransformService.BASE64", Transform.BASE64); map.put("TransformService." + Transform.BASE64 + " MechanismType", "DOM"); // Enveloped Transform map.put("TransformService." + Transform.ENVELOPED, "org.apache.jcp.xml.dsig.internal.dom.DOMEnvelopedTransform"); map.put("Alg.Alias.TransformService.ENVELOPED", Transform.ENVELOPED); map.put("TransformService." + Transform.ENVELOPED + " MechanismType", "DOM"); // XPath2 Transform map.put("TransformService." + Transform.XPATH2, "org.apache.jcp.xml.dsig.internal.dom.DOMXPathFilter2Transform"); map.put("Alg.Alias.TransformService.XPATH2", Transform.XPATH2); map.put("TransformService." + Transform.XPATH2 + " MechanismType", "DOM"); // XPath Transform map.put("TransformService." + Transform.XPATH, "org.apache.jcp.xml.dsig.internal.dom.DOMXPathTransform"); map.put("Alg.Alias.TransformService.XPATH", Transform.XPATH); map.put("TransformService." + Transform.XPATH + " MechanismType", "DOM"); // XSLT Transform map.put("TransformService." + Transform.XSLT, "org.apache.jcp.xml.dsig.internal.dom.DOMXSLTTransform"); map.put("Alg.Alias.TransformService.XSLT", Transform.XSLT); map.put("TransformService." + Transform.XSLT + " MechanismType", "DOM"); AccessController.doPrivileged(new PrivilegedAction() { public Void run() { putAll(map); return null; } }); } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheTransform.java0000644000175000017500000001733512234746611031642 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: ApacheTransform.java 1537966 2013-11-01 15:49:29Z coheigea $ */ package org.apache.jcp.xml.dsig.internal.dom; import java.io.OutputStream; import java.security.InvalidAlgorithmParameterException; import java.security.spec.AlgorithmParameterSpec; import java.util.Set; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.transforms.Transform; import org.apache.xml.security.transforms.Transforms; import javax.xml.crypto.*; import javax.xml.crypto.dom.DOMCryptoContext; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.spec.TransformParameterSpec; /** * This is a wrapper/glue class which invokes the Apache XML-Security * Transform. * * @author Sean Mullan * @author Erwin van der Koogh */ public abstract class ApacheTransform extends TransformService { static { org.apache.xml.security.Init.init(); } private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ApacheTransform.class); private Transform apacheTransform; protected Document ownerDoc; protected Element transformElem; protected TransformParameterSpec params; public final AlgorithmParameterSpec getParameterSpec() { return params; } public void init(XMLStructure parent, XMLCryptoContext context) throws InvalidAlgorithmParameterException { if (context != null && !(context instanceof DOMCryptoContext)) { throw new ClassCastException ("context must be of type DOMCryptoContext"); } if (parent == null) { throw new NullPointerException(); } if (!(parent instanceof javax.xml.crypto.dom.DOMStructure)) { throw new ClassCastException("parent must be of type DOMStructure"); } transformElem = (Element) ((javax.xml.crypto.dom.DOMStructure) parent).getNode(); ownerDoc = DOMUtils.getOwnerDocument(transformElem); } public void marshalParams(XMLStructure parent, XMLCryptoContext context) throws MarshalException { if (context != null && !(context instanceof DOMCryptoContext)) { throw new ClassCastException ("context must be of type DOMCryptoContext"); } if (parent == null) { throw new NullPointerException(); } if (!(parent instanceof javax.xml.crypto.dom.DOMStructure)) { throw new ClassCastException("parent must be of type DOMStructure"); } transformElem = (Element) ((javax.xml.crypto.dom.DOMStructure) parent).getNode(); ownerDoc = DOMUtils.getOwnerDocument(transformElem); } public Data transform(Data data, XMLCryptoContext xc) throws TransformException { if (data == null) { throw new NullPointerException("data must not be null"); } return transformIt(data, xc, (OutputStream)null); } public Data transform(Data data, XMLCryptoContext xc, OutputStream os) throws TransformException { if (data == null) { throw new NullPointerException("data must not be null"); } if (os == null) { throw new NullPointerException("output stream must not be null"); } return transformIt(data, xc, os); } private Data transformIt(Data data, XMLCryptoContext xc, OutputStream os) throws TransformException { if (ownerDoc == null) { throw new TransformException("transform must be marshalled"); } if (apacheTransform == null) { try { apacheTransform = new Transform(ownerDoc, getAlgorithm(), transformElem.getChildNodes()); apacheTransform.setElement(transformElem, xc.getBaseURI()); boolean secVal = Utils.secureValidation(xc); apacheTransform.setSecureValidation(secVal); if (log.isDebugEnabled()) { log.debug("Created transform for algorithm: " + getAlgorithm()); } } catch (Exception ex) { throw new TransformException("Couldn't find Transform for: " + getAlgorithm(), ex); } } if (Utils.secureValidation(xc)) { String algorithm = getAlgorithm(); if (Transforms.TRANSFORM_XSLT.equals(algorithm)) { throw new TransformException( "Transform " + algorithm + " is forbidden when secure validation is enabled" ); } } XMLSignatureInput in; if (data instanceof ApacheData) { if (log.isDebugEnabled()) { log.debug("ApacheData = true"); } in = ((ApacheData)data).getXMLSignatureInput(); } else if (data instanceof NodeSetData) { if (log.isDebugEnabled()) { log.debug("isNodeSet() = true"); } if (data instanceof DOMSubTreeData) { if (log.isDebugEnabled()) { log.debug("DOMSubTreeData = true"); } DOMSubTreeData subTree = (DOMSubTreeData)data; in = new XMLSignatureInput(subTree.getRoot()); in.setExcludeComments(subTree.excludeComments()); } else { @SuppressWarnings("unchecked") Set nodeSet = Utils.toNodeSet(((NodeSetData)data).iterator()); in = new XMLSignatureInput(nodeSet); } } else { if (log.isDebugEnabled()) { log.debug("isNodeSet() = false"); } try { in = new XMLSignatureInput (((OctetStreamData)data).getOctetStream()); } catch (Exception ex) { throw new TransformException(ex); } } boolean secVal = Utils.secureValidation(xc); in.setSecureValidation(secVal); try { if (os != null) { in = apacheTransform.performTransform(in, os); if (!in.isNodeSet() && !in.isElement()) { return null; } } else { in = apacheTransform.performTransform(in); } if (in.isOctetStream()) { return new ApacheOctetStreamData(in); } else { return new ApacheNodeSetData(in); } } catch (Exception ex) { throw new TransformException(ex); } } public final boolean isFeatureSupported(String feature) { if (feature == null) { throw new NullPointerException(); } else { return false; } } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMExcC14NMethod.java0000644000175000017500000001414012234743735031366 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMExcC14NMethod.java 1537956 2013-11-01 15:25:17Z coheigea $ */ package org.apache.jcp.xml.dsig.internal.dom; import javax.xml.crypto.*; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec; import javax.xml.crypto.dsig.spec.ExcC14NParameterSpec; import javax.xml.crypto.dsig.spec.TransformParameterSpec; import java.security.InvalidAlgorithmParameterException; import java.security.spec.AlgorithmParameterSpec; import java.util.*; import org.w3c.dom.Element; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.c14n.InvalidCanonicalizerException; /** * DOM-based implementation of CanonicalizationMethod for Exclusive * Canonical XML algorithm (with or without comments). * Uses Apache XML-Sec Canonicalizer. * * @author Sean Mullan */ public final class DOMExcC14NMethod extends ApacheCanonicalizer { public void init(TransformParameterSpec params) throws InvalidAlgorithmParameterException { if (params != null) { if (!(params instanceof ExcC14NParameterSpec)) { throw new InvalidAlgorithmParameterException ("params must be of type ExcC14NParameterSpec"); } this.params = (C14NMethodParameterSpec)params; } } public void init(XMLStructure parent, XMLCryptoContext context) throws InvalidAlgorithmParameterException { super.init(parent, context); Element paramsElem = DOMUtils.getFirstChildElement(transformElem); if (paramsElem == null) { this.params = null; this.inclusiveNamespaces = null; return; } unmarshalParams(paramsElem); } private void unmarshalParams(Element paramsElem) { String prefixListAttr = paramsElem.getAttributeNS(null, "PrefixList"); this.inclusiveNamespaces = prefixListAttr; int begin = 0; int end = prefixListAttr.indexOf(' '); List prefixList = new ArrayList(); while (end != -1) { prefixList.add(prefixListAttr.substring(begin, end)); begin = end + 1; end = prefixListAttr.indexOf(' ', begin); } if (begin <= prefixListAttr.length()) { prefixList.add(prefixListAttr.substring(begin)); } this.params = new ExcC14NParameterSpec(prefixList); } public void marshalParams(XMLStructure parent, XMLCryptoContext context) throws MarshalException { super.marshalParams(parent, context); AlgorithmParameterSpec spec = getParameterSpec(); if (spec == null) { return; } String prefix = DOMUtils.getNSPrefix(context, CanonicalizationMethod.EXCLUSIVE); Element eElem = DOMUtils.createElement(ownerDoc, "InclusiveNamespaces", CanonicalizationMethod.EXCLUSIVE, prefix); if (prefix == null || prefix.length() == 0) { eElem.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns", CanonicalizationMethod.EXCLUSIVE); } else { eElem.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:" + prefix, CanonicalizationMethod.EXCLUSIVE); } ExcC14NParameterSpec params = (ExcC14NParameterSpec)spec; StringBuffer prefixListAttr = new StringBuffer(""); @SuppressWarnings("unchecked") List prefixList = params.getPrefixList(); for (int i = 0, size = prefixList.size(); i < size; i++) { prefixListAttr.append(prefixList.get(i)); if (i < size - 1) { prefixListAttr.append(" "); } } DOMUtils.setAttribute(eElem, "PrefixList", prefixListAttr.toString()); this.inclusiveNamespaces = prefixListAttr.toString(); transformElem.appendChild(eElem); } public String getParamsNSURI() { return CanonicalizationMethod.EXCLUSIVE; } public Data transform(Data data, XMLCryptoContext xc) throws TransformException { // ignore comments if dereferencing same-document URI that require // you to omit comments, even if the Transform says otherwise - // this is to be compliant with section 4.3.3.3 of W3C Rec. if (data instanceof DOMSubTreeData) { DOMSubTreeData subTree = (DOMSubTreeData)data; if (subTree.excludeComments()) { try { apacheCanonicalizer = Canonicalizer.getInstance (CanonicalizationMethod.EXCLUSIVE); boolean secVal = Utils.secureValidation(xc); apacheCanonicalizer.setSecureValidation(secVal); } catch (InvalidCanonicalizerException ice) { throw new TransformException ("Couldn't find Canonicalizer for: " + CanonicalizationMethod.EXCLUSIVE + ": " + ice.getMessage(), ice); } } } return canonicalize(data, xc); } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureProperty.javalibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureProperty.j0000644000175000017500000001601012162373556032134 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMSignatureProperty.java 1496622 2013-06-25 20:02:54Z mullan $ */ package org.apache.jcp.xml.dsig.internal.dom; import javax.xml.crypto.*; import javax.xml.crypto.dom.DOMCryptoContext; import javax.xml.crypto.dsig.*; import java.util.*; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * DOM-based implementation of SignatureProperty. * * @author Sean Mullan */ public final class DOMSignatureProperty extends DOMStructure implements SignatureProperty { private final String id; private final String target; private final List content; /** * Creates a SignatureProperty from the specified parameters. * * @param content a list of one or more {@link XMLStructure}s. The list * is defensively copied to protect against subsequent modification. * @param target the target URI * @param id the Id (may be null) * @return a SignatureProperty * @throws ClassCastException if content contains any * entries that are not of type {@link XMLStructure} * @throws IllegalArgumentException if content is empty * @throws NullPointerException if content or * target is null */ public DOMSignatureProperty(List content, String target, String id) { if (target == null) { throw new NullPointerException("target cannot be null"); } else if (content == null) { throw new NullPointerException("content cannot be null"); } else if (content.isEmpty()) { throw new IllegalArgumentException("content cannot be empty"); } else { this.content = Collections.unmodifiableList( new ArrayList(content)); for (int i = 0, size = this.content.size(); i < size; i++) { if (!(this.content.get(i) instanceof XMLStructure)) { throw new ClassCastException ("content["+i+"] is not a valid type"); } } } this.target = target; this.id = id; } /** * Creates a DOMSignatureProperty from an element. * * @param propElem a SignatureProperty element */ public DOMSignatureProperty(Element propElem, XMLCryptoContext context) throws MarshalException { // unmarshal attributes target = DOMUtils.getAttributeValue(propElem, "Target"); if (target == null) { throw new MarshalException("target cannot be null"); } Attr attr = propElem.getAttributeNodeNS(null, "Id"); if (attr != null) { id = attr.getValue(); propElem.setIdAttributeNode(attr, true); } else { id = null; } NodeList nodes = propElem.getChildNodes(); int length = nodes.getLength(); List content = new ArrayList(length); for (int i = 0; i < length; i++) { content.add(new javax.xml.crypto.dom.DOMStructure(nodes.item(i))); } if (content.isEmpty()) { throw new MarshalException("content cannot be empty"); } else { this.content = Collections.unmodifiableList(content); } } public List getContent() { return content; } public String getId() { return id; } public String getTarget() { return target; } public void marshal(Node parent, String dsPrefix, DOMCryptoContext context) throws MarshalException { Document ownerDoc = DOMUtils.getOwnerDocument(parent); Element propElem = DOMUtils.createElement(ownerDoc, "SignatureProperty", XMLSignature.XMLNS, dsPrefix); // set attributes DOMUtils.setAttributeID(propElem, "Id", id); DOMUtils.setAttribute(propElem, "Target", target); // create and append any elements and mixed content for (XMLStructure property : content) { DOMUtils.appendChild(propElem, ((javax.xml.crypto.dom.DOMStructure)property).getNode()); } parent.appendChild(propElem); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof SignatureProperty)) { return false; } SignatureProperty osp = (SignatureProperty)o; boolean idsEqual = (id == null ? osp.getId() == null : id.equals(osp.getId())); @SuppressWarnings("unchecked") List ospContent = osp.getContent(); return (equalsContent(ospContent) && target.equals(osp.getTarget()) && idsEqual); } @Override public int hashCode() { int result = 17; if (id != null) { result = 31 * result + id.hashCode(); } result = 31 * result + target.hashCode(); result = 31 * result + content.hashCode(); return result; } private boolean equalsContent(List otherContent) { int osize = otherContent.size(); if (content.size() != osize) { return false; } for (int i = 0; i < osize; i++) { XMLStructure oxs = otherContent.get(i); XMLStructure xs = content.get(i); if (oxs instanceof javax.xml.crypto.dom.DOMStructure) { if (!(xs instanceof javax.xml.crypto.dom.DOMStructure)) { return false; } Node onode = ((javax.xml.crypto.dom.DOMStructure)oxs).getNode(); Node node = ((javax.xml.crypto.dom.DOMStructure)xs).getNode(); if (!DOMUtils.nodesEqual(node, onode)) { return false; } } else { if (!(xs.equals(oxs))) { return false; } } } return true; } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheCanonicalizer.javalibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheCanonicalizer.ja0000644000175000017500000002545012234746611032116 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: ApacheCanonicalizer.java 1537966 2013-11-01 15:49:29Z coheigea $ */ package org.apache.jcp.xml.dsig.internal.dom; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.OutputStream; import java.security.spec.AlgorithmParameterSpec; import java.security.InvalidAlgorithmParameterException; import java.util.Set; import javax.xml.crypto.*; import javax.xml.crypto.dom.DOMCryptoContext; import javax.xml.crypto.dsig.TransformException; import javax.xml.crypto.dsig.TransformService; import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.c14n.InvalidCanonicalizerException; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.transforms.Transform; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; public abstract class ApacheCanonicalizer extends TransformService { static { org.apache.xml.security.Init.init(); } private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ApacheCanonicalizer.class); protected Canonicalizer apacheCanonicalizer; private Transform apacheTransform; protected String inclusiveNamespaces; protected C14NMethodParameterSpec params; protected Document ownerDoc; protected Element transformElem; public final AlgorithmParameterSpec getParameterSpec() { return params; } public void init(XMLStructure parent, XMLCryptoContext context) throws InvalidAlgorithmParameterException { if (context != null && !(context instanceof DOMCryptoContext)) { throw new ClassCastException ("context must be of type DOMCryptoContext"); } if (parent == null) { throw new NullPointerException(); } if (!(parent instanceof javax.xml.crypto.dom.DOMStructure)) { throw new ClassCastException("parent must be of type DOMStructure"); } transformElem = (Element) ((javax.xml.crypto.dom.DOMStructure)parent).getNode(); ownerDoc = DOMUtils.getOwnerDocument(transformElem); } public void marshalParams(XMLStructure parent, XMLCryptoContext context) throws MarshalException { if (context != null && !(context instanceof DOMCryptoContext)) { throw new ClassCastException ("context must be of type DOMCryptoContext"); } if (parent == null) { throw new NullPointerException(); } if (!(parent instanceof javax.xml.crypto.dom.DOMStructure)) { throw new ClassCastException("parent must be of type DOMStructure"); } transformElem = (Element) ((javax.xml.crypto.dom.DOMStructure)parent).getNode(); ownerDoc = DOMUtils.getOwnerDocument(transformElem); } public Data canonicalize(Data data, XMLCryptoContext xc) throws TransformException { return canonicalize(data, xc, null); } public Data canonicalize(Data data, XMLCryptoContext xc, OutputStream os) throws TransformException { if (apacheCanonicalizer == null) { try { apacheCanonicalizer = Canonicalizer.getInstance(getAlgorithm()); boolean secVal = Utils.secureValidation(xc); apacheCanonicalizer.setSecureValidation(secVal); if (log.isDebugEnabled()) { log.debug("Created canonicalizer for algorithm: " + getAlgorithm()); } } catch (InvalidCanonicalizerException ice) { throw new TransformException ("Couldn't find Canonicalizer for: " + getAlgorithm() + ": " + ice.getMessage(), ice); } } if (os != null) { apacheCanonicalizer.setWriter(os); } else { apacheCanonicalizer.setWriter(new ByteArrayOutputStream()); } try { Set nodeSet = null; if (data instanceof ApacheData) { XMLSignatureInput in = ((ApacheData)data).getXMLSignatureInput(); if (in.isElement()) { if (inclusiveNamespaces != null) { return new OctetStreamData(new ByteArrayInputStream (apacheCanonicalizer.canonicalizeSubtree (in.getSubNode(), inclusiveNamespaces))); } else { return new OctetStreamData(new ByteArrayInputStream (apacheCanonicalizer.canonicalizeSubtree (in.getSubNode()))); } } else if (in.isNodeSet()) { nodeSet = in.getNodeSet(); } else { return new OctetStreamData(new ByteArrayInputStream( apacheCanonicalizer.canonicalize( Utils.readBytesFromStream(in.getOctetStream())))); } } else if (data instanceof DOMSubTreeData) { DOMSubTreeData subTree = (DOMSubTreeData)data; if (inclusiveNamespaces != null) { return new OctetStreamData(new ByteArrayInputStream (apacheCanonicalizer.canonicalizeSubtree (subTree.getRoot(), inclusiveNamespaces))); } else { return new OctetStreamData(new ByteArrayInputStream (apacheCanonicalizer.canonicalizeSubtree (subTree.getRoot()))); } } else if (data instanceof NodeSetData) { NodeSetData nsd = (NodeSetData)data; // convert Iterator to Set @SuppressWarnings("unchecked") Set ns = Utils.toNodeSet(nsd.iterator()); nodeSet = ns; if (log.isDebugEnabled()) { log.debug("Canonicalizing " + nodeSet.size() + " nodes"); } } else { return new OctetStreamData(new ByteArrayInputStream( apacheCanonicalizer.canonicalize( Utils.readBytesFromStream( ((OctetStreamData)data).getOctetStream())))); } if (inclusiveNamespaces != null) { return new OctetStreamData(new ByteArrayInputStream( apacheCanonicalizer.canonicalizeXPathNodeSet (nodeSet, inclusiveNamespaces))); } else { return new OctetStreamData(new ByteArrayInputStream( apacheCanonicalizer.canonicalizeXPathNodeSet(nodeSet))); } } catch (Exception e) { throw new TransformException(e); } } public Data transform(Data data, XMLCryptoContext xc, OutputStream os) throws TransformException { if (data == null) { throw new NullPointerException("data must not be null"); } if (os == null) { throw new NullPointerException("output stream must not be null"); } if (ownerDoc == null) { throw new TransformException("transform must be marshalled"); } if (apacheTransform == null) { try { apacheTransform = new Transform(ownerDoc, getAlgorithm(), transformElem.getChildNodes()); apacheTransform.setElement(transformElem, xc.getBaseURI()); boolean secVal = Utils.secureValidation(xc); apacheTransform.setSecureValidation(secVal); if (log.isDebugEnabled()) { log.debug("Created transform for algorithm: " + getAlgorithm()); } } catch (Exception ex) { throw new TransformException ("Couldn't find Transform for: " + getAlgorithm(), ex); } } XMLSignatureInput in; if (data instanceof ApacheData) { if (log.isDebugEnabled()) { log.debug("ApacheData = true"); } in = ((ApacheData)data).getXMLSignatureInput(); } else if (data instanceof NodeSetData) { if (log.isDebugEnabled()) { log.debug("isNodeSet() = true"); } if (data instanceof DOMSubTreeData) { DOMSubTreeData subTree = (DOMSubTreeData)data; in = new XMLSignatureInput(subTree.getRoot()); in.setExcludeComments(subTree.excludeComments()); } else { @SuppressWarnings("unchecked") Set nodeSet = Utils.toNodeSet(((NodeSetData)data).iterator()); in = new XMLSignatureInput(nodeSet); } } else { if (log.isDebugEnabled()) { log.debug("isNodeSet() = false"); } try { in = new XMLSignatureInput (((OctetStreamData)data).getOctetStream()); } catch (Exception ex) { throw new TransformException(ex); } } boolean secVal = Utils.secureValidation(xc); in.setSecureValidation(secVal); try { in = apacheTransform.performTransform(in, os); if (!in.isNodeSet() && !in.isElement()) { return null; } if (in.isOctetStream()) { return new ApacheOctetStreamData(in); } else { return new ApacheNodeSetData(in); } } catch (Exception ex) { throw new TransformException(ex); } } public final boolean isFeatureSupported(String feature) { if (feature == null) { throw new NullPointerException(); } else { return false; } } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMRetrievalMethod.javalibxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMRetrievalMethod.jav0000644000175000017500000002535212236002743032051 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Portions copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * =========================================================================== * * (C) Copyright IBM Corp. 2003 All Rights Reserved. * * =========================================================================== */ /* * $Id: DOMRetrievalMethod.java 1538756 2013-11-04 20:38:59Z mullan $ */ package org.apache.jcp.xml.dsig.internal.dom; import java.io.ByteArrayInputStream; import java.net.URI; import java.net.URISyntaxException; import java.security.Provider; import java.util.*; import javax.xml.crypto.*; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dom.DOMCryptoContext; import javax.xml.crypto.dom.DOMURIReference; import javax.xml.crypto.dsig.keyinfo.RetrievalMethod; import javax.xml.parsers.*; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; /** * DOM-based implementation of RetrievalMethod. * * @author Sean Mullan * @author Joyce Leung */ public final class DOMRetrievalMethod extends DOMStructure implements RetrievalMethod, DOMURIReference { private final List transforms; private String uri; private String type; private Attr here; /** * Creates a DOMRetrievalMethod containing the specified * URIReference and List of Transforms. * * @param uri the URI * @param type the type * @param transforms a list of {@link Transform}s. The list is defensively * copied to prevent subsequent modification. May be null * or empty. * @throws IllegalArgumentException if the format of uri is * invalid, as specified by Reference's URI attribute in the W3C * specification for XML-Signature Syntax and Processing * @throws NullPointerException if uriReference * is null * @throws ClassCastException if transforms contains any * entries that are not of type {@link Transform} */ public DOMRetrievalMethod(String uri, String type, List transforms) { if (uri == null) { throw new NullPointerException("uri cannot be null"); } if (transforms == null || transforms.isEmpty()) { this.transforms = Collections.emptyList(); } else { this.transforms = Collections.unmodifiableList( new ArrayList(transforms)); for (int i = 0, size = this.transforms.size(); i < size; i++) { if (!(this.transforms.get(i) instanceof Transform)) { throw new ClassCastException ("transforms["+i+"] is not a valid type"); } } } this.uri = uri; if (!uri.equals("")) { try { new URI(uri); } catch (URISyntaxException e) { throw new IllegalArgumentException(e.getMessage()); } } this.type = type; } /** * Creates a DOMRetrievalMethod from an element. * * @param rmElem a RetrievalMethod element */ public DOMRetrievalMethod(Element rmElem, XMLCryptoContext context, Provider provider) throws MarshalException { // get URI and Type attributes uri = DOMUtils.getAttributeValue(rmElem, "URI"); type = DOMUtils.getAttributeValue(rmElem, "Type"); // get here node here = rmElem.getAttributeNodeNS(null, "URI"); boolean secVal = Utils.secureValidation(context); // get Transforms, if specified List transforms = new ArrayList(); Element transformsElem = DOMUtils.getFirstChildElement(rmElem); if (transformsElem != null) { String localName = transformsElem.getLocalName(); if (!localName.equals("Transforms")) { throw new MarshalException("Invalid element name: " + localName + ", expected Transforms"); } Element transformElem = DOMUtils.getFirstChildElement(transformsElem, "Transform"); transforms.add(new DOMTransform(transformElem, context, provider)); transformElem = DOMUtils.getNextSiblingElement(transformElem); while (transformElem != null) { String name = transformElem.getLocalName(); if (!name.equals("Transform")) { throw new MarshalException("Invalid element name: " + name + ", expected Transform"); } transforms.add (new DOMTransform(transformElem, context, provider)); if (secVal && (transforms.size() > DOMReference.MAXIMUM_TRANSFORM_COUNT)) { String error = "A maxiumum of " + DOMReference.MAXIMUM_TRANSFORM_COUNT + " " + "transforms per Reference are allowed with secure validation"; throw new MarshalException(error); } transformElem = DOMUtils.getNextSiblingElement(transformElem); } } if (transforms.isEmpty()) { this.transforms = Collections.emptyList(); } else { this.transforms = Collections.unmodifiableList(transforms); } } public String getURI() { return uri; } public String getType() { return type; } public List getTransforms() { return transforms; } public void marshal(Node parent, String dsPrefix, DOMCryptoContext context) throws MarshalException { Document ownerDoc = DOMUtils.getOwnerDocument(parent); Element rmElem = DOMUtils.createElement(ownerDoc, "RetrievalMethod", XMLSignature.XMLNS, dsPrefix); // add URI and Type attributes DOMUtils.setAttribute(rmElem, "URI", uri); DOMUtils.setAttribute(rmElem, "Type", type); // add Transforms elements if (!transforms.isEmpty()) { Element transformsElem = DOMUtils.createElement(ownerDoc, "Transforms", XMLSignature.XMLNS, dsPrefix); rmElem.appendChild(transformsElem); for (Transform transform : transforms) { ((DOMTransform)transform).marshal(transformsElem, dsPrefix, context); } } parent.appendChild(rmElem); // save here node here = rmElem.getAttributeNodeNS(null, "URI"); } public Node getHere() { return here; } public Data dereference(XMLCryptoContext context) throws URIReferenceException { if (context == null) { throw new NullPointerException("context cannot be null"); } /* * If URIDereferencer is specified in context; use it, otherwise use * built-in. */ URIDereferencer deref = context.getURIDereferencer(); if (deref == null) { deref = DOMURIDereferencer.INSTANCE; } Data data = deref.dereference(this, context); // pass dereferenced data through Transforms try { for (Transform transform : transforms) { data = ((DOMTransform)transform).transform(data, context); } } catch (Exception e) { throw new URIReferenceException(e); } // guard against RetrievalMethod loops if (data instanceof NodeSetData && Utils.secureValidation(context)) { NodeSetData nsd = (NodeSetData)data; Iterator i = nsd.iterator(); if (i.hasNext()) { Node root = (Node)i.next(); if ("RetrievalMethod".equals(root.getLocalName())) { throw new URIReferenceException( "It is forbidden to have one RetrievalMethod point " + "to another when secure validation is enabled"); } } } return data; } public XMLStructure dereferenceAsXMLStructure(XMLCryptoContext context) throws URIReferenceException { try { ApacheData data = (ApacheData)dereference(context); boolean secVal = Utils.secureValidation(context); DocumentBuilder db = org.apache.xml.security.utils.XMLUtils.createDocumentBuilder(false, secVal); Document doc = db.parse(new ByteArrayInputStream (data.getXMLSignatureInput().getBytes())); Element kiElem = doc.getDocumentElement(); if (kiElem.getLocalName().equals("X509Data")) { return new DOMX509Data(kiElem); } else { return null; // unsupported } } catch (Exception e) { throw new URIReferenceException(e); } } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof RetrievalMethod)) { return false; } RetrievalMethod orm = (RetrievalMethod)obj; boolean typesEqual = (type == null ? orm.getType() == null : type.equals(orm.getType())); return (uri.equals(orm.getURI()) && transforms.equals(orm.getTransforms()) && typesEqual); } @Override public int hashCode() { int result = 17; if (type != null) { result = 31 * result + type.hashCode(); } result = 31 * result + uri.hashCode(); result = 31 * result + transforms.hashCode(); return result; } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMPGPData.java0000644000175000017500000002440011661545631030336 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMPGPData.java 1203846 2011-11-18 21:18:17Z mullan $ */ package org.apache.jcp.xml.dsig.internal.dom; import java.util.*; import javax.xml.crypto.*; import javax.xml.crypto.dom.DOMCryptoContext; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.keyinfo.PGPData; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.apache.xml.security.exceptions.Base64DecodingException; import org.apache.xml.security.utils.Base64; /** * DOM-based implementation of PGPData. * * @author Sean Mullan */ public final class DOMPGPData extends DOMStructure implements PGPData { private final byte[] keyId; private final byte[] keyPacket; private final List externalElements; /** * Creates a DOMPGPData containing the specified key packet. * and optional list of external elements. * * @param keyPacket a PGP Key Material Packet as defined in section 5.5 of * RFC 2440. The * array is cloned to prevent subsequent modification. * @param other a list of {@link XMLStructure}s representing elements from * an external namespace. The list is defensively copied to prevent * subsequent modification. May be null or empty. * @throws NullPointerException if keyPacket is * null * @throws IllegalArgumentException if the key packet is not in the * correct format * @throws ClassCastException if other contains any * entries that are not of type {@link XMLStructure} */ public DOMPGPData(byte[] keyPacket, List other) { if (keyPacket == null) { throw new NullPointerException("keyPacket cannot be null"); } if (other == null || other.isEmpty()) { this.externalElements = Collections.emptyList(); } else { this.externalElements = Collections.unmodifiableList(new ArrayList(other)); for (int i = 0, size = this.externalElements.size(); i < size; i++) { if (!(this.externalElements.get(i) instanceof XMLStructure)) { throw new ClassCastException ("other["+i+"] is not a valid PGPData type"); } } } this.keyPacket = (byte[])keyPacket.clone(); checkKeyPacket(keyPacket); this.keyId = null; } /** * Creates a DOMPGPData containing the specified key id and * optional key packet and list of external elements. * * @param keyId a PGP public key id as defined in section 11.2 of * RFC 2440. The * array is cloned to prevent subsequent modification. * @param keyPacket a PGP Key Material Packet as defined in section 5.5 of * RFC 2440 (may * be null). The array is cloned to prevent subsequent * modification. * @param other a list of {@link XMLStructure}s representing elements from * an external namespace. The list is defensively copied to prevent * subsequent modification. May be null or empty. * @throws NullPointerException if keyId is null * @throws IllegalArgumentException if the key id or packet is not in the * correct format * @throws ClassCastException if other contains any * entries that are not of type {@link XMLStructure} */ public DOMPGPData(byte[] keyId, byte[] keyPacket, List other) { if (keyId == null) { throw new NullPointerException("keyId cannot be null"); } // key ids must be 8 bytes if (keyId.length != 8) { throw new IllegalArgumentException("keyId must be 8 bytes long"); } if (other == null || other.isEmpty()) { this.externalElements = Collections.emptyList(); } else { this.externalElements = Collections.unmodifiableList(new ArrayList(other)); for (int i = 0, size = this.externalElements.size(); i < size; i++) { if (!(this.externalElements.get(i) instanceof XMLStructure)) { throw new ClassCastException ("other["+i+"] is not a valid PGPData type"); } } } this.keyId = (byte[])keyId.clone(); this.keyPacket = keyPacket == null ? null : (byte[])keyPacket.clone(); if (keyPacket != null) { checkKeyPacket(keyPacket); } } /** * Creates a DOMPGPData from an element. * * @param pdElem a PGPData element */ public DOMPGPData(Element pdElem) throws MarshalException { // get all children nodes byte[] keyId = null; byte[] keyPacket = null; NodeList nl = pdElem.getChildNodes(); int length = nl.getLength(); List other = new ArrayList(length); for (int x = 0; x < length; x++) { Node n = nl.item(x); if (n.getNodeType() == Node.ELEMENT_NODE) { Element childElem = (Element)n; String localName = childElem.getLocalName(); try { if (localName.equals("PGPKeyID")) { keyId = Base64.decode(childElem); } else if (localName.equals("PGPKeyPacket")){ keyPacket = Base64.decode(childElem); } else { other.add (new javax.xml.crypto.dom.DOMStructure(childElem)); } } catch (Base64DecodingException bde) { throw new MarshalException(bde); } } } this.keyId = keyId; this.keyPacket = keyPacket; this.externalElements = Collections.unmodifiableList(other); } public byte[] getKeyId() { return (keyId == null ? null : (byte[])keyId.clone()); } public byte[] getKeyPacket() { return (keyPacket == null ? null : (byte[])keyPacket.clone()); } public List getExternalElements() { return externalElements; } public void marshal(Node parent, String dsPrefix, DOMCryptoContext context) throws MarshalException { Document ownerDoc = DOMUtils.getOwnerDocument(parent); Element pdElem = DOMUtils.createElement(ownerDoc, "PGPData", XMLSignature.XMLNS, dsPrefix); // create and append PGPKeyID element if (keyId != null) { Element keyIdElem = DOMUtils.createElement(ownerDoc, "PGPKeyID", XMLSignature.XMLNS, dsPrefix); keyIdElem.appendChild (ownerDoc.createTextNode(Base64.encode(keyId))); pdElem.appendChild(keyIdElem); } // create and append PGPKeyPacket element if (keyPacket != null) { Element keyPktElem = DOMUtils.createElement(ownerDoc, "PGPKeyPacket", XMLSignature.XMLNS, dsPrefix); keyPktElem.appendChild (ownerDoc.createTextNode(Base64.encode(keyPacket))); pdElem.appendChild(keyPktElem); } // create and append any elements for (XMLStructure extElem : externalElements) { DOMUtils.appendChild(pdElem, ((javax.xml.crypto.dom.DOMStructure) extElem).getNode()); } parent.appendChild(pdElem); } /** * We assume packets use the new format packet syntax, as specified in * section 4 of RFC 2440. * * This method only checks if the packet contains a valid tag. The * contents of the packet should be checked by the application. */ private void checkKeyPacket(byte[] keyPacket) { // length must be at least 3 (one byte for tag, one byte for length, // and minimally one byte of content if (keyPacket.length < 3) { throw new IllegalArgumentException("keypacket must be at least " + "3 bytes long"); } int tag = keyPacket[0]; // first bit must be set if ((tag & 128) != 128) { throw new IllegalArgumentException("keypacket tag is invalid: " + "bit 7 is not set"); } // make sure using new format if ((tag & 64) != 64) { throw new IllegalArgumentException("old keypacket tag format is " + "unsupported"); } // tag value must be 6, 14, 5 or 7 if (((tag & 6) != 6) && ((tag & 14) != 14) && ((tag & 5) != 5) && ((tag & 7) != 7)) { throw new IllegalArgumentException("keypacket tag is invalid: " + "must be 6, 14, 5, or 7"); } } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMXMLSignature.java0000644000175000017500000005367412236002743031446 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Portions copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * =========================================================================== * * (C) Copyright IBM Corp. 2003 All Rights Reserved. * * =========================================================================== */ /* * $Id: DOMXMLSignature.java 1538756 2013-11-04 20:38:59Z mullan $ */ package org.apache.jcp.xml.dsig.internal.dom; import javax.xml.crypto.*; import javax.xml.crypto.dom.*; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.dom.DOMSignContext; import javax.xml.crypto.dsig.dom.DOMValidateContext; import javax.xml.crypto.dsig.keyinfo.KeyInfo; import java.security.InvalidKeyException; import java.security.Key; import java.security.Provider; import java.util.Collections; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.apache.xml.security.exceptions.Base64DecodingException; import org.apache.xml.security.utils.Base64; /** * DOM-based implementation of XMLSignature. * * @author Sean Mullan * @author Joyce Leung */ public final class DOMXMLSignature extends DOMStructure implements XMLSignature { private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(DOMXMLSignature.class); private String id; private SignatureValue sv; private KeyInfo ki; private List objects; private SignedInfo si; private Document ownerDoc = null; private Element localSigElem = null; private Element sigElem = null; private boolean validationStatus; private boolean validated = false; private KeySelectorResult ksr; private HashMap signatureIdMap; static { org.apache.xml.security.Init.init(); } /** * Creates a DOMXMLSignature from the specified components. * * @param si the SignedInfo * @param ki the KeyInfo, or null if not specified * @param objs a list of XMLObjects or null * if not specified. The list is copied to protect against subsequent * modification. * @param id an optional id (specify null to omit) * @param signatureValueId an optional id (specify null to * omit) * @throws NullPointerException if si is null */ public DOMXMLSignature(SignedInfo si, KeyInfo ki, List objs, String id, String signatureValueId) { if (si == null) { throw new NullPointerException("signedInfo cannot be null"); } this.si = si; this.id = id; this.sv = new DOMSignatureValue(signatureValueId); if (objs == null) { this.objects = Collections.emptyList(); } else { this.objects = Collections.unmodifiableList(new ArrayList(objs)); for (int i = 0, size = this.objects.size(); i < size; i++) { if (!(this.objects.get(i) instanceof XMLObject)) { throw new ClassCastException ("objs["+i+"] is not an XMLObject"); } } } this.ki = ki; } /** * Creates a DOMXMLSignature from XML. * * @param sigElem Signature element * @throws MarshalException if XMLSignature cannot be unmarshalled */ public DOMXMLSignature(Element sigElem, XMLCryptoContext context, Provider provider) throws MarshalException { localSigElem = sigElem; ownerDoc = localSigElem.getOwnerDocument(); // get Id attribute, if specified id = DOMUtils.getAttributeValue(localSigElem, "Id"); // unmarshal SignedInfo Element siElem = DOMUtils.getFirstChildElement(localSigElem, "SignedInfo"); si = new DOMSignedInfo(siElem, context, provider); // unmarshal SignatureValue Element sigValElem = DOMUtils.getNextSiblingElement(siElem, "SignatureValue"); sv = new DOMSignatureValue(sigValElem, context); // unmarshal KeyInfo, if specified Element nextSibling = DOMUtils.getNextSiblingElement(sigValElem); if (nextSibling != null && nextSibling.getLocalName().equals("KeyInfo")) { ki = new DOMKeyInfo(nextSibling, context, provider); nextSibling = DOMUtils.getNextSiblingElement(nextSibling); } // unmarshal Objects, if specified if (nextSibling == null) { objects = Collections.emptyList(); } else { List tempObjects = new ArrayList(); while (nextSibling != null) { String name = nextSibling.getLocalName(); if (!name.equals("Object")) { throw new MarshalException("Invalid element name: " + name + ", expected KeyInfo or Object"); } tempObjects.add(new DOMXMLObject(nextSibling, context, provider)); nextSibling = DOMUtils.getNextSiblingElement(nextSibling); } objects = Collections.unmodifiableList(tempObjects); } } public String getId() { return id; } public KeyInfo getKeyInfo() { return ki; } public SignedInfo getSignedInfo() { return si; } public List getObjects() { return objects; } public SignatureValue getSignatureValue() { return sv; } public KeySelectorResult getKeySelectorResult() { return ksr; } public void marshal(Node parent, String dsPrefix, DOMCryptoContext context) throws MarshalException { marshal(parent, null, dsPrefix, context); } public void marshal(Node parent, Node nextSibling, String dsPrefix, DOMCryptoContext context) throws MarshalException { ownerDoc = DOMUtils.getOwnerDocument(parent); sigElem = DOMUtils.createElement(ownerDoc, "Signature", XMLSignature.XMLNS, dsPrefix); // append xmlns attribute if (dsPrefix == null || dsPrefix.length() == 0) { sigElem.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns", XMLSignature.XMLNS); } else { sigElem.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:" + dsPrefix, XMLSignature.XMLNS); } // create and append SignedInfo element ((DOMSignedInfo)si).marshal(sigElem, dsPrefix, context); // create and append SignatureValue element ((DOMSignatureValue)sv).marshal(sigElem, dsPrefix, context); // create and append KeyInfo element if necessary if (ki != null) { ((DOMKeyInfo)ki).marshal(sigElem, null, dsPrefix, context); } // create and append Object elements if necessary for (int i = 0, size = objects.size(); i < size; i++) { ((DOMXMLObject)objects.get(i)).marshal(sigElem, dsPrefix, context); } // append Id attribute DOMUtils.setAttributeID(sigElem, "Id", id); parent.insertBefore(sigElem, nextSibling); } public boolean validate(XMLValidateContext vc) throws XMLSignatureException { if (vc == null) { throw new NullPointerException("validateContext is null"); } if (!(vc instanceof DOMValidateContext)) { throw new ClassCastException ("validateContext must be of type DOMValidateContext"); } if (validated) { return validationStatus; } // validate the signature boolean sigValidity = sv.validate(vc); if (!sigValidity) { validationStatus = false; validated = true; return validationStatus; } // validate all References @SuppressWarnings("unchecked") List refs = this.si.getReferences(); boolean validateRefs = true; for (int i = 0, size = refs.size(); validateRefs && i < size; i++) { Reference ref = refs.get(i); boolean refValid = ref.validate(vc); if (log.isDebugEnabled()) { log.debug("Reference[" + ref.getURI() + "] is valid: " + refValid); } validateRefs &= refValid; } if (!validateRefs) { if (log.isDebugEnabled()) { log.debug("Couldn't validate the References"); } validationStatus = false; validated = true; return validationStatus; } // validate Manifests, if property set boolean validateMans = true; if (Boolean.TRUE.equals(vc.getProperty ("org.jcp.xml.dsig.validateManifests"))) { for (int i=0, size=objects.size(); validateMans && i < size; i++) { XMLObject xo = objects.get(i); @SuppressWarnings("unchecked") List content = xo.getContent(); int csize = content.size(); for (int j = 0; validateMans && j < csize; j++) { XMLStructure xs = content.get(j); if (xs instanceof Manifest) { if (log.isDebugEnabled()) { log.debug("validating manifest"); } Manifest man = (Manifest)xs; @SuppressWarnings("unchecked") List manRefs = man.getReferences(); int rsize = manRefs.size(); for (int k = 0; validateMans && k < rsize; k++) { Reference ref = manRefs.get(k); boolean refValid = ref.validate(vc); if (log.isDebugEnabled()) { log.debug( "Manifest ref[" + ref.getURI() + "] is valid: " + refValid ); } validateMans &= refValid; } } } } } validationStatus = validateMans; validated = true; return validationStatus; } public void sign(XMLSignContext signContext) throws MarshalException, XMLSignatureException { if (signContext == null) { throw new NullPointerException("signContext cannot be null"); } DOMSignContext context = (DOMSignContext)signContext; marshal(context.getParent(), context.getNextSibling(), DOMUtils.getSignaturePrefix(context), context); // generate references and signature value List allReferences = new ArrayList(); // traverse the Signature and register all objects with IDs that // may contain References signatureIdMap = new HashMap(); signatureIdMap.put(id, this); signatureIdMap.put(si.getId(), si); @SuppressWarnings("unchecked") List refs = si.getReferences(); for (Reference ref : refs) { signatureIdMap.put(ref.getId(), ref); } for (XMLObject obj : objects) { signatureIdMap.put(obj.getId(), obj); @SuppressWarnings("unchecked") List content = obj.getContent(); for (XMLStructure xs : content) { if (xs instanceof Manifest) { Manifest man = (Manifest)xs; signatureIdMap.put(man.getId(), man); @SuppressWarnings("unchecked") List manRefs = man.getReferences(); for (Reference ref : manRefs) { allReferences.add(ref); signatureIdMap.put(ref.getId(), ref); } } } } // always add SignedInfo references after Manifest references so // that Manifest reference are digested first allReferences.addAll(refs); // generate/digest each reference for (Reference ref : allReferences) { digestReference((DOMReference)ref, signContext); } // do final sweep to digest any references that were skipped or missed for (Reference ref : allReferences) { if (((DOMReference)ref).isDigested()) { continue; } ((DOMReference)ref).digest(signContext); } Key signingKey = null; KeySelectorResult ksr = null; try { ksr = signContext.getKeySelector().select(ki, KeySelector.Purpose.SIGN, si.getSignatureMethod(), signContext); signingKey = ksr.getKey(); if (signingKey == null) { throw new XMLSignatureException("the keySelector did not " + "find a signing key"); } } catch (KeySelectorException kse) { throw new XMLSignatureException("cannot find signing key", kse); } // calculate signature value try { byte[] val = ((AbstractDOMSignatureMethod) si.getSignatureMethod()).sign(signingKey, si, signContext); ((DOMSignatureValue)sv).setValue(val); } catch (InvalidKeyException ike) { throw new XMLSignatureException(ike); } this.localSigElem = sigElem; this.ksr = ksr; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof XMLSignature)) { return false; } XMLSignature osig = (XMLSignature)o; boolean idEqual = (id == null ? osig.getId() == null : id.equals(osig.getId())); boolean keyInfoEqual = (ki == null ? osig.getKeyInfo() == null : ki.equals(osig.getKeyInfo())); return (idEqual && keyInfoEqual && sv.equals(osig.getSignatureValue()) && si.equals(osig.getSignedInfo()) && objects.equals(osig.getObjects())); } @Override public int hashCode() { int result = 17; if (id != null) { result = 31 * result + id.hashCode(); } if (ki != null) { result = 31 * result + ki.hashCode(); } result = 31 * result + sv.hashCode(); result = 31 * result + si.hashCode(); result = 31 * result + objects.hashCode(); return result; } private void digestReference(DOMReference ref, XMLSignContext signContext) throws XMLSignatureException { if (ref.isDigested()) { return; } // check dependencies String uri = ref.getURI(); if (Utils.sameDocumentURI(uri)) { String id = Utils.parseIdFromSameDocumentURI(uri); if (id != null && signatureIdMap.containsKey(id)) { XMLStructure xs = signatureIdMap.get(id); if (xs instanceof DOMReference) { digestReference((DOMReference)xs, signContext); } else if (xs instanceof Manifest) { Manifest man = (Manifest)xs; List manRefs = man.getReferences(); for (int i = 0, size = manRefs.size(); i < size; i++) { digestReference((DOMReference)manRefs.get(i), signContext); } } } // if uri="" and there are XPath Transforms, there may be // reference dependencies in the XPath Transform - so be on // the safe side, and skip and do at end in the final sweep if (uri.length() == 0) { @SuppressWarnings("unchecked") List transforms = ref.getTransforms(); for (Transform transform : transforms) { String transformAlg = transform.getAlgorithm(); if (transformAlg.equals(Transform.XPATH) || transformAlg.equals(Transform.XPATH2)) { return; } } } } ref.digest(signContext); } public class DOMSignatureValue extends DOMStructure implements SignatureValue { private String id; private byte[] value; private String valueBase64; private Element sigValueElem; private boolean validated = false; private boolean validationStatus; DOMSignatureValue(String id) { this.id = id; } DOMSignatureValue(Element sigValueElem, XMLCryptoContext context) throws MarshalException { try { // base64 decode signatureValue value = Base64.decode(sigValueElem); } catch (Base64DecodingException bde) { throw new MarshalException(bde); } Attr attr = sigValueElem.getAttributeNodeNS(null, "Id"); if (attr != null) { id = attr.getValue(); sigValueElem.setIdAttributeNode(attr, true); } else { id = null; } this.sigValueElem = sigValueElem; } public String getId() { return id; } public byte[] getValue() { return (value == null) ? null : (byte[])value.clone(); } public boolean validate(XMLValidateContext validateContext) throws XMLSignatureException { if (validateContext == null) { throw new NullPointerException("context cannot be null"); } if (validated) { return validationStatus; } // get validating key SignatureMethod sm = si.getSignatureMethod(); Key validationKey = null; KeySelectorResult ksResult; try { ksResult = validateContext.getKeySelector().select (ki, KeySelector.Purpose.VERIFY, sm, validateContext); validationKey = ksResult.getKey(); if (validationKey == null) { throw new XMLSignatureException("the keyselector did not " + "find a validation key"); } } catch (KeySelectorException kse) { throw new XMLSignatureException("cannot find validation " + "key", kse); } // canonicalize SignedInfo and verify signature try { validationStatus = ((AbstractDOMSignatureMethod)sm).verify (validationKey, si, value, validateContext); } catch (Exception e) { throw new XMLSignatureException(e); } validated = true; ksr = ksResult; return validationStatus; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof SignatureValue)) { return false; } SignatureValue osv = (SignatureValue)o; boolean idEqual = (id == null ? osv.getId() == null : id.equals(osv.getId())); //XXX compare signature values? return idEqual; } @Override public int hashCode() { int result = 17; if (id != null) { result = 31 * result + id.hashCode(); } return result; } public void marshal(Node parent, String dsPrefix, DOMCryptoContext context) throws MarshalException { // create SignatureValue element sigValueElem = DOMUtils.createElement(ownerDoc, "SignatureValue", XMLSignature.XMLNS, dsPrefix); if (valueBase64 != null) { sigValueElem.appendChild(ownerDoc.createTextNode(valueBase64)); } // append Id attribute, if specified DOMUtils.setAttributeID(sigValueElem, "Id", id); parent.appendChild(sigValueElem); } void setValue(byte[] value) { this.value = value; valueBase64 = Base64.encode(value); sigValueElem.appendChild(ownerDoc.createTextNode(valueBase64)); } } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/MacOutputStream.java0000644000175000017500000000300011654523221031056 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.jcp.xml.dsig.internal; import java.io.ByteArrayOutputStream; import javax.crypto.Mac; /** * Derived from Apache sources and changed to use Mac objects instead of * org.apache.xml.security.algorithms.SignatureAlgorithm objects. * * @author raul * @author Sean Mullan * */ public class MacOutputStream extends ByteArrayOutputStream { private final Mac mac; public MacOutputStream(Mac mac) { this.mac = mac; } @Override public void write(int arg0) { super.write(arg0); mac.update((byte) arg0); } @Override public void write(byte[] arg0, int arg1, int arg2) { super.write(arg0, arg1, arg2); mac.update(arg0, arg1, arg2); } } libxml-security-java-1.5.6/src/main/java/org/apache/jcp/xml/dsig/internal/DigesterOutputStream.java0000644000175000017500000000673111750767342032155 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DigesterOutputStream.java,v 1.5 2005/12/20 20:02:39 mullan Exp $ */ package org.apache.jcp.xml.dsig.internal; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.security.MessageDigest; import org.apache.xml.security.utils.UnsyncByteArrayOutputStream; /** * This class has been modified slightly to use java.security.MessageDigest * objects as input, rather than * org.apache.xml.security.algorithms.MessageDigestAlgorithm objects. * It also optionally caches the input bytes. * * @author raul * @author Sean Mullan */ public class DigesterOutputStream extends OutputStream { private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(DigesterOutputStream.class); private final boolean buffer; private UnsyncByteArrayOutputStream bos; private final MessageDigest md; /** * Creates a DigesterOutputStream. * * @param md the MessageDigest */ public DigesterOutputStream(MessageDigest md) { this(md, false); } /** * Creates a DigesterOutputStream. * * @param md the MessageDigest * @param buffer if true, caches the input bytes */ public DigesterOutputStream(MessageDigest md, boolean buffer) { this.md = md; this.buffer = buffer; if (buffer) { bos = new UnsyncByteArrayOutputStream(); } } public void write(int input) { if (buffer) { bos.write(input); } md.update((byte)input); } @Override public void write(byte[] input, int offset, int len) { if (buffer) { bos.write(input, offset, len); } if (log.isDebugEnabled()) { log.debug("Pre-digested input:"); StringBuilder sb = new StringBuilder(len); for (int i = offset; i < (offset + len); i++) { sb.append((char)input[i]); } log.debug(sb.toString()); } md.update(input, offset, len); } /** * @return the digest value */ public byte[] getDigestValue() { return md.digest(); } /** * @return an input stream containing the cached bytes, or * null if not cached */ public InputStream getInputStream() { if (buffer) { return new ByteArrayInputStream(bos.toByteArray()); } else { return null; } } @Override public void close() throws IOException { if (buffer) { bos.close(); } } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/0000755000175000017500000000000012273503733021613 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/0000755000175000017500000000000012273503734023463 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/package.html0000644000175000017500000000342711622706432025747 0ustar tonytony org.apache.xml.security

Canonical XML and XML Signature Implementation

Needs the following packages

Packages

  • {@link org.apache.xml.security.algorithms} contains algorithm factories
  • {@link org.apache.xml.security.c14n} contains Canonicalization related material and algorithms
  • {@link org.apache.xml.security.exceptions} contains all exceptions used by this library
  • {@link org.apache.xml.security.keys} contains key related material
  • {@link org.apache.xml.security.signature} contains the XML Signature specific classes
  • {@link org.apache.xml.security.transforms} XML Signature transformations
  • {@link org.apache.xml.security.utils} contains all utility classes

Support

See the xml-security project for further assistence

Author

Christian Geuer-Pollmann geuer-pollmann@nue.et-inf.uni-siegen.de
University of Siegen
Institute for Data Communications Systems

libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/0000755000175000017500000000000012273503734024436 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/package.html0000644000175000017500000000011607533712503026714 0ustar tonytony

general key related material.

libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/KeyInfo.java0000644000175000017500000011530612025634644026653 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys; import java.security.PrivateKey; import java.security.PublicKey; import java.security.cert.X509Certificate; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import javax.crypto.SecretKey; import org.apache.xml.security.encryption.EncryptedKey; import org.apache.xml.security.encryption.XMLCipher; import org.apache.xml.security.encryption.XMLEncryptionException; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.keys.content.DEREncodedKeyValue; import org.apache.xml.security.keys.content.KeyInfoReference; import org.apache.xml.security.keys.content.KeyName; import org.apache.xml.security.keys.content.KeyValue; import org.apache.xml.security.keys.content.MgmtData; import org.apache.xml.security.keys.content.PGPData; import org.apache.xml.security.keys.content.RetrievalMethod; import org.apache.xml.security.keys.content.SPKIData; import org.apache.xml.security.keys.content.X509Data; import org.apache.xml.security.keys.content.keyvalues.DSAKeyValue; import org.apache.xml.security.keys.content.keyvalues.RSAKeyValue; import org.apache.xml.security.keys.keyresolver.KeyResolver; import org.apache.xml.security.keys.keyresolver.KeyResolverException; import org.apache.xml.security.keys.keyresolver.KeyResolverSpi; import org.apache.xml.security.keys.storage.StorageResolver; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.EncryptionConstants; import org.apache.xml.security.utils.SignatureElementProxy; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * This class stand for KeyInfo Element that may contain keys, names, * certificates and other public key management information, * such as in-band key distribution or key agreement data. *
* KeyInfo Element has two basic functions: * One is KeyResolve for getting the public key in signature validation processing. * the other one is toElement for getting the element in signature generation processing. *
* The lengthXXX() methods provide access to the internal Key * objects: *
    *
  • If the KeyInfo was constructed from an Element * (Signature verification), the lengthXXX() methods searches * for child elements of ds:KeyInfo for known types.
  • *
  • If the KeyInfo was constructed from scratch (during * Signature generation), the lengthXXX() methods return the number * of XXXs objects already passed to the KeyInfo
  • *
*
* The addXXX() methods are used for adding Objects of the * appropriate type to the KeyInfo. This is used during signature * generation. *
* The itemXXX(int i) methods return the i'th object of the * corresponding type. *
* The containsXXX() methods return whether the KeyInfo * contains the corresponding type. * */ public class KeyInfo extends SignatureElementProxy { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(KeyInfo.class); // We need at least one StorageResolver otherwise // the KeyResolvers would not be called. // The default StorageResolver is null. private List x509Datas = null; private List encryptedKeys = null; private static final List nullList; static { List list = new ArrayList(1); list.add(null); nullList = java.util.Collections.unmodifiableList(list); } /** Field storageResolvers */ private List storageResolvers = nullList; /** * Stores the individual (per-KeyInfo) {@link KeyResolverSpi}s */ private List internalKeyResolvers = new ArrayList(); private boolean secureValidation; /** * Constructor KeyInfo * @param doc */ public KeyInfo(Document doc) { super(doc); XMLUtils.addReturnToElement(this.constructionElement); } /** * Constructor KeyInfo * * @param element * @param baseURI * @throws XMLSecurityException */ public KeyInfo(Element element, String baseURI) throws XMLSecurityException { super(element, baseURI); Attr attr = element.getAttributeNodeNS(null, "Id"); if (attr != null) { element.setIdAttributeNode(attr, true); } } /** * Set whether secure processing is enabled or not. The default is false. */ public void setSecureValidation(boolean secureValidation) { this.secureValidation = secureValidation; } /** * Sets the Id attribute * * @param Id ID */ public void setId(String id) { if (id != null) { this.constructionElement.setAttributeNS(null, Constants._ATT_ID, id); this.constructionElement.setIdAttributeNS(null, Constants._ATT_ID, true); } } /** * Returns the Id attribute * * @return the Id attribute */ public String getId() { return this.constructionElement.getAttributeNS(null, Constants._ATT_ID); } /** * Method addKeyName * * @param keynameString */ public void addKeyName(String keynameString) { this.add(new KeyName(this.doc, keynameString)); } /** * Method add * * @param keyname */ public void add(KeyName keyname) { this.constructionElement.appendChild(keyname.getElement()); XMLUtils.addReturnToElement(this.constructionElement); } /** * Method addKeyValue * * @param pk */ public void addKeyValue(PublicKey pk) { this.add(new KeyValue(this.doc, pk)); } /** * Method addKeyValue * * @param unknownKeyValueElement */ public void addKeyValue(Element unknownKeyValueElement) { this.add(new KeyValue(this.doc, unknownKeyValueElement)); } /** * Method add * * @param dsakeyvalue */ public void add(DSAKeyValue dsakeyvalue) { this.add(new KeyValue(this.doc, dsakeyvalue)); } /** * Method add * * @param rsakeyvalue */ public void add(RSAKeyValue rsakeyvalue) { this.add(new KeyValue(this.doc, rsakeyvalue)); } /** * Method add * * @param pk */ public void add(PublicKey pk) { this.add(new KeyValue(this.doc, pk)); } /** * Method add * * @param keyvalue */ public void add(KeyValue keyvalue) { this.constructionElement.appendChild(keyvalue.getElement()); XMLUtils.addReturnToElement(this.constructionElement); } /** * Method addMgmtData * * @param mgmtdata */ public void addMgmtData(String mgmtdata) { this.add(new MgmtData(this.doc, mgmtdata)); } /** * Method add * * @param mgmtdata */ public void add(MgmtData mgmtdata) { this.constructionElement.appendChild(mgmtdata.getElement()); XMLUtils.addReturnToElement(this.constructionElement); } /** * Method addPGPData * * @param pgpdata */ public void add(PGPData pgpdata) { this.constructionElement.appendChild(pgpdata.getElement()); XMLUtils.addReturnToElement(this.constructionElement); } /** * Method addRetrievalMethod * * @param uri * @param transforms * @param Type */ public void addRetrievalMethod(String uri, Transforms transforms, String Type) { this.add(new RetrievalMethod(this.doc, uri, transforms, Type)); } /** * Method add * * @param retrievalmethod */ public void add(RetrievalMethod retrievalmethod) { this.constructionElement.appendChild(retrievalmethod.getElement()); XMLUtils.addReturnToElement(this.constructionElement); } /** * Method add * * @param spkidata */ public void add(SPKIData spkidata) { this.constructionElement.appendChild(spkidata.getElement()); XMLUtils.addReturnToElement(this.constructionElement); } /** * Method addX509Data * * @param x509data */ public void add(X509Data x509data) { if (x509Datas == null) { x509Datas = new ArrayList(); } x509Datas.add(x509data); this.constructionElement.appendChild(x509data.getElement()); XMLUtils.addReturnToElement(this.constructionElement); } /** * Method addEncryptedKey * * @param encryptedKey * @throws XMLEncryptionException */ public void add(EncryptedKey encryptedKey) throws XMLEncryptionException { if (encryptedKeys == null) { encryptedKeys = new ArrayList(); } encryptedKeys.add(encryptedKey); XMLCipher cipher = XMLCipher.getInstance(); this.constructionElement.appendChild(cipher.martial(encryptedKey)); } /** * Method addDEREncodedKeyValue * * @param pk * @throws XMLSecurityException */ public void addDEREncodedKeyValue(PublicKey pk) throws XMLSecurityException { this.add(new DEREncodedKeyValue(this.doc, pk)); } /** * Method add * * @param derEncodedKeyValue */ public void add(DEREncodedKeyValue derEncodedKeyValue) { this.constructionElement.appendChild(derEncodedKeyValue.getElement()); XMLUtils.addReturnToElement(this.constructionElement); } /** * Method addKeyInfoReference * * @param URI * @throws XMLSecurityException */ public void addKeyInfoReference(String URI) throws XMLSecurityException { this.add(new KeyInfoReference(this.doc, URI)); } /** * Method add * * @param keyInfoReference */ public void add(KeyInfoReference keyInfoReference) { this.constructionElement.appendChild(keyInfoReference.getElement()); XMLUtils.addReturnToElement(this.constructionElement); } /** * Method addUnknownElement * * @param element */ public void addUnknownElement(Element element) { this.constructionElement.appendChild(element); XMLUtils.addReturnToElement(this.constructionElement); } /** * Method lengthKeyName * * @return the number of the KeyName tags */ public int lengthKeyName() { return this.length(Constants.SignatureSpecNS, Constants._TAG_KEYNAME); } /** * Method lengthKeyValue * *@return the number of the KeyValue tags */ public int lengthKeyValue() { return this.length(Constants.SignatureSpecNS, Constants._TAG_KEYVALUE); } /** * Method lengthMgmtData * *@return the number of the MgmtData tags */ public int lengthMgmtData() { return this.length(Constants.SignatureSpecNS, Constants._TAG_MGMTDATA); } /** * Method lengthPGPData * *@return the number of the PGPDat. tags */ public int lengthPGPData() { return this.length(Constants.SignatureSpecNS, Constants._TAG_PGPDATA); } /** * Method lengthRetrievalMethod * *@return the number of the RetrievalMethod tags */ public int lengthRetrievalMethod() { return this.length(Constants.SignatureSpecNS, Constants._TAG_RETRIEVALMETHOD); } /** * Method lengthSPKIData * *@return the number of the SPKIData tags */ public int lengthSPKIData() { return this.length(Constants.SignatureSpecNS, Constants._TAG_SPKIDATA); } /** * Method lengthX509Data * *@return the number of the X509Data tags */ public int lengthX509Data() { if (x509Datas != null) { return x509Datas.size(); } return this.length(Constants.SignatureSpecNS, Constants._TAG_X509DATA); } /** * Method lengthDEREncodedKeyValue * *@return the number of the DEREncodedKeyValue tags */ public int lengthDEREncodedKeyValue() { return this.length(Constants.SignatureSpec11NS, Constants._TAG_DERENCODEDKEYVALUE); } /** * Method lengthKeyInfoReference * *@return the number of the KeyInfoReference tags */ public int lengthKeyInfoReference() { return this.length(Constants.SignatureSpec11NS, Constants._TAG_KEYINFOREFERENCE); } /** * Method lengthUnknownElement * NOTE possibly buggy. * @return the number of the UnknownElement tags */ public int lengthUnknownElement() { int res = 0; NodeList nl = this.constructionElement.getChildNodes(); for (int i = 0; i < nl.getLength(); i++) { Node current = nl.item(i); /** * $todo$ using this method, we don't see unknown Elements * from Signature NS; revisit */ if ((current.getNodeType() == Node.ELEMENT_NODE) && current.getNamespaceURI().equals(Constants.SignatureSpecNS)) { res++; } } return res; } /** * Method itemKeyName * * @param i * @return the asked KeyName element, null if the index is too big * @throws XMLSecurityException */ public KeyName itemKeyName(int i) throws XMLSecurityException { Element e = XMLUtils.selectDsNode( this.constructionElement.getFirstChild(), Constants._TAG_KEYNAME, i); if (e != null) { return new KeyName(e, this.baseURI); } return null; } /** * Method itemKeyValue * * @param i * @return the asked KeyValue element, null if the index is too big * @throws XMLSecurityException */ public KeyValue itemKeyValue(int i) throws XMLSecurityException { Element e = XMLUtils.selectDsNode( this.constructionElement.getFirstChild(), Constants._TAG_KEYVALUE, i); if (e != null) { return new KeyValue(e, this.baseURI); } return null; } /** * Method itemMgmtData * * @param i * @return the asked MgmtData element, null if the index is too big * @throws XMLSecurityException */ public MgmtData itemMgmtData(int i) throws XMLSecurityException { Element e = XMLUtils.selectDsNode( this.constructionElement.getFirstChild(), Constants._TAG_MGMTDATA, i); if (e != null) { return new MgmtData(e, this.baseURI); } return null; } /** * Method itemPGPData * * @param i * @return the asked PGPData element, null if the index is too big * @throws XMLSecurityException */ public PGPData itemPGPData(int i) throws XMLSecurityException { Element e = XMLUtils.selectDsNode( this.constructionElement.getFirstChild(), Constants._TAG_PGPDATA, i); if (e != null) { return new PGPData(e, this.baseURI); } return null; } /** * Method itemRetrievalMethod * * @param i *@return the asked RetrievalMethod element, null if the index is too big * @throws XMLSecurityException */ public RetrievalMethod itemRetrievalMethod(int i) throws XMLSecurityException { Element e = XMLUtils.selectDsNode( this.constructionElement.getFirstChild(), Constants._TAG_RETRIEVALMETHOD, i); if (e != null) { return new RetrievalMethod(e, this.baseURI); } return null; } /** * Method itemSPKIData * * @param i * @return the asked SPKIData element, null if the index is too big * @throws XMLSecurityException */ public SPKIData itemSPKIData(int i) throws XMLSecurityException { Element e = XMLUtils.selectDsNode( this.constructionElement.getFirstChild(), Constants._TAG_SPKIDATA, i); if (e != null) { return new SPKIData(e, this.baseURI); } return null; } /** * Method itemX509Data * * @param i * @return the asked X509Data element, null if the index is too big * @throws XMLSecurityException */ public X509Data itemX509Data(int i) throws XMLSecurityException { if (x509Datas != null) { return x509Datas.get(i); } Element e = XMLUtils.selectDsNode( this.constructionElement.getFirstChild(), Constants._TAG_X509DATA, i); if (e != null) { return new X509Data(e, this.baseURI); } return null; } /** * Method itemEncryptedKey * * @param i * @return the asked EncryptedKey element, null if the index is too big * @throws XMLSecurityException */ public EncryptedKey itemEncryptedKey(int i) throws XMLSecurityException { if (encryptedKeys != null) { return encryptedKeys.get(i); } Element e = XMLUtils.selectXencNode( this.constructionElement.getFirstChild(), EncryptionConstants._TAG_ENCRYPTEDKEY, i); if (e != null) { XMLCipher cipher = XMLCipher.getInstance(); cipher.init(XMLCipher.UNWRAP_MODE, null); return cipher.loadEncryptedKey(e); } return null; } /** * Method itemDEREncodedKeyValue * * @param i * @return the asked DEREncodedKeyValue element, null if the index is too big * @throws XMLSecurityException */ public DEREncodedKeyValue itemDEREncodedKeyValue(int i) throws XMLSecurityException { Element e = XMLUtils.selectDs11Node( this.constructionElement.getFirstChild(), Constants._TAG_DERENCODEDKEYVALUE, i); if (e != null) { return new DEREncodedKeyValue(e, this.baseURI); } return null; } /** * Method itemKeyInfoReference * * @param i * @return the asked KeyInfoReference element, null if the index is too big * @throws XMLSecurityException */ public KeyInfoReference itemKeyInfoReference(int i) throws XMLSecurityException { Element e = XMLUtils.selectDs11Node( this.constructionElement.getFirstChild(), Constants._TAG_KEYINFOREFERENCE, i); if (e != null) { return new KeyInfoReference(e, this.baseURI); } return null; } /** * Method itemUnknownElement * * @param i index * @return the element number of the unknown elements */ public Element itemUnknownElement(int i) { NodeList nl = this.constructionElement.getChildNodes(); int res = 0; for (int j = 0; j < nl.getLength(); j++) { Node current = nl.item(j); /** * $todo$ using this method, we don't see unknown Elements * from Signature NS; revisit */ if ((current.getNodeType() == Node.ELEMENT_NODE) && current.getNamespaceURI().equals(Constants.SignatureSpecNS)) { res++; if (res == i) { return (Element) current; } } } return null; } /** * Method isEmpty * * @return true if the element has no descendants. */ public boolean isEmpty() { return this.constructionElement.getFirstChild() == null; } /** * Method containsKeyName * * @return If the KeyInfo contains a KeyName node */ public boolean containsKeyName() { return this.lengthKeyName() > 0; } /** * Method containsKeyValue * * @return If the KeyInfo contains a KeyValue node */ public boolean containsKeyValue() { return this.lengthKeyValue() > 0; } /** * Method containsMgmtData * * @return If the KeyInfo contains a MgmtData node */ public boolean containsMgmtData() { return this.lengthMgmtData() > 0; } /** * Method containsPGPData * * @return If the KeyInfo contains a PGPData node */ public boolean containsPGPData() { return this.lengthPGPData() > 0; } /** * Method containsRetrievalMethod * * @return If the KeyInfo contains a RetrievalMethod node */ public boolean containsRetrievalMethod() { return this.lengthRetrievalMethod() > 0; } /** * Method containsSPKIData * * @return If the KeyInfo contains a SPKIData node */ public boolean containsSPKIData() { return this.lengthSPKIData() > 0; } /** * Method containsUnknownElement * * @return If the KeyInfo contains a UnknownElement node */ public boolean containsUnknownElement() { return this.lengthUnknownElement() > 0; } /** * Method containsX509Data * * @return If the KeyInfo contains a X509Data node */ public boolean containsX509Data() { return this.lengthX509Data() > 0; } /** * Method containsDEREncodedKeyValue * * @return If the KeyInfo contains a DEREncodedKeyValue node */ public boolean containsDEREncodedKeyValue() { return this.lengthDEREncodedKeyValue() > 0; } /** * Method containsKeyInfoReference * * @return If the KeyInfo contains a KeyInfoReference node */ public boolean containsKeyInfoReference() { return this.lengthKeyInfoReference() > 0; } /** * This method returns the public key. * * @return If the KeyInfo contains a PublicKey node * @throws KeyResolverException */ public PublicKey getPublicKey() throws KeyResolverException { PublicKey pk = this.getPublicKeyFromInternalResolvers(); if (pk != null) { if (log.isDebugEnabled()) { log.debug("I could find a key using the per-KeyInfo key resolvers"); } return pk; } if (log.isDebugEnabled()) { log.debug("I couldn't find a key using the per-KeyInfo key resolvers"); } pk = this.getPublicKeyFromStaticResolvers(); if (pk != null) { if (log.isDebugEnabled()) { log.debug("I could find a key using the system-wide key resolvers"); } return pk; } if (log.isDebugEnabled()) { log.debug("I couldn't find a key using the system-wide key resolvers"); } return null; } /** * Searches the library wide KeyResolvers for public keys * * @return The public key contained in this Node. * @throws KeyResolverException */ PublicKey getPublicKeyFromStaticResolvers() throws KeyResolverException { Iterator it = KeyResolver.iterator(); while (it.hasNext()) { KeyResolverSpi keyResolver = it.next(); keyResolver.setSecureValidation(secureValidation); Node currentChild = this.constructionElement.getFirstChild(); String uri = this.getBaseURI(); while (currentChild != null) { if (currentChild.getNodeType() == Node.ELEMENT_NODE) { for (StorageResolver storage : storageResolvers) { PublicKey pk = keyResolver.engineLookupAndResolvePublicKey( (Element) currentChild, uri, storage ); if (pk != null) { return pk; } } } currentChild = currentChild.getNextSibling(); } } return null; } /** * Searches the per-KeyInfo KeyResolvers for public keys * * @return The public key contained in this Node. * @throws KeyResolverException */ PublicKey getPublicKeyFromInternalResolvers() throws KeyResolverException { for (KeyResolverSpi keyResolver : internalKeyResolvers) { if (log.isDebugEnabled()) { log.debug("Try " + keyResolver.getClass().getName()); } keyResolver.setSecureValidation(secureValidation); Node currentChild = this.constructionElement.getFirstChild(); String uri = this.getBaseURI(); while (currentChild != null) { if (currentChild.getNodeType() == Node.ELEMENT_NODE) { for (StorageResolver storage : storageResolvers) { PublicKey pk = keyResolver.engineLookupAndResolvePublicKey( (Element) currentChild, uri, storage ); if (pk != null) { return pk; } } } currentChild = currentChild.getNextSibling(); } } return null; } /** * Method getX509Certificate * * @return The certificate contained in this KeyInfo * @throws KeyResolverException */ public X509Certificate getX509Certificate() throws KeyResolverException { // First search using the individual resolvers from the user X509Certificate cert = this.getX509CertificateFromInternalResolvers(); if (cert != null) { if (log.isDebugEnabled()) { log.debug("I could find a X509Certificate using the per-KeyInfo key resolvers"); } return cert; } if (log.isDebugEnabled()) { log.debug("I couldn't find a X509Certificate using the per-KeyInfo key resolvers"); } // Then use the system-wide Resolvers cert = this.getX509CertificateFromStaticResolvers(); if (cert != null) { if (log.isDebugEnabled()) { log.debug("I could find a X509Certificate using the system-wide key resolvers"); } return cert; } if (log.isDebugEnabled()) { log.debug("I couldn't find a X509Certificate using the system-wide key resolvers"); } return null; } /** * This method uses each System-wide {@link KeyResolver} to search the * child elements. Each combination of {@link KeyResolver} and child element * is checked against all {@link StorageResolver}s. * * @return The certificate contained in this KeyInfo * @throws KeyResolverException */ X509Certificate getX509CertificateFromStaticResolvers() throws KeyResolverException { if (log.isDebugEnabled()) { log.debug( "Start getX509CertificateFromStaticResolvers() with " + KeyResolver.length() + " resolvers" ); } String uri = this.getBaseURI(); Iterator it = KeyResolver.iterator(); while (it.hasNext()) { KeyResolverSpi keyResolver = it.next(); keyResolver.setSecureValidation(secureValidation); X509Certificate cert = applyCurrentResolver(uri, keyResolver); if (cert != null) { return cert; } } return null; } private X509Certificate applyCurrentResolver( String uri, KeyResolverSpi keyResolver ) throws KeyResolverException { Node currentChild = this.constructionElement.getFirstChild(); while (currentChild != null) { if (currentChild.getNodeType() == Node.ELEMENT_NODE) { for (StorageResolver storage : storageResolvers) { X509Certificate cert = keyResolver.engineLookupResolveX509Certificate( (Element) currentChild, uri, storage ); if (cert != null) { return cert; } } } currentChild = currentChild.getNextSibling(); } return null; } /** * Method getX509CertificateFromInternalResolvers * * @return The certificate contained in this KeyInfo * @throws KeyResolverException */ X509Certificate getX509CertificateFromInternalResolvers() throws KeyResolverException { if (log.isDebugEnabled()) { log.debug( "Start getX509CertificateFromInternalResolvers() with " + this.lengthInternalKeyResolver() + " resolvers" ); } String uri = this.getBaseURI(); for (KeyResolverSpi keyResolver : internalKeyResolvers) { if (log.isDebugEnabled()) { log.debug("Try " + keyResolver.getClass().getName()); } keyResolver.setSecureValidation(secureValidation); X509Certificate cert = applyCurrentResolver(uri, keyResolver); if (cert != null) { return cert; } } return null; } /** * This method returns a secret (symmetric) key. This is for XML Encryption. * @return the secret key contained in this KeyInfo * @throws KeyResolverException */ public SecretKey getSecretKey() throws KeyResolverException { SecretKey sk = this.getSecretKeyFromInternalResolvers(); if (sk != null) { if (log.isDebugEnabled()) { log.debug("I could find a secret key using the per-KeyInfo key resolvers"); } return sk; } if (log.isDebugEnabled()) { log.debug("I couldn't find a secret key using the per-KeyInfo key resolvers"); } sk = this.getSecretKeyFromStaticResolvers(); if (sk != null) { if (log.isDebugEnabled()) { log.debug("I could find a secret key using the system-wide key resolvers"); } return sk; } if (log.isDebugEnabled()) { log.debug("I couldn't find a secret key using the system-wide key resolvers"); } return null; } /** * Searches the library wide KeyResolvers for Secret keys * * @return the secret key contained in this KeyInfo * @throws KeyResolverException */ SecretKey getSecretKeyFromStaticResolvers() throws KeyResolverException { Iterator it = KeyResolver.iterator(); while (it.hasNext()) { KeyResolverSpi keyResolver = it.next(); keyResolver.setSecureValidation(secureValidation); Node currentChild = this.constructionElement.getFirstChild(); String uri = this.getBaseURI(); while (currentChild != null) { if (currentChild.getNodeType() == Node.ELEMENT_NODE) { for (StorageResolver storage : storageResolvers) { SecretKey sk = keyResolver.engineLookupAndResolveSecretKey( (Element) currentChild, uri, storage ); if (sk != null) { return sk; } } } currentChild = currentChild.getNextSibling(); } } return null; } /** * Searches the per-KeyInfo KeyResolvers for secret keys * * @return the secret key contained in this KeyInfo * @throws KeyResolverException */ SecretKey getSecretKeyFromInternalResolvers() throws KeyResolverException { for (KeyResolverSpi keyResolver : internalKeyResolvers) { if (log.isDebugEnabled()) { log.debug("Try " + keyResolver.getClass().getName()); } keyResolver.setSecureValidation(secureValidation); Node currentChild = this.constructionElement.getFirstChild(); String uri = this.getBaseURI(); while (currentChild != null) { if (currentChild.getNodeType() == Node.ELEMENT_NODE) { for (StorageResolver storage : storageResolvers) { SecretKey sk = keyResolver.engineLookupAndResolveSecretKey( (Element) currentChild, uri, storage ); if (sk != null) { return sk; } } } currentChild = currentChild.getNextSibling(); } } return null; } /** * This method returns a private key. This is for Key Transport in XML Encryption. * @return the private key contained in this KeyInfo * @throws KeyResolverException */ public PrivateKey getPrivateKey() throws KeyResolverException { PrivateKey pk = this.getPrivateKeyFromInternalResolvers(); if (pk != null) { if (log.isDebugEnabled()) { log.debug("I could find a private key using the per-KeyInfo key resolvers"); } return pk; } if (log.isDebugEnabled()) { log.debug("I couldn't find a secret key using the per-KeyInfo key resolvers"); } pk = this.getPrivateKeyFromStaticResolvers(); if (pk != null) { if (log.isDebugEnabled()) { log.debug("I could find a private key using the system-wide key resolvers"); } return pk; } if (log.isDebugEnabled()) { log.debug("I couldn't find a private key using the system-wide key resolvers"); } return null; } /** * Searches the library wide KeyResolvers for Private keys * * @return the private key contained in this KeyInfo * @throws KeyResolverException */ PrivateKey getPrivateKeyFromStaticResolvers() throws KeyResolverException { Iterator it = KeyResolver.iterator(); while (it.hasNext()) { KeyResolverSpi keyResolver = it.next(); keyResolver.setSecureValidation(secureValidation); Node currentChild = this.constructionElement.getFirstChild(); String uri = this.getBaseURI(); while (currentChild != null) { if (currentChild.getNodeType() == Node.ELEMENT_NODE) { // not using StorageResolvers at the moment // since they cannot return private keys PrivateKey pk = keyResolver.engineLookupAndResolvePrivateKey( (Element) currentChild, uri, null ); if (pk != null) { return pk; } } currentChild = currentChild.getNextSibling(); } } return null; } /** * Searches the per-KeyInfo KeyResolvers for private keys * * @return the private key contained in this KeyInfo * @throws KeyResolverException */ PrivateKey getPrivateKeyFromInternalResolvers() throws KeyResolverException { for (KeyResolverSpi keyResolver : internalKeyResolvers) { if (log.isDebugEnabled()) { log.debug("Try " + keyResolver.getClass().getName()); } keyResolver.setSecureValidation(secureValidation); Node currentChild = this.constructionElement.getFirstChild(); String uri = this.getBaseURI(); while (currentChild != null) { if (currentChild.getNodeType() == Node.ELEMENT_NODE) { // not using StorageResolvers at the moment // since they cannot return private keys PrivateKey pk = keyResolver.engineLookupAndResolvePrivateKey( (Element) currentChild, uri, null ); if (pk != null) { return pk; } } currentChild = currentChild.getNextSibling(); } } return null; } /** * This method is used to add a custom {@link KeyResolverSpi} to a KeyInfo * object. * * @param realKeyResolver */ public void registerInternalKeyResolver(KeyResolverSpi realKeyResolver) { this.internalKeyResolvers.add(realKeyResolver); } /** * Method lengthInternalKeyResolver * @return the length of the key */ int lengthInternalKeyResolver() { return this.internalKeyResolvers.size(); } /** * Method itemInternalKeyResolver * * @param i the index * @return the KeyResolverSpi for the index. */ KeyResolverSpi itemInternalKeyResolver(int i) { return this.internalKeyResolvers.get(i); } /** * Method addStorageResolver * * @param storageResolver */ public void addStorageResolver(StorageResolver storageResolver) { if (storageResolvers == nullList) { // Replace the default null StorageResolver storageResolvers = new ArrayList(); } this.storageResolvers.add(storageResolver); } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_KEYINFO; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/KeyUtils.java0000644000175000017500000000473711553276262027070 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys; import java.io.PrintStream; import java.security.PublicKey; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.keys.content.KeyName; import org.apache.xml.security.keys.content.KeyValue; import org.apache.xml.security.keys.content.MgmtData; import org.apache.xml.security.keys.content.X509Data; /** * Utility class for for org.apache.xml.security.keys package. * * @author $Author: coheigea $ */ public class KeyUtils { private KeyUtils() { // no instantiation } /** * Method prinoutKeyInfo * * @param ki * @param os * @throws XMLSecurityException */ public static void prinoutKeyInfo(KeyInfo ki, PrintStream os) throws XMLSecurityException { for (int i = 0; i < ki.lengthKeyName(); i++) { KeyName x = ki.itemKeyName(i); os.println("KeyName(" + i + ")=\"" + x.getKeyName() + "\""); } for (int i = 0; i < ki.lengthKeyValue(); i++) { KeyValue x = ki.itemKeyValue(i); PublicKey pk = x.getPublicKey(); os.println("KeyValue Nr. " + i); os.println(pk); } for (int i = 0; i < ki.lengthMgmtData(); i++) { MgmtData x = ki.itemMgmtData(i); os.println("MgmtData(" + i + ")=\"" + x.getMgmtData() + "\""); } for (int i = 0; i < ki.lengthX509Data(); i++) { X509Data x = ki.itemX509Data(i); os.println("X509Data(" + i + ")=\"" + (x.containsCertificate() ? "Certificate " : "") + (x.containsIssuerSerial() ? "IssuerSerial " : "") + "\""); } } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/0000755000175000017500000000000012273503734027010 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/package.html0000644000175000017500000000020307533712503031263 0ustar tonytony

the resolver framework for retrieval of certificates and public keys from elements.

libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/KeyResolver.java0000644000175000017500000003552612220053537032131 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.keyresolver; import java.security.PublicKey; import java.security.cert.X509Certificate; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import javax.crypto.SecretKey; import org.apache.xml.security.keys.keyresolver.implementations.DEREncodedKeyValueResolver; import org.apache.xml.security.keys.keyresolver.implementations.DSAKeyValueResolver; import org.apache.xml.security.keys.keyresolver.implementations.KeyInfoReferenceResolver; import org.apache.xml.security.keys.keyresolver.implementations.RSAKeyValueResolver; import org.apache.xml.security.keys.keyresolver.implementations.RetrievalMethodResolver; import org.apache.xml.security.keys.keyresolver.implementations.X509CertificateResolver; import org.apache.xml.security.keys.keyresolver.implementations.X509DigestResolver; import org.apache.xml.security.keys.keyresolver.implementations.X509IssuerSerialResolver; import org.apache.xml.security.keys.keyresolver.implementations.X509SKIResolver; import org.apache.xml.security.keys.keyresolver.implementations.X509SubjectNameResolver; import org.apache.xml.security.keys.storage.StorageResolver; import org.apache.xml.security.utils.ClassLoaderUtils; import org.w3c.dom.Element; import org.w3c.dom.Node; /** * KeyResolver is factory class for subclass of KeyResolverSpi that * represent child element of KeyInfo. */ public class KeyResolver { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(KeyResolver.class); /** Field resolverVector */ private static List resolverVector = new CopyOnWriteArrayList(); /** Field resolverSpi */ private final KeyResolverSpi resolverSpi; /** * Constructor. * * @param keyResolverSpi a KeyResolverSpi instance */ private KeyResolver(KeyResolverSpi keyResolverSpi) { resolverSpi = keyResolverSpi; } /** * Method length * * @return the length of resolvers registered */ public static int length() { return resolverVector.size(); } /** * Method getX509Certificate * * @param element * @param baseURI * @param storage * @return The certificate represented by the element. * * @throws KeyResolverException */ public static final X509Certificate getX509Certificate( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { for (KeyResolver resolver : resolverVector) { if (resolver == null) { Object exArgs[] = { (((element != null) && (element.getNodeType() == Node.ELEMENT_NODE)) ? element.getTagName() : "null") }; throw new KeyResolverException("utils.resolver.noClass", exArgs); } if (log.isDebugEnabled()) { log.debug("check resolvability by class " + resolver.getClass()); } X509Certificate cert = resolver.resolveX509Certificate(element, baseURI, storage); if (cert != null) { return cert; } } Object exArgs[] = { (((element != null) && (element.getNodeType() == Node.ELEMENT_NODE)) ? element.getTagName() : "null") }; throw new KeyResolverException("utils.resolver.noClass", exArgs); } /** * Method getPublicKey * * @param element * @param baseURI * @param storage * @return the public key contained in the element * * @throws KeyResolverException */ public static final PublicKey getPublicKey( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { for (KeyResolver resolver : resolverVector) { if (resolver == null) { Object exArgs[] = { (((element != null) && (element.getNodeType() == Node.ELEMENT_NODE)) ? element.getTagName() : "null") }; throw new KeyResolverException("utils.resolver.noClass", exArgs); } if (log.isDebugEnabled()) { log.debug("check resolvability by class " + resolver.getClass()); } PublicKey cert = resolver.resolvePublicKey(element, baseURI, storage); if (cert != null) { return cert; } } Object exArgs[] = { (((element != null) && (element.getNodeType() == Node.ELEMENT_NODE)) ? element.getTagName() : "null") }; throw new KeyResolverException("utils.resolver.noClass", exArgs); } /** * This method is used for registering {@link KeyResolverSpi}s which are * available to all {@link org.apache.xml.security.keys.KeyInfo} objects. This means that * personalized {@link KeyResolverSpi}s should only be registered directly * to the {@link org.apache.xml.security.keys.KeyInfo} using * {@link org.apache.xml.security.keys.KeyInfo#registerInternalKeyResolver}. * Please note that this method will create a new copy of the underlying array, as the * underlying collection is a CopyOnWriteArrayList. * * @param className * @param globalResolver Whether the KeyResolverSpi is a global resolver or not * @throws InstantiationException * @throws IllegalAccessException * @throws ClassNotFoundException */ public static void register(String className, boolean globalResolver) throws ClassNotFoundException, IllegalAccessException, InstantiationException { KeyResolverSpi keyResolverSpi = (KeyResolverSpi) ClassLoaderUtils.loadClass(className, KeyResolver.class).newInstance(); keyResolverSpi.setGlobalResolver(globalResolver); register(keyResolverSpi, false); } /** * This method is used for registering {@link KeyResolverSpi}s which are * available to all {@link org.apache.xml.security.keys.KeyInfo} objects. This means that * personalized {@link KeyResolverSpi}s should only be registered directly * to the {@link org.apache.xml.security.keys.KeyInfo} using * {@link org.apache.xml.security.keys.KeyInfo#registerInternalKeyResolver}. * Please note that this method will create a new copy of the underlying array, as the * underlying collection is a CopyOnWriteArrayList. * * @param className * @param globalResolver Whether the KeyResolverSpi is a global resolver or not */ public static void registerAtStart(String className, boolean globalResolver) { KeyResolverSpi keyResolverSpi = null; Exception ex = null; try { keyResolverSpi = (KeyResolverSpi) ClassLoaderUtils.loadClass(className, KeyResolver.class).newInstance(); } catch (ClassNotFoundException e) { ex = e; } catch (IllegalAccessException e) { ex = e; } catch (InstantiationException e) { ex = e; } if (ex != null) { throw (IllegalArgumentException) new IllegalArgumentException("Invalid KeyResolver class name").initCause(ex); } keyResolverSpi.setGlobalResolver(globalResolver); register(keyResolverSpi, true); } /** * This method is used for registering {@link KeyResolverSpi}s which are * available to all {@link org.apache.xml.security.keys.KeyInfo} objects. This means that * personalized {@link KeyResolverSpi}s should only be registered directly * to the {@link org.apache.xml.security.keys.KeyInfo} using * {@link org.apache.xml.security.keys.KeyInfo#registerInternalKeyResolver}. * Please note that this method will create a new copy of the underlying array, as the * underlying collection is a CopyOnWriteArrayList. * * @param keyResolverSpi a KeyResolverSpi instance to register * @param start whether to register the KeyResolverSpi at the start of the list or not */ public static void register( KeyResolverSpi keyResolverSpi, boolean start ) { KeyResolver resolver = new KeyResolver(keyResolverSpi); if (start) { resolverVector.add(0, resolver); } else { resolverVector.add(resolver); } } /** * This method is used for registering {@link KeyResolverSpi}s which are * available to all {@link org.apache.xml.security.keys.KeyInfo} objects. This means that * personalized {@link KeyResolverSpi}s should only be registered directly * to the {@link org.apache.xml.security.keys.KeyInfo} using * {@link org.apache.xml.security.keys.KeyInfo#registerInternalKeyResolver}. * The KeyResolverSpi instances are not registered as a global resolver. * * * @param classNames * @throws InstantiationException * @throws IllegalAccessException * @throws ClassNotFoundException */ public static void registerClassNames(List classNames) throws ClassNotFoundException, IllegalAccessException, InstantiationException { List keyResolverList = new ArrayList(classNames.size()); for (String className : classNames) { KeyResolverSpi keyResolverSpi = (KeyResolverSpi)ClassLoaderUtils.loadClass(className, KeyResolver.class).newInstance(); keyResolverSpi.setGlobalResolver(false); keyResolverList.add(new KeyResolver(keyResolverSpi)); } resolverVector.addAll(keyResolverList); } /** * This method registers the default resolvers. */ public static void registerDefaultResolvers() { List keyResolverList = new ArrayList(); keyResolverList.add(new KeyResolver(new RSAKeyValueResolver())); keyResolverList.add(new KeyResolver(new DSAKeyValueResolver())); keyResolverList.add(new KeyResolver(new X509CertificateResolver())); keyResolverList.add(new KeyResolver(new X509SKIResolver())); keyResolverList.add(new KeyResolver(new RetrievalMethodResolver())); keyResolverList.add(new KeyResolver(new X509SubjectNameResolver())); keyResolverList.add(new KeyResolver(new X509IssuerSerialResolver())); keyResolverList.add(new KeyResolver(new DEREncodedKeyValueResolver())); keyResolverList.add(new KeyResolver(new KeyInfoReferenceResolver())); keyResolverList.add(new KeyResolver(new X509DigestResolver())); resolverVector.addAll(keyResolverList); } /** * Method resolvePublicKey * * @param element * @param baseURI * @param storage * @return resolved public key from the registered from the elements * * @throws KeyResolverException */ public PublicKey resolvePublicKey( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { return resolverSpi.engineLookupAndResolvePublicKey(element, baseURI, storage); } /** * Method resolveX509Certificate * * @param element * @param baseURI * @param storage * @return resolved X509certificate key from the registered from the elements * * @throws KeyResolverException */ public X509Certificate resolveX509Certificate( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { return resolverSpi.engineLookupResolveX509Certificate(element, baseURI, storage); } /** * @param element * @param baseURI * @param storage * @return resolved SecretKey key from the registered from the elements * @throws KeyResolverException */ public SecretKey resolveSecretKey( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { return resolverSpi.engineLookupAndResolveSecretKey(element, baseURI, storage); } /** * Method setProperty * * @param key * @param value */ public void setProperty(String key, String value) { resolverSpi.engineSetProperty(key, value); } /** * Method getProperty * * @param key * @return the property set for this resolver */ public String getProperty(String key) { return resolverSpi.engineGetProperty(key); } /** * Method understandsProperty * * @param propertyToTest * @return true if the resolver understands property propertyToTest */ public boolean understandsProperty(String propertyToTest) { return resolverSpi.understandsProperty(propertyToTest); } /** * Method resolverClassName * * @return the name of the resolver. */ public String resolverClassName() { return resolverSpi.getClass().getName(); } /** * Iterate over the KeyResolverSpi instances */ static class ResolverIterator implements Iterator { List res; Iterator it; public ResolverIterator(List list) { res = list; it = res.iterator(); } public boolean hasNext() { return it.hasNext(); } public KeyResolverSpi next() { KeyResolver resolver = it.next(); if (resolver == null) { throw new RuntimeException("utils.resolver.noClass"); } return resolver.resolverSpi; } public void remove() { throw new UnsupportedOperationException("Can't remove resolvers using the iterator"); } }; public static Iterator iterator() { return new ResolverIterator(resolverVector); } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/0000755000175000017500000000000012273503734032220 5ustar tonytony././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/package.htmllibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/pa0000644000175000017500000000017407533712503032544 0ustar tonytony

implementations for retrieval of certificates and public keys from elements.

././@LongLink0000000000000000000000000000020200000000000011557 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/DEREncodedKeyValueResolver.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/DE0000644000175000017500000000517112060430451032424 0ustar tonytonypackage org.apache.xml.security.keys.keyresolver.implementations; import java.security.PrivateKey; import java.security.PublicKey; import java.security.cert.X509Certificate; import javax.crypto.SecretKey; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.keys.content.DEREncodedKeyValue; import org.apache.xml.security.keys.keyresolver.KeyResolverException; import org.apache.xml.security.keys.keyresolver.KeyResolverSpi; import org.apache.xml.security.keys.storage.StorageResolver; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * KeyResolverSpi implementation which resolves public keys from a * dsig11:DEREncodedKeyValue element. * * @author Brent Putman (putmanb@georgetown.edu) */ public class DEREncodedKeyValueResolver extends KeyResolverSpi { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(DEREncodedKeyValueResolver.class); /** {@inheritDoc}. */ public boolean engineCanResolve(Element element, String baseURI, StorageResolver storage) { return XMLUtils.elementIsInSignature11Space(element, Constants._TAG_DERENCODEDKEYVALUE); } /** {@inheritDoc}. */ public PublicKey engineLookupAndResolvePublicKey(Element element, String baseURI, StorageResolver storage) throws KeyResolverException { if (log.isDebugEnabled()) { log.debug("Can I resolve " + element.getTagName()); } if (!engineCanResolve(element, baseURI, storage)) { return null; } try { DEREncodedKeyValue derKeyValue = new DEREncodedKeyValue(element, baseURI); return derKeyValue.getPublicKey(); } catch (XMLSecurityException e) { if (log.isDebugEnabled()) { log.debug("XMLSecurityException", e); } } return null; } /** {@inheritDoc}. */ public X509Certificate engineLookupResolveX509Certificate(Element element, String baseURI, StorageResolver storage) throws KeyResolverException { return null; } /** {@inheritDoc}. */ public SecretKey engineLookupAndResolveSecretKey(Element element, String baseURI, StorageResolver storage) throws KeyResolverException { return null; } /** {@inheritDoc}. */ public PrivateKey engineLookupAndResolvePrivateKey(Element element, String baseURI, StorageResolver storage) throws KeyResolverException { return null; } } ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/PrivateKeyResolver.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/Pr0000644000175000017500000003044611745276504032540 0ustar tonytonypackage org.apache.xml.security.keys.keyresolver.implementations; import java.security.Key; import java.security.KeyStore; import java.security.KeyStoreException; import java.security.PrivateKey; import java.security.PublicKey; import java.security.cert.Certificate; import java.security.cert.CertificateEncodingException; import java.security.cert.X509Certificate; import java.util.Arrays; import java.util.Enumeration; import javax.crypto.SecretKey; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.keys.content.X509Data; import org.apache.xml.security.keys.content.x509.XMLX509Certificate; import org.apache.xml.security.keys.content.x509.XMLX509IssuerSerial; import org.apache.xml.security.keys.content.x509.XMLX509SKI; import org.apache.xml.security.keys.content.x509.XMLX509SubjectName; import org.apache.xml.security.keys.keyresolver.KeyResolverException; import org.apache.xml.security.keys.keyresolver.KeyResolverSpi; import org.apache.xml.security.keys.storage.StorageResolver; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * Resolves a PrivateKey within a KeyStore based on the KeyInfo hints. * For X509Data hints, the certificate associated with the private key entry must match. * For a KeyName hint, the KeyName must match the alias of a PrivateKey entry within the KeyStore. */ public class PrivateKeyResolver extends KeyResolverSpi { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(PrivateKeyResolver.class.getName()); private KeyStore keyStore; private char[] password; /** * Constructor. */ public PrivateKeyResolver(KeyStore keyStore, char[] password) { this.keyStore = keyStore; this.password = password; } /** * This method returns whether the KeyResolverSpi is able to perform the requested action. * * @param element * @param BaseURI * @param storage * @return whether the KeyResolverSpi is able to perform the requested action. */ public boolean engineCanResolve(Element element, String BaseURI, StorageResolver storage) { if (XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_X509DATA) || XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_KEYNAME)) { return true; } return false; } /** * Method engineLookupAndResolvePublicKey * * @param element * @param BaseURI * @param storage * @return null if no {@link PublicKey} could be obtained * @throws KeyResolverException */ public PublicKey engineLookupAndResolvePublicKey( Element element, String BaseURI, StorageResolver storage ) throws KeyResolverException { return null; } /** * Method engineResolveX509Certificate * @inheritDoc * @param element * @param BaseURI * @param storage * @throws KeyResolverException */ public X509Certificate engineLookupResolveX509Certificate( Element element, String BaseURI, StorageResolver storage ) throws KeyResolverException { return null; } /** * Method engineResolveSecretKey * * @param element * @param BaseURI * @param storage * @return resolved SecretKey key or null if no {@link SecretKey} could be obtained * * @throws KeyResolverException */ public SecretKey engineResolveSecretKey( Element element, String BaseURI, StorageResolver storage ) throws KeyResolverException { return null; } /** * Method engineResolvePrivateKey * @inheritDoc * @param element * @param baseURI * @param storage * @return resolved PrivateKey key or null if no {@link PrivateKey} could be obtained * @throws KeyResolverException */ public PrivateKey engineLookupAndResolvePrivateKey( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { if (log.isDebugEnabled()) { log.debug("Can I resolve " + element.getTagName() + "?"); } if (XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_X509DATA)) { PrivateKey privKey = resolveX509Data(element, baseURI); if (privKey != null) { return privKey; } } else if (XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_KEYNAME)) { log.debug("Can I resolve KeyName?"); String keyName = element.getFirstChild().getNodeValue(); try { Key key = keyStore.getKey(keyName, password); if (key instanceof PrivateKey) { return (PrivateKey) key; } } catch (Exception e) { log.debug("Cannot recover the key", e); } } log.debug("I can't"); return null; } private PrivateKey resolveX509Data(Element element, String baseURI) { log.debug("Can I resolve X509Data?"); try { X509Data x509Data = new X509Data(element, baseURI); int len = x509Data.lengthSKI(); for (int i = 0; i < len; i++) { XMLX509SKI x509SKI = x509Data.itemSKI(i); PrivateKey privKey = resolveX509SKI(x509SKI); if (privKey != null) { return privKey; } } len = x509Data.lengthIssuerSerial(); for (int i = 0; i < len; i++) { XMLX509IssuerSerial x509Serial = x509Data.itemIssuerSerial(i); PrivateKey privKey = resolveX509IssuerSerial(x509Serial); if (privKey != null) { return privKey; } } len = x509Data.lengthSubjectName(); for (int i = 0; i < len; i++) { XMLX509SubjectName x509SubjectName = x509Data.itemSubjectName(i); PrivateKey privKey = resolveX509SubjectName(x509SubjectName); if (privKey != null) { return privKey; } } len = x509Data.lengthCertificate(); for (int i = 0; i < len; i++) { XMLX509Certificate x509Cert = x509Data.itemCertificate(i); PrivateKey privKey = resolveX509Certificate(x509Cert); if (privKey != null) { return privKey; } } } catch (XMLSecurityException e) { log.debug("XMLSecurityException", e); } catch (KeyStoreException e) { log.debug("KeyStoreException", e); } return null; } /* * Search for a private key entry in the KeyStore with the same Subject Key Identifier */ private PrivateKey resolveX509SKI(XMLX509SKI x509SKI) throws XMLSecurityException, KeyStoreException { log.debug("Can I resolve X509SKI?"); Enumeration aliases = keyStore.aliases(); while (aliases.hasMoreElements()) { String alias = (String) aliases.nextElement(); if (keyStore.isKeyEntry(alias)) { Certificate cert = keyStore.getCertificate(alias); if (cert instanceof X509Certificate) { XMLX509SKI certSKI = new XMLX509SKI(x509SKI.getDocument(), (X509Certificate) cert); if (certSKI.equals(x509SKI)) { log.debug("match !!! "); try { Key key = keyStore.getKey(alias, password); if (key instanceof PrivateKey) { return (PrivateKey) key; } } catch (Exception e) { log.debug("Cannot recover the key", e); // Keep searching } } } } } return null; } /* * Search for a private key entry in the KeyStore with the same Issuer/Serial Number pair. */ private PrivateKey resolveX509IssuerSerial(XMLX509IssuerSerial x509Serial) throws KeyStoreException { log.debug("Can I resolve X509IssuerSerial?"); Enumeration aliases = keyStore.aliases(); while (aliases.hasMoreElements()) { String alias = (String) aliases.nextElement(); if (keyStore.isKeyEntry(alias)) { Certificate cert = keyStore.getCertificate(alias); if (cert instanceof X509Certificate) { XMLX509IssuerSerial certSerial = new XMLX509IssuerSerial(x509Serial.getDocument(), (X509Certificate) cert); if (certSerial.equals(x509Serial)) { log.debug("match !!! "); try { Key key = keyStore.getKey(alias, password); if (key instanceof PrivateKey) { return (PrivateKey) key; } } catch (Exception e) { log.debug("Cannot recover the key", e); // Keep searching } } } } } return null; } /* * Search for a private key entry in the KeyStore with the same Subject Name. */ private PrivateKey resolveX509SubjectName(XMLX509SubjectName x509SubjectName) throws KeyStoreException { log.debug("Can I resolve X509SubjectName?"); Enumeration aliases = keyStore.aliases(); while (aliases.hasMoreElements()) { String alias = (String) aliases.nextElement(); if (keyStore.isKeyEntry(alias)) { Certificate cert = keyStore.getCertificate(alias); if (cert instanceof X509Certificate) { XMLX509SubjectName certSN = new XMLX509SubjectName(x509SubjectName.getDocument(), (X509Certificate) cert); if (certSN.equals(x509SubjectName)) { log.debug("match !!! "); try { Key key = keyStore.getKey(alias, password); if (key instanceof PrivateKey) { return (PrivateKey) key; } } catch (Exception e) { log.debug("Cannot recover the key", e); // Keep searching } } } } } return null; } /* * Search for a private key entry in the KeyStore with the same Certificate. */ private PrivateKey resolveX509Certificate( XMLX509Certificate x509Cert ) throws XMLSecurityException, KeyStoreException { log.debug("Can I resolve X509Certificate?"); byte[] x509CertBytes = x509Cert.getCertificateBytes(); Enumeration aliases = keyStore.aliases(); while (aliases.hasMoreElements()) { String alias = (String) aliases.nextElement(); if (keyStore.isKeyEntry(alias)) { Certificate cert = keyStore.getCertificate(alias); if (cert instanceof X509Certificate) { byte[] certBytes = null; try { certBytes = cert.getEncoded(); } catch (CertificateEncodingException e1) { } if (certBytes != null && Arrays.equals(certBytes, x509CertBytes)) { log.debug("match !!! "); try { Key key = keyStore.getKey(alias, password); if (key instanceof PrivateKey) { return (PrivateKey) key; } } catch (Exception e) { log.debug("Cannot recover the key", e); // Keep searching } } } } } return null; } } ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/SingleKeyResolver.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/Si0000644000175000017500000001171311750731244032517 0ustar tonytonypackage org.apache.xml.security.keys.keyresolver.implementations; import java.security.PrivateKey; import java.security.PublicKey; import java.security.cert.X509Certificate; import javax.crypto.SecretKey; import org.apache.xml.security.keys.keyresolver.KeyResolverException; import org.apache.xml.security.keys.keyresolver.KeyResolverSpi; import org.apache.xml.security.keys.storage.StorageResolver; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * Resolves a single Key based on the KeyName. */ public class SingleKeyResolver extends KeyResolverSpi { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(SingleKeyResolver.class.getName()); private String keyName; private PublicKey publicKey; private PrivateKey privateKey; private SecretKey secretKey; /** * Constructor. * @param keyName * @param publicKey */ public SingleKeyResolver(String keyName, PublicKey publicKey) { this.keyName = keyName; this.publicKey = publicKey; } /** * Constructor. * @param keyName * @param privateKey */ public SingleKeyResolver(String keyName, PrivateKey privateKey) { this.keyName = keyName; this.privateKey = privateKey; } /** * Constructor. * @param keyName * @param secretKey */ public SingleKeyResolver(String keyName, SecretKey secretKey) { this.keyName = keyName; this.secretKey = secretKey; } /** * This method returns whether the KeyResolverSpi is able to perform the requested action. * * @param element * @param BaseURI * @param storage * @return whether the KeyResolverSpi is able to perform the requested action. */ public boolean engineCanResolve(Element element, String baseURI, StorageResolver storage) { return XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_KEYNAME); } /** * Method engineLookupAndResolvePublicKey * * @param element * @param baseURI * @param storage * @return null if no {@link PublicKey} could be obtained * @throws KeyResolverException */ public PublicKey engineLookupAndResolvePublicKey( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { if (log.isDebugEnabled()) { log.debug("Can I resolve " + element.getTagName() + "?"); } if (publicKey != null && XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_KEYNAME)) { String name = element.getFirstChild().getNodeValue(); if (keyName.equals(name)) { return publicKey; } } log.debug("I can't"); return null; } /** * Method engineResolveX509Certificate * @inheritDoc * @param element * @param baseURI * @param storage * @throws KeyResolverException */ public X509Certificate engineLookupResolveX509Certificate( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { return null; } /** * Method engineResolveSecretKey * * @param element * @param baseURI * @param storage * @return resolved SecretKey key or null if no {@link SecretKey} could be obtained * * @throws KeyResolverException */ public SecretKey engineResolveSecretKey( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { if (log.isDebugEnabled()) { log.debug("Can I resolve " + element.getTagName() + "?"); } if (secretKey != null && XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_KEYNAME)) { String name = element.getFirstChild().getNodeValue(); if (keyName.equals(name)) { return secretKey; } } log.debug("I can't"); return null; } /** * Method engineResolvePrivateKey * @inheritDoc * @param element * @param baseURI * @param storage * @return resolved PrivateKey key or null if no {@link PrivateKey} could be obtained * @throws KeyResolverException */ public PrivateKey engineLookupAndResolvePrivateKey( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { if (log.isDebugEnabled()) { log.debug("Can I resolve " + element.getTagName() + "?"); } if (privateKey != null && XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_KEYNAME)) { String name = element.getFirstChild().getNodeValue(); if (keyName.equals(name)) { return privateKey; } } log.debug("I can't"); return null; } } ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/X509SKIResolver.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/X50000644000175000017500000001211712005760702032432 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.keyresolver.implementations; import java.security.PublicKey; import java.security.cert.Certificate; import java.security.cert.X509Certificate; import java.util.Iterator; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.keys.content.x509.XMLX509SKI; import org.apache.xml.security.keys.keyresolver.KeyResolverException; import org.apache.xml.security.keys.keyresolver.KeyResolverSpi; import org.apache.xml.security.keys.storage.StorageResolver; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; public class X509SKIResolver extends KeyResolverSpi { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(X509SKIResolver.class); /** * Method engineResolvePublicKey * * @param element * @param baseURI * @param storage * @return null if no {@link PublicKey} could be obtained * @throws KeyResolverException */ public PublicKey engineLookupAndResolvePublicKey( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { X509Certificate cert = this.engineLookupResolveX509Certificate(element, baseURI, storage); if (cert != null) { return cert.getPublicKey(); } return null; } /** * Method engineResolveX509Certificate * @inheritDoc * @param element * @param baseURI * @param storage * * @throws KeyResolverException */ public X509Certificate engineLookupResolveX509Certificate( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { if (log.isDebugEnabled()) { log.debug("Can I resolve " + element.getTagName() + "?"); } if (!XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_X509DATA)) { if (log.isDebugEnabled()) { log.debug("I can't"); } return null; } /** Field _x509childObject[] */ XMLX509SKI x509childObject[] = null; Element x509childNodes[] = null; x509childNodes = XMLUtils.selectDsNodes(element.getFirstChild(), Constants._TAG_X509SKI); if (!((x509childNodes != null) && (x509childNodes.length > 0))) { if (log.isDebugEnabled()) { log.debug("I can't"); } return null; } try { if (storage == null) { Object exArgs[] = { Constants._TAG_X509SKI }; KeyResolverException ex = new KeyResolverException("KeyResolver.needStorageResolver", exArgs); if (log.isDebugEnabled()) { log.debug("", ex); } throw ex; } x509childObject = new XMLX509SKI[x509childNodes.length]; for (int i = 0; i < x509childNodes.length; i++) { x509childObject[i] = new XMLX509SKI(x509childNodes[i], baseURI); } Iterator storageIterator = storage.getIterator(); while (storageIterator.hasNext()) { X509Certificate cert = (X509Certificate)storageIterator.next(); XMLX509SKI certSKI = new XMLX509SKI(element.getOwnerDocument(), cert); for (int i = 0; i < x509childObject.length; i++) { if (certSKI.equals(x509childObject[i])) { if (log.isDebugEnabled()) { log.debug("Return PublicKey from " + cert.getSubjectX500Principal().getName()); } return cert; } } } } catch (XMLSecurityException ex) { throw new KeyResolverException("empty", ex); } return null; } /** * Method engineResolveSecretKey * @inheritDoc * @param element * @param baseURI * @param storage * */ public javax.crypto.SecretKey engineLookupAndResolveSecretKey( Element element, String baseURI, StorageResolver storage ) { return null; } } ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/RSAKeyValueResolver.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/RS0000644000175000017500000000634511555512724032500 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.keyresolver.implementations; import java.security.PublicKey; import java.security.cert.X509Certificate; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.keys.content.keyvalues.RSAKeyValue; import org.apache.xml.security.keys.keyresolver.KeyResolverSpi; import org.apache.xml.security.keys.storage.StorageResolver; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; public class RSAKeyValueResolver extends KeyResolverSpi { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(RSAKeyValueResolver.class); /** @inheritDoc */ public PublicKey engineLookupAndResolvePublicKey( Element element, String BaseURI, StorageResolver storage ) { if (log.isDebugEnabled()) { log.debug("Can I resolve " + element.getTagName()); } if (element == null) { return null; } boolean isKeyValue = XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_KEYVALUE); Element rsaKeyElement = null; if (isKeyValue) { rsaKeyElement = XMLUtils.selectDsNode(element.getFirstChild(), Constants._TAG_RSAKEYVALUE, 0); } else if (XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_RSAKEYVALUE)) { // this trick is needed to allow the RetrievalMethodResolver to eat a // ds:RSAKeyValue directly (without KeyValue) rsaKeyElement = element; } if (rsaKeyElement == null) { return null; } try { RSAKeyValue rsaKeyValue = new RSAKeyValue(rsaKeyElement, BaseURI); return rsaKeyValue.getPublicKey(); } catch (XMLSecurityException ex) { if (log.isDebugEnabled()) { log.debug("XMLSecurityException", ex); } } return null; } /** @inheritDoc */ public X509Certificate engineLookupResolveX509Certificate( Element element, String BaseURI, StorageResolver storage ) { return null; } /** @inheritDoc */ public javax.crypto.SecretKey engineLookupAndResolveSecretKey( Element element, String BaseURI, StorageResolver storage ) { return null; } } ././@LongLink0000000000000000000000000000020000000000000011555 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/X509IssuerSerialResolver.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/X50000644000175000017500000001237311750731244032443 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.keyresolver.implementations; import java.security.PublicKey; import java.security.cert.Certificate; import java.security.cert.X509Certificate; import java.util.Iterator; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.keys.content.X509Data; import org.apache.xml.security.keys.content.x509.XMLX509IssuerSerial; import org.apache.xml.security.keys.keyresolver.KeyResolverException; import org.apache.xml.security.keys.keyresolver.KeyResolverSpi; import org.apache.xml.security.keys.storage.StorageResolver; import org.apache.xml.security.signature.XMLSignatureException; import org.apache.xml.security.utils.Constants; import org.w3c.dom.Element; public class X509IssuerSerialResolver extends KeyResolverSpi { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(X509IssuerSerialResolver.class); /** @inheritDoc */ public PublicKey engineLookupAndResolvePublicKey( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { X509Certificate cert = this.engineLookupResolveX509Certificate(element, baseURI, storage); if (cert != null) { return cert.getPublicKey(); } return null; } /** @inheritDoc */ public X509Certificate engineLookupResolveX509Certificate( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { if (log.isDebugEnabled()) { log.debug("Can I resolve " + element.getTagName() + "?"); } X509Data x509data = null; try { x509data = new X509Data(element, baseURI); } catch (XMLSignatureException ex) { if (log.isDebugEnabled()) { log.debug("I can't"); } return null; } catch (XMLSecurityException ex) { if (log.isDebugEnabled()) { log.debug("I can't"); } return null; } if (!x509data.containsIssuerSerial()) { return null; } try { if (storage == null) { Object exArgs[] = { Constants._TAG_X509ISSUERSERIAL }; KeyResolverException ex = new KeyResolverException("KeyResolver.needStorageResolver", exArgs); if (log.isDebugEnabled()) { log.debug("", ex); } throw ex; } int noOfISS = x509data.lengthIssuerSerial(); Iterator storageIterator = storage.getIterator(); while (storageIterator.hasNext()) { X509Certificate cert = (X509Certificate)storageIterator.next(); XMLX509IssuerSerial certSerial = new XMLX509IssuerSerial(element.getOwnerDocument(), cert); if (log.isDebugEnabled()) { log.debug("Found Certificate Issuer: " + certSerial.getIssuerName()); log.debug("Found Certificate Serial: " + certSerial.getSerialNumber().toString()); } for (int i = 0; i < noOfISS; i++) { XMLX509IssuerSerial xmliss = x509data.itemIssuerSerial(i); if (log.isDebugEnabled()) { log.debug("Found Element Issuer: " + xmliss.getIssuerName()); log.debug("Found Element Serial: " + xmliss.getSerialNumber().toString()); } if (certSerial.equals(xmliss)) { if (log.isDebugEnabled()) { log.debug("match !!! "); } return cert; } if (log.isDebugEnabled()) { log.debug("no match..."); } } } return null; } catch (XMLSecurityException ex) { if (log.isDebugEnabled()) { log.debug("XMLSecurityException", ex); } throw new KeyResolverException("generic.EmptyMessage", ex); } } /** @inheritDoc */ public javax.crypto.SecretKey engineLookupAndResolveSecretKey( Element element, String baseURI, StorageResolver storage ) { return null; } } ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/SecretKeyResolver.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/Se0000644000175000017500000000755511750731244032524 0ustar tonytonypackage org.apache.xml.security.keys.keyresolver.implementations; import java.security.Key; import java.security.KeyStore; import java.security.PrivateKey; import java.security.PublicKey; import java.security.cert.X509Certificate; import javax.crypto.SecretKey; import org.apache.xml.security.keys.keyresolver.KeyResolverException; import org.apache.xml.security.keys.keyresolver.KeyResolverSpi; import org.apache.xml.security.keys.storage.StorageResolver; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * Resolves a SecretKey within a KeyStore based on the KeyName. * The KeyName is the key entry alias within the KeyStore. */ public class SecretKeyResolver extends KeyResolverSpi { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(SecretKeyResolver.class.getName()); private KeyStore keyStore; private char[] password; /** * Constructor. */ public SecretKeyResolver(KeyStore keyStore, char[] password) { this.keyStore = keyStore; this.password = password; } /** * This method returns whether the KeyResolverSpi is able to perform the requested action. * * @param element * @param baseURI * @param storage * @return whether the KeyResolverSpi is able to perform the requested action. */ public boolean engineCanResolve(Element element, String baseURI, StorageResolver storage) { return XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_KEYNAME); } /** * Method engineLookupAndResolvePublicKey * * @param element * @param baseURI * @param storage * @return null if no {@link PublicKey} could be obtained * @throws KeyResolverException */ public PublicKey engineLookupAndResolvePublicKey( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { return null; } /** * Method engineResolveX509Certificate * @inheritDoc * @param element * @param baseURI * @param storage * @throws KeyResolverException */ public X509Certificate engineLookupResolveX509Certificate( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { return null; } /** * Method engineResolveSecretKey * * @param element * @param baseURI * @param storage * @return resolved SecretKey key or null if no {@link SecretKey} could be obtained * * @throws KeyResolverException */ public SecretKey engineResolveSecretKey( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { if (log.isDebugEnabled()) { log.debug("Can I resolve " + element.getTagName() + "?"); } if (XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_KEYNAME)) { String keyName = element.getFirstChild().getNodeValue(); try { Key key = keyStore.getKey(keyName, password); if (key instanceof SecretKey) { return (SecretKey) key; } } catch (Exception e) { log.debug("Cannot recover the key", e); } } log.debug("I can't"); return null; } /** * Method engineResolvePrivateKey * @inheritDoc * @param element * @param baseURI * @param storage * @return resolved PrivateKey key or null if no {@link PrivateKey} could be obtained * @throws KeyResolverException */ public PrivateKey engineLookupAndResolvePrivateKey( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { return null; } } ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/DSAKeyValueResolver.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/DS0000644000175000017500000000652611561742421032457 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.keyresolver.implementations; import java.security.PublicKey; import java.security.cert.X509Certificate; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.keys.content.keyvalues.DSAKeyValue; import org.apache.xml.security.keys.keyresolver.KeyResolverSpi; import org.apache.xml.security.keys.storage.StorageResolver; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; public class DSAKeyValueResolver extends KeyResolverSpi { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(DSAKeyValueResolver.class); /** * Method engineResolvePublicKey * * @param element * @param BaseURI * @param storage * @return null if no {@link PublicKey} could be obtained */ public PublicKey engineLookupAndResolvePublicKey( Element element, String BaseURI, StorageResolver storage ) { if (element == null) { return null; } Element dsaKeyElement = null; boolean isKeyValue = XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_KEYVALUE); if (isKeyValue) { dsaKeyElement = XMLUtils.selectDsNode(element.getFirstChild(), Constants._TAG_DSAKEYVALUE, 0); } else if (XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_DSAKEYVALUE)) { // this trick is needed to allow the RetrievalMethodResolver to eat a // ds:DSAKeyValue directly (without KeyValue) dsaKeyElement = element; } if (dsaKeyElement == null) { return null; } try { DSAKeyValue dsaKeyValue = new DSAKeyValue(dsaKeyElement, BaseURI); PublicKey pk = dsaKeyValue.getPublicKey(); return pk; } catch (XMLSecurityException ex) { if (log.isDebugEnabled()) { log.debug(ex); } //do nothing } return null; } /** @inheritDoc */ public X509Certificate engineLookupResolveX509Certificate( Element element, String BaseURI, StorageResolver storage ) { return null; } /** @inheritDoc */ public javax.crypto.SecretKey engineLookupAndResolveSecretKey( Element element, String BaseURI, StorageResolver storage ) { return null; } } ././@LongLink0000000000000000000000000000017700000000000011572 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/X509SubjectNameResolver.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/X50000644000175000017500000001327111750731244032441 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.keyresolver.implementations; import java.security.PublicKey; import java.security.cert.Certificate; import java.security.cert.X509Certificate; import java.util.Iterator; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.keys.content.x509.XMLX509SubjectName; import org.apache.xml.security.keys.keyresolver.KeyResolverException; import org.apache.xml.security.keys.keyresolver.KeyResolverSpi; import org.apache.xml.security.keys.storage.StorageResolver; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; public class X509SubjectNameResolver extends KeyResolverSpi { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(X509SubjectNameResolver.class); /** * Method engineResolvePublicKey * * @param element * @param BaseURI * @param storage * @return null if no {@link PublicKey} could be obtained * @throws KeyResolverException */ public PublicKey engineLookupAndResolvePublicKey( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { X509Certificate cert = this.engineLookupResolveX509Certificate(element, baseURI, storage); if (cert != null) { return cert.getPublicKey(); } return null; } /** * Method engineResolveX509Certificate * @inheritDoc * @param element * @param baseURI * @param storage * * @throws KeyResolverException */ public X509Certificate engineLookupResolveX509Certificate( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { if (log.isDebugEnabled()) { log.debug("Can I resolve " + element.getTagName() + "?"); } Element[] x509childNodes = null; XMLX509SubjectName x509childObject[] = null; if (!XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_X509DATA)) { if (log.isDebugEnabled()) { log.debug("I can't"); } return null; } x509childNodes = XMLUtils.selectDsNodes(element.getFirstChild(), Constants._TAG_X509SUBJECTNAME); if (!((x509childNodes != null) && (x509childNodes.length > 0))) { if (log.isDebugEnabled()) { log.debug("I can't"); } return null; } try { if (storage == null) { Object exArgs[] = { Constants._TAG_X509SUBJECTNAME }; KeyResolverException ex = new KeyResolverException("KeyResolver.needStorageResolver", exArgs); if (log.isDebugEnabled()) { log.debug("", ex); } throw ex; } x509childObject = new XMLX509SubjectName[x509childNodes.length]; for (int i = 0; i < x509childNodes.length; i++) { x509childObject[i] = new XMLX509SubjectName(x509childNodes[i], baseURI); } Iterator storageIterator = storage.getIterator(); while (storageIterator.hasNext()) { X509Certificate cert = (X509Certificate)storageIterator.next(); XMLX509SubjectName certSN = new XMLX509SubjectName(element.getOwnerDocument(), cert); if (log.isDebugEnabled()) { log.debug("Found Certificate SN: " + certSN.getSubjectName()); } for (int i = 0; i < x509childObject.length; i++) { if (log.isDebugEnabled()) { log.debug("Found Element SN: " + x509childObject[i].getSubjectName()); } if (certSN.equals(x509childObject[i])) { if (log.isDebugEnabled()) { log.debug("match !!! "); } return cert; } if (log.isDebugEnabled()) { log.debug("no match..."); } } } return null; } catch (XMLSecurityException ex) { if (log.isDebugEnabled()) { log.debug("XMLSecurityException", ex); } throw new KeyResolverException("generic.EmptyMessage", ex); } } /** * Method engineResolveSecretKey * @inheritDoc * @param element * @param baseURI * @param storage * */ public javax.crypto.SecretKey engineLookupAndResolveSecretKey( Element element, String baseURI, StorageResolver storage ) { return null; } } ././@LongLink0000000000000000000000000000020000000000000011555 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/KeyInfoReferenceResolver.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/Ke0000644000175000017500000002345712234743735032521 0ustar tonytonypackage org.apache.xml.security.keys.keyresolver.implementations; import java.io.ByteArrayInputStream; import java.io.IOException; import java.security.PrivateKey; import java.security.PublicKey; import java.security.cert.X509Certificate; import javax.crypto.SecretKey; import javax.xml.namespace.QName; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.ParserConfigurationException; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.keys.content.KeyInfoReference; import org.apache.xml.security.keys.keyresolver.KeyResolverException; import org.apache.xml.security.keys.keyresolver.KeyResolverSpi; import org.apache.xml.security.keys.storage.StorageResolver; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.apache.xml.security.utils.resolver.ResourceResolver; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.xml.sax.SAXException; /** * KeyResolverSpi implementation which resolves public keys, private keys, secret keys, and X.509 certificates from a * dsig11:KeyInfoReference element. * * @author Brent Putman (putmanb@georgetown.edu) */ public class KeyInfoReferenceResolver extends KeyResolverSpi { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(KeyInfoReferenceResolver.class); /** {@inheritDoc}. */ public boolean engineCanResolve(Element element, String baseURI, StorageResolver storage) { return XMLUtils.elementIsInSignature11Space(element, Constants._TAG_KEYINFOREFERENCE); } /** {@inheritDoc}. */ public PublicKey engineLookupAndResolvePublicKey(Element element, String baseURI, StorageResolver storage) throws KeyResolverException { if (log.isDebugEnabled()) { log.debug("Can I resolve " + element.getTagName()); } if (!engineCanResolve(element, baseURI, storage)) { return null; } try { KeyInfo referent = resolveReferentKeyInfo(element, baseURI, storage); if (referent != null) { return referent.getPublicKey(); } } catch (XMLSecurityException e) { if (log.isDebugEnabled()) { log.debug("XMLSecurityException", e); } } return null; } /** {@inheritDoc}. */ public X509Certificate engineLookupResolveX509Certificate(Element element, String baseURI, StorageResolver storage) throws KeyResolverException { if (log.isDebugEnabled()) { log.debug("Can I resolve " + element.getTagName()); } if (!engineCanResolve(element, baseURI, storage)) { return null; } try { KeyInfo referent = resolveReferentKeyInfo(element, baseURI, storage); if (referent != null) { return referent.getX509Certificate(); } } catch (XMLSecurityException e) { if (log.isDebugEnabled()) { log.debug("XMLSecurityException", e); } } return null; } /** {@inheritDoc}. */ public SecretKey engineLookupAndResolveSecretKey(Element element, String baseURI, StorageResolver storage) throws KeyResolverException { if (log.isDebugEnabled()) { log.debug("Can I resolve " + element.getTagName()); } if (!engineCanResolve(element, baseURI, storage)) { return null; } try { KeyInfo referent = resolveReferentKeyInfo(element, baseURI, storage); if (referent != null) { return referent.getSecretKey(); } } catch (XMLSecurityException e) { if (log.isDebugEnabled()) { log.debug("XMLSecurityException", e); } } return null; } /** {@inheritDoc}. */ public PrivateKey engineLookupAndResolvePrivateKey(Element element, String baseURI, StorageResolver storage) throws KeyResolverException { if (log.isDebugEnabled()) { log.debug("Can I resolve " + element.getTagName()); } if (!engineCanResolve(element, baseURI, storage)) { return null; } try { KeyInfo referent = resolveReferentKeyInfo(element, baseURI, storage); if (referent != null) { return referent.getPrivateKey(); } } catch (XMLSecurityException e) { if (log.isDebugEnabled()) { log.debug("XMLSecurityException", e); } } return null; } /** * Resolve the KeyInfoReference Element's URI attribute into a KeyInfo instance. * * @param element * @param baseURI * @param storage * @return the KeyInfo which is referred to by this KeyInfoReference, or null if can not be resolved * @throws XMLSecurityException */ private KeyInfo resolveReferentKeyInfo(Element element, String baseURI, StorageResolver storage) throws XMLSecurityException { KeyInfoReference reference = new KeyInfoReference(element, baseURI); Attr uriAttr = reference.getURIAttr(); XMLSignatureInput resource = resolveInput(uriAttr, baseURI, secureValidation); Element referentElement = null; try { referentElement = obtainReferenceElement(resource); } catch (Exception e) { if (log.isDebugEnabled()) { log.debug("XMLSecurityException", e); } return null; } if (referentElement == null) { log.debug("De-reference of KeyInfoReference URI returned null: " + uriAttr.getValue()); return null; } validateReference(referentElement); KeyInfo referent = new KeyInfo(referentElement, baseURI); referent.addStorageResolver(storage); return referent; } /** * Validate the Element referred to by the KeyInfoReference. * * @param referentElement * * @throws XMLSecurityException */ private void validateReference(Element referentElement) throws XMLSecurityException { if (!XMLUtils.elementIsInSignatureSpace(referentElement, Constants._TAG_KEYINFO)) { Object exArgs[] = { new QName(referentElement.getNamespaceURI(), referentElement.getLocalName()) }; throw new XMLSecurityException("KeyInfoReferenceResolver.InvalidReferentElement.WrongType", exArgs); } KeyInfo referent = new KeyInfo(referentElement, ""); if (referent.containsKeyInfoReference()) { if (secureValidation) { throw new XMLSecurityException("KeyInfoReferenceResolver.InvalidReferentElement.ReferenceWithSecure"); } else { // Don't support chains of references at this time. If do support in the future, this is where the code // would go to validate that don't have a cycle, resulting in an infinite loop. This may be unrealistic // to implement, and/or very expensive given remote URI references. throw new XMLSecurityException("KeyInfoReferenceResolver.InvalidReferentElement.ReferenceWithoutSecure"); } } } /** * Resolve the XML signature input represented by the specified URI. * * @param uri * @param baseURI * @param secureValidation * @return * @throws XMLSecurityException */ private XMLSignatureInput resolveInput(Attr uri, String baseURI, boolean secureValidation) throws XMLSecurityException { ResourceResolver resRes = ResourceResolver.getInstance(uri, baseURI, secureValidation); XMLSignatureInput resource = resRes.resolve(uri, baseURI, secureValidation); return resource; } /** * Resolve the Element effectively represented by the XML signature input source. * * @param resource * @return * @throws CanonicalizationException * @throws ParserConfigurationException * @throws IOException * @throws SAXException * @throws KeyResolverException */ private Element obtainReferenceElement(XMLSignatureInput resource) throws CanonicalizationException, ParserConfigurationException, IOException, SAXException, KeyResolverException { Element e; if (resource.isElement()){ e = (Element) resource.getSubNode(); } else if (resource.isNodeSet()) { log.debug("De-reference of KeyInfoReference returned an unsupported NodeSet"); return null; } else { // Retrieved resource is a byte stream byte inputBytes[] = resource.getBytes(); e = getDocFromBytes(inputBytes); } return e; } /** * Parses a byte array and returns the parsed Element. * * @param bytes * @return the Document Element after parsing bytes * @throws KeyResolverException if something goes wrong */ private Element getDocFromBytes(byte[] bytes) throws KeyResolverException { try { DocumentBuilder db = XMLUtils.createDocumentBuilder(false, secureValidation); Document doc = db.parse(new ByteArrayInputStream(bytes)); return doc.getDocumentElement(); } catch (SAXException ex) { throw new KeyResolverException("empty", ex); } catch (IOException ex) { throw new KeyResolverException("empty", ex); } catch (ParserConfigurationException ex) { throw new KeyResolverException("empty", ex); } } } ././@LongLink0000000000000000000000000000017700000000000011572 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/RetrievalMethodResolver.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/Re0000644000175000017500000003504012234743735032517 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.keyresolver.implementations; import java.io.ByteArrayInputStream; import java.io.IOException; import java.security.PublicKey; import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.ListIterator; import java.util.Set; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.ParserConfigurationException; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.keys.content.RetrievalMethod; import org.apache.xml.security.keys.content.x509.XMLX509Certificate; import org.apache.xml.security.keys.keyresolver.KeyResolver; import org.apache.xml.security.keys.keyresolver.KeyResolverException; import org.apache.xml.security.keys.keyresolver.KeyResolverSpi; import org.apache.xml.security.keys.storage.StorageResolver; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.apache.xml.security.utils.resolver.ResourceResolver; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.xml.sax.SAXException; /** * The RetrievalMethodResolver can retrieve public keys and certificates from * other locations. The location is specified using the ds:RetrievalMethod * element which points to the location. This includes the handling of raw * (binary) X.509 certificate which are not encapsulated in an XML structure. * If the retrieval process encounters an element which the * RetrievalMethodResolver cannot handle itself, resolving of the extracted * element is delegated back to the KeyResolver mechanism. * * @author $Author: raul $ modified by Dave Garcia */ public class RetrievalMethodResolver extends KeyResolverSpi { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(RetrievalMethodResolver.class); /** * Method engineResolvePublicKey * @inheritDoc * @param element * @param baseURI * @param storage */ public PublicKey engineLookupAndResolvePublicKey( Element element, String baseURI, StorageResolver storage ) { if (!XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_RETRIEVALMETHOD)) { return null; } try { // Create a retrieval method over the given element RetrievalMethod rm = new RetrievalMethod(element, baseURI); String type = rm.getType(); XMLSignatureInput resource = resolveInput(rm, baseURI, secureValidation); if (RetrievalMethod.TYPE_RAWX509.equals(type)) { // a raw certificate, direct parsing is done! X509Certificate cert = getRawCertificate(resource); if (cert != null) { return cert.getPublicKey(); } return null; } Element e = obtainReferenceElement(resource, secureValidation); // Check to make sure that the reference is not to another RetrievalMethod // which points to this element if (XMLUtils.elementIsInSignatureSpace(e, Constants._TAG_RETRIEVALMETHOD)) { if (secureValidation) { String error = "Error: It is forbidden to have one RetrievalMethod " + "point to another with secure validation"; if (log.isDebugEnabled()) { log.debug(error); } return null; } RetrievalMethod rm2 = new RetrievalMethod(e, baseURI); XMLSignatureInput resource2 = resolveInput(rm2, baseURI, secureValidation); Element e2 = obtainReferenceElement(resource2, secureValidation); if (e2 == element) { if (log.isDebugEnabled()) { log.debug("Error: Can't have RetrievalMethods pointing to each other"); } return null; } } return resolveKey(e, baseURI, storage); } catch (XMLSecurityException ex) { if (log.isDebugEnabled()) { log.debug("XMLSecurityException", ex); } } catch (CertificateException ex) { if (log.isDebugEnabled()) { log.debug("CertificateException", ex); } } catch (IOException ex) { if (log.isDebugEnabled()) { log.debug("IOException", ex); } } catch (ParserConfigurationException e) { if (log.isDebugEnabled()) { log.debug("ParserConfigurationException", e); } } catch (SAXException e) { if (log.isDebugEnabled()) { log.debug("SAXException", e); } } return null; } /** * Method engineResolveX509Certificate * @inheritDoc * @param element * @param baseURI * @param storage */ public X509Certificate engineLookupResolveX509Certificate( Element element, String baseURI, StorageResolver storage) { if (!XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_RETRIEVALMETHOD)) { return null; } try { RetrievalMethod rm = new RetrievalMethod(element, baseURI); String type = rm.getType(); XMLSignatureInput resource = resolveInput(rm, baseURI, secureValidation); if (RetrievalMethod.TYPE_RAWX509.equals(type)) { return getRawCertificate(resource); } Element e = obtainReferenceElement(resource, secureValidation); // Check to make sure that the reference is not to another RetrievalMethod // which points to this element if (XMLUtils.elementIsInSignatureSpace(e, Constants._TAG_RETRIEVALMETHOD)) { if (secureValidation) { String error = "Error: It is forbidden to have one RetrievalMethod " + "point to another with secure validation"; if (log.isDebugEnabled()) { log.debug(error); } return null; } RetrievalMethod rm2 = new RetrievalMethod(e, baseURI); XMLSignatureInput resource2 = resolveInput(rm2, baseURI, secureValidation); Element e2 = obtainReferenceElement(resource2, secureValidation); if (e2 == element) { if (log.isDebugEnabled()) { log.debug("Error: Can't have RetrievalMethods pointing to each other"); } return null; } } return resolveCertificate(e, baseURI, storage); } catch (XMLSecurityException ex) { if (log.isDebugEnabled()) { log.debug("XMLSecurityException", ex); } } catch (CertificateException ex) { if (log.isDebugEnabled()) { log.debug("CertificateException", ex); } } catch (IOException ex) { if (log.isDebugEnabled()) { log.debug("IOException", ex); } } catch (ParserConfigurationException e) { if (log.isDebugEnabled()) { log.debug("ParserConfigurationException", e); } } catch (SAXException e) { if (log.isDebugEnabled()) { log.debug("SAXException", e); } } return null; } /** * Retrieves a x509Certificate from the given information * @param e * @param baseURI * @param storage * @return * @throws KeyResolverException */ private static X509Certificate resolveCertificate( Element e, String baseURI, StorageResolver storage ) throws KeyResolverException { if (log.isDebugEnabled()) { log.debug("Now we have a {" + e.getNamespaceURI() + "}" + e.getLocalName() + " Element"); } // An element has been provided if (e != null) { return KeyResolver.getX509Certificate(e, baseURI, storage); } return null; } /** * Retrieves a PublicKey from the given information * @param e * @param baseURI * @param storage * @return * @throws KeyResolverException */ private static PublicKey resolveKey( Element e, String baseURI, StorageResolver storage ) throws KeyResolverException { if (log.isDebugEnabled()) { log.debug("Now we have a {" + e.getNamespaceURI() + "}" + e.getLocalName() + " Element"); } // An element has been provided if (e != null) { return KeyResolver.getPublicKey(e, baseURI, storage); } return null; } private static Element obtainReferenceElement(XMLSignatureInput resource, boolean secureValidation) throws CanonicalizationException, ParserConfigurationException, IOException, SAXException, KeyResolverException { Element e; if (resource.isElement()){ e = (Element) resource.getSubNode(); } else if (resource.isNodeSet()) { // Retrieved resource is a nodeSet e = getDocumentElement(resource.getNodeSet()); } else { // Retrieved resource is an inputStream byte inputBytes[] = resource.getBytes(); e = getDocFromBytes(inputBytes, secureValidation); // otherwise, we parse the resource, create an Element and delegate if (log.isDebugEnabled()) { log.debug("we have to parse " + inputBytes.length + " bytes"); } } return e; } private static X509Certificate getRawCertificate(XMLSignatureInput resource) throws CanonicalizationException, IOException, CertificateException { byte inputBytes[] = resource.getBytes(); // if the resource stores a raw certificate, we have to handle it CertificateFactory certFact = CertificateFactory.getInstance(XMLX509Certificate.JCA_CERT_ID); X509Certificate cert = (X509Certificate) certFact.generateCertificate(new ByteArrayInputStream(inputBytes)); return cert; } /** * Resolves the input from the given retrieval method * @return * @throws XMLSecurityException */ private static XMLSignatureInput resolveInput( RetrievalMethod rm, String baseURI, boolean secureValidation ) throws XMLSecurityException { Attr uri = rm.getURIAttr(); // Apply the transforms Transforms transforms = rm.getTransforms(); ResourceResolver resRes = ResourceResolver.getInstance(uri, baseURI, secureValidation); XMLSignatureInput resource = resRes.resolve(uri, baseURI, secureValidation); if (transforms != null) { if (log.isDebugEnabled()) { log.debug("We have Transforms"); } resource = transforms.performTransforms(resource); } return resource; } /** * Parses a byte array and returns the parsed Element. * * @param bytes * @return the Document Element after parsing bytes * @throws KeyResolverException if something goes wrong */ private static Element getDocFromBytes(byte[] bytes, boolean secureValidation) throws KeyResolverException { try { DocumentBuilder db = XMLUtils.createDocumentBuilder(false, secureValidation); Document doc = db.parse(new ByteArrayInputStream(bytes)); return doc.getDocumentElement(); } catch (SAXException ex) { throw new KeyResolverException("empty", ex); } catch (IOException ex) { throw new KeyResolverException("empty", ex); } catch (ParserConfigurationException ex) { throw new KeyResolverException("empty", ex); } } /** * Method engineResolveSecretKey * @inheritDoc * @param element * @param baseURI * @param storage */ public javax.crypto.SecretKey engineLookupAndResolveSecretKey( Element element, String baseURI, StorageResolver storage ) { return null; } private static Element getDocumentElement(Set set) { Iterator it = set.iterator(); Element e = null; while (it.hasNext()) { Node currentNode = it.next(); if (currentNode != null && Node.ELEMENT_NODE == currentNode.getNodeType()) { e = (Element) currentNode; break; } } List parents = new ArrayList(); // Obtain all the parents of the elemnt while (e != null) { parents.add(e); Node n = e.getParentNode(); if (n == null || Node.ELEMENT_NODE != n.getNodeType()) { break; } e = (Element) n; } // Visit them in reverse order. ListIterator it2 = parents.listIterator(parents.size()-1); Element ele = null; while (it2.hasPrevious()) { ele = (Element) it2.previous(); if (set.contains(ele)) { return ele; } } return null; } } ././@LongLink0000000000000000000000000000017700000000000011572 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/X509CertificateResolver.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/X50000644000175000017500000001010711555512724032437 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.keyresolver.implementations; import java.security.PublicKey; import java.security.cert.X509Certificate; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.keys.content.x509.XMLX509Certificate; import org.apache.xml.security.keys.keyresolver.KeyResolverException; import org.apache.xml.security.keys.keyresolver.KeyResolverSpi; import org.apache.xml.security.keys.storage.StorageResolver; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * Resolves Certificates which are directly contained inside a * ds:X509Certificate Element. * * @author $Author: coheigea $ */ public class X509CertificateResolver extends KeyResolverSpi { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(X509CertificateResolver.class); /** * Method engineResolvePublicKey * @inheritDoc * @param element * @param BaseURI * @param storage * * @throws KeyResolverException */ public PublicKey engineLookupAndResolvePublicKey( Element element, String BaseURI, StorageResolver storage ) throws KeyResolverException { X509Certificate cert = this.engineLookupResolveX509Certificate(element, BaseURI, storage); if (cert != null) { return cert.getPublicKey(); } return null; } /** * Method engineResolveX509Certificate * @inheritDoc * @param element * @param BaseURI * @param storage * * @throws KeyResolverException */ public X509Certificate engineLookupResolveX509Certificate( Element element, String BaseURI, StorageResolver storage ) throws KeyResolverException { try { Element[] els = XMLUtils.selectDsNodes(element.getFirstChild(), Constants._TAG_X509CERTIFICATE); if ((els == null) || (els.length == 0)) { Element el = XMLUtils.selectDsNode(element.getFirstChild(), Constants._TAG_X509DATA, 0); if (el != null) { return engineLookupResolveX509Certificate(el, BaseURI, storage); } return null; } // populate Object array for (int i = 0; i < els.length; i++) { XMLX509Certificate xmlCert = new XMLX509Certificate(els[i], BaseURI); X509Certificate cert = xmlCert.getX509Certificate(); if (cert != null) { return cert; } } return null; } catch (XMLSecurityException ex) { if (log.isDebugEnabled()) { log.debug("XMLSecurityException", ex); } throw new KeyResolverException("generic.EmptyMessage", ex); } } /** * Method engineResolveSecretKey * @inheritDoc * @param element * @param BaseURI * @param storage */ public javax.crypto.SecretKey engineLookupAndResolveSecretKey( Element element, String BaseURI, StorageResolver storage ) { return null; } } ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/EncryptedKeyResolver.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/En0000644000175000017500000001172711735023140032503 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.keyresolver.implementations; import java.security.Key; import java.security.PublicKey; import java.security.cert.X509Certificate; import java.util.ArrayList; import java.util.List; import javax.crypto.SecretKey; import org.apache.xml.security.encryption.EncryptedKey; import org.apache.xml.security.encryption.XMLCipher; import org.apache.xml.security.encryption.XMLEncryptionException; import org.apache.xml.security.keys.keyresolver.KeyResolverSpi; import org.apache.xml.security.keys.storage.StorageResolver; import org.apache.xml.security.utils.EncryptionConstants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * The EncryptedKeyResolver is not a generic resolver. It can * only be for specific instantiations, as the key being unwrapped will * always be of a particular type and will always have been wrapped by * another key which needs to be recursively resolved. * * The EncryptedKeyResolver can therefore only be instantiated * with an algorithm. It can also be instantiated with a key (the KEK) or * will search the static KeyResolvers to find the appropriate key. * * @author Berin Lautenbach */ public class EncryptedKeyResolver extends KeyResolverSpi { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(RSAKeyValueResolver.class); private Key kek; private String algorithm; private List internalKeyResolvers; /** * Constructor for use when a KEK needs to be derived from a KeyInfo * list * @param algorithm */ public EncryptedKeyResolver(String algorithm) { kek = null; this.algorithm = algorithm; } /** * Constructor used for when a KEK has been set * @param algorithm * @param kek */ public EncryptedKeyResolver(String algorithm, Key kek) { this.algorithm = algorithm; this.kek = kek; } /** * This method is used to add a custom {@link KeyResolverSpi} to help * resolve the KEK. * * @param realKeyResolver */ public void registerInternalKeyResolver(KeyResolverSpi realKeyResolver) { if (internalKeyResolvers == null) { internalKeyResolvers = new ArrayList(); } internalKeyResolvers.add(realKeyResolver); } /** @inheritDoc */ public PublicKey engineLookupAndResolvePublicKey( Element element, String BaseURI, StorageResolver storage ) { return null; } /** @inheritDoc */ public X509Certificate engineLookupResolveX509Certificate( Element element, String BaseURI, StorageResolver storage ) { return null; } /** @inheritDoc */ public javax.crypto.SecretKey engineLookupAndResolveSecretKey( Element element, String BaseURI, StorageResolver storage ) { if (log.isDebugEnabled()) { log.debug("EncryptedKeyResolver - Can I resolve " + element.getTagName()); } if (element == null) { return null; } SecretKey key = null; boolean isEncryptedKey = XMLUtils.elementIsInEncryptionSpace(element, EncryptionConstants._TAG_ENCRYPTEDKEY); if (isEncryptedKey) { if (log.isDebugEnabled()) { log.debug("Passed an Encrypted Key"); } try { XMLCipher cipher = XMLCipher.getInstance(); cipher.init(XMLCipher.UNWRAP_MODE, kek); if (internalKeyResolvers != null) { int size = internalKeyResolvers.size(); for (int i = 0; i < size; i++) { cipher.registerInternalKeyResolver(internalKeyResolvers.get(i)); } } EncryptedKey ek = cipher.loadEncryptedKey(element); key = (SecretKey) cipher.decryptKey(ek, algorithm); } catch (XMLEncryptionException e) { if (log.isDebugEnabled()) { log.debug(e); } } } return key; } } ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/X509DigestResolver.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/implementations/X50000644000175000017500000001240012060430451032421 0ustar tonytonypackage org.apache.xml.security.keys.keyresolver.implementations; import java.security.PublicKey; import java.security.cert.Certificate; import java.security.cert.X509Certificate; import java.util.Arrays; import java.util.Iterator; import javax.crypto.SecretKey; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.keys.content.X509Data; import org.apache.xml.security.keys.content.x509.XMLX509Digest; import org.apache.xml.security.keys.keyresolver.KeyResolverException; import org.apache.xml.security.keys.keyresolver.KeyResolverSpi; import org.apache.xml.security.keys.storage.StorageResolver; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * KeyResolverSpi implementation which resolves public keys and X.509 certificates from a * dsig11:X509Digest element. * * @author Brent Putman (putmanb@georgetown.edu) */ public class X509DigestResolver extends KeyResolverSpi { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(X509DigestResolver.class); /** {@inheritDoc}. */ public boolean engineCanResolve(Element element, String baseURI, StorageResolver storage) { if (XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_X509DATA)) { try { X509Data x509Data = new X509Data(element, baseURI); return x509Data.containsDigest(); } catch (XMLSecurityException e) { return false; } } else { return false; } } /** {@inheritDoc}. */ public PublicKey engineLookupAndResolvePublicKey(Element element, String baseURI, StorageResolver storage) throws KeyResolverException { X509Certificate cert = this.engineLookupResolveX509Certificate(element, baseURI, storage); if (cert != null) { return cert.getPublicKey(); } return null; } /** {@inheritDoc}. */ public X509Certificate engineLookupResolveX509Certificate(Element element, String baseURI, StorageResolver storage) throws KeyResolverException { if (log.isDebugEnabled()) { log.debug("Can I resolve " + element.getTagName()); } if (!engineCanResolve(element, baseURI, storage)) { return null; } try { return resolveCertificate(element, baseURI, storage); } catch (XMLSecurityException e) { if (log.isDebugEnabled()) { log.debug("XMLSecurityException", e); } } return null; } /** {@inheritDoc}. */ public SecretKey engineLookupAndResolveSecretKey(Element element, String baseURI, StorageResolver storage) throws KeyResolverException { return null; } /** * Resolves from the storage resolver the actual certificate represented by the digest. * * @param element * @param baseURI * @param storage * @return * @throws XMLSecurityException */ private X509Certificate resolveCertificate(Element element, String baseURI, StorageResolver storage) throws XMLSecurityException { XMLX509Digest x509Digests[] = null; Element x509childNodes[] = XMLUtils.selectDs11Nodes(element.getFirstChild(), Constants._TAG_X509DIGEST); if (x509childNodes == null || x509childNodes.length <= 0) { return null; } try { checkStorage(storage); x509Digests = new XMLX509Digest[x509childNodes.length]; for (int i = 0; i < x509childNodes.length; i++) { x509Digests[i] = new XMLX509Digest(x509childNodes[i], baseURI); } Iterator storageIterator = storage.getIterator(); while (storageIterator.hasNext()) { X509Certificate cert = (X509Certificate) storageIterator.next(); for (int i = 0; i < x509Digests.length; i++) { XMLX509Digest keyInfoDigest = x509Digests[i]; byte[] certDigestBytes = XMLX509Digest.getDigestBytesFromCert(cert, keyInfoDigest.getAlgorithm()); if (Arrays.equals(keyInfoDigest.getDigestBytes(), certDigestBytes)) { if (log.isDebugEnabled()) { log.debug("Found certificate with: " + cert.getSubjectX500Principal().getName()); } return cert; } } } } catch (XMLSecurityException ex) { throw new KeyResolverException("empty", ex); } return null; } /** * Method checkSrorage * * @param storage * @throws KeyResolverException */ private void checkStorage(StorageResolver storage) throws KeyResolverException { if (storage == null) { Object exArgs[] = { Constants._TAG_X509DIGEST }; KeyResolverException ex = new KeyResolverException("KeyResolver.needStorageResolver", exArgs); if (log.isDebugEnabled()) { log.debug("", ex); } throw ex; } } } ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/InvalidKeyResolverException.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/InvalidKeyResolver0000644000175000017500000000415411555512724032521 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.keyresolver; import org.apache.xml.security.exceptions.XMLSecurityException; public class InvalidKeyResolverException extends XMLSecurityException { /** * */ private static final long serialVersionUID = 1L; /** * Constructor InvalidKeyResolverException * */ public InvalidKeyResolverException() { super(); } /** * Constructor InvalidKeyResolverException * * @param msgID */ public InvalidKeyResolverException(String msgID) { super(msgID); } /** * Constructor InvalidKeyResolverException * * @param msgID * @param exArgs */ public InvalidKeyResolverException(String msgID, Object exArgs[]) { super(msgID, exArgs); } /** * Constructor InvalidKeyResolverException * * @param msgID * @param originalException */ public InvalidKeyResolverException(String msgID, Exception originalException) { super(msgID, originalException); } /** * Constructor InvalidKeyResolverException * * @param msgID * @param exArgs * @param originalException */ public InvalidKeyResolverException(String msgID, Object exArgs[], Exception originalException) { super(msgID, exArgs, originalException); } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/KeyResolverSpi.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/KeyResolverSpi.jav0000644000175000017500000001725611750731244032451 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.keyresolver; import java.security.PrivateKey; import java.security.PublicKey; import java.security.cert.X509Certificate; import java.util.HashMap; import javax.crypto.SecretKey; import org.apache.xml.security.keys.storage.StorageResolver; import org.w3c.dom.Element; /** * This class is an abstract class for a child KeyInfo Element. * * If you want the your KeyResolver, at firstly you must extend this class, and register * as following in config.xml *
 *  <KeyResolver URI="http://www.w3.org/2000/09/xmldsig#KeyValue"
 *   JAVACLASS="MyPackage.MyKeyValueImpl"//gt;
 * 
*/ public abstract class KeyResolverSpi { /** Field properties */ protected java.util.Map properties = null; protected boolean globalResolver = false; protected boolean secureValidation; /** * Set whether secure validation is enabled or not. The default is false. */ public void setSecureValidation(boolean secureValidation) { this.secureValidation = secureValidation; } /** * This method returns whether the KeyResolverSpi is able to perform the requested action. * * @param element * @param baseURI * @param storage * @return whether the KeyResolverSpi is able to perform the requested action. */ public boolean engineCanResolve(Element element, String baseURI, StorageResolver storage) { throw new UnsupportedOperationException(); } /** * Method engineResolvePublicKey * * @param element * @param baseURI * @param storage * @return resolved public key from the registered from the element. * * @throws KeyResolverException */ public PublicKey engineResolvePublicKey( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { throw new UnsupportedOperationException(); }; /** * Method engineLookupAndResolvePublicKey * * @param element * @param baseURI * @param storage * @return resolved public key from the registered from the element. * * @throws KeyResolverException */ public PublicKey engineLookupAndResolvePublicKey( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { KeyResolverSpi tmp = cloneIfNeeded(); if (!tmp.engineCanResolve(element, baseURI, storage)) { return null; } return tmp.engineResolvePublicKey(element, baseURI, storage); } private KeyResolverSpi cloneIfNeeded() throws KeyResolverException { KeyResolverSpi tmp = this; if (globalResolver) { try { tmp = getClass().newInstance(); } catch (InstantiationException e) { throw new KeyResolverException("", e); } catch (IllegalAccessException e) { throw new KeyResolverException("", e); } } return tmp; } /** * Method engineResolveCertificate * * @param element * @param baseURI * @param storage * @return resolved X509Certificate key from the registered from the elements * * @throws KeyResolverException */ public X509Certificate engineResolveX509Certificate( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException{ throw new UnsupportedOperationException(); }; /** * Method engineLookupResolveX509Certificate * * @param element * @param baseURI * @param storage * @return resolved X509Certificate key from the registered from the elements * * @throws KeyResolverException */ public X509Certificate engineLookupResolveX509Certificate( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { KeyResolverSpi tmp = cloneIfNeeded(); if (!tmp.engineCanResolve(element, baseURI, storage)) { return null; } return tmp.engineResolveX509Certificate(element, baseURI, storage); } /** * Method engineResolveSecretKey * * @param element * @param baseURI * @param storage * @return resolved SecretKey key from the registered from the elements * * @throws KeyResolverException */ public SecretKey engineResolveSecretKey( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException{ throw new UnsupportedOperationException(); }; /** * Method engineLookupAndResolveSecretKey * * @param element * @param baseURI * @param storage * @return resolved SecretKey key from the registered from the elements * * @throws KeyResolverException */ public SecretKey engineLookupAndResolveSecretKey( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { KeyResolverSpi tmp = cloneIfNeeded(); if (!tmp.engineCanResolve(element, baseURI, storage)) { return null; } return tmp.engineResolveSecretKey(element, baseURI, storage); } /** * Method engineLookupAndResolvePrivateKey * * @param element * @param baseURI * @param storage * @return resolved PrivateKey key from the registered from the elements * * @throws KeyResolverException */ public PrivateKey engineLookupAndResolvePrivateKey( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { // This method was added later, it has no equivalent // engineResolvePrivateKey() in the old API. // We cannot throw UnsupportedOperationException because // KeyResolverSpi implementations who don't know about // this method would stop the search too early. return null; } /** * Method engineSetProperty * * @param key * @param value */ public void engineSetProperty(String key, String value) { if (properties == null) { properties = new HashMap(); } properties.put(key, value); } /** * Method engineGetProperty * * @param key * @return obtain the property appointed by key */ public String engineGetProperty(String key) { if (properties == null) { return null; } return properties.get(key); } /** * Method understandsProperty * * @param propertyToTest * @return true if understood the property */ public boolean understandsProperty(String propertyToTest) { if (properties == null) { return false; } return properties.get(propertyToTest) != null; } public void setGlobalResolver(boolean globalResolver) { this.globalResolver = globalResolver; } } ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/KeyResolverException.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/keyresolver/KeyResolverExcepti0000644000175000017500000000403711555512724032534 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.keyresolver; import org.apache.xml.security.exceptions.XMLSecurityException; public class KeyResolverException extends XMLSecurityException { /** * */ private static final long serialVersionUID = 1L; /** * Constructor KeyResolverException * */ public KeyResolverException() { super(); } /** * Constructor KeyResolverException * * @param msgID */ public KeyResolverException(String msgID) { super(msgID); } /** * Constructor KeyResolverException * * @param msgID * @param exArgs */ public KeyResolverException(String msgID, Object exArgs[]) { super(msgID, exArgs); } /** * Constructor KeyResolverException * * @param msgID * @param originalException */ public KeyResolverException(String msgID, Exception originalException) { super(msgID, originalException); } /** * Constructor KeyResolverException * * @param msgID * @param exArgs * @param originalException */ public KeyResolverException(String msgID, Object exArgs[], Exception originalException) { super(msgID, exArgs, originalException); } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/0000755000175000017500000000000012273503734026110 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/package.html0000644000175000017500000000017207533712503030370 0ustar tonytony

basic handlers for elements that can occur inside ds:KeyInfo.

libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/KeyValue.java0000644000175000017500000001141011553276262030500 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.content; import java.security.PublicKey; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.keys.content.keyvalues.DSAKeyValue; import org.apache.xml.security.keys.content.keyvalues.RSAKeyValue; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.SignatureElementProxy; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * The KeyValue element contains a single public key that may be useful in * validating the signature. Structured formats for defining DSA (REQUIRED) * and RSA (RECOMMENDED) public keys are defined in Signature Algorithms * (section 6.4). The KeyValue element may include externally defined public * keys values represented as PCDATA or element types from an external * namespace. * * @author $Author: coheigea $ */ public class KeyValue extends SignatureElementProxy implements KeyInfoContent { /** * Constructor KeyValue * * @param doc * @param dsaKeyValue */ public KeyValue(Document doc, DSAKeyValue dsaKeyValue) { super(doc); XMLUtils.addReturnToElement(this.constructionElement); this.constructionElement.appendChild(dsaKeyValue.getElement()); XMLUtils.addReturnToElement(this.constructionElement); } /** * Constructor KeyValue * * @param doc * @param rsaKeyValue */ public KeyValue(Document doc, RSAKeyValue rsaKeyValue) { super(doc); XMLUtils.addReturnToElement(this.constructionElement); this.constructionElement.appendChild(rsaKeyValue.getElement()); XMLUtils.addReturnToElement(this.constructionElement); } /** * Constructor KeyValue * * @param doc * @param unknownKeyValue */ public KeyValue(Document doc, Element unknownKeyValue) { super(doc); XMLUtils.addReturnToElement(this.constructionElement); this.constructionElement.appendChild(unknownKeyValue); XMLUtils.addReturnToElement(this.constructionElement); } /** * Constructor KeyValue * * @param doc * @param pk */ public KeyValue(Document doc, PublicKey pk) { super(doc); XMLUtils.addReturnToElement(this.constructionElement); if (pk instanceof java.security.interfaces.DSAPublicKey) { DSAKeyValue dsa = new DSAKeyValue(this.doc, pk); this.constructionElement.appendChild(dsa.getElement()); XMLUtils.addReturnToElement(this.constructionElement); } else if (pk instanceof java.security.interfaces.RSAPublicKey) { RSAKeyValue rsa = new RSAKeyValue(this.doc, pk); this.constructionElement.appendChild(rsa.getElement()); XMLUtils.addReturnToElement(this.constructionElement); } } /** * Constructor KeyValue * * @param element * @param BaseURI * @throws XMLSecurityException */ public KeyValue(Element element, String BaseURI) throws XMLSecurityException { super(element, BaseURI); } /** * Method getPublicKey * * @return the public key * @throws XMLSecurityException */ public PublicKey getPublicKey() throws XMLSecurityException { Element rsa = XMLUtils.selectDsNode( this.constructionElement.getFirstChild(), Constants._TAG_RSAKEYVALUE, 0); if (rsa != null) { RSAKeyValue kv = new RSAKeyValue(rsa, this.baseURI); return kv.getPublicKey(); } Element dsa = XMLUtils.selectDsNode( this.constructionElement.getFirstChild(), Constants._TAG_DSAKEYVALUE, 0); if (dsa != null) { DSAKeyValue kv = new DSAKeyValue(dsa, this.baseURI); return kv.getPublicKey(); } return null; } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_KEYVALUE; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/PGPData.java0000644000175000017500000000301711553276262030177 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.content; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.SignatureElementProxy; import org.w3c.dom.Element; /** * @author $Author: coheigea $ * $todo$ Implement */ public class PGPData extends SignatureElementProxy implements KeyInfoContent { /** * Constructor PGPData * * @param element * @param BaseURI * @throws XMLSecurityException */ public PGPData(Element element, String BaseURI) throws XMLSecurityException { super(element, BaseURI); } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_PGPDATA; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/keyvalues/0000755000175000017500000000000012273503734030120 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/keyvalues/package.html0000644000175000017500000000017307533712503032401 0ustar tonytony

basic handlers for elements that can occur inside ds:KeyValue.

././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/keyvalues/DSAKeyValue.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/keyvalues/DSAKeyValue.0000644000175000017500000001102211750731244032170 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.content.keyvalues; import java.math.BigInteger; import java.security.Key; import java.security.KeyFactory; import java.security.NoSuchAlgorithmException; import java.security.PublicKey; import java.security.interfaces.DSAPublicKey; import java.security.spec.DSAPublicKeySpec; import java.security.spec.InvalidKeySpecException; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.I18n; import org.apache.xml.security.utils.SignatureElementProxy; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; public class DSAKeyValue extends SignatureElementProxy implements KeyValueContent { /** * Constructor DSAKeyValue * * @param element * @param baseURI * @throws XMLSecurityException */ public DSAKeyValue(Element element, String baseURI) throws XMLSecurityException { super(element, baseURI); } /** * Constructor DSAKeyValue * * @param doc * @param P * @param Q * @param G * @param Y */ public DSAKeyValue(Document doc, BigInteger P, BigInteger Q, BigInteger G, BigInteger Y) { super(doc); XMLUtils.addReturnToElement(this.constructionElement); this.addBigIntegerElement(P, Constants._TAG_P); this.addBigIntegerElement(Q, Constants._TAG_Q); this.addBigIntegerElement(G, Constants._TAG_G); this.addBigIntegerElement(Y, Constants._TAG_Y); } /** * Constructor DSAKeyValue * * @param doc * @param key * @throws IllegalArgumentException */ public DSAKeyValue(Document doc, Key key) throws IllegalArgumentException { super(doc); XMLUtils.addReturnToElement(this.constructionElement); if (key instanceof java.security.interfaces.DSAPublicKey) { this.addBigIntegerElement(((DSAPublicKey) key).getParams().getP(), Constants._TAG_P); this.addBigIntegerElement(((DSAPublicKey) key).getParams().getQ(), Constants._TAG_Q); this.addBigIntegerElement(((DSAPublicKey) key).getParams().getG(), Constants._TAG_G); this.addBigIntegerElement(((DSAPublicKey) key).getY(), Constants._TAG_Y); } else { Object exArgs[] = { Constants._TAG_DSAKEYVALUE, key.getClass().getName() }; throw new IllegalArgumentException(I18n.translate("KeyValue.IllegalArgument", exArgs)); } } /** @inheritDoc */ public PublicKey getPublicKey() throws XMLSecurityException { try { DSAPublicKeySpec pkspec = new DSAPublicKeySpec( this.getBigIntegerFromChildElement( Constants._TAG_Y, Constants.SignatureSpecNS ), this.getBigIntegerFromChildElement( Constants._TAG_P, Constants.SignatureSpecNS ), this.getBigIntegerFromChildElement( Constants._TAG_Q, Constants.SignatureSpecNS ), this.getBigIntegerFromChildElement( Constants._TAG_G, Constants.SignatureSpecNS ) ); KeyFactory dsaFactory = KeyFactory.getInstance("DSA"); PublicKey pk = dsaFactory.generatePublic(pkspec); return pk; } catch (NoSuchAlgorithmException ex) { throw new XMLSecurityException("empty", ex); } catch (InvalidKeySpecException ex) { throw new XMLSecurityException("empty", ex); } } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_DSAKEYVALUE; } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/keyvalues/RSAKeyValue.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/keyvalues/RSAKeyValue.0000644000175000017500000001002511553276262032215 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.content.keyvalues; import java.math.BigInteger; import java.security.Key; import java.security.KeyFactory; import java.security.NoSuchAlgorithmException; import java.security.PublicKey; import java.security.interfaces.RSAPublicKey; import java.security.spec.InvalidKeySpecException; import java.security.spec.RSAPublicKeySpec; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.I18n; import org.apache.xml.security.utils.SignatureElementProxy; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; public class RSAKeyValue extends SignatureElementProxy implements KeyValueContent { /** * Constructor RSAKeyValue * * @param element * @param BaseURI * @throws XMLSecurityException */ public RSAKeyValue(Element element, String BaseURI) throws XMLSecurityException { super(element, BaseURI); } /** * Constructor RSAKeyValue * * @param doc * @param modulus * @param exponent */ public RSAKeyValue(Document doc, BigInteger modulus, BigInteger exponent) { super(doc); XMLUtils.addReturnToElement(this.constructionElement); this.addBigIntegerElement(modulus, Constants._TAG_MODULUS); this.addBigIntegerElement(exponent, Constants._TAG_EXPONENT); } /** * Constructor RSAKeyValue * * @param doc * @param key * @throws IllegalArgumentException */ public RSAKeyValue(Document doc, Key key) throws IllegalArgumentException { super(doc); XMLUtils.addReturnToElement(this.constructionElement); if (key instanceof java.security.interfaces.RSAPublicKey ) { this.addBigIntegerElement( ((RSAPublicKey) key).getModulus(), Constants._TAG_MODULUS ); this.addBigIntegerElement( ((RSAPublicKey) key).getPublicExponent(), Constants._TAG_EXPONENT ); } else { Object exArgs[] = { Constants._TAG_RSAKEYVALUE, key.getClass().getName() }; throw new IllegalArgumentException(I18n.translate("KeyValue.IllegalArgument", exArgs)); } } /** @inheritDoc */ public PublicKey getPublicKey() throws XMLSecurityException { try { KeyFactory rsaFactory = KeyFactory.getInstance("RSA"); RSAPublicKeySpec rsaKeyspec = new RSAPublicKeySpec( this.getBigIntegerFromChildElement( Constants._TAG_MODULUS, Constants.SignatureSpecNS ), this.getBigIntegerFromChildElement( Constants._TAG_EXPONENT, Constants.SignatureSpecNS ) ); PublicKey pk = rsaFactory.generatePublic(rsaKeyspec); return pk; } catch (NoSuchAlgorithmException ex) { throw new XMLSecurityException("empty", ex); } catch (InvalidKeySpecException ex) { throw new XMLSecurityException("empty", ex); } } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_RSAKEYVALUE; } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/keyvalues/KeyValueContent.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/keyvalues/KeyValueCont0000644000175000017500000000222311750731244032411 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.content.keyvalues; import java.security.PublicKey; import org.apache.xml.security.exceptions.XMLSecurityException; public interface KeyValueContent { /** * Method getPublicKey * * @return the public key * @throws XMLSecurityException */ PublicKey getPublicKey() throws XMLSecurityException; } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/DEREncodedKeyValue.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/DEREncodedKeyValue.jav0000644000175000017500000001226512060430451032147 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.content; import java.security.KeyFactory; import java.security.NoSuchAlgorithmException; import java.security.PublicKey; import java.security.spec.InvalidKeySpecException; import java.security.spec.X509EncodedKeySpec; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.Signature11ElementProxy; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * Provides content model support for the dsig11:DEREncodedKeyvalue element. * * @author Brent Putman (putmanb@georgetown.edu) */ public class DEREncodedKeyValue extends Signature11ElementProxy implements KeyInfoContent { /** JCA algorithm key types supported by this implementation. */ public static final String supportedKeyTypes[] = { "RSA", "DSA", "EC"}; /** * Constructor DEREncodedKeyValue * * @param element * @param BaseURI * @throws XMLSecurityException */ public DEREncodedKeyValue(Element element, String BaseURI) throws XMLSecurityException { super(element, BaseURI); } /** * Constructor DEREncodedKeyValue * * @param doc * @param publicKey * @throws XMLSecurityException */ public DEREncodedKeyValue(Document doc, PublicKey publicKey) throws XMLSecurityException { super(doc); this.addBase64Text(getEncodedDER(publicKey)); } /** * Constructor DEREncodedKeyValue * * @param doc * @param base64EncodedKey */ public DEREncodedKeyValue(Document doc, byte[] encodedKey) { super(doc); this.addBase64Text(encodedKey); } /** * Sets the Id attribute * * @param Id ID */ public void setId(String id) { if (id != null) { this.constructionElement.setAttributeNS(null, Constants._ATT_ID, id); this.constructionElement.setIdAttributeNS(null, Constants._ATT_ID, true); } else { this.constructionElement.removeAttributeNS(null, Constants._ATT_ID); } } /** * Returns the Id attribute * * @return the Id attribute */ public String getId() { return this.constructionElement.getAttributeNS(null, Constants._ATT_ID); } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_DERENCODEDKEYVALUE; } /** * Method getPublicKey * * @return the public key * @throws XMLSecurityException */ public PublicKey getPublicKey() throws XMLSecurityException { byte[] encodedKey = getBytesFromTextChild(); // Iterate over the supported key types until one produces a public key. for (String keyType : supportedKeyTypes) { try { KeyFactory keyFactory = KeyFactory.getInstance(keyType); X509EncodedKeySpec keySpec = new X509EncodedKeySpec(encodedKey); PublicKey publicKey = keyFactory.generatePublic(keySpec); if (publicKey != null) { return publicKey; } } catch (NoSuchAlgorithmException e) { // Do nothing, try the next type } catch (InvalidKeySpecException e) { // Do nothing, try the next type } } throw new XMLSecurityException("DEREncodedKeyValue.UnsupportedEncodedKey"); } /** * Method getEncodedDER * * @return the public key * @throws XMLSecurityException */ protected byte[] getEncodedDER(PublicKey publicKey) throws XMLSecurityException { try { KeyFactory keyFactory = KeyFactory.getInstance(publicKey.getAlgorithm()); X509EncodedKeySpec keySpec = keyFactory.getKeySpec(publicKey, X509EncodedKeySpec.class); return keySpec.getEncoded(); } catch (NoSuchAlgorithmException e) { Object exArgs[] = { publicKey.getAlgorithm(), publicKey.getFormat(), publicKey.getClass().getName() }; throw new XMLSecurityException("DEREncodedKeyValue.UnsupportedPublicKey", exArgs, e); } catch (InvalidKeySpecException e) { Object exArgs[] = { publicKey.getAlgorithm(), publicKey.getFormat(), publicKey.getClass().getName() }; throw new XMLSecurityException("DEREncodedKeyValue.UnsupportedPublicKey", exArgs, e); } } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/KeyInfoReference.java0000644000175000017500000000570212060430451032127 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.content; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.Signature11ElementProxy; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * Provides content model support for the dsig11:KeyInfoReference element. * * @author Brent Putman (putmanb@georgetown.edu) */ public class KeyInfoReference extends Signature11ElementProxy implements KeyInfoContent { /** * Constructor RetrievalMethod * * @param element * @param BaseURI * @throws XMLSecurityException */ public KeyInfoReference(Element element, String baseURI) throws XMLSecurityException { super(element, baseURI); } /** * Constructor RetrievalMethod * * @param doc * @param URI */ public KeyInfoReference(Document doc, String URI) { super(doc); this.constructionElement.setAttributeNS(null, Constants._ATT_URI, URI); } /** * Method getURIAttr * * @return the URI attribute */ public Attr getURIAttr() { return this.constructionElement.getAttributeNodeNS(null, Constants._ATT_URI); } /** * Method getURI * * @return URI string */ public String getURI() { return this.getURIAttr().getNodeValue(); } /** * Sets the Id attribute * * @param Id ID */ public void setId(String id) { if (id != null) { this.constructionElement.setAttributeNS(null, Constants._ATT_ID, id); this.constructionElement.setIdAttributeNS(null, Constants._ATT_ID, true); } else { this.constructionElement.removeAttributeNS(null, Constants._ATT_ID); } } /** * Returns the Id attribute * * @return the Id attribute */ public String getId() { return this.constructionElement.getAttributeNS(null, Constants._ATT_ID); } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_KEYINFOREFERENCE; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/KeyInfoContent.java0000644000175000017500000000176111553276262031662 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.content; /** * Empty interface just to identify Elements that can be children of ds:KeyInfo. * * @author $Author: coheigea $ */ public interface KeyInfoContent { } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/X509Data.java0000644000175000017500000003437212025634644030223 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.content; import java.math.BigInteger; import java.security.cert.X509Certificate; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.keys.content.x509.XMLX509CRL; import org.apache.xml.security.keys.content.x509.XMLX509Certificate; import org.apache.xml.security.keys.content.x509.XMLX509Digest; import org.apache.xml.security.keys.content.x509.XMLX509IssuerSerial; import org.apache.xml.security.keys.content.x509.XMLX509SKI; import org.apache.xml.security.keys.content.x509.XMLX509SubjectName; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.SignatureElementProxy; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; public class X509Data extends SignatureElementProxy implements KeyInfoContent { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(X509Data.class); /** * Constructor X509Data * * @param doc */ public X509Data(Document doc) { super(doc); XMLUtils.addReturnToElement(this.constructionElement); } /** * Constructor X509Data * * @param element * @param baseURI * @throws XMLSecurityException */ public X509Data(Element element, String baseURI) throws XMLSecurityException { super(element, baseURI); Node sibling = this.constructionElement.getFirstChild(); while (sibling != null) { if (sibling.getNodeType() != Node.ELEMENT_NODE) { sibling = sibling.getNextSibling(); continue; } return; } /* No Elements found */ Object exArgs[] = { "Elements", Constants._TAG_X509DATA }; throw new XMLSecurityException("xml.WrongContent", exArgs); } /** * Method addIssuerSerial * * @param X509IssuerName * @param X509SerialNumber */ public void addIssuerSerial(String X509IssuerName, BigInteger X509SerialNumber) { this.add(new XMLX509IssuerSerial(this.doc, X509IssuerName, X509SerialNumber)); } /** * Method addIssuerSerial * * @param X509IssuerName * @param X509SerialNumber */ public void addIssuerSerial(String X509IssuerName, String X509SerialNumber) { this.add(new XMLX509IssuerSerial(this.doc, X509IssuerName, X509SerialNumber)); } /** * Method addIssuerSerial * * @param X509IssuerName * @param X509SerialNumber */ public void addIssuerSerial(String X509IssuerName, int X509SerialNumber) { this.add(new XMLX509IssuerSerial(this.doc, X509IssuerName, X509SerialNumber)); } /** * Method add * * @param xmlX509IssuerSerial */ public void add(XMLX509IssuerSerial xmlX509IssuerSerial) { this.constructionElement.appendChild(xmlX509IssuerSerial.getElement()); XMLUtils.addReturnToElement(this.constructionElement); } /** * Method addSKI * * @param skiBytes */ public void addSKI(byte[] skiBytes) { this.add(new XMLX509SKI(this.doc, skiBytes)); } /** * Method addSKI * * @param x509certificate * @throws XMLSecurityException */ public void addSKI(X509Certificate x509certificate) throws XMLSecurityException { this.add(new XMLX509SKI(this.doc, x509certificate)); } /** * Method add * * @param xmlX509SKI */ public void add(XMLX509SKI xmlX509SKI) { this.constructionElement.appendChild(xmlX509SKI.getElement()); XMLUtils.addReturnToElement(this.constructionElement); } /** * Method addSubjectName * * @param subjectName */ public void addSubjectName(String subjectName) { this.add(new XMLX509SubjectName(this.doc, subjectName)); } /** * Method addSubjectName * * @param x509certificate */ public void addSubjectName(X509Certificate x509certificate) { this.add(new XMLX509SubjectName(this.doc, x509certificate)); } /** * Method add * * @param xmlX509SubjectName */ public void add(XMLX509SubjectName xmlX509SubjectName) { this.constructionElement.appendChild(xmlX509SubjectName.getElement()); XMLUtils.addReturnToElement(this.constructionElement); } /** * Method addCertificate * * @param x509certificate * @throws XMLSecurityException */ public void addCertificate(X509Certificate x509certificate) throws XMLSecurityException { this.add(new XMLX509Certificate(this.doc, x509certificate)); } /** * Method addCertificate * * @param x509certificateBytes */ public void addCertificate(byte[] x509certificateBytes) { this.add(new XMLX509Certificate(this.doc, x509certificateBytes)); } /** * Method add * * @param xmlX509Certificate */ public void add(XMLX509Certificate xmlX509Certificate) { this.constructionElement.appendChild(xmlX509Certificate.getElement()); XMLUtils.addReturnToElement(this.constructionElement); } /** * Method addCRL * * @param crlBytes */ public void addCRL(byte[] crlBytes) { this.add(new XMLX509CRL(this.doc, crlBytes)); } /** * Method add * * @param xmlX509CRL */ public void add(XMLX509CRL xmlX509CRL) { this.constructionElement.appendChild(xmlX509CRL.getElement()); XMLUtils.addReturnToElement(this.constructionElement); } /** * Method addDigest * * @param x509certificate * @param algorithmURI * @throws XMLSecurityException */ public void addDigest(X509Certificate x509certificate, String algorithmURI) throws XMLSecurityException { this.add(new XMLX509Digest(this.doc, x509certificate, algorithmURI)); } /** * Method addDigest * * @param x509CertificateDigestByes * @param algorithmURI */ public void addDigest(byte[] x509certificateDigestBytes, String algorithmURI) { this.add(new XMLX509Digest(this.doc, x509certificateDigestBytes, algorithmURI)); } /** * Method add * * @param XMLX509Digest */ public void add(XMLX509Digest xmlX509Digest) { this.constructionElement.appendChild(xmlX509Digest.getElement()); XMLUtils.addReturnToElement(this.constructionElement); } /** * Method addUnknownElement * * @param element */ public void addUnknownElement(Element element) { this.constructionElement.appendChild(element); XMLUtils.addReturnToElement(this.constructionElement); } /** * Method lengthIssuerSerial * * @return the number of IssuerSerial elements in this X509Data */ public int lengthIssuerSerial() { return this.length(Constants.SignatureSpecNS, Constants._TAG_X509ISSUERSERIAL); } /** * Method lengthSKI * * @return the number of SKI elements in this X509Data */ public int lengthSKI() { return this.length(Constants.SignatureSpecNS, Constants._TAG_X509SKI); } /** * Method lengthSubjectName * * @return the number of SubjectName elements in this X509Data */ public int lengthSubjectName() { return this.length(Constants.SignatureSpecNS, Constants._TAG_X509SUBJECTNAME); } /** * Method lengthCertificate * * @return the number of Certificate elements in this X509Data */ public int lengthCertificate() { return this.length(Constants.SignatureSpecNS, Constants._TAG_X509CERTIFICATE); } /** * Method lengthCRL * * @return the number of CRL elements in this X509Data */ public int lengthCRL() { return this.length(Constants.SignatureSpecNS, Constants._TAG_X509CRL); } /** * Method lengthDigest * * @return the number of X509Digest elements in this X509Data */ public int lengthDigest() { return this.length(Constants.SignatureSpec11NS, Constants._TAG_X509DIGEST); } /** * Method lengthUnknownElement * * @return the number of UnknownElement elements in this X509Data */ public int lengthUnknownElement() { int result = 0; Node n = this.constructionElement.getFirstChild(); while (n != null){ if ((n.getNodeType() == Node.ELEMENT_NODE) && !n.getNamespaceURI().equals(Constants.SignatureSpecNS)) { result++; } n = n.getNextSibling(); } return result; } /** * Method itemIssuerSerial * * @param i * @return the X509IssuerSerial, null if not present * @throws XMLSecurityException */ public XMLX509IssuerSerial itemIssuerSerial(int i) throws XMLSecurityException { Element e = XMLUtils.selectDsNode( this.constructionElement.getFirstChild(), Constants._TAG_X509ISSUERSERIAL, i); if (e != null) { return new XMLX509IssuerSerial(e, this.baseURI); } return null; } /** * Method itemSKI * * @param i * @return the X509SKI, null if not present * @throws XMLSecurityException */ public XMLX509SKI itemSKI(int i) throws XMLSecurityException { Element e = XMLUtils.selectDsNode( this.constructionElement.getFirstChild(), Constants._TAG_X509SKI, i); if (e != null) { return new XMLX509SKI(e, this.baseURI); } return null; } /** * Method itemSubjectName * * @param i * @return the X509SubjectName, null if not present * @throws XMLSecurityException */ public XMLX509SubjectName itemSubjectName(int i) throws XMLSecurityException { Element e = XMLUtils.selectDsNode( this.constructionElement.getFirstChild(), Constants._TAG_X509SUBJECTNAME, i); if (e != null) { return new XMLX509SubjectName(e, this.baseURI); } return null; } /** * Method itemCertificate * * @param i * @return the X509Certifacte, null if not present * @throws XMLSecurityException */ public XMLX509Certificate itemCertificate(int i) throws XMLSecurityException { Element e = XMLUtils.selectDsNode( this.constructionElement.getFirstChild(), Constants._TAG_X509CERTIFICATE, i); if (e != null) { return new XMLX509Certificate(e, this.baseURI); } return null; } /** * Method itemCRL * * @param i * @return the X509CRL, null if not present * @throws XMLSecurityException */ public XMLX509CRL itemCRL(int i) throws XMLSecurityException { Element e = XMLUtils.selectDsNode( this.constructionElement.getFirstChild(), Constants._TAG_X509CRL, i); if (e != null) { return new XMLX509CRL(e, this.baseURI); } return null; } /** * Method itemDigest * * @param i * @return the X509Digest, null if not present * @throws XMLSecurityException */ public XMLX509Digest itemDigest(int i) throws XMLSecurityException { Element e = XMLUtils.selectDs11Node( this.constructionElement.getFirstChild(), Constants._TAG_X509DIGEST, i); if (e != null) { return new XMLX509Digest(e, this.baseURI); } return null; } /** * Method itemUnknownElement * * @param i * @return the Unknown Element at i * TODO implement **/ public Element itemUnknownElement(int i) { if (log.isDebugEnabled()) { log.debug("itemUnknownElement not implemented:" + i); } return null; } /** * Method containsIssuerSerial * * @return true if this X509Data contains a IssuerSerial */ public boolean containsIssuerSerial() { return this.lengthIssuerSerial() > 0; } /** * Method containsSKI * * @return true if this X509Data contains a SKI */ public boolean containsSKI() { return this.lengthSKI() > 0; } /** * Method containsSubjectName * * @return true if this X509Data contains a SubjectName */ public boolean containsSubjectName() { return this.lengthSubjectName() > 0; } /** * Method containsCertificate * * @return true if this X509Data contains a Certificate */ public boolean containsCertificate() { return this.lengthCertificate() > 0; } /** * Method containsDigest * * @return true if this X509Data contains an X509Digest */ public boolean containsDigest() { return this.lengthDigest() > 0; } /** * Method containsCRL * * @return true if this X509Data contains a CRL */ public boolean containsCRL() { return this.lengthCRL() > 0; } /** * Method containsUnknownElement * * @return true if this X509Data contains an UnknownElement */ public boolean containsUnknownElement() { return this.lengthUnknownElement() > 0; } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_X509DATA; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/MgmtData.java0000644000175000017500000000363111553276262030457 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.content; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.SignatureElementProxy; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * @author $Author: coheigea $ */ public class MgmtData extends SignatureElementProxy implements KeyInfoContent { /** * Constructor MgmtData * * @param element * @param BaseURI * @throws XMLSecurityException */ public MgmtData(Element element, String BaseURI) throws XMLSecurityException { super(element, BaseURI); } /** * Constructor MgmtData * * @param doc * @param mgmtData */ public MgmtData(Document doc, String mgmtData) { super(doc); this.addText(mgmtData); } /** * Method getMgmtData * * @return the managment data */ public String getMgmtData() { return this.getTextFromTextChild(); } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_MGMTDATA; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/x509/0000755000175000017500000000000012273503734026615 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/x509/package.html0000644000175000017500000000017307533712503031076 0ustar tonytony

basic handlers for elements that can occur inside ds:X509Data.

././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/x509/XMLX509SubjectName.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/x509/XMLX509SubjectNam0000644000175000017500000000562712005760702031545 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.content.x509; import java.security.cert.X509Certificate; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.RFC2253Parser; import org.apache.xml.security.utils.SignatureElementProxy; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * @author $Author: coheigea $ */ public class XMLX509SubjectName extends SignatureElementProxy implements XMLX509DataContent { /** * Constructor X509SubjectName * * @param element * @param BaseURI * @throws XMLSecurityException */ public XMLX509SubjectName(Element element, String BaseURI) throws XMLSecurityException { super(element, BaseURI); } /** * Constructor X509SubjectName * * @param doc * @param X509SubjectNameString */ public XMLX509SubjectName(Document doc, String X509SubjectNameString) { super(doc); this.addText(X509SubjectNameString); } /** * Constructor XMLX509SubjectName * * @param doc * @param x509certificate */ public XMLX509SubjectName(Document doc, X509Certificate x509certificate) { this(doc, x509certificate.getSubjectX500Principal().getName()); } /** * Method getSubjectName * * * @return the subject name */ public String getSubjectName() { return RFC2253Parser.normalize(this.getTextFromTextChild()); } /** @inheritDoc */ public boolean equals(Object obj) { if (!(obj instanceof XMLX509SubjectName)) { return false; } XMLX509SubjectName other = (XMLX509SubjectName) obj; String otherSubject = other.getSubjectName(); String thisSubject = this.getSubjectName(); return thisSubject.equals(otherSubject); } public int hashCode() { int result = 17; result = 31 * result + this.getSubjectName().hashCode(); return result; } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_X509SUBJECTNAME; } } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/x509/XMLX509DataContent.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/x509/XMLX509DataConten0000644000175000017500000000177211553276262031541 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.content.x509; /** * Just used for tagging contents that are allowed inside a ds:X509Data Element. * * @author $Author: coheigea $ */ public interface XMLX509DataContent { } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/x509/XMLX509Digest.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/x509/XMLX509Digest.jav0000644000175000017500000001030512060430451031471 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.content.x509; import java.security.MessageDigest; import java.security.cert.X509Certificate; import org.apache.xml.security.algorithms.JCEMapper; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.Signature11ElementProxy; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * Provides content model support for the dsig11:X509Digest element. * * @author Brent Putman (putmanb@georgetown.edu) */ public class XMLX509Digest extends Signature11ElementProxy implements XMLX509DataContent { /** * Constructor XMLX509Digest * * @param element * @param BaseURI * @throws XMLSecurityException */ public XMLX509Digest(Element element, String BaseURI) throws XMLSecurityException { super(element, BaseURI); } /** * Constructor XMLX509Digest * * @param doc * @param digestBytes * @param algorithmURI */ public XMLX509Digest(Document doc, byte[] digestBytes, String algorithmURI) { super(doc); this.addBase64Text(digestBytes); this.constructionElement.setAttributeNS(null, Constants._ATT_ALGORITHM, algorithmURI); } /** * Constructor XMLX509Digest * * @param doc * @param x509certificate * @param algorithmURI * @throws XMLSecurityException */ public XMLX509Digest(Document doc, X509Certificate x509certificate, String algorithmURI) throws XMLSecurityException { super(doc); this.addBase64Text(getDigestBytesFromCert(x509certificate, algorithmURI)); this.constructionElement.setAttributeNS(null, Constants._ATT_ALGORITHM, algorithmURI); } /** * Method getAlgorithmAttr * * @return the Algorithm attribute */ public Attr getAlgorithmAttr() { return this.constructionElement.getAttributeNodeNS(null, Constants._ATT_ALGORITHM); } /** * Method getAlgorithm * * @return Algorithm string */ public String getAlgorithm() { return this.getAlgorithmAttr().getNodeValue(); } /** * Method getDigestBytes * * @return the digestbytes * @throws XMLSecurityException */ public byte[] getDigestBytes() throws XMLSecurityException { return this.getBytesFromTextChild(); } /** * Method getDigestBytesFromCert * * @param cert * @param algorithmURI * @return digest bytes from the given certificate * * @throws XMLSecurityException */ public static byte[] getDigestBytesFromCert(X509Certificate cert, String algorithmURI) throws XMLSecurityException { String jcaDigestAlgorithm = JCEMapper.translateURItoJCEID(algorithmURI); if (jcaDigestAlgorithm == null) { Object exArgs[] = { algorithmURI }; throw new XMLSecurityException("XMLX509Digest.UnknownDigestAlgorithm", exArgs); } try { MessageDigest md = MessageDigest.getInstance(jcaDigestAlgorithm); return md.digest(cert.getEncoded()); } catch (Exception e) { Object exArgs[] = { jcaDigestAlgorithm }; throw new XMLSecurityException("XMLX509Digest.FailedDigest", exArgs); } } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_X509DIGEST; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/x509/XMLX509SKI.java0000644000175000017500000001305711561742421031060 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.content.x509; import java.security.cert.X509Certificate; import java.util.Arrays; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.utils.Base64; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.SignatureElementProxy; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * Handles SubjectKeyIdentifier (SKI) for X.509v3. * * @see * Interface X509Extension */ public class XMLX509SKI extends SignatureElementProxy implements XMLX509DataContent { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(XMLX509SKI.class); /** * SubjectKeyIdentifier (id-ce-subjectKeyIdentifier) (2.5.29.14): * This extension identifies the public key being certified. It enables * distinct keys used by the same subject to be differentiated * (e.g., as key updating occurs). *
* A key identifier shall be unique with respect to all key identifiers * for the subject with which it is used. This extension is always non-critical. */ public static final String SKI_OID = "2.5.29.14"; /** * Constructor X509SKI * * @param doc * @param skiBytes */ public XMLX509SKI(Document doc, byte[] skiBytes) { super(doc); this.addBase64Text(skiBytes); } /** * Constructor XMLX509SKI * * @param doc * @param x509certificate * @throws XMLSecurityException */ public XMLX509SKI(Document doc, X509Certificate x509certificate) throws XMLSecurityException { super(doc); this.addBase64Text(XMLX509SKI.getSKIBytesFromCert(x509certificate)); } /** * Constructor XMLX509SKI * * @param element * @param BaseURI * @throws XMLSecurityException */ public XMLX509SKI(Element element, String BaseURI) throws XMLSecurityException { super(element, BaseURI); } /** * Method getSKIBytes * * @return the skibytes * @throws XMLSecurityException */ public byte[] getSKIBytes() throws XMLSecurityException { return this.getBytesFromTextChild(); } /** * Method getSKIBytesFromCert * * @param cert * @return ski bytes from the given certificate * * @throws XMLSecurityException * @see java.security.cert.X509Extension#getExtensionValue(java.lang.String) */ public static byte[] getSKIBytesFromCert(X509Certificate cert) throws XMLSecurityException { if (cert.getVersion() < 3) { Object exArgs[] = { Integer.valueOf(cert.getVersion()) }; throw new XMLSecurityException("certificate.noSki.lowVersion", exArgs); } /* * Gets the DER-encoded OCTET string for the extension value * (extnValue) identified by the passed-in oid String. The oid * string is represented by a set of positive whole numbers * separated by periods. */ byte[] extensionValue = cert.getExtensionValue(XMLX509SKI.SKI_OID); if (extensionValue == null) { throw new XMLSecurityException("certificate.noSki.null"); } /** * Strip away first four bytes from the extensionValue * The first two bytes are the tag and length of the extensionValue * OCTET STRING, and the next two bytes are the tag and length of * the ski OCTET STRING. */ byte skidValue[] = new byte[extensionValue.length - 4]; System.arraycopy(extensionValue, 4, skidValue, 0, skidValue.length); if (log.isDebugEnabled()) { log.debug("Base64 of SKI is " + Base64.encode(skidValue)); } return skidValue; } /** @inheritDoc */ public boolean equals(Object obj) { if (!(obj instanceof XMLX509SKI)) { return false; } XMLX509SKI other = (XMLX509SKI) obj; try { return Arrays.equals(other.getSKIBytes(), this.getSKIBytes()); } catch (XMLSecurityException ex) { return false; } } public int hashCode() { int result = 17; try { byte[] bytes = getSKIBytes(); for (int i = 0; i < bytes.length; i++) { result = 31 * result + bytes[i]; } } catch (XMLSecurityException e) { if (log.isDebugEnabled()) { log.debug(e); } } return result; } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_X509SKI; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/x509/XMLX509CRL.java0000644000175000017500000000367311553276262031063 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.content.x509; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.SignatureElementProxy; import org.w3c.dom.Document; import org.w3c.dom.Element; public class XMLX509CRL extends SignatureElementProxy implements XMLX509DataContent { /** * Constructor XMLX509CRL * * @param element * @param BaseURI * @throws XMLSecurityException */ public XMLX509CRL(Element element, String BaseURI) throws XMLSecurityException { super(element, BaseURI); } /** * Constructor X509CRL * * @param doc * @param crlBytes */ public XMLX509CRL(Document doc, byte[] crlBytes) { super(doc); this.addBase64Text(crlBytes); } /** * Method getCRLBytes * * @return the CRL bytes * @throws XMLSecurityException */ public byte[] getCRLBytes() throws XMLSecurityException { return this.getBytesFromTextChild(); } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_X509CRL; } } ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/x509/XMLX509IssuerSerial.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/x509/XMLX509IssuerSeri0000644000175000017500000001140312005760702031574 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.content.x509; import java.math.BigInteger; import java.security.cert.X509Certificate; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.RFC2253Parser; import org.apache.xml.security.utils.SignatureElementProxy; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; public class XMLX509IssuerSerial extends SignatureElementProxy implements XMLX509DataContent { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(XMLX509IssuerSerial.class); /** * Constructor XMLX509IssuerSerial * * @param element * @param baseURI * @throws XMLSecurityException */ public XMLX509IssuerSerial(Element element, String baseURI) throws XMLSecurityException { super(element, baseURI); } /** * Constructor XMLX509IssuerSerial * * @param doc * @param x509IssuerName * @param x509SerialNumber */ public XMLX509IssuerSerial(Document doc, String x509IssuerName, BigInteger x509SerialNumber) { super(doc); XMLUtils.addReturnToElement(this.constructionElement); addTextElement(x509IssuerName, Constants._TAG_X509ISSUERNAME); addTextElement(x509SerialNumber.toString(), Constants._TAG_X509SERIALNUMBER); } /** * Constructor XMLX509IssuerSerial * * @param doc * @param x509IssuerName * @param x509SerialNumber */ public XMLX509IssuerSerial(Document doc, String x509IssuerName, String x509SerialNumber) { this(doc, x509IssuerName, new BigInteger(x509SerialNumber)); } /** * Constructor XMLX509IssuerSerial * * @param doc * @param x509IssuerName * @param x509SerialNumber */ public XMLX509IssuerSerial(Document doc, String x509IssuerName, int x509SerialNumber) { this(doc, x509IssuerName, new BigInteger(Integer.toString(x509SerialNumber))); } /** * Constructor XMLX509IssuerSerial * * @param doc * @param x509certificate */ public XMLX509IssuerSerial(Document doc, X509Certificate x509certificate) { this( doc, x509certificate.getIssuerX500Principal().getName(), x509certificate.getSerialNumber() ); } /** * Method getSerialNumber * * @return the serial number */ public BigInteger getSerialNumber() { String text = this.getTextFromChildElement(Constants._TAG_X509SERIALNUMBER, Constants.SignatureSpecNS); if (log.isDebugEnabled()) { log.debug("X509SerialNumber text: " + text); } return new BigInteger(text); } /** * Method getSerialNumberInteger * * @return the serial number as plain int */ public int getSerialNumberInteger() { return this.getSerialNumber().intValue(); } /** * Method getIssuerName * * @return the issuer name */ public String getIssuerName() { return RFC2253Parser.normalize( this.getTextFromChildElement(Constants._TAG_X509ISSUERNAME, Constants.SignatureSpecNS) ); } /** @inheritDoc */ public boolean equals(Object obj) { if (!(obj instanceof XMLX509IssuerSerial)) { return false; } XMLX509IssuerSerial other = (XMLX509IssuerSerial) obj; return this.getSerialNumber().equals(other.getSerialNumber()) && this.getIssuerName().equals(other.getIssuerName()); } public int hashCode() { int result = 17; result = 31 * result + getSerialNumber().hashCode(); result = 31 * result + getIssuerName().hashCode(); return result; } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_X509ISSUERSERIAL; } } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/x509/XMLX509Certificate.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/x509/XMLX509Certificat0000644000175000017500000001134411561742421031564 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.content.x509; import java.io.ByteArrayInputStream; import java.security.PublicKey; import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import java.util.Arrays; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.SignatureElementProxy; import org.w3c.dom.Document; import org.w3c.dom.Element; public class XMLX509Certificate extends SignatureElementProxy implements XMLX509DataContent { /** Field JCA_CERT_ID */ public static final String JCA_CERT_ID = "X.509"; /** * Constructor X509Certificate * * @param element * @param BaseURI * @throws XMLSecurityException */ public XMLX509Certificate(Element element, String BaseURI) throws XMLSecurityException { super(element, BaseURI); } /** * Constructor X509Certificate * * @param doc * @param certificateBytes */ public XMLX509Certificate(Document doc, byte[] certificateBytes) { super(doc); this.addBase64Text(certificateBytes); } /** * Constructor XMLX509Certificate * * @param doc * @param x509certificate * @throws XMLSecurityException */ public XMLX509Certificate(Document doc, X509Certificate x509certificate) throws XMLSecurityException { super(doc); try { this.addBase64Text(x509certificate.getEncoded()); } catch (java.security.cert.CertificateEncodingException ex) { throw new XMLSecurityException("empty", ex); } } /** * Method getCertificateBytes * * @return the certificate bytes * @throws XMLSecurityException */ public byte[] getCertificateBytes() throws XMLSecurityException { return this.getBytesFromTextChild(); } /** * Method getX509Certificate * * @return the x509 certificate * @throws XMLSecurityException */ public X509Certificate getX509Certificate() throws XMLSecurityException { try { byte certbytes[] = this.getCertificateBytes(); CertificateFactory certFact = CertificateFactory.getInstance(XMLX509Certificate.JCA_CERT_ID); X509Certificate cert = (X509Certificate) certFact.generateCertificate( new ByteArrayInputStream(certbytes) ); if (cert != null) { return cert; } return null; } catch (CertificateException ex) { throw new XMLSecurityException("empty", ex); } } /** * Method getPublicKey * * @return the publickey * @throws XMLSecurityException */ public PublicKey getPublicKey() throws XMLSecurityException { X509Certificate cert = this.getX509Certificate(); if (cert != null) { return cert.getPublicKey(); } return null; } /** @inheritDoc */ public boolean equals(Object obj) { if (!(obj instanceof XMLX509Certificate)) { return false; } XMLX509Certificate other = (XMLX509Certificate) obj; try { return Arrays.equals(other.getCertificateBytes(), this.getCertificateBytes()); } catch (XMLSecurityException ex) { return false; } } public int hashCode() { int result = 17; try { byte[] bytes = getCertificateBytes(); for (int i = 0; i < bytes.length; i++) { result = 31 * result + bytes[i]; } } catch (XMLSecurityException e) { if (log.isDebugEnabled()) { log.debug(e); } } return result; } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_X509CERTIFICATE; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/KeyName.java0000644000175000017500000000357411553276262030320 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.content; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.SignatureElementProxy; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * @author $Author: coheigea $ */ public class KeyName extends SignatureElementProxy implements KeyInfoContent { /** * Constructor KeyName * * @param element * @param BaseURI * @throws XMLSecurityException */ public KeyName(Element element, String BaseURI) throws XMLSecurityException { super(element, BaseURI); } /** * Constructor KeyName * * @param doc * @param keyName */ public KeyName(Document doc, String keyName) { super(doc); this.addText(keyName); } /** * Method getKeyName * * @return key name */ public String getKeyName() { return this.getTextFromTextChild(); } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_KEYNAME; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/RetrievalMethod.java0000644000175000017500000001036711553276262032063 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.content; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.signature.XMLSignatureException; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.SignatureElementProxy; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; public class RetrievalMethod extends SignatureElementProxy implements KeyInfoContent { /** DSA retrieval */ public static final String TYPE_DSA = Constants.SignatureSpecNS + "DSAKeyValue"; /** RSA retrieval */ public static final String TYPE_RSA = Constants.SignatureSpecNS + "RSAKeyValue"; /** PGP retrieval */ public static final String TYPE_PGP = Constants.SignatureSpecNS + "PGPData"; /** SPKI retrieval */ public static final String TYPE_SPKI = Constants.SignatureSpecNS + "SPKIData"; /** MGMT retrieval */ public static final String TYPE_MGMT = Constants.SignatureSpecNS + "MgmtData"; /** X509 retrieval */ public static final String TYPE_X509 = Constants.SignatureSpecNS + "X509Data"; /** RAWX509 retrieval */ public static final String TYPE_RAWX509 = Constants.SignatureSpecNS + "rawX509Certificate"; /** * Constructor RetrievalMethod * * @param element * @param BaseURI * @throws XMLSecurityException */ public RetrievalMethod(Element element, String BaseURI) throws XMLSecurityException { super(element, BaseURI); } /** * Constructor RetrievalMethod * * @param doc * @param URI * @param transforms * @param Type */ public RetrievalMethod(Document doc, String URI, Transforms transforms, String Type) { super(doc); this.constructionElement.setAttributeNS(null, Constants._ATT_URI, URI); if (Type != null) { this.constructionElement.setAttributeNS(null, Constants._ATT_TYPE, Type); } if (transforms != null) { this.constructionElement.appendChild(transforms.getElement()); XMLUtils.addReturnToElement(this.constructionElement); } } /** * Method getURIAttr * * @return the URI attribute */ public Attr getURIAttr() { return this.constructionElement.getAttributeNodeNS(null, Constants._ATT_URI); } /** * Method getURI * * @return URI string */ public String getURI() { return this.getURIAttr().getNodeValue(); } /** @return the type*/ public String getType() { return this.constructionElement.getAttributeNS(null, Constants._ATT_TYPE); } /** * Method getTransforms * * @throws XMLSecurityException * @return the transformations */ public Transforms getTransforms() throws XMLSecurityException { try { Element transformsElem = XMLUtils.selectDsNode( this.constructionElement.getFirstChild(), Constants._TAG_TRANSFORMS, 0); if (transformsElem != null) { return new Transforms(transformsElem, this.baseURI); } return null; } catch (XMLSignatureException ex) { throw new XMLSecurityException("empty", ex); } } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_RETRIEVALMETHOD; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/content/SPKIData.java0000644000175000017500000000303311553276262030315 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.content; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.SignatureElementProxy; import org.w3c.dom.Element; /** * @author $Author: coheigea $ * $todo$ implement */ public class SPKIData extends SignatureElementProxy implements KeyInfoContent { /** * Constructor SPKIData * * @param element * @param BaseURI * @throws XMLSecurityException */ public SPKIData(Element element, String BaseURI) throws XMLSecurityException { super(element, BaseURI); } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_SPKIDATA; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/storage/0000755000175000017500000000000012273503734026102 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/storage/package.html0000644000175000017500000000020407533712503030356 0ustar tonytony

a resolver framework for certificates and public keys from user-specified locations.

libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/storage/StorageResolver.java0000644000175000017500000001210511555512724032073 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.storage; import java.security.KeyStore; import java.security.cert.Certificate; import java.security.cert.X509Certificate; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.NoSuchElementException; import org.apache.xml.security.keys.storage.implementations.KeyStoreResolver; import org.apache.xml.security.keys.storage.implementations.SingleCertificateResolver; /** * This class collects customized resolvers for Certificates. */ public class StorageResolver { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(StorageResolver.class); /** Field storageResolvers */ private List storageResolvers = null; /** * Constructor StorageResolver * */ public StorageResolver() {} /** * Constructor StorageResolver * * @param resolver */ public StorageResolver(StorageResolverSpi resolver) { this.add(resolver); } /** * Method addResolver * * @param resolver */ public void add(StorageResolverSpi resolver) { if (storageResolvers == null) { storageResolvers = new ArrayList(); } this.storageResolvers.add(resolver); } /** * Constructor StorageResolver * * @param keyStore */ public StorageResolver(KeyStore keyStore) { this.add(keyStore); } /** * Method addKeyStore * * @param keyStore */ public void add(KeyStore keyStore) { try { this.add(new KeyStoreResolver(keyStore)); } catch (StorageResolverException ex) { log.error("Could not add KeyStore because of: ", ex); } } /** * Constructor StorageResolver * * @param x509certificate */ public StorageResolver(X509Certificate x509certificate) { this.add(x509certificate); } /** * Method addCertificate * * @param x509certificate */ public void add(X509Certificate x509certificate) { this.add(new SingleCertificateResolver(x509certificate)); } /** * Method getIterator * @return the iterator for the resolvers. */ public Iterator getIterator() { return new StorageResolverIterator(this.storageResolvers.iterator()); } /** * Class StorageResolverIterator * This iterates over all the Certificates found in all the resolvers. */ static class StorageResolverIterator implements Iterator { /** Field resolvers */ Iterator resolvers = null; /** Field currentResolver */ Iterator currentResolver = null; /** * Constructor StorageResolverIterator * * @param resolvers */ public StorageResolverIterator(Iterator resolvers) { this.resolvers = resolvers; currentResolver = findNextResolver(); } /** @inheritDoc */ public boolean hasNext() { if (currentResolver == null) { return false; } if (currentResolver.hasNext()) { return true; } currentResolver = findNextResolver(); return (currentResolver != null); } /** @inheritDoc */ public Certificate next() { if (hasNext()) { return currentResolver.next(); } throw new NoSuchElementException(); } /** * Method remove */ public void remove() { throw new UnsupportedOperationException("Can't remove keys from KeyStore"); } // Find the next storage with at least one element and return its Iterator private Iterator findNextResolver() { while (resolvers.hasNext()) { StorageResolverSpi resolverSpi = resolvers.next(); Iterator iter = resolverSpi.getIterator(); if (iter.hasNext()) { return iter; } } return null; } } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/storage/implementations/0000755000175000017500000000000012273503734031312 5ustar tonytony././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/storage/implementations/package.htmllibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/storage/implementations/packag0000644000175000017500000000023207533712503032457 0ustar tonytony

implementations of resolvers for retrieval for certificates and public keys from user-specified locations.

././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/storage/implementations/KeyStoreResolver.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/storage/implementations/KeySto0000644000175000017500000001100311555512724032447 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.storage.implementations; import java.security.KeyStore; import java.security.KeyStoreException; import java.security.cert.Certificate; import java.util.Enumeration; import java.util.Iterator; import java.util.NoSuchElementException; import org.apache.xml.security.keys.storage.StorageResolverException; import org.apache.xml.security.keys.storage.StorageResolverSpi; /** * Makes the Certificates from a JAVA {@link KeyStore} object available to the * {@link org.apache.xml.security.keys.storage.StorageResolver}. */ public class KeyStoreResolver extends StorageResolverSpi { /** Field keyStore */ private KeyStore keyStore = null; /** * Constructor KeyStoreResolver * * @param keyStore is the keystore which contains the Certificates * @throws StorageResolverException */ public KeyStoreResolver(KeyStore keyStore) throws StorageResolverException { this.keyStore = keyStore; // Do a quick check on the keystore try { keyStore.aliases(); } catch (KeyStoreException ex) { throw new StorageResolverException("generic.EmptyMessage", ex); } } /** @inheritDoc */ public Iterator getIterator() { return new KeyStoreIterator(this.keyStore); } /** * Class KeyStoreIterator */ static class KeyStoreIterator implements Iterator { /** Field keyStore */ KeyStore keyStore = null; /** Field aliases */ Enumeration aliases = null; /** Field nextCert */ Certificate nextCert = null; /** * Constructor KeyStoreIterator * * @param keyStore */ public KeyStoreIterator(KeyStore keyStore) { try { this.keyStore = keyStore; this.aliases = this.keyStore.aliases(); } catch (KeyStoreException ex) { // empty Enumeration this.aliases = new Enumeration() { public boolean hasMoreElements() { return false; } public String nextElement() { return null; } }; } } /** @inheritDoc */ public boolean hasNext() { if (nextCert == null) { nextCert = findNextCert(); } return (nextCert != null); } /** @inheritDoc */ public Certificate next() { if (nextCert == null) { // maybe caller did not call hasNext() nextCert = findNextCert(); if (nextCert == null) { throw new NoSuchElementException(); } } Certificate ret = nextCert; nextCert = null; return ret; } /** * Method remove */ public void remove() { throw new UnsupportedOperationException("Can't remove keys from KeyStore"); } // Find the next entry that contains a certificate and return it. // In particular, this skips over entries containing symmetric keys. private Certificate findNextCert() { while (this.aliases.hasMoreElements()) { String alias = this.aliases.nextElement(); try { Certificate cert = this.keyStore.getCertificate(alias); if (cert != null) { return cert; } } catch (KeyStoreException ex) { return null; } } return null; } } } ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/storage/implementations/SingleCertificateResolver.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/storage/implementations/Single0000644000175000017500000000530411555512724032461 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.storage.implementations; import java.security.cert.Certificate; import java.security.cert.X509Certificate; import java.util.Iterator; import java.util.NoSuchElementException; import org.apache.xml.security.keys.storage.StorageResolverSpi; /** * This {@link StorageResolverSpi} makes a single {@link X509Certificate} * available to the {@link org.apache.xml.security.keys.storage.StorageResolver}. */ public class SingleCertificateResolver extends StorageResolverSpi { /** Field certificate */ private X509Certificate certificate = null; /** * @param x509cert the single {@link X509Certificate} */ public SingleCertificateResolver(X509Certificate x509cert) { this.certificate = x509cert; } /** @inheritDoc */ public Iterator getIterator() { return new InternalIterator(this.certificate); } /** * Class InternalIterator */ static class InternalIterator implements Iterator { /** Field alreadyReturned */ boolean alreadyReturned = false; /** Field certificate */ X509Certificate certificate = null; /** * Constructor InternalIterator * * @param x509cert */ public InternalIterator(X509Certificate x509cert) { this.certificate = x509cert; } /** @inheritDoc */ public boolean hasNext() { return !this.alreadyReturned; } /** @inheritDoc */ public Certificate next() { if (this.alreadyReturned) { throw new NoSuchElementException(); } this.alreadyReturned = true; return this.certificate; } /** * Method remove */ public void remove() { throw new UnsupportedOperationException("Can't remove keys from KeyStore"); } } } ././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/storage/implementations/CertsInFilesystemDirectoryResolver.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/storage/implementations/CertsI0000644000175000017500000001701212005760702032420 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.storage.implementations; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.security.cert.Certificate; import java.security.cert.CertificateException; import java.security.cert.CertificateExpiredException; import java.security.cert.CertificateFactory; import java.security.cert.CertificateNotYetValidException; import java.security.cert.X509Certificate; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.apache.xml.security.keys.storage.StorageResolverException; import org.apache.xml.security.keys.storage.StorageResolverSpi; import org.apache.xml.security.utils.Base64; /** * This {@link StorageResolverSpi} makes all raw (binary) {@link X509Certificate}s * which reside as files in a single directory available to the * {@link org.apache.xml.security.keys.storage.StorageResolver}. */ public class CertsInFilesystemDirectoryResolver extends StorageResolverSpi { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog( CertsInFilesystemDirectoryResolver.class ); /** Field merlinsCertificatesDir */ private String merlinsCertificatesDir = null; /** Field certs */ private List certs = new ArrayList(); /** * @param directoryName * @throws StorageResolverException */ public CertsInFilesystemDirectoryResolver(String directoryName) throws StorageResolverException { this.merlinsCertificatesDir = directoryName; this.readCertsFromHarddrive(); } /** * Method readCertsFromHarddrive * * @throws StorageResolverException */ private void readCertsFromHarddrive() throws StorageResolverException { File certDir = new File(this.merlinsCertificatesDir); List al = new ArrayList(); String[] names = certDir.list(); for (int i = 0; i < names.length; i++) { String currentFileName = names[i]; if (currentFileName.endsWith(".crt")) { al.add(names[i]); } } CertificateFactory cf = null; try { cf = CertificateFactory.getInstance("X.509"); } catch (CertificateException ex) { throw new StorageResolverException("empty", ex); } if (cf == null) { throw new StorageResolverException("empty"); } for (int i = 0; i < al.size(); i++) { String filename = certDir.getAbsolutePath() + File.separator + (String) al.get(i); File file = new File(filename); boolean added = false; String dn = null; FileInputStream fis = null; try { fis = new FileInputStream(file); X509Certificate cert = (X509Certificate) cf.generateCertificate(fis); //add to ArrayList cert.checkValidity(); this.certs.add(cert); dn = cert.getSubjectX500Principal().getName(); added = true; } catch (FileNotFoundException ex) { if (log.isDebugEnabled()) { log.debug("Could not add certificate from file " + filename, ex); } } catch (CertificateNotYetValidException ex) { if (log.isDebugEnabled()) { log.debug("Could not add certificate from file " + filename, ex); } } catch (CertificateExpiredException ex) { if (log.isDebugEnabled()) { log.debug("Could not add certificate from file " + filename, ex); } } catch (CertificateException ex) { if (log.isDebugEnabled()) { log.debug("Could not add certificate from file " + filename, ex); } } finally { try { if (fis != null) { fis.close(); } } catch (IOException ex) { if (log.isDebugEnabled()) { log.debug("Could not add certificate from file " + filename, ex); } } } if (added && log.isDebugEnabled()) { log.debug("Added certificate: " + dn); } } } /** @inheritDoc */ public Iterator getIterator() { return new FilesystemIterator(this.certs); } /** * Class FilesystemIterator */ private static class FilesystemIterator implements Iterator { /** Field certs */ List certs = null; /** Field i */ int i; /** * Constructor FilesystemIterator * * @param certs */ public FilesystemIterator(List certs) { this.certs = certs; this.i = 0; } /** @inheritDoc */ public boolean hasNext() { return (this.i < this.certs.size()); } /** @inheritDoc */ public Certificate next() { return this.certs.get(this.i++); } /** * Method remove * */ public void remove() { throw new UnsupportedOperationException("Can't remove keys from KeyStore"); } } /** * Method main * * @param unused * @throws Exception */ public static void main(String unused[]) throws Exception { CertsInFilesystemDirectoryResolver krs = new CertsInFilesystemDirectoryResolver( "data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/certs"); for (Iterator i = krs.getIterator(); i.hasNext(); ) { X509Certificate cert = (X509Certificate) i.next(); byte[] ski = org.apache.xml.security.keys.content.x509.XMLX509SKI.getSKIBytesFromCert(cert); System.out.println(); System.out.println("Base64(SKI())= \"" + Base64.encode(ski) + "\""); System.out.println("cert.getSerialNumber()= \"" + cert.getSerialNumber().toString() + "\""); System.out.println("cert.getSubjectX500Principal().getName()= \"" + cert.getSubjectX500Principal().getName() + "\""); System.out.println("cert.getIssuerX500Principal().getName()= \"" + cert.getIssuerX500Principal().getName() + "\""); } } } ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/storage/StorageResolverException.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/storage/StorageResolverExcepti0000644000175000017500000000415411555512724032502 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.storage; import org.apache.xml.security.exceptions.XMLSecurityException; public class StorageResolverException extends XMLSecurityException { /** * */ private static final long serialVersionUID = 1L; /** * Constructor StorageResolverException * */ public StorageResolverException() { super(); } /** * Constructor StorageResolverException * * @param msgID */ public StorageResolverException(String msgID) { super(msgID); } /** * Constructor StorageResolverException * * @param msgID * @param exArgs */ public StorageResolverException(String msgID, Object exArgs[]) { super(msgID, exArgs); } /** * Constructor StorageResolverException * * @param msgID * @param originalException */ public StorageResolverException(String msgID, Exception originalException) { super(msgID, originalException); } /** * Constructor StorageResolverException * * @param msgID * @param exArgs * @param originalException */ public StorageResolverException(String msgID, Object exArgs[], Exception originalException) { super(msgID, exArgs, originalException); } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/storage/StorageResolverSpi.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/storage/StorageResolverSpi.jav0000644000175000017500000000213111555512724032404 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys.storage; import java.security.cert.Certificate; import java.util.Iterator; public abstract class StorageResolverSpi { /** * Method getIterator * * @return the iterator for the storage */ public abstract Iterator getIterator(); } ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/ContentHandlerAlreadyRegisteredException.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/keys/ContentHandlerAlreadyRegistere0000644000175000017500000000440211553276262032450 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.keys; import org.apache.xml.security.exceptions.XMLSecurityException; public class ContentHandlerAlreadyRegisteredException extends XMLSecurityException { /** * */ private static final long serialVersionUID = 1L; /** * Constructor ContentHandlerAlreadyRegisteredException * */ public ContentHandlerAlreadyRegisteredException() { super(); } /** * Constructor ContentHandlerAlreadyRegisteredException * * @param msgID */ public ContentHandlerAlreadyRegisteredException(String msgID) { super(msgID); } /** * Constructor ContentHandlerAlreadyRegisteredException * * @param msgID * @param exArgs */ public ContentHandlerAlreadyRegisteredException(String msgID, Object exArgs[]) { super(msgID, exArgs); } /** * Constructor ContentHandlerAlreadyRegisteredException * * @param msgID * @param originalException */ public ContentHandlerAlreadyRegisteredException(String msgID, Exception originalException) { super(msgID, originalException); } /** * Constructor ContentHandlerAlreadyRegisteredException * * @param msgID * @param exArgs * @param originalException */ public ContentHandlerAlreadyRegisteredException( String msgID, Object exArgs[], Exception originalException ) { super(msgID, exArgs, originalException); } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/0000755000175000017500000000000012273503734024230 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/package.html0000644000175000017500000000014207533712503026505 0ustar tonytony

Canonicalization related material and algorithms.

libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/CanonicalizerSpi.java0000644000175000017500000001156112234745521030333 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.c14n; import java.io.ByteArrayInputStream; import java.io.OutputStream; import java.util.Set; import javax.xml.parsers.DocumentBuilder; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.InputSource; /** * Base class which all Canonicalization algorithms extend. * * @author Christian Geuer-Pollmann */ public abstract class CanonicalizerSpi { /** Reset the writer after a c14n */ protected boolean reset = false; protected boolean secureValidation; /** * Method canonicalize * * @param inputBytes * @return the c14n bytes. * * @throws CanonicalizationException * @throws java.io.IOException * @throws javax.xml.parsers.ParserConfigurationException * @throws org.xml.sax.SAXException */ public byte[] engineCanonicalize(byte[] inputBytes) throws javax.xml.parsers.ParserConfigurationException, java.io.IOException, org.xml.sax.SAXException, CanonicalizationException { java.io.InputStream bais = new ByteArrayInputStream(inputBytes); InputSource in = new InputSource(bais); DocumentBuilder db = XMLUtils.createDocumentBuilder(false, secureValidation); Document document = db.parse(in); return this.engineCanonicalizeSubTree(document); } /** * Method engineCanonicalizeXPathNodeSet * * @param xpathNodeSet * @return the c14n bytes * @throws CanonicalizationException */ public byte[] engineCanonicalizeXPathNodeSet(NodeList xpathNodeSet) throws CanonicalizationException { return this.engineCanonicalizeXPathNodeSet( XMLUtils.convertNodelistToSet(xpathNodeSet) ); } /** * Method engineCanonicalizeXPathNodeSet * * @param xpathNodeSet * @param inclusiveNamespaces * @return the c14n bytes * @throws CanonicalizationException */ public byte[] engineCanonicalizeXPathNodeSet(NodeList xpathNodeSet, String inclusiveNamespaces) throws CanonicalizationException { return this.engineCanonicalizeXPathNodeSet( XMLUtils.convertNodelistToSet(xpathNodeSet), inclusiveNamespaces ); } /** * Returns the URI of this engine. * @return the URI */ public abstract String engineGetURI(); /** * Returns true if comments are included * @return true if comments are included */ public abstract boolean engineGetIncludeComments(); /** * C14n a nodeset * * @param xpathNodeSet * @return the c14n bytes * @throws CanonicalizationException */ public abstract byte[] engineCanonicalizeXPathNodeSet(Set xpathNodeSet) throws CanonicalizationException; /** * C14n a nodeset * * @param xpathNodeSet * @param inclusiveNamespaces * @return the c14n bytes * @throws CanonicalizationException */ public abstract byte[] engineCanonicalizeXPathNodeSet( Set xpathNodeSet, String inclusiveNamespaces ) throws CanonicalizationException; /** * C14n a node tree. * * @param rootNode * @return the c14n bytes * @throws CanonicalizationException */ public abstract byte[] engineCanonicalizeSubTree(Node rootNode) throws CanonicalizationException; /** * C14n a node tree. * * @param rootNode * @param inclusiveNamespaces * @return the c14n bytes * @throws CanonicalizationException */ public abstract byte[] engineCanonicalizeSubTree(Node rootNode, String inclusiveNamespaces) throws CanonicalizationException; /** * Sets the writer where the canonicalization ends. ByteArrayOutputStream if * none is set. * @param os */ public abstract void setWriter(OutputStream os); public boolean isSecureValidation() { return secureValidation; } public void setSecureValidation(boolean secureValidation) { this.secureValidation = secureValidation; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/0000755000175000017500000000000012273503734027440 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/package.html0000644000175000017500000000012707533712503031720 0ustar tonytony

canonicalization implementations.

././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer11_WithComments.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer10000644000175000017500000000237011553001352032214 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.c14n.implementations; import org.apache.xml.security.c14n.Canonicalizer; /** * @author Sean Mullan */ public class Canonicalizer11_WithComments extends Canonicalizer11 { public Canonicalizer11_WithComments() { super(true); } public final String engineGetURI() { return Canonicalizer.ALGO_ID_C14N11_WITH_COMMENTS; } public final boolean engineGetIncludeComments() { return true; } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/CanonicalizerBase.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/CanonicalizerB0000644000175000017500000007533012030351271032242 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.c14n.implementations; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.ListIterator; import java.util.Map; import java.util.Set; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.CanonicalizerSpi; import org.apache.xml.security.c14n.helper.AttrCompare; import org.apache.xml.security.signature.NodeFilter; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.UnsyncByteArrayOutputStream; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Attr; import org.w3c.dom.Comment; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.ProcessingInstruction; import org.xml.sax.SAXException; /** * Abstract base class for canonicalization algorithms. * * @author Christian Geuer-Pollmann */ public abstract class CanonicalizerBase extends CanonicalizerSpi { public static final String XML = "xml"; public static final String XMLNS = "xmlns"; protected static final AttrCompare COMPARE = new AttrCompare(); protected static final Attr nullNode; private static final byte[] END_PI = {'?','>'}; private static final byte[] BEGIN_PI = {'<','?'}; private static final byte[] END_COMM = {'-','-','>'}; private static final byte[] BEGIN_COMM = {'<','!','-','-'}; private static final byte[] XA = {'&','#','x','A',';'}; private static final byte[] X9 = {'&','#','x','9',';'}; private static final byte[] QUOT = {'&','q','u','o','t',';'}; private static final byte[] XD = {'&','#','x','D',';'}; private static final byte[] GT = {'&','g','t',';'}; private static final byte[] LT = {'&','l','t',';'}; private static final byte[] END_TAG = {'<','/'}; private static final byte[] AMP = {'&','a','m','p',';'}; private static final byte[] equalsStr = {'=','\"'}; protected static final int NODE_BEFORE_DOCUMENT_ELEMENT = -1; protected static final int NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT = 0; protected static final int NODE_AFTER_DOCUMENT_ELEMENT = 1; static { // The null xmlns definition. try { DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); nullNode = documentBuilder.newDocument().createAttributeNS(Constants.NamespaceSpecNS, XMLNS); nullNode.setValue(""); } catch (Exception e) { throw new RuntimeException("Unable to create nullNode: " + e); } } private List nodeFilter; private boolean includeComments; private Set xpathNodeSet; /** * The node to be skipped/excluded from the DOM tree * in subtree canonicalizations. */ private Node excludeNode; private OutputStream writer = new ByteArrayOutputStream(); /** * Constructor CanonicalizerBase * * @param includeComments */ public CanonicalizerBase(boolean includeComments) { this.includeComments = includeComments; } /** * Method engineCanonicalizeSubTree * @inheritDoc * @param rootNode * @throws CanonicalizationException */ public byte[] engineCanonicalizeSubTree(Node rootNode) throws CanonicalizationException { return engineCanonicalizeSubTree(rootNode, (Node)null); } /** * Method engineCanonicalizeXPathNodeSet * @inheritDoc * @param xpathNodeSet * @throws CanonicalizationException */ public byte[] engineCanonicalizeXPathNodeSet(Set xpathNodeSet) throws CanonicalizationException { this.xpathNodeSet = xpathNodeSet; return engineCanonicalizeXPathNodeSetInternal(XMLUtils.getOwnerDocument(this.xpathNodeSet)); } /** * Canonicalizes a Subtree node. * @param input the root of the subtree to canicalize * @return The canonicalize stream. * @throws CanonicalizationException */ public byte[] engineCanonicalize(XMLSignatureInput input) throws CanonicalizationException { try { if (input.isExcludeComments()) { includeComments = false; } if (input.isOctetStream()) { return engineCanonicalize(input.getBytes()); } if (input.isElement()) { return engineCanonicalizeSubTree(input.getSubNode(), input.getExcludeNode()); } else if (input.isNodeSet()) { nodeFilter = input.getNodeFilters(); circumventBugIfNeeded(input); if (input.getSubNode() != null) { return engineCanonicalizeXPathNodeSetInternal(input.getSubNode()); } else { return engineCanonicalizeXPathNodeSet(input.getNodeSet()); } } return null; } catch (CanonicalizationException ex) { throw new CanonicalizationException("empty", ex); } catch (ParserConfigurationException ex) { throw new CanonicalizationException("empty", ex); } catch (IOException ex) { throw new CanonicalizationException("empty", ex); } catch (SAXException ex) { throw new CanonicalizationException("empty", ex); } } /** * @param writer The writer to set. */ public void setWriter(OutputStream writer) { this.writer = writer; } /** * Canonicalizes a Subtree node. * * @param rootNode * the root of the subtree to canonicalize * @param excludeNode * a node to be excluded from the canonicalize operation * @return The canonicalize stream. * @throws CanonicalizationException */ protected byte[] engineCanonicalizeSubTree(Node rootNode, Node excludeNode) throws CanonicalizationException { this.excludeNode = excludeNode; try { NameSpaceSymbTable ns = new NameSpaceSymbTable(); int nodeLevel = NODE_BEFORE_DOCUMENT_ELEMENT; if (rootNode != null && Node.ELEMENT_NODE == rootNode.getNodeType()) { //Fills the nssymbtable with the definitions of the parent of the root subnode getParentNameSpaces((Element)rootNode, ns); nodeLevel = NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT; } this.canonicalizeSubTree(rootNode, ns, rootNode, nodeLevel); this.writer.flush(); if (this.writer instanceof ByteArrayOutputStream) { byte[] result = ((ByteArrayOutputStream)this.writer).toByteArray(); if (reset) { ((ByteArrayOutputStream)this.writer).reset(); } else { this.writer.close(); } return result; } else if (this.writer instanceof UnsyncByteArrayOutputStream) { byte[] result = ((UnsyncByteArrayOutputStream)this.writer).toByteArray(); if (reset) { ((UnsyncByteArrayOutputStream)this.writer).reset(); } else { this.writer.close(); } return result; } else { this.writer.close(); } return null; } catch (UnsupportedEncodingException ex) { throw new CanonicalizationException("empty", ex); } catch (IOException ex) { throw new CanonicalizationException("empty", ex); } } /** * Method canonicalizeSubTree, this function is a recursive one. * * @param currentNode * @param ns * @param endnode * @throws CanonicalizationException * @throws IOException */ protected final void canonicalizeSubTree( Node currentNode, NameSpaceSymbTable ns, Node endnode, int documentLevel ) throws CanonicalizationException, IOException { if (isVisibleInt(currentNode) == -1) { return; } Node sibling = null; Node parentNode = null; final OutputStream writer = this.writer; final Node excludeNode = this.excludeNode; final boolean includeComments = this.includeComments; Map cache = new HashMap(); do { switch (currentNode.getNodeType()) { case Node.ENTITY_NODE : case Node.NOTATION_NODE : case Node.ATTRIBUTE_NODE : // illegal node type during traversal throw new CanonicalizationException("empty"); case Node.DOCUMENT_FRAGMENT_NODE : case Node.DOCUMENT_NODE : ns.outputNodePush(); sibling = currentNode.getFirstChild(); break; case Node.COMMENT_NODE : if (includeComments) { outputCommentToWriter((Comment) currentNode, writer, documentLevel); } break; case Node.PROCESSING_INSTRUCTION_NODE : outputPItoWriter((ProcessingInstruction) currentNode, writer, documentLevel); break; case Node.TEXT_NODE : case Node.CDATA_SECTION_NODE : outputTextToWriter(currentNode.getNodeValue(), writer); break; case Node.ELEMENT_NODE : documentLevel = NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT; if (currentNode == excludeNode) { break; } Element currentElement = (Element)currentNode; //Add a level to the nssymbtable. So latter can be pop-back. ns.outputNodePush(); writer.write('<'); String name = currentElement.getTagName(); UtfHelpper.writeByte(name, writer, cache); Iterator attrs = this.handleAttributesSubtree(currentElement, ns); if (attrs != null) { //we output all Attrs which are available while (attrs.hasNext()) { Attr attr = attrs.next(); outputAttrToWriter(attr.getNodeName(), attr.getNodeValue(), writer, cache); } } writer.write('>'); sibling = currentNode.getFirstChild(); if (sibling == null) { writer.write(END_TAG); UtfHelpper.writeStringToUtf8(name, writer); writer.write('>'); //We finished with this level, pop to the previous definitions. ns.outputNodePop(); if (parentNode != null) { sibling = currentNode.getNextSibling(); } } else { parentNode = currentElement; } break; case Node.DOCUMENT_TYPE_NODE : default : break; } while (sibling == null && parentNode != null) { writer.write(END_TAG); UtfHelpper.writeByte(((Element)parentNode).getTagName(), writer, cache); writer.write('>'); //We finished with this level, pop to the previous definitions. ns.outputNodePop(); if (parentNode == endnode) { return; } sibling = parentNode.getNextSibling(); parentNode = parentNode.getParentNode(); if (parentNode == null || Node.ELEMENT_NODE != parentNode.getNodeType()) { documentLevel = NODE_AFTER_DOCUMENT_ELEMENT; parentNode = null; } } if (sibling == null) { return; } currentNode = sibling; sibling = currentNode.getNextSibling(); } while(true); } private byte[] engineCanonicalizeXPathNodeSetInternal(Node doc) throws CanonicalizationException { try { this.canonicalizeXPathNodeSet(doc, doc); this.writer.flush(); if (this.writer instanceof ByteArrayOutputStream) { byte[] sol = ((ByteArrayOutputStream)this.writer).toByteArray(); if (reset) { ((ByteArrayOutputStream)this.writer).reset(); } else { this.writer.close(); } return sol; } else if (this.writer instanceof UnsyncByteArrayOutputStream) { byte[] result = ((UnsyncByteArrayOutputStream)this.writer).toByteArray(); if (reset) { ((UnsyncByteArrayOutputStream)this.writer).reset(); } else { this.writer.close(); } return result; } else { this.writer.close(); } return null; } catch (UnsupportedEncodingException ex) { throw new CanonicalizationException("empty", ex); } catch (IOException ex) { throw new CanonicalizationException("empty", ex); } } /** * Canonicalizes all the nodes included in the currentNode and contained in the * xpathNodeSet field. * * @param currentNode * @param endnode * @throws CanonicalizationException * @throws IOException */ protected final void canonicalizeXPathNodeSet(Node currentNode, Node endnode) throws CanonicalizationException, IOException { if (isVisibleInt(currentNode) == -1) { return; } boolean currentNodeIsVisible = false; NameSpaceSymbTable ns = new NameSpaceSymbTable(); if (currentNode != null && Node.ELEMENT_NODE == currentNode.getNodeType()) { getParentNameSpaces((Element)currentNode, ns); } if (currentNode == null) { return; } Node sibling = null; Node parentNode = null; OutputStream writer = this.writer; int documentLevel = NODE_BEFORE_DOCUMENT_ELEMENT; Map cache = new HashMap(); do { switch (currentNode.getNodeType()) { case Node.ENTITY_NODE : case Node.NOTATION_NODE : case Node.ATTRIBUTE_NODE : // illegal node type during traversal throw new CanonicalizationException("empty"); case Node.DOCUMENT_FRAGMENT_NODE : case Node.DOCUMENT_NODE : ns.outputNodePush(); sibling = currentNode.getFirstChild(); break; case Node.COMMENT_NODE : if (this.includeComments && (isVisibleDO(currentNode, ns.getLevel()) == 1)) { outputCommentToWriter((Comment) currentNode, writer, documentLevel); } break; case Node.PROCESSING_INSTRUCTION_NODE : if (isVisible(currentNode)) { outputPItoWriter((ProcessingInstruction) currentNode, writer, documentLevel); } break; case Node.TEXT_NODE : case Node.CDATA_SECTION_NODE : if (isVisible(currentNode)) { outputTextToWriter(currentNode.getNodeValue(), writer); for (Node nextSibling = currentNode.getNextSibling(); (nextSibling != null) && ((nextSibling.getNodeType() == Node.TEXT_NODE) || (nextSibling.getNodeType() == Node.CDATA_SECTION_NODE)); nextSibling = nextSibling.getNextSibling()) { outputTextToWriter(nextSibling.getNodeValue(), writer); currentNode = nextSibling; sibling = currentNode.getNextSibling(); } } break; case Node.ELEMENT_NODE : documentLevel = NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT; Element currentElement = (Element) currentNode; //Add a level to the nssymbtable. So latter can be pop-back. String name = null; int i = isVisibleDO(currentNode, ns.getLevel()); if (i == -1) { sibling = currentNode.getNextSibling(); break; } currentNodeIsVisible = (i == 1); if (currentNodeIsVisible) { ns.outputNodePush(); writer.write('<'); name = currentElement.getTagName(); UtfHelpper.writeByte(name, writer, cache); } else { ns.push(); } Iterator attrs = handleAttributes(currentElement,ns); if (attrs != null) { //we output all Attrs which are available while (attrs.hasNext()) { Attr attr = attrs.next(); outputAttrToWriter(attr.getNodeName(), attr.getNodeValue(), writer, cache); } } if (currentNodeIsVisible) { writer.write('>'); } sibling = currentNode.getFirstChild(); if (sibling == null) { if (currentNodeIsVisible) { writer.write(END_TAG); UtfHelpper.writeByte(name, writer, cache); writer.write('>'); //We finished with this level, pop to the previous definitions. ns.outputNodePop(); } else { ns.pop(); } if (parentNode != null) { sibling = currentNode.getNextSibling(); } } else { parentNode = currentElement; } break; case Node.DOCUMENT_TYPE_NODE : default : break; } while (sibling == null && parentNode != null) { if (isVisible(parentNode)) { writer.write(END_TAG); UtfHelpper.writeByte(((Element)parentNode).getTagName(), writer, cache); writer.write('>'); //We finished with this level, pop to the previous definitions. ns.outputNodePop(); } else { ns.pop(); } if (parentNode == endnode) { return; } sibling = parentNode.getNextSibling(); parentNode = parentNode.getParentNode(); if (parentNode == null || Node.ELEMENT_NODE != parentNode.getNodeType()) { parentNode = null; documentLevel = NODE_AFTER_DOCUMENT_ELEMENT; } } if (sibling == null) { return; } currentNode = sibling; sibling = currentNode.getNextSibling(); } while(true); } protected int isVisibleDO(Node currentNode, int level) { if (nodeFilter != null) { Iterator it = nodeFilter.iterator(); while (it.hasNext()) { int i = (it.next()).isNodeIncludeDO(currentNode, level); if (i != 1) { return i; } } } if ((this.xpathNodeSet != null) && !this.xpathNodeSet.contains(currentNode)) { return 0; } return 1; } protected int isVisibleInt(Node currentNode) { if (nodeFilter != null) { Iterator it = nodeFilter.iterator(); while (it.hasNext()) { int i = (it.next()).isNodeInclude(currentNode); if (i != 1) { return i; } } } if ((this.xpathNodeSet != null) && !this.xpathNodeSet.contains(currentNode)) { return 0; } return 1; } protected boolean isVisible(Node currentNode) { if (nodeFilter != null) { Iterator it = nodeFilter.iterator(); while (it.hasNext()) { if (it.next().isNodeInclude(currentNode) != 1) { return false; } } } if ((this.xpathNodeSet != null) && !this.xpathNodeSet.contains(currentNode)) { return false; } return true; } protected void handleParent(Element e, NameSpaceSymbTable ns) { if (!e.hasAttributes() && e.getNamespaceURI() == null) { return; } NamedNodeMap attrs = e.getAttributes(); int attrsLength = attrs.getLength(); for (int i = 0; i < attrsLength; i++) { Attr attribute = (Attr) attrs.item(i); String NName = attribute.getLocalName(); String NValue = attribute.getNodeValue(); if (Constants.NamespaceSpecNS.equals(attribute.getNamespaceURI()) && (!XML.equals(NName) || !Constants.XML_LANG_SPACE_SpecNS.equals(NValue))) { ns.addMapping(NName, NValue, attribute); } } if (e.getNamespaceURI() != null) { String NName = e.getPrefix(); String NValue = e.getNamespaceURI(); String Name; if (NName == null || NName.equals("")) { NName = XMLNS; Name = XMLNS; } else { Name = XMLNS + ":" + NName; } Attr n = e.getOwnerDocument().createAttributeNS("http://www.w3.org/2000/xmlns/", Name); n.setValue(NValue); ns.addMapping(NName, NValue, n); } } /** * Adds to ns the definitions from the parent elements of el * @param el * @param ns */ protected final void getParentNameSpaces(Element el, NameSpaceSymbTable ns) { Node n1 = el.getParentNode(); if (n1 == null || Node.ELEMENT_NODE != n1.getNodeType()) { return; } //Obtain all the parents of the element List parents = new ArrayList(); Node parent = n1; while (parent != null && Node.ELEMENT_NODE == parent.getNodeType()) { parents.add((Element)parent); parent = parent.getParentNode(); } //Visit them in reverse order. ListIterator it = parents.listIterator(parents.size()); while (it.hasPrevious()) { Element ele = it.previous(); handleParent(ele, ns); } parents.clear(); Attr nsprefix; if (((nsprefix = ns.getMappingWithoutRendered(XMLNS)) != null) && "".equals(nsprefix.getValue())) { ns.addMappingAndRender(XMLNS, "", nullNode); } } /** * Obtain the attributes to output for this node in XPathNodeSet c14n. * * @param element * @param ns * @return the attributes nodes to output. * @throws CanonicalizationException */ abstract Iterator handleAttributes(Element element, NameSpaceSymbTable ns) throws CanonicalizationException; /** * Obtain the attributes to output for this node in a Subtree c14n. * * @param element * @param ns * @return the attributes nodes to output. * @throws CanonicalizationException */ abstract Iterator handleAttributesSubtree(Element element, NameSpaceSymbTable ns) throws CanonicalizationException; abstract void circumventBugIfNeeded(XMLSignatureInput input) throws CanonicalizationException, ParserConfigurationException, IOException, SAXException; /** * Outputs an Attribute to the internal Writer. * * The string value of the node is modified by replacing *
    *
  • all ampersands (&) with &amp;
  • *
  • all open angle brackets (<) with &lt;
  • *
  • all quotation mark characters with &quot;
  • *
  • and the whitespace characters #x9, #xA, and #xD, with character * references. The character references are written in uppercase * hexadecimal with no leading zeroes (for example, #xD is represented * by the character reference &#xD;)
  • *
* * @param name * @param value * @param writer * @throws IOException */ protected static final void outputAttrToWriter( final String name, final String value, final OutputStream writer, final Map cache ) throws IOException { writer.write(' '); UtfHelpper.writeByte(name, writer, cache); writer.write(equalsStr); byte[] toWrite; final int length = value.length(); int i = 0; while (i < length) { char c = value.charAt(i++); switch (c) { case '&' : toWrite = AMP; break; case '<' : toWrite = LT; break; case '"' : toWrite = QUOT; break; case 0x09 : // '\t' toWrite = X9; break; case 0x0A : // '\n' toWrite = XA; break; case 0x0D : // '\r' toWrite = XD; break; default : if (c < 0x80) { writer.write(c); } else { UtfHelpper.writeCharToUtf8(c, writer); } continue; } writer.write(toWrite); } writer.write('\"'); } /** * Outputs a PI to the internal Writer. * * @param currentPI * @param writer where to write the things * @throws IOException */ protected void outputPItoWriter( ProcessingInstruction currentPI, OutputStream writer, int position ) throws IOException { if (position == NODE_AFTER_DOCUMENT_ELEMENT) { writer.write('\n'); } writer.write(BEGIN_PI); final String target = currentPI.getTarget(); int length = target.length(); for (int i = 0; i < length; i++) { char c = target.charAt(i); if (c == 0x0D) { writer.write(XD); } else { if (c < 0x80) { writer.write(c); } else { UtfHelpper.writeCharToUtf8(c, writer); } } } final String data = currentPI.getData(); length = data.length(); if (length > 0) { writer.write(' '); for (int i = 0; i < length; i++) { char c = data.charAt(i); if (c == 0x0D) { writer.write(XD); } else { UtfHelpper.writeCharToUtf8(c, writer); } } } writer.write(END_PI); if (position == NODE_BEFORE_DOCUMENT_ELEMENT) { writer.write('\n'); } } /** * Method outputCommentToWriter * * @param currentComment * @param writer writer where to write the things * @throws IOException */ protected void outputCommentToWriter( Comment currentComment, OutputStream writer, int position ) throws IOException { if (position == NODE_AFTER_DOCUMENT_ELEMENT) { writer.write('\n'); } writer.write(BEGIN_COMM); final String data = currentComment.getData(); final int length = data.length(); for (int i = 0; i < length; i++) { char c = data.charAt(i); if (c == 0x0D) { writer.write(XD); } else { if (c < 0x80) { writer.write(c); } else { UtfHelpper.writeCharToUtf8(c, writer); } } } writer.write(END_COMM); if (position == NODE_BEFORE_DOCUMENT_ELEMENT) { writer.write('\n'); } } /** * Outputs a Text of CDATA section to the internal Writer. * * @param text * @param writer writer where to write the things * @throws IOException */ protected static final void outputTextToWriter( final String text, final OutputStream writer ) throws IOException { final int length = text.length(); byte[] toWrite; for (int i = 0; i < length; i++) { char c = text.charAt(i); switch (c) { case '&' : toWrite = AMP; break; case '<' : toWrite = LT; break; case '>' : toWrite = GT; break; case 0xD : toWrite = XD; break; default : if (c < 0x80) { writer.write(c); } else { UtfHelpper.writeCharToUtf8(c, writer); } continue; } writer.write(toWrite); } } } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer11.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer10000644000175000017500000006557511752162474032252 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.c14n.implementations; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.xml.sax.SAXException; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.helper.C14nHelper; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; /** * Implements * Canonical XML Version 1.1, a W3C Proposed Recommendation from 29 * January 2008. * * @author Sean Mullan * @author Raul Benito */ public abstract class Canonicalizer11 extends CanonicalizerBase { private static final String XMLNS_URI = Constants.NamespaceSpecNS; private static final String XML_LANG_URI = Constants.XML_LANG_SPACE_SpecNS; private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Canonicalizer11.class); private final SortedSet result = new TreeSet(COMPARE); private boolean firstCall = true; private static class XmlAttrStack { static class XmlsStackElement { int level; boolean rendered = false; List nodes = new ArrayList(); }; int currentLevel = 0; int lastlevel = 0; XmlsStackElement cur; List levels = new ArrayList(); void push(int level) { currentLevel = level; if (currentLevel == -1) { return; } cur = null; while (lastlevel >= currentLevel) { levels.remove(levels.size() - 1); int newSize = levels.size(); if (newSize == 0) { lastlevel = 0; return; } lastlevel = (levels.get(newSize - 1)).level; } } void addXmlnsAttr(Attr n) { if (cur == null) { cur = new XmlsStackElement(); cur.level = currentLevel; levels.add(cur); lastlevel = currentLevel; } cur.nodes.add(n); } void getXmlnsAttr(Collection col) { int size = levels.size() - 1; if (cur == null) { cur = new XmlsStackElement(); cur.level = currentLevel; lastlevel = currentLevel; levels.add(cur); } boolean parentRendered = false; XmlsStackElement e = null; if (size == -1) { parentRendered = true; } else { e = levels.get(size); if (e.rendered && e.level + 1 == currentLevel) { parentRendered = true; } } if (parentRendered) { col.addAll(cur.nodes); cur.rendered = true; return; } Map loa = new HashMap(); List baseAttrs = new ArrayList(); boolean successiveOmitted = true; for (; size >= 0; size--) { e = levels.get(size); if (e.rendered) { successiveOmitted = false; } Iterator it = e.nodes.iterator(); while (it.hasNext() && successiveOmitted) { Attr n = it.next(); if (n.getLocalName().equals("base") && !e.rendered) { baseAttrs.add(n); } else if (!loa.containsKey(n.getName())) { loa.put(n.getName(), n); } } } if (!baseAttrs.isEmpty()) { Iterator it = col.iterator(); String base = null; Attr baseAttr = null; while (it.hasNext()) { Attr n = it.next(); if (n.getLocalName().equals("base")) { base = n.getValue(); baseAttr = n; break; } } it = baseAttrs.iterator(); while (it.hasNext()) { Attr n = it.next(); if (base == null) { base = n.getValue(); baseAttr = n; } else { try { base = joinURI(n.getValue(), base); } catch (URISyntaxException ue) { if (log.isDebugEnabled()) { log.debug(ue.getMessage(), ue); } } } } if (base != null && base.length() != 0) { baseAttr.setValue(base); col.add(baseAttr); } } cur.rendered = true; col.addAll(loa.values()); } }; private XmlAttrStack xmlattrStack = new XmlAttrStack(); /** * Constructor Canonicalizer11 * * @param includeComments */ public Canonicalizer11(boolean includeComments) { super(includeComments); } /** * Always throws a CanonicalizationException because this is inclusive c14n. * * @param xpathNodeSet * @param inclusiveNamespaces * @return none it always fails * @throws CanonicalizationException always */ public byte[] engineCanonicalizeXPathNodeSet( Set xpathNodeSet, String inclusiveNamespaces ) throws CanonicalizationException { throw new CanonicalizationException("c14n.Canonicalizer.UnsupportedOperation"); } /** * Always throws a CanonicalizationException because this is inclusive c14n. * * @param rootNode * @param inclusiveNamespaces * @return none it always fails * @throws CanonicalizationException */ public byte[] engineCanonicalizeSubTree( Node rootNode, String inclusiveNamespaces ) throws CanonicalizationException { throw new CanonicalizationException("c14n.Canonicalizer.UnsupportedOperation"); } /** * Returns the Attr[]s to be output for the given element. *
* The code of this method is a copy of {@link #handleAttributes(Element, * NameSpaceSymbTable)}, * whereas it takes into account that subtree-c14n is -- well -- * subtree-based. * So if the element in question isRoot of c14n, it's parent is not in the * node set, as well as all other ancestors. * * @param element * @param ns * @return the Attr[]s to be output * @throws CanonicalizationException */ @Override protected Iterator handleAttributesSubtree(Element element, NameSpaceSymbTable ns) throws CanonicalizationException { if (!element.hasAttributes() && !firstCall) { return null; } // result will contain the attrs which have to be output final SortedSet result = this.result; result.clear(); if (element.hasAttributes()) { NamedNodeMap attrs = element.getAttributes(); int attrsLength = attrs.getLength(); for (int i = 0; i < attrsLength; i++) { Attr attribute = (Attr) attrs.item(i); String NUri = attribute.getNamespaceURI(); String NName = attribute.getLocalName(); String NValue = attribute.getValue(); if (!XMLNS_URI.equals(NUri)) { // It's not a namespace attr node. Add to the result and continue. result.add(attribute); } else if (!(XML.equals(NName) && XML_LANG_URI.equals(NValue))) { // The default mapping for xml must not be output. Node n = ns.addMappingAndRender(NName, NValue, attribute); if (n != null) { // Render the ns definition result.add((Attr)n); if (C14nHelper.namespaceIsRelative(attribute)) { Object exArgs[] = {element.getTagName(), NName, attribute.getNodeValue()}; throw new CanonicalizationException( "c14n.Canonicalizer.RelativeNamespace", exArgs ); } } } } } if (firstCall) { // It is the first node of the subtree // Obtain all the namespaces defined in the parents, and added to the output. ns.getUnrenderedNodes(result); // output the attributes in the xml namespace. xmlattrStack.getXmlnsAttr(result); firstCall = false; } return result.iterator(); } /** * Returns the Attr[]s to be output for the given element. *
* IMPORTANT: This method expects to work on a modified DOM tree, i.e. a * DOM which has been prepared using * {@link org.apache.xml.security.utils.XMLUtils#circumventBug2650( * org.w3c.dom.Document)}. * * @param element * @param ns * @return the Attr[]s to be output * @throws CanonicalizationException */ @Override protected Iterator handleAttributes(Element element, NameSpaceSymbTable ns) throws CanonicalizationException { // result will contain the attrs which have to be output xmlattrStack.push(ns.getLevel()); boolean isRealVisible = isVisibleDO(element, ns.getLevel()) == 1; final SortedSet result = this.result; result.clear(); if (element.hasAttributes()) { NamedNodeMap attrs = element.getAttributes(); int attrsLength = attrs.getLength(); for (int i = 0; i < attrsLength; i++) { Attr attribute = (Attr) attrs.item(i); String NUri = attribute.getNamespaceURI(); String NName = attribute.getLocalName(); String NValue = attribute.getValue(); if (!XMLNS_URI.equals(NUri)) { //A non namespace definition node. if (XML_LANG_URI.equals(NUri)) { if (NName.equals("id")) { if (isRealVisible) { // treat xml:id like any other attribute // (emit it, but don't inherit it) result.add(attribute); } } else { xmlattrStack.addXmlnsAttr(attribute); } } else if (isRealVisible) { //The node is visible add the attribute to the list of output attributes. result.add(attribute); } } else if (!XML.equals(NName) || !XML_LANG_URI.equals(NValue)) { /* except omit namespace node with local name xml, which defines * the xml prefix, if its string value is * http://www.w3.org/XML/1998/namespace. */ // add the prefix binding to the ns symb table. if (isVisible(attribute)) { if (isRealVisible || !ns.removeMappingIfRender(NName)) { // The xpath select this node output it if needed. Node n = ns.addMappingAndRender(NName, NValue, attribute); if (n != null) { result.add((Attr)n); if (C14nHelper.namespaceIsRelative(attribute)) { Object exArgs[] = { element.getTagName(), NName, attribute.getNodeValue() }; throw new CanonicalizationException( "c14n.Canonicalizer.RelativeNamespace", exArgs ); } } } } else { if (isRealVisible && !XMLNS.equals(NName)) { ns.removeMapping(NName); } else { ns.addMapping(NName, NValue, attribute); } } } } } if (isRealVisible) { //The element is visible, handle the xmlns definition Attr xmlns = element.getAttributeNodeNS(XMLNS_URI, XMLNS); Node n = null; if (xmlns == null) { //No xmlns def just get the already defined. n = ns.getMapping(XMLNS); } else if (!isVisible(xmlns)) { //There is a definition but the xmlns is not selected by the xpath. //then xmlns="" n = ns.addMappingAndRender(XMLNS, "", nullNode); } //output the xmlns def if needed. if (n != null) { result.add((Attr)n); } //Float all xml:* attributes of the unselected parent elements to this one. xmlattrStack.getXmlnsAttr(result); ns.getUnrenderedNodes(result); } return result.iterator(); } protected void circumventBugIfNeeded(XMLSignatureInput input) throws CanonicalizationException, ParserConfigurationException, IOException, SAXException { if (!input.isNeedsToBeExpanded()) { return; } Document doc = null; if (input.getSubNode() != null) { doc = XMLUtils.getOwnerDocument(input.getSubNode()); } else { doc = XMLUtils.getOwnerDocument(input.getNodeSet()); } XMLUtils.circumventBug2650(doc); } protected void handleParent(Element e, NameSpaceSymbTable ns) { if (!e.hasAttributes() && e.getNamespaceURI() == null) { return; } xmlattrStack.push(-1); NamedNodeMap attrs = e.getAttributes(); int attrsLength = attrs.getLength(); for (int i = 0; i < attrsLength; i++) { Attr attribute = (Attr) attrs.item(i); String NName = attribute.getLocalName(); String NValue = attribute.getNodeValue(); if (Constants.NamespaceSpecNS.equals(attribute.getNamespaceURI())) { if (!XML.equals(NName) || !Constants.XML_LANG_SPACE_SpecNS.equals(NValue)) { ns.addMapping(NName, NValue, attribute); } } else if (!"id".equals(NName) && XML_LANG_URI.equals(attribute.getNamespaceURI())) { xmlattrStack.addXmlnsAttr(attribute); } } if (e.getNamespaceURI() != null) { String NName = e.getPrefix(); String NValue = e.getNamespaceURI(); String Name; if (NName == null || NName.equals("")) { NName = "xmlns"; Name = "xmlns"; } else { Name = "xmlns:" + NName; } Attr n = e.getOwnerDocument().createAttributeNS("http://www.w3.org/2000/xmlns/", Name); n.setValue(NValue); ns.addMapping(NName, NValue, n); } } private static String joinURI(String baseURI, String relativeURI) throws URISyntaxException { String bscheme = null; String bauthority = null; String bpath = ""; String bquery = null; // pre-parse the baseURI if (baseURI != null) { if (baseURI.endsWith("..")) { baseURI = baseURI + "/"; } URI base = new URI(baseURI); bscheme = base.getScheme(); bauthority = base.getAuthority(); bpath = base.getPath(); bquery = base.getQuery(); } URI r = new URI(relativeURI); String rscheme = r.getScheme(); String rauthority = r.getAuthority(); String rpath = r.getPath(); String rquery = r.getQuery(); String tscheme, tauthority, tpath, tquery; if (rscheme != null && rscheme.equals(bscheme)) { rscheme = null; } if (rscheme != null) { tscheme = rscheme; tauthority = rauthority; tpath = removeDotSegments(rpath); tquery = rquery; } else { if (rauthority != null) { tauthority = rauthority; tpath = removeDotSegments(rpath); tquery = rquery; } else { if (rpath.length() == 0) { tpath = bpath; if (rquery != null) { tquery = rquery; } else { tquery = bquery; } } else { if (rpath.startsWith("/")) { tpath = removeDotSegments(rpath); } else { if (bauthority != null && bpath.length() == 0) { tpath = "/" + rpath; } else { int last = bpath.lastIndexOf('/'); if (last == -1) { tpath = rpath; } else { tpath = bpath.substring(0, last+1) + rpath; } } tpath = removeDotSegments(tpath); } tquery = rquery; } tauthority = bauthority; } tscheme = bscheme; } return new URI(tscheme, tauthority, tpath, tquery, null).toString(); } private static String removeDotSegments(String path) { if (log.isDebugEnabled()) { log.debug("STEP OUTPUT BUFFER\t\tINPUT BUFFER"); } // 1. The input buffer is initialized with the now-appended path // components then replace occurrences of "//" in the input buffer // with "/" until no more occurrences of "//" are in the input buffer. String input = path; while (input.indexOf("//") > -1) { input = input.replaceAll("//", "/"); } // Initialize the output buffer with the empty string. StringBuilder output = new StringBuilder(); // If the input buffer starts with a root slash "/" then move this // character to the output buffer. if (input.charAt(0) == '/') { output.append("/"); input = input.substring(1); } printStep("1 ", output.toString(), input); // While the input buffer is not empty, loop as follows while (input.length() != 0) { // 2A. If the input buffer begins with a prefix of "./", // then remove that prefix from the input buffer // else if the input buffer begins with a prefix of "../", then // if also the output does not contain the root slash "/" only, // then move this prefix to the end of the output buffer else // remove that prefix if (input.startsWith("./")) { input = input.substring(2); printStep("2A", output.toString(), input); } else if (input.startsWith("../")) { input = input.substring(3); if (!output.toString().equals("/")) { output.append("../"); } printStep("2A", output.toString(), input); // 2B. if the input buffer begins with a prefix of "/./" or "/.", // where "." is a complete path segment, then replace that prefix // with "/" in the input buffer; otherwise, } else if (input.startsWith("/./")) { input = input.substring(2); printStep("2B", output.toString(), input); } else if (input.equals("/.")) { // FIXME: what is complete path segment? input = input.replaceFirst("/.", "/"); printStep("2B", output.toString(), input); // 2C. if the input buffer begins with a prefix of "/../" or "/..", // where ".." is a complete path segment, then replace that prefix // with "/" in the input buffer and if also the output buffer is // empty, last segment in the output buffer equals "../" or "..", // where ".." is a complete path segment, then append ".." or "/.." // for the latter case respectively to the output buffer else // remove the last segment and its preceding "/" (if any) from the // output buffer and if hereby the first character in the output // buffer was removed and it was not the root slash then delete a // leading slash from the input buffer; otherwise, } else if (input.startsWith("/../")) { input = input.substring(3); if (output.length() == 0) { output.append("/"); } else if (output.toString().endsWith("../")) { output.append(".."); } else if (output.toString().endsWith("..")) { output.append("/.."); } else { int index = output.lastIndexOf("/"); if (index == -1) { output = new StringBuilder(); if (input.charAt(0) == '/') { input = input.substring(1); } } else { output = output.delete(index, output.length()); } } printStep("2C", output.toString(), input); } else if (input.equals("/..")) { // FIXME: what is complete path segment? input = input.replaceFirst("/..", "/"); if (output.length() == 0) { output.append("/"); } else if (output.toString().endsWith("../")) { output.append(".."); } else if (output.toString().endsWith("..")) { output.append("/.."); } else { int index = output.lastIndexOf("/"); if (index == -1) { output = new StringBuilder(); if (input.charAt(0) == '/') { input = input.substring(1); } } else { output = output.delete(index, output.length()); } } printStep("2C", output.toString(), input); // 2D. if the input buffer consists only of ".", then remove // that from the input buffer else if the input buffer consists // only of ".." and if the output buffer does not contain only // the root slash "/", then move the ".." to the output buffer // else delte it.; otherwise, } else if (input.equals(".")) { input = ""; printStep("2D", output.toString(), input); } else if (input.equals("..")) { if (!output.toString().equals("/")) { output.append(".."); } input = ""; printStep("2D", output.toString(), input); // 2E. move the first path segment (if any) in the input buffer // to the end of the output buffer, including the initial "/" // character (if any) and any subsequent characters up to, but not // including, the next "/" character or the end of the input buffer. } else { int end = -1; int begin = input.indexOf('/'); if (begin == 0) { end = input.indexOf('/', 1); } else { end = begin; begin = 0; } String segment; if (end == -1) { segment = input.substring(begin); input = ""; } else { segment = input.substring(begin, end); input = input.substring(end); } output.append(segment); printStep("2E", output.toString(), input); } } // 3. Finally, if the only or last segment of the output buffer is // "..", where ".." is a complete path segment not followed by a slash // then append a slash "/". The output buffer is returned as the result // of remove_dot_segments if (output.toString().endsWith("..")) { output.append("/"); printStep("3 ", output.toString(), input); } return output.toString(); } private static void printStep(String step, String output, String input) { if (log.isDebugEnabled()) { log.debug(" " + step + ": " + output); if (output.length() == 0) { log.debug("\t\t\t\t" + input); } else { log.debug("\t\t\t" + input); } } } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/UtfHelpper.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/UtfHelpper.jav0000644000175000017500000001245712030351271032215 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.c14n.implementations; import java.io.IOException; import java.io.OutputStream; import java.util.Map; public class UtfHelpper { static final void writeByte( final String str, final OutputStream out, Map cache ) throws IOException { byte[] result = cache.get(str); if (result == null) { result = getStringInUtf8(str); cache.put(str, result); } out.write(result); } static final void writeCharToUtf8(final char c, final OutputStream out) throws IOException { if (c < 0x80) { out.write(c); return; } if ((c >= 0xD800 && c <= 0xDBFF) || (c >= 0xDC00 && c <= 0xDFFF)) { //No Surrogates in sun java out.write(0x3f); return; } int bias; int write; char ch; if (c > 0x07FF) { ch = (char)(c>>>12); write = 0xE0; if (ch > 0) { write |= (ch & 0x0F); } out.write(write); write = 0x80; bias = 0x3F; } else { write = 0xC0; bias = 0x1F; } ch = (char)(c>>>6); if (ch > 0) { write |= (ch & bias); } out.write(write); out.write(0x80 | ((c) & 0x3F)); } static final void writeStringToUtf8( final String str, final OutputStream out ) throws IOException{ final int length = str.length(); int i = 0; char c; while (i < length) { c = str.charAt(i++); if (c < 0x80) { out.write(c); continue; } if ((c >= 0xD800 && c <= 0xDBFF) || (c >= 0xDC00 && c <= 0xDFFF)) { //No Surrogates in sun java out.write(0x3f); continue; } char ch; int bias; int write; if (c > 0x07FF) { ch = (char)(c>>>12); write = 0xE0; if (ch > 0) { write |= (ch & 0x0F); } out.write(write); write = 0x80; bias = 0x3F; } else { write = 0xC0; bias = 0x1F; } ch = (char)(c>>>6); if (ch > 0) { write |= (ch & bias); } out.write(write); out.write(0x80 | ((c) & 0x3F)); } } public static final byte[] getStringInUtf8(final String str) { final int length = str.length(); boolean expanded = false; byte[] result = new byte[length]; int i = 0; int out = 0; char c; while (i < length) { c = str.charAt(i++); if (c < 0x80) { result[out++] = (byte)c; continue; } if ((c >= 0xD800 && c <= 0xDBFF) || (c >= 0xDC00 && c <= 0xDFFF)) { //No Surrogates in sun java result[out++] = 0x3f; continue; } if (!expanded) { byte newResult[] = new byte[3*length]; System.arraycopy(result, 0, newResult, 0, out); result = newResult; expanded = true; } char ch; int bias; byte write; if (c > 0x07FF) { ch = (char)(c>>>12); write = (byte)0xE0; if (ch > 0) { write |= (ch & 0x0F); } result[out++] = write; write = (byte)0x80; bias = 0x3F; } else { write = (byte)0xC0; bias = 0x1F; } ch = (char)(c>>>6); if (ch > 0) { write |= (ch & bias); } result[out++] = write; result[out++] = (byte)(0x80 | ((c) & 0x3F)); } if (expanded) { byte newResult[] = new byte[out]; System.arraycopy(result, 0, newResult, 0, out); result = newResult; } return result; } } ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/CanonicalizerPhysical.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/CanonicalizerP0000644000175000017500000001452612060430451032261 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.c14n.implementations; import java.io.IOException; import java.io.OutputStream; import java.util.Iterator; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; import javax.xml.parsers.ParserConfigurationException; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.signature.XMLSignatureInput; import org.w3c.dom.Attr; import org.w3c.dom.Comment; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.ProcessingInstruction; import org.xml.sax.SAXException; /** * Serializes the physical representation of the subtree. All the attributes * present in the subtree are emitted. The attributes are sorted within an element, * with the namespace declarations appearing before the regular attributes. * This algorithm is not a true canonicalization since equivalent subtrees * may produce different output. It is therefore unsuitable for digital signatures. * This same property makes it ideal for XML Encryption Syntax and Processing, * because the decrypted XML content will share the same physical representation * as the original XML content that was encrypted. */ public class CanonicalizerPhysical extends CanonicalizerBase { private final SortedSet result = new TreeSet(COMPARE); /** * Constructor Canonicalizer20010315 */ public CanonicalizerPhysical() { super(true); } /** * Always throws a CanonicalizationException. * * @param xpathNodeSet * @param inclusiveNamespaces * @return none it always fails * @throws CanonicalizationException always */ public byte[] engineCanonicalizeXPathNodeSet(Set xpathNodeSet, String inclusiveNamespaces) throws CanonicalizationException { /** $todo$ well, should we throw UnsupportedOperationException ? */ throw new CanonicalizationException("c14n.Canonicalizer.UnsupportedOperation"); } /** * Always throws a CanonicalizationException. * * @param rootNode * @param inclusiveNamespaces * @return none it always fails * @throws CanonicalizationException */ public byte[] engineCanonicalizeSubTree(Node rootNode, String inclusiveNamespaces) throws CanonicalizationException { /** $todo$ well, should we throw UnsupportedOperationException ? */ throw new CanonicalizationException("c14n.Canonicalizer.UnsupportedOperation"); } /** * Returns the Attr[]s to be output for the given element. *
* The code of this method is a copy of {@link #handleAttributes(Element, * NameSpaceSymbTable)}, * whereas it takes into account that subtree-c14n is -- well -- subtree-based. * So if the element in question isRoot of c14n, it's parent is not in the * node set, as well as all other ancestors. * * @param element * @param ns * @return the Attr[]s to be output * @throws CanonicalizationException */ @Override protected Iterator handleAttributesSubtree(Element element, NameSpaceSymbTable ns) throws CanonicalizationException { if (!element.hasAttributes()) { return null; } // result will contain all the attrs declared directly on that element final SortedSet result = this.result; result.clear(); if (element.hasAttributes()) { NamedNodeMap attrs = element.getAttributes(); int attrsLength = attrs.getLength(); for (int i = 0; i < attrsLength; i++) { Attr attribute = (Attr) attrs.item(i); result.add(attribute); } } return result.iterator(); } /** * Returns the Attr[]s to be output for the given element. * * @param element * @param ns * @return the Attr[]s to be output * @throws CanonicalizationException */ @Override protected Iterator handleAttributes(Element element, NameSpaceSymbTable ns) throws CanonicalizationException { /** $todo$ well, should we throw UnsupportedOperationException ? */ throw new CanonicalizationException("c14n.Canonicalizer.UnsupportedOperation"); } protected void circumventBugIfNeeded(XMLSignatureInput input) throws CanonicalizationException, ParserConfigurationException, IOException, SAXException { // nothing to do } @Override protected void handleParent(Element e, NameSpaceSymbTable ns) { // nothing to do } /** @inheritDoc */ public final String engineGetURI() { return Canonicalizer.ALGO_ID_C14N_PHYSICAL; } /** @inheritDoc */ public final boolean engineGetIncludeComments() { return true; } @Override protected void outputPItoWriter(ProcessingInstruction currentPI, OutputStream writer, int position) throws IOException { // Processing Instructions before or after the document element are not treated specially super.outputPItoWriter(currentPI, writer, NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT); } @Override protected void outputCommentToWriter(Comment currentComment, OutputStream writer, int position) throws IOException { // Comments before or after the document element are not treated specially super.outputCommentToWriter(currentComment, writer, NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT); } } ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer20010315Excl.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer20000644000175000017500000003136311610334611032222 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.c14n.implementations; import java.io.IOException; import java.util.Iterator; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; import javax.xml.parsers.ParserConfigurationException; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.helper.C14nHelper; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.transforms.params.InclusiveNamespaces; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.xml.sax.SAXException; /** * Implements " Exclusive XML * Canonicalization, Version 1.0 "
* Credits: During restructuring of the Canonicalizer framework, Ren?? * Kollmorgen from Software AG submitted an implementation of ExclC14n which * fitted into the old architecture and which based heavily on my old (and slow) * implementation of "Canonical XML". A big "thank you" to Ren?? for this. *
* THIS implementation is a complete rewrite of the algorithm. * * @author Christian Geuer-Pollmann * @version $Revision: 1147448 $ * @see * XML Canonicalization, Version 1.0 */ public abstract class Canonicalizer20010315Excl extends CanonicalizerBase { private static final String XML_LANG_URI = Constants.XML_LANG_SPACE_SpecNS; private static final String XMLNS_URI = Constants.NamespaceSpecNS; /** * This Set contains the names (Strings like "xmlns" or "xmlns:foo") of * the inclusive namespaces. */ private SortedSet inclusiveNSSet; private final SortedSet result = new TreeSet(COMPARE); /** * Constructor Canonicalizer20010315Excl * * @param includeComments */ public Canonicalizer20010315Excl(boolean includeComments) { super(includeComments); } /** * Method engineCanonicalizeSubTree * @inheritDoc * @param rootNode * * @throws CanonicalizationException */ public byte[] engineCanonicalizeSubTree(Node rootNode) throws CanonicalizationException { return engineCanonicalizeSubTree(rootNode, "", null); } /** * Method engineCanonicalizeSubTree * @inheritDoc * @param rootNode * @param inclusiveNamespaces * * @throws CanonicalizationException */ public byte[] engineCanonicalizeSubTree( Node rootNode, String inclusiveNamespaces ) throws CanonicalizationException { return engineCanonicalizeSubTree(rootNode, inclusiveNamespaces, null); } /** * Method engineCanonicalizeSubTree * @param rootNode * @param inclusiveNamespaces * @param excl A element to exclude from the c14n process. * @return the rootNode c14n. * @throws CanonicalizationException */ public byte[] engineCanonicalizeSubTree( Node rootNode, String inclusiveNamespaces, Node excl ) throws CanonicalizationException{ inclusiveNSSet = InclusiveNamespaces.prefixStr2Set(inclusiveNamespaces); return super.engineCanonicalizeSubTree(rootNode, excl); } /** * * @param rootNode * @param inclusiveNamespaces * @return the rootNode c14n. * @throws CanonicalizationException */ public byte[] engineCanonicalize( XMLSignatureInput rootNode, String inclusiveNamespaces ) throws CanonicalizationException { inclusiveNSSet = InclusiveNamespaces.prefixStr2Set(inclusiveNamespaces); return super.engineCanonicalize(rootNode); } /** * Method engineCanonicalizeXPathNodeSet * @inheritDoc * @param xpathNodeSet * @param inclusiveNamespaces * @throws CanonicalizationException */ public byte[] engineCanonicalizeXPathNodeSet( Set xpathNodeSet, String inclusiveNamespaces ) throws CanonicalizationException { inclusiveNSSet = InclusiveNamespaces.prefixStr2Set(inclusiveNamespaces); return super.engineCanonicalizeXPathNodeSet(xpathNodeSet); } @Override protected Iterator handleAttributesSubtree(Element element, NameSpaceSymbTable ns) throws CanonicalizationException { // result will contain the attrs which have to be output final SortedSet result = this.result; result.clear(); // The prefix visibly utilized (in the attribute or in the name) in // the element SortedSet visiblyUtilized = new TreeSet(); if (inclusiveNSSet != null && !inclusiveNSSet.isEmpty()) { visiblyUtilized.addAll(inclusiveNSSet); } if (element.hasAttributes()) { NamedNodeMap attrs = element.getAttributes(); int attrsLength = attrs.getLength(); for (int i = 0; i < attrsLength; i++) { Attr attribute = (Attr) attrs.item(i); String NName = attribute.getLocalName(); String NNodeValue = attribute.getNodeValue(); if (!XMLNS_URI.equals(attribute.getNamespaceURI())) { // Not a namespace definition. // The Element is output element, add the prefix (if used) to // visiblyUtilized String prefix = attribute.getPrefix(); if (prefix != null && !(prefix.equals(XML) || prefix.equals(XMLNS))) { visiblyUtilized.add(prefix); } // Add to the result. result.add(attribute); } else if (!(XML.equals(NName) && XML_LANG_URI.equals(NNodeValue)) && ns.addMapping(NName, NNodeValue, attribute) && C14nHelper.namespaceIsRelative(NNodeValue)) { // The default mapping for xml must not be output. // New definition check if it is relative. Object exArgs[] = {element.getTagName(), NName, attribute.getNodeValue()}; throw new CanonicalizationException( "c14n.Canonicalizer.RelativeNamespace", exArgs ); } } } String prefix = null; if (element.getNamespaceURI() != null && !(element.getPrefix() == null || element.getPrefix().length() == 0)) { prefix = element.getPrefix(); } else { prefix = XMLNS; } visiblyUtilized.add(prefix); for (String s : visiblyUtilized) { Attr key = ns.getMapping(s); if (key != null) { result.add(key); } } return result.iterator(); } /** * @inheritDoc * @param element * @throws CanonicalizationException */ @Override protected final Iterator handleAttributes(Element element, NameSpaceSymbTable ns) throws CanonicalizationException { // result will contain the attrs which have to be output final SortedSet result = this.result; result.clear(); // The prefix visibly utilized (in the attribute or in the name) in // the element Set visiblyUtilized = null; // It's the output selected. boolean isOutputElement = isVisibleDO(element, ns.getLevel()) == 1; if (isOutputElement) { visiblyUtilized = new TreeSet(); if (inclusiveNSSet != null && !inclusiveNSSet.isEmpty()) { visiblyUtilized.addAll(inclusiveNSSet); } } if (element.hasAttributes()) { NamedNodeMap attrs = element.getAttributes(); int attrsLength = attrs.getLength(); for (int i = 0; i < attrsLength; i++) { Attr attribute = (Attr) attrs.item(i); String NName = attribute.getLocalName(); String NNodeValue = attribute.getNodeValue(); if (!XMLNS_URI.equals(attribute.getNamespaceURI())) { if (isVisible(attribute) && isOutputElement) { // The Element is output element, add the prefix (if used) // to visibyUtilized String prefix = attribute.getPrefix(); if (prefix != null && !(prefix.equals(XML) || prefix.equals(XMLNS))) { visiblyUtilized.add(prefix); } // Add to the result. result.add(attribute); } } else if (isOutputElement && !isVisible(attribute) && !XMLNS.equals(NName)) { ns.removeMappingIfNotRender(NName); } else { if (!isOutputElement && isVisible(attribute) && inclusiveNSSet.contains(NName) && !ns.removeMappingIfRender(NName)) { Node n = ns.addMappingAndRender(NName, NNodeValue, attribute); if (n != null) { result.add((Attr)n); if (C14nHelper.namespaceIsRelative(attribute)) { Object exArgs[] = { element.getTagName(), NName, attribute.getNodeValue() }; throw new CanonicalizationException( "c14n.Canonicalizer.RelativeNamespace", exArgs ); } } } if (ns.addMapping(NName, NNodeValue, attribute) && C14nHelper.namespaceIsRelative(NNodeValue)) { // New definition check if it is relative Object exArgs[] = { element.getTagName(), NName, attribute.getNodeValue() }; throw new CanonicalizationException( "c14n.Canonicalizer.RelativeNamespace", exArgs ); } } } } if (isOutputElement) { // The element is visible, handle the xmlns definition Attr xmlns = element.getAttributeNodeNS(XMLNS_URI, XMLNS); if (xmlns != null && !isVisible(xmlns)) { // There is a definition but the xmlns is not selected by the // xpath. then xmlns="" ns.addMapping(XMLNS, "", nullNode); } String prefix = null; if (element.getNamespaceURI() != null && !(element.getPrefix() == null || element.getPrefix().length() == 0)) { prefix = element.getPrefix(); } else { prefix = XMLNS; } visiblyUtilized.add(prefix); for (String s : visiblyUtilized) { Attr key = ns.getMapping(s); if (key != null) { result.add(key); } } } return result.iterator(); } protected void circumventBugIfNeeded(XMLSignatureInput input) throws CanonicalizationException, ParserConfigurationException, IOException, SAXException { if (!input.isNeedsToBeExpanded() || inclusiveNSSet.isEmpty() || inclusiveNSSet.isEmpty()) { return; } Document doc = null; if (input.getSubNode() != null) { doc = XMLUtils.getOwnerDocument(input.getSubNode()); } else { doc = XMLUtils.getOwnerDocument(input.getNodeSet()); } XMLUtils.circumventBug2650(doc); } } ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer11_OmitComments.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer10000644000175000017500000000237211553001352032216 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.c14n.implementations; import org.apache.xml.security.c14n.Canonicalizer; /** * @author Sean Mullan */ public class Canonicalizer11_OmitComments extends Canonicalizer11 { public Canonicalizer11_OmitComments() { super(false); } public final String engineGetURI() { return Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS; } public final boolean engineGetIncludeComments() { return false; } } ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer20010315.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer20000644000175000017500000003547711610334611032234 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.c14n.implementations; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; import javax.xml.parsers.ParserConfigurationException; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.helper.C14nHelper; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.xml.sax.SAXException; /** * Implements Canonical * XML Version 1.0, a W3C Recommendation from 15 March 2001. * * @author Christian Geuer-Pollmann */ public abstract class Canonicalizer20010315 extends CanonicalizerBase { private static final String XMLNS_URI = Constants.NamespaceSpecNS; private static final String XML_LANG_URI = Constants.XML_LANG_SPACE_SpecNS; private boolean firstCall = true; private final SortedSet result = new TreeSet(COMPARE); private static class XmlAttrStack { static class XmlsStackElement { int level; boolean rendered = false; List nodes = new ArrayList(); }; int currentLevel = 0; int lastlevel = 0; XmlsStackElement cur; List levels = new ArrayList(); void push(int level) { currentLevel = level; if (currentLevel == -1) { return; } cur = null; while (lastlevel >= currentLevel) { levels.remove(levels.size() - 1); int newSize = levels.size(); if (newSize == 0) { lastlevel = 0; return; } lastlevel = (levels.get(newSize - 1)).level; } } void addXmlnsAttr(Attr n) { if (cur == null) { cur = new XmlsStackElement(); cur.level = currentLevel; levels.add(cur); lastlevel = currentLevel; } cur.nodes.add(n); } void getXmlnsAttr(Collection col) { int size = levels.size() - 1; if (cur == null) { cur = new XmlsStackElement(); cur.level = currentLevel; lastlevel = currentLevel; levels.add(cur); } boolean parentRendered = false; XmlsStackElement e = null; if (size == -1) { parentRendered = true; } else { e = levels.get(size); if (e.rendered && e.level + 1 == currentLevel) { parentRendered = true; } } if (parentRendered) { col.addAll(cur.nodes); cur.rendered = true; return; } Map loa = new HashMap(); for (; size >= 0; size--) { e = levels.get(size); Iterator it = e.nodes.iterator(); while (it.hasNext()) { Attr n = it.next(); if (!loa.containsKey(n.getName())) { loa.put(n.getName(), n); } } } cur.rendered = true; col.addAll(loa.values()); } } private XmlAttrStack xmlattrStack = new XmlAttrStack(); /** * Constructor Canonicalizer20010315 * * @param includeComments */ public Canonicalizer20010315(boolean includeComments) { super(includeComments); } /** * Always throws a CanonicalizationException because this is inclusive c14n. * * @param xpathNodeSet * @param inclusiveNamespaces * @return none it always fails * @throws CanonicalizationException always */ public byte[] engineCanonicalizeXPathNodeSet(Set xpathNodeSet, String inclusiveNamespaces) throws CanonicalizationException { /** $todo$ well, should we throw UnsupportedOperationException ? */ throw new CanonicalizationException("c14n.Canonicalizer.UnsupportedOperation"); } /** * Always throws a CanonicalizationException because this is inclusive c14n. * * @param rootNode * @param inclusiveNamespaces * @return none it always fails * @throws CanonicalizationException */ public byte[] engineCanonicalizeSubTree(Node rootNode, String inclusiveNamespaces) throws CanonicalizationException { /** $todo$ well, should we throw UnsupportedOperationException ? */ throw new CanonicalizationException("c14n.Canonicalizer.UnsupportedOperation"); } /** * Returns the Attr[]s to be output for the given element. *
* The code of this method is a copy of {@link #handleAttributes(Element, * NameSpaceSymbTable)}, * whereas it takes into account that subtree-c14n is -- well -- subtree-based. * So if the element in question isRoot of c14n, it's parent is not in the * node set, as well as all other ancestors. * * @param element * @param ns * @return the Attr[]s to be output * @throws CanonicalizationException */ @Override protected Iterator handleAttributesSubtree(Element element, NameSpaceSymbTable ns) throws CanonicalizationException { if (!element.hasAttributes() && !firstCall) { return null; } // result will contain the attrs which have to be output final SortedSet result = this.result; result.clear(); if (element.hasAttributes()) { NamedNodeMap attrs = element.getAttributes(); int attrsLength = attrs.getLength(); for (int i = 0; i < attrsLength; i++) { Attr attribute = (Attr) attrs.item(i); String NUri = attribute.getNamespaceURI(); String NName = attribute.getLocalName(); String NValue = attribute.getValue(); if (!XMLNS_URI.equals(NUri)) { //It's not a namespace attr node. Add to the result and continue. result.add(attribute); } else if (!(XML.equals(NName) && XML_LANG_URI.equals(NValue))) { //The default mapping for xml must not be output. Node n = ns.addMappingAndRender(NName, NValue, attribute); if (n != null) { //Render the ns definition result.add((Attr)n); if (C14nHelper.namespaceIsRelative(attribute)) { Object exArgs[] = { element.getTagName(), NName, attribute.getNodeValue() }; throw new CanonicalizationException( "c14n.Canonicalizer.RelativeNamespace", exArgs ); } } } } } if (firstCall) { //It is the first node of the subtree //Obtain all the namespaces defined in the parents, and added to the output. ns.getUnrenderedNodes(result); //output the attributes in the xml namespace. xmlattrStack.getXmlnsAttr(result); firstCall = false; } return result.iterator(); } /** * Returns the Attr[]s to be output for the given element. *
* IMPORTANT: This method expects to work on a modified DOM tree, i.e. a DOM which has * been prepared using {@link org.apache.xml.security.utils.XMLUtils#circumventBug2650( * org.w3c.dom.Document)}. * * @param element * @param ns * @return the Attr[]s to be output * @throws CanonicalizationException */ @Override protected Iterator handleAttributes(Element element, NameSpaceSymbTable ns) throws CanonicalizationException { // result will contain the attrs which have to be output xmlattrStack.push(ns.getLevel()); boolean isRealVisible = isVisibleDO(element, ns.getLevel()) == 1; final SortedSet result = this.result; result.clear(); if (element.hasAttributes()) { NamedNodeMap attrs = element.getAttributes(); int attrsLength = attrs.getLength(); for (int i = 0; i < attrsLength; i++) { Attr attribute = (Attr) attrs.item(i); String NUri = attribute.getNamespaceURI(); String NName = attribute.getLocalName(); String NValue = attribute.getValue(); if (!XMLNS_URI.equals(NUri)) { //A non namespace definition node. if (XML_LANG_URI.equals(NUri)) { xmlattrStack.addXmlnsAttr(attribute); } else if (isRealVisible) { //The node is visible add the attribute to the list of output attributes. result.add(attribute); } } else if (!XML.equals(NName) || !XML_LANG_URI.equals(NValue)) { /* except omit namespace node with local name xml, which defines * the xml prefix, if its string value is http://www.w3.org/XML/1998/namespace. */ //add the prefix binding to the ns symb table. if (isVisible(attribute)) { if (isRealVisible || !ns.removeMappingIfRender(NName)) { //The xpath select this node output it if needed. Node n = ns.addMappingAndRender(NName, NValue, attribute); if (n != null) { result.add((Attr)n); if (C14nHelper.namespaceIsRelative(attribute)) { Object exArgs[] = { element.getTagName(), NName, attribute.getNodeValue() }; throw new CanonicalizationException( "c14n.Canonicalizer.RelativeNamespace", exArgs ); } } } } else { if (isRealVisible && !XMLNS.equals(NName)) { ns.removeMapping(NName); } else { ns.addMapping(NName, NValue, attribute); } } } } } if (isRealVisible) { //The element is visible, handle the xmlns definition Attr xmlns = element.getAttributeNodeNS(XMLNS_URI, XMLNS); Node n = null; if (xmlns == null) { //No xmlns def just get the already defined. n = ns.getMapping(XMLNS); } else if (!isVisible(xmlns)) { //There is a definition but the xmlns is not selected by the xpath. //then xmlns="" n = ns.addMappingAndRender(XMLNS, "", nullNode); } //output the xmlns def if needed. if (n != null) { result.add((Attr)n); } //Float all xml:* attributes of the unselected parent elements to this one. xmlattrStack.getXmlnsAttr(result); ns.getUnrenderedNodes(result); } return result.iterator(); } protected void circumventBugIfNeeded(XMLSignatureInput input) throws CanonicalizationException, ParserConfigurationException, IOException, SAXException { if (!input.isNeedsToBeExpanded()) { return; } Document doc = null; if (input.getSubNode() != null) { doc = XMLUtils.getOwnerDocument(input.getSubNode()); } else { doc = XMLUtils.getOwnerDocument(input.getNodeSet()); } XMLUtils.circumventBug2650(doc); } @Override protected void handleParent(Element e, NameSpaceSymbTable ns) { if (!e.hasAttributes() && e.getNamespaceURI() == null) { return; } xmlattrStack.push(-1); NamedNodeMap attrs = e.getAttributes(); int attrsLength = attrs.getLength(); for (int i = 0; i < attrsLength; i++) { Attr attribute = (Attr) attrs.item(i); String NName = attribute.getLocalName(); String NValue = attribute.getNodeValue(); if (Constants.NamespaceSpecNS.equals(attribute.getNamespaceURI())) { if (!XML.equals(NName) || !Constants.XML_LANG_SPACE_SpecNS.equals(NValue)) { ns.addMapping(NName, NValue, attribute); } } else if (XML_LANG_URI.equals(attribute.getNamespaceURI())) { xmlattrStack.addXmlnsAttr(attribute); } } if (e.getNamespaceURI() != null) { String NName = e.getPrefix(); String NValue = e.getNamespaceURI(); String Name; if (NName == null || NName.equals("")) { NName = "xmlns"; Name = "xmlns"; } else { Name = "xmlns:" + NName; } Attr n = e.getOwnerDocument().createAttributeNS("http://www.w3.org/2000/xmlns/", Name); n.setValue(NValue); ns.addMapping(NName, NValue, n); } } } ././@LongLink0000000000000000000000000000020100000000000011556 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer20010315ExclOmitComments.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer20000644000175000017500000000250011553001352032210 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.c14n.implementations; import org.apache.xml.security.c14n.Canonicalizer; public class Canonicalizer20010315ExclOmitComments extends Canonicalizer20010315Excl { /** * */ public Canonicalizer20010315ExclOmitComments() { super(false); } /** @inheritDoc */ public final String engineGetURI() { return Canonicalizer.ALGO_ID_C14N_EXCL_OMIT_COMMENTS; } /** @inheritDoc */ public final boolean engineGetIncludeComments() { return false; } } ././@LongLink0000000000000000000000000000020100000000000011556 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer20010315ExclWithComments.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer20000644000175000017500000000265511553001352032223 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.c14n.implementations; import org.apache.xml.security.c14n.Canonicalizer; /** * Class Canonicalizer20010315ExclWithComments */ public class Canonicalizer20010315ExclWithComments extends Canonicalizer20010315Excl { /** * Constructor Canonicalizer20010315ExclWithComments * */ public Canonicalizer20010315ExclWithComments() { super(true); } /** @inheritDoc */ public final String engineGetURI() { return Canonicalizer.ALGO_ID_C14N_EXCL_WITH_COMMENTS; } /** @inheritDoc */ public final boolean engineGetIncludeComments() { return true; } } ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer20010315OmitComments.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer20000644000175000017500000000263011553001352032214 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.c14n.implementations; import org.apache.xml.security.c14n.Canonicalizer; /** * @author Christian Geuer-Pollmann */ public class Canonicalizer20010315OmitComments extends Canonicalizer20010315 { /** * Constructor Canonicalizer20010315WithXPathOmitComments * */ public Canonicalizer20010315OmitComments() { super(false); } /** @inheritDoc */ public final String engineGetURI() { return Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS; } /** @inheritDoc */ public final boolean engineGetIncludeComments() { return false; } } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/NameSpaceSymbTable.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/NameSpaceSymbT0000644000175000017500000002750511750472047032210 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.c14n.implementations; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; import org.w3c.dom.Attr; import org.w3c.dom.Node; /** * A stack based Symbol Table. *
For speed reasons all the symbols are introduced in the same map, * and at the same time in a list so it can be removed when the frame is pop back. * @author Raul Benito */ public class NameSpaceSymbTable { private static final String XMLNS = "xmlns"; private static final SymbMap initialMap = new SymbMap(); static { NameSpaceSymbEntry ne = new NameSpaceSymbEntry("", null, true, XMLNS); ne.lastrendered = ""; initialMap.put(XMLNS, ne); } /**The map betwen prefix-> entry table. */ private SymbMap symb; /**The stacks for removing the definitions when doing pop.*/ private List level; private boolean cloned = true; /** * Default constractor **/ public NameSpaceSymbTable() { level = new ArrayList(); //Insert the default binding for xmlns. symb = (SymbMap) initialMap.clone(); } /** * Get all the unrendered nodes in the name space. * For Inclusive rendering * @param result the list where to fill the unrendered xmlns definitions. **/ public void getUnrenderedNodes(Collection result) { Iterator it = symb.entrySet().iterator(); while (it.hasNext()) { NameSpaceSymbEntry n = it.next(); //put them rendered? if ((!n.rendered) && (n.n != null)) { n = (NameSpaceSymbEntry) n.clone(); needsClone(); symb.put(n.prefix, n); n.lastrendered = n.uri; n.rendered = true; result.add(n.n); } } } /** * Push a frame for visible namespace. * For Inclusive rendering. **/ public void outputNodePush() { push(); } /** * Pop a frame for visible namespace. **/ public void outputNodePop() { pop(); } /** * Push a frame for a node. * Inclusive or Exclusive. **/ public void push() { //Put the number of namespace definitions in the stack. level.add(null); cloned = false; } /** * Pop a frame. * Inclusive or Exclusive. **/ public void pop() { int size = level.size() - 1; Object ob = level.remove(size); if (ob != null) { symb = (SymbMap)ob; if (size == 0) { cloned = false; } else { cloned = (level.get(size - 1) != symb); } } else { cloned = false; } } final void needsClone() { if (!cloned) { level.set(level.size() - 1, symb); symb = (SymbMap) symb.clone(); cloned = true; } } /** * Gets the attribute node that defines the binding for the prefix. * @param prefix the prefix to obtain the attribute. * @return null if there is no need to render the prefix. Otherwise the node of * definition. **/ public Attr getMapping(String prefix) { NameSpaceSymbEntry entry = symb.get(prefix); if (entry == null) { //There is no definition for the prefix(a bug?). return null; } if (entry.rendered) { //No need to render an entry already rendered. return null; } // Mark this entry as render. entry = (NameSpaceSymbEntry) entry.clone(); needsClone(); symb.put(prefix, entry); entry.rendered = true; entry.lastrendered = entry.uri; // Return the node for outputing. return entry.n; } /** * Gets a definition without mark it as render. * For render in exclusive c14n the namespaces in the include prefixes. * @param prefix The prefix whose definition is neaded. * @return the attr to render, null if there is no need to render **/ public Attr getMappingWithoutRendered(String prefix) { NameSpaceSymbEntry entry = symb.get(prefix); if (entry == null) { return null; } if (entry.rendered) { return null; } return entry.n; } /** * Adds the mapping for a prefix. * @param prefix the prefix of definition * @param uri the Uri of the definition * @param n the attribute that have the definition * @return true if there is already defined. **/ public boolean addMapping(String prefix, String uri, Attr n) { NameSpaceSymbEntry ob = symb.get(prefix); if ((ob != null) && uri.equals(ob.uri)) { //If we have it previously defined. Don't keep working. return false; } //Creates and entry in the table for this new definition. NameSpaceSymbEntry ne = new NameSpaceSymbEntry(uri, n, false, prefix); needsClone(); symb.put(prefix, ne); if (ob != null) { //We have a previous definition store it for the pop. //Check if a previous definition(not the inmidiatly one) has been rendered. ne.lastrendered = ob.lastrendered; if ((ob.lastrendered != null) && (ob.lastrendered.equals(uri))) { //Yes it is. Mark as rendered. ne.rendered = true; } } return true; } /** * Adds a definition and mark it as render. * For inclusive c14n. * @param prefix the prefix of definition * @param uri the Uri of the definition * @param n the attribute that have the definition * @return the attr to render, null if there is no need to render **/ public Node addMappingAndRender(String prefix, String uri, Attr n) { NameSpaceSymbEntry ob = symb.get(prefix); if ((ob != null) && uri.equals(ob.uri)) { if (!ob.rendered) { ob = (NameSpaceSymbEntry) ob.clone(); needsClone(); symb.put(prefix, ob); ob.lastrendered = uri; ob.rendered = true; return ob.n; } return null; } NameSpaceSymbEntry ne = new NameSpaceSymbEntry(uri,n,true,prefix); ne.lastrendered = uri; needsClone(); symb.put(prefix, ne); if ((ob != null) && (ob.lastrendered != null) && (ob.lastrendered.equals(uri))) { ne.rendered = true; return null; } return ne.n; } public int getLevel() { return level.size(); } public void removeMapping(String prefix) { NameSpaceSymbEntry ob = symb.get(prefix); if (ob != null) { needsClone(); symb.put(prefix, null); } } public void removeMappingIfNotRender(String prefix) { NameSpaceSymbEntry ob = symb.get(prefix); if (ob != null && !ob.rendered) { needsClone(); symb.put(prefix, null); } } public boolean removeMappingIfRender(String prefix) { NameSpaceSymbEntry ob = symb.get(prefix); if (ob != null && ob.rendered) { needsClone(); symb.put(prefix, null); } return false; } } /** * The internal structure of NameSpaceSymbTable. **/ class NameSpaceSymbEntry implements Cloneable { String prefix; /**The URI that the prefix defines */ String uri; /**The last output in the URI for this prefix (This for speed reason).*/ String lastrendered = null; /**This prefix-URI has been already render or not.*/ boolean rendered = false; /**The attribute to include.*/ Attr n; NameSpaceSymbEntry(String name, Attr n, boolean rendered, String prefix) { this.uri = name; this.rendered = rendered; this.n = n; this.prefix = prefix; } /** @inheritDoc */ public Object clone() { try { return super.clone(); } catch (CloneNotSupportedException e) { return null; } } }; class SymbMap implements Cloneable { int free = 23; NameSpaceSymbEntry[] entries; String[] keys; SymbMap() { entries = new NameSpaceSymbEntry[free]; keys = new String[free]; } void put(String key, NameSpaceSymbEntry value) { int index = index(key); Object oldKey = keys[index]; keys[index] = key; entries[index] = value; if ((oldKey == null || !oldKey.equals(key)) && (--free == 0)) { free = entries.length; int newCapacity = free << 2; rehash(newCapacity); } } List entrySet() { List a = new ArrayList(); for (int i = 0;i < entries.length;i++) { if ((entries[i] != null) && !("".equals(entries[i].uri))) { a.add(entries[i]); } } return a; } protected int index(Object obj) { Object[] set = keys; int length = set.length; //abs of index int index = (obj.hashCode() & 0x7fffffff) % length; Object cur = set[index]; if (cur == null || (cur.equals(obj))) { return index; } length--; do { index = index == length ? 0 : ++index; cur = set[index]; } while (cur != null && (!cur.equals(obj))); return index; } /** * rehashes the map to the new capacity. * * @param newCapacity an int value */ protected void rehash(int newCapacity) { int oldCapacity = keys.length; String oldKeys[] = keys; NameSpaceSymbEntry oldVals[] = entries; keys = new String[newCapacity]; entries = new NameSpaceSymbEntry[newCapacity]; for (int i = oldCapacity; i-- > 0;) { if (oldKeys[i] != null) { String o = oldKeys[i]; int index = index(o); keys[index] = o; entries[index] = oldVals[i]; } } } NameSpaceSymbEntry get(String key) { return entries[index(key)]; } protected Object clone() { try { SymbMap copy = (SymbMap) super.clone(); copy.entries = new NameSpaceSymbEntry[entries.length]; System.arraycopy(entries, 0, copy.entries, 0, entries.length); copy.keys = new String[keys.length]; System.arraycopy(keys, 0, copy.keys, 0, keys.length); return copy; } catch (CloneNotSupportedException e) { e.printStackTrace(); } return null; } } ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer20010315WithComments.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer20000644000175000017500000000261711553001352032221 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.c14n.implementations; import org.apache.xml.security.c14n.Canonicalizer; /** * @author Christian Geuer-Pollmann */ public class Canonicalizer20010315WithComments extends Canonicalizer20010315 { /** * Constructor Canonicalizer20010315WithXPathWithComments */ public Canonicalizer20010315WithComments() { super(true); } /** @inheritDoc */ public final String engineGetURI() { return Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS; } /** @inheritDoc */ public final boolean engineGetIncludeComments() { return true; } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/InvalidCanonicalizerException.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/InvalidCanonicalizerException.0000644000175000017500000000420411553001352032165 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.c14n; import org.apache.xml.security.exceptions.XMLSecurityException; public class InvalidCanonicalizerException extends XMLSecurityException { /** * */ private static final long serialVersionUID = 1L; /** * Constructor InvalidCanonicalizerException * */ public InvalidCanonicalizerException() { super(); } /** * Constructor InvalidCanonicalizerException * * @param msgID */ public InvalidCanonicalizerException(String msgID) { super(msgID); } /** * Constructor InvalidCanonicalizerException * * @param msgID * @param exArgs */ public InvalidCanonicalizerException(String msgID, Object exArgs[]) { super(msgID, exArgs); } /** * Constructor InvalidCanonicalizerException * * @param msgID * @param originalException */ public InvalidCanonicalizerException(String msgID, Exception originalException) { super(msgID, originalException); } /** * Constructor InvalidCanonicalizerException * * @param msgID * @param exArgs * @param originalException */ public InvalidCanonicalizerException( String msgID, Object exArgs[], Exception originalException ) { super(msgID, exArgs, originalException); } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/Canonicalizer.java0000644000175000017500000003435212234743735027667 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.c14n; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.io.OutputStream; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import javax.xml.parsers.DocumentBuilder; import org.apache.xml.security.c14n.implementations.Canonicalizer11_OmitComments; import org.apache.xml.security.c14n.implementations.Canonicalizer11_WithComments; import org.apache.xml.security.c14n.implementations.Canonicalizer20010315ExclOmitComments; import org.apache.xml.security.c14n.implementations.Canonicalizer20010315ExclWithComments; import org.apache.xml.security.c14n.implementations.Canonicalizer20010315OmitComments; import org.apache.xml.security.c14n.implementations.Canonicalizer20010315WithComments; import org.apache.xml.security.c14n.implementations.CanonicalizerPhysical; import org.apache.xml.security.exceptions.AlgorithmAlreadyRegisteredException; import org.apache.xml.security.utils.ClassLoaderUtils; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.InputSource; /** * * @author Christian Geuer-Pollmann */ public class Canonicalizer { /** The output encoding of canonicalized data */ public static final String ENCODING = "UTF8"; /** * XPath Expression for selecting every node and continuous comments joined * in only one node */ public static final String XPATH_C14N_WITH_COMMENTS_SINGLE_NODE = "(.//. | .//@* | .//namespace::*)"; /** * The URL defined in XML-SEC Rec for inclusive c14n without comments. */ public static final String ALGO_ID_C14N_OMIT_COMMENTS = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"; /** * The URL defined in XML-SEC Rec for inclusive c14n with comments. */ public static final String ALGO_ID_C14N_WITH_COMMENTS = ALGO_ID_C14N_OMIT_COMMENTS + "#WithComments"; /** * The URL defined in XML-SEC Rec for exclusive c14n without comments. */ public static final String ALGO_ID_C14N_EXCL_OMIT_COMMENTS = "http://www.w3.org/2001/10/xml-exc-c14n#"; /** * The URL defined in XML-SEC Rec for exclusive c14n with comments. */ public static final String ALGO_ID_C14N_EXCL_WITH_COMMENTS = ALGO_ID_C14N_EXCL_OMIT_COMMENTS + "WithComments"; /** * The URI for inclusive c14n 1.1 without comments. */ public static final String ALGO_ID_C14N11_OMIT_COMMENTS = "http://www.w3.org/2006/12/xml-c14n11"; /** * The URI for inclusive c14n 1.1 with comments. */ public static final String ALGO_ID_C14N11_WITH_COMMENTS = ALGO_ID_C14N11_OMIT_COMMENTS + "#WithComments"; /** * Non-standard algorithm to serialize the physical representation for XML Encryption */ public static final String ALGO_ID_C14N_PHYSICAL = "http://santuario.apache.org/c14n/physical"; private static Map> canonicalizerHash = new ConcurrentHashMap>(); private final CanonicalizerSpi canonicalizerSpi; private boolean secureValidation; /** * Constructor Canonicalizer * * @param algorithmURI * @throws InvalidCanonicalizerException */ private Canonicalizer(String algorithmURI) throws InvalidCanonicalizerException { try { Class implementingClass = canonicalizerHash.get(algorithmURI); canonicalizerSpi = implementingClass.newInstance(); canonicalizerSpi.reset = true; } catch (Exception e) { Object exArgs[] = { algorithmURI }; throw new InvalidCanonicalizerException( "signature.Canonicalizer.UnknownCanonicalizer", exArgs, e ); } } /** * Method getInstance * * @param algorithmURI * @return a Canonicalizer instance ready for the job * @throws InvalidCanonicalizerException */ public static final Canonicalizer getInstance(String algorithmURI) throws InvalidCanonicalizerException { return new Canonicalizer(algorithmURI); } /** * Method register * * @param algorithmURI * @param implementingClass * @throws AlgorithmAlreadyRegisteredException */ @SuppressWarnings("unchecked") public static void register(String algorithmURI, String implementingClass) throws AlgorithmAlreadyRegisteredException, ClassNotFoundException { // check whether URI is already registered Class registeredClass = canonicalizerHash.get(algorithmURI); if (registeredClass != null) { Object exArgs[] = { algorithmURI, registeredClass }; throw new AlgorithmAlreadyRegisteredException("algorithm.alreadyRegistered", exArgs); } canonicalizerHash.put( algorithmURI, (Class) ClassLoaderUtils.loadClass(implementingClass, Canonicalizer.class) ); } /** * Method register * * @param algorithmURI * @param implementingClass * @throws AlgorithmAlreadyRegisteredException */ public static void register(String algorithmURI, Class implementingClass) throws AlgorithmAlreadyRegisteredException, ClassNotFoundException { // check whether URI is already registered Class registeredClass = canonicalizerHash.get(algorithmURI); if (registeredClass != null) { Object exArgs[] = { algorithmURI, registeredClass }; throw new AlgorithmAlreadyRegisteredException("algorithm.alreadyRegistered", exArgs); } canonicalizerHash.put(algorithmURI, implementingClass); } /** * This method registers the default algorithms. */ public static void registerDefaultAlgorithms() { canonicalizerHash.put( Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS, Canonicalizer20010315OmitComments.class ); canonicalizerHash.put( Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS, Canonicalizer20010315WithComments.class ); canonicalizerHash.put( Canonicalizer.ALGO_ID_C14N_EXCL_OMIT_COMMENTS, Canonicalizer20010315ExclOmitComments.class ); canonicalizerHash.put( Canonicalizer.ALGO_ID_C14N_EXCL_WITH_COMMENTS, Canonicalizer20010315ExclWithComments.class ); canonicalizerHash.put( Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS, Canonicalizer11_OmitComments.class ); canonicalizerHash.put( Canonicalizer.ALGO_ID_C14N11_WITH_COMMENTS, Canonicalizer11_WithComments.class ); canonicalizerHash.put( Canonicalizer.ALGO_ID_C14N_PHYSICAL, CanonicalizerPhysical.class ); } /** * Method getURI * * @return the URI defined for this c14n instance. */ public final String getURI() { return canonicalizerSpi.engineGetURI(); } /** * Method getIncludeComments * * @return true if the c14n respect the comments. */ public boolean getIncludeComments() { return canonicalizerSpi.engineGetIncludeComments(); } /** * This method tries to canonicalize the given bytes. It's possible to even * canonicalize non-wellformed sequences if they are well-formed after being * wrapped with a >a<...>/a<. * * @param inputBytes * @return the result of the canonicalization. * @throws CanonicalizationException * @throws java.io.IOException * @throws javax.xml.parsers.ParserConfigurationException * @throws org.xml.sax.SAXException */ public byte[] canonicalize(byte[] inputBytes) throws javax.xml.parsers.ParserConfigurationException, java.io.IOException, org.xml.sax.SAXException, CanonicalizationException { InputStream bais = new ByteArrayInputStream(inputBytes); InputSource in = new InputSource(bais); // needs to validate for ID attribute normalization DocumentBuilder db = XMLUtils.createDocumentBuilder(true, secureValidation); /* * for some of the test vectors from the specification, * there has to be a validating parser for ID attributes, default * attribute values, NMTOKENS, etc. * Unfortunately, the test vectors do use different DTDs or * even no DTD. So Xerces 1.3.1 fires many warnings about using * ErrorHandlers. * * Text from the spec: * * The input octet stream MUST contain a well-formed XML document, * but the input need not be validated. However, the attribute * value normalization and entity reference resolution MUST be * performed in accordance with the behaviors of a validating * XML processor. As well, nodes for default attributes (declared * in the ATTLIST with an AttValue but not specified) are created * in each element. Thus, the declarations in the document type * declaration are used to help create the canonical form, even * though the document type declaration is not retained in the * canonical form. */ db.setErrorHandler(new org.apache.xml.security.utils.IgnoreAllErrorHandler()); Document document = db.parse(in); return this.canonicalizeSubtree(document); } /** * Canonicalizes the subtree rooted by node. * * @param node The node to canonicalize * @return the result of the c14n. * * @throws CanonicalizationException */ public byte[] canonicalizeSubtree(Node node) throws CanonicalizationException { canonicalizerSpi.secureValidation = secureValidation; return canonicalizerSpi.engineCanonicalizeSubTree(node); } /** * Canonicalizes the subtree rooted by node. * * @param node * @param inclusiveNamespaces * @return the result of the c14n. * @throws CanonicalizationException */ public byte[] canonicalizeSubtree(Node node, String inclusiveNamespaces) throws CanonicalizationException { canonicalizerSpi.secureValidation = secureValidation; return canonicalizerSpi.engineCanonicalizeSubTree(node, inclusiveNamespaces); } /** * Canonicalizes an XPath node set. The xpathNodeSet is treated * as a list of XPath nodes, not as a list of subtrees. * * @param xpathNodeSet * @return the result of the c14n. * @throws CanonicalizationException */ public byte[] canonicalizeXPathNodeSet(NodeList xpathNodeSet) throws CanonicalizationException { canonicalizerSpi.secureValidation = secureValidation; return canonicalizerSpi.engineCanonicalizeXPathNodeSet(xpathNodeSet); } /** * Canonicalizes an XPath node set. The xpathNodeSet is treated * as a list of XPath nodes, not as a list of subtrees. * * @param xpathNodeSet * @param inclusiveNamespaces * @return the result of the c14n. * @throws CanonicalizationException */ public byte[] canonicalizeXPathNodeSet( NodeList xpathNodeSet, String inclusiveNamespaces ) throws CanonicalizationException { canonicalizerSpi.secureValidation = secureValidation; return canonicalizerSpi.engineCanonicalizeXPathNodeSet(xpathNodeSet, inclusiveNamespaces); } /** * Canonicalizes an XPath node set. * * @param xpathNodeSet * @return the result of the c14n. * @throws CanonicalizationException */ public byte[] canonicalizeXPathNodeSet(Set xpathNodeSet) throws CanonicalizationException { canonicalizerSpi.secureValidation = secureValidation; return canonicalizerSpi.engineCanonicalizeXPathNodeSet(xpathNodeSet); } /** * Canonicalizes an XPath node set. * * @param xpathNodeSet * @param inclusiveNamespaces * @return the result of the c14n. * @throws CanonicalizationException */ public byte[] canonicalizeXPathNodeSet( Set xpathNodeSet, String inclusiveNamespaces ) throws CanonicalizationException { canonicalizerSpi.secureValidation = secureValidation; return canonicalizerSpi.engineCanonicalizeXPathNodeSet(xpathNodeSet, inclusiveNamespaces); } /** * Sets the writer where the canonicalization ends. ByteArrayOutputStream * if none is set. * @param os */ public void setWriter(OutputStream os) { canonicalizerSpi.setWriter(os); } /** * Returns the name of the implementing {@link CanonicalizerSpi} class * * @return the name of the implementing {@link CanonicalizerSpi} class */ public String getImplementingCanonicalizerClass() { return canonicalizerSpi.getClass().getName(); } /** * Set the canonicalizer behaviour to not reset. */ public void notReset() { canonicalizerSpi.reset = false; } public boolean isSecureValidation() { return secureValidation; } public void setSecureValidation(boolean secureValidation) { this.secureValidation = secureValidation; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/helper/0000755000175000017500000000000012273503734025507 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/helper/package.html0000644000175000017500000000013207533712503027763 0ustar tonytony

helper classes for canonicalization.

libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/helper/C14nHelper.java0000644000175000017500000001124411562205550030214 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.c14n.helper; import org.apache.xml.security.c14n.CanonicalizationException; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; /** * Temporary swapped static functions from the normalizer Section * * @author Christian Geuer-Pollmann */ public class C14nHelper { /** * Constructor C14nHelper * */ private C14nHelper() { // don't allow instantiation } /** * Method namespaceIsRelative * * @param namespace * @return true if the given namespace is relative. */ public static boolean namespaceIsRelative(Attr namespace) { return !namespaceIsAbsolute(namespace); } /** * Method namespaceIsRelative * * @param namespaceValue * @return true if the given namespace is relative. */ public static boolean namespaceIsRelative(String namespaceValue) { return !namespaceIsAbsolute(namespaceValue); } /** * Method namespaceIsAbsolute * * @param namespace * @return true if the given namespace is absolute. */ public static boolean namespaceIsAbsolute(Attr namespace) { return namespaceIsAbsolute(namespace.getValue()); } /** * Method namespaceIsAbsolute * * @param namespaceValue * @return true if the given namespace is absolute. */ public static boolean namespaceIsAbsolute(String namespaceValue) { // assume empty namespaces are absolute if (namespaceValue.length() == 0) { return true; } return namespaceValue.indexOf(':') > 0; } /** * This method throws an exception if the Attribute value contains * a relative URI. * * @param attr * @throws CanonicalizationException */ public static void assertNotRelativeNS(Attr attr) throws CanonicalizationException { if (attr == null) { return; } String nodeAttrName = attr.getNodeName(); boolean definesDefaultNS = nodeAttrName.equals("xmlns"); boolean definesNonDefaultNS = nodeAttrName.startsWith("xmlns:"); if ((definesDefaultNS || definesNonDefaultNS) && namespaceIsRelative(attr)) { String parentName = attr.getOwnerElement().getTagName(); String attrValue = attr.getValue(); Object exArgs[] = { parentName, nodeAttrName, attrValue }; throw new CanonicalizationException( "c14n.Canonicalizer.RelativeNamespace", exArgs ); } } /** * This method throws a CanonicalizationException if the supplied Document * is not able to be traversed using a TreeWalker. * * @param document * @throws CanonicalizationException */ public static void checkTraversability(Document document) throws CanonicalizationException { if (!document.isSupported("Traversal", "2.0")) { Object exArgs[] = {document.getImplementation().getClass().getName() }; throw new CanonicalizationException( "c14n.Canonicalizer.TraversalNotSupported", exArgs ); } } /** * This method throws a CanonicalizationException if the supplied Element * contains any relative namespaces. * * @param ctxNode * @throws CanonicalizationException * @see C14nHelper#assertNotRelativeNS(Attr) */ public static void checkForRelativeNamespace(Element ctxNode) throws CanonicalizationException { if (ctxNode != null) { NamedNodeMap attributes = ctxNode.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { C14nHelper.assertNotRelativeNS((Attr) attributes.item(i)); } } else { throw new CanonicalizationException("Called checkForRelativeNamespace() on null"); } } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/helper/AttrCompare.java0000644000175000017500000001041611750472047030576 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.c14n.helper; import org.apache.xml.security.utils.Constants; import org.w3c.dom.Attr; import java.io.Serializable; import java.util.Comparator; /** * Compares two attributes based on the C14n specification. * *
    *
  • Namespace nodes have a lesser document order position than attribute * nodes. *
  • An element's namespace nodes are sorted lexicographically by * local name (the default namespace node, if one exists, has no * local name and is therefore lexicographically least). *
  • An element's attribute nodes are sorted lexicographically with * namespace URI as the primary key and local name as the secondary * key (an empty namespace URI is lexicographically least). *
* * @author Christian Geuer-Pollmann */ public class AttrCompare implements Comparator, Serializable { private static final long serialVersionUID = -7113259629930576230L; private static final int ATTR0_BEFORE_ATTR1 = -1; private static final int ATTR1_BEFORE_ATTR0 = 1; private static final String XMLNS = Constants.NamespaceSpecNS; /** * Compares two attributes based on the C14n specification. * *
    *
  • Namespace nodes have a lesser document order position than * attribute nodes. *
  • An element's namespace nodes are sorted lexicographically by * local name (the default namespace node, if one exists, has no * local name and is therefore lexicographically least). *
  • An element's attribute nodes are sorted lexicographically with * namespace URI as the primary key and local name as the secondary * key (an empty namespace URI is lexicographically least). *
* * @param attr0 * @param attr1 * @return returns a negative integer, zero, or a positive integer as * obj0 is less than, equal to, or greater than obj1 * */ public int compare(Attr attr0, Attr attr1) { String namespaceURI0 = attr0.getNamespaceURI(); String namespaceURI1 = attr1.getNamespaceURI(); boolean isNamespaceAttr0 = XMLNS.equals(namespaceURI0); boolean isNamespaceAttr1 = XMLNS.equals(namespaceURI1); if (isNamespaceAttr0) { if (isNamespaceAttr1) { // both are namespaces String localname0 = attr0.getLocalName(); String localname1 = attr1.getLocalName(); if ("xmlns".equals(localname0)) { localname0 = ""; } if ("xmlns".equals(localname1)) { localname1 = ""; } return localname0.compareTo(localname1); } // attr0 is a namespace, attr1 is not return ATTR0_BEFORE_ATTR1; } else if (isNamespaceAttr1) { // attr1 is a namespace, attr0 is not return ATTR1_BEFORE_ATTR0; } // none is a namespace if (namespaceURI0 == null) { if (namespaceURI1 == null) { String name0 = attr0.getName(); String name1 = attr1.getName(); return name0.compareTo(name1); } return ATTR0_BEFORE_ATTR1; } else if (namespaceURI1 == null) { return ATTR1_BEFORE_ATTR0; } int a = namespaceURI0.compareTo(namespaceURI1); if (a != 0) { return a; } return (attr0.getLocalName()).compareTo(attr1.getLocalName()); } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/c14n/CanonicalizationException.java0000644000175000017500000000425211553001352032227 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.c14n; import org.apache.xml.security.exceptions.XMLSecurityException; /** * Class CanonicalizationException * * @author Christian Geuer-Pollmann */ public class CanonicalizationException extends XMLSecurityException { /** * */ private static final long serialVersionUID = 1L; /** * Constructor CanonicalizationException * */ public CanonicalizationException() { super(); } /** * Constructor CanonicalizationException * * @param msgID */ public CanonicalizationException(String msgID) { super(msgID); } /** * Constructor CanonicalizationException * * @param msgID * @param exArgs */ public CanonicalizationException(String msgID, Object exArgs[]) { super(msgID, exArgs); } /** * Constructor CanonicalizationException * * @param msgID * @param originalException */ public CanonicalizationException(String msgID, Exception originalException) { super(msgID, originalException); } /** * Constructor CanonicalizationException * * @param msgID * @param exArgs * @param originalException */ public CanonicalizationException( String msgID, Object exArgs[], Exception originalException ) { super(msgID, exArgs, originalException); } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/encryption/0000755000175000017500000000000012273503734025655 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/encryption/EncryptionProperty.java0000644000175000017500000000704211622706432032417 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.encryption; import java.util.Iterator; import org.w3c.dom.Element; /** * Additional information items concerning the generation of the * EncryptedData or EncryptedKey can be placed in an * EncryptionProperty element (e.g., date/time stamp or the serial * number of cryptographic hardware used during encryption). The Target * attribute identifies the EncryptedType structure being * described. anyAttribute permits the inclusion of attributes from the XML * namespace to be included (i.e., xml:space, * xml:lang, and xml:base). *

* It is defined as follows: *

* <element name='EncryptionProperty' type='xenc:EncryptionPropertyType'/> * <complexType name='EncryptionPropertyType' mixed='true'> * <choice maxOccurs='unbounded'> * <any namespace='##other' processContents='lax'/> * </choice> * <attribute name='Target' type='anyURI' use='optional'/> * <attribute name='Id' type='ID' use='optional'/> * <anyAttribute namespace="http://www.w3.org/XML/1998/namespace"/> * </complexType> * * * @author Axl Mattheus */ public interface EncryptionProperty { /** * Returns the EncryptedType being described. * * @return the EncryptedType being described by this * EncryptionProperty. */ String getTarget(); /** * Sets the target. * * @param target */ void setTarget(String target); /** * Returns the id of the EncryptionProperty. * * @return the id. */ String getId(); /** * Sets the id. * * @param id */ void setId(String id); /** * Returns the attribute's value in the xml namespace. * * @param attribute * @return the attribute's value. */ String getAttribute(String attribute); /** * Set the attribute value. * * @param attribute the attribute's name. * @param value the attribute's value. */ void setAttribute(String attribute, String value); /** * Returns the properties of the EncryptionProperty. * * @return an Iterator over all the additional encryption * information contained in this class. */ Iterator getEncryptionInformation(); /** * Adds encryption information. * * @param information the additional encryption information. */ void addEncryptionInformation(Element information); /** * Removes encryption information. * * @param information the information to remove. */ void removeEncryptionInformation(Element information); } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/encryption/package.html0000644000175000017500000000234107635721353030143 0ustar tonytony Provides classes for implementing XML Encryption applications. There are two main families of classes in this package. The first group of classes is an XML Schema to Java mapping of  the complex types and elements of the XML Encryption Schema as outllined at XML Encrtypyion Specification. The second group of classes are used to perform encryption operations, and to manipulate the first group of classes. The most important classes in this second group is XMLCipher, XMLEncryptionFactory and XMLSerializer. XMLCipher was designed to resemble javax.crypto.Cipher. The aforementioned classes were desinged with ease-of-use and configurability in mind. Becuase of this, the programmer may at times be exposed to lower level programming tasks. This library strives to be as simple as possible to use, but no simpler.

././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/encryption/XMLEncryptionException.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/encryption/XMLEncryptionException.j0000644000175000017500000000362111553001352032411 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.encryption; import org.apache.xml.security.exceptions.XMLSecurityException; /** * */ public class XMLEncryptionException extends XMLSecurityException { /** * */ private static final long serialVersionUID = 1L; /** * * */ public XMLEncryptionException() { super(); } /** * * @param msgID */ public XMLEncryptionException(String msgID) { super(msgID); } /** * * @param msgID * @param exArgs */ public XMLEncryptionException(String msgID, Object exArgs[]) { super(msgID, exArgs); } /** * * @param msgID * @param originalException */ public XMLEncryptionException(String msgID, Exception originalException) { super(msgID, originalException); } /** * * @param msgID * @param exArgs * @param originalException */ public XMLEncryptionException(String msgID, Object exArgs[], Exception originalException) { super(msgID, exArgs, originalException); } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/encryption/AbstractSerializer.java0000644000175000017500000002325312234743735032326 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.encryption; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.UnsupportedEncodingException; import java.util.HashMap; import java.util.Map; import org.apache.xml.security.c14n.Canonicalizer; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * Converts Strings into Nodes and visa versa. * * An abstract class for common Serializer functionality */ public abstract class AbstractSerializer implements Serializer { protected Canonicalizer canon; protected boolean secureValidation; public void setCanonicalizer(Canonicalizer canon) { this.canon = canon; } /** * Returns a String representation of the specified * Element. *

* Refer also to comments about setup of format. * * @param element the Element to serialize. * @return the String representation of the serilaized * Element. * @throws Exception */ @Deprecated public String serialize(Element element) throws Exception { return canonSerialize(element); } /** * Returns a byte[] representation of the specified * Element. * * @param element the Element to serialize. * @return the byte[] representation of the serilaized * Element. * @throws Exception */ public byte[] serializeToByteArray(Element element) throws Exception { return canonSerializeToByteArray(element); } /** * Returns a String representation of the specified * NodeList. *

* This is a special case because the NodeList may represent a * DocumentFragment. A document fragment may be a * non-valid XML document (refer to appropriate description of * W3C) because it my start with a non-element node, e.g. a text * node. *

* The methods first converts the node list into a document fragment. * Special care is taken to not destroy the current document, thus * the method clones the nodes (deep cloning) before it appends * them to the document fragment. *

* Refer also to comments about setup of format. * * @param content the NodeList to serialize. * @return the String representation of the serialized * NodeList. * @throws Exception */ @Deprecated public String serialize(NodeList content) throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); canon.setSecureValidation(secureValidation); canon.setWriter(baos); canon.notReset(); for (int i = 0; i < content.getLength(); i++) { canon.canonicalizeSubtree(content.item(i)); } String ret = baos.toString("UTF-8"); baos.reset(); return ret; } /** * Returns a byte[] representation of the specified * NodeList. * * @param content the NodeList to serialize. * @return the byte[] representation of the serialized * NodeList. * @throws Exception */ public byte[] serializeToByteArray(NodeList content) throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); canon.setSecureValidation(secureValidation); canon.setWriter(baos); canon.notReset(); for (int i = 0; i < content.getLength(); i++) { canon.canonicalizeSubtree(content.item(i)); } return baos.toByteArray(); } /** * Use the Canonicalizer to serialize the node * @param node * @return the canonicalization of the node * @throws Exception */ @Deprecated public String canonSerialize(Node node) throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); canon.setSecureValidation(secureValidation); canon.setWriter(baos); canon.notReset(); canon.canonicalizeSubtree(node); String ret = baos.toString("UTF-8"); baos.reset(); return ret; } /** * Use the Canonicalizer to serialize the node * @param node * @return the (byte[]) canonicalization of the node * @throws Exception */ public byte[] canonSerializeToByteArray(Node node) throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); canon.setSecureValidation(secureValidation); canon.setWriter(baos); canon.notReset(); canon.canonicalizeSubtree(node); return baos.toByteArray(); } /** * @param source * @param ctx * @return the Node resulting from the parse of the source * @throws XMLEncryptionException */ @Deprecated public abstract Node deserialize(String source, Node ctx) throws XMLEncryptionException; /** * @param source * @param ctx * @return the Node resulting from the parse of the source * @throws XMLEncryptionException */ public abstract Node deserialize(byte[] source, Node ctx) throws XMLEncryptionException; protected static byte[] createContext(byte[] source, Node ctx) throws XMLEncryptionException { // Create the context to parse the document against ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); try { OutputStreamWriter outputStreamWriter = new OutputStreamWriter(byteArrayOutputStream, "UTF-8"); outputStreamWriter.write(" storedNamespaces = new HashMap(); Node wk = ctx; while (wk != null) { NamedNodeMap atts = wk.getAttributes(); if (atts != null) { for (int i = 0; i < atts.getLength(); ++i) { Node att = atts.item(i); String nodeName = att.getNodeName(); if ((nodeName.equals("xmlns") || nodeName.startsWith("xmlns:")) && !storedNamespaces.containsKey(att.getNodeName())) { outputStreamWriter.write(" "); outputStreamWriter.write(nodeName); outputStreamWriter.write("=\""); outputStreamWriter.write(att.getNodeValue()); outputStreamWriter.write("\""); storedNamespaces.put(nodeName, att.getNodeValue()); } } } wk = wk.getParentNode(); } outputStreamWriter.write(">"); outputStreamWriter.flush(); byteArrayOutputStream.write(source); outputStreamWriter.write(""); outputStreamWriter.close(); return byteArrayOutputStream.toByteArray(); } catch (UnsupportedEncodingException e) { throw new XMLEncryptionException("empty", e); } catch (IOException e) { throw new XMLEncryptionException("empty", e); } } protected static String createContext(String source, Node ctx) { // Create the context to parse the document against StringBuilder sb = new StringBuilder(); sb.append(" storedNamespaces = new HashMap(); Node wk = ctx; while (wk != null) { NamedNodeMap atts = wk.getAttributes(); if (atts != null) { for (int i = 0; i < atts.getLength(); ++i) { Node att = atts.item(i); String nodeName = att.getNodeName(); if ((nodeName.equals("xmlns") || nodeName.startsWith("xmlns:")) && !storedNamespaces.containsKey(att.getNodeName())) { sb.append(" " + nodeName + "=\"" + att.getNodeValue() + "\""); storedNamespaces.put(nodeName, att.getNodeValue()); } } } wk = wk.getParentNode(); } sb.append(">" + source + ""); return sb.toString(); } public boolean isSecureValidation() { return secureValidation; } public void setSecureValidation(boolean secureValidation) { this.secureValidation = secureValidation; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/encryption/EncryptedKey.java0000644000175000017500000001020711553001352031113 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.encryption; /** * The EncryptedKey element is used to transport encryption keys * from the originator to a known recipient(s). It may be used as a stand-alone * XML document, be placed within an application document, or appear inside an * EncryptedData element as a child of a ds:KeyInfo * element. The key value is always encrypted to the recipient(s). When * EncryptedKey is decrypted the resulting octets are made * available to the EncryptionMethod algorithm without any * additional processing. *

* Its schema definition is as follows: *

* <element name='EncryptedKey' type='xenc:EncryptedKeyType'/> * <complexType name='EncryptedKeyType'> * <complexContent> * <extension base='xenc:EncryptedType'> * <sequence> * <element ref='xenc:ReferenceList' minOccurs='0'/> * <element name='CarriedKeyName' type='string' minOccurs='0'/> * </sequence> * <attribute name='Recipient' type='string' use='optional'/> * </extension> * </complexContent> * </complexType> * * * @author Axl Mattheus */ public interface EncryptedKey extends EncryptedType { /** * Returns a hint as to which recipient this encrypted key value is intended for. * * @return the recipient of the EncryptedKey. */ String getRecipient(); /** * Sets the recipient for this EncryptedKey. * * @param recipient the recipient for this EncryptedKey. */ void setRecipient(String recipient); /** * Returns pointers to data and keys encrypted using this key. The reference * list may contain multiple references to EncryptedKey and * EncryptedData elements. This is done using * KeyReference and DataReference elements * respectively. * * @return an Iterator over all the ReferenceLists * contained in this EncryptedKey. */ ReferenceList getReferenceList(); /** * Sets the ReferenceList to the EncryptedKey. * * @param list a list of pointers to data elements encrypted using this key. */ void setReferenceList(ReferenceList list); /** * Returns a user readable name with the key value. This may then be used to * reference the key using the ds:KeyName element within * ds:KeyInfo. The same CarriedKeyName label, * unlike an ID type, may occur multiple times within a single document. The * value of the key is to be the same in all EncryptedKey * elements identified with the same CarriedKeyName label * within a single XML document. *
* Note that because whitespace is significant in the value of * the ds:KeyName element, whitespace is also significant in * the value of the CarriedKeyName element. * * @return over all the carried names contained in * this EncryptedKey. */ String getCarriedName(); /** * Sets the carried name. * * @param name the carried name. */ void setCarriedName(String name); } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/encryption/DocumentSerializer.java0000644000175000017500000000711112234743735032334 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.encryption; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.StringReader; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.ParserConfigurationException; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.DocumentFragment; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.xml.sax.InputSource; import org.xml.sax.SAXException; /** * Converts Strings into Nodes and visa versa. */ public class DocumentSerializer extends AbstractSerializer { /** * @param source * @param ctx * @return the Node resulting from the parse of the source * @throws XMLEncryptionException */ public Node deserialize(byte[] source, Node ctx) throws XMLEncryptionException { byte[] fragment = createContext(source, ctx); return deserialize(ctx, new InputSource(new ByteArrayInputStream(fragment))); } /** * @param source * @param ctx * @return the Node resulting from the parse of the source * @throws XMLEncryptionException */ @Deprecated public Node deserialize(String source, Node ctx) throws XMLEncryptionException { String fragment = createContext(source, ctx); return deserialize(ctx, new InputSource(new StringReader(fragment))); } /** * @param ctx * @param inputSource * @return the Node resulting from the parse of the source * @throws XMLEncryptionException */ private Node deserialize(Node ctx, InputSource inputSource) throws XMLEncryptionException { try { DocumentBuilder db = XMLUtils.createDocumentBuilder(false, secureValidation); Document d = db.parse(inputSource); Document contextDocument = null; if (Node.DOCUMENT_NODE == ctx.getNodeType()) { contextDocument = (Document)ctx; } else { contextDocument = ctx.getOwnerDocument(); } Element fragElt = (Element) contextDocument.importNode(d.getDocumentElement(), true); DocumentFragment result = contextDocument.createDocumentFragment(); Node child = fragElt.getFirstChild(); while (child != null) { fragElt.removeChild(child); result.appendChild(child); child = fragElt.getFirstChild(); } return result; } catch (SAXException se) { throw new XMLEncryptionException("empty", se); } catch (ParserConfigurationException pce) { throw new XMLEncryptionException("empty", pce); } catch (IOException ioe) { throw new XMLEncryptionException("empty", ioe); } } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/encryption/CipherValue.java0000644000175000017500000000247311553001352030722 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.encryption; /** * CipherValue is the wrapper for cipher text. * * @author Axl Mattheus */ public interface CipherValue { /** * Returns the Base 64 encoded, encrypted octets that is the * CipherValue. * * @return cipher value. */ String getValue(); /** * Sets the Base 64 encoded, encrypted octets that is the * CipherValue. * * @param value the cipher value. */ void setValue(String value); } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/encryption/EncryptionProperties.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/encryption/EncryptionProperties.jav0000644000175000017500000000502411622706432032564 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.encryption; import java.util.Iterator; /** * EncryptionProperties can hold additional information concerning * the generation of the EncryptedData or * EncryptedKey. This information is wraped int an * EncryptionProperty element. Examples of additional information * is e.g., a date/time stamp or the serial number of cryptographic hardware * used during encryption). *

* It is defined as follows: *

* <element name='EncryptionProperties' type='xenc:EncryptionPropertiesType'/> * <complexType name='EncryptionPropertiesType'> * <sequence> * <element ref='xenc:EncryptionProperty' maxOccurs='unbounded'/> * </sequence> * <attribute name='Id' type='ID' use='optional'/> * </complexType> * * * @author Axl Mattheus */ public interface EncryptionProperties { /** * Returns the EncryptionProperties' id. * * @return the id. */ String getId(); /** * Sets the id. * * @param id the id. */ void setId(String id); /** * Returns an Iterator over all the * EncryptionPropterty elements contained in this * EncryptionProperties. * * @return an Iterator over all the encryption properties. */ Iterator getEncryptionProperties(); /** * Adds an EncryptionProperty. * * @param property */ void addEncryptionProperty(EncryptionProperty property); /** * Removes the specified EncryptionProperty. * * @param property */ void removeEncryptionProperty(EncryptionProperty property); } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/encryption/Transforms.java0000644000175000017500000000306211622706432030654 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.encryption; /** * A container for ds:Transforms. *

* It is defined as follows: *

* <complexType name='TransformsType'> * <sequence> * <element ref='ds:Transform' maxOccurs='unbounded'/> * </sequence> * </complexType> * * * @author Axl Mattheus * @see org.apache.xml.security.encryption.CipherReference */ public interface Transforms { /** * Temporary method to turn the XMLEncryption Transforms class * into a DS class. The main logic is currently implemented in the * DS class, so we need to get to get the base class. *

* Note This will be removed in future versions */ org.apache.xml.security.transforms.Transforms getDSTransforms(); } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/encryption/Reference.java0000644000175000017500000000607511732330327030421 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.encryption; import java.util.Iterator; import org.w3c.dom.Element; /** * A wrapper for a pointer from a key value of an EncryptedKey to * items encrypted by that key value (EncryptedData or * EncryptedKey elements). *

* It is defined as follows: *

* <complexType name='ReferenceType'> * <sequence> * <any namespace='##other' minOccurs='0' maxOccurs='unbounded'/> * </sequence> * <attribute name='URI' type='anyURI' use='required'/> * </complexType> * * * @author Axl Mattheus * @see ReferenceList */ public interface Reference { /** * Returns the Element tag name for this Reference. * * @return the tag name of this Reference. */ String getType(); /** * Returns a URI that points to an Element that * were encrypted using the key defined in the enclosing * EncryptedKey element. * * @return an Uniform Resource Identifier that qualifies an * EncryptedType. */ String getURI(); /** * Sets a URI that points to an Element that * were encrypted using the key defined in the enclosing * EncryptedKey element. * * @param uri the Uniform Resource Identifier that qualifies an * EncryptedType. */ void setURI(String uri); /** * Returns an Iterator over all the child elements contained in * this Reference that will aid the recipient in retrieving the * EncryptedKey and/or EncryptedData elements. * These could include information such as XPath transforms, decompression * transforms, or information on how to retrieve the elements from a * document storage facility. * * @return child elements. */ Iterator getElementRetrievalInformation(); /** * Adds retrieval information. * * @param info */ void addElementRetrievalInformation(Element info); /** * Removes the specified retrieval information. * * @param info */ void removeElementRetrievalInformation(Element info); } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/encryption/EncryptedType.java0000644000175000017500000001524411622706432031322 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.encryption; import org.apache.xml.security.keys.KeyInfo; /** * EncryptedType is the abstract type from which EncryptedData and * EncryptedKey are derived. While these two latter element types * are very similar with respect to their content models, a syntactical * distinction is useful to processing. *

* Its schema definition is as follows: *

* <complexType name='EncryptedType' abstract='true'> * <sequence> * <element name='EncryptionMethod' type='xenc:EncryptionMethodType' * minOccurs='0'/> * <element ref='ds:KeyInfo' minOccurs='0'/> * <element ref='xenc:CipherData'/> * <element ref='xenc:EncryptionProperties' minOccurs='0'/> * </sequence> * <attribute name='Id' type='ID' use='optional'/> * <attribute name='Type' type='anyURI' use='optional'/> * <attribute name='MimeType' type='string' use='optional'/> * <attribute name='Encoding' type='anyURI' use='optional'/> * </complexType> * * * @author Axl Mattheus */ public interface EncryptedType { /** * Returns a String providing for the standard method of * assigning an id to the element within the document context. * * @return the id for the EncryptedType. */ String getId(); /** * Sets the id. * * @param id */ void setId(String id); /** * Returns an URI identifying type information about the * plaintext form of the encrypted content. While optional, this * specification takes advantage of it for mandatory processing described in * Processing Rules: Decryption (section 4.2). If the * EncryptedData element contains data of Type 'element' or * element 'content', and replaces that data in an XML document context, it * is strongly recommended the Type attribute be provided. Without this * information, the decryptor will be unable to automatically restore the * XML document to its original cleartext form. * * @return the identifier for the type of information in plaintext form of * encrypted content. */ String getType(); /** * Sets the type. * * @param type an URI identifying type information about the * plaintext form of the encrypted content. */ void setType(String type); /** * Returns a String which describes the media type of the data * which has been encrypted. The value of this attribute has values defined * by [MIME]. For example, if the data that is encrypted is a base64 encoded * PNG, the transfer Encoding may be specified as * 'http://www.w3.org/2000/09/xmldsig#base64' and the MimeType as * 'image/png'. *
* This attribute is purely advisory; no validation of the MimeType * information is required and it does not indicate the encryption * application must do any additional processing. Note, this information may * not be necessary if it is already bound to the identifier in the Type * attribute. For example, the Element and Content types defined in this * specification are always UTF-8 encoded text. * * @return the media type of the data which was encrypted. */ String getMimeType(); /** * Sets the mime type. * * @param type a String which describes the media type of the * data which has been encrypted. */ void setMimeType(String type); /** * Return an URI representing the encoding of the * EncryptedType. * * @return the encoding of this EncryptedType. */ String getEncoding(); /** * Sets the URI representing the encoding of the * EncryptedType. * * @param encoding */ void setEncoding(String encoding); /** * Returns an EncryptionMethod that describes the encryption * algorithm applied to the cipher data. If the element is absent, the * encryption algorithm must be known by the recipient or the decryption * will fail. * * @return the method used to encrypt the cipher data. */ EncryptionMethod getEncryptionMethod(); /** * Sets the EncryptionMethod used to encrypt the cipher data. * * @param method the EncryptionMethod. */ void setEncryptionMethod(EncryptionMethod method); /** * Returns the ds:KeyInfo, that carries information about the * key used to encrypt the data. Subsequent sections of this specification * define new elements that may appear as children of * ds:KeyInfo. * * @return information about the key that encrypted the cipher data. */ KeyInfo getKeyInfo(); /** * Sets the encryption key information. * * @param info the ds:KeyInfo, that carries information about * the key used to encrypt the data. */ void setKeyInfo(KeyInfo info); /** * Returns the CipherReference that contains the * CipherValue or CipherReference with the * encrypted data. * * @return the cipher data for the encrypted type. */ CipherData getCipherData(); /** * Returns additional information concerning the generation of the * EncryptedType. * * @return information relating to the generation of the * EncryptedType. */ EncryptionProperties getEncryptionProperties(); /** * Sets the EncryptionProperties that supplies additional * information about the generation of the EncryptedType. * * @param properties */ void setEncryptionProperties(EncryptionProperties properties); } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/encryption/TransformSerializer.java0000644000175000017500000000765412163324704032535 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.encryption; import java.io.ByteArrayInputStream; import java.io.StringReader; import javax.xml.XMLConstants; import javax.xml.transform.Source; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMResult; import javax.xml.transform.stream.StreamSource; import org.w3c.dom.Document; import org.w3c.dom.DocumentFragment; import org.w3c.dom.Node; /** * Converts Strings into Nodes and visa versa. This requires Xalan to * work properly. */ public class TransformSerializer extends AbstractSerializer { private TransformerFactory transformerFactory; /** * @param source * @param ctx * @return the Node resulting from the parse of the source * @throws XMLEncryptionException */ public Node deserialize(byte[] source, Node ctx) throws XMLEncryptionException { byte[] fragment = createContext(source, ctx); return deserialize(ctx, new StreamSource(new ByteArrayInputStream(fragment))); } /** * @param source * @param ctx * @return the Node resulting from the parse of the source * @throws XMLEncryptionException */ @Deprecated public Node deserialize(String source, Node ctx) throws XMLEncryptionException { String fragment = createContext(source, ctx); return deserialize(ctx, new StreamSource(new StringReader(fragment))); } /** * @param ctx * @param source * @return the Node resulting from the parse of the source * @throws XMLEncryptionException */ private Node deserialize(Node ctx, Source source) throws XMLEncryptionException { try { Document contextDocument = null; if (Node.DOCUMENT_NODE == ctx.getNodeType()) { contextDocument = (Document)ctx; } else { contextDocument = ctx.getOwnerDocument(); } if (transformerFactory == null) { transformerFactory = TransformerFactory.newInstance(); transformerFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE); } Transformer transformer = transformerFactory.newTransformer(); DOMResult res = new DOMResult(); Node placeholder = contextDocument.createDocumentFragment(); res.setNode(placeholder); transformer.transform(source, res); // Skip dummy element Node dummyChild = placeholder.getFirstChild(); Node child = dummyChild.getFirstChild(); if (child != null && child.getNextSibling() == null) { return child; } DocumentFragment docfrag = contextDocument.createDocumentFragment(); while (child != null) { dummyChild.removeChild(child); docfrag.appendChild(child); child = dummyChild.getFirstChild(); } return docfrag; } catch (Exception e) { throw new XMLEncryptionException("empty", e); } } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/encryption/CipherData.java0000644000175000017500000000576411750731244030536 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.encryption; /** * CipherData provides encrypted data. It must either contain the * encrypted octet sequence as base64 encoded text of the * CipherValue element, or provide a reference to an external * location containing the encrypted octet sequence via the * CipherReference element. *

* The schema definition is as follows: *

* <element name='CipherData' type='xenc:CipherDataType'/> * <complexType name='CipherDataType'> * <choice> * <element name='CipherValue' type='base64Binary'/> * <element ref='xenc:CipherReference'/> * </choice> * </complexType> * * * @author Axl Mattheus */ public interface CipherData { /** VALUE_TYPE ASN */ int VALUE_TYPE = 0x00000001; /** REFERENCE_TYPE ASN */ int REFERENCE_TYPE = 0x00000002; /** * Returns the type of encrypted data contained in the * CipherData. * * @return VALUE_TYPE if the encrypted data is contained as * CipherValue or REFERENCE_TYPE if the * encrypted data is contained as CipherReference. */ int getDataType(); /** * Returns the cipher value as a base64 encoded byte array. * * @return the CipherData's value. */ CipherValue getCipherValue(); /** * Sets the CipherData's value. * * @param value the value of the CipherData. * @throws XMLEncryptionException */ void setCipherValue(CipherValue value) throws XMLEncryptionException; /** * Returns a reference to an external location containing the encrypted * octet sequence (byte array). * * @return the reference to an external location containing the encrypted * octet sequence. */ CipherReference getCipherReference(); /** * Sets the CipherData's reference. * * @param reference an external location containing the encrypted octet sequence. * @throws XMLEncryptionException */ void setCipherReference(CipherReference reference) throws XMLEncryptionException; } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/encryption/XMLCipherParameters.java0000644000175000017500000000460411750731244032341 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.encryption; /** * Constants */ public interface XMLCipherParameters { String AES_128 = "http://www.w3.org/2001/04/xmlenc#aes128-cbc"; String AES_256 = "http://www.w3.org/2001/04/xmlenc#aes256-cbc"; String AES_192 = "http://www.w3.org/2001/04/xmlenc#aes192-cbc"; String RSA_1_5 = "http://www.w3.org/2001/04/xmlenc#rsa-1_5"; String RSA_OAEP = "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"; String DIFFIE_HELLMAN = "http://www.w3.org/2001/04/xmlenc#dh"; String TRIPLEDES_KEYWRAP = "http://www.w3.org/2001/04/xmlenc#kw-tripledes"; String AES_128_KEYWRAP = "http://www.w3.org/2001/04/xmlenc#kw-aes128"; String AES_256_KEYWRAP = "http://www.w3.org/2001/04/xmlenc#kw-aes256"; String AES_192_KEYWRAP = "http://www.w3.org/2001/04/xmlenc#kw-aes192"; String SHA1 = "http://www.w3.org/2000/09/xmldsig#sha1"; String SHA256 = "http://www.w3.org/2001/04/xmlenc#sha256"; String SHA512 = "http://www.w3.org/2001/04/xmlenc#sha512"; String RIPEMD_160 = "http://www.w3.org/2001/04/xmlenc#ripemd160"; String XML_DSIG = "http://www.w3.org/2000/09/xmldsig#"; String N14C_XML = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"; String N14C_XML_CMMNTS = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"; String EXCL_XML_N14C = "http://www.w3.org/2001/10/xml-exc-c14n#"; String EXCL_XML_N14C_CMMNTS = "http://www.w3.org/2001/10/xml-exc-c14n#WithComments"; } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/encryption/XMLCipherInput.java0000644000175000017500000001544412163324704031337 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.encryption; import java.io.IOException; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.utils.resolver.ResourceResolver; import org.apache.xml.security.utils.resolver.ResourceResolverException; import org.apache.xml.security.exceptions.Base64DecodingException; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.transforms.TransformationException; import org.w3c.dom.Attr; import org.apache.xml.security.utils.Base64; /** * XMLCipherInput is used to wrap input passed into the * XMLCipher encryption operations. * * In decryption mode, it takes a CipherData object and allows * callers to dereference the CipherData into the encrypted bytes that it * actually represents. This takes care of all base64 encoding etc. * * While primarily an internal class, this can be used by applications to * quickly and easily retrieve the encrypted bytes from an EncryptedType * object * * @author Berin Lautenbach */ public class XMLCipherInput { private static org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(XMLCipherInput.class); /** The data we are working with */ private CipherData cipherData; /** MODES */ private int mode; private boolean secureValidation; /** * Constructor for processing encrypted octets * * @param data The CipherData object to read the bytes from * @throws XMLEncryptionException {@link XMLEncryptionException} */ public XMLCipherInput(CipherData data) throws XMLEncryptionException { cipherData = data; mode = XMLCipher.DECRYPT_MODE; if (cipherData == null) { throw new XMLEncryptionException("CipherData is null"); } } /** * Constructor for processing encrypted octets * * @param input The EncryptedType object to read * the bytes from. * @throws XMLEncryptionException {@link XMLEncryptionException} */ public XMLCipherInput(EncryptedType input) throws XMLEncryptionException { cipherData = ((input == null) ? null : input.getCipherData()); mode = XMLCipher.DECRYPT_MODE; if (cipherData == null) { throw new XMLEncryptionException("CipherData is null"); } } /** * Set whether secure validation is enabled or not. The default is false. */ public void setSecureValidation(boolean secureValidation) { this.secureValidation = secureValidation; } /** * Dereferences the input and returns it as a single byte array. * * @throws XMLEncryptionException * @return The decripted bytes. */ public byte[] getBytes() throws XMLEncryptionException { if (mode == XMLCipher.DECRYPT_MODE) { return getDecryptBytes(); } return null; } /** * Internal method to get bytes in decryption mode * @return the decrypted bytes * @throws XMLEncryptionException */ private byte[] getDecryptBytes() throws XMLEncryptionException { String base64EncodedEncryptedOctets = null; if (cipherData.getDataType() == CipherData.REFERENCE_TYPE) { // Fun time! if (logger.isDebugEnabled()) { logger.debug("Found a reference type CipherData"); } CipherReference cr = cipherData.getCipherReference(); // Need to wrap the uri in an Attribute node so that we can // Pass to the resource resolvers Attr uriAttr = cr.getURIAsAttr(); XMLSignatureInput input = null; try { ResourceResolver resolver = ResourceResolver.getInstance(uriAttr, null, secureValidation); input = resolver.resolve(uriAttr, null, secureValidation); } catch (ResourceResolverException ex) { throw new XMLEncryptionException("empty", ex); } if (input != null) { if (logger.isDebugEnabled()) { logger.debug("Managed to resolve URI \"" + cr.getURI() + "\""); } } else { if (logger.isDebugEnabled()) { logger.debug("Failed to resolve URI \"" + cr.getURI() + "\""); } } // Lets see if there are any transforms Transforms transforms = cr.getTransforms(); if (transforms != null) { if (logger.isDebugEnabled()) { logger.debug("Have transforms in cipher reference"); } try { org.apache.xml.security.transforms.Transforms dsTransforms = transforms.getDSTransforms(); dsTransforms.setSecureValidation(secureValidation); input = dsTransforms.performTransforms(input); } catch (TransformationException ex) { throw new XMLEncryptionException("empty", ex); } } try { return input.getBytes(); } catch (IOException ex) { throw new XMLEncryptionException("empty", ex); } catch (CanonicalizationException ex) { throw new XMLEncryptionException("empty", ex); } // retrieve the cipher text } else if (cipherData.getDataType() == CipherData.VALUE_TYPE) { base64EncodedEncryptedOctets = cipherData.getCipherValue().getValue(); } else { throw new XMLEncryptionException("CipherData.getDataType() returned unexpected value"); } if (logger.isDebugEnabled()) { logger.debug("Encrypted octets:\n" + base64EncodedEncryptedOctets); } try { return Base64.decode(base64EncodedEncryptedOctets); } catch (Base64DecodingException bde) { throw new XMLEncryptionException("empty", bde); } } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/encryption/AgreementMethod.java0000644000175000017500000001363211622706432031572 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.encryption; import java.util.Iterator; import org.apache.xml.security.keys.KeyInfo; import org.w3c.dom.Element; /** * A Key Agreement algorithm provides for the derivation of a shared secret key * based on a shared secret computed from certain types of compatible public * keys from both the sender and the recipient. Information from the originator * to determine the secret is indicated by an optional OriginatorKeyInfo * parameter child of an AgreementMethod element while that * associated with the recipient is indicated by an optional RecipientKeyInfo. A * shared key is derived from this shared secret by a method determined by the * Key Agreement algorithm. *

* Note: XML Encryption does not provide an on-line key agreement * negotiation protocol. The AgreementMethod element can be used by * the originator to identify the keys and computational procedure that were * used to obtain a shared encryption key. The method used to obtain or select * the keys or algorithm used for the agreement computation is beyond the scope * of this specification. *

* The AgreementMethod element appears as the content of a * ds:KeyInfo since, like other ds:KeyInfo children, * it yields a key. This ds:KeyInfo is in turn a child of an * EncryptedData or EncryptedKey element. The * Algorithm attribute and KeySize child of the EncryptionMethod * element under this EncryptedData or EncryptedKey * element are implicit parameters to the key agreement computation. In cases * where this EncryptionMethod algorithm URI is * insufficient to determine the key length, a KeySize MUST have been included. * In addition, the sender may place a KA-Nonce element under * AgreementMethod to assure that different keying material is * generated even for repeated agreements using the same sender and recipient * public keys. *

* If the agreed key is being used to wrap a key, then * AgreementMethod would appear inside a ds:KeyInfo * inside an EncryptedKey element. *

* The Schema for AgreementMethod is as follows: *

* <element name="AgreementMethod" type="xenc:AgreementMethodType"/> * <complexType name="AgreementMethodType" mixed="true"> * <sequence> * <element name="KA-Nonce" minOccurs="0" type="base64Binary"/> * <!-- <element ref="ds:DigestMethod" minOccurs="0"/> --> * <any namespace="##other" minOccurs="0" maxOccurs="unbounded"/> * <element name="OriginatorKeyInfo" minOccurs="0" type="ds:KeyInfoType"/> * <element name="RecipientKeyInfo" minOccurs="0" type="ds:KeyInfoType"/> * </sequence> * <attribute name="Algorithm" type="anyURI" use="required"/> * </complexType> * * * @author Axl Mattheus */ public interface AgreementMethod { /** * Returns a byte array. * @return a byte array. */ byte[] getKANonce(); /** * Sets the KANonce.jj * @param kanonce */ void setKANonce(byte[] kanonce); /** * Returns additional information regarding the AgreementMethod. * @return additional information regarding the AgreementMethod. */ Iterator getAgreementMethodInformation(); /** * Adds additional AgreementMethod information. * * @param info a Element that represents additional information * specified by * * <any namespace="##other" minOccurs="0" maxOccurs="unbounded"/> * */ void addAgreementMethodInformation(Element info); /** * Removes additional AgreementMethod information. * * @param info a Element that represents additional information * specified by * * <any namespace="##other" minOccurs="0" maxOccurs="unbounded"/> * */ void revoveAgreementMethodInformation(Element info); /** * Returns information relating to the originator's shared secret. * * @return information relating to the originator's shared secret. */ KeyInfo getOriginatorKeyInfo(); /** * Sets the information relating to the originator's shared secret. * * @param keyInfo information relating to the originator's shared secret. */ void setOriginatorKeyInfo(KeyInfo keyInfo); /** * Returns information relating to the recipient's shared secret. * * @return information relating to the recipient's shared secret. */ KeyInfo getRecipientKeyInfo(); /** * Sets the information relating to the recipient's shared secret. * * @param keyInfo information relating to the recipient's shared secret. */ void setRecipientKeyInfo(KeyInfo keyInfo); /** * Returns the algorithm URI of this CryptographicMethod. * * @return the algorithm URI of this CryptographicMethod */ String getAlgorithm(); } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/encryption/CipherReference.java0000644000175000017500000000703611750731244031555 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.encryption; import org.w3c.dom.Attr; /** * CipherReference identifies a source which, when processed, * yields the encrypted octet sequence. *

* The actual value is obtained as follows. The CipherReference URI * contains an identifier that is dereferenced. Should the * Transforms, the data resulting from dereferencing the URI is * transformed as specified so as to yield the intended cipher value. For * example, if the value is base64 encoded within an XML document; the * transforms could specify an XPath expression followed by a base64 decoding so * as to extract the octets. *

* The syntax of the URI and Transforms is similar to that of * [XML-DSIG]. However, there is a difference between signature and encryption * processing. In [XML-DSIG] both generation and validation processing start * with the same source data and perform that transform in the same order. In * encryption, the decryptor has only the cipher data and the specified * transforms are enumerated for the decryptor, in the order necessary to obtain * the octets. Consequently, because it has different semantics Transforms is in * the &xenc; namespace. *

* The schema definition is as follows: *

* <element name='CipherReference' type='xenc:CipherReferenceType'/> * <complexType name='CipherReferenceType'> * <sequence> * <element name='Transforms' type='xenc:TransformsType' minOccurs='0'/> * </sequence> * <attribute name='URI' type='anyURI' use='required'/> * </complexType> * * * @author Axl Mattheus */ public interface CipherReference { /** * Returns an URI that contains an identifier that should be * dereferenced. * @return an URI that contains an identifier that should be * dereferenced. */ String getURI(); /** * Gets the URI as an Attribute node. Used to meld the CipherReference * with the XMLSignature ResourceResolvers * @return the URI as an Attribute node */ Attr getURIAsAttr(); /** * Returns the Transforms that specifies how to transform the * URI to yield the appropriate cipher value. * * @return the transform that specifies how to transform the reference to * yield the intended cipher value. */ Transforms getTransforms(); /** * Sets the Transforms that specifies how to transform the * URI to yield the appropriate cipher value. * * @param transforms the set of Transforms that specifies how * to transform the reference to yield the intended cipher value. */ void setTransforms(Transforms transforms); } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/encryption/XMLCipher.java0000644000175000017500000037560312234743735030335 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.encryption; import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.net.URI; import java.net.URISyntaxException; import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException; import java.security.Key; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.security.SecureRandom; import java.security.spec.MGF1ParameterSpec; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; import javax.crypto.BadPaddingException; import javax.crypto.Cipher; import javax.crypto.IllegalBlockSizeException; import javax.crypto.NoSuchPaddingException; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.OAEPParameterSpec; import javax.crypto.spec.PSource; import org.apache.xml.security.algorithms.JCEMapper; import org.apache.xml.security.algorithms.MessageDigestAlgorithm; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.c14n.InvalidCanonicalizerException; import org.apache.xml.security.exceptions.Base64DecodingException; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.keys.keyresolver.KeyResolverException; import org.apache.xml.security.keys.keyresolver.KeyResolverSpi; import org.apache.xml.security.keys.keyresolver.implementations.EncryptedKeyResolver; import org.apache.xml.security.signature.XMLSignatureException; import org.apache.xml.security.transforms.InvalidTransformException; import org.apache.xml.security.transforms.TransformationException; import org.apache.xml.security.utils.Base64; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.ElementProxy; import org.apache.xml.security.utils.EncryptionConstants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * XMLCipher encrypts and decrypts the contents of * Documents, Elements and Element * contents. It was designed to resemble javax.crypto.Cipher in * order to facilitate understanding of its functioning. * * @author Axl Mattheus (Sun Microsystems) * @author Christian Geuer-Pollmann */ public class XMLCipher { private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(XMLCipher.class); /** Triple DES EDE (192 bit key) in CBC mode */ public static final String TRIPLEDES = EncryptionConstants.ALGO_ID_BLOCKCIPHER_TRIPLEDES; /** AES 128 Cipher */ public static final String AES_128 = EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES128; /** AES 256 Cipher */ public static final String AES_256 = EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES256; /** AES 192 Cipher */ public static final String AES_192 = EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES192; /** AES 128 GCM Cipher */ public static final String AES_128_GCM = EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES128_GCM; /** AES 192 GCM Cipher */ public static final String AES_192_GCM = EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES192_GCM; /** AES 256 GCM Cipher */ public static final String AES_256_GCM = EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES256_GCM; /** RSA 1.5 Cipher */ public static final String RSA_v1dot5 = EncryptionConstants.ALGO_ID_KEYTRANSPORT_RSA15; /** RSA OAEP Cipher */ public static final String RSA_OAEP = EncryptionConstants.ALGO_ID_KEYTRANSPORT_RSAOAEP; /** RSA OAEP Cipher */ public static final String RSA_OAEP_11 = EncryptionConstants.ALGO_ID_KEYTRANSPORT_RSAOAEP_11; /** DIFFIE_HELLMAN Cipher */ public static final String DIFFIE_HELLMAN = EncryptionConstants.ALGO_ID_KEYAGREEMENT_DH; /** Triple DES EDE (192 bit key) in CBC mode KEYWRAP*/ public static final String TRIPLEDES_KeyWrap = EncryptionConstants.ALGO_ID_KEYWRAP_TRIPLEDES; /** AES 128 Cipher KeyWrap */ public static final String AES_128_KeyWrap = EncryptionConstants.ALGO_ID_KEYWRAP_AES128; /** AES 256 Cipher KeyWrap */ public static final String AES_256_KeyWrap = EncryptionConstants.ALGO_ID_KEYWRAP_AES256; /** AES 192 Cipher KeyWrap */ public static final String AES_192_KeyWrap = EncryptionConstants.ALGO_ID_KEYWRAP_AES192; /** SHA1 Cipher */ public static final String SHA1 = Constants.ALGO_ID_DIGEST_SHA1; /** SHA256 Cipher */ public static final String SHA256 = MessageDigestAlgorithm.ALGO_ID_DIGEST_SHA256; /** SHA512 Cipher */ public static final String SHA512 = MessageDigestAlgorithm.ALGO_ID_DIGEST_SHA512; /** RIPEMD Cipher */ public static final String RIPEMD_160 = MessageDigestAlgorithm.ALGO_ID_DIGEST_RIPEMD160; /** XML Signature NS */ public static final String XML_DSIG = Constants.SignatureSpecNS; /** N14C_XML */ public static final String N14C_XML = Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS; /** N14C_XML with comments*/ public static final String N14C_XML_WITH_COMMENTS = Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS; /** N14C_XML exclusive */ public static final String EXCL_XML_N14C = Canonicalizer.ALGO_ID_C14N_EXCL_OMIT_COMMENTS; /** N14C_XML exclusive with comments*/ public static final String EXCL_XML_N14C_WITH_COMMENTS = Canonicalizer.ALGO_ID_C14N_EXCL_WITH_COMMENTS; /** N14C_PHYSICAL preserve the physical representation*/ public static final String PHYSICAL_XML_N14C = Canonicalizer.ALGO_ID_C14N_PHYSICAL; /** Base64 encoding */ public static final String BASE64_ENCODING = org.apache.xml.security.transforms.Transforms.TRANSFORM_BASE64_DECODE; /** ENCRYPT Mode */ public static final int ENCRYPT_MODE = Cipher.ENCRYPT_MODE; /** DECRYPT Mode */ public static final int DECRYPT_MODE = Cipher.DECRYPT_MODE; /** UNWRAP Mode */ public static final int UNWRAP_MODE = Cipher.UNWRAP_MODE; /** WRAP Mode */ public static final int WRAP_MODE = Cipher.WRAP_MODE; private static final String ENC_ALGORITHMS = TRIPLEDES + "\n" + AES_128 + "\n" + AES_256 + "\n" + AES_192 + "\n" + RSA_v1dot5 + "\n" + RSA_OAEP + "\n" + RSA_OAEP_11 + "\n" + TRIPLEDES_KeyWrap + "\n" + AES_128_KeyWrap + "\n" + AES_256_KeyWrap + "\n" + AES_192_KeyWrap + "\n" + AES_128_GCM + "\n" + AES_192_GCM + "\n" + AES_256_GCM + "\n"; /** Cipher created during initialisation that is used for encryption */ private Cipher contextCipher; /** Mode that the XMLCipher object is operating in */ private int cipherMode = Integer.MIN_VALUE; /** URI of algorithm that is being used for cryptographic operation */ private String algorithm = null; /** Cryptographic provider requested by caller */ private String requestedJCEProvider = null; /** Holds c14n to serialize, if initialized then _always_ use this c14n to serialize */ private Canonicalizer canon; /** Used for creation of DOM nodes in WRAP and ENCRYPT modes */ private Document contextDocument; /** Instance of factory used to create XML Encryption objects */ private Factory factory; /** Serializer class for going to/from UTF-8 */ private Serializer serializer; /** Local copy of user's key */ private Key key; /** Local copy of the kek (used to decrypt EncryptedKeys during a * DECRYPT_MODE operation */ private Key kek; // The EncryptedKey being built (part of a WRAP operation) or read // (part of an UNWRAP operation) private EncryptedKey ek; // The EncryptedData being built (part of a WRAP operation) or read // (part of an UNWRAP operation) private EncryptedData ed; private SecureRandom random; private boolean secureValidation; private String digestAlg; /** List of internal KeyResolvers for DECRYPT and UNWRAP modes. */ private List internalKeyResolvers; /** * Set the Serializer algorithm to use */ public void setSerializer(Serializer serializer) { this.serializer = serializer; serializer.setCanonicalizer(this.canon); } /** * Get the Serializer algorithm to use */ public Serializer getSerializer() { return serializer; } /** * Creates a new XMLCipher. * * @param transformation the name of the transformation, e.g., * XMLCipher.TRIPLEDES. If null the XMLCipher can only * be used for decrypt or unwrap operations where the encryption method * is defined in the EncryptionMethod element. * @param provider the JCE provider that supplies the transformation, * if null use the default provider. * @param canon the name of the c14n algorithm, if * null use standard serializer * @param digestMethod An optional digestMethod to use. */ private XMLCipher( String transformation, String provider, String canonAlg, String digestMethod ) throws XMLEncryptionException { if (log.isDebugEnabled()) { log.debug("Constructing XMLCipher..."); } factory = new Factory(); algorithm = transformation; requestedJCEProvider = provider; digestAlg = digestMethod; // Create a canonicalizer - used when serializing DOM to octets // prior to encryption (and for the reverse) try { if (canonAlg == null) { // The default is to preserve the physical representation. this.canon = Canonicalizer.getInstance(Canonicalizer.ALGO_ID_C14N_PHYSICAL); } else { this.canon = Canonicalizer.getInstance(canonAlg); } } catch (InvalidCanonicalizerException ice) { throw new XMLEncryptionException("empty", ice); } if (serializer == null) { serializer = new DocumentSerializer(); } serializer.setCanonicalizer(this.canon); if (transformation != null) { contextCipher = constructCipher(transformation, digestMethod); } } /** * Checks to ensure that the supplied algorithm is valid. * * @param algorithm the algorithm to check. * @return true if the algorithm is valid, otherwise false. * @since 1.0. */ private static boolean isValidEncryptionAlgorithm(String algorithm) { return ( algorithm.equals(TRIPLEDES) || algorithm.equals(AES_128) || algorithm.equals(AES_256) || algorithm.equals(AES_192) || algorithm.equals(AES_128_GCM) || algorithm.equals(AES_192_GCM) || algorithm.equals(AES_256_GCM) || algorithm.equals(RSA_v1dot5) || algorithm.equals(RSA_OAEP) || algorithm.equals(RSA_OAEP_11) || algorithm.equals(TRIPLEDES_KeyWrap) || algorithm.equals(AES_128_KeyWrap) || algorithm.equals(AES_256_KeyWrap) || algorithm.equals(AES_192_KeyWrap) ); } /** * Validate the transformation argument of getInstance or getProviderInstance * * @param transformation the name of the transformation, e.g., * XMLCipher.TRIPLEDES which is shorthand for * "http://www.w3.org/2001/04/xmlenc#tripledes-cbc" */ private static void validateTransformation(String transformation) { if (null == transformation) { throw new NullPointerException("Transformation unexpectedly null..."); } if (!isValidEncryptionAlgorithm(transformation)) { log.warn("Algorithm non-standard, expected one of " + ENC_ALGORITHMS); } } /** * Returns an XMLCipher that implements the specified * transformation and operates on the specified context document. *

* If the default provider package supplies an implementation of the * requested transformation, an instance of Cipher containing that * implementation is returned. If the transformation is not available in * the default provider package, other provider packages are searched. *

* NOTE1: The transformation name does not follow the same * pattern as that outlined in the Java Cryptography Extension Reference * Guide but rather that specified by the XML Encryption Syntax and * Processing document. The rational behind this is to make it easier for a * novice at writing Java Encryption software to use the library. *

* NOTE2: getInstance() does not follow the * same pattern regarding exceptional conditions as that used in * javax.crypto.Cipher. Instead, it only throws an * XMLEncryptionException which wraps an underlying exception. * The stack trace from the exception should be self explanatory. * * @param transformation the name of the transformation, e.g., * XMLCipher.TRIPLEDES which is shorthand for * "http://www.w3.org/2001/04/xmlenc#tripledes-cbc" * @throws XMLEncryptionException * @return the XMLCipher * @see javax.crypto.Cipher#getInstance(java.lang.String) */ public static XMLCipher getInstance(String transformation) throws XMLEncryptionException { if (log.isDebugEnabled()) { log.debug("Getting XMLCipher with transformation"); } validateTransformation(transformation); return new XMLCipher(transformation, null, null, null); } /** * Returns an XMLCipher that implements the specified * transformation, operates on the specified context document and serializes * the document with the specified canonicalization algorithm before it * encrypts the document. *

* * @param transformation the name of the transformation * @param canon the name of the c14n algorithm, if null use * standard serializer * @return the XMLCipher * @throws XMLEncryptionException */ public static XMLCipher getInstance(String transformation, String canon) throws XMLEncryptionException { if (log.isDebugEnabled()) { log.debug("Getting XMLCipher with transformation and c14n algorithm"); } validateTransformation(transformation); return new XMLCipher(transformation, null, canon, null); } /** * Returns an XMLCipher that implements the specified * transformation, operates on the specified context document and serializes * the document with the specified canonicalization algorithm before it * encrypts the document. *

* * @param transformation the name of the transformation * @param canon the name of the c14n algorithm, if null use * standard serializer * @param digestMethod An optional digestMethod to use * @return the XMLCipher * @throws XMLEncryptionException */ public static XMLCipher getInstance(String transformation, String canon, String digestMethod) throws XMLEncryptionException { if (log.isDebugEnabled()) { log.debug("Getting XMLCipher with transformation and c14n algorithm"); } validateTransformation(transformation); return new XMLCipher(transformation, null, canon, digestMethod); } /** * Returns an XMLCipher that implements the specified * transformation and operates on the specified context document. * * @param transformation the name of the transformation * @param provider the JCE provider that supplies the transformation * @return the XMLCipher * @throws XMLEncryptionException */ public static XMLCipher getProviderInstance(String transformation, String provider) throws XMLEncryptionException { if (log.isDebugEnabled()) { log.debug("Getting XMLCipher with transformation and provider"); } if (null == provider) { throw new NullPointerException("Provider unexpectedly null.."); } validateTransformation(transformation); return new XMLCipher(transformation, provider, null, null); } /** * Returns an XMLCipher that implements the specified * transformation, operates on the specified context document and serializes * the document with the specified canonicalization algorithm before it * encrypts the document. *

* * @param transformation the name of the transformation * @param provider the JCE provider that supplies the transformation * @param canon the name of the c14n algorithm, if null use standard * serializer * @return the XMLCipher * @throws XMLEncryptionException */ public static XMLCipher getProviderInstance( String transformation, String provider, String canon ) throws XMLEncryptionException { if (log.isDebugEnabled()) { log.debug("Getting XMLCipher with transformation, provider and c14n algorithm"); } if (null == provider) { throw new NullPointerException("Provider unexpectedly null.."); } validateTransformation(transformation); return new XMLCipher(transformation, provider, canon, null); } /** * Returns an XMLCipher that implements the specified * transformation, operates on the specified context document and serializes * the document with the specified canonicalization algorithm before it * encrypts the document. *

* * @param transformation the name of the transformation * @param provider the JCE provider that supplies the transformation * @param canon the name of the c14n algorithm, if null use standard * serializer * @param digestMethod An optional digestMethod to use * @return the XMLCipher * @throws XMLEncryptionException */ public static XMLCipher getProviderInstance( String transformation, String provider, String canon, String digestMethod ) throws XMLEncryptionException { if (log.isDebugEnabled()) { log.debug("Getting XMLCipher with transformation, provider and c14n algorithm"); } if (null == provider) { throw new NullPointerException("Provider unexpectedly null.."); } validateTransformation(transformation); return new XMLCipher(transformation, provider, canon, digestMethod); } /** * Returns an XMLCipher that implements no specific * transformation, and can therefore only be used for decrypt or * unwrap operations where the encryption method is defined in the * EncryptionMethod element. * * @return The XMLCipher * @throws XMLEncryptionException */ public static XMLCipher getInstance() throws XMLEncryptionException { if (log.isDebugEnabled()) { log.debug("Getting XMLCipher with no arguments"); } return new XMLCipher(null, null, null, null); } /** * Returns an XMLCipher that implements no specific * transformation, and can therefore only be used for decrypt or * unwrap operations where the encryption method is defined in the * EncryptionMethod element. * * Allows the caller to specify a provider that will be used for * cryptographic operations. * * @param provider the JCE provider that supplies the transformation * @return the XMLCipher * @throws XMLEncryptionException */ public static XMLCipher getProviderInstance(String provider) throws XMLEncryptionException { if (log.isDebugEnabled()) { log.debug("Getting XMLCipher with provider"); } return new XMLCipher(null, provider, null, null); } /** * Initializes this cipher with a key. *

* The cipher is initialized for one of the following four operations: * encryption, decryption, key wrapping or key unwrapping, depending on the * value of opmode. * * For WRAP and ENCRYPT modes, this also initialises the internal * EncryptedKey or EncryptedData (with a CipherValue) * structure that will be used during the ensuing operations. This * can be obtained (in order to modify KeyInfo elements etc. prior to * finalising the encryption) by calling * {@link #getEncryptedData} or {@link #getEncryptedKey}. * * @param opmode the operation mode of this cipher (this is one of the * following: ENCRYPT_MODE, DECRYPT_MODE, WRAP_MODE or UNWRAP_MODE) * @param key * @see javax.crypto.Cipher#init(int, java.security.Key) * @throws XMLEncryptionException */ public void init(int opmode, Key key) throws XMLEncryptionException { // sanity checks if (log.isDebugEnabled()) { log.debug("Initializing XMLCipher..."); } ek = null; ed = null; switch (opmode) { case ENCRYPT_MODE : if (log.isDebugEnabled()) { log.debug("opmode = ENCRYPT_MODE"); } ed = createEncryptedData(CipherData.VALUE_TYPE, "NO VALUE YET"); break; case DECRYPT_MODE : if (log.isDebugEnabled()) { log.debug("opmode = DECRYPT_MODE"); } break; case WRAP_MODE : if (log.isDebugEnabled()) { log.debug("opmode = WRAP_MODE"); } ek = createEncryptedKey(CipherData.VALUE_TYPE, "NO VALUE YET"); break; case UNWRAP_MODE : if (log.isDebugEnabled()) { log.debug("opmode = UNWRAP_MODE"); } break; default : log.error("Mode unexpectedly invalid"); throw new XMLEncryptionException("Invalid mode in init"); } cipherMode = opmode; this.key = key; } /** * Set whether secure validation is enabled or not. The default is false. */ public void setSecureValidation(boolean secureValidation) { this.secureValidation = secureValidation; } /** * This method is used to add a custom {@link KeyResolverSpi} to an XMLCipher. * These KeyResolvers are used in KeyInfo objects in DECRYPT and * UNWRAP modes. * * @param keyResolver */ public void registerInternalKeyResolver(KeyResolverSpi keyResolver) { if (internalKeyResolvers == null) { internalKeyResolvers = new ArrayList(); } internalKeyResolvers.add(keyResolver); } /** * Get the EncryptedData being built *

* Returns the EncryptedData being built during an ENCRYPT operation. * This can then be used by applications to add KeyInfo elements and * set other parameters. * * @return The EncryptedData being built */ public EncryptedData getEncryptedData() { // Sanity checks if (log.isDebugEnabled()) { log.debug("Returning EncryptedData"); } return ed; } /** * Get the EncryptedData being build * * Returns the EncryptedData being built during an ENCRYPT operation. * This can then be used by applications to add KeyInfo elements and * set other parameters. * * @return The EncryptedData being built */ public EncryptedKey getEncryptedKey() { // Sanity checks if (log.isDebugEnabled()) { log.debug("Returning EncryptedKey"); } return ek; } /** * Set a Key Encryption Key. *

* The Key Encryption Key (KEK) is used for encrypting/decrypting * EncryptedKey elements. By setting this separately, the XMLCipher * class can know whether a key applies to the data part or wrapped key * part of an encrypted object. * * @param kek The key to use for de/encrypting key data */ public void setKEK(Key kek) { this.kek = kek; } /** * Martial an EncryptedData * * Takes an EncryptedData object and returns a DOM Element that * represents the appropriate EncryptedData *

* Note: This should only be used in cases where the context * document has been passed in via a call to doFinal. * * @param encryptedData EncryptedData object to martial * @return the DOM Element representing the passed in * object */ public Element martial(EncryptedData encryptedData) { return factory.toElement(encryptedData); } /** * Martial an EncryptedData * * Takes an EncryptedData object and returns a DOM Element that * represents the appropriate EncryptedData * * @param context The document that will own the returned nodes * @param encryptedData EncryptedData object to martial * @return the DOM Element representing the passed in * object */ public Element martial(Document context, EncryptedData encryptedData) { contextDocument = context; return factory.toElement(encryptedData); } /** * Martial an EncryptedKey * * Takes an EncryptedKey object and returns a DOM Element that * represents the appropriate EncryptedKey * *

* Note: This should only be used in cases where the context * document has been passed in via a call to doFinal. * * @param encryptedKey EncryptedKey object to martial * @return the DOM Element representing the passed in * object */ public Element martial(EncryptedKey encryptedKey) { return factory.toElement(encryptedKey); } /** * Martial an EncryptedKey * * Takes an EncryptedKey object and returns a DOM Element that * represents the appropriate EncryptedKey * * @param context The document that will own the created nodes * @param encryptedKey EncryptedKey object to martial * @return the DOM Element representing the passed in * object */ public Element martial(Document context, EncryptedKey encryptedKey) { contextDocument = context; return factory.toElement(encryptedKey); } /** * Martial a ReferenceList * * Takes a ReferenceList object and returns a DOM Element that * represents the appropriate ReferenceList * *

* Note: This should only be used in cases where the context * document has been passed in via a call to doFinal. * * @param referenceList ReferenceList object to martial * @return the DOM Element representing the passed in * object */ public Element martial(ReferenceList referenceList) { return factory.toElement(referenceList); } /** * Martial a ReferenceList * * Takes a ReferenceList object and returns a DOM Element that * represents the appropriate ReferenceList * * @param context The document that will own the created nodes * @param referenceList ReferenceList object to martial * @return the DOM Element representing the passed in * object */ public Element martial(Document context, ReferenceList referenceList) { contextDocument = context; return factory.toElement(referenceList); } /** * Encrypts an Element and replaces it with its encrypted * counterpart in the context Document, that is, the * Document specified when one calls * {@link #getInstance(String) getInstance}. * * @param element the Element to encrypt. * @return the context Document with the encrypted * Element having replaced the source Element. * @throws Exception */ private Document encryptElement(Element element) throws Exception{ if (log.isDebugEnabled()) { log.debug("Encrypting element..."); } if (null == element) { log.error("Element unexpectedly null..."); } if (cipherMode != ENCRYPT_MODE && log.isDebugEnabled()) { log.debug("XMLCipher unexpectedly not in ENCRYPT_MODE..."); } if (algorithm == null) { throw new XMLEncryptionException("XMLCipher instance without transformation specified"); } encryptData(contextDocument, element, false); Element encryptedElement = factory.toElement(ed); Node sourceParent = element.getParentNode(); sourceParent.replaceChild(encryptedElement, element); return contextDocument; } /** * Encrypts a NodeList (the contents of an * Element) and replaces its parent Element's * content with this the resulting EncryptedType within the * context Document, that is, the Document * specified when one calls * {@link #getInstance(String) getInstance}. * * @param element the NodeList to encrypt. * @return the context Document with the encrypted * NodeList having replaced the content of the source * Element. * @throws Exception */ private Document encryptElementContent(Element element) throws /* XMLEncryption */Exception { if (log.isDebugEnabled()) { log.debug("Encrypting element content..."); } if (null == element) { log.error("Element unexpectedly null..."); } if (cipherMode != ENCRYPT_MODE && log.isDebugEnabled()) { log.debug("XMLCipher unexpectedly not in ENCRYPT_MODE..."); } if (algorithm == null) { throw new XMLEncryptionException("XMLCipher instance without transformation specified"); } encryptData(contextDocument, element, true); Element encryptedElement = factory.toElement(ed); removeContent(element); element.appendChild(encryptedElement); return contextDocument; } /** * Process a DOM Document node. The processing depends on the * initialization parameters of {@link #init(int, Key) init()}. * * @param context the context Document. * @param source the Document to be encrypted or decrypted. * @return the processed Document. * @throws Exception to indicate any exceptional conditions. */ public Document doFinal(Document context, Document source) throws /* XMLEncryption */Exception { if (log.isDebugEnabled()) { log.debug("Processing source document..."); } if (null == context) { log.error("Context document unexpectedly null..."); } if (null == source) { log.error("Source document unexpectedly null..."); } contextDocument = context; Document result = null; switch (cipherMode) { case DECRYPT_MODE: result = decryptElement(source.getDocumentElement()); break; case ENCRYPT_MODE: result = encryptElement(source.getDocumentElement()); break; case UNWRAP_MODE: case WRAP_MODE: break; default: throw new XMLEncryptionException("empty", new IllegalStateException()); } return result; } /** * Process a DOM Element node. The processing depends on the * initialization parameters of {@link #init(int, Key) init()}. * * @param context the context Document. * @param element the Element to be encrypted. * @return the processed Document. * @throws Exception to indicate any exceptional conditions. */ public Document doFinal(Document context, Element element) throws /* XMLEncryption */Exception { if (log.isDebugEnabled()) { log.debug("Processing source element..."); } if (null == context) { log.error("Context document unexpectedly null..."); } if (null == element) { log.error("Source element unexpectedly null..."); } contextDocument = context; Document result = null; switch (cipherMode) { case DECRYPT_MODE: result = decryptElement(element); break; case ENCRYPT_MODE: result = encryptElement(element); break; case UNWRAP_MODE: case WRAP_MODE: break; default: throw new XMLEncryptionException("empty", new IllegalStateException()); } return result; } /** * Process the contents of a DOM Element node. The processing * depends on the initialization parameters of * {@link #init(int, Key) init()}. * * @param context the context Document. * @param element the Element which contents is to be * encrypted. * @param content * @return the processed Document. * @throws Exception to indicate any exceptional conditions. */ public Document doFinal(Document context, Element element, boolean content) throws /* XMLEncryption*/ Exception { if (log.isDebugEnabled()) { log.debug("Processing source element..."); } if (null == context) { log.error("Context document unexpectedly null..."); } if (null == element) { log.error("Source element unexpectedly null..."); } contextDocument = context; Document result = null; switch (cipherMode) { case DECRYPT_MODE: if (content) { result = decryptElementContent(element); } else { result = decryptElement(element); } break; case ENCRYPT_MODE: if (content) { result = encryptElementContent(element); } else { result = encryptElement(element); } break; case UNWRAP_MODE: case WRAP_MODE: break; default: throw new XMLEncryptionException("empty", new IllegalStateException()); } return result; } /** * Returns an EncryptedData interface. Use this operation if * you want to have full control over the contents of the * EncryptedData structure. * * This does not change the source document in any way. * * @param context the context Document. * @param element the Element that will be encrypted. * @return the EncryptedData * @throws Exception */ public EncryptedData encryptData(Document context, Element element) throws /* XMLEncryption */Exception { return encryptData(context, element, false); } /** * Returns an EncryptedData interface. Use this operation if * you want to have full control over the serialization of the element * or element content. * * This does not change the source document in any way. * * @param context the context Document. * @param type a URI identifying type information about the plaintext form * of the encrypted content (may be null) * @param serializedData the serialized data * @return the EncryptedData * @throws Exception */ public EncryptedData encryptData( Document context, String type, InputStream serializedData ) throws Exception { if (log.isDebugEnabled()) { log.debug("Encrypting element..."); } if (null == context) { log.error("Context document unexpectedly null..."); } if (null == serializedData) { log.error("Serialized data unexpectedly null..."); } if (cipherMode != ENCRYPT_MODE && log.isDebugEnabled()) { log.debug("XMLCipher unexpectedly not in ENCRYPT_MODE..."); } return encryptData(context, null, type, serializedData); } /** * Returns an EncryptedData interface. Use this operation if * you want to have full control over the contents of the * EncryptedData structure. * * This does not change the source document in any way. * * @param context the context Document. * @param element the Element that will be encrypted. * @param contentMode true to encrypt element's content only, * false otherwise * @return the EncryptedData * @throws Exception */ public EncryptedData encryptData( Document context, Element element, boolean contentMode ) throws /* XMLEncryption */ Exception { if (log.isDebugEnabled()) { log.debug("Encrypting element..."); } if (null == context) { log.error("Context document unexpectedly null..."); } if (null == element) { log.error("Element unexpectedly null..."); } if (cipherMode != ENCRYPT_MODE && log.isDebugEnabled()) { log.debug("XMLCipher unexpectedly not in ENCRYPT_MODE..."); } if (contentMode) { return encryptData(context, element, EncryptionConstants.TYPE_CONTENT, null); } else { return encryptData(context, element, EncryptionConstants.TYPE_ELEMENT, null); } } private EncryptedData encryptData( Document context, Element element, String type, InputStream serializedData ) throws /* XMLEncryption */ Exception { contextDocument = context; if (algorithm == null) { throw new XMLEncryptionException("XMLCipher instance without transformation specified"); } if (serializer instanceof AbstractSerializer) { ((AbstractSerializer)serializer).setSecureValidation(secureValidation); } byte[] serializedOctets = null; if (serializedData == null) { if (type.equals(EncryptionConstants.TYPE_CONTENT)) { NodeList children = element.getChildNodes(); if (null != children) { serializedOctets = serializer.serializeToByteArray(children); } else { Object exArgs[] = { "Element has no content." }; throw new XMLEncryptionException("empty", exArgs); } } else { serializedOctets = serializer.serializeToByteArray(element); } if (log.isDebugEnabled()) { log.debug("Serialized octets:\n" + new String(serializedOctets, "UTF-8")); } } byte[] encryptedBytes = null; // Now create the working cipher if none was created already Cipher c; if (contextCipher == null) { c = constructCipher(algorithm, null); } else { c = contextCipher; } // Now perform the encryption try { // The Spec mandates a 96-bit IV for GCM algorithms if (AES_128_GCM.equals(algorithm) || AES_192_GCM.equals(algorithm) || AES_256_GCM.equals(algorithm)) { if (random == null) { random = SecureRandom.getInstance("SHA1PRNG"); } byte[] temp = new byte[12]; random.nextBytes(temp); IvParameterSpec paramSpec = new IvParameterSpec(temp); c.init(cipherMode, key, paramSpec); } else { c.init(cipherMode, key); } } catch (InvalidKeyException ike) { throw new XMLEncryptionException("empty", ike); } catch (NoSuchAlgorithmException ex) { throw new XMLEncryptionException("empty", ex); } try { if (serializedData != null) { int numBytes; byte[] buf = new byte[8192]; ByteArrayOutputStream baos = new ByteArrayOutputStream(); while ((numBytes = serializedData.read(buf)) != -1) { byte[] data = c.update(buf, 0, numBytes); baos.write(data); } baos.write(c.doFinal()); encryptedBytes = baos.toByteArray(); } else { encryptedBytes = c.doFinal(serializedOctets); if (log.isDebugEnabled()) { log.debug("Expected cipher.outputSize = " + Integer.toString(c.getOutputSize(serializedOctets.length))); } } if (log.isDebugEnabled()) { log.debug("Actual cipher.outputSize = " + Integer.toString(encryptedBytes.length)); } } catch (IllegalStateException ise) { throw new XMLEncryptionException("empty", ise); } catch (IllegalBlockSizeException ibse) { throw new XMLEncryptionException("empty", ibse); } catch (BadPaddingException bpe) { throw new XMLEncryptionException("empty", bpe); } catch (UnsupportedEncodingException uee) { throw new XMLEncryptionException("empty", uee); } // Now build up to a properly XML Encryption encoded octet stream // IvParameterSpec iv; byte[] iv = c.getIV(); byte[] finalEncryptedBytes = new byte[iv.length + encryptedBytes.length]; System.arraycopy(iv, 0, finalEncryptedBytes, 0, iv.length); System.arraycopy(encryptedBytes, 0, finalEncryptedBytes, iv.length, encryptedBytes.length); String base64EncodedEncryptedOctets = Base64.encode(finalEncryptedBytes); if (log.isDebugEnabled()) { log.debug("Encrypted octets:\n" + base64EncodedEncryptedOctets); log.debug("Encrypted octets length = " + base64EncodedEncryptedOctets.length()); } try { CipherData cd = ed.getCipherData(); CipherValue cv = cd.getCipherValue(); // cv.setValue(base64EncodedEncryptedOctets.getBytes()); cv.setValue(base64EncodedEncryptedOctets); if (type != null) { ed.setType(new URI(type).toString()); } EncryptionMethod method = factory.newEncryptionMethod(new URI(algorithm).toString()); method.setDigestAlgorithm(digestAlg); ed.setEncryptionMethod(method); } catch (URISyntaxException ex) { throw new XMLEncryptionException("empty", ex); } return ed; } /** * Returns an EncryptedData interface. Use this operation if * you want to load an EncryptedData structure from a DOM * structure and manipulate the contents. * * @param context the context Document. * @param element the Element that will be loaded * @throws XMLEncryptionException * @return the EncryptedData */ public EncryptedData loadEncryptedData(Document context, Element element) throws XMLEncryptionException { if (log.isDebugEnabled()) { log.debug("Loading encrypted element..."); } if (null == context) { throw new NullPointerException("Context document unexpectedly null..."); } if (null == element) { throw new NullPointerException("Element unexpectedly null..."); } if (cipherMode != DECRYPT_MODE) { throw new XMLEncryptionException("XMLCipher unexpectedly not in DECRYPT_MODE..."); } contextDocument = context; ed = factory.newEncryptedData(element); return ed; } /** * Returns an EncryptedKey interface. Use this operation if * you want to load an EncryptedKey structure from a DOM * structure and manipulate the contents. * * @param context the context Document. * @param element the Element that will be loaded * @return the EncryptedKey * @throws XMLEncryptionException */ public EncryptedKey loadEncryptedKey(Document context, Element element) throws XMLEncryptionException { if (log.isDebugEnabled()) { log.debug("Loading encrypted key..."); } if (null == context) { throw new NullPointerException("Context document unexpectedly null..."); } if (null == element) { throw new NullPointerException("Element unexpectedly null..."); } if (cipherMode != UNWRAP_MODE && cipherMode != DECRYPT_MODE) { throw new XMLEncryptionException( "XMLCipher unexpectedly not in UNWRAP_MODE or DECRYPT_MODE..." ); } contextDocument = context; ek = factory.newEncryptedKey(element); return ek; } /** * Returns an EncryptedKey interface. Use this operation if * you want to load an EncryptedKey structure from a DOM * structure and manipulate the contents. * * Assumes that the context document is the document that owns the element * * @param element the Element that will be loaded * @return the EncryptedKey * @throws XMLEncryptionException */ public EncryptedKey loadEncryptedKey(Element element) throws XMLEncryptionException { return loadEncryptedKey(element.getOwnerDocument(), element); } /** * Encrypts a key to an EncryptedKey structure * * @param doc the Context document that will be used to general DOM * @param key Key to encrypt (will use previously set KEK to * perform encryption * @return the EncryptedKey * @throws XMLEncryptionException */ public EncryptedKey encryptKey(Document doc, Key key) throws XMLEncryptionException { return encryptKey(doc, key, null, null); } /** * Encrypts a key to an EncryptedKey structure * * @param doc the Context document that will be used to general DOM * @param key Key to encrypt (will use previously set KEK to * perform encryption * @param mgfAlgorithm The xenc11 MGF Algorithm to use * @param oaepParams The OAEPParams to use * @return the EncryptedKey * @throws XMLEncryptionException */ public EncryptedKey encryptKey( Document doc, Key key, String mgfAlgorithm, byte[] oaepParams ) throws XMLEncryptionException { if (log.isDebugEnabled()) { log.debug("Encrypting key ..."); } if (null == key) { log.error("Key unexpectedly null..."); } if (cipherMode != WRAP_MODE) { log.debug("XMLCipher unexpectedly not in WRAP_MODE..."); } if (algorithm == null) { throw new XMLEncryptionException("XMLCipher instance without transformation specified"); } contextDocument = doc; byte[] encryptedBytes = null; Cipher c; if (contextCipher == null) { // Now create the working cipher c = constructCipher(algorithm, null); } else { c = contextCipher; } // Now perform the encryption try { // Should internally generate an IV // todo - allow user to set an IV OAEPParameterSpec oaepParameters = constructOAEPParameters( algorithm, digestAlg, mgfAlgorithm, oaepParams ); if (oaepParameters == null) { c.init(Cipher.WRAP_MODE, this.key); } else { c.init(Cipher.WRAP_MODE, this.key, oaepParameters); } encryptedBytes = c.wrap(key); } catch (InvalidKeyException ike) { throw new XMLEncryptionException("empty", ike); } catch (IllegalBlockSizeException ibse) { throw new XMLEncryptionException("empty", ibse); } catch (InvalidAlgorithmParameterException e) { throw new XMLEncryptionException("empty", e); } String base64EncodedEncryptedOctets = Base64.encode(encryptedBytes); if (log.isDebugEnabled()) { log.debug("Encrypted key octets:\n" + base64EncodedEncryptedOctets); log.debug("Encrypted key octets length = " + base64EncodedEncryptedOctets.length()); } CipherValue cv = ek.getCipherData().getCipherValue(); cv.setValue(base64EncodedEncryptedOctets); try { EncryptionMethod method = factory.newEncryptionMethod(new URI(algorithm).toString()); method.setDigestAlgorithm(digestAlg); method.setMGFAlgorithm(mgfAlgorithm); method.setOAEPparams(oaepParams); ek.setEncryptionMethod(method); } catch (URISyntaxException ex) { throw new XMLEncryptionException("empty", ex); } return ek; } /** * Decrypt a key from a passed in EncryptedKey structure * * @param encryptedKey Previously loaded EncryptedKey that needs * to be decrypted. * @param algorithm Algorithm for the decryption * @return a key corresponding to the given type * @throws XMLEncryptionException */ public Key decryptKey(EncryptedKey encryptedKey, String algorithm) throws XMLEncryptionException { if (log.isDebugEnabled()) { log.debug("Decrypting key from previously loaded EncryptedKey..."); } if (cipherMode != UNWRAP_MODE && log.isDebugEnabled()) { log.debug("XMLCipher unexpectedly not in UNWRAP_MODE..."); } if (algorithm == null) { throw new XMLEncryptionException("Cannot decrypt a key without knowing the algorithm"); } if (key == null) { if (log.isDebugEnabled()) { log.debug("Trying to find a KEK via key resolvers"); } KeyInfo ki = encryptedKey.getKeyInfo(); if (ki != null) { ki.setSecureValidation(secureValidation); try { String keyWrapAlg = encryptedKey.getEncryptionMethod().getAlgorithm(); String keyType = JCEMapper.getJCEKeyAlgorithmFromURI(keyWrapAlg); if ("RSA".equals(keyType)) { key = ki.getPrivateKey(); } else { key = ki.getSecretKey(); } } catch (Exception e) { if (log.isDebugEnabled()) { log.debug(e); } } } if (key == null) { log.error("XMLCipher::decryptKey called without a KEK and cannot resolve"); throw new XMLEncryptionException("Unable to decrypt without a KEK"); } } // Obtain the encrypted octets XMLCipherInput cipherInput = new XMLCipherInput(encryptedKey); cipherInput.setSecureValidation(secureValidation); byte[] encryptedBytes = cipherInput.getBytes(); String jceKeyAlgorithm = JCEMapper.getJCEKeyAlgorithmFromURI(algorithm); if (log.isDebugEnabled()) { log.debug("JCE Key Algorithm: " + jceKeyAlgorithm); } Cipher c; if (contextCipher == null) { // Now create the working cipher c = constructCipher( encryptedKey.getEncryptionMethod().getAlgorithm(), encryptedKey.getEncryptionMethod().getDigestAlgorithm() ); } else { c = contextCipher; } Key ret; try { EncryptionMethod encMethod = encryptedKey.getEncryptionMethod(); OAEPParameterSpec oaepParameters = constructOAEPParameters( encMethod.getAlgorithm(), encMethod.getDigestAlgorithm(), encMethod.getMGFAlgorithm(), encMethod.getOAEPparams() ); if (oaepParameters == null) { c.init(Cipher.UNWRAP_MODE, key); } else { c.init(Cipher.UNWRAP_MODE, key, oaepParameters); } ret = c.unwrap(encryptedBytes, jceKeyAlgorithm, Cipher.SECRET_KEY); } catch (InvalidKeyException ike) { throw new XMLEncryptionException("empty", ike); } catch (NoSuchAlgorithmException nsae) { throw new XMLEncryptionException("empty", nsae); } catch (InvalidAlgorithmParameterException e) { throw new XMLEncryptionException("empty", e); } if (log.isDebugEnabled()) { log.debug("Decryption of key type " + algorithm + " OK"); } return ret; } /** * Construct an OAEPParameterSpec object from the given parameters */ private OAEPParameterSpec constructOAEPParameters( String encryptionAlgorithm, String digestAlgorithm, String mgfAlgorithm, byte[] oaepParams ) { if (XMLCipher.RSA_OAEP.equals(encryptionAlgorithm) || XMLCipher.RSA_OAEP_11.equals(encryptionAlgorithm)) { String jceDigestAlgorithm = "SHA-1"; if (digestAlgorithm != null) { jceDigestAlgorithm = JCEMapper.translateURItoJCEID(digestAlgorithm); } PSource.PSpecified pSource = PSource.PSpecified.DEFAULT; if (oaepParams != null) { pSource = new PSource.PSpecified(oaepParams); } MGF1ParameterSpec mgfParameterSpec = new MGF1ParameterSpec("SHA-1"); if (XMLCipher.RSA_OAEP_11.equals(encryptionAlgorithm)) { if (EncryptionConstants.MGF1_SHA256.equals(mgfAlgorithm)) { mgfParameterSpec = new MGF1ParameterSpec("SHA-256"); } else if (EncryptionConstants.MGF1_SHA384.equals(mgfAlgorithm)) { mgfParameterSpec = new MGF1ParameterSpec("SHA-384"); } else if (EncryptionConstants.MGF1_SHA512.equals(mgfAlgorithm)) { mgfParameterSpec = new MGF1ParameterSpec("SHA-512"); } } return new OAEPParameterSpec(jceDigestAlgorithm, "MGF1", mgfParameterSpec, pSource); } return null; } /** * Construct a Cipher object */ private Cipher constructCipher(String algorithm, String digestAlgorithm) throws XMLEncryptionException { String jceAlgorithm = JCEMapper.translateURItoJCEID(algorithm); if (log.isDebugEnabled()) { log.debug("JCE Algorithm = " + jceAlgorithm); } Cipher c; try { if (requestedJCEProvider == null) { c = Cipher.getInstance(jceAlgorithm); } else { c = Cipher.getInstance(jceAlgorithm, requestedJCEProvider); } } catch (NoSuchAlgorithmException nsae) { // Check to see if an RSA OAEP MGF-1 with SHA-1 algorithm was requested // Some JDKs don't support RSA/ECB/OAEPPadding if (XMLCipher.RSA_OAEP.equals(algorithm) && (digestAlgorithm == null || MessageDigestAlgorithm.ALGO_ID_DIGEST_SHA1.equals(digestAlgorithm))) { try { if (requestedJCEProvider == null) { c = Cipher.getInstance("RSA/ECB/OAEPWithSHA1AndMGF1Padding"); } else { c = Cipher.getInstance("RSA/ECB/OAEPWithSHA1AndMGF1Padding", requestedJCEProvider); } } catch (Exception ex) { throw new XMLEncryptionException("empty", ex); } } else { throw new XMLEncryptionException("empty", nsae); } } catch (NoSuchProviderException nspre) { throw new XMLEncryptionException("empty", nspre); } catch (NoSuchPaddingException nspae) { throw new XMLEncryptionException("empty", nspae); } return c; } /** * Decrypt a key from a passed in EncryptedKey structure. This version * is used mainly internally, when the cipher already has an * EncryptedData loaded. The algorithm URI will be read from the * EncryptedData * * @param encryptedKey Previously loaded EncryptedKey that needs * to be decrypted. * @return a key corresponding to the given type * @throws XMLEncryptionException */ public Key decryptKey(EncryptedKey encryptedKey) throws XMLEncryptionException { return decryptKey(encryptedKey, ed.getEncryptionMethod().getAlgorithm()); } /** * Removes the contents of a Node. * * @param node the Node to clear. */ private static void removeContent(Node node) { while (node.hasChildNodes()) { node.removeChild(node.getFirstChild()); } } /** * Decrypts EncryptedData in a single-part operation. * * @param element the EncryptedData to decrypt. * @return the Node as a result of the decrypt operation. * @throws XMLEncryptionException */ private Document decryptElement(Element element) throws XMLEncryptionException { if (log.isDebugEnabled()) { log.debug("Decrypting element..."); } if (serializer instanceof AbstractSerializer) { ((AbstractSerializer)serializer).setSecureValidation(secureValidation); } if (cipherMode != DECRYPT_MODE) { log.error("XMLCipher unexpectedly not in DECRYPT_MODE..."); } byte[] octets = decryptToByteArray(element); if (log.isDebugEnabled()) { log.debug("Decrypted octets:\n" + new String(octets)); } Node sourceParent = element.getParentNode(); Node decryptedNode = serializer.deserialize(octets, sourceParent); // The de-serialiser returns a node whose children we need to take on. if (sourceParent != null && Node.DOCUMENT_NODE == sourceParent.getNodeType()) { // If this is a content decryption, this may have problems contextDocument.removeChild(contextDocument.getDocumentElement()); contextDocument.appendChild(decryptedNode); } else if (sourceParent != null) { sourceParent.replaceChild(decryptedNode, element); } return contextDocument; } /** * * @param element * @return the Node as a result of the decrypt operation. * @throws XMLEncryptionException */ private Document decryptElementContent(Element element) throws XMLEncryptionException { Element e = (Element) element.getElementsByTagNameNS( EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_ENCRYPTEDDATA ).item(0); if (null == e) { throw new XMLEncryptionException("No EncryptedData child element."); } return decryptElement(e); } /** * Decrypt an EncryptedData element to a byte array. * * When passed in an EncryptedData node, returns the decryption * as a byte array. * * Does not modify the source document. * @param element * @return the bytes resulting from the decryption * @throws XMLEncryptionException */ public byte[] decryptToByteArray(Element element) throws XMLEncryptionException { if (log.isDebugEnabled()) { log.debug("Decrypting to ByteArray..."); } if (cipherMode != DECRYPT_MODE) { log.error("XMLCipher unexpectedly not in DECRYPT_MODE..."); } EncryptedData encryptedData = factory.newEncryptedData(element); if (key == null) { KeyInfo ki = encryptedData.getKeyInfo(); if (ki != null) { try { // Add an EncryptedKey resolver String encMethodAlgorithm = encryptedData.getEncryptionMethod().getAlgorithm(); EncryptedKeyResolver resolver = new EncryptedKeyResolver(encMethodAlgorithm, kek); if (internalKeyResolvers != null) { int size = internalKeyResolvers.size(); for (int i = 0; i < size; i++) { resolver.registerInternalKeyResolver(internalKeyResolvers.get(i)); } } ki.registerInternalKeyResolver(resolver); ki.setSecureValidation(secureValidation); key = ki.getSecretKey(); } catch (KeyResolverException kre) { if (log.isDebugEnabled()) { log.debug(kre); } } } if (key == null) { log.error( "XMLCipher::decryptElement called without a key and unable to resolve" ); throw new XMLEncryptionException("encryption.nokey"); } } // Obtain the encrypted octets XMLCipherInput cipherInput = new XMLCipherInput(encryptedData); cipherInput.setSecureValidation(secureValidation); byte[] encryptedBytes = cipherInput.getBytes(); // Now create the working cipher String jceAlgorithm = JCEMapper.translateURItoJCEID(encryptedData.getEncryptionMethod().getAlgorithm()); if (log.isDebugEnabled()) { log.debug("JCE Algorithm = " + jceAlgorithm); } Cipher c; try { if (requestedJCEProvider == null) { c = Cipher.getInstance(jceAlgorithm); } else { c = Cipher.getInstance(jceAlgorithm, requestedJCEProvider); } } catch (NoSuchAlgorithmException nsae) { throw new XMLEncryptionException("empty", nsae); } catch (NoSuchProviderException nspre) { throw new XMLEncryptionException("empty", nspre); } catch (NoSuchPaddingException nspae) { throw new XMLEncryptionException("empty", nspae); } // Calculate the IV length and copy out // For now, we only work with Block ciphers, so this will work. // This should probably be put into the JCE mapper. int ivLen = c.getBlockSize(); String alg = encryptedData.getEncryptionMethod().getAlgorithm(); if (AES_128_GCM.equals(alg) || AES_192_GCM.equals(alg) || AES_256_GCM.equals(alg)) { ivLen = 12; } byte[] ivBytes = new byte[ivLen]; // You may be able to pass the entire piece in to IvParameterSpec // and it will only take the first x bytes, but no way to be certain // that this will work for every JCE provider, so lets copy the // necessary bytes into a dedicated array. System.arraycopy(encryptedBytes, 0, ivBytes, 0, ivLen); IvParameterSpec iv = new IvParameterSpec(ivBytes); try { c.init(cipherMode, key, iv); } catch (InvalidKeyException ike) { throw new XMLEncryptionException("empty", ike); } catch (InvalidAlgorithmParameterException iape) { throw new XMLEncryptionException("empty", iape); } try { return c.doFinal(encryptedBytes, ivLen, encryptedBytes.length - ivLen); } catch (IllegalBlockSizeException ibse) { throw new XMLEncryptionException("empty", ibse); } catch (BadPaddingException bpe) { throw new XMLEncryptionException("empty", bpe); } } /* * Expose the interface for creating XML Encryption objects */ /** * Creates an EncryptedData Element. * * The newEncryptedData and newEncryptedKey methods create fairly complete * elements that are immediately useable. All the other create* methods * return bare elements that still need to be built upon. *

* An EncryptionMethod will still need to be added however * * @param type Either REFERENCE_TYPE or VALUE_TYPE - defines what kind of * CipherData this EncryptedData will contain. * @param value the Base 64 encoded, encrypted text to wrap in the * EncryptedData or the URI to set in the CipherReference * (usage will depend on the type * @return the EncryptedData Element. * * * @throws XMLEncryptionException */ public EncryptedData createEncryptedData(int type, String value) throws XMLEncryptionException { EncryptedData result = null; CipherData data = null; switch (type) { case CipherData.REFERENCE_TYPE: CipherReference cipherReference = factory.newCipherReference(value); data = factory.newCipherData(type); data.setCipherReference(cipherReference); result = factory.newEncryptedData(data); break; case CipherData.VALUE_TYPE: CipherValue cipherValue = factory.newCipherValue(value); data = factory.newCipherData(type); data.setCipherValue(cipherValue); result = factory.newEncryptedData(data); } return result; } /** * Creates an EncryptedKey Element. * * The newEncryptedData and newEncryptedKey methods create fairly complete * elements that are immediately useable. All the other create* methods * return bare elements that still need to be built upon. *

* An EncryptionMethod will still need to be added however * * @param type Either REFERENCE_TYPE or VALUE_TYPE - defines what kind of * CipherData this EncryptedData will contain. * @param value the Base 64 encoded, encrypted text to wrap in the * EncryptedKey or the URI to set in the CipherReference * (usage will depend on the type * @return the EncryptedKey Element. * * * @throws XMLEncryptionException */ public EncryptedKey createEncryptedKey(int type, String value) throws XMLEncryptionException { EncryptedKey result = null; CipherData data = null; switch (type) { case CipherData.REFERENCE_TYPE: CipherReference cipherReference = factory.newCipherReference(value); data = factory.newCipherData(type); data.setCipherReference(cipherReference); result = factory.newEncryptedKey(data); break; case CipherData.VALUE_TYPE: CipherValue cipherValue = factory.newCipherValue(value); data = factory.newCipherData(type); data.setCipherValue(cipherValue); result = factory.newEncryptedKey(data); } return result; } /** * Create an AgreementMethod object * * @param algorithm Algorithm of the agreement method * @return a new AgreementMethod */ public AgreementMethod createAgreementMethod(String algorithm) { return factory.newAgreementMethod(algorithm); } /** * Create a CipherData object * * @param type Type of this CipherData (either VALUE_TUPE or * REFERENCE_TYPE) * @return a new CipherData */ public CipherData createCipherData(int type) { return factory.newCipherData(type); } /** * Create a CipherReference object * * @param uri The URI that the reference will refer * @return a new CipherReference */ public CipherReference createCipherReference(String uri) { return factory.newCipherReference(uri); } /** * Create a CipherValue element * * @param value The value to set the ciphertext to * @return a new CipherValue */ public CipherValue createCipherValue(String value) { return factory.newCipherValue(value); } /** * Create an EncryptionMethod object * * @param algorithm Algorithm for the encryption * @return a new EncryptionMethod */ public EncryptionMethod createEncryptionMethod(String algorithm) { return factory.newEncryptionMethod(algorithm); } /** * Create an EncryptionProperties element * @return a new EncryptionProperties */ public EncryptionProperties createEncryptionProperties() { return factory.newEncryptionProperties(); } /** * Create a new EncryptionProperty element * @return a new EncryptionProperty */ public EncryptionProperty createEncryptionProperty() { return factory.newEncryptionProperty(); } /** * Create a new ReferenceList object * @param type ReferenceList.DATA_REFERENCE or ReferenceList.KEY_REFERENCE * @return a new ReferenceList */ public ReferenceList createReferenceList(int type) { return factory.newReferenceList(type); } /** * Create a new Transforms object *

* Note: A context document must have been set * elsewhere (possibly via a call to doFinal). If not, use the * createTransforms(Document) method. * @return a new Transforms */ public Transforms createTransforms() { return factory.newTransforms(); } /** * Create a new Transforms object * * Because the handling of Transforms is currently done in the signature * code, the creation of a Transforms object requires a * context document. * * @param doc Document that will own the created Transforms node * @return a new Transforms */ public Transforms createTransforms(Document doc) { return factory.newTransforms(doc); } /** * * @author Axl Mattheus */ private class Factory { /** * @param algorithm * @return a new AgreementMethod */ AgreementMethod newAgreementMethod(String algorithm) { return new AgreementMethodImpl(algorithm); } /** * @param type * @return a new CipherData * */ CipherData newCipherData(int type) { return new CipherDataImpl(type); } /** * @param uri * @return a new CipherReference */ CipherReference newCipherReference(String uri) { return new CipherReferenceImpl(uri); } /** * @param value * @return a new CipherValue */ CipherValue newCipherValue(String value) { return new CipherValueImpl(value); } /* CipherValue newCipherValue(byte[] value) { return new CipherValueImpl(value); } */ /** * @param data * @return a new EncryptedData */ EncryptedData newEncryptedData(CipherData data) { return new EncryptedDataImpl(data); } /** * @param data * @return a new EncryptedKey */ EncryptedKey newEncryptedKey(CipherData data) { return new EncryptedKeyImpl(data); } /** * @param algorithm * @return a new EncryptionMethod */ EncryptionMethod newEncryptionMethod(String algorithm) { return new EncryptionMethodImpl(algorithm); } /** * @return a new EncryptionProperties */ EncryptionProperties newEncryptionProperties() { return new EncryptionPropertiesImpl(); } /** * @return a new EncryptionProperty */ EncryptionProperty newEncryptionProperty() { return new EncryptionPropertyImpl(); } /** * @param type ReferenceList.DATA_REFERENCE or ReferenceList.KEY_REFERENCE * @return a new ReferenceList */ ReferenceList newReferenceList(int type) { return new ReferenceListImpl(type); } /** * @return a new Transforms */ Transforms newTransforms() { return new TransformsImpl(); } /** * @param doc * @return a new Transforms */ Transforms newTransforms(Document doc) { return new TransformsImpl(doc); } /** * @param element * @return a new CipherData * @throws XMLEncryptionException */ CipherData newCipherData(Element element) throws XMLEncryptionException { if (null == element) { throw new NullPointerException("element is null"); } int type = 0; Element e = null; if (element.getElementsByTagNameNS( EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_CIPHERVALUE).getLength() > 0 ) { type = CipherData.VALUE_TYPE; e = (Element) element.getElementsByTagNameNS( EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_CIPHERVALUE).item(0); } else if (element.getElementsByTagNameNS( EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_CIPHERREFERENCE).getLength() > 0) { type = CipherData.REFERENCE_TYPE; e = (Element) element.getElementsByTagNameNS( EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_CIPHERREFERENCE).item(0); } CipherData result = newCipherData(type); if (type == CipherData.VALUE_TYPE) { result.setCipherValue(newCipherValue(e)); } else if (type == CipherData.REFERENCE_TYPE) { result.setCipherReference(newCipherReference(e)); } return result; } /** * @param element * @return a new CipherReference * @throws XMLEncryptionException * */ CipherReference newCipherReference(Element element) throws XMLEncryptionException { Attr uriAttr = element.getAttributeNodeNS(null, EncryptionConstants._ATT_URI); CipherReference result = new CipherReferenceImpl(uriAttr); // Find any Transforms NodeList transformsElements = element.getElementsByTagNameNS( EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_TRANSFORMS); Element transformsElement = (Element) transformsElements.item(0); if (transformsElement != null) { if (log.isDebugEnabled()) { log.debug("Creating a DSIG based Transforms element"); } try { result.setTransforms(new TransformsImpl(transformsElement)); } catch (XMLSignatureException xse) { throw new XMLEncryptionException("empty", xse); } catch (InvalidTransformException ite) { throw new XMLEncryptionException("empty", ite); } catch (XMLSecurityException xse) { throw new XMLEncryptionException("empty", xse); } } return result; } /** * @param element * @return a new CipherValue */ CipherValue newCipherValue(Element element) { String value = XMLUtils.getFullTextChildrenFromElement(element); return newCipherValue(value); } /** * @param element * @return a new EncryptedData * @throws XMLEncryptionException * */ EncryptedData newEncryptedData(Element element) throws XMLEncryptionException { EncryptedData result = null; NodeList dataElements = element.getElementsByTagNameNS( EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_CIPHERDATA); // Need to get the last CipherData found, as earlier ones will // be for elements in the KeyInfo lists Element dataElement = (Element) dataElements.item(dataElements.getLength() - 1); CipherData data = newCipherData(dataElement); result = newEncryptedData(data); result.setId(element.getAttributeNS(null, EncryptionConstants._ATT_ID)); result.setType(element.getAttributeNS(null, EncryptionConstants._ATT_TYPE)); result.setMimeType(element.getAttributeNS(null, EncryptionConstants._ATT_MIMETYPE)); result.setEncoding( element.getAttributeNS(null, Constants._ATT_ENCODING)); Element encryptionMethodElement = (Element) element.getElementsByTagNameNS( EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_ENCRYPTIONMETHOD).item(0); if (null != encryptionMethodElement) { result.setEncryptionMethod(newEncryptionMethod(encryptionMethodElement)); } // BFL 16/7/03 - simple implementation // TODO: Work out how to handle relative URI Element keyInfoElement = (Element) element.getElementsByTagNameNS( Constants.SignatureSpecNS, Constants._TAG_KEYINFO).item(0); if (null != keyInfoElement) { KeyInfo ki = newKeyInfo(keyInfoElement); result.setKeyInfo(ki); } // TODO: Implement Element encryptionPropertiesElement = (Element) element.getElementsByTagNameNS( EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_ENCRYPTIONPROPERTIES).item(0); if (null != encryptionPropertiesElement) { result.setEncryptionProperties( newEncryptionProperties(encryptionPropertiesElement) ); } return result; } /** * @param element * @return a new EncryptedKey * @throws XMLEncryptionException */ EncryptedKey newEncryptedKey(Element element) throws XMLEncryptionException { EncryptedKey result = null; NodeList dataElements = element.getElementsByTagNameNS( EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_CIPHERDATA); Element dataElement = (Element) dataElements.item(dataElements.getLength() - 1); CipherData data = newCipherData(dataElement); result = newEncryptedKey(data); result.setId(element.getAttributeNS(null, EncryptionConstants._ATT_ID)); result.setType(element.getAttributeNS(null, EncryptionConstants._ATT_TYPE)); result.setMimeType(element.getAttributeNS(null, EncryptionConstants._ATT_MIMETYPE)); result.setEncoding(element.getAttributeNS(null, Constants._ATT_ENCODING)); result.setRecipient(element.getAttributeNS(null, EncryptionConstants._ATT_RECIPIENT)); Element encryptionMethodElement = (Element) element.getElementsByTagNameNS( EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_ENCRYPTIONMETHOD).item(0); if (null != encryptionMethodElement) { result.setEncryptionMethod(newEncryptionMethod(encryptionMethodElement)); } Element keyInfoElement = (Element) element.getElementsByTagNameNS( Constants.SignatureSpecNS, Constants._TAG_KEYINFO).item(0); if (null != keyInfoElement) { KeyInfo ki = newKeyInfo(keyInfoElement); result.setKeyInfo(ki); } // TODO: Implement Element encryptionPropertiesElement = (Element) element.getElementsByTagNameNS( EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_ENCRYPTIONPROPERTIES).item(0); if (null != encryptionPropertiesElement) { result.setEncryptionProperties( newEncryptionProperties(encryptionPropertiesElement) ); } Element referenceListElement = (Element) element.getElementsByTagNameNS( EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_REFERENCELIST).item(0); if (null != referenceListElement) { result.setReferenceList(newReferenceList(referenceListElement)); } Element carriedNameElement = (Element) element.getElementsByTagNameNS( EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_CARRIEDKEYNAME).item(0); if (null != carriedNameElement) { result.setCarriedName(carriedNameElement.getFirstChild().getNodeValue()); } return result; } /** * @param element * @return a new KeyInfo * @throws XMLEncryptionException */ KeyInfo newKeyInfo(Element element) throws XMLEncryptionException { try { KeyInfo ki = new KeyInfo(element, null); ki.setSecureValidation(secureValidation); if (internalKeyResolvers != null) { int size = internalKeyResolvers.size(); for (int i = 0; i < size; i++) { ki.registerInternalKeyResolver(internalKeyResolvers.get(i)); } } return ki; } catch (XMLSecurityException xse) { throw new XMLEncryptionException("Error loading Key Info", xse); } } /** * @param element * @return a new EncryptionMethod */ EncryptionMethod newEncryptionMethod(Element element) { String encAlgorithm = element.getAttributeNS(null, EncryptionConstants._ATT_ALGORITHM); EncryptionMethod result = newEncryptionMethod(encAlgorithm); Element keySizeElement = (Element) element.getElementsByTagNameNS( EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_KEYSIZE).item(0); if (null != keySizeElement) { result.setKeySize( Integer.valueOf( keySizeElement.getFirstChild().getNodeValue()).intValue()); } Element oaepParamsElement = (Element) element.getElementsByTagNameNS( EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_OAEPPARAMS).item(0); if (null != oaepParamsElement) { try { String oaepParams = oaepParamsElement.getFirstChild().getNodeValue(); result.setOAEPparams(Base64.decode(oaepParams.getBytes("UTF-8"))); } catch(UnsupportedEncodingException e) { throw new RuntimeException("UTF-8 not supported", e); } catch (Base64DecodingException e) { throw new RuntimeException("BASE-64 decoding error", e); } } Element digestElement = (Element) element.getElementsByTagNameNS( Constants.SignatureSpecNS, Constants._TAG_DIGESTMETHOD).item(0); if (digestElement != null) { String digestAlgorithm = digestElement.getAttributeNS(null, "Algorithm"); result.setDigestAlgorithm(digestAlgorithm); } Element mgfElement = (Element) element.getElementsByTagNameNS( EncryptionConstants.EncryptionSpec11NS, EncryptionConstants._TAG_MGF).item(0); if (mgfElement != null && !XMLCipher.RSA_OAEP.equals(algorithm)) { String mgfAlgorithm = mgfElement.getAttributeNS(null, "Algorithm"); result.setMGFAlgorithm(mgfAlgorithm); } // TODO: Make this mess work // return result; } /** * @param element * @return a new EncryptionProperties */ EncryptionProperties newEncryptionProperties(Element element) { EncryptionProperties result = newEncryptionProperties(); result.setId(element.getAttributeNS(null, EncryptionConstants._ATT_ID)); NodeList encryptionPropertyList = element.getElementsByTagNameNS( EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_ENCRYPTIONPROPERTY); for (int i = 0; i < encryptionPropertyList.getLength(); i++) { Node n = encryptionPropertyList.item(i); if (null != n) { result.addEncryptionProperty(newEncryptionProperty((Element) n)); } } return result; } /** * @param element * @return a new EncryptionProperty */ EncryptionProperty newEncryptionProperty(Element element) { EncryptionProperty result = newEncryptionProperty(); result.setTarget(element.getAttributeNS(null, EncryptionConstants._ATT_TARGET)); result.setId(element.getAttributeNS(null, EncryptionConstants._ATT_ID)); // TODO: Make this lot work... // // TODO: Make this work... // return result; } /** * @param element * @return a new ReferenceList */ ReferenceList newReferenceList(Element element) { int type = 0; if (null != element.getElementsByTagNameNS( EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_DATAREFERENCE).item(0)) { type = ReferenceList.DATA_REFERENCE; } else if (null != element.getElementsByTagNameNS( EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_KEYREFERENCE).item(0)) { type = ReferenceList.KEY_REFERENCE; } ReferenceList result = new ReferenceListImpl(type); NodeList list = null; switch (type) { case ReferenceList.DATA_REFERENCE: list = element.getElementsByTagNameNS( EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_DATAREFERENCE); for (int i = 0; i < list.getLength() ; i++) { String uri = ((Element) list.item(i)).getAttributeNS(null, "URI"); result.add(result.newDataReference(uri)); } break; case ReferenceList.KEY_REFERENCE: list = element.getElementsByTagNameNS( EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_KEYREFERENCE); for (int i = 0; i < list.getLength() ; i++) { String uri = ((Element) list.item(i)).getAttributeNS(null, "URI"); result.add(result.newKeyReference(uri)); } } return result; } /** * @param encryptedData * @return the XML Element form of that EncryptedData */ Element toElement(EncryptedData encryptedData) { return ((EncryptedDataImpl) encryptedData).toElement(); } /** * @param encryptedKey * @return the XML Element form of that EncryptedKey */ Element toElement(EncryptedKey encryptedKey) { return ((EncryptedKeyImpl) encryptedKey).toElement(); } /** * @param referenceList * @return the XML Element form of that ReferenceList */ Element toElement(ReferenceList referenceList) { return ((ReferenceListImpl) referenceList).toElement(); } private class AgreementMethodImpl implements AgreementMethod { private byte[] kaNonce = null; private List agreementMethodInformation = null; private KeyInfo originatorKeyInfo = null; private KeyInfo recipientKeyInfo = null; private String algorithmURI = null; /** * @param algorithm */ public AgreementMethodImpl(String algorithm) { agreementMethodInformation = new LinkedList(); URI tmpAlgorithm = null; try { tmpAlgorithm = new URI(algorithm); } catch (URISyntaxException ex) { throw (IllegalArgumentException) new IllegalArgumentException().initCause(ex); } algorithmURI = tmpAlgorithm.toString(); } /** @inheritDoc */ public byte[] getKANonce() { return kaNonce; } /** @inheritDoc */ public void setKANonce(byte[] kanonce) { kaNonce = kanonce; } /** @inheritDoc */ public Iterator getAgreementMethodInformation() { return agreementMethodInformation.iterator(); } /** @inheritDoc */ public void addAgreementMethodInformation(Element info) { agreementMethodInformation.add(info); } /** @inheritDoc */ public void revoveAgreementMethodInformation(Element info) { agreementMethodInformation.remove(info); } /** @inheritDoc */ public KeyInfo getOriginatorKeyInfo() { return originatorKeyInfo; } /** @inheritDoc */ public void setOriginatorKeyInfo(KeyInfo keyInfo) { originatorKeyInfo = keyInfo; } /** @inheritDoc */ public KeyInfo getRecipientKeyInfo() { return recipientKeyInfo; } /** @inheritDoc */ public void setRecipientKeyInfo(KeyInfo keyInfo) { recipientKeyInfo = keyInfo; } /** @inheritDoc */ public String getAlgorithm() { return algorithmURI; } } private class CipherDataImpl implements CipherData { private static final String valueMessage = "Data type is reference type."; private static final String referenceMessage = "Data type is value type."; private CipherValue cipherValue = null; private CipherReference cipherReference = null; private int cipherType = Integer.MIN_VALUE; /** * @param type */ public CipherDataImpl(int type) { cipherType = type; } /** @inheritDoc */ public CipherValue getCipherValue() { return cipherValue; } /** @inheritDoc */ public void setCipherValue(CipherValue value) throws XMLEncryptionException { if (cipherType == REFERENCE_TYPE) { throw new XMLEncryptionException( "empty", new UnsupportedOperationException(valueMessage) ); } cipherValue = value; } /** @inheritDoc */ public CipherReference getCipherReference() { return cipherReference; } /** @inheritDoc */ public void setCipherReference(CipherReference reference) throws XMLEncryptionException { if (cipherType == VALUE_TYPE) { throw new XMLEncryptionException( "empty", new UnsupportedOperationException(referenceMessage) ); } cipherReference = reference; } /** @inheritDoc */ public int getDataType() { return cipherType; } Element toElement() { Element result = XMLUtils.createElementInEncryptionSpace( contextDocument, EncryptionConstants._TAG_CIPHERDATA ); if (cipherType == VALUE_TYPE) { result.appendChild(((CipherValueImpl) cipherValue).toElement()); } else if (cipherType == REFERENCE_TYPE) { result.appendChild(((CipherReferenceImpl) cipherReference).toElement()); } return result; } } private class CipherReferenceImpl implements CipherReference { private String referenceURI = null; private Transforms referenceTransforms = null; private Attr referenceNode = null; /** * @param uri */ public CipherReferenceImpl(String uri) { /* Don't check validity of URI as may be "" */ referenceURI = uri; referenceNode = null; } /** * @param uri */ public CipherReferenceImpl(Attr uri) { referenceURI = uri.getNodeValue(); referenceNode = uri; } /** @inheritDoc */ public String getURI() { return referenceURI; } /** @inheritDoc */ public Attr getURIAsAttr() { return referenceNode; } /** @inheritDoc */ public Transforms getTransforms() { return referenceTransforms; } /** @inheritDoc */ public void setTransforms(Transforms transforms) { referenceTransforms = transforms; } Element toElement() { Element result = XMLUtils.createElementInEncryptionSpace( contextDocument, EncryptionConstants._TAG_CIPHERREFERENCE ); result.setAttributeNS(null, EncryptionConstants._ATT_URI, referenceURI); if (null != referenceTransforms) { result.appendChild(((TransformsImpl) referenceTransforms).toElement()); } return result; } } private class CipherValueImpl implements CipherValue { private String cipherValue = null; /** * @param value */ public CipherValueImpl(String value) { cipherValue = value; } /** @inheritDoc */ public String getValue() { return cipherValue; } /** @inheritDoc */ public void setValue(String value) { cipherValue = value; } Element toElement() { Element result = XMLUtils.createElementInEncryptionSpace( contextDocument, EncryptionConstants._TAG_CIPHERVALUE ); result.appendChild(contextDocument.createTextNode(cipherValue)); return result; } } private class EncryptedDataImpl extends EncryptedTypeImpl implements EncryptedData { /** * @param data */ public EncryptedDataImpl(CipherData data) { super(data); } Element toElement() { Element result = ElementProxy.createElementForFamily( contextDocument, EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_ENCRYPTEDDATA ); if (null != super.getId()) { result.setAttributeNS(null, EncryptionConstants._ATT_ID, super.getId()); } if (null != super.getType()) { result.setAttributeNS(null, EncryptionConstants._ATT_TYPE, super.getType()); } if (null != super.getMimeType()) { result.setAttributeNS( null, EncryptionConstants._ATT_MIMETYPE, super.getMimeType() ); } if (null != super.getEncoding()) { result.setAttributeNS( null, EncryptionConstants._ATT_ENCODING, super.getEncoding() ); } if (null != super.getEncryptionMethod()) { result.appendChild( ((EncryptionMethodImpl)super.getEncryptionMethod()).toElement() ); } if (null != super.getKeyInfo()) { result.appendChild(super.getKeyInfo().getElement().cloneNode(true)); } result.appendChild(((CipherDataImpl) super.getCipherData()).toElement()); if (null != super.getEncryptionProperties()) { result.appendChild(((EncryptionPropertiesImpl) super.getEncryptionProperties()).toElement()); } return result; } } private class EncryptedKeyImpl extends EncryptedTypeImpl implements EncryptedKey { private String keyRecipient = null; private ReferenceList referenceList = null; private String carriedName = null; /** * @param data */ public EncryptedKeyImpl(CipherData data) { super(data); } /** @inheritDoc */ public String getRecipient() { return keyRecipient; } /** @inheritDoc */ public void setRecipient(String recipient) { keyRecipient = recipient; } /** @inheritDoc */ public ReferenceList getReferenceList() { return referenceList; } /** @inheritDoc */ public void setReferenceList(ReferenceList list) { referenceList = list; } /** @inheritDoc */ public String getCarriedName() { return carriedName; } /** @inheritDoc */ public void setCarriedName(String name) { carriedName = name; } Element toElement() { Element result = ElementProxy.createElementForFamily( contextDocument, EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_ENCRYPTEDKEY ); if (null != super.getId()) { result.setAttributeNS(null, EncryptionConstants._ATT_ID, super.getId()); } if (null != super.getType()) { result.setAttributeNS(null, EncryptionConstants._ATT_TYPE, super.getType()); } if (null != super.getMimeType()) { result.setAttributeNS( null, EncryptionConstants._ATT_MIMETYPE, super.getMimeType() ); } if (null != super.getEncoding()) { result.setAttributeNS(null, Constants._ATT_ENCODING, super.getEncoding()); } if (null != getRecipient()) { result.setAttributeNS( null, EncryptionConstants._ATT_RECIPIENT, getRecipient() ); } if (null != super.getEncryptionMethod()) { result.appendChild(((EncryptionMethodImpl) super.getEncryptionMethod()).toElement()); } if (null != super.getKeyInfo()) { result.appendChild(super.getKeyInfo().getElement().cloneNode(true)); } result.appendChild(((CipherDataImpl) super.getCipherData()).toElement()); if (null != super.getEncryptionProperties()) { result.appendChild(((EncryptionPropertiesImpl) super.getEncryptionProperties()).toElement()); } if (referenceList != null && !referenceList.isEmpty()) { result.appendChild(((ReferenceListImpl)getReferenceList()).toElement()); } if (null != carriedName) { Element element = ElementProxy.createElementForFamily( contextDocument, EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_CARRIEDKEYNAME ); Node node = contextDocument.createTextNode(carriedName); element.appendChild(node); result.appendChild(element); } return result; } } private abstract class EncryptedTypeImpl { private String id = null; private String type = null; private String mimeType = null; private String encoding = null; private EncryptionMethod encryptionMethod = null; private KeyInfo keyInfo = null; private CipherData cipherData = null; private EncryptionProperties encryptionProperties = null; /** * Constructor. * @param data */ protected EncryptedTypeImpl(CipherData data) { cipherData = data; } /** * * @return the Id */ public String getId() { return id; } /** * * @param id */ public void setId(String id) { this.id = id; } /** * * @return the type */ public String getType() { return type; } /** * * @param type */ public void setType(String type) { if (type == null || type.length() == 0) { this.type = null; } else { URI tmpType = null; try { tmpType = new URI(type); } catch (URISyntaxException ex) { throw (IllegalArgumentException) new IllegalArgumentException().initCause(ex); } this.type = tmpType.toString(); } } /** * * @return the MimeType */ public String getMimeType() { return mimeType; } /** * * @param type */ public void setMimeType(String type) { mimeType = type; } /** * * @return the encoding */ public String getEncoding() { return encoding; } /** * * @param encoding */ public void setEncoding(String encoding) { if (encoding == null || encoding.length() == 0) { this.encoding = null; } else { URI tmpEncoding = null; try { tmpEncoding = new URI(encoding); } catch (URISyntaxException ex) { throw (IllegalArgumentException) new IllegalArgumentException().initCause(ex); } this.encoding = tmpEncoding.toString(); } } /** * * @return the EncryptionMethod */ public EncryptionMethod getEncryptionMethod() { return encryptionMethod; } /** * * @param method */ public void setEncryptionMethod(EncryptionMethod method) { encryptionMethod = method; } /** * * @return the KeyInfo */ public KeyInfo getKeyInfo() { return keyInfo; } /** * * @param info */ public void setKeyInfo(KeyInfo info) { keyInfo = info; } /** * * @return the CipherData */ public CipherData getCipherData() { return cipherData; } /** * * @return the EncryptionProperties */ public EncryptionProperties getEncryptionProperties() { return encryptionProperties; } /** * * @param properties */ public void setEncryptionProperties(EncryptionProperties properties) { encryptionProperties = properties; } } private class EncryptionMethodImpl implements EncryptionMethod { private String algorithm = null; private int keySize = Integer.MIN_VALUE; private byte[] oaepParams = null; private List encryptionMethodInformation = null; private String digestAlgorithm = null; private String mgfAlgorithm = null; /** * Constructor. * @param algorithm */ public EncryptionMethodImpl(String algorithm) { URI tmpAlgorithm = null; try { tmpAlgorithm = new URI(algorithm); } catch (URISyntaxException ex) { throw (IllegalArgumentException) new IllegalArgumentException().initCause(ex); } this.algorithm = tmpAlgorithm.toString(); encryptionMethodInformation = new LinkedList(); } /** @inheritDoc */ public String getAlgorithm() { return algorithm; } /** @inheritDoc */ public int getKeySize() { return keySize; } /** @inheritDoc */ public void setKeySize(int size) { keySize = size; } /** @inheritDoc */ public byte[] getOAEPparams() { return oaepParams; } /** @inheritDoc */ public void setOAEPparams(byte[] params) { oaepParams = params; } /** @inheritDoc */ public void setDigestAlgorithm(String digestAlgorithm) { this.digestAlgorithm = digestAlgorithm; } /** @inheritDoc */ public String getDigestAlgorithm() { return digestAlgorithm; } /** @inheritDoc */ public void setMGFAlgorithm(String mgfAlgorithm) { this.mgfAlgorithm = mgfAlgorithm; } /** @inheritDoc */ public String getMGFAlgorithm() { return mgfAlgorithm; } /** @inheritDoc */ public Iterator getEncryptionMethodInformation() { return encryptionMethodInformation.iterator(); } /** @inheritDoc */ public void addEncryptionMethodInformation(Element info) { encryptionMethodInformation.add(info); } /** @inheritDoc */ public void removeEncryptionMethodInformation(Element info) { encryptionMethodInformation.remove(info); } Element toElement() { Element result = XMLUtils.createElementInEncryptionSpace( contextDocument, EncryptionConstants._TAG_ENCRYPTIONMETHOD ); result.setAttributeNS(null, EncryptionConstants._ATT_ALGORITHM, algorithm); if (keySize > 0) { result.appendChild( XMLUtils.createElementInEncryptionSpace( contextDocument, EncryptionConstants._TAG_KEYSIZE ).appendChild(contextDocument.createTextNode(String.valueOf(keySize)))); } if (null != oaepParams) { Element oaepElement = XMLUtils.createElementInEncryptionSpace( contextDocument, EncryptionConstants._TAG_OAEPPARAMS ); oaepElement.appendChild(contextDocument.createTextNode(Base64.encode(oaepParams))); result.appendChild(oaepElement); } if (digestAlgorithm != null) { Element digestElement = XMLUtils.createElementInSignatureSpace(contextDocument, Constants._TAG_DIGESTMETHOD); digestElement.setAttributeNS(null, "Algorithm", digestAlgorithm); result.appendChild(digestElement); } if (mgfAlgorithm != null) { Element mgfElement = XMLUtils.createElementInEncryption11Space( contextDocument, EncryptionConstants._TAG_MGF ); mgfElement.setAttributeNS(null, "Algorithm", mgfAlgorithm); mgfElement.setAttributeNS( Constants.NamespaceSpecNS, "xmlns:" + ElementProxy.getDefaultPrefix(EncryptionConstants.EncryptionSpec11NS), EncryptionConstants.EncryptionSpec11NS ); result.appendChild(mgfElement); } Iterator itr = encryptionMethodInformation.iterator(); while (itr.hasNext()) { result.appendChild(itr.next()); } return result; } } private class EncryptionPropertiesImpl implements EncryptionProperties { private String id = null; private List encryptionProperties = null; /** * Constructor. */ public EncryptionPropertiesImpl() { encryptionProperties = new LinkedList(); } /** @inheritDoc */ public String getId() { return id; } /** @inheritDoc */ public void setId(String id) { this.id = id; } /** @inheritDoc */ public Iterator getEncryptionProperties() { return encryptionProperties.iterator(); } /** @inheritDoc */ public void addEncryptionProperty(EncryptionProperty property) { encryptionProperties.add(property); } /** @inheritDoc */ public void removeEncryptionProperty(EncryptionProperty property) { encryptionProperties.remove(property); } Element toElement() { Element result = XMLUtils.createElementInEncryptionSpace( contextDocument, EncryptionConstants._TAG_ENCRYPTIONPROPERTIES ); if (null != id) { result.setAttributeNS(null, EncryptionConstants._ATT_ID, id); } Iterator itr = getEncryptionProperties(); while (itr.hasNext()) { result.appendChild(((EncryptionPropertyImpl)itr.next()).toElement()); } return result; } } private class EncryptionPropertyImpl implements EncryptionProperty { private String target = null; private String id = null; private Map attributeMap = new HashMap(); private List encryptionInformation = null; /** * Constructor. */ public EncryptionPropertyImpl() { encryptionInformation = new LinkedList(); } /** @inheritDoc */ public String getTarget() { return target; } /** @inheritDoc */ public void setTarget(String target) { if (target == null || target.length() == 0) { this.target = null; } else if (target.startsWith("#")) { /* * This is a same document URI reference. Do not parse, * because it has no scheme. */ this.target = target; } else { URI tmpTarget = null; try { tmpTarget = new URI(target); } catch (URISyntaxException ex) { throw (IllegalArgumentException) new IllegalArgumentException().initCause(ex); } this.target = tmpTarget.toString(); } } /** @inheritDoc */ public String getId() { return id; } /** @inheritDoc */ public void setId(String id) { this.id = id; } /** @inheritDoc */ public String getAttribute(String attribute) { return attributeMap.get(attribute); } /** @inheritDoc */ public void setAttribute(String attribute, String value) { attributeMap.put(attribute, value); } /** @inheritDoc */ public Iterator getEncryptionInformation() { return encryptionInformation.iterator(); } /** @inheritDoc */ public void addEncryptionInformation(Element info) { encryptionInformation.add(info); } /** @inheritDoc */ public void removeEncryptionInformation(Element info) { encryptionInformation.remove(info); } Element toElement() { Element result = XMLUtils.createElementInEncryptionSpace( contextDocument, EncryptionConstants._TAG_ENCRYPTIONPROPERTY ); if (null != target) { result.setAttributeNS(null, EncryptionConstants._ATT_TARGET, target); } if (null != id) { result.setAttributeNS(null, EncryptionConstants._ATT_ID, id); } // TODO: figure out the anyAttribyte stuff... // TODO: figure out the any stuff... return result; } } private class TransformsImpl extends org.apache.xml.security.transforms.Transforms implements Transforms { /** * Construct Transforms */ public TransformsImpl() { super(contextDocument); } /** * * @param doc */ public TransformsImpl(Document doc) { if (doc == null) { throw new RuntimeException("Document is null"); } this.doc = doc; this.constructionElement = createElementForFamilyLocal( this.doc, this.getBaseNamespace(), this.getBaseLocalName() ); } /** * * @param element * @throws XMLSignatureException * @throws InvalidTransformException * @throws XMLSecurityException * @throws TransformationException */ public TransformsImpl(Element element) throws XMLSignatureException, InvalidTransformException, XMLSecurityException, TransformationException { super(element, ""); } /** * * @return the XML Element form of that Transforms */ public Element toElement() { if (doc == null) { doc = contextDocument; } return getElement(); } /** @inheritDoc */ public org.apache.xml.security.transforms.Transforms getDSTransforms() { return this; } // Over-ride the namespace /** @inheritDoc */ public String getBaseNamespace() { return EncryptionConstants.EncryptionSpecNS; } } private class ReferenceListImpl implements ReferenceList { private Class sentry; private List references; /** * Constructor. * @param type */ public ReferenceListImpl(int type) { if (type == ReferenceList.DATA_REFERENCE) { sentry = DataReference.class; } else if (type == ReferenceList.KEY_REFERENCE) { sentry = KeyReference.class; } else { throw new IllegalArgumentException(); } references = new LinkedList(); } /** @inheritDoc */ public void add(Reference reference) { if (!reference.getClass().equals(sentry)) { throw new IllegalArgumentException(); } references.add(reference); } /** @inheritDoc */ public void remove(Reference reference) { if (!reference.getClass().equals(sentry)) { throw new IllegalArgumentException(); } references.remove(reference); } /** @inheritDoc */ public int size() { return references.size(); } /** @inheritDoc */ public boolean isEmpty() { return references.isEmpty(); } /** @inheritDoc */ public Iterator getReferences() { return references.iterator(); } Element toElement() { Element result = ElementProxy.createElementForFamily( contextDocument, EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_REFERENCELIST ); Iterator eachReference = references.iterator(); while (eachReference.hasNext()) { Reference reference = eachReference.next(); result.appendChild(((ReferenceImpl) reference).toElement()); } return result; } /** @inheritDoc */ public Reference newDataReference(String uri) { return new DataReference(uri); } /** @inheritDoc */ public Reference newKeyReference(String uri) { return new KeyReference(uri); } /** * ReferenceImpl is an implementation of * Reference. * * @see Reference */ private abstract class ReferenceImpl implements Reference { private String uri; private List referenceInformation; ReferenceImpl(String uri) { this.uri = uri; referenceInformation = new LinkedList(); } /** @inheritDoc */ public abstract String getType(); /** @inheritDoc */ public String getURI() { return uri; } /** @inheritDoc */ public Iterator getElementRetrievalInformation() { return referenceInformation.iterator(); } /** @inheritDoc */ public void setURI(String uri) { this.uri = uri; } /** @inheritDoc */ public void removeElementRetrievalInformation(Element node) { referenceInformation.remove(node); } /** @inheritDoc */ public void addElementRetrievalInformation(Element node) { referenceInformation.add(node); } /** * @return the XML Element form of that Reference */ public Element toElement() { String tagName = getType(); Element result = ElementProxy.createElementForFamily( contextDocument, EncryptionConstants.EncryptionSpecNS, tagName ); result.setAttributeNS(null, EncryptionConstants._ATT_URI, uri); // TODO: Need to martial referenceInformation // Figure out how to make this work.. // return result; } } private class DataReference extends ReferenceImpl { DataReference(String uri) { super(uri); } /** @inheritDoc */ public String getType() { return EncryptionConstants._TAG_DATAREFERENCE; } } private class KeyReference extends ReferenceImpl { KeyReference(String uri) { super(uri); } /** @inheritDoc */ public String getType() { return EncryptionConstants._TAG_KEYREFERENCE; } } } } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/encryption/Serializer.java0000644000175000017500000000715711720667340030643 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.encryption; import org.apache.xml.security.c14n.Canonicalizer; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * Converts Strings into Nodes and visa versa. */ public interface Serializer { /** * Set the Canonicalizer object to use. */ void setCanonicalizer(Canonicalizer canon); /** * Returns a String representation of the specified * Element. * * @param element the Element to serialize. * @return the String representation of the serilaized * Element. * @throws Exception */ @Deprecated String serialize(Element element) throws Exception; /** * Returns a byte[] representation of the specified * Element. * * @param element the Element to serialize. * @return the byte[] representation of the serilaized * Element. * @throws Exception */ byte[] serializeToByteArray(Element element) throws Exception; /** * Returns a String representation of the specified * NodeList. * * @param content the NodeList to serialize. * @return the String representation of the serialized * NodeList. * @throws Exception */ @Deprecated String serialize(NodeList content) throws Exception; /** * Returns a byte[] representation of the specified * NodeList. * * @param content the NodeList to serialize. * @return the byte[] representation of the serialized * NodeList. * @throws Exception */ byte[] serializeToByteArray(NodeList content) throws Exception; /** * Use the Canonicalizer to serialize the node * @param node * @return the canonicalization of the node * @throws Exception */ @Deprecated String canonSerialize(Node node) throws Exception; /** * Use the Canonicalizer to serialize the node * @param node * @return the (byte[]) canonicalization of the node * @throws Exception */ byte[] canonSerializeToByteArray(Node node) throws Exception; /** * @param source * @param ctx * @return the Node resulting from the parse of the source * @throws XMLEncryptionException */ @Deprecated Node deserialize(String source, Node ctx) throws XMLEncryptionException; /** * @param source * @param ctx * @return the Node resulting from the parse of the source * @throws XMLEncryptionException */ Node deserialize(byte[] source, Node ctx) throws XMLEncryptionException; } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/encryption/EncryptedData.java0000644000175000017500000000273411553001352031242 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.encryption; /** * The EncryptedData element is the core element in the syntax. Not * only does its CipherData child contain the encrypted data, but * it's also the element that replaces the encrypted element, or serves as the * new document root. *

* It's schema definition is as follows: *

*

* <element name='EncryptedData' type='xenc:EncryptedDataType'/> * <complexType name='EncryptedDataType'> * <complexContent> * <extension base='xenc:EncryptedType'/> * </complexContent> * </complexType> * * * @author Axl Mattheus */ public interface EncryptedData extends EncryptedType { } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/encryption/EncryptionMethod.java0000644000175000017500000000733012233525734032016 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.encryption; import java.util.Iterator; import org.w3c.dom.Element; /** * EncryptionMethod describes the encryption algorithm applied to * the cipher data. If the element is absent, the encryption algorithm must be * known by the recipient or the decryption will fail. *

* It is defined as follows: *

* <complexType name='EncryptionMethodType' mixed='true'> * <sequence> * <element name='KeySize' minOccurs='0' type='xenc:KeySizeType'/> * <element name='OAEPparams' minOccurs='0' type='base64Binary'/> * <any namespace='##other' minOccurs='0' maxOccurs='unbounded'/> * </sequence> * <attribute name='Algorithm' type='anyURI' use='required'/> * </complexType> * * * @author Axl Mattheus */ public interface EncryptionMethod { /** * Returns the algorithm applied to the cipher data. * * @return the encryption algorithm. */ String getAlgorithm(); /** * Returns the key size of the key of the algorithm applied to the cipher * data. * * @return the key size. */ int getKeySize(); /** * Sets the size of the key of the algorithm applied to the cipher data. * * @param size the key size. */ void setKeySize(int size); /** * Returns the OAEP parameters of the algorithm applied applied to the * cipher data. * * @return the OAEP parameters. */ byte[] getOAEPparams(); /** * Sets the OAEP parameters. * * @param parameters the OAEP parameters. */ void setOAEPparams(byte[] parameters); /** * Set the Digest Algorithm to use * @param digestAlgorithm the Digest Algorithm to use */ void setDigestAlgorithm(String digestAlgorithm); /** * Get the Digest Algorithm to use * @return the Digest Algorithm to use */ String getDigestAlgorithm(); /** * Set the MGF Algorithm to use * @param mgfAlgorithm the MGF Algorithm to use */ void setMGFAlgorithm(String mgfAlgorithm); /** * Get the MGF Algorithm to use * @return the MGF Algorithm to use */ String getMGFAlgorithm(); /** * Returns an iterator over all the additional elements contained in the * EncryptionMethod. * * @return an Iterator over all the additional information * about the EncryptionMethod. */ Iterator getEncryptionMethodInformation(); /** * Adds encryption method information. * * @param information additional encryption method information. */ void addEncryptionMethodInformation(Element information); /** * Removes encryption method information. * * @param information the information to remove from the * EncryptionMethod. */ void removeEncryptionMethodInformation(Element information); } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/encryption/ReferenceList.java0000644000175000017500000000621511750731244031254 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.encryption; import java.util.Iterator; /** * ReferenceList is an element that contains pointers from a key * value of an EncryptedKey to items encrypted by that key value * (EncryptedData or EncryptedKey elements). *

* It is defined as follows: *

* <element name='ReferenceList'> * <complexType> * <choice minOccurs='1' maxOccurs='unbounded'> * <element name='DataReference' type='xenc:ReferenceType'/> * <element name='KeyReference' type='xenc:ReferenceType'/> * </choice> * </complexType> * </element> * * * @author Axl Mattheus * @see Reference */ public interface ReferenceList { /** DATA TAG */ int DATA_REFERENCE = 0x00000001; /** KEY TAG */ int KEY_REFERENCE = 0x00000002; /** * Adds a reference to this reference list. * * @param reference the reference to add. * @throws IllegalAccessException if the Reference is not an * instance of DataReference or KeyReference. */ void add(Reference reference); /** * Removes a reference from the ReferenceList. * * @param reference the reference to remove. */ void remove(Reference reference); /** * Returns the size of the ReferenceList. * * @return the size of the ReferenceList. */ int size(); /** * Indicates if the ReferenceList is empty. * * @return true if the ReferenceList is * empty, else false. */ boolean isEmpty(); /** * Returns an Iterator over all the References * contained in this ReferenceList. * * @return Iterator. */ Iterator getReferences(); /** * DataReference factory method. Returns a * DataReference. * @param uri * @return a DataReference. */ Reference newDataReference(String uri); /** * KeyReference factory method. Returns a * KeyReference. * @param uri * @return a KeyReference. */ Reference newKeyReference(String uri); } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/0000755000175000017500000000000012273503733024622 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/DOMNamespaceContext.java0000644000175000017500000000451711647260425031277 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import javax.xml.namespace.NamespaceContext; import org.w3c.dom.Attr; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; /** */ public class DOMNamespaceContext implements NamespaceContext { private Map namespaceMap = new HashMap(); public DOMNamespaceContext(Node contextNode) { addNamespaces(contextNode); } public String getNamespaceURI(String arg0) { return namespaceMap.get(arg0); } public String getPrefix(String arg0) { for (String key : namespaceMap.keySet()) { String value = namespaceMap.get(key); if (value.equals(arg0)) { return key; } } return null; } public Iterator getPrefixes(String arg0) { return namespaceMap.keySet().iterator(); } private void addNamespaces(Node element) { if (element.getParentNode() != null) { addNamespaces(element.getParentNode()); } if (element instanceof Element) { Element el = (Element)element; NamedNodeMap map = el.getAttributes(); for (int x = 0; x < map.getLength(); x++) { Attr attr = (Attr)map.item(x); if ("xmlns".equals(attr.getPrefix())) { namespaceMap.put(attr.getLocalName(), attr.getValue()); } } } } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/package.html0000644000175000017500000000011107533712503027074 0ustar tonytony

general utility classes.

libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/ElementCheckerImpl.java0000644000175000017500000000652111556225757031203 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; import org.apache.xml.security.exceptions.XMLSecurityException; import org.w3c.dom.Element; import org.w3c.dom.Node; /**@deprecated*/ public abstract class ElementCheckerImpl implements ElementChecker { public boolean isNamespaceElement(Node el, String type, String ns) { if ((el == null) || ns != el.getNamespaceURI() || !el.getLocalName().equals(type)){ return false; } return true; } /** A checker for DOM that interns NS */ public static class InternedNsChecker extends ElementCheckerImpl { public void guaranteeThatElementInCorrectSpace( ElementProxy expected, Element actual ) throws XMLSecurityException { String expectedLocalname = expected.getBaseLocalName(); String expectedNamespace = expected.getBaseNamespace(); String localnameIS = actual.getLocalName(); String namespaceIS = actual.getNamespaceURI(); if ((expectedNamespace != namespaceIS) || !expectedLocalname.equals(localnameIS)) { Object exArgs[] = { namespaceIS + ":" + localnameIS, expectedNamespace + ":" + expectedLocalname}; throw new XMLSecurityException("xml.WrongElement", exArgs); } } } /** A checker for DOM that interns NS */ public static class FullChecker extends ElementCheckerImpl { public void guaranteeThatElementInCorrectSpace( ElementProxy expected, Element actual ) throws XMLSecurityException { String expectedLocalname = expected.getBaseLocalName(); String expectedNamespace = expected.getBaseNamespace(); String localnameIS = actual.getLocalName(); String namespaceIS = actual.getNamespaceURI(); if ((!expectedNamespace.equals(namespaceIS)) || !expectedLocalname.equals(localnameIS) ) { Object exArgs[] = { namespaceIS + ":" + localnameIS, expectedNamespace + ":" + expectedLocalname}; throw new XMLSecurityException("xml.WrongElement", exArgs); } } } /** An empty checker if schema checking is used */ public static class EmptyChecker extends ElementCheckerImpl { public void guaranteeThatElementInCorrectSpace( ElementProxy expected, Element actual ) throws XMLSecurityException { // empty } } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/ElementProxy.java0000644000175000017500000003747311703574337030143 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; import java.math.BigInteger; import java.util.concurrent.ConcurrentHashMap; import java.util.Map; import org.apache.xml.security.exceptions.Base64DecodingException; import org.apache.xml.security.exceptions.XMLSecurityException; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.w3c.dom.Text; /** * This is the base class to all Objects which have a direct 1:1 mapping to an * Element in a particular namespace. */ public abstract class ElementProxy { protected static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ElementProxy.class); /** Field constructionElement */ protected Element constructionElement = null; /** Field baseURI */ protected String baseURI = null; /** Field doc */ protected Document doc = null; /** Field prefixMappings */ private static Map prefixMappings = new ConcurrentHashMap(); /** * Constructor ElementProxy * */ public ElementProxy() { } /** * Constructor ElementProxy * * @param doc */ public ElementProxy(Document doc) { if (doc == null) { throw new RuntimeException("Document is null"); } this.doc = doc; this.constructionElement = createElementForFamilyLocal(this.doc, this.getBaseNamespace(), this.getBaseLocalName()); } /** * Constructor ElementProxy * * @param element * @param BaseURI * @throws XMLSecurityException */ public ElementProxy(Element element, String BaseURI) throws XMLSecurityException { if (element == null) { throw new XMLSecurityException("ElementProxy.nullElement"); } if (log.isDebugEnabled()) { log.debug("setElement(\"" + element.getTagName() + "\", \"" + BaseURI + "\")"); } this.doc = element.getOwnerDocument(); this.constructionElement = element; this.baseURI = BaseURI; this.guaranteeThatElementInCorrectSpace(); } /** * Returns the namespace of the Elements of the sub-class. * * @return the namespace of the Elements of the sub-class. */ public abstract String getBaseNamespace(); /** * Returns the localname of the Elements of the sub-class. * * @return the localname of the Elements of the sub-class. */ public abstract String getBaseLocalName(); protected Element createElementForFamilyLocal( Document doc, String namespace, String localName ) { Element result = null; if (namespace == null) { result = doc.createElementNS(null, localName); } else { String baseName = this.getBaseNamespace(); String prefix = ElementProxy.getDefaultPrefix(baseName); if ((prefix == null) || (prefix.length() == 0)) { result = doc.createElementNS(namespace, localName); result.setAttributeNS(Constants.NamespaceSpecNS, "xmlns", namespace); } else { result = doc.createElementNS(namespace, prefix + ":" + localName); result.setAttributeNS(Constants.NamespaceSpecNS, "xmlns:" + prefix, namespace); } } return result; } /** * This method creates an Element in a given namespace with a given localname. * It uses the {@link ElementProxy#getDefaultPrefix} method to decide whether * a particular prefix is bound to that namespace. *
* This method was refactored out of the constructor. * * @param doc * @param namespace * @param localName * @return The element created. */ public static Element createElementForFamily(Document doc, String namespace, String localName) { Element result = null; String prefix = ElementProxy.getDefaultPrefix(namespace); if (namespace == null) { result = doc.createElementNS(null, localName); } else { if ((prefix == null) || (prefix.length() == 0)) { result = doc.createElementNS(namespace, localName); result.setAttributeNS(Constants.NamespaceSpecNS, "xmlns", namespace); } else { result = doc.createElementNS(namespace, prefix + ":" + localName); result.setAttributeNS(Constants.NamespaceSpecNS, "xmlns:" + prefix, namespace); } } return result; } /** * Method setElement * * @param element * @param BaseURI * @throws XMLSecurityException */ public void setElement(Element element, String BaseURI) throws XMLSecurityException { if (element == null) { throw new XMLSecurityException("ElementProxy.nullElement"); } if (log.isDebugEnabled()) { log.debug("setElement(" + element.getTagName() + ", \"" + BaseURI + "\""); } this.doc = element.getOwnerDocument(); this.constructionElement = element; this.baseURI = BaseURI; } /** * Returns the Element which was constructed by the Object. * * @return the Element which was constructed by the Object. */ public final Element getElement() { return this.constructionElement; } /** * Returns the Element plus a leading and a trailing CarriageReturn Text node. * * @return the Element which was constructed by the Object. */ public final NodeList getElementPlusReturns() { HelperNodeList nl = new HelperNodeList(); nl.appendChild(this.doc.createTextNode("\n")); nl.appendChild(this.getElement()); nl.appendChild(this.doc.createTextNode("\n")); return nl; } /** * Method getDocument * * @return the Document where this element is contained. */ public Document getDocument() { return this.doc; } /** * Method getBaseURI * * @return the base uri of the namespace of this element */ public String getBaseURI() { return this.baseURI; } /** * Method guaranteeThatElementInCorrectSpace * * @throws XMLSecurityException */ void guaranteeThatElementInCorrectSpace() throws XMLSecurityException { String expectedLocalName = this.getBaseLocalName(); String expectedNamespaceUri = this.getBaseNamespace(); String actualLocalName = this.constructionElement.getLocalName(); String actualNamespaceUri = this.constructionElement.getNamespaceURI(); if(!expectedNamespaceUri.equals(actualNamespaceUri) && !expectedLocalName.equals(actualLocalName)) { Object exArgs[] = { actualNamespaceUri + ":" + actualLocalName, expectedNamespaceUri + ":" + expectedLocalName}; throw new XMLSecurityException("xml.WrongElement", exArgs); } } /** * Method addBigIntegerElement * * @param bi * @param localname */ public void addBigIntegerElement(BigInteger bi, String localname) { if (bi != null) { Element e = XMLUtils.createElementInSignatureSpace(this.doc, localname); Base64.fillElementWithBigInteger(e, bi); this.constructionElement.appendChild(e); XMLUtils.addReturnToElement(this.constructionElement); } } /** * Method addBase64Element * * @param bytes * @param localname */ public void addBase64Element(byte[] bytes, String localname) { if (bytes != null) { Element e = Base64.encodeToElement(this.doc, localname, bytes); this.constructionElement.appendChild(e); if (!XMLUtils.ignoreLineBreaks()) { this.constructionElement.appendChild(this.doc.createTextNode("\n")); } } } /** * Method addTextElement * * @param text * @param localname */ public void addTextElement(String text, String localname) { Element e = XMLUtils.createElementInSignatureSpace(this.doc, localname); Text t = this.doc.createTextNode(text); e.appendChild(t); this.constructionElement.appendChild(e); XMLUtils.addReturnToElement(this.constructionElement); } /** * Method addBase64Text * * @param bytes */ public void addBase64Text(byte[] bytes) { if (bytes != null) { Text t = XMLUtils.ignoreLineBreaks() ? this.doc.createTextNode(Base64.encode(bytes)) : this.doc.createTextNode("\n" + Base64.encode(bytes) + "\n"); this.constructionElement.appendChild(t); } } /** * Method addText * * @param text */ public void addText(String text) { if (text != null) { Text t = this.doc.createTextNode(text); this.constructionElement.appendChild(t); } } /** * Method getVal * * @param localname * @param namespace * @return The biginteger contained in the given element * @throws Base64DecodingException */ public BigInteger getBigIntegerFromChildElement( String localname, String namespace ) throws Base64DecodingException { return Base64.decodeBigIntegerFromText( XMLUtils.selectNodeText( this.constructionElement.getFirstChild(), namespace, localname, 0 ) ); } /** * Method getBytesFromChildElement * @deprecated * @param localname * @param namespace * @return the bytes * @throws XMLSecurityException */ public byte[] getBytesFromChildElement(String localname, String namespace) throws XMLSecurityException { Element e = XMLUtils.selectNode( this.constructionElement.getFirstChild(), namespace, localname, 0 ); return Base64.decode(e); } /** * Method getTextFromChildElement * * @param localname * @param namespace * @return the Text of the textNode */ public String getTextFromChildElement(String localname, String namespace) { return XMLUtils.selectNode( this.constructionElement.getFirstChild(), namespace, localname, 0).getTextContent(); } /** * Method getBytesFromTextChild * * @return The base64 bytes from the text children of this element * @throws XMLSecurityException */ public byte[] getBytesFromTextChild() throws XMLSecurityException { return Base64.decode(XMLUtils.getFullTextChildrenFromElement(this.constructionElement)); } /** * Method getTextFromTextChild * * @return the Text obtained by concatenating all the text nodes of this * element */ public String getTextFromTextChild() { return XMLUtils.getFullTextChildrenFromElement(this.constructionElement); } /** * Method length * * @param namespace * @param localname * @return the number of elements {namespace}:localname under this element */ public int length(String namespace, String localname) { int number = 0; Node sibling = this.constructionElement.getFirstChild(); while (sibling != null) { if (localname.equals(sibling.getLocalName()) && namespace.equals(sibling.getNamespaceURI())) { number++; } sibling = sibling.getNextSibling(); } return number; } /** * Adds an xmlns: definition to the Element. This can be called as follows: * *
     * // set namespace with ds prefix
     * xpathContainer.setXPathNamespaceContext("ds", "http://www.w3.org/2000/09/xmldsig#");
     * xpathContainer.setXPathNamespaceContext("xmlns:ds", "http://www.w3.org/2000/09/xmldsig#");
     * 
* * @param prefix * @param uri * @throws XMLSecurityException */ public void setXPathNamespaceContext(String prefix, String uri) throws XMLSecurityException { String ns; if ((prefix == null) || (prefix.length() == 0)) { throw new XMLSecurityException("defaultNamespaceCannotBeSetHere"); } else if (prefix.equals("xmlns")) { throw new XMLSecurityException("defaultNamespaceCannotBeSetHere"); } else if (prefix.startsWith("xmlns:")) { ns = prefix;//"xmlns:" + prefix.substring("xmlns:".length()); } else { ns = "xmlns:" + prefix; } Attr a = this.constructionElement.getAttributeNodeNS(Constants.NamespaceSpecNS, ns); if (a != null) { if (!a.getNodeValue().equals(uri)) { Object exArgs[] = { ns, this.constructionElement.getAttributeNS(null, ns) }; throw new XMLSecurityException("namespacePrefixAlreadyUsedByOtherURI", exArgs); } return; } this.constructionElement.setAttributeNS(Constants.NamespaceSpecNS, ns, uri); } /** * Method setDefaultPrefix * * @param namespace * @param prefix * @throws XMLSecurityException */ public static void setDefaultPrefix(String namespace, String prefix) throws XMLSecurityException { if (prefixMappings.containsValue(prefix)) { String storedPrefix = prefixMappings.get(namespace); if (!storedPrefix.equals(prefix)) { Object exArgs[] = { prefix, namespace, storedPrefix }; throw new XMLSecurityException("prefix.AlreadyAssigned", exArgs); } } if (Constants.SignatureSpecNS.equals(namespace)) { XMLUtils.setDsPrefix(prefix); } if (EncryptionConstants.EncryptionSpecNS.equals(namespace)) { XMLUtils.setXencPrefix(prefix); } prefixMappings.put(namespace, prefix); } /** * This method registers the default prefixes. */ public static void registerDefaultPrefixes() throws XMLSecurityException { setDefaultPrefix("http://www.w3.org/2000/09/xmldsig#", "ds"); setDefaultPrefix("http://www.w3.org/2001/04/xmlenc#", "xenc"); setDefaultPrefix("http://www.w3.org/2009/xmlenc11#", "xenc11"); setDefaultPrefix("http://www.xmlsecurity.org/experimental#", "experimental"); setDefaultPrefix("http://www.w3.org/2002/04/xmldsig-filter2", "dsig-xpath-old"); setDefaultPrefix("http://www.w3.org/2002/06/xmldsig-filter2", "dsig-xpath"); setDefaultPrefix("http://www.w3.org/2001/10/xml-exc-c14n#", "ec"); setDefaultPrefix( "http://www.nue.et-inf.uni-siegen.de/~geuer-pollmann/#xpathFilter", "xx" ); } /** * Method getDefaultPrefix * * @param namespace * @return the default prefix bind to this element. */ public static String getDefaultPrefix(String namespace) { return prefixMappings.get(namespace); } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/XPathFactory.java0000644000175000017500000000407211714457710030046 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; /** * A Factory to return an XPathAPI instance. If Xalan is available it returns XalanXPathAPI. If not, then * it returns JDKXPathAPI. */ public abstract class XPathFactory { private static boolean xalanInstalled; static { try { Class funcTableClass = ClassLoaderUtils.loadClass("org.apache.xpath.compiler.FunctionTable", XPathFactory.class); if (funcTableClass != null) { xalanInstalled = true; } } catch (Exception e) { //ignore } } protected synchronized static boolean isXalanInstalled() { return xalanInstalled; } /** * Get a new XPathFactory instance */ public static XPathFactory newInstance() { if (!isXalanInstalled()) { return new JDKXPathFactory(); } // Xalan is available if (XalanXPathAPI.isInstalled()) { return new XalanXPathFactory(); } // Some problem was encountered in fixing up the Xalan FunctionTable so fall back to the // JDK implementation return new JDKXPathFactory(); } /** * Get a new XPathAPI instance */ public abstract XPathAPI newXPathAPI(); } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/JavaUtils.java0000644000175000017500000001014411752162474027373 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; /** * A collection of different, general-purpose methods for JAVA-specific things * @author Christian Geuer-Pollmann */ public class JavaUtils { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(JavaUtils.class); private JavaUtils() { // we don't allow instantiation } /** * Method getBytesFromFile * * @param fileName * @return the bytes read from the file * * @throws FileNotFoundException * @throws IOException */ public static byte[] getBytesFromFile(String fileName) throws FileNotFoundException, IOException { byte refBytes[] = null; FileInputStream fisRef = null; UnsyncByteArrayOutputStream baos = null; try { fisRef = new FileInputStream(fileName); baos = new UnsyncByteArrayOutputStream(); byte buf[] = new byte[1024]; int len; while ((len = fisRef.read(buf)) > 0) { baos.write(buf, 0, len); } refBytes = baos.toByteArray(); } finally { if (baos != null) { baos.close(); } if (fisRef != null) { fisRef.close(); } } return refBytes; } /** * Method writeBytesToFilename * * @param filename * @param bytes */ public static void writeBytesToFilename(String filename, byte[] bytes) { FileOutputStream fos = null; try { if (filename != null && bytes != null) { File f = new File(filename); fos = new FileOutputStream(f); fos.write(bytes); fos.close(); } else { if (log.isDebugEnabled()) { log.debug("writeBytesToFilename got null byte[] pointed"); } } } catch (IOException ex) { if (fos != null) { try { fos.close(); } catch (IOException ioe) { if (log.isDebugEnabled()) { log.debug(ioe); } } } } } /** * This method reads all bytes from the given InputStream till EOF and * returns them as a byte array. * * @param inputStream * @return the bytes read from the stream * * @throws FileNotFoundException * @throws IOException */ public static byte[] getBytesFromStream(InputStream inputStream) throws IOException { UnsyncByteArrayOutputStream baos = null; byte[] retBytes = null; try { baos = new UnsyncByteArrayOutputStream(); byte buf[] = new byte[4 * 1024]; int len; while ((len = inputStream.read(buf)) > 0) { baos.write(buf, 0, len); } retBytes = baos.toByteArray(); } finally { baos.close(); } return retBytes; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/ClassLoaderUtils.java0000644000175000017500000002251111561742421030701 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; /** * This class is extremely useful for loading resources and classes in a fault * tolerant manner that works across different applications servers. Do not * touch this unless you're a grizzled classloading guru veteran who is going to * verify any change on 6 different application servers. */ public final class ClassLoaderUtils { /** {@link org.apache.commons.logging} logging facility */ private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ClassLoaderUtils.class); private ClassLoaderUtils() { } /** * Load a given resource.

This method will try to load the resource * using the following methods (in order): *

    *
  • From Thread.currentThread().getContextClassLoader() *
  • From ClassLoaderUtil.class.getClassLoader() *
  • callingClass.getClassLoader() *
* * @param resourceName The name of the resource to load * @param callingClass The Class object of the calling object */ public static URL getResource(String resourceName, Class callingClass) { URL url = Thread.currentThread().getContextClassLoader().getResource(resourceName); if (url == null && resourceName.startsWith("/")) { //certain classloaders need it without the leading / url = Thread.currentThread().getContextClassLoader().getResource( resourceName.substring(1) ); } ClassLoader cluClassloader = ClassLoaderUtils.class.getClassLoader(); if (cluClassloader == null) { cluClassloader = ClassLoader.getSystemClassLoader(); } if (url == null) { url = cluClassloader.getResource(resourceName); } if (url == null && resourceName.startsWith("/")) { //certain classloaders need it without the leading / url = cluClassloader.getResource(resourceName.substring(1)); } if (url == null) { ClassLoader cl = callingClass.getClassLoader(); if (cl != null) { url = cl.getResource(resourceName); } } if (url == null) { url = callingClass.getResource(resourceName); } if ((url == null) && (resourceName != null) && (resourceName.charAt(0) != '/')) { return getResource('/' + resourceName, callingClass); } return url; } /** * Load a given resources.

This method will try to load the resources * using the following methods (in order): *

    *
  • From Thread.currentThread().getContextClassLoader() *
  • From ClassLoaderUtil.class.getClassLoader() *
  • callingClass.getClassLoader() *
* * @param resourceName The name of the resource to load * @param callingClass The Class object of the calling object */ public static List getResources(String resourceName, Class callingClass) { List ret = new ArrayList(); Enumeration urls = new Enumeration() { public boolean hasMoreElements() { return false; } public URL nextElement() { return null; } }; try { urls = Thread.currentThread().getContextClassLoader().getResources(resourceName); } catch (IOException e) { if (log.isDebugEnabled()) { log.debug(e); } //ignore } if (!urls.hasMoreElements() && resourceName.startsWith("/")) { //certain classloaders need it without the leading / try { urls = Thread.currentThread().getContextClassLoader().getResources( resourceName.substring(1) ); } catch (IOException e) { if (log.isDebugEnabled()) { log.debug(e); } // ignore } } ClassLoader cluClassloader = ClassLoaderUtils.class.getClassLoader(); if (cluClassloader == null) { cluClassloader = ClassLoader.getSystemClassLoader(); } if (!urls.hasMoreElements()) { try { urls = cluClassloader.getResources(resourceName); } catch (IOException e) { if (log.isDebugEnabled()) { log.debug(e); } // ignore } } if (!urls.hasMoreElements() && resourceName.startsWith("/")) { //certain classloaders need it without the leading / try { urls = cluClassloader.getResources(resourceName.substring(1)); } catch (IOException e) { if (log.isDebugEnabled()) { log.debug(e); } // ignore } } if (!urls.hasMoreElements()) { ClassLoader cl = callingClass.getClassLoader(); if (cl != null) { try { urls = cl.getResources(resourceName); } catch (IOException e) { if (log.isDebugEnabled()) { log.debug(e); } // ignore } } } if (!urls.hasMoreElements()) { URL url = callingClass.getResource(resourceName); if (url != null) { ret.add(url); } } while (urls.hasMoreElements()) { ret.add(urls.nextElement()); } if (ret.isEmpty() && (resourceName != null) && (resourceName.charAt(0) != '/')) { return getResources('/' + resourceName, callingClass); } return ret; } /** * This is a convenience method to load a resource as a stream.

The * algorithm used to find the resource is given in getResource() * * @param resourceName The name of the resource to load * @param callingClass The Class object of the calling object */ public static InputStream getResourceAsStream(String resourceName, Class callingClass) { URL url = getResource(resourceName, callingClass); try { return (url != null) ? url.openStream() : null; } catch (IOException e) { if (log.isDebugEnabled()) { log.debug(e); } return null; } } /** * Load a class with a given name.

It will try to load the class in the * following order: *

    *
  • From Thread.currentThread().getContextClassLoader() *
  • Using the basic Class.forName() *
  • From ClassLoaderUtil.class.getClassLoader() *
  • From the callingClass.getClassLoader() *
* * @param className The name of the class to load * @param callingClass The Class object of the calling object * @throws ClassNotFoundException If the class cannot be found anywhere. */ public static Class loadClass(String className, Class callingClass) throws ClassNotFoundException { try { ClassLoader cl = Thread.currentThread().getContextClassLoader(); if (cl != null) { return cl.loadClass(className); } } catch (ClassNotFoundException e) { if (log.isDebugEnabled()) { log.debug(e); } //ignore } return loadClass2(className, callingClass); } private static Class loadClass2(String className, Class callingClass) throws ClassNotFoundException { try { return Class.forName(className); } catch (ClassNotFoundException ex) { try { if (ClassLoaderUtils.class.getClassLoader() != null) { return ClassLoaderUtils.class.getClassLoader().loadClass(className); } } catch (ClassNotFoundException exc) { if (callingClass != null && callingClass.getClassLoader() != null) { return callingClass.getClassLoader().loadClass(className); } } if (log.isDebugEnabled()) { log.debug(ex); } throw ex; } } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/JDKXPathAPI.java0000644000175000017500000001131111670364673027401 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; import javax.xml.XMLConstants; import javax.xml.transform.TransformerException; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathExpression; import javax.xml.xpath.XPathExpressionException; import javax.xml.xpath.XPathFactory; import javax.xml.xpath.XPathFactoryConfigurationException; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * An implementation for XPath evaluation that uses the JDK API. */ public class JDKXPathAPI implements XPathAPI { private XPathFactory xpf; private String xpathStr; private XPathExpression xpathExpression; /** * Use an XPath string to select a nodelist. * XPath namespace prefixes are resolved from the namespaceNode. * * @param contextNode The node to start searching from. * @param xpathnode * @param str * @param namespaceNode The node from which prefixes in the XPath will be resolved to namespaces. * @return A NodeIterator, should never be null. * * @throws TransformerException */ public NodeList selectNodeList( Node contextNode, Node xpathnode, String str, Node namespaceNode ) throws TransformerException { if (!str.equals(xpathStr) || xpathExpression == null) { if (xpf == null) { xpf = XPathFactory.newInstance(); try { xpf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE); } catch (XPathFactoryConfigurationException ex) { throw new TransformerException("empty", ex); } } XPath xpath = xpf.newXPath(); xpath.setNamespaceContext(new DOMNamespaceContext(namespaceNode)); xpathStr = str; try { xpathExpression = xpath.compile(xpathStr); } catch (XPathExpressionException ex) { throw new TransformerException("empty", ex); } } try { return (NodeList)xpathExpression.evaluate(contextNode, XPathConstants.NODESET); } catch (XPathExpressionException ex) { throw new TransformerException("empty", ex); } } /** * Evaluate an XPath string and return true if the output is to be included or not. * @param contextNode The node to start searching from. * @param xpathnode The XPath node * @param str The XPath expression * @param namespaceNode The node from which prefixes in the XPath will be resolved to namespaces. */ public boolean evaluate(Node contextNode, Node xpathnode, String str, Node namespaceNode) throws TransformerException { if (!str.equals(xpathStr) || xpathExpression == null) { if (xpf == null) { xpf = XPathFactory.newInstance(); try { xpf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE); } catch (XPathFactoryConfigurationException ex) { throw new TransformerException("empty", ex); } } XPath xpath = xpf.newXPath(); xpath.setNamespaceContext(new DOMNamespaceContext(namespaceNode)); xpathStr = str; try { xpathExpression = xpath.compile(xpathStr); } catch (XPathExpressionException ex) { throw new TransformerException("empty", ex); } } try { Boolean result = (Boolean)xpathExpression.evaluate(contextNode, XPathConstants.BOOLEAN); return result.booleanValue(); } catch (XPathExpressionException ex) { throw new TransformerException("empty", ex); } } /** * Clear any context information from this object */ public void clear() { xpathStr = null; xpathExpression = null; xpf = null; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/XMLUtils.java0000644000175000017500000010672512234743735027166 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; import java.io.IOException; import java.io.OutputStream; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import javax.xml.XMLConstants; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.c14n.InvalidCanonicalizerException; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.w3c.dom.ProcessingInstruction; import org.w3c.dom.Text; /** * DOM and XML accessibility and comfort functions. * * @author Christian Geuer-Pollmann */ public class XMLUtils { private static boolean ignoreLineBreaks = AccessController.doPrivileged(new PrivilegedAction() { public Boolean run() { return Boolean.valueOf(Boolean.getBoolean ("org.apache.xml.security.ignoreLineBreaks")); } }).booleanValue(); private static volatile String dsPrefix = "ds"; private static volatile String ds11Prefix = "dsig11"; private static volatile String xencPrefix = "xenc"; private static volatile String xenc11Prefix = "xenc11"; /** {@link org.apache.commons.logging} logging facility */ private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(XMLUtils.class); /** * Constructor XMLUtils * */ private XMLUtils() { // we don't allow instantiation } /** * Set the prefix for the digital signature namespace * @param prefix the new prefix for the digital signature namespace */ public static void setDsPrefix(String prefix) { dsPrefix = prefix; } /** * Set the prefix for the digital signature 1.1 namespace * @param prefix the new prefix for the digital signature 1.1 namespace */ public static void setDs11Prefix(String prefix) { ds11Prefix = prefix; } /** * Set the prefix for the encryption namespace * @param prefix the new prefix for the encryption namespace */ public static void setXencPrefix(String prefix) { xencPrefix = prefix; } /** * Set the prefix for the encryption namespace 1.1 * @param prefix the new prefix for the encryption namespace 1.1 */ public static void setXenc11Prefix(String prefix) { xenc11Prefix = prefix; } public static Element getNextElement(Node el) { Node node = el; while ((node != null) && (node.getNodeType() != Node.ELEMENT_NODE)) { node = node.getNextSibling(); } return (Element)node; } /** * @param rootNode * @param result * @param exclude * @param com whether comments or not */ public static void getSet(Node rootNode, Set result, Node exclude, boolean com) { if ((exclude != null) && isDescendantOrSelf(exclude, rootNode)) { return; } getSetRec(rootNode, result, exclude, com); } @SuppressWarnings("fallthrough") private static void getSetRec(final Node rootNode, final Set result, final Node exclude, final boolean com) { if (rootNode == exclude) { return; } switch (rootNode.getNodeType()) { case Node.ELEMENT_NODE: result.add(rootNode); Element el = (Element)rootNode; if (el.hasAttributes()) { NamedNodeMap nl = el.getAttributes(); for (int i = 0;i < nl.getLength(); i++) { result.add(nl.item(i)); } } //no return keep working case Node.DOCUMENT_NODE: for (Node r = rootNode.getFirstChild(); r != null; r = r.getNextSibling()) { if (r.getNodeType() == Node.TEXT_NODE) { result.add(r); while ((r != null) && (r.getNodeType() == Node.TEXT_NODE)) { r = r.getNextSibling(); } if (r == null) { return; } } getSetRec(r, result, exclude, com); } return; case Node.COMMENT_NODE: if (com) { result.add(rootNode); } return; case Node.DOCUMENT_TYPE_NODE: return; default: result.add(rootNode); } } /** * Outputs a DOM tree to an {@link OutputStream}. * * @param contextNode root node of the DOM tree * @param os the {@link OutputStream} */ public static void outputDOM(Node contextNode, OutputStream os) { XMLUtils.outputDOM(contextNode, os, false); } /** * Outputs a DOM tree to an {@link OutputStream}. If an Exception is * thrown during execution, it's StackTrace is output to System.out, but the * Exception is not re-thrown. * * @param contextNode root node of the DOM tree * @param os the {@link OutputStream} * @param addPreamble */ public static void outputDOM(Node contextNode, OutputStream os, boolean addPreamble) { try { if (addPreamble) { os.write("\n".getBytes("UTF-8")); } os.write(Canonicalizer.getInstance( Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS).canonicalizeSubtree(contextNode) ); } catch (IOException ex) { if (log.isDebugEnabled()) { log.debug(ex); } } catch (InvalidCanonicalizerException ex) { if (log.isDebugEnabled()) { log.debug(ex); } } catch (CanonicalizationException ex) { if (log.isDebugEnabled()) { log.debug(ex); } } } /** * Serializes the contextNode into the OutputStream, but * suppresses all Exceptions. *
* NOTE: This should only be used for debugging purposes, * NOT in a production environment; this method ignores all exceptions, * so you won't notice if something goes wrong. If you're asking what is to * be used in a production environment, simply use the code inside the * try{} statement, but handle the Exceptions appropriately. * * @param contextNode * @param os */ public static void outputDOMc14nWithComments(Node contextNode, OutputStream os) { try { os.write(Canonicalizer.getInstance( Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS).canonicalizeSubtree(contextNode) ); } catch (IOException ex) { if (log.isDebugEnabled()) { log.debug(ex); } // throw new RuntimeException(ex.getMessage()); } catch (InvalidCanonicalizerException ex) { if (log.isDebugEnabled()) { log.debug(ex); } // throw new RuntimeException(ex.getMessage()); } catch (CanonicalizationException ex) { if (log.isDebugEnabled()) { log.debug(ex); } // throw new RuntimeException(ex.getMessage()); } } /** * Method getFullTextChildrenFromElement * * @param element * @return the string of children */ public static String getFullTextChildrenFromElement(Element element) { StringBuilder sb = new StringBuilder(); Node child = element.getFirstChild(); while (child != null) { if (child.getNodeType() == Node.TEXT_NODE) { sb.append(((Text)child).getData()); } child = child.getNextSibling(); } return sb.toString(); } /** * Creates an Element in the XML Signature specification namespace. * * @param doc the factory Document * @param elementName the local name of the Element * @return the Element */ public static Element createElementInSignatureSpace(Document doc, String elementName) { if (doc == null) { throw new RuntimeException("Document is null"); } if ((dsPrefix == null) || (dsPrefix.length() == 0)) { return doc.createElementNS(Constants.SignatureSpecNS, elementName); } return doc.createElementNS(Constants.SignatureSpecNS, dsPrefix + ":" + elementName); } /** * Creates an Element in the XML Signature 1.1 specification namespace. * * @param doc the factory Document * @param elementName the local name of the Element * @return the Element */ public static Element createElementInSignature11Space(Document doc, String elementName) { if (doc == null) { throw new RuntimeException("Document is null"); } if ((ds11Prefix == null) || (ds11Prefix.length() == 0)) { return doc.createElementNS(Constants.SignatureSpec11NS, elementName); } return doc.createElementNS(Constants.SignatureSpec11NS, ds11Prefix + ":" + elementName); } /** * Creates an Element in the XML Encryption specification namespace. * * @param doc the factory Document * @param elementName the local name of the Element * @return the Element */ public static Element createElementInEncryptionSpace(Document doc, String elementName) { if (doc == null) { throw new RuntimeException("Document is null"); } if ((xencPrefix == null) || (xencPrefix.length() == 0)) { return doc.createElementNS(EncryptionConstants.EncryptionSpecNS, elementName); } return doc.createElementNS( EncryptionConstants.EncryptionSpecNS, xencPrefix + ":" + elementName ); } /** * Creates an Element in the XML Encryption 1.1 specification namespace. * * @param doc the factory Document * @param elementName the local name of the Element * @return the Element */ public static Element createElementInEncryption11Space(Document doc, String elementName) { if (doc == null) { throw new RuntimeException("Document is null"); } if ((xenc11Prefix == null) || (xenc11Prefix.length() == 0)) { return doc.createElementNS(EncryptionConstants.EncryptionSpec11NS, elementName); } return doc.createElementNS( EncryptionConstants.EncryptionSpec11NS, xenc11Prefix + ":" + elementName ); } /** * Returns true if the element is in XML Signature namespace and the local * name equals the supplied one. * * @param element * @param localName * @return true if the element is in XML Signature namespace and the local name equals * the supplied one */ public static boolean elementIsInSignatureSpace(Element element, String localName) { if (element == null){ return false; } return Constants.SignatureSpecNS.equals(element.getNamespaceURI()) && element.getLocalName().equals(localName); } /** * Returns true if the element is in XML Signature 1.1 namespace and the local * name equals the supplied one. * * @param element * @param localName * @return true if the element is in XML Signature namespace and the local name equals * the supplied one */ public static boolean elementIsInSignature11Space(Element element, String localName) { if (element == null) { return false; } return Constants.SignatureSpec11NS.equals(element.getNamespaceURI()) && element.getLocalName().equals(localName); } /** * Returns true if the element is in XML Encryption namespace and the local * name equals the supplied one. * * @param element * @param localName * @return true if the element is in XML Encryption namespace and the local name * equals the supplied one */ public static boolean elementIsInEncryptionSpace(Element element, String localName) { if (element == null){ return false; } return EncryptionConstants.EncryptionSpecNS.equals(element.getNamespaceURI()) && element.getLocalName().equals(localName); } /** * Returns true if the element is in XML Encryption 1.1 namespace and the local * name equals the supplied one. * * @param element * @param localName * @return true if the element is in XML Encryption 1.1 namespace and the local name * equals the supplied one */ public static boolean elementIsInEncryption11Space(Element element, String localName) { if (element == null){ return false; } return EncryptionConstants.EncryptionSpec11NS.equals(element.getNamespaceURI()) && element.getLocalName().equals(localName); } /** * This method returns the owner document of a particular node. * This method is necessary because it always returns a * {@link Document}. {@link Node#getOwnerDocument} returns null * if the {@link Node} is a {@link Document}. * * @param node * @return the owner document of the node */ public static Document getOwnerDocument(Node node) { if (node.getNodeType() == Node.DOCUMENT_NODE) { return (Document) node; } try { return node.getOwnerDocument(); } catch (NullPointerException npe) { throw new NullPointerException(I18n.translate("endorsed.jdk1.4.0") + " Original message was \"" + npe.getMessage() + "\""); } } /** * This method returns the first non-null owner document of the Nodes in this Set. * This method is necessary because it always returns a * {@link Document}. {@link Node#getOwnerDocument} returns null * if the {@link Node} is a {@link Document}. * * @param xpathNodeSet * @return the owner document */ public static Document getOwnerDocument(Set xpathNodeSet) { NullPointerException npe = null; for (Node node : xpathNodeSet) { int nodeType = node.getNodeType(); if (nodeType == Node.DOCUMENT_NODE) { return (Document) node; } try { if (nodeType == Node.ATTRIBUTE_NODE) { return ((Attr)node).getOwnerElement().getOwnerDocument(); } return node.getOwnerDocument(); } catch (NullPointerException e) { npe = e; } } throw new NullPointerException(I18n.translate("endorsed.jdk1.4.0") + " Original message was \"" + (npe == null ? "" : npe.getMessage()) + "\""); } /** * Method createDSctx * * @param doc * @param prefix * @param namespace * @return the element. */ public static Element createDSctx(Document doc, String prefix, String namespace) { if ((prefix == null) || (prefix.trim().length() == 0)) { throw new IllegalArgumentException("You must supply a prefix"); } Element ctx = doc.createElementNS(null, "namespaceContext"); ctx.setAttributeNS(Constants.NamespaceSpecNS, "xmlns:" + prefix.trim(), namespace); return ctx; } /** * Method addReturnToElement * * @param e */ public static void addReturnToElement(Element e) { if (!ignoreLineBreaks) { Document doc = e.getOwnerDocument(); e.appendChild(doc.createTextNode("\n")); } } public static void addReturnToElement(Document doc, HelperNodeList nl) { if (!ignoreLineBreaks) { nl.appendChild(doc.createTextNode("\n")); } } public static void addReturnBeforeChild(Element e, Node child) { if (!ignoreLineBreaks) { Document doc = e.getOwnerDocument(); e.insertBefore(doc.createTextNode("\n"), child); } } /** * Method convertNodelistToSet * * @param xpathNodeSet * @return the set with the nodelist */ public static Set convertNodelistToSet(NodeList xpathNodeSet) { if (xpathNodeSet == null) { return new HashSet(); } int length = xpathNodeSet.getLength(); Set set = new HashSet(length); for (int i = 0; i < length; i++) { set.add(xpathNodeSet.item(i)); } return set; } /** * This method spreads all namespace attributes in a DOM document to their * children. This is needed because the XML Signature XPath transform * must evaluate the XPath against all nodes in the input, even against * XPath namespace nodes. Through a bug in XalanJ2, the namespace nodes are * not fully visible in the Xalan XPath model, so we have to do this by * hand in DOM spaces so that the nodes become visible in XPath space. * * @param doc * @see * Namespace axis resolution is not XPath compliant */ public static void circumventBug2650(Document doc) { Element documentElement = doc.getDocumentElement(); // if the document element has no xmlns definition, we add xmlns="" Attr xmlnsAttr = documentElement.getAttributeNodeNS(Constants.NamespaceSpecNS, "xmlns"); if (xmlnsAttr == null) { documentElement.setAttributeNS(Constants.NamespaceSpecNS, "xmlns", ""); } XMLUtils.circumventBug2650internal(doc); } /** * This is the work horse for {@link #circumventBug2650}. * * @param node * @see * Namespace axis resolution is not XPath compliant */ @SuppressWarnings("fallthrough") private static void circumventBug2650internal(Node node) { Node parent = null; Node sibling = null; final String namespaceNs = Constants.NamespaceSpecNS; do { switch (node.getNodeType()) { case Node.ELEMENT_NODE : Element element = (Element) node; if (!element.hasChildNodes()) { break; } if (element.hasAttributes()) { NamedNodeMap attributes = element.getAttributes(); int attributesLength = attributes.getLength(); for (Node child = element.getFirstChild(); child!=null; child = child.getNextSibling()) { if (child.getNodeType() != Node.ELEMENT_NODE) { continue; } Element childElement = (Element) child; for (int i = 0; i < attributesLength; i++) { Attr currentAttr = (Attr) attributes.item(i); if (!namespaceNs.equals(currentAttr.getNamespaceURI())) { continue; } if (childElement.hasAttributeNS(namespaceNs, currentAttr.getLocalName())) { continue; } childElement.setAttributeNS(namespaceNs, currentAttr.getName(), currentAttr.getNodeValue()); } } } case Node.ENTITY_REFERENCE_NODE : case Node.DOCUMENT_NODE : parent = node; sibling = node.getFirstChild(); break; } while ((sibling == null) && (parent != null)) { sibling = parent.getNextSibling(); parent = parent.getParentNode(); } if (sibling == null) { return; } node = sibling; sibling = node.getNextSibling(); } while (true); } /** * @param sibling * @param nodeName * @param number * @return nodes with the constraint */ public static Element selectDsNode(Node sibling, String nodeName, int number) { while (sibling != null) { if (Constants.SignatureSpecNS.equals(sibling.getNamespaceURI()) && sibling.getLocalName().equals(nodeName)) { if (number == 0){ return (Element)sibling; } number--; } sibling = sibling.getNextSibling(); } return null; } /** * @param sibling * @param nodeName * @param number * @return nodes with the constraint */ public static Element selectDs11Node(Node sibling, String nodeName, int number) { while (sibling != null) { if (Constants.SignatureSpec11NS.equals(sibling.getNamespaceURI()) && sibling.getLocalName().equals(nodeName)) { if (number == 0){ return (Element)sibling; } number--; } sibling = sibling.getNextSibling(); } return null; } /** * @param sibling * @param nodeName * @param number * @return nodes with the constrain */ public static Element selectXencNode(Node sibling, String nodeName, int number) { while (sibling != null) { if (EncryptionConstants.EncryptionSpecNS.equals(sibling.getNamespaceURI()) && sibling.getLocalName().equals(nodeName)) { if (number == 0){ return (Element)sibling; } number--; } sibling = sibling.getNextSibling(); } return null; } /** * @param sibling * @param nodeName * @param number * @return nodes with the constrain */ public static Text selectDsNodeText(Node sibling, String nodeName, int number) { Node n = selectDsNode(sibling,nodeName,number); if (n == null) { return null; } n = n.getFirstChild(); while (n != null && n.getNodeType() != Node.TEXT_NODE) { n = n.getNextSibling(); } return (Text)n; } /** * @param sibling * @param nodeName * @param number * @return nodes with the constrain */ public static Text selectDs11NodeText(Node sibling, String nodeName, int number) { Node n = selectDs11Node(sibling,nodeName,number); if (n == null) { return null; } n = n.getFirstChild(); while (n != null && n.getNodeType() != Node.TEXT_NODE) { n = n.getNextSibling(); } return (Text)n; } /** * @param sibling * @param uri * @param nodeName * @param number * @return nodes with the constrain */ public static Text selectNodeText(Node sibling, String uri, String nodeName, int number) { Node n = selectNode(sibling,uri,nodeName,number); if (n == null) { return null; } n = n.getFirstChild(); while (n != null && n.getNodeType() != Node.TEXT_NODE) { n = n.getNextSibling(); } return (Text)n; } /** * @param sibling * @param uri * @param nodeName * @param number * @return nodes with the constrain */ public static Element selectNode(Node sibling, String uri, String nodeName, int number) { while (sibling != null) { if (sibling.getNamespaceURI() != null && sibling.getNamespaceURI().equals(uri) && sibling.getLocalName().equals(nodeName)) { if (number == 0){ return (Element)sibling; } number--; } sibling = sibling.getNextSibling(); } return null; } /** * @param sibling * @param nodeName * @return nodes with the constrain */ public static Element[] selectDsNodes(Node sibling, String nodeName) { return selectNodes(sibling, Constants.SignatureSpecNS, nodeName); } /** * @param sibling * @param nodeName * @return nodes with the constrain */ public static Element[] selectDs11Nodes(Node sibling, String nodeName) { return selectNodes(sibling, Constants.SignatureSpec11NS, nodeName); } /** * @param sibling * @param uri * @param nodeName * @return nodes with the constraint */ public static Element[] selectNodes(Node sibling, String uri, String nodeName) { List list = new ArrayList(); while (sibling != null) { if (sibling.getNamespaceURI() != null && sibling.getNamespaceURI().equals(uri) && sibling.getLocalName().equals(nodeName)) { list.add((Element)sibling); } sibling = sibling.getNextSibling(); } return list.toArray(new Element[list.size()]); } /** * @param signatureElement * @param inputSet * @return nodes with the constrain */ public static Set excludeNodeFromSet(Node signatureElement, Set inputSet) { Set resultSet = new HashSet(); Iterator iterator = inputSet.iterator(); while (iterator.hasNext()) { Node inputNode = iterator.next(); if (!XMLUtils.isDescendantOrSelf(signatureElement, inputNode)) { resultSet.add(inputNode); } } return resultSet; } /** * Method getStrFromNode * * @param xpathnode * @return the string for the node. */ public static String getStrFromNode(Node xpathnode) { if (xpathnode.getNodeType() == Node.TEXT_NODE) { // we iterate over all siblings of the context node because eventually, // the text is "polluted" with pi's or comments StringBuilder sb = new StringBuilder(); for (Node currentSibling = xpathnode.getParentNode().getFirstChild(); currentSibling != null; currentSibling = currentSibling.getNextSibling()) { if (currentSibling.getNodeType() == Node.TEXT_NODE) { sb.append(((Text) currentSibling).getData()); } } return sb.toString(); } else if (xpathnode.getNodeType() == Node.ATTRIBUTE_NODE) { return ((Attr) xpathnode).getNodeValue(); } else if (xpathnode.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE) { return ((ProcessingInstruction) xpathnode).getNodeValue(); } return null; } /** * Returns true if the descendantOrSelf is on the descendant-or-self axis * of the context node. * * @param ctx * @param descendantOrSelf * @return true if the node is descendant */ public static boolean isDescendantOrSelf(Node ctx, Node descendantOrSelf) { if (ctx == descendantOrSelf) { return true; } Node parent = descendantOrSelf; while (true) { if (parent == null) { return false; } if (parent == ctx) { return true; } if (parent.getNodeType() == Node.ATTRIBUTE_NODE) { parent = ((Attr) parent).getOwnerElement(); } else { parent = parent.getParentNode(); } } } public static boolean ignoreLineBreaks() { return ignoreLineBreaks; } /** * Returns the attribute value for the attribute with the specified name. * Returns null if there is no such attribute, or * the empty string if the attribute value is empty. * *

This works around a limitation of the DOM * Element.getAttributeNode method, which does not distinguish * between an unspecified attribute and an attribute with a value of * "" (it returns "" for both cases). * * @param elem the element containing the attribute * @param name the name of the attribute * @return the attribute value (may be null if unspecified) */ public static String getAttributeValue(Element elem, String name) { Attr attr = elem.getAttributeNodeNS(null, name); return (attr == null) ? null : attr.getValue(); } /** * This method is a tree-search to help prevent against wrapping attacks. It checks that no * two Elements have ID Attributes that match the "value" argument, if this is the case then * "false" is returned. Note that a return value of "true" does not necessarily mean that * a matching Element has been found, just that no wrapping attack has been detected. */ public static boolean protectAgainstWrappingAttack(Node startNode, String value) { Node startParent = startNode.getParentNode(); Node processedNode = null; Element foundElement = null; String id = value.trim(); if (id.charAt(0) == '#') { id = id.substring(1); } while (startNode != null) { if (startNode.getNodeType() == Node.ELEMENT_NODE) { Element se = (Element) startNode; NamedNodeMap attributes = se.getAttributes(); if (attributes != null) { for (int i = 0; i < attributes.getLength(); i++) { Attr attr = (Attr)attributes.item(i); if (attr.isId() && id.equals(attr.getValue())) { if (foundElement == null) { // Continue searching to find duplicates foundElement = attr.getOwnerElement(); } else { log.debug("Multiple elements with the same 'Id' attribute value!"); return false; } } } } } processedNode = startNode; startNode = startNode.getFirstChild(); // no child, this node is done. if (startNode == null) { // close node processing, get sibling startNode = processedNode.getNextSibling(); } // no more siblings, get parent, all children // of parent are processed. while (startNode == null) { processedNode = processedNode.getParentNode(); if (processedNode == startParent) { return true; } // close parent node processing (processed node now) startNode = processedNode.getNextSibling(); } } return true; } /** * This method is a tree-search to help prevent against wrapping attacks. It checks that no other * Element than the given "knownElement" argument has an ID attribute that matches the "value" * argument, which is the ID value of "knownElement". If this is the case then "false" is returned. */ public static boolean protectAgainstWrappingAttack( Node startNode, Element knownElement, String value ) { Node startParent = startNode.getParentNode(); Node processedNode = null; String id = value.trim(); if (id.charAt(0) == '#') { id = id.substring(1); } while (startNode != null) { if (startNode.getNodeType() == Node.ELEMENT_NODE) { Element se = (Element) startNode; NamedNodeMap attributes = se.getAttributes(); if (attributes != null) { for (int i = 0; i < attributes.getLength(); i++) { Attr attr = (Attr)attributes.item(i); if (attr.isId() && id.equals(attr.getValue()) && se != knownElement) { log.debug("Multiple elements with the same 'Id' attribute value!"); return false; } } } } processedNode = startNode; startNode = startNode.getFirstChild(); // no child, this node is done. if (startNode == null) { // close node processing, get sibling startNode = processedNode.getNextSibling(); } // no more siblings, get parent, all children // of parent are processed. while (startNode == null) { processedNode = processedNode.getParentNode(); if (processedNode == startParent) { return true; } // close parent node processing (processed node now) startNode = processedNode.getNextSibling(); } } return true; } public static DocumentBuilder createDocumentBuilder(boolean validating) throws ParserConfigurationException { return createDocumentBuilder(validating, true); } public static DocumentBuilder createDocumentBuilder( boolean validating, boolean disAllowDocTypeDeclarations ) throws ParserConfigurationException { DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance(); dfactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE); if (disAllowDocTypeDeclarations) { dfactory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); } dfactory.setValidating(validating); dfactory.setNamespaceAware(true); return dfactory.newDocumentBuilder(); } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/HelperNodeList.java0000644000175000017500000000466211561742421030354 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; import java.util.ArrayList; import java.util.List; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * @author Christian Geuer-Pollmann */ public class HelperNodeList implements NodeList { /** Field nodes */ List nodes = new ArrayList(); boolean allNodesMustHaveSameParent = false; /** * */ public HelperNodeList() { this(false); } /** * @param allNodesMustHaveSameParent */ public HelperNodeList(boolean allNodesMustHaveSameParent) { this.allNodesMustHaveSameParent = allNodesMustHaveSameParent; } /** * Method item * * @param index * @return node with index i */ public Node item(int index) { return nodes.get(index); } /** * Method getLength * * @return length of the list */ public int getLength() { return nodes.size(); } /** * Method appendChild * * @param node * @throws IllegalArgumentException */ public void appendChild(Node node) throws IllegalArgumentException { if (this.allNodesMustHaveSameParent && this.getLength() > 0 && this.item(0).getParentNode() != node.getParentNode()) { throw new IllegalArgumentException("Nodes have not the same Parent"); } nodes.add(node); } /** * @return the document that contains this nodelist */ public Document getOwnerDocument() { if (this.getLength() == 0) { return null; } return XMLUtils.getOwnerDocument(this.item(0)); } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/EncryptionConstants.java0000644000175000017500000002246311703337722031523 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; public class EncryptionConstants { // Attributes that exist in XML Signature in the same way /** Tag of Attr Algorithm **/ public static final String _ATT_ALGORITHM = Constants._ATT_ALGORITHM; /** Tag of Attr Id**/ public static final String _ATT_ID = Constants._ATT_ID; /** Tag of Attr Target **/ public static final String _ATT_TARGET = Constants._ATT_TARGET; /** Tag of Attr Type **/ public static final String _ATT_TYPE = Constants._ATT_TYPE; /** Tag of Attr URI **/ public static final String _ATT_URI = Constants._ATT_URI; // Attributes new in XML Encryption /** Tag of Attr encoding **/ public static final String _ATT_ENCODING = "Encoding"; /** Tag of Attr recipient **/ public static final String _ATT_RECIPIENT = "Recipient"; /** Tag of Attr mimetype **/ public static final String _ATT_MIMETYPE = "MimeType"; /** Tag of Element CarriedKeyName **/ public static final String _TAG_CARRIEDKEYNAME = "CarriedKeyName"; /** Tag of Element CipherData **/ public static final String _TAG_CIPHERDATA = "CipherData"; /** Tag of Element CipherReference **/ public static final String _TAG_CIPHERREFERENCE = "CipherReference"; /** Tag of Element CipherValue **/ public static final String _TAG_CIPHERVALUE = "CipherValue"; /** Tag of Element DataReference **/ public static final String _TAG_DATAREFERENCE = "DataReference"; /** Tag of Element EncryptedData **/ public static final String _TAG_ENCRYPTEDDATA = "EncryptedData"; /** Tag of Element EncryptedKey **/ public static final String _TAG_ENCRYPTEDKEY = "EncryptedKey"; /** Tag of Element EncryptionMethod **/ public static final String _TAG_ENCRYPTIONMETHOD = "EncryptionMethod"; /** Tag of Element EncryptionProperties **/ public static final String _TAG_ENCRYPTIONPROPERTIES = "EncryptionProperties"; /** Tag of Element EncryptionProperty **/ public static final String _TAG_ENCRYPTIONPROPERTY = "EncryptionProperty"; /** Tag of Element KeyReference **/ public static final String _TAG_KEYREFERENCE = "KeyReference"; /** Tag of Element KeySize **/ public static final String _TAG_KEYSIZE = "KeySize"; /** Tag of Element OAEPparams **/ public static final String _TAG_OAEPPARAMS = "OAEPparams"; /** Tag of Element MGF **/ public static final String _TAG_MGF = "MGF"; /** Tag of Element ReferenceList **/ public static final String _TAG_REFERENCELIST = "ReferenceList"; /** Tag of Element Transforms **/ public static final String _TAG_TRANSFORMS = "Transforms"; /** Tag of Element AgreementMethod **/ public static final String _TAG_AGREEMENTMETHOD = "AgreementMethod"; /** Tag of Element KA-Nonce **/ public static final String _TAG_KA_NONCE = "KA-Nonce"; /** Tag of Element OriginatorKeyInfo **/ public static final String _TAG_ORIGINATORKEYINFO = "OriginatorKeyInfo"; /** Tag of Element RecipientKeyInfo **/ public static final String _TAG_RECIPIENTKEYINFO = "RecipientKeyInfo"; /** Field ENCRYPTIONSPECIFICATION_URL */ public static final String ENCRYPTIONSPECIFICATION_URL = "http://www.w3.org/TR/2001/WD-xmlenc-core-20010626/"; /** The namespace of the * * XML Encryption Syntax and Processing */ public static final String EncryptionSpecNS = "http://www.w3.org/2001/04/xmlenc#"; /** * The namespace of the XML Encryption 1.1 specification */ public static final String EncryptionSpec11NS = "http://www.w3.org/2009/xmlenc11#"; /** URI for content*/ public static final String TYPE_CONTENT = EncryptionSpecNS + "Content"; /** URI for element*/ public static final String TYPE_ELEMENT = EncryptionSpecNS + "Element"; /** URI for mediatype*/ public static final String TYPE_MEDIATYPE = "http://www.isi.edu/in-notes/iana/assignments/media-types/"; /** Block Encryption - REQUIRED TRIPLEDES */ public static final String ALGO_ID_BLOCKCIPHER_TRIPLEDES = EncryptionConstants.EncryptionSpecNS + "tripledes-cbc"; /** Block Encryption - REQUIRED AES-128 */ public static final String ALGO_ID_BLOCKCIPHER_AES128 = EncryptionConstants.EncryptionSpecNS + "aes128-cbc"; /** Block Encryption - REQUIRED AES-256 */ public static final String ALGO_ID_BLOCKCIPHER_AES256 = EncryptionConstants.EncryptionSpecNS + "aes256-cbc"; /** Block Encryption - OPTIONAL AES-192 */ public static final String ALGO_ID_BLOCKCIPHER_AES192 = EncryptionConstants.EncryptionSpecNS + "aes192-cbc"; /** Block Encryption - OPTIONAL AES-128-GCM */ public static final String ALGO_ID_BLOCKCIPHER_AES128_GCM = "http://www.w3.org/2009/xmlenc11#aes128-gcm"; /** Block Encryption - OPTIONAL AES-192-GCM */ public static final String ALGO_ID_BLOCKCIPHER_AES192_GCM = "http://www.w3.org/2009/xmlenc11#aes192-gcm"; /** Block Encryption - OPTIONAL AES-256-GCM */ public static final String ALGO_ID_BLOCKCIPHER_AES256_GCM = "http://www.w3.org/2009/xmlenc11#aes256-gcm"; /** Key Transport - REQUIRED RSA-v1.5*/ public static final String ALGO_ID_KEYTRANSPORT_RSA15 = EncryptionConstants.EncryptionSpecNS + "rsa-1_5"; /** Key Transport - REQUIRED RSA-OAEP */ public static final String ALGO_ID_KEYTRANSPORT_RSAOAEP = EncryptionConstants.EncryptionSpecNS + "rsa-oaep-mgf1p"; /** Key Transport - OPTIONAL RSA-OAEP_11 */ public static final String ALGO_ID_KEYTRANSPORT_RSAOAEP_11 = EncryptionConstants.EncryptionSpec11NS + "rsa-oaep"; /** Key Agreement - OPTIONAL Diffie-Hellman */ public static final String ALGO_ID_KEYAGREEMENT_DH = EncryptionConstants.EncryptionSpecNS + "dh"; /** Symmetric Key Wrap - REQUIRED TRIPLEDES KeyWrap */ public static final String ALGO_ID_KEYWRAP_TRIPLEDES = EncryptionConstants.EncryptionSpecNS + "kw-tripledes"; /** Symmetric Key Wrap - REQUIRED AES-128 KeyWrap */ public static final String ALGO_ID_KEYWRAP_AES128 = EncryptionConstants.EncryptionSpecNS + "kw-aes128"; /** Symmetric Key Wrap - REQUIRED AES-256 KeyWrap */ public static final String ALGO_ID_KEYWRAP_AES256 = EncryptionConstants.EncryptionSpecNS + "kw-aes256"; /** Symmetric Key Wrap - OPTIONAL AES-192 KeyWrap */ public static final String ALGO_ID_KEYWRAP_AES192 = EncryptionConstants.EncryptionSpecNS + "kw-aes192"; /** Message Authentication - RECOMMENDED XML Digital Signature */ public static final String ALGO_ID_AUTHENTICATION_XMLSIGNATURE = "http://www.w3.org/TR/2001/CR-xmldsig-core-20010419/"; /** Canonicalization - OPTIONAL Canonical XML with Comments */ public static final String ALGO_ID_C14N_WITHCOMMENTS = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"; /** Canonicalization - OPTIONAL Canonical XML (omits comments) */ public static final String ALGO_ID_C14N_OMITCOMMENTS = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"; /** Encoding - REQUIRED base64 */ public static final String ALGO_ID_ENCODING_BASE64 = "http://www.w3.org/2000/09/xmldsig#base64"; /** MGF1 with SHA-1 */ public static final String MGF1_SHA1 = EncryptionConstants.EncryptionSpec11NS + "mgf1sha1"; /** MGF1 with SHA-224 */ public static final String MGF1_SHA224 = EncryptionConstants.EncryptionSpec11NS + "mgf1sha224"; /** MGF1 with SHA-256 */ public static final String MGF1_SHA256 = EncryptionConstants.EncryptionSpec11NS + "mgf1sha256"; /** MGF1 with SHA-384 */ public static final String MGF1_SHA384 = EncryptionConstants.EncryptionSpec11NS + "mgf1sha384"; /** MGF1 with SHA-512 */ public static final String MGF1_SHA512 = EncryptionConstants.EncryptionSpec11NS + "mgf1sha512"; private EncryptionConstants() { // we don't allow instantiation } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/Base64.java0000644000175000017500000006647611647260405026534 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.math.BigInteger; import org.apache.xml.security.exceptions.Base64DecodingException; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.Text; /** * Implementation of MIME's Base64 encoding and decoding conversions. * Optimized code. (raw version taken from oreilly.jonathan.util, * and currently org.apache.xerces.ds.util.Base64) * * @author Raul Benito(Of the xerces copy, and little adaptations). * @author Anli Shundi * @author Christian Geuer-Pollmann * @see RFC 2045 * @see org.apache.xml.security.transforms.implementations.TransformBase64Decode */ public class Base64 { /** Field BASE64DEFAULTLENGTH */ public static final int BASE64DEFAULTLENGTH = 76; private static final int BASELENGTH = 255; private static final int LOOKUPLENGTH = 64; private static final int TWENTYFOURBITGROUP = 24; private static final int EIGHTBIT = 8; private static final int SIXTEENBIT = 16; private static final int FOURBYTE = 4; private static final int SIGN = -128; private static final char PAD = '='; private static final byte [] base64Alphabet = new byte[BASELENGTH]; private static final char [] lookUpBase64Alphabet = new char[LOOKUPLENGTH]; static { for (int i = 0; i < BASELENGTH; i++) { base64Alphabet[i] = -1; } for (int i = 'Z'; i >= 'A'; i--) { base64Alphabet[i] = (byte) (i - 'A'); } for (int i = 'z'; i>= 'a'; i--) { base64Alphabet[i] = (byte) (i - 'a' + 26); } for (int i = '9'; i >= '0'; i--) { base64Alphabet[i] = (byte) (i - '0' + 52); } base64Alphabet['+'] = 62; base64Alphabet['/'] = 63; for (int i = 0; i <= 25; i++) { lookUpBase64Alphabet[i] = (char)('A' + i); } for (int i = 26, j = 0; i <= 51; i++, j++) { lookUpBase64Alphabet[i] = (char)('a' + j); } for (int i = 52, j = 0; i <= 61; i++, j++) { lookUpBase64Alphabet[i] = (char)('0' + j); } lookUpBase64Alphabet[62] = '+'; lookUpBase64Alphabet[63] = '/'; } private Base64() { // we don't allow instantiation } /** * Returns a byte-array representation of a {@link BigInteger}. * No sign-bit is output. * * N.B.: {@link BigInteger}'s toByteArray * returns eventually longer arrays because of the leading sign-bit. * * @param big BigInteger to be converted * @param bitlen int the desired length in bits of the representation * @return a byte array with bitlen bits of big */ static final byte[] getBytes(BigInteger big, int bitlen) { //round bitlen bitlen = ((bitlen + 7) >> 3) << 3; if (bitlen < big.bitLength()) { throw new IllegalArgumentException(I18n.translate("utils.Base64.IllegalBitlength")); } byte[] bigBytes = big.toByteArray(); if (((big.bitLength() % 8) != 0) && (((big.bitLength() / 8) + 1) == (bitlen / 8))) { return bigBytes; } // some copying needed int startSrc = 0; // no need to skip anything int bigLen = bigBytes.length; //valid length of the string if ((big.bitLength() % 8) == 0) { // correct values startSrc = 1; // skip sign bit bigLen--; // valid length of the string } int startDst = bitlen / 8 - bigLen; //pad with leading nulls byte[] resizedBytes = new byte[bitlen / 8]; System.arraycopy(bigBytes, startSrc, resizedBytes, startDst, bigLen); return resizedBytes; } /** * Encode in Base64 the given {@link BigInteger}. * * @param big * @return String with Base64 encoding */ public static final String encode(BigInteger big) { return encode(getBytes(big, big.bitLength())); } /** * Returns a byte-array representation of a {@link BigInteger}. * No sign-bit is output. * * N.B.: {@link BigInteger}'s toByteArray * returns eventually longer arrays because of the leading sign-bit. * * @param big BigInteger to be converted * @param bitlen int the desired length in bits of the representation * @return a byte array with bitlen bits of big */ public static final byte[] encode(BigInteger big, int bitlen) { //round bitlen bitlen = ((bitlen + 7) >> 3) << 3; if (bitlen < big.bitLength()) { throw new IllegalArgumentException(I18n.translate("utils.Base64.IllegalBitlength")); } byte[] bigBytes = big.toByteArray(); if (((big.bitLength() % 8) != 0) && (((big.bitLength() / 8) + 1) == (bitlen / 8))) { return bigBytes; } // some copying needed int startSrc = 0; // no need to skip anything int bigLen = bigBytes.length; //valid length of the string if ((big.bitLength() % 8) == 0) { // correct values startSrc = 1; // skip sign bit bigLen--; // valid length of the string } int startDst = bitlen / 8 - bigLen; //pad with leading nulls byte[] resizedBytes = new byte[bitlen / 8]; System.arraycopy(bigBytes, startSrc, resizedBytes, startDst, bigLen); return resizedBytes; } /** * Method decodeBigIntegerFromElement * * @param element * @return the biginteger obtained from the node * @throws Base64DecodingException */ public static final BigInteger decodeBigIntegerFromElement(Element element) throws Base64DecodingException { return new BigInteger(1, Base64.decode(element)); } /** * Method decodeBigIntegerFromText * * @param text * @return the biginter obtained from the text node * @throws Base64DecodingException */ public static final BigInteger decodeBigIntegerFromText(Text text) throws Base64DecodingException { return new BigInteger(1, Base64.decode(text.getData())); } /** * This method takes an (empty) Element and a BigInteger and adds the * base64 encoded BigInteger to the Element. * * @param element * @param biginteger */ public static final void fillElementWithBigInteger(Element element, BigInteger biginteger) { String encodedInt = encode(biginteger); if (!XMLUtils.ignoreLineBreaks() && encodedInt.length() > BASE64DEFAULTLENGTH) { encodedInt = "\n" + encodedInt + "\n"; } Document doc = element.getOwnerDocument(); Text text = doc.createTextNode(encodedInt); element.appendChild(text); } /** * Method decode * * Takes the Text children of the Element and interprets * them as input for the Base64.decode() function. * * @param element * @return the byte obtained of the decoding the element * $todo$ not tested yet * @throws Base64DecodingException */ public static final byte[] decode(Element element) throws Base64DecodingException { Node sibling = element.getFirstChild(); StringBuffer sb = new StringBuffer(); while (sibling != null) { if (sibling.getNodeType() == Node.TEXT_NODE) { Text t = (Text) sibling; sb.append(t.getData()); } sibling = sibling.getNextSibling(); } return decode(sb.toString()); } /** * Method encodeToElement * * @param doc * @param localName * @param bytes * @return an Element with the base64 encoded in the text. * */ public static final Element encodeToElement(Document doc, String localName, byte[] bytes) { Element el = XMLUtils.createElementInSignatureSpace(doc, localName); Text text = doc.createTextNode(encode(bytes)); el.appendChild(text); return el; } /** * Method decode * * @param base64 * @return the UTF bytes of the base64 * @throws Base64DecodingException * */ public static final byte[] decode(byte[] base64) throws Base64DecodingException { return decodeInternal(base64, -1); } /** * Encode a byte array and fold lines at the standard 76th character unless * ignore line breaks property is set. * * @param binaryData byte[] to be base64 encoded * @return the String with encoded data */ public static final String encode(byte[] binaryData) { return XMLUtils.ignoreLineBreaks() ? encode(binaryData, Integer.MAX_VALUE) : encode(binaryData, BASE64DEFAULTLENGTH); } /** * Base64 decode the lines from the reader and return an InputStream * with the bytes. * * @param reader * @return InputStream with the decoded bytes * @exception IOException passes what the reader throws * @throws IOException * @throws Base64DecodingException */ public static final byte[] decode(BufferedReader reader) throws IOException, Base64DecodingException { byte[] retBytes = null; UnsyncByteArrayOutputStream baos = null; try { baos = new UnsyncByteArrayOutputStream(); String line; while (null != (line = reader.readLine())) { byte[] bytes = decode(line); baos.write(bytes); } retBytes = baos.toByteArray(); } finally { baos.close(); } return retBytes; } protected static final boolean isWhiteSpace(byte octect) { return (octect == 0x20 || octect == 0xd || octect == 0xa || octect == 0x9); } protected static final boolean isPad(byte octect) { return (octect == PAD); } /** * Encodes hex octets into Base64 * * @param binaryData Array containing binaryData * @return Encoded Base64 array */ /** * Encode a byte array in Base64 format and return an optionally * wrapped line. * * @param binaryData byte[] data to be encoded * @param length int length of wrapped lines; No wrapping if less than 4. * @return a String with encoded data */ public static final String encode(byte[] binaryData,int length) { if (length < 4) { length = Integer.MAX_VALUE; } if (binaryData == null) { return null; } int lengthDataBits = binaryData.length * EIGHTBIT; if (lengthDataBits == 0) { return ""; } int fewerThan24bits = lengthDataBits % TWENTYFOURBITGROUP; int numberTriplets = lengthDataBits / TWENTYFOURBITGROUP; int numberQuartet = fewerThan24bits != 0 ? numberTriplets + 1 : numberTriplets; int quartesPerLine = length / 4; int numberLines = (numberQuartet - 1) / quartesPerLine; char encodedData[] = null; encodedData = new char[numberQuartet * 4 + numberLines]; byte k = 0, l = 0, b1 = 0, b2 = 0, b3 = 0; int encodedIndex = 0; int dataIndex = 0; int i = 0; for (int line = 0; line < numberLines; line++) { for (int quartet = 0; quartet < 19; quartet++) { b1 = binaryData[dataIndex++]; b2 = binaryData[dataIndex++]; b3 = binaryData[dataIndex++]; l = (byte)(b2 & 0x0f); k = (byte)(b1 & 0x03); byte val1 = ((b1 & SIGN) == 0) ? (byte)(b1 >> 2): (byte)((b1) >> 2 ^ 0xc0); byte val2 = ((b2 & SIGN) == 0) ? (byte)(b2 >> 4) : (byte)((b2) >> 4 ^ 0xf0); byte val3 = ((b3 & SIGN) == 0) ? (byte)(b3 >> 6) : (byte)((b3) >> 6 ^ 0xfc); encodedData[encodedIndex++] = lookUpBase64Alphabet[val1]; encodedData[encodedIndex++] = lookUpBase64Alphabet[val2 | (k << 4)]; encodedData[encodedIndex++] = lookUpBase64Alphabet[(l << 2) | val3]; encodedData[encodedIndex++] = lookUpBase64Alphabet[b3 & 0x3f]; i++; } encodedData[encodedIndex++] = 0xa; } for (; i < numberTriplets; i++) { b1 = binaryData[dataIndex++]; b2 = binaryData[dataIndex++]; b3 = binaryData[dataIndex++]; l = (byte)(b2 & 0x0f); k = (byte)(b1 & 0x03); byte val1 = ((b1 & SIGN) == 0) ? (byte)(b1 >> 2) : (byte)((b1) >> 2 ^ 0xc0); byte val2 = ((b2 & SIGN) == 0) ? (byte)(b2 >> 4) : (byte)((b2) >> 4 ^ 0xf0); byte val3 = ((b3 & SIGN) == 0) ? (byte)(b3 >> 6) : (byte)((b3) >> 6 ^ 0xfc); encodedData[encodedIndex++] = lookUpBase64Alphabet[val1]; encodedData[encodedIndex++] = lookUpBase64Alphabet[val2 | (k << 4)]; encodedData[encodedIndex++] = lookUpBase64Alphabet[(l << 2) | val3]; encodedData[encodedIndex++] = lookUpBase64Alphabet[b3 & 0x3f]; } // form integral number of 6-bit groups if (fewerThan24bits == EIGHTBIT) { b1 = binaryData[dataIndex]; k = (byte) (b1 &0x03); byte val1 = ((b1 & SIGN) == 0) ? (byte)(b1 >> 2):(byte)((b1) >> 2 ^ 0xc0); encodedData[encodedIndex++] = lookUpBase64Alphabet[val1]; encodedData[encodedIndex++] = lookUpBase64Alphabet[k << 4]; encodedData[encodedIndex++] = PAD; encodedData[encodedIndex++] = PAD; } else if (fewerThan24bits == SIXTEENBIT) { b1 = binaryData[dataIndex]; b2 = binaryData[dataIndex +1 ]; l = ( byte ) (b2 & 0x0f); k = ( byte ) (b1 & 0x03); byte val1 = ((b1 & SIGN) == 0) ? (byte)(b1 >> 2) : (byte)((b1) >> 2 ^ 0xc0); byte val2 = ((b2 & SIGN) == 0) ? (byte)(b2 >> 4) : (byte)((b2) >> 4 ^ 0xf0); encodedData[encodedIndex++] = lookUpBase64Alphabet[val1]; encodedData[encodedIndex++] = lookUpBase64Alphabet[val2 | (k << 4)]; encodedData[encodedIndex++] = lookUpBase64Alphabet[l << 2]; encodedData[encodedIndex++] = PAD; } //encodedData[encodedIndex] = 0xa; return new String(encodedData); } /** * Decodes Base64 data into octets * * @param encoded String containing base64 encoded data * @return byte array containing the decoded data * @throws Base64DecodingException if there is a problem decoding the data */ public static final byte[] decode(String encoded) throws Base64DecodingException { if (encoded == null) { return null; } byte[] bytes = new byte[encoded.length()]; int len = getBytesInternal(encoded, bytes); return decodeInternal(bytes, len); } protected static final int getBytesInternal(String s, byte[] result) { int length = s.length(); int newSize = 0; for (int i = 0; i < length; i++) { byte dataS = (byte)s.charAt(i); if (!isWhiteSpace(dataS)) { result[newSize++] = dataS; } } return newSize; } protected static final byte[] decodeInternal(byte[] base64Data, int len) throws Base64DecodingException { // remove white spaces if (len == -1) { len = removeWhiteSpace(base64Data); } if (len % FOURBYTE != 0) { throw new Base64DecodingException("decoding.divisible.four"); //should be divisible by four } int numberQuadruple = (len / FOURBYTE); if (numberQuadruple == 0) { return new byte[0]; } byte decodedData[] = null; byte b1 = 0, b2 = 0, b3 = 0, b4 = 0; int i = 0; int encodedIndex = 0; int dataIndex = 0; //decodedData = new byte[ (numberQuadruple)*3]; dataIndex = (numberQuadruple - 1) * 4; encodedIndex = (numberQuadruple - 1) * 3; //first last bits. b1 = base64Alphabet[base64Data[dataIndex++]]; b2 = base64Alphabet[base64Data[dataIndex++]]; if ((b1==-1) || (b2==-1)) { //if found "no data" just return null throw new Base64DecodingException("decoding.general"); } byte d3, d4; b3 = base64Alphabet[d3 = base64Data[dataIndex++]]; b4 = base64Alphabet[d4 = base64Data[dataIndex++]]; if ((b3 == -1) || (b4 == -1) ) { //Check if they are PAD characters if (isPad(d3) && isPad(d4)) { //Two PAD e.g. 3c[Pad][Pad] if ((b2 & 0xf) != 0) { //last 4 bits should be zero throw new Base64DecodingException("decoding.general"); } decodedData = new byte[encodedIndex + 1]; decodedData[encodedIndex] = (byte)(b1 << 2 | b2 >> 4) ; } else if (!isPad(d3) && isPad(d4)) { //One PAD e.g. 3cQ[Pad] if ((b3 & 0x3) != 0) { //last 2 bits should be zero throw new Base64DecodingException("decoding.general"); } decodedData = new byte[encodedIndex + 2]; decodedData[encodedIndex++] = (byte)(b1 << 2 | b2 >> 4); decodedData[encodedIndex] = (byte)(((b2 & 0xf) << 4) |((b3 >> 2) & 0xf)); } else { //an error like "3c[Pad]r", "3cdX", "3cXd", "3cXX" where X is non data throw new Base64DecodingException("decoding.general"); } } else { //No PAD e.g 3cQl decodedData = new byte[encodedIndex+3]; decodedData[encodedIndex++] = (byte)(b1 << 2 | b2 >> 4) ; decodedData[encodedIndex++] = (byte)(((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf)); decodedData[encodedIndex++] = (byte)(b3 << 6 | b4); } encodedIndex = 0; dataIndex = 0; //the begin for (i = numberQuadruple - 1; i > 0; i--) { b1 = base64Alphabet[base64Data[dataIndex++]]; b2 = base64Alphabet[base64Data[dataIndex++]]; b3 = base64Alphabet[base64Data[dataIndex++]]; b4 = base64Alphabet[base64Data[dataIndex++]]; if ((b1 == -1) || (b2 == -1) || (b3 == -1) || (b4 == -1)) { //if found "no data" just return null throw new Base64DecodingException("decoding.general"); } decodedData[encodedIndex++] = (byte)(b1 << 2 | b2 >> 4) ; decodedData[encodedIndex++] = (byte)(((b2 & 0xf) << 4) |((b3 >> 2) & 0xf)); decodedData[encodedIndex++] = (byte)(b3 << 6 | b4 ); } return decodedData; } /** * Decodes Base64 data into outputstream * * @param base64Data String containing Base64 data * @param os the outputstream * @throws IOException * @throws Base64DecodingException */ public static final void decode(String base64Data, OutputStream os) throws Base64DecodingException, IOException { byte[] bytes = new byte[base64Data.length()]; int len = getBytesInternal(base64Data, bytes); decode(bytes,os,len); } /** * Decodes Base64 data into outputstream * * @param base64Data Byte array containing Base64 data * @param os the outputstream * @throws IOException * @throws Base64DecodingException */ public static final void decode(byte[] base64Data, OutputStream os) throws Base64DecodingException, IOException { decode(base64Data,os,-1); } protected static final void decode(byte[] base64Data, OutputStream os, int len) throws Base64DecodingException, IOException { // remove white spaces if (len == -1) { len = removeWhiteSpace(base64Data); } if (len % FOURBYTE != 0) { throw new Base64DecodingException("decoding.divisible.four"); //should be divisible by four } int numberQuadruple = (len / FOURBYTE); if (numberQuadruple == 0) { return; } //byte decodedData[] = null; byte b1 = 0, b2 = 0, b3 = 0, b4 = 0; int i = 0; int dataIndex = 0; //the begin for (i=numberQuadruple - 1; i > 0; i--) { b1 = base64Alphabet[base64Data[dataIndex++]]; b2 = base64Alphabet[base64Data[dataIndex++]]; b3 = base64Alphabet[base64Data[dataIndex++]]; b4 = base64Alphabet[base64Data[dataIndex++]]; if ((b1 == -1) || (b2 == -1) || (b3 == -1) || (b4 == -1) ) { //if found "no data" just return null throw new Base64DecodingException("decoding.general"); } os.write((byte)(b1 << 2 | b2 >> 4)); os.write((byte)(((b2 & 0xf) << 4 ) | ((b3 >> 2) & 0xf))); os.write( (byte)(b3 << 6 | b4)); } b1 = base64Alphabet[base64Data[dataIndex++]]; b2 = base64Alphabet[base64Data[dataIndex++]]; // first last bits. if ((b1 == -1) || (b2 == -1) ) { //if found "no data" just return null throw new Base64DecodingException("decoding.general"); } byte d3, d4; b3 = base64Alphabet[d3 = base64Data[dataIndex++]]; b4 = base64Alphabet[d4 = base64Data[dataIndex++]]; if ((b3 == -1 ) || (b4 == -1) ) { //Check if they are PAD characters if (isPad(d3) && isPad(d4)) { //Two PAD e.g. 3c[Pad][Pad] if ((b2 & 0xf) != 0) { //last 4 bits should be zero throw new Base64DecodingException("decoding.general"); } os.write((byte)(b1 << 2 | b2 >> 4)); } else if (!isPad(d3) && isPad(d4)) { //One PAD e.g. 3cQ[Pad] if ((b3 & 0x3 ) != 0) { //last 2 bits should be zero throw new Base64DecodingException("decoding.general"); } os.write((byte)(b1 << 2 | b2 >> 4)); os.write((byte)(((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf))); } else { //an error like "3c[Pad]r", "3cdX", "3cXd", "3cXX" where X is non data throw new Base64DecodingException("decoding.general"); } } else { //No PAD e.g 3cQl os.write((byte)(b1 << 2 | b2 >> 4)); os.write( (byte)(((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf))); os.write((byte)(b3 << 6 | b4)); } } /** * Decodes Base64 data into outputstream * * @param is containing Base64 data * @param os the outputstream * @throws IOException * @throws Base64DecodingException */ public static final void decode(InputStream is, OutputStream os) throws Base64DecodingException, IOException { //byte decodedData[] = null; byte b1 = 0, b2 = 0, b3 = 0, b4 = 0; int index=0; byte[] data = new byte[4]; int read; //the begin while ((read = is.read()) > 0) { byte readed = (byte)read; if (isWhiteSpace(readed)) { continue; } if (isPad(readed)) { data[index++] = readed; if (index == 3) { data[index++] = (byte)is.read(); } break; } if ((data[index++] = readed) == -1) { //if found "no data" just return null throw new Base64DecodingException("decoding.general"); } if (index != 4) { continue; } index = 0; b1 = base64Alphabet[data[0]]; b2 = base64Alphabet[data[1]]; b3 = base64Alphabet[data[2]]; b4 = base64Alphabet[data[3]]; os.write((byte)(b1 << 2 | b2 >> 4)); os.write((byte)(((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf))); os.write((byte)(b3 << 6 | b4)); } byte d1 = data[0], d2 = data[1], d3 = data[2], d4 = data[3]; b1 = base64Alphabet[d1]; b2 = base64Alphabet[d2]; b3 = base64Alphabet[d3]; b4 = base64Alphabet[d4]; if ((b3 == -1) || (b4 == -1)) { //Check if they are PAD characters if (isPad(d3) && isPad(d4)) { //Two PAD e.g. 3c[Pad][Pad] if ((b2 & 0xf) != 0) { //last 4 bits should be zero throw new Base64DecodingException("decoding.general"); } os.write((byte)(b1 << 2 | b2 >> 4)); } else if (!isPad(d3) && isPad(d4)) { //One PAD e.g. 3cQ[Pad] b3 = base64Alphabet[d3]; if ((b3 & 0x3) != 0) { //last 2 bits should be zero throw new Base64DecodingException("decoding.general"); } os.write((byte)(b1 << 2 | b2 >> 4)); os.write((byte)(((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf))); } else { //an error like "3c[Pad]r", "3cdX", "3cXd", "3cXX" where X is non data throw new Base64DecodingException("decoding.general"); } } else { //No PAD e.g 3cQl os.write((byte)(b1 << 2 | b2 >> 4)); os.write((byte)(((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf))); os.write((byte)(b3 << 6 | b4)); } } /** * remove WhiteSpace from MIME containing encoded Base64 data. * * @param data the byte array of base64 data (with WS) * @return the new length */ protected static final int removeWhiteSpace(byte[] data) { if (data == null) { return 0; } // count characters that's not whitespace int newSize = 0; int len = data.length; for (int i = 0; i < len; i++) { byte dataS = data[i]; if (!isWhiteSpace(dataS)) { data[newSize++] = dataS; } } return newSize; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/SignerOutputStream.java0000644000175000017500000000451111556225757031324 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; import java.io.ByteArrayOutputStream; import org.apache.xml.security.algorithms.SignatureAlgorithm; import org.apache.xml.security.signature.XMLSignatureException; /** * @author raul * */ public class SignerOutputStream extends ByteArrayOutputStream { private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(SignerOutputStream.class); final SignatureAlgorithm sa; /** * @param sa */ public SignerOutputStream(SignatureAlgorithm sa) { this.sa = sa; } /** @inheritDoc */ public void write(byte[] arg0) { try { sa.update(arg0); } catch (XMLSignatureException e) { throw new RuntimeException("" + e); } } /** @inheritDoc */ public void write(int arg0) { try { sa.update((byte)arg0); } catch (XMLSignatureException e) { throw new RuntimeException("" + e); } } /** @inheritDoc */ public void write(byte[] arg0, int arg1, int arg2) { if (log.isDebugEnabled()) { log.debug("Canonicalized SignedInfo:"); StringBuilder sb = new StringBuilder(arg2); for (int i = arg1; i < (arg1 + arg2); i++) { sb.append((char)arg0[i]); } log.debug(sb.toString()); } try { sa.update(arg0, arg1, arg2); } catch (XMLSignatureException e) { throw new RuntimeException("" + e); } } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/UnsyncByteArrayOutputStream.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/UnsyncByteArrayOutputStream.j0000644000175000017500000000541212075501260032467 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; import java.io.OutputStream; /** * A simple Unsynced ByteArrayOutputStream * @author raul * */ public class UnsyncByteArrayOutputStream extends OutputStream { private static final int INITIAL_SIZE = 8192; private byte[] buf; private int size = INITIAL_SIZE; private int pos = 0; public UnsyncByteArrayOutputStream() { buf = new byte[INITIAL_SIZE]; } public void write(byte[] arg0) { if ((Integer.MAX_VALUE - pos) < arg0.length) { throw new OutOfMemoryError(); } int newPos = pos + arg0.length; if (newPos > size) { expandSize(newPos); } System.arraycopy(arg0, 0, buf, pos, arg0.length); pos = newPos; } public void write(byte[] arg0, int arg1, int arg2) { if ((Integer.MAX_VALUE - pos) < arg2) { throw new OutOfMemoryError(); } int newPos = pos + arg2; if (newPos > size) { expandSize(newPos); } System.arraycopy(arg0, arg1, buf, pos, arg2); pos = newPos; } public void write(int arg0) { if ((Integer.MAX_VALUE - pos) == 0) { throw new OutOfMemoryError(); } int newPos = pos + 1; if (newPos > size) { expandSize(newPos); } buf[pos++] = (byte)arg0; } public byte[] toByteArray() { byte result[] = new byte[pos]; System.arraycopy(buf, 0, result, 0, pos); return result; } public void reset() { pos = 0; } private void expandSize(int newPos) { int newSize = size; while (newPos > newSize) { newSize = newSize << 1; // Deal with overflow if (newSize < 0) { newSize = Integer.MAX_VALUE; } } byte newBuf[] = new byte[newSize]; System.arraycopy(buf, 0, newBuf, 0, pos); buf = newBuf; size = newSize; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/Constants.java0000644000175000017500000002310112025634644027437 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; /** * Provides all constants and some translation functions for i18n. * * For the used Algorithm identifiers and Namespaces, look at the * XML * Signature specification. * * @author $Author: coheigea $ */ public class Constants { /** Field configurationFile */ public static final String configurationFile = "data/websig.conf"; /** Field configurationFileNew */ public static final String configurationFileNew = ".xmlsecurityconfig"; /** Field exceptionMessagesResourceBundleDir */ public static final String exceptionMessagesResourceBundleDir = "org/apache/xml/security/resource"; /** Field exceptionMessagesResourceBundleBase is the location of the ResourceBundle */ public static final String exceptionMessagesResourceBundleBase = exceptionMessagesResourceBundleDir + "/" + "xmlsecurity"; /** * The URL of the * XML Signature specification */ public static final String SIGNATURESPECIFICATION_URL = "http://www.w3.org/TR/2001/CR-xmldsig-core-20010419/"; /** * The namespace of the * XML Signature specification */ public static final String SignatureSpecNS = "http://www.w3.org/2000/09/xmldsig#"; /** * The namespace of the * XML Signature specification */ public static final String SignatureSpec11NS = "http://www.w3.org/2009/xmldsig11#"; /** The URL for more algorithms **/ public static final String MoreAlgorithmsSpecNS = "http://www.w3.org/2001/04/xmldsig-more#"; /** The URI for XML spec*/ public static final String XML_LANG_SPACE_SpecNS = "http://www.w3.org/XML/1998/namespace"; /** The URI for XMLNS spec*/ public static final String NamespaceSpecNS = "http://www.w3.org/2000/xmlns/"; /** Tag of Attr Algorithm**/ public static final String _ATT_ALGORITHM = "Algorithm"; /** Tag of Attr URI**/ public static final String _ATT_URI = "URI"; /** Tag of Attr Type**/ public static final String _ATT_TYPE = "Type"; /** Tag of Attr Id**/ public static final String _ATT_ID = "Id"; /** Tag of Attr MimeType**/ public static final String _ATT_MIMETYPE = "MimeType"; /** Tag of Attr Encoding**/ public static final String _ATT_ENCODING = "Encoding"; /** Tag of Attr Target**/ public static final String _ATT_TARGET = "Target"; // KeyInfo (KeyName|KeyValue|RetrievalMethod|X509Data|PGPData|SPKIData|MgmtData) // KeyValue (DSAKeyValue|RSAKeyValue) // DSAKeyValue (P, Q, G, Y, J?, (Seed, PgenCounter)?) // RSAKeyValue (Modulus, Exponent) // RetrievalMethod (Transforms?) // X509Data ((X509IssuerSerial | X509SKI | X509SubjectName | X509Certificate)+ | X509CRL) // X509IssuerSerial (X509IssuerName, X509SerialNumber) // PGPData ((PGPKeyID, PGPKeyPacket?) | (PGPKeyPacket)) // SPKIData (SPKISexp) /** Tag of Element CanonicalizationMethod **/ public static final String _TAG_CANONICALIZATIONMETHOD = "CanonicalizationMethod"; /** Tag of Element DigestMethod **/ public static final String _TAG_DIGESTMETHOD = "DigestMethod"; /** Tag of Element DigestValue **/ public static final String _TAG_DIGESTVALUE = "DigestValue"; /** Tag of Element Manifest **/ public static final String _TAG_MANIFEST = "Manifest"; /** Tag of Element Methods **/ public static final String _TAG_METHODS = "Methods"; /** Tag of Element Object **/ public static final String _TAG_OBJECT = "Object"; /** Tag of Element Reference **/ public static final String _TAG_REFERENCE = "Reference"; /** Tag of Element Signature **/ public static final String _TAG_SIGNATURE = "Signature"; /** Tag of Element SignatureMethod **/ public static final String _TAG_SIGNATUREMETHOD = "SignatureMethod"; /** Tag of Element HMACOutputLength **/ public static final String _TAG_HMACOUTPUTLENGTH = "HMACOutputLength"; /** Tag of Element SignatureProperties **/ public static final String _TAG_SIGNATUREPROPERTIES = "SignatureProperties"; /** Tag of Element SignatureProperty **/ public static final String _TAG_SIGNATUREPROPERTY = "SignatureProperty"; /** Tag of Element SignatureValue **/ public static final String _TAG_SIGNATUREVALUE = "SignatureValue"; /** Tag of Element SignedInfo **/ public static final String _TAG_SIGNEDINFO = "SignedInfo"; /** Tag of Element Transform **/ public static final String _TAG_TRANSFORM = "Transform"; /** Tag of Element Transforms **/ public static final String _TAG_TRANSFORMS = "Transforms"; /** Tag of Element XPath **/ public static final String _TAG_XPATH = "XPath"; /** Tag of Element KeyInfo **/ public static final String _TAG_KEYINFO = "KeyInfo"; /** Tag of Element KeyName **/ public static final String _TAG_KEYNAME = "KeyName"; /** Tag of Element KeyValue **/ public static final String _TAG_KEYVALUE = "KeyValue"; /** Tag of Element RetrievalMethod **/ public static final String _TAG_RETRIEVALMETHOD = "RetrievalMethod"; /** Tag of Element X509Data **/ public static final String _TAG_X509DATA = "X509Data"; /** Tag of Element PGPData **/ public static final String _TAG_PGPDATA = "PGPData"; /** Tag of Element SPKIData **/ public static final String _TAG_SPKIDATA = "SPKIData"; /** Tag of Element MgmtData **/ public static final String _TAG_MGMTDATA = "MgmtData"; /** Tag of Element RSAKeyValue **/ public static final String _TAG_RSAKEYVALUE = "RSAKeyValue"; /** Tag of Element Exponent **/ public static final String _TAG_EXPONENT = "Exponent"; /** Tag of Element Modulus **/ public static final String _TAG_MODULUS = "Modulus"; /** Tag of Element DSAKeyValue **/ public static final String _TAG_DSAKEYVALUE = "DSAKeyValue"; /** Tag of Element P **/ public static final String _TAG_P = "P"; /** Tag of Element Q **/ public static final String _TAG_Q = "Q"; /** Tag of Element G **/ public static final String _TAG_G = "G"; /** Tag of Element Y **/ public static final String _TAG_Y = "Y"; /** Tag of Element J **/ public static final String _TAG_J = "J"; /** Tag of Element Seed **/ public static final String _TAG_SEED = "Seed"; /** Tag of Element PgenCounter **/ public static final String _TAG_PGENCOUNTER = "PgenCounter"; /** Tag of Element rawX509Certificate **/ public static final String _TAG_RAWX509CERTIFICATE = "rawX509Certificate"; /** Tag of Element X509IssuerSerial **/ public static final String _TAG_X509ISSUERSERIAL= "X509IssuerSerial"; /** Tag of Element X509SKI **/ public static final String _TAG_X509SKI = "X509SKI"; /** Tag of Element X509SubjectName **/ public static final String _TAG_X509SUBJECTNAME = "X509SubjectName"; /** Tag of Element X509Certificate **/ public static final String _TAG_X509CERTIFICATE = "X509Certificate"; /** Tag of Element X509CRL **/ public static final String _TAG_X509CRL = "X509CRL"; /** Tag of Element X509IssuerName **/ public static final String _TAG_X509ISSUERNAME = "X509IssuerName"; /** Tag of Element X509SerialNumber **/ public static final String _TAG_X509SERIALNUMBER = "X509SerialNumber"; /** Tag of Element PGPKeyID **/ public static final String _TAG_PGPKEYID = "PGPKeyID"; /** Tag of Element PGPKeyPacket **/ public static final String _TAG_PGPKEYPACKET = "PGPKeyPacket"; /** Tag of Element PGPKeyPacket **/ public static final String _TAG_DERENCODEDKEYVALUE = "DEREncodedKeyValue"; /** Tag of Element PGPKeyPacket **/ public static final String _TAG_KEYINFOREFERENCE = "KeyInfoReference"; /** Tag of Element PGPKeyPacket **/ public static final String _TAG_X509DIGEST = "X509Digest"; /** Tag of Element SPKISexp **/ public static final String _TAG_SPKISEXP = "SPKISexp"; /** Digest - Required SHA1 */ public static final String ALGO_ID_DIGEST_SHA1 = SignatureSpecNS + "sha1"; /** * @see * draft-blake-wilson-xmldsig-ecdsa-02.txt */ public static final String ALGO_ID_SIGNATURE_ECDSA_CERTICOM = "http://www.certicom.com/2000/11/xmlecdsig#ecdsa-sha1"; private Constants() { // we don't allow instantiation } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/XalanXPathAPI.java0000644000175000017500000001711411752162474030037 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import javax.xml.transform.ErrorListener; import javax.xml.transform.SourceLocator; import javax.xml.transform.TransformerException; import org.apache.xml.security.transforms.implementations.FuncHere; import org.apache.xml.utils.PrefixResolver; import org.apache.xml.utils.PrefixResolverDefault; import org.apache.xpath.Expression; import org.apache.xpath.XPath; import org.apache.xpath.XPathContext; import org.apache.xpath.compiler.FunctionTable; import org.apache.xpath.objects.XObject; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * An implementation of XPathAPI using Xalan. This supports the "here()" function defined in the digital * signature spec. */ public class XalanXPathAPI implements XPathAPI { private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(XalanXPathAPI.class); private String xpathStr = null; private XPath xpath = null; private static FunctionTable funcTable = null; private static boolean installed; private XPathContext context; static { fixupFunctionTable(); } /** * Use an XPath string to select a nodelist. * XPath namespace prefixes are resolved from the namespaceNode. * * @param contextNode The node to start searching from. * @param xpathnode * @param str * @param namespaceNode The node from which prefixes in the XPath will be resolved to namespaces. * @return A NodeIterator, should never be null. * * @throws TransformerException */ public NodeList selectNodeList( Node contextNode, Node xpathnode, String str, Node namespaceNode ) throws TransformerException { // Execute the XPath, and have it return the result XObject list = eval(contextNode, xpathnode, str, namespaceNode); // Return a NodeList. return list.nodelist(); } /** * Evaluate an XPath string and return true if the output is to be included or not. * @param contextNode The node to start searching from. * @param xpathnode The XPath node * @param str The XPath expression * @param namespaceNode The node from which prefixes in the XPath will be resolved to namespaces. */ public boolean evaluate(Node contextNode, Node xpathnode, String str, Node namespaceNode) throws TransformerException { XObject object = eval(contextNode, xpathnode, str, namespaceNode); return object.bool(); } /** * Clear any context information from this object */ public void clear() { xpathStr = null; xpath = null; context = null; } public synchronized static boolean isInstalled() { return installed; } private XObject eval(Node contextNode, Node xpathnode, String str, Node namespaceNode) throws TransformerException { if (context == null) { context = new XPathContext(xpathnode); context.setSecureProcessing(true); } // Create an object to resolve namespace prefixes. // XPath namespaces are resolved from the input context node's document element // if it is a root node, or else the current context node (for lack of a better // resolution space, given the simplicity of this sample code). Node resolverNode = (namespaceNode.getNodeType() == Node.DOCUMENT_NODE) ? ((Document) namespaceNode).getDocumentElement() : namespaceNode; PrefixResolverDefault prefixResolver = new PrefixResolverDefault(resolverNode); if (!str.equals(xpathStr)) { if (str.indexOf("here()") > 0) { context.reset(); } xpath = createXPath(str, prefixResolver); xpathStr = str; } // Execute the XPath, and have it return the result int ctxtNode = context.getDTMHandleFromNode(contextNode); return xpath.execute(context, ctxtNode, prefixResolver); } private XPath createXPath(String str, PrefixResolver prefixResolver) throws TransformerException { XPath xpath = null; Class[] classes = new Class[]{String.class, SourceLocator.class, PrefixResolver.class, int.class, ErrorListener.class, FunctionTable.class}; Object[] objects = new Object[]{str, null, prefixResolver, Integer.valueOf(XPath.SELECT), null, funcTable}; try { Constructor constructor = XPath.class.getConstructor(classes); xpath = (XPath) constructor.newInstance(objects); } catch (Exception ex) { if (log.isDebugEnabled()) { log.debug(ex); } } if (xpath == null) { xpath = new XPath(str, null, prefixResolver, XPath.SELECT, null); } return xpath; } private synchronized static void fixupFunctionTable() { installed = false; if (log.isDebugEnabled()) { log.debug("Registering Here function"); } /** * Try to register our here() implementation as internal function. */ try { Class[] args = {String.class, Expression.class}; Method installFunction = FunctionTable.class.getMethod("installFunction", args); if ((installFunction.getModifiers() & Modifier.STATIC) != 0) { Object[] params = {"here", new FuncHere()}; installFunction.invoke(null, params); installed = true; } } catch (Exception ex) { log.debug("Error installing function using the static installFunction method", ex); } if (!installed) { try { funcTable = new FunctionTable(); Class[] args = {String.class, Class.class}; Method installFunction = FunctionTable.class.getMethod("installFunction", args); Object[] params = {"here", FuncHere.class}; installFunction.invoke(funcTable, params); installed = true; } catch (Exception ex) { log.debug("Error installing function using the static installFunction method", ex); } } if (log.isDebugEnabled()) { if (installed) { log.debug("Registered class " + FuncHere.class.getName() + " for XPath function 'here()' function in internal table"); } else { log.debug("Unable to register class " + FuncHere.class.getName() + " for XPath function 'here()' function in internal table"); } } } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/IgnoreAllErrorHandler.java0000644000175000017500000000501311556225757031662 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; import org.xml.sax.ErrorHandler; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; /** * This {@link org.xml.sax.ErrorHandler} does absolutely nothing but log * the events. * * @author Christian Geuer-Pollmann */ public class IgnoreAllErrorHandler implements ErrorHandler { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(IgnoreAllErrorHandler.class); /** Field throwExceptions */ private static final boolean warnOnExceptions = System.getProperty("org.apache.xml.security.test.warn.on.exceptions", "false").equals("true"); /** Field throwExceptions */ private static final boolean throwExceptions = System.getProperty("org.apache.xml.security.test.throw.exceptions", "false").equals("true"); /** @inheritDoc */ public void warning(SAXParseException ex) throws SAXException { if (IgnoreAllErrorHandler.warnOnExceptions) { log.warn("", ex); } if (IgnoreAllErrorHandler.throwExceptions) { throw ex; } } /** @inheritDoc */ public void error(SAXParseException ex) throws SAXException { if (IgnoreAllErrorHandler.warnOnExceptions) { log.error("", ex); } if (IgnoreAllErrorHandler.throwExceptions) { throw ex; } } /** @inheritDoc */ public void fatalError(SAXParseException ex) throws SAXException { if (IgnoreAllErrorHandler.warnOnExceptions) { log.warn("", ex); } if (IgnoreAllErrorHandler.throwExceptions) { throw ex; } } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/XPathAPI.java0000644000175000017500000000421411750731244027043 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; import javax.xml.transform.TransformerException; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * An interface to abstract XPath evaluation */ public interface XPathAPI { /** * Use an XPath string to select a nodelist. * XPath namespace prefixes are resolved from the namespaceNode. * * @param contextNode The node to start searching from. * @param xpathnode * @param str * @param namespaceNode The node from which prefixes in the XPath will be resolved to namespaces. * @return A NodeIterator, should never be null. * * @throws TransformerException */ NodeList selectNodeList( Node contextNode, Node xpathnode, String str, Node namespaceNode ) throws TransformerException; /** * Evaluate an XPath string and return true if the output is to be included or not. * @param contextNode The node to start searching from. * @param xpathnode The XPath node * @param str The XPath expression * @param namespaceNode The node from which prefixes in the XPath will be resolved to namespaces. */ boolean evaluate(Node contextNode, Node xpathnode, String str, Node namespaceNode) throws TransformerException; /** * Clear any context information from this object */ void clear(); } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/JDKXPathFactory.java0000644000175000017500000000207111714457710030374 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; /** * A Factory to return a JDKXPathAPI instance. */ public class JDKXPathFactory extends XPathFactory { /** * Get a new XPathAPI instance */ public XPathAPI newXPathAPI() { return new JDKXPathAPI(); } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/Signature11ElementProxy.java0000644000175000017500000000366412025634644032156 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; import org.apache.xml.security.exceptions.XMLSecurityException; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * Class SignatureElementProxy * * @author Brent Putman (putmanb@georgetown.edu) */ public abstract class Signature11ElementProxy extends ElementProxy { protected Signature11ElementProxy() { }; /** * Constructor Signature11ElementProxy * * @param doc */ public Signature11ElementProxy(Document doc) { if (doc == null) { throw new RuntimeException("Document is null"); } this.doc = doc; this.constructionElement = XMLUtils.createElementInSignature11Space(this.doc, this.getBaseLocalName()); } /** * Constructor Signature11ElementProxy * * @param element * @param BaseURI * @throws XMLSecurityException */ public Signature11ElementProxy(Element element, String BaseURI) throws XMLSecurityException { super(element, BaseURI); } /** @inheritDoc */ public String getBaseNamespace() { return Constants.SignatureSpec11NS; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/I18n.java0000644000175000017500000001235011556225757026217 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; import java.text.MessageFormat; import java.util.Locale; import java.util.ResourceBundle; /** * The Internationalization (I18N) pack. * * @author Christian Geuer-Pollmann */ public class I18n { /** Field NOT_INITIALIZED_MSG */ public static final String NOT_INITIALIZED_MSG = "You must initialize the xml-security library correctly before you use it. " + "Call the static method \"org.apache.xml.security.Init.init();\" to do that " + "before you use any functionality from that library."; /** Field resourceBundle */ private static ResourceBundle resourceBundle; /** Field alreadyInitialized */ private static boolean alreadyInitialized = false; /** * Constructor I18n * */ private I18n() { // we don't allow instantiation } /** * Method translate * * translates a message ID into an internationalized String, see alse * XMLSecurityException.getExceptionMEssage(). The strings are * stored in the ResourceBundle, which is identified in * exceptionMessagesResourceBundleBase * * @param message * @param args is an Object[] array of strings which are inserted into * the String which is retrieved from the ResouceBundle * @return message translated */ public static String translate(String message, Object[] args) { return getExceptionMessage(message, args); } /** * Method translate * * translates a message ID into an internationalized String, see also * XMLSecurityException.getExceptionMessage() * * @param message * @return message translated */ public static String translate(String message) { return getExceptionMessage(message); } /** * Method getExceptionMessage * * @param msgID * @return message translated * */ public static String getExceptionMessage(String msgID) { try { return resourceBundle.getString(msgID); } catch (Throwable t) { if (org.apache.xml.security.Init.isInitialized()) { return "No message with ID \"" + msgID + "\" found in resource bundle \"" + Constants.exceptionMessagesResourceBundleBase + "\""; } return I18n.NOT_INITIALIZED_MSG; } } /** * Method getExceptionMessage * * @param msgID * @param originalException * @return message translated */ public static String getExceptionMessage(String msgID, Exception originalException) { try { Object exArgs[] = { originalException.getMessage() }; return MessageFormat.format(resourceBundle.getString(msgID), exArgs); } catch (Throwable t) { if (org.apache.xml.security.Init.isInitialized()) { return "No message with ID \"" + msgID + "\" found in resource bundle \"" + Constants.exceptionMessagesResourceBundleBase + "\". Original Exception was a " + originalException.getClass().getName() + " and message " + originalException.getMessage(); } return I18n.NOT_INITIALIZED_MSG; } } /** * Method getExceptionMessage * * @param msgID * @param exArgs * @return message translated */ public static String getExceptionMessage(String msgID, Object exArgs[]) { try { return MessageFormat.format(resourceBundle.getString(msgID), exArgs); } catch (Throwable t) { if (org.apache.xml.security.Init.isInitialized()) { return "No message with ID \"" + msgID + "\" found in resource bundle \"" + Constants.exceptionMessagesResourceBundleBase + "\""; } return I18n.NOT_INITIALIZED_MSG; } } /** * Method init * * @param languageCode * @param countryCode */ public synchronized static void init(String languageCode, String countryCode) { if (alreadyInitialized) { return; } I18n.resourceBundle = ResourceBundle.getBundle( Constants.exceptionMessagesResourceBundleBase, new Locale(languageCode, countryCode) ); alreadyInitialized = true; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/ElementChecker.java0000644000175000017500000000243311750731244030344 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; import org.apache.xml.security.exceptions.XMLSecurityException; import org.w3c.dom.Element; import org.w3c.dom.Node; /**@deprecated*/ public interface ElementChecker { /** * Check that the element is the one expect * * @throws XMLSecurityException */ void guaranteeThatElementInCorrectSpace(ElementProxy expected, Element actual) throws XMLSecurityException; boolean isNamespaceElement(Node el, String type, String ns); } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/RFC2253Parser.java0000644000175000017500000002662411750472047027604 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; import java.io.IOException; import java.io.StringReader; public class RFC2253Parser { /** * Method rfc2253toXMLdsig * * @param dn * @return normalized string */ public static String rfc2253toXMLdsig(String dn) { // Transform from RFC1779 to RFC2253 String normalized = normalize(dn, true); return rfctoXML(normalized); } /** * Method xmldsigtoRFC2253 * * @param dn * @return normalized string */ public static String xmldsigtoRFC2253(String dn) { // Transform from RFC1779 to RFC2253 String normalized = normalize(dn, false); return xmltoRFC(normalized); } /** * Method normalize * * @param dn * @return normalized string */ public static String normalize(String dn) { return normalize(dn, true); } /** * Method normalize * * @param dn * @param toXml * @return normalized string */ public static String normalize(String dn, boolean toXml) { //if empty string if ((dn == null) || dn.equals("")) { return ""; } try { String DN = semicolonToComma(dn); StringBuilder sb = new StringBuilder(); int i = 0; int l = 0; int k; //for name component for (int j = 0; (k = DN.indexOf(',', j)) >= 0; j = k + 1) { l += countQuotes(DN, j, k); if ((k > 0) && (DN.charAt(k - 1) != '\\') && (l % 2) == 0) { sb.append(parseRDN(DN.substring(i, k).trim(), toXml) + ","); i = k + 1; l = 0; } } sb.append(parseRDN(trim(DN.substring(i)), toXml)); return sb.toString(); } catch (IOException ex) { return dn; } } /** * Method parseRDN * * @param str * @param toXml * @return normalized string * @throws IOException */ static String parseRDN(String str, boolean toXml) throws IOException { StringBuilder sb = new StringBuilder(); int i = 0; int l = 0; int k; for (int j = 0; (k = str.indexOf('+', j)) >= 0; j = k + 1) { l += countQuotes(str, j, k); if ((k > 0) && (str.charAt(k - 1) != '\\') && (l % 2) == 0) { sb.append(parseATAV(trim(str.substring(i, k)), toXml) + "+"); i = k + 1; l = 0; } } sb.append(parseATAV(trim(str.substring(i)), toXml)); return sb.toString(); } /** * Method parseATAV * * @param str * @param toXml * @return normalized string * @throws IOException */ static String parseATAV(String str, boolean toXml) throws IOException { int i = str.indexOf('='); if ((i == -1) || ((i > 0) && (str.charAt(i - 1) == '\\'))) { return str; } String attrType = normalizeAT(str.substring(0, i)); // only normalize if value is a String String attrValue = null; if (attrType.charAt(0) >= '0' && attrType.charAt(0) <= '9') { attrValue = str.substring(i + 1); } else { attrValue = normalizeV(str.substring(i + 1), toXml); } return attrType + "=" + attrValue; } /** * Method normalizeAT * * @param str * @return normalized string */ static String normalizeAT(String str) { String at = str.toUpperCase().trim(); if (at.startsWith("OID")) { at = at.substring(3); } return at; } /** * Method normalizeV * * @param str * @param toXml * @return normalized string * @throws IOException */ static String normalizeV(String str, boolean toXml) throws IOException { String value = trim(str); if (value.startsWith("\"")) { StringBuilder sb = new StringBuilder(); StringReader sr = new StringReader(value.substring(1, value.length() - 1)); int i = 0; char c; while ((i = sr.read()) > -1) { c = (char) i; //the following char is defined at 4.Relationship with RFC1779 and LDAPv2 inrfc2253 if ((c == ',') || (c == '=') || (c == '+') || (c == '<') || (c == '>') || (c == '#') || (c == ';')) { sb.append('\\'); } sb.append(c); } value = trim(sb.toString()); } if (toXml) { if (value.startsWith("#")) { value = '\\' + value; } } else { if (value.startsWith("\\#")) { value = value.substring(1); } } return value; } /** * Method rfctoXML * * @param string * @return normalized string */ static String rfctoXML(String string) { try { String s = changeLess32toXML(string); return changeWStoXML(s); } catch (Exception e) { return string; } } /** * Method xmltoRFC * * @param string * @return normalized string */ static String xmltoRFC(String string) { try { String s = changeLess32toRFC(string); return changeWStoRFC(s); } catch (Exception e) { return string; } } /** * Method changeLess32toRFC * * @param string * @return normalized string * @throws IOException */ static String changeLess32toRFC(String string) throws IOException { StringBuilder sb = new StringBuilder(); StringReader sr = new StringReader(string); int i = 0; char c; while ((i = sr.read()) > -1) { c = (char) i; if (c == '\\') { sb.append(c); char c1 = (char) sr.read(); char c2 = (char) sr.read(); //65 (A) 97 (a) if ((((c1 >= 48) && (c1 <= 57)) || ((c1 >= 65) && (c1 <= 70)) || ((c1 >= 97) && (c1 <= 102))) && (((c2 >= 48) && (c2 <= 57)) || ((c2 >= 65) && (c2 <= 70)) || ((c2 >= 97) && (c2 <= 102)))) { char ch = (char) Byte.parseByte("" + c1 + c2, 16); sb.append(ch); } else { sb.append(c1); sb.append(c2); } } else { sb.append(c); } } return sb.toString(); } /** * Method changeLess32toXML * * @param string * @return normalized string * @throws IOException */ static String changeLess32toXML(String string) throws IOException { StringBuilder sb = new StringBuilder(); StringReader sr = new StringReader(string); int i = 0; while ((i = sr.read()) > -1) { if (i < 32) { sb.append('\\'); sb.append(Integer.toHexString(i)); } else { sb.append((char) i); } } return sb.toString(); } /** * Method changeWStoXML * * @param string * @return normalized string * @throws IOException */ static String changeWStoXML(String string) throws IOException { StringBuilder sb = new StringBuilder(); StringReader sr = new StringReader(string); int i = 0; char c; while ((i = sr.read()) > -1) { c = (char) i; if (c == '\\') { char c1 = (char) sr.read(); if (c1 == ' ') { sb.append('\\'); String s = "20"; sb.append(s); } else { sb.append('\\'); sb.append(c1); } } else { sb.append(c); } } return sb.toString(); } /** * Method changeWStoRFC * * @param string * @return normalized string */ static String changeWStoRFC(String string) { StringBuilder sb = new StringBuilder(); int i = 0; int k; for (int j = 0; (k = string.indexOf("\\20", j)) >= 0; j = k + 3) { sb.append(trim(string.substring(i, k)) + "\\ "); i = k + 3; } sb.append(string.substring(i)); return sb.toString(); } /** * Method semicolonToComma * * @param str * @return normalized string */ static String semicolonToComma(String str) { return removeWSandReplace(str, ";", ","); } /** * Method removeWhiteSpace * * @param str * @param symbol * @return normalized string */ static String removeWhiteSpace(String str, String symbol) { return removeWSandReplace(str, symbol, symbol); } /** * Method removeWSandReplace * * @param str * @param symbol * @param replace * @return normalized string */ static String removeWSandReplace(String str, String symbol, String replace) { StringBuilder sb = new StringBuilder(); int i = 0; int l = 0; int k; for (int j = 0; (k = str.indexOf(symbol, j)) >= 0; j = k + 1) { l += countQuotes(str, j, k); if ((k > 0) && (str.charAt(k - 1) != '\\') && (l % 2) == 0) { sb.append(trim(str.substring(i, k)) + replace); i = k + 1; l = 0; } } sb.append(trim(str.substring(i))); return sb.toString(); } /** * Returns the number of Quotation from i to j * * @param s * @param i * @param j * @return number of quotes */ private static int countQuotes(String s, int i, int j) { int k = 0; for (int l = i; l < j; l++) { if (s.charAt(l) == '"') { k++; } } return k; } //only for the end of a space character occurring at the end of the string from rfc2253 /** * Method trim * * @param str * @return the string */ static String trim(String str) { String trimed = str.trim(); int i = str.indexOf(trimed) + trimed.length(); if ((str.length() > i) && trimed.endsWith("\\") && !trimed.endsWith("\\\\") && (str.charAt(i) == ' ')) { trimed = trimed + " "; } return trimed; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/SignatureElementProxy.java0000644000175000017500000000362211556225757032017 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; import org.apache.xml.security.exceptions.XMLSecurityException; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * Class SignatureElementProxy * * @author $Author: coheigea $ */ public abstract class SignatureElementProxy extends ElementProxy { protected SignatureElementProxy() { }; /** * Constructor SignatureElementProxy * * @param doc */ public SignatureElementProxy(Document doc) { if (doc == null) { throw new RuntimeException("Document is null"); } this.doc = doc; this.constructionElement = XMLUtils.createElementInSignatureSpace(this.doc, this.getBaseLocalName()); } /** * Constructor SignatureElementProxy * * @param element * @param BaseURI * @throws XMLSecurityException */ public SignatureElementProxy(Element element, String BaseURI) throws XMLSecurityException { super(element, BaseURI); } /** @inheritDoc */ public String getBaseNamespace() { return Constants.SignatureSpecNS; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/IdResolver.java0000644000175000017500000000337211704017634027546 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * Purpose of this class is to enable the XML Parser to keep track of ID * attributes. This is done by 'registering' attributes of type ID at the * IdResolver. * @deprecated */ public class IdResolver { private IdResolver() { // we don't allow instantiation } /** * Method registerElementById * * @param element the element to register * @param id the ID attribute */ public static void registerElementById(Element element, Attr id) { element.setIdAttributeNode(id, true); } /** * Method getElementById * * @param doc the document * @param id the value of the ID * @return the element obtained by the id, or null if it is not found. */ public static Element getElementById(Document doc, String id) { return doc.getElementById(id); } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/XalanXPathFactory.java0000644000175000017500000000207711714457710031035 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; /** * A Factory to return a XalanXPathAPI instance. */ public class XalanXPathFactory extends XPathFactory { /** * Get a new XPathAPI instance */ public XPathAPI newXPathAPI() { return new XalanXPathAPI(); } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/EncryptionElementProxy.java0000644000175000017500000000333311556225757032207 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; import org.apache.xml.security.exceptions.XMLSecurityException; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * This is the base object for all objects which map directly to an Element from * the xenc spec. * * @author $Author: coheigea $ */ public abstract class EncryptionElementProxy extends ElementProxy { /** * Constructor EncryptionElementProxy * * @param doc */ public EncryptionElementProxy(Document doc) { super(doc); } /** * Constructor EncryptionElementProxy * * @param element * @param BaseURI * @throws XMLSecurityException */ public EncryptionElementProxy(Element element, String BaseURI) throws XMLSecurityException { super(element, BaseURI); } /** @inheritDoc */ public final String getBaseNamespace() { return EncryptionConstants.EncryptionSpecNS; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/resolver/0000755000175000017500000000000012273503733026463 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/resolver/package.html0000644000175000017500000000017207533712503030744 0ustar tonytony

the ResourceResolver classes used to resolve ds:Reference URIs.

././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/resolver/ResourceResolverContext.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/resolver/ResourceResolverCont0000644000175000017500000000251112060430363032532 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils.resolver; import org.w3c.dom.Attr; public class ResourceResolverContext { public ResourceResolverContext(Attr attr, String baseUri, boolean secureValidation) { this.attr = attr; this.baseUri = baseUri; this.secureValidation = secureValidation; this.uriToResolve = attr != null ? attr.getValue() : null; } public final String uriToResolve; public final boolean secureValidation; public final String baseUri; public final Attr attr; } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/resolver/implementations/0000755000175000017500000000000012273503733031673 5ustar tonytony././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/resolver/implementations/package.htmllibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/resolver/implementations/pack0000644000175000017500000000022307533712503032531 0ustar tonytony

implememtations of different ResourceResolver classes used to resolve ds:Reference URIs.

././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverXPointer.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/resolver/implementations/Reso0000644000175000017500000001366312234743735032544 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils.resolver.implementations; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.utils.XMLUtils; import org.apache.xml.security.utils.resolver.ResourceResolverContext; import org.apache.xml.security.utils.resolver.ResourceResolverException; import org.apache.xml.security.utils.resolver.ResourceResolverSpi; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; /** * Handles barename XPointer Reference URIs. *
* To retain comments while selecting an element by an identifier ID, * use the following full XPointer: URI='#xpointer(id('ID'))'. *
* To retain comments while selecting the entire document, * use the following full XPointer: URI='#xpointer(/)'. * This XPointer contains a simple XPath expression that includes * the root node, which the second to last step above replaces with all * nodes of the parse tree (all descendants, plus all attributes, * plus all namespaces nodes). * * @author $Author: coheigea $ */ public class ResolverXPointer extends ResourceResolverSpi { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ResolverXPointer.class); private static final String XP = "#xpointer(id("; private static final int XP_LENGTH = XP.length(); @Override public boolean engineIsThreadSafe() { return true; } /** * @inheritDoc */ @Override public XMLSignatureInput engineResolveURI(ResourceResolverContext context) throws ResourceResolverException { Node resultNode = null; Document doc = context.attr.getOwnerElement().getOwnerDocument(); if (isXPointerSlash(context.uriToResolve)) { resultNode = doc; } else if (isXPointerId(context.uriToResolve)) { String id = getXPointerId(context.uriToResolve); resultNode = doc.getElementById(id); if (context.secureValidation) { Element start = context.attr.getOwnerDocument().getDocumentElement(); if (!XMLUtils.protectAgainstWrappingAttack(start, id)) { Object exArgs[] = { id }; throw new ResourceResolverException( "signature.Verification.MultipleIDs", exArgs, context.attr, context.baseUri ); } } if (resultNode == null) { Object exArgs[] = { id }; throw new ResourceResolverException( "signature.Verification.MissingID", exArgs, context.attr, context.baseUri ); } } XMLSignatureInput result = new XMLSignatureInput(resultNode); result.setSecureValidation(context.secureValidation); result.setMIMEType("text/xml"); if (context.baseUri != null && context.baseUri.length() > 0) { result.setSourceURI(context.baseUri.concat(context.uriToResolve)); } else { result.setSourceURI(context.uriToResolve); } return result; } /** * @inheritDoc */ public boolean engineCanResolveURI(ResourceResolverContext context) { if (context.uriToResolve == null) { return false; } if (isXPointerSlash(context.uriToResolve) || isXPointerId(context.uriToResolve)) { return true; } return false; } /** * Method isXPointerSlash * * @param uri * @return true if begins with xpointer */ private static boolean isXPointerSlash(String uri) { if (uri.equals("#xpointer(/)")) { return true; } return false; } /** * Method isXPointerId * * @param uri * @return whether it has an xpointer id */ private static boolean isXPointerId(String uri) { if (uri.startsWith(XP) && uri.endsWith("))")) { String idPlusDelim = uri.substring(XP_LENGTH, uri.length() - 2); int idLen = idPlusDelim.length() -1; if (((idPlusDelim.charAt(0) == '"') && (idPlusDelim.charAt(idLen) == '"')) || ((idPlusDelim.charAt(0) == '\'') && (idPlusDelim.charAt(idLen) == '\''))) { if (log.isDebugEnabled()) { log.debug("Id = " + idPlusDelim.substring(1, idLen)); } return true; } } return false; } /** * Method getXPointerId * * @param uri * @return xpointerId to search. */ private static String getXPointerId(String uri) { if (uri.startsWith(XP) && uri.endsWith("))")) { String idPlusDelim = uri.substring(XP_LENGTH,uri.length() - 2); int idLen = idPlusDelim.length() -1; if (((idPlusDelim.charAt(0) == '"') && (idPlusDelim.charAt(idLen) == '"')) || ((idPlusDelim.charAt(0) == '\'') && (idPlusDelim.charAt(idLen) == '\''))) { return idPlusDelim.substring(1, idLen); } } return null; } } ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverFragment.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/resolver/implementations/Reso0000644000175000017500000001310212234743735032530 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils.resolver.implementations; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.utils.XMLUtils; import org.apache.xml.security.utils.resolver.ResourceResolverContext; import org.apache.xml.security.utils.resolver.ResourceResolverException; import org.apache.xml.security.utils.resolver.ResourceResolverSpi; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; /** * This resolver is used for resolving same-document URIs like URI="" of URI="#id". * * @author $Author: coheigea $ * @see The Reference processing model in the XML Signature spec * @see Same-Document URI-References in the XML Signature spec * @see Section 4.2 of RFC 2396 */ public class ResolverFragment extends ResourceResolverSpi { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ResolverFragment.class); @Override public boolean engineIsThreadSafe() { return true; } /** * Method engineResolve * * @inheritDoc * @param uri * @param baseURI */ public XMLSignatureInput engineResolveURI(ResourceResolverContext context) throws ResourceResolverException { Document doc = context.attr.getOwnerElement().getOwnerDocument(); Node selectedElem = null; if (context.uriToResolve.equals("")) { /* * Identifies the node-set (minus any comment nodes) of the XML * resource containing the signature */ if (log.isDebugEnabled()) { log.debug("ResolverFragment with empty URI (means complete document)"); } selectedElem = doc; } else { /* * URI="#chapter1" * Identifies a node-set containing the element with ID attribute * value 'chapter1' of the XML resource containing the signature. * XML Signature (and its applications) modify this node-set to * include the element plus all descendants including namespaces and * attributes -- but not comments. */ String id = context.uriToResolve.substring(1); selectedElem = doc.getElementById(id); if (selectedElem == null) { Object exArgs[] = { id }; throw new ResourceResolverException( "signature.Verification.MissingID", exArgs, context.attr, context.baseUri ); } if (context.secureValidation) { Element start = context.attr.getOwnerDocument().getDocumentElement(); if (!XMLUtils.protectAgainstWrappingAttack(start, id)) { Object exArgs[] = { id }; throw new ResourceResolverException( "signature.Verification.MultipleIDs", exArgs, context.attr, context.baseUri ); } } if (log.isDebugEnabled()) { log.debug( "Try to catch an Element with ID " + id + " and Element was " + selectedElem ); } } XMLSignatureInput result = new XMLSignatureInput(selectedElem); result.setSecureValidation(context.secureValidation); result.setExcludeComments(true); result.setMIMEType("text/xml"); if (context.baseUri != null && context.baseUri.length() > 0) { result.setSourceURI(context.baseUri.concat(context.uriToResolve)); } else { result.setSourceURI(context.uriToResolve); } return result; } /** * Method engineCanResolve * @inheritDoc * @param uri * @param baseURI */ public boolean engineCanResolveURI(ResourceResolverContext context) { if (context.uriToResolve == null) { if (log.isDebugEnabled()) { log.debug("Quick fail for null uri"); } return false; } if (context.uriToResolve.equals("") || ((context.uriToResolve.charAt(0) == '#') && !context.uriToResolve.startsWith("#xpointer(")) ) { if (log.isDebugEnabled()) { log.debug("State I can resolve reference: \"" + context.uriToResolve + "\""); } return true; } if (log.isDebugEnabled()) { log.debug("Do not seem to be able to resolve reference: \"" + context.uriToResolve + "\""); } return false; } } ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverLocalFilesystem.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/resolver/implementations/Reso0000644000175000017500000001230212234743735032531 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils.resolver.implementations; import java.io.FileInputStream; import java.net.URI; import java.net.URISyntaxException; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.utils.resolver.ResourceResolverContext; import org.apache.xml.security.utils.resolver.ResourceResolverException; import org.apache.xml.security.utils.resolver.ResourceResolverSpi; /** * A simple ResourceResolver for requests into the local filesystem. */ public class ResolverLocalFilesystem extends ResourceResolverSpi { private static final int FILE_URI_LENGTH = "file:/".length(); /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ResolverLocalFilesystem.class); @Override public boolean engineIsThreadSafe() { return true; } /** * @inheritDoc */ @Override public XMLSignatureInput engineResolveURI(ResourceResolverContext context) throws ResourceResolverException { try { // calculate new URI URI uriNew = getNewURI(context.uriToResolve, context.baseUri); String fileName = ResolverLocalFilesystem.translateUriToFilename(uriNew.toString()); FileInputStream inputStream = new FileInputStream(fileName); XMLSignatureInput result = new XMLSignatureInput(inputStream); result.setSecureValidation(context.secureValidation); result.setSourceURI(uriNew.toString()); return result; } catch (Exception e) { throw new ResourceResolverException("generic.EmptyMessage", e, context.attr, context.baseUri); } } /** * Method translateUriToFilename * * @param uri * @return the string of the filename */ private static String translateUriToFilename(String uri) { String subStr = uri.substring(FILE_URI_LENGTH); if (subStr.indexOf("%20") > -1) { int offset = 0; int index = 0; StringBuilder temp = new StringBuilder(subStr.length()); do { index = subStr.indexOf("%20",offset); if (index == -1) { temp.append(subStr.substring(offset)); } else { temp.append(subStr.substring(offset, index)); temp.append(' '); offset = index + 3; } } while(index != -1); subStr = temp.toString(); } if (subStr.charAt(1) == ':') { // we're running M$ Windows, so this works fine return subStr; } // we're running some UNIX, so we have to prepend a slash return "/" + subStr; } /** * @inheritDoc */ public boolean engineCanResolveURI(ResourceResolverContext context) { if (context.uriToResolve == null) { return false; } if (context.uriToResolve.equals("") || (context.uriToResolve.charAt(0)=='#') || context.uriToResolve.startsWith("http:")) { return false; } try { if (log.isDebugEnabled()) { log.debug("I was asked whether I can resolve " + context.uriToResolve); } if (context.uriToResolve.startsWith("file:") || context.baseUri.startsWith("file:")) { if (log.isDebugEnabled()) { log.debug("I state that I can resolve " + context.uriToResolve); } return true; } } catch (Exception e) { if (log.isDebugEnabled()) { log.debug(e); } } if (log.isDebugEnabled()) { log.debug("But I can't"); } return false; } private static URI getNewURI(String uri, String baseURI) throws URISyntaxException { URI newUri = null; if (baseURI == null || "".equals(baseURI)) { newUri = new URI(uri); } else { newUri = new URI(baseURI).resolve(uri); } // if the URI contains a fragment, ignore it if (newUri.getFragment() != null) { URI uriNewNoFrag = new URI(newUri.getScheme(), newUri.getSchemeSpecificPart(), null); return uriNewNoFrag; } return newUri; } } ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverAnonymous.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/resolver/implementations/Reso0000644000175000017500000000453712234743735032544 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils.resolver.implementations; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.utils.resolver.ResourceResolverContext; import org.apache.xml.security.utils.resolver.ResourceResolverSpi; /** * @author $Author: coheigea $ */ public class ResolverAnonymous extends ResourceResolverSpi { private InputStream inStream = null; @Override public boolean engineIsThreadSafe() { return true; } /** * @param filename * @throws FileNotFoundException * @throws IOException */ public ResolverAnonymous(String filename) throws FileNotFoundException, IOException { inStream = new FileInputStream(filename); } /** * @param is */ public ResolverAnonymous(InputStream is) { inStream = is; } /** @inheritDoc */ @Override public XMLSignatureInput engineResolveURI(ResourceResolverContext context) { XMLSignatureInput input = new XMLSignatureInput(inStream); input.setSecureValidation(context.secureValidation); return input; } /** * @inheritDoc */ @Override public boolean engineCanResolveURI(ResourceResolverContext context) { if (context.uriToResolve == null) { return true; } return false; } /** @inheritDoc */ public String[] engineGetPropertyKeys() { return new String[0]; } } ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverDirectHTTP.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/resolver/implementations/Reso0000644000175000017500000002417112234743735032540 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils.resolver.implementations; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.InetSocketAddress; import java.net.MalformedURLException; import java.net.Proxy; import java.net.URISyntaxException; import java.net.URI; import java.net.URL; import java.net.URLConnection; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.utils.Base64; import org.apache.xml.security.utils.resolver.ResourceResolverContext; import org.apache.xml.security.utils.resolver.ResourceResolverException; import org.apache.xml.security.utils.resolver.ResourceResolverSpi; /** * A simple ResourceResolver for HTTP requests. This class handles only 'pure' * HTTP URIs which means without a fragment. The Fragment handling is done by the * {@link ResolverFragment} class. *
* If the user has a corporate HTTP proxy which is to be used, the usage can be * switched on by setting properties for the resolver: *
 * resourceResolver.setProperty("http.proxy.host", "proxy.company.com");
 * resourceResolver.setProperty("http.proxy.port", "8080");
 *
 * // if we need a password for the proxy
 * resourceResolver.setProperty("http.proxy.username", "proxyuser3");
 * resourceResolver.setProperty("http.proxy.password", "secretca");
 * 
* * @see Java Tip 42: Write Java apps that work with proxy-based firewalls * @see SUN J2SE docs for network properties * @see The JAVA FAQ Question 9.5: How do I make Java work with a proxy server? */ public class ResolverDirectHTTP extends ResourceResolverSpi { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ResolverDirectHTTP.class); /** Field properties[] */ private static final String properties[] = { "http.proxy.host", "http.proxy.port", "http.proxy.username", "http.proxy.password", "http.basic.username", "http.basic.password" }; /** Field HttpProxyHost */ private static final int HttpProxyHost = 0; /** Field HttpProxyPort */ private static final int HttpProxyPort = 1; /** Field HttpProxyUser */ private static final int HttpProxyUser = 2; /** Field HttpProxyPass */ private static final int HttpProxyPass = 3; /** Field HttpProxyUser */ private static final int HttpBasicUser = 4; /** Field HttpProxyPass */ private static final int HttpBasicPass = 5; @Override public boolean engineIsThreadSafe() { return true; } /** * Method resolve * * @param uri * @param baseURI * * @throws ResourceResolverException * @return * $todo$ calculate the correct URI from the attribute and the baseURI */ @Override public XMLSignatureInput engineResolveURI(ResourceResolverContext context) throws ResourceResolverException { try { // calculate new URI URI uriNew = getNewURI(context.uriToResolve, context.baseUri); URL url = uriNew.toURL(); URLConnection urlConnection; urlConnection = openConnection(url); // check if Basic authentication is required String auth = urlConnection.getHeaderField("WWW-Authenticate"); if (auth != null && auth.startsWith("Basic")) { // do http basic authentication String user = engineGetProperty(ResolverDirectHTTP.properties[ResolverDirectHTTP.HttpBasicUser]); String pass = engineGetProperty(ResolverDirectHTTP.properties[ResolverDirectHTTP.HttpBasicPass]); if ((user != null) && (pass != null)) { urlConnection = openConnection(url); String password = user + ":" + pass; String encodedPassword = Base64.encode(password.getBytes("ISO-8859-1")); // set authentication property in the http header urlConnection.setRequestProperty("Authorization", "Basic " + encodedPassword); } } String mimeType = urlConnection.getHeaderField("Content-Type"); InputStream inputStream = urlConnection.getInputStream(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); byte buf[] = new byte[4096]; int read = 0; int summarized = 0; while ((read = inputStream.read(buf)) >= 0) { baos.write(buf, 0, read); summarized += read; } if (log.isDebugEnabled()) { log.debug("Fetched " + summarized + " bytes from URI " + uriNew.toString()); } XMLSignatureInput result = new XMLSignatureInput(baos.toByteArray()); result.setSecureValidation(context.secureValidation); result.setSourceURI(uriNew.toString()); result.setMIMEType(mimeType); return result; } catch (URISyntaxException ex) { throw new ResourceResolverException("generic.EmptyMessage", ex, context.attr, context.baseUri); } catch (MalformedURLException ex) { throw new ResourceResolverException("generic.EmptyMessage", ex, context.attr, context.baseUri); } catch (IOException ex) { throw new ResourceResolverException("generic.EmptyMessage", ex, context.attr, context.baseUri); } catch (IllegalArgumentException e) { throw new ResourceResolverException("generic.EmptyMessage", e, context.attr, context.baseUri); } } private URLConnection openConnection(URL url) throws IOException { String proxyHostProp = engineGetProperty(ResolverDirectHTTP.properties[ResolverDirectHTTP.HttpProxyHost]); String proxyPortProp = engineGetProperty(ResolverDirectHTTP.properties[ResolverDirectHTTP.HttpProxyPort]); String proxyUser = engineGetProperty(ResolverDirectHTTP.properties[ResolverDirectHTTP.HttpProxyUser]); String proxyPass = engineGetProperty(ResolverDirectHTTP.properties[ResolverDirectHTTP.HttpProxyPass]); Proxy proxy = null; if ((proxyHostProp != null) && (proxyPortProp != null)) { int port = Integer.parseInt(proxyPortProp); proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyHostProp, port)); } URLConnection urlConnection; if (proxy != null) { urlConnection = url.openConnection(proxy); if ((proxyUser != null) && (proxyPass != null)) { String password = proxyUser + ":" + proxyPass; String authString = "Basic " + Base64.encode(password.getBytes("ISO-8859-1")); urlConnection.setRequestProperty("Proxy-Authorization", authString); } } else { urlConnection = url.openConnection(); } return urlConnection; } /** * We resolve http URIs without fragment... * * @param uri * @param baseURI * @return true if can be resolved */ public boolean engineCanResolveURI(ResourceResolverContext context) { if (context.uriToResolve == null) { if (log.isDebugEnabled()) { log.debug("quick fail, uri == null"); } return false; } if (context.uriToResolve.equals("") || (context.uriToResolve.charAt(0)=='#')) { if (log.isDebugEnabled()) { log.debug("quick fail for empty URIs and local ones"); } return false; } if (log.isDebugEnabled()) { log.debug("I was asked whether I can resolve " + context.uriToResolve); } if (context.uriToResolve.startsWith("http:") || (context.baseUri != null && context.baseUri.startsWith("http:") )) { if (log.isDebugEnabled()) { log.debug("I state that I can resolve " + context.uriToResolve); } return true; } if (log.isDebugEnabled()) { log.debug("I state that I can't resolve " + context.uriToResolve); } return false; } /** * @inheritDoc */ public String[] engineGetPropertyKeys() { return ResolverDirectHTTP.properties.clone(); } private static URI getNewURI(String uri, String baseURI) throws URISyntaxException { URI newUri = null; if (baseURI == null || "".equals(baseURI)) { newUri = new URI(uri); } else { newUri = new URI(baseURI).resolve(uri); } // if the URI contains a fragment, ignore it if (newUri.getFragment() != null) { URI uriNewNoFrag = new URI(newUri.getScheme(), newUri.getSchemeSpecificPart(), null); return uriNewNoFrag; } return newUri; } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/resolver/ResourceResolver.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/resolver/ResourceResolver.jav0000644000175000017500000003063512220053537032477 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils.resolver; import java.util.ArrayList; import java.util.List; import java.util.Map; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.utils.ClassLoaderUtils; import org.apache.xml.security.utils.resolver.implementations.ResolverDirectHTTP; import org.apache.xml.security.utils.resolver.implementations.ResolverFragment; import org.apache.xml.security.utils.resolver.implementations.ResolverLocalFilesystem; import org.apache.xml.security.utils.resolver.implementations.ResolverXPointer; import org.w3c.dom.Attr; /** * During reference validation, we have to retrieve resources from somewhere. * This is done by retrieving a Resolver. The resolver needs two arguments: The * URI in which the link to the new resource is defined and the baseURI of the * file/entity in which the URI occurs (the baseURI is the same as the SystemId). */ public class ResourceResolver { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ResourceResolver.class); /** these are the system-wide resolvers */ private static List resolverList = new ArrayList(); /** Field resolverSpi */ private final ResourceResolverSpi resolverSpi; /** * Constructor ResourceResolver * * @param resourceResolver */ public ResourceResolver(ResourceResolverSpi resourceResolver) { this.resolverSpi = resourceResolver; } /** * Method getInstance * * @param uri * @param baseURI * @return the instance * * @throws ResourceResolverException */ public static final ResourceResolver getInstance(Attr uri, String baseURI) throws ResourceResolverException { return getInstance(uri, baseURI, false); } /** * Method getInstance * * @param uri * @param baseURI * @param secureValidation * @return the instance * * @throws ResourceResolverException */ public static final ResourceResolver getInstance( Attr uriAttr, String baseURI, boolean secureValidation ) throws ResourceResolverException { ResourceResolverContext context = new ResourceResolverContext(uriAttr, baseURI, secureValidation); return internalGetInstance(context); } private static ResourceResolver internalGetInstance(ResourceResolverContext context) throws ResourceResolverException { synchronized (resolverList) { for (ResourceResolver resolver : resolverList) { ResourceResolver resolverTmp = resolver; if (!resolver.resolverSpi.engineIsThreadSafe()) { try { resolverTmp = new ResourceResolver(resolver.resolverSpi.getClass().newInstance()); } catch (InstantiationException e) { throw new ResourceResolverException("", e, context.attr, context.baseUri); } catch (IllegalAccessException e) { throw new ResourceResolverException("", e, context.attr, context.baseUri); } } if (log.isDebugEnabled()) { log.debug( "check resolvability by class " + resolverTmp.getClass().getName() ); } if ((resolverTmp != null) && resolverTmp.canResolve(context)) { // Check to see whether the Resolver is allowed if (context.secureValidation && (resolverTmp.resolverSpi instanceof ResolverLocalFilesystem || resolverTmp.resolverSpi instanceof ResolverDirectHTTP)) { Object exArgs[] = { resolverTmp.resolverSpi.getClass().getName() }; throw new ResourceResolverException( "signature.Reference.ForbiddenResolver", exArgs, context.attr, context.baseUri ); } return resolverTmp; } } } Object exArgs[] = { ((context.uriToResolve != null) ? context.uriToResolve : "null"), context.baseUri }; throw new ResourceResolverException("utils.resolver.noClass", exArgs, context.attr, context.baseUri); } /** * Method getInstance * * @param uri * @param baseURI * @param individualResolvers * @return the instance * * @throws ResourceResolverException */ public static ResourceResolver getInstance( Attr uri, String baseURI, List individualResolvers ) throws ResourceResolverException { return getInstance(uri, baseURI, individualResolvers, false); } /** * Method getInstance * * @param uri * @param baseURI * @param individualResolvers * @param secureValidation * @return the instance * * @throws ResourceResolverException */ public static ResourceResolver getInstance( Attr uri, String baseURI, List individualResolvers, boolean secureValidation ) throws ResourceResolverException { if (log.isDebugEnabled()) { log.debug( "I was asked to create a ResourceResolver and got " + (individualResolvers == null ? 0 : individualResolvers.size()) ); } ResourceResolverContext context = new ResourceResolverContext(uri, baseURI, secureValidation); // first check the individual Resolvers if (individualResolvers != null) { for (int i = 0; i < individualResolvers.size(); i++) { ResourceResolver resolver = individualResolvers.get(i); if (resolver != null) { if (log.isDebugEnabled()) { String currentClass = resolver.resolverSpi.getClass().getName(); log.debug("check resolvability by class " + currentClass); } if (resolver.canResolve(context)) { return resolver; } } } } return internalGetInstance(context); } /** * Registers a ResourceResolverSpi class. This method logs a warning if * the class cannot be registered. * * @param className the name of the ResourceResolverSpi class to be registered */ @SuppressWarnings("unchecked") public static void register(String className) { try { Class resourceResolverClass = (Class) ClassLoaderUtils.loadClass(className, ResourceResolver.class); register(resourceResolverClass, false); } catch (ClassNotFoundException e) { log.warn("Error loading resolver " + className + " disabling it"); } } /** * Registers a ResourceResolverSpi class at the beginning of the provider * list. This method logs a warning if the class cannot be registered. * * @param className the name of the ResourceResolverSpi class to be registered */ @SuppressWarnings("unchecked") public static void registerAtStart(String className) { try { Class resourceResolverClass = (Class) ClassLoaderUtils.loadClass(className, ResourceResolver.class); register(resourceResolverClass, true); } catch (ClassNotFoundException e) { log.warn("Error loading resolver " + className + " disabling it"); } } /** * Registers a ResourceResolverSpi class. This method logs a warning if the class * cannot be registered. * @param className * @param start */ public static void register(Class className, boolean start) { try { ResourceResolverSpi resourceResolverSpi = className.newInstance(); register(resourceResolverSpi, start); } catch (IllegalAccessException e) { log.warn("Error loading resolver " + className + " disabling it"); } catch (InstantiationException e) { log.warn("Error loading resolver " + className + " disabling it"); } } /** * Registers a ResourceResolverSpi instance. This method logs a warning if the class * cannot be registered. * @param resourceResolverSpi * @param start */ public static void register(ResourceResolverSpi resourceResolverSpi, boolean start) { synchronized(resolverList) { if (start) { resolverList.add(0, new ResourceResolver(resourceResolverSpi)); } else { resolverList.add(new ResourceResolver(resourceResolverSpi)); } } if (log.isDebugEnabled()) { log.debug("Registered resolver: " + resourceResolverSpi.toString()); } } /** * This method registers the default resolvers. */ public static void registerDefaultResolvers() { synchronized(resolverList) { resolverList.add(new ResourceResolver(new ResolverFragment())); resolverList.add(new ResourceResolver(new ResolverLocalFilesystem())); resolverList.add(new ResourceResolver(new ResolverXPointer())); resolverList.add(new ResourceResolver(new ResolverDirectHTTP())); } } /** * @deprecated New clients should use {@link #resolve(Attr, String, boolean)} */ public XMLSignatureInput resolve(Attr uri, String baseURI) throws ResourceResolverException { return resolve(uri, baseURI, true); } /** * Method resolve * * @param uri * @param baseURI * @return the resource * * @throws ResourceResolverException */ public XMLSignatureInput resolve(Attr uri, String baseURI, boolean secureValidation) throws ResourceResolverException { ResourceResolverContext context = new ResourceResolverContext(uri, baseURI, secureValidation); return resolverSpi.engineResolveURI(context); } /** * Method setProperty * * @param key * @param value */ public void setProperty(String key, String value) { resolverSpi.engineSetProperty(key, value); } /** * Method getProperty * * @param key * @return the value of the property */ public String getProperty(String key) { return resolverSpi.engineGetProperty(key); } /** * Method addProperties * * @param properties */ public void addProperties(Map properties) { resolverSpi.engineAddProperies(properties); } /** * Method getPropertyKeys * * @return all property keys. */ public String[] getPropertyKeys() { return resolverSpi.engineGetPropertyKeys(); } /** * Method understandsProperty * * @param propertyToTest * @return true if the resolver understands the property */ public boolean understandsProperty(String propertyToTest) { return resolverSpi.understandsProperty(propertyToTest); } /** * Method canResolve * * @param uri * @param baseURI * @return true if it can resolve the uri */ private boolean canResolve(ResourceResolverContext context) { return this.resolverSpi.engineCanResolveURI(context); } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/resolver/ResourceResolverException.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/resolver/ResourceResolverExce0000644000175000017500000000644411556225757032546 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils.resolver; import org.apache.xml.security.exceptions.XMLSecurityException; import org.w3c.dom.Attr; /** * This Exception is thrown if something related to the * {@link org.apache.xml.security.utils.resolver.ResourceResolver} goes wrong. * * @author $Author: coheigea $ */ public class ResourceResolverException extends XMLSecurityException { private static final long serialVersionUID = 1L; private Attr uri = null; private String baseURI = null; /** * Constructor ResourceResolverException * * @param msgID * @param uri * @param baseURI */ public ResourceResolverException(String msgID, Attr uri, String baseURI) { super(msgID); this.uri = uri; this.baseURI = baseURI; } /** * Constructor ResourceResolverException * * @param msgID * @param exArgs * @param uri * @param baseURI */ public ResourceResolverException(String msgID, Object exArgs[], Attr uri, String baseURI) { super(msgID, exArgs); this.uri = uri; this.baseURI = baseURI; } /** * Constructor ResourceResolverException * * @param msgID * @param originalException * @param uri * @param baseURI */ public ResourceResolverException(String msgID, Exception originalException, Attr uri, String baseURI) { super(msgID, originalException); this.uri = uri; this.baseURI = baseURI; } /** * Constructor ResourceResolverException * * @param msgID * @param exArgs * @param originalException * @param uri * @param baseURI */ public ResourceResolverException(String msgID, Object exArgs[], Exception originalException, Attr uri, String baseURI) { super(msgID, exArgs, originalException); this.uri = uri; this.baseURI = baseURI; } /** * * @param uri */ public void setURI(Attr uri) { this.uri = uri; } /** * * @return the uri */ public Attr getURI() { return this.uri; } /** * * @param baseURI */ public void setbaseURI(String baseURI) { this.baseURI = baseURI; } /** * * @return the baseURI */ public String getbaseURI() { return this.baseURI; } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/resolver/ResourceResolverSpi.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/resolver/ResourceResolverSpi.0000644000175000017500000001637712060430451032455 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils.resolver; import java.util.HashMap; import java.util.Map; import org.apache.xml.security.signature.XMLSignatureInput; import org.w3c.dom.Attr; /** * During reference validation, we have to retrieve resources from somewhere. * * @author $Author: coheigea $ */ public abstract class ResourceResolverSpi { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ResourceResolverSpi.class); /** Field properties */ protected java.util.Map properties = null; /** * Deprecated - used to carry state about whether resolution was being done in a secure fashion, * but was not thread safe, so the resolution information is now passed as parameters to methods. * * @deprecated Secure validation flag is now passed to methods. */ protected final boolean secureValidation = true; /** * This is the workhorse method used to resolve resources. * * @param uri * @param BaseURI * @return the resource wrapped around a XMLSignatureInput * * @throws ResourceResolverException * * @deprecated New clients should override {@link #engineResolveURI(ResourceResolverContext)} */ public XMLSignatureInput engineResolve(Attr uri, String BaseURI) throws ResourceResolverException { throw new UnsupportedOperationException(); } /** * This is the workhorse method used to resolve resources. * @param context Context to use to resolve resources. * * @return the resource wrapped around a XMLSignatureInput * * @throws ResourceResolverException */ public XMLSignatureInput engineResolveURI(ResourceResolverContext context) throws ResourceResolverException { // The default implementation, to preserve backwards compatibility in the // test cases, calls the old resolver API. return engineResolve(context.attr, context.baseUri); } /** * Method engineSetProperty * * @param key * @param value */ public void engineSetProperty(String key, String value) { if (properties == null) { properties = new HashMap(); } properties.put(key, value); } /** * Method engineGetProperty * * @param key * @return the value of the property */ public String engineGetProperty(String key) { if (properties == null) { return null; } return properties.get(key); } /** * * @param newProperties */ public void engineAddProperies(Map newProperties) { if (newProperties != null && !newProperties.isEmpty()) { if (properties == null) { properties = new HashMap(); } properties.putAll(newProperties); } } /** * Tells if the implementation does can be reused by several threads safely. * It normally means that the implementation does not have any member, or there is * member change between engineCanResolve & engineResolve invocations. Or it maintains all * member info in ThreadLocal methods. */ public boolean engineIsThreadSafe() { return false; } /** * This method helps the {@link ResourceResolver} to decide whether a * {@link ResourceResolverSpi} is able to perform the requested action. * * @param uri * @param BaseURI * @return true if the engine can resolve the uri * * @deprecated See {@link #engineCanResolveURI(ResourceResolverContext)} */ public boolean engineCanResolve(Attr uri, String BaseURI) { // This method used to be abstract, so any calls to "super" are bogus. throw new UnsupportedOperationException(); } /** * This method helps the {@link ResourceResolver} to decide whether a * {@link ResourceResolverSpi} is able to perform the requested action. * *

New clients should override this method, and not override {@link #engineCanResolve(Attr, String)} *

* @param context Context in which to do resolution. * @return true if the engine can resolve the uri */ public boolean engineCanResolveURI(ResourceResolverContext context) { // To preserve backward compatibility with existing resolvers that might override the old method, // call the old deprecated API. return engineCanResolve( (Attr) context.attr, context.baseUri ); } /** * Method engineGetPropertyKeys * * @return the property keys */ public String[] engineGetPropertyKeys() { return new String[0]; } /** * Method understandsProperty * * @param propertyToTest * @return true if understands the property */ public boolean understandsProperty(String propertyToTest) { String[] understood = this.engineGetPropertyKeys(); if (understood != null) { for (int i = 0; i < understood.length; i++) { if (understood[i].equals(propertyToTest)) { return true; } } } return false; } /** * Fixes a platform dependent filename to standard URI form. * * @param str The string to fix. * * @return Returns the fixed URI string. */ public static String fixURI(String str) { // handle platform dependent strings str = str.replace(java.io.File.separatorChar, '/'); if (str.length() >= 4) { // str =~ /^\W:\/([^/])/ # to speak perl ;-)) char ch0 = Character.toUpperCase(str.charAt(0)); char ch1 = str.charAt(1); char ch2 = str.charAt(2); char ch3 = str.charAt(3); boolean isDosFilename = ((('A' <= ch0) && (ch0 <= 'Z')) && (ch1 == ':') && (ch2 == '/') && (ch3 != '/')); if (isDosFilename && log.isDebugEnabled()) { log.debug("Found DOS filename: " + str); } } // Windows fix if (str.length() >= 2) { char ch1 = str.charAt(1); if (ch1 == ':') { char ch0 = Character.toUpperCase(str.charAt(0)); if (('A' <= ch0) && (ch0 <= 'Z')) { str = "/" + str; } } } // done return str; } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/UnsyncBufferedOutputStream.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/UnsyncBufferedOutputStream.ja0000644000175000017500000000500612075501260032447 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; import java.io.IOException; import java.io.OutputStream; /** * A class that buffers without synchronizing its methods * @author raul */ public class UnsyncBufferedOutputStream extends OutputStream { static final int size = 8*1024; private int pointer = 0; private final OutputStream out; private final byte[] buf; /** * Creates a buffered output stream without synchronization * @param out the outputstream to buffer */ public UnsyncBufferedOutputStream(OutputStream out) { buf = new byte[size]; this.out = out; } /** @inheritDoc */ public void write(byte[] arg0) throws IOException { write(arg0, 0, arg0.length); } /** @inheritDoc */ public void write(byte[] arg0, int arg1, int len) throws IOException { int newLen = pointer+len; if (newLen > size) { flushBuffer(); if (len > size) { out.write(arg0, arg1,len); return; } newLen = len; } System.arraycopy(arg0, arg1, buf, pointer, len); pointer = newLen; } private void flushBuffer() throws IOException { if (pointer > 0) { out.write(buf, 0, pointer); } pointer = 0; } /** @inheritDoc */ public void write(int arg0) throws IOException { if (pointer >= size) { flushBuffer(); } buf[pointer++] = (byte)arg0; } /** @inheritDoc */ public void flush() throws IOException { flushBuffer(); out.flush(); } /** @inheritDoc */ public void close() throws IOException { flush(); out.close(); } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/utils/DigesterOutputStream.java0000644000175000017500000000407511750472047031640 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.utils; import java.io.ByteArrayOutputStream; import org.apache.xml.security.algorithms.MessageDigestAlgorithm; /** * @author raul * */ public class DigesterOutputStream extends ByteArrayOutputStream { private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(DigesterOutputStream.class); final MessageDigestAlgorithm mda; /** * @param mda */ public DigesterOutputStream(MessageDigestAlgorithm mda) { this.mda = mda; } /** @inheritDoc */ public void write(byte[] arg0) { write(arg0, 0, arg0.length); } /** @inheritDoc */ public void write(int arg0) { mda.update((byte)arg0); } /** @inheritDoc */ public void write(byte[] arg0, int arg1, int arg2) { if (log.isDebugEnabled()) { log.debug("Pre-digested input:"); StringBuilder sb = new StringBuilder(arg2); for (int i = arg1; i < (arg1 + arg2); i++) { sb.append((char)arg0[i]); } log.debug(sb.toString()); } mda.update(arg0, arg1, arg2); } /** * @return the digest value */ public byte[] getDigestValue() { return mda.digest(); } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/0000755000175000017500000000000012273503734025661 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/package.html0000644000175000017500000000013407533712503030137 0ustar tonytony

the framework for XML Signature transforms.

libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/TransformSpi.java0000644000175000017500000001075212234743735031164 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.transforms; import java.io.IOException; import java.io.OutputStream; import javax.xml.parsers.ParserConfigurationException; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.InvalidCanonicalizerException; import org.apache.xml.security.signature.XMLSignatureInput; import org.xml.sax.SAXException; /** * Base class which all Transform algorithms extend. The common methods that * have to be overridden are the * {@link #enginePerformTransform(XMLSignatureInput, Transform)} method. * * @author Christian Geuer-Pollmann */ public abstract class TransformSpi { protected boolean secureValidation; /** * The mega method which MUST be implemented by the Transformation Algorithm. * * @param input {@link XMLSignatureInput} as the input of transformation * @param os where to output this transformation. * @param transformObject the Transform object * @return {@link XMLSignatureInput} as the result of transformation * @throws CanonicalizationException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @throws TransformationException */ protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, OutputStream os, Transform transformObject ) throws IOException, CanonicalizationException, InvalidCanonicalizerException, TransformationException, ParserConfigurationException, SAXException { throw new UnsupportedOperationException(); } /** * The mega method which MUST be implemented by the Transformation Algorithm. * In order to be compatible with preexisting Transform implementations, * by default this implementation invokes the deprecated, thread-unsafe * methods. Subclasses should override this with a thread-safe * implementation. * * @param input {@link XMLSignatureInput} as the input of transformation * @param transformObject the Transform object * @return {@link XMLSignatureInput} as the result of transformation * @throws CanonicalizationException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @throws TransformationException */ protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, Transform transformObject ) throws IOException, CanonicalizationException, InvalidCanonicalizerException, TransformationException, ParserConfigurationException, SAXException { return enginePerformTransform(input, null, transformObject); } /** * The mega method which MUST be implemented by the Transformation Algorithm. * @param input {@link XMLSignatureInput} as the input of transformation * @return {@link XMLSignatureInput} as the result of transformation * @throws CanonicalizationException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @throws TransformationException */ protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input ) throws IOException, CanonicalizationException, InvalidCanonicalizerException, TransformationException, ParserConfigurationException, SAXException { return enginePerformTransform(input, null); } /** * Returns the URI representation of Transformation algorithm * * @return the URI representation of Transformation algorithm */ protected abstract String engineGetURI(); } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/TransformationException.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/TransformationException.0000644000175000017500000000415011555760614032553 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.transforms; import org.apache.xml.security.exceptions.XMLSecurityException; /** * * @author Christian Geuer-Pollmann */ public class TransformationException extends XMLSecurityException { /** * */ private static final long serialVersionUID = 1L; /** * Constructor TransformationException * */ public TransformationException() { super(); } /** * Constructor TransformationException * * @param msgID */ public TransformationException(String msgID) { super(msgID); } /** * Constructor TransformationException * * @param msgID * @param exArgs */ public TransformationException(String msgID, Object exArgs[]) { super(msgID, exArgs); } /** * Constructor TransformationException * * @param msgID * @param originalException */ public TransformationException(String msgID, Exception originalException) { super(msgID, originalException); } /** * Constructor TransformationException * * @param msgID * @param exArgs * @param originalException */ public TransformationException(String msgID, Object exArgs[], Exception originalException) { super(msgID, exArgs, originalException); } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/TransformParam.java0000644000175000017500000000156411555760614031472 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.transforms; public interface TransformParam { }libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/0000755000175000017500000000000012273503734031071 5ustar tonytony././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/package.htmllibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/package.0000644000175000017500000000013507533712503032463 0ustar tonytony

implementations of XML Signature transforms.

././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/TransformXPath.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/Transfor0000644000175000017500000001341711714457710032621 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.transforms.implementations; import java.io.OutputStream; import javax.xml.transform.TransformerException; import org.apache.xml.security.exceptions.XMLSecurityRuntimeException; import org.apache.xml.security.signature.NodeFilter; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.transforms.Transform; import org.apache.xml.security.transforms.TransformSpi; import org.apache.xml.security.transforms.TransformationException; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.apache.xml.security.utils.XPathAPI; import org.apache.xml.security.utils.XPathFactory; import org.w3c.dom.DOMException; import org.w3c.dom.Element; import org.w3c.dom.Node; /** * Class TransformXPath * * Implements the http://www.w3.org/TR/1999/REC-xpath-19991116 * transform. * * @author Christian Geuer-Pollmann * @see XPath * */ public class TransformXPath extends TransformSpi { /** Field implementedTransformURI */ public static final String implementedTransformURI = Transforms.TRANSFORM_XPATH; /** * Method engineGetURI * * @inheritDoc */ protected String engineGetURI() { return implementedTransformURI; } /** * Method enginePerformTransform * @inheritDoc * @param input * * @throws TransformationException */ protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, OutputStream os, Transform transformObject ) throws TransformationException { try { /** * If the actual input is an octet stream, then the application MUST * convert the octet stream to an XPath node-set suitable for use by * Canonical XML with Comments. (A subsequent application of the * REQUIRED Canonical XML algorithm would strip away these comments.) * * ... * * The evaluation of this expression includes all of the document's nodes * (including comments) in the node-set representing the octet stream. */ Element xpathElement = XMLUtils.selectDsNode( transformObject.getElement().getFirstChild(), Constants._TAG_XPATH, 0); if (xpathElement == null) { Object exArgs[] = { "ds:XPath", "Transform" }; throw new TransformationException("xml.WrongContent", exArgs); } Node xpathnode = xpathElement.getChildNodes().item(0); String str = XMLUtils.getStrFromNode(xpathnode); input.setNeedsToBeExpanded(needsCircumvent(str)); if (xpathnode == null) { throw new DOMException( DOMException.HIERARCHY_REQUEST_ERR, "Text must be in ds:Xpath" ); } XPathFactory xpathFactory = XPathFactory.newInstance(); XPathAPI xpathAPIInstance = xpathFactory.newXPathAPI(); input.addNodeFilter(new XPathNodeFilter(xpathElement, xpathnode, str, xpathAPIInstance)); input.setNodeSet(true); return input; } catch (DOMException ex) { throw new TransformationException("empty", ex); } } /** * @param str * @return true if needs to be circumvent for bug. */ private boolean needsCircumvent(String str) { return (str.indexOf("namespace") != -1) || (str.indexOf("name()") != -1); } static class XPathNodeFilter implements NodeFilter { XPathAPI xPathAPI; Node xpathnode; Element xpathElement; String str; XPathNodeFilter(Element xpathElement, Node xpathnode, String str, XPathAPI xPathAPI) { this.xpathnode = xpathnode; this.str = str; this.xpathElement = xpathElement; this.xPathAPI = xPathAPI; } /** * @see org.apache.xml.security.signature.NodeFilter#isNodeInclude(org.w3c.dom.Node) */ public int isNodeInclude(Node currentNode) { try { boolean include = xPathAPI.evaluate(currentNode, xpathnode, str, xpathElement); if (include) { return 1; } return 0; } catch (TransformerException e) { Object[] eArgs = {currentNode}; throw new XMLSecurityRuntimeException("signature.Transform.node", eArgs, e); } catch (Exception e) { Object[] eArgs = {currentNode, Short.valueOf(currentNode.getNodeType())}; throw new XMLSecurityRuntimeException("signature.Transform.nodeAndType",eArgs, e); } } public int isNodeIncludeDO(Node n, int level) { return isNodeInclude(n); } } } ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/TransformXPath2Filter.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/Transfor0000644000175000017500000002341111714457710032614 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.transforms.implementations; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerException; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.InvalidCanonicalizerException; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.signature.NodeFilter; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.transforms.Transform; import org.apache.xml.security.transforms.TransformSpi; import org.apache.xml.security.transforms.TransformationException; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.transforms.params.XPath2FilterContainer; import org.apache.xml.security.utils.XMLUtils; import org.apache.xml.security.utils.XPathAPI; import org.apache.xml.security.utils.XPathFactory; import org.w3c.dom.DOMException; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.SAXException; /** * Implements the XML Signature XPath Filter v2.0 * * @see XPath Filter v2.0 (TR) */ public class TransformXPath2Filter extends TransformSpi { /** Field implementedTransformURI */ public static final String implementedTransformURI = Transforms.TRANSFORM_XPATH2FILTER; /** * Method engineGetURI * * @inheritDoc */ protected String engineGetURI() { return implementedTransformURI; } /** * Method enginePerformTransform * @inheritDoc * @param input * * @throws TransformationException */ protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, OutputStream os, Transform transformObject ) throws TransformationException { try { List unionNodes = new ArrayList(); List subtractNodes = new ArrayList(); List intersectNodes = new ArrayList(); Element[] xpathElements = XMLUtils.selectNodes( transformObject.getElement().getFirstChild(), XPath2FilterContainer.XPathFilter2NS, XPath2FilterContainer._TAG_XPATH2 ); if (xpathElements.length == 0) { Object exArgs[] = { Transforms.TRANSFORM_XPATH2FILTER, "XPath" }; throw new TransformationException("xml.WrongContent", exArgs); } Document inputDoc = null; if (input.getSubNode() != null) { inputDoc = XMLUtils.getOwnerDocument(input.getSubNode()); } else { inputDoc = XMLUtils.getOwnerDocument(input.getNodeSet()); } for (int i = 0; i < xpathElements.length; i++) { Element xpathElement = xpathElements[i]; XPath2FilterContainer xpathContainer = XPath2FilterContainer.newInstance(xpathElement, input.getSourceURI()); String str = XMLUtils.getStrFromNode(xpathContainer.getXPathFilterTextNode()); XPathFactory xpathFactory = XPathFactory.newInstance(); XPathAPI xpathAPIInstance = xpathFactory.newXPathAPI(); NodeList subtreeRoots = xpathAPIInstance.selectNodeList( inputDoc, xpathContainer.getXPathFilterTextNode(), str, xpathContainer.getElement()); if (xpathContainer.isIntersect()) { intersectNodes.add(subtreeRoots); } else if (xpathContainer.isSubtract()) { subtractNodes.add(subtreeRoots); } else if (xpathContainer.isUnion()) { unionNodes.add(subtreeRoots); } } input.addNodeFilter( new XPath2NodeFilter(unionNodes, subtractNodes, intersectNodes) ); input.setNodeSet(true); return input; } catch (TransformerException ex) { throw new TransformationException("empty", ex); } catch (DOMException ex) { throw new TransformationException("empty", ex); } catch (CanonicalizationException ex) { throw new TransformationException("empty", ex); } catch (InvalidCanonicalizerException ex) { throw new TransformationException("empty", ex); } catch (XMLSecurityException ex) { throw new TransformationException("empty", ex); } catch (SAXException ex) { throw new TransformationException("empty", ex); } catch (IOException ex) { throw new TransformationException("empty", ex); } catch (ParserConfigurationException ex) { throw new TransformationException("empty", ex); } } } class XPath2NodeFilter implements NodeFilter { boolean hasUnionFilter; boolean hasSubtractFilter; boolean hasIntersectFilter; Set unionNodes; Set subtractNodes; Set intersectNodes; int inSubtract = -1; int inIntersect = -1; int inUnion = -1; XPath2NodeFilter(List unionNodes, List subtractNodes, List intersectNodes) { hasUnionFilter = !unionNodes.isEmpty(); this.unionNodes = convertNodeListToSet(unionNodes); hasSubtractFilter = !subtractNodes.isEmpty(); this.subtractNodes = convertNodeListToSet(subtractNodes); hasIntersectFilter = !intersectNodes.isEmpty(); this.intersectNodes = convertNodeListToSet(intersectNodes); } /** * @see org.apache.xml.security.signature.NodeFilter#isNodeInclude(org.w3c.dom.Node) */ public int isNodeInclude(Node currentNode) { int result = 1; if (hasSubtractFilter && rooted(currentNode, subtractNodes)) { result = -1; } else if (hasIntersectFilter && !rooted(currentNode, intersectNodes)) { result = 0; } //TODO OPTIMIZE if (result == 1) { return 1; } if (hasUnionFilter) { if (rooted(currentNode, unionNodes)) { return 1; } result = 0; } return result; } public int isNodeIncludeDO(Node n, int level) { int result = 1; if (hasSubtractFilter) { if ((inSubtract == -1) || (level <= inSubtract)) { if (inList(n, subtractNodes)) { inSubtract = level; } else { inSubtract = -1; } } if (inSubtract != -1){ result = -1; } } if (result != -1 && hasIntersectFilter && ((inIntersect == -1) || (level <= inIntersect))) { if (!inList(n, intersectNodes)) { inIntersect = -1; result = 0; } else { inIntersect = level; } } if (level <= inUnion) { inUnion = -1; } if (result == 1) { return 1; } if (hasUnionFilter) { if ((inUnion == -1) && inList(n, unionNodes)) { inUnion = level; } if (inUnion != -1) { return 1; } result=0; } return result; } /** * Method rooted * @param currentNode * @param nodeList * * @return if rooted bye the rootnodes */ static boolean rooted(Node currentNode, Set nodeList) { if (nodeList.isEmpty()) { return false; } if (nodeList.contains(currentNode)) { return true; } for (Node rootNode : nodeList) { if (XMLUtils.isDescendantOrSelf(rootNode, currentNode)) { return true; } } return false; } /** * Method rooted * @param currentNode * @param nodeList * * @return if rooted bye the rootnodes */ static boolean inList(Node currentNode, Set nodeList) { return nodeList.contains(currentNode); } private static Set convertNodeListToSet(List l) { Set result = new HashSet(); for (NodeList rootNodes : l) { int length = rootNodes.getLength(); for (int i = 0; i < length; i++) { Node rootNode = rootNodes.item(i); result.add(rootNode); } } return result; } } ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14N11.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/Transfor0000644000175000017500000000434112234745521032613 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.transforms.implementations; import java.io.OutputStream; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.implementations.Canonicalizer11_OmitComments; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.transforms.Transform; import org.apache.xml.security.transforms.TransformSpi; import org.apache.xml.security.transforms.Transforms; /** * Implements the http://www.w3.org/2006/12/xml-c14n11 * (C14N 1.1) transform. * * @author Sean Mullan */ public class TransformC14N11 extends TransformSpi { protected String engineGetURI() { return Transforms.TRANSFORM_C14N11_OMIT_COMMENTS; } protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, OutputStream os, Transform transform ) throws CanonicalizationException { Canonicalizer11_OmitComments c14n = new Canonicalizer11_OmitComments(); c14n.setSecureValidation(secureValidation); if (os != null) { c14n.setWriter(os); } byte[] result = null; result = c14n.engineCanonicalize(input); XMLSignatureInput output = new XMLSignatureInput(result); output.setSecureValidation(secureValidation); if (os != null) { output.setOutputStream(os); } return output; } } ././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14N11_WithComments.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/Transfor0000644000175000017500000000441012234745521032610 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.transforms.implementations; import java.io.OutputStream; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.implementations.Canonicalizer11_WithComments; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.transforms.Transform; import org.apache.xml.security.transforms.TransformSpi; import org.apache.xml.security.transforms.Transforms; /** * Implements the http://www.w3.org/2006/12/xml-c14n-11#WithComments * (C14N 1.1 With Comments) transform. * * @author Sean Mullan */ public class TransformC14N11_WithComments extends TransformSpi { protected String engineGetURI() { return Transforms.TRANSFORM_C14N11_WITH_COMMENTS; } protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, OutputStream os, Transform transform ) throws CanonicalizationException { Canonicalizer11_WithComments c14n = new Canonicalizer11_WithComments(); c14n.setSecureValidation(secureValidation); if (os != null) { c14n.setWriter(os); } byte[] result = null; result = c14n.engineCanonicalize(input); XMLSignatureInput output = new XMLSignatureInput(result); output.setSecureValidation(secureValidation); if (os != null) { output.setOutputStream(os); } return output; } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14N.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/Transfor0000644000175000017500000000466512234745521032624 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.transforms.implementations; import java.io.OutputStream; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.implementations.Canonicalizer20010315OmitComments; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.transforms.Transform; import org.apache.xml.security.transforms.TransformSpi; import org.apache.xml.security.transforms.Transforms; /** * Implements the http://www.w3.org/TR/2001/REC-xml-c14n-20010315 * transform. * * @author Christian Geuer-Pollmann */ public class TransformC14N extends TransformSpi { /** Field implementedTransformURI */ public static final String implementedTransformURI = Transforms.TRANSFORM_C14N_OMIT_COMMENTS; /** * @inheritDoc */ protected String engineGetURI() { return TransformC14N.implementedTransformURI; } protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, OutputStream os, Transform transformObject ) throws CanonicalizationException { Canonicalizer20010315OmitComments c14n = new Canonicalizer20010315OmitComments(); c14n.setSecureValidation(secureValidation); if (os != null) { c14n.setWriter(os); } byte[] result = null; result = c14n.engineCanonicalize(input); XMLSignatureInput output = new XMLSignatureInput(result); output.setSecureValidation(secureValidation); if (os != null) { output.setOutputStream(os); } return output; } } ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/TransformBase64Decode.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/Transfor0000644000175000017500000001666512234743735032634 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.transforms.implementations; import java.io.BufferedInputStream; import java.io.IOException; import java.io.OutputStream; import javax.xml.parsers.ParserConfigurationException; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.exceptions.Base64DecodingException; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.transforms.Transform; import org.apache.xml.security.transforms.TransformSpi; import org.apache.xml.security.transforms.TransformationException; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.utils.Base64; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.Text; import org.xml.sax.SAXException; /** * Implements the http://www.w3.org/2000/09/xmldsig#base64 decoding * transform. * *

The normative specification for base64 decoding transforms is * [MIME]. * The base64 Transform element has no content. The input * is decoded by the algorithms. This transform is useful if an * application needs to sign the raw data associated with the encoded * content of an element.

* *

This transform requires an octet stream for input. * If an XPath node-set (or sufficiently functional alternative) is * given as input, then it is converted to an octet stream by * performing operations logically equivalent to 1) applying an XPath * transform with expression self::text(), then 2) taking the string-value * of the node-set. Thus, if an XML element is identified by a barename * XPointer in the Reference URI, and its content consists solely of base64 * encoded character data, then this transform automatically strips away the * start and end tags of the identified element and any of its descendant * elements as well as any descendant comments and processing instructions. * The output of this transform is an octet stream.

* * @author Christian Geuer-Pollmann * @see org.apache.xml.security.utils.Base64 */ public class TransformBase64Decode extends TransformSpi { /** Field implementedTransformURI */ public static final String implementedTransformURI = Transforms.TRANSFORM_BASE64_DECODE; /** * Method engineGetURI * * @inheritDoc */ protected String engineGetURI() { return TransformBase64Decode.implementedTransformURI; } /** * Method enginePerformTransform * * @param input * @return {@link XMLSignatureInput} as the result of transformation * @inheritDoc * @throws CanonicalizationException * @throws IOException * @throws TransformationException */ protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, Transform transformObject ) throws IOException, CanonicalizationException, TransformationException { return enginePerformTransform(input, null, transformObject); } protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, OutputStream os, Transform transformObject ) throws IOException, CanonicalizationException, TransformationException { try { if (input.isElement()) { Node el = input.getSubNode(); if (input.getSubNode().getNodeType() == Node.TEXT_NODE) { el = el.getParentNode(); } StringBuilder sb = new StringBuilder(); traverseElement((Element)el, sb); if (os == null) { byte[] decodedBytes = Base64.decode(sb.toString()); XMLSignatureInput output = new XMLSignatureInput(decodedBytes); output.setSecureValidation(secureValidation); return output; } Base64.decode(sb.toString(), os); XMLSignatureInput output = new XMLSignatureInput((byte[])null); output.setSecureValidation(secureValidation); output.setOutputStream(os); return output; } if (input.isOctetStream() || input.isNodeSet()) { if (os == null) { byte[] base64Bytes = input.getBytes(); byte[] decodedBytes = Base64.decode(base64Bytes); XMLSignatureInput output = new XMLSignatureInput(decodedBytes); output.setSecureValidation(secureValidation); return output; } if (input.isByteArray() || input.isNodeSet()) { Base64.decode(input.getBytes(), os); } else { Base64.decode(new BufferedInputStream(input.getOctetStreamReal()), os); } XMLSignatureInput output = new XMLSignatureInput((byte[])null); output.setSecureValidation(secureValidation); output.setOutputStream(os); return output; } try { //Exceptional case there is current not text case testing this(Before it was a //a common case). Document doc = XMLUtils.createDocumentBuilder(false, secureValidation).parse(input.getOctetStream()); Element rootNode = doc.getDocumentElement(); StringBuilder sb = new StringBuilder(); traverseElement(rootNode, sb); byte[] decodedBytes = Base64.decode(sb.toString()); XMLSignatureInput output = new XMLSignatureInput(decodedBytes); output.setSecureValidation(secureValidation); return output; } catch (ParserConfigurationException e) { throw new TransformationException("c14n.Canonicalizer.Exception",e); } catch (SAXException e) { throw new TransformationException("SAX exception", e); } } catch (Base64DecodingException e) { throw new TransformationException("Base64Decoding", e); } } void traverseElement(org.w3c.dom.Element node, StringBuilder sb) { Node sibling = node.getFirstChild(); while (sibling != null) { switch (sibling.getNodeType()) { case Node.ELEMENT_NODE: traverseElement((Element)sibling, sb); break; case Node.TEXT_NODE: sb.append(((Text)sibling).getData()); } sibling = sibling.getNextSibling(); } } } ././@LongLink0000000000000000000000000000020400000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14NExclusiveWithComments.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/Transfor0000644000175000017500000000706612234745521032622 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.transforms.implementations; import java.io.OutputStream; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.implementations.Canonicalizer20010315ExclWithComments; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.transforms.Transform; import org.apache.xml.security.transforms.TransformSpi; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.transforms.params.InclusiveNamespaces; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * Implements the http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments * transform. * * @author Christian Geuer-Pollmann */ public class TransformC14NExclusiveWithComments extends TransformSpi { /** Field implementedTransformURI */ public static final String implementedTransformURI = Transforms.TRANSFORM_C14N_EXCL_WITH_COMMENTS; /** * Method engineGetURI *@inheritDoc * */ protected String engineGetURI() { return implementedTransformURI; } protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, OutputStream os, Transform transformObject ) throws CanonicalizationException { try { String inclusiveNamespaces = null; if (transformObject.length( InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES) == 1 ) { Element inclusiveElement = XMLUtils.selectNode( transformObject.getElement().getFirstChild(), InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES, 0 ); inclusiveNamespaces = new InclusiveNamespaces( inclusiveElement, transformObject.getBaseURI() ).getInclusiveNamespaces(); } Canonicalizer20010315ExclWithComments c14n = new Canonicalizer20010315ExclWithComments(); c14n.setSecureValidation(secureValidation); if (os != null) { c14n.setWriter(os); } byte[] result = c14n.engineCanonicalize(input, inclusiveNamespaces); XMLSignatureInput output = new XMLSignatureInput(result); output.setSecureValidation(secureValidation); return output; } catch (XMLSecurityException ex) { throw new CanonicalizationException("empty", ex); } } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/TransformXSLT.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/Transfor0000644000175000017500000001544612234743735032630 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.transforms.implementations; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; import javax.xml.XMLConstants; import javax.xml.transform.Source; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.transforms.Transform; import org.apache.xml.security.transforms.TransformSpi; import org.apache.xml.security.transforms.TransformationException; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * Class TransformXSLT * * Implements the http://www.w3.org/TR/1999/REC-xslt-19991116 * transform. * * @author Christian Geuer-Pollmann */ public class TransformXSLT extends TransformSpi { /** Field implementedTransformURI */ public static final String implementedTransformURI = Transforms.TRANSFORM_XSLT; static final String XSLTSpecNS = "http://www.w3.org/1999/XSL/Transform"; static final String defaultXSLTSpecNSprefix = "xslt"; static final String XSLTSTYLESHEET = "stylesheet"; private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(TransformXSLT.class); /** * Method engineGetURI * * @inheritDoc */ protected String engineGetURI() { return implementedTransformURI; } protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, OutputStream baos, Transform transformObject ) throws IOException, TransformationException { try { Element transformElement = transformObject.getElement(); Element xsltElement = XMLUtils.selectNode(transformElement.getFirstChild(), XSLTSpecNS, "stylesheet", 0); if (xsltElement == null) { Object exArgs[] = { "xslt:stylesheet", "Transform" }; throw new TransformationException("xml.WrongContent", exArgs); } TransformerFactory tFactory = TransformerFactory.newInstance(); // Process XSLT stylesheets in a secure manner tFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE); /* * This transform requires an octet stream as input. If the actual * input is an XPath node-set, then the signature application should * attempt to convert it to octets (apply Canonical XML]) as described * in the Reference Processing Model (section 4.3.3.2). */ Source xmlSource = new StreamSource(new ByteArrayInputStream(input.getBytes())); Source stylesheet; /* * This complicated transformation of the stylesheet itself is necessary * because of the need to get the pure style sheet. If we simply say * Source stylesheet = new DOMSource(this.xsltElement); * whereby this.xsltElement is not the rootElement of the Document, * this causes problems; * so we convert the stylesheet to byte[] and use this as input stream */ { ByteArrayOutputStream os = new ByteArrayOutputStream(); Transformer transformer = tFactory.newTransformer(); DOMSource source = new DOMSource(xsltElement); StreamResult result = new StreamResult(os); transformer.transform(source, result); stylesheet = new StreamSource(new ByteArrayInputStream(os.toByteArray())); } Transformer transformer = tFactory.newTransformer(stylesheet); // Force Xalan to use \n as line separator on all OSes. This // avoids OS specific signature validation failures due to line // separator differences in the transformed output. Unfortunately, // this is not a standard JAXP property so will not work with non-Xalan // implementations. try { transformer.setOutputProperty("{http://xml.apache.org/xalan}line-separator", "\n"); } catch (Exception e) { log.warn("Unable to set Xalan line-separator property: " + e.getMessage()); } if (baos == null) { ByteArrayOutputStream baos1 = new ByteArrayOutputStream(); StreamResult outputTarget = new StreamResult(baos1); transformer.transform(xmlSource, outputTarget); XMLSignatureInput output = new XMLSignatureInput(baos1.toByteArray()); output.setSecureValidation(secureValidation); return output; } StreamResult outputTarget = new StreamResult(baos); transformer.transform(xmlSource, outputTarget); XMLSignatureInput output = new XMLSignatureInput((byte[])null); output.setSecureValidation(secureValidation); output.setOutputStream(baos); return output; } catch (XMLSecurityException ex) { Object exArgs[] = { ex.getMessage() }; throw new TransformationException("generic.EmptyMessage", exArgs, ex); } catch (TransformerConfigurationException ex) { Object exArgs[] = { ex.getMessage() }; throw new TransformationException("generic.EmptyMessage", exArgs, ex); } catch (TransformerException ex) { Object exArgs[] = { ex.getMessage() }; throw new TransformationException("generic.EmptyMessage", exArgs, ex); } } } ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/TransformXPointer.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/Transfor0000644000175000017500000000404211555760614032616 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.transforms.implementations; import java.io.OutputStream; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.transforms.Transform; import org.apache.xml.security.transforms.TransformSpi; import org.apache.xml.security.transforms.TransformationException; import org.apache.xml.security.transforms.Transforms; /** * Class TransformXPointer * * @author Christian Geuer-Pollmann */ public class TransformXPointer extends TransformSpi { /** Field implementedTransformURI */ public static final String implementedTransformURI = Transforms.TRANSFORM_XPOINTER; /** @inheritDoc */ protected String engineGetURI() { return implementedTransformURI; } /** * Method enginePerformTransform * * @param input * @return {@link XMLSignatureInput} as the result of transformation * @throws TransformationException */ protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, OutputStream os, Transform transformObject ) throws TransformationException { Object exArgs[] = { implementedTransformURI }; throw new TransformationException("signature.Transform.NotYetImplemented", exArgs); } } ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/TransformEnvelopedSignature.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/Transfor0000644000175000017500000001105511555760614032620 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.transforms.implementations; import java.io.OutputStream; import org.apache.xml.security.signature.NodeFilter; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.transforms.Transform; import org.apache.xml.security.transforms.TransformSpi; import org.apache.xml.security.transforms.TransformationException; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; import org.w3c.dom.Node; /** * Implements the http://www.w3.org/2000/09/xmldsig#enveloped-signature * transform. * * @author Christian Geuer-Pollmann */ public class TransformEnvelopedSignature extends TransformSpi { /** Field implementedTransformURI */ public static final String implementedTransformURI = Transforms.TRANSFORM_ENVELOPED_SIGNATURE; /** * Method engineGetURI * * @inheritDoc */ protected String engineGetURI() { return implementedTransformURI; } /** * @inheritDoc */ protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, OutputStream os, Transform transformObject ) throws TransformationException { /** * If the actual input is an octet stream, then the application MUST * convert the octet stream to an XPath node-set suitable for use by * Canonical XML with Comments. (A subsequent application of the * REQUIRED Canonical XML algorithm would strip away these comments.) * * ... * * The evaluation of this expression includes all of the document's nodes * (including comments) in the node-set representing the octet stream. */ Node signatureElement = transformObject.getElement(); signatureElement = searchSignatureElement(signatureElement); input.setExcludeNode(signatureElement); input.addNodeFilter(new EnvelopedNodeFilter(signatureElement)); return input; } /** * @param signatureElement * @return the node that is the signature * @throws TransformationException */ private static Node searchSignatureElement(Node signatureElement) throws TransformationException { boolean found = false; while (true) { if (signatureElement == null || signatureElement.getNodeType() == Node.DOCUMENT_NODE) { break; } Element el = (Element) signatureElement; if (el.getNamespaceURI().equals(Constants.SignatureSpecNS) && el.getLocalName().equals(Constants._TAG_SIGNATURE)) { found = true; break; } signatureElement = signatureElement.getParentNode(); } if (!found) { throw new TransformationException( "transform.envelopedSignatureTransformNotInSignatureElement"); } return signatureElement; } static class EnvelopedNodeFilter implements NodeFilter { Node exclude; EnvelopedNodeFilter(Node n) { exclude = n; } public int isNodeIncludeDO(Node n, int level) { if (n == exclude) { return -1; } return 1; } /** * @see org.apache.xml.security.signature.NodeFilter#isNodeInclude(org.w3c.dom.Node) */ public int isNodeInclude(Node n) { if (n == exclude || XMLUtils.isDescendantOrSelf(exclude, n)) { return -1; } return 1; //return !XMLUtils.isDescendantOrSelf(exclude,n); } } } ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14NWithComments.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/Transfor0000644000175000017500000000467412234745521032624 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.transforms.implementations; import java.io.OutputStream; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.implementations.Canonicalizer20010315WithComments; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.transforms.Transform; import org.apache.xml.security.transforms.TransformSpi; import org.apache.xml.security.transforms.Transforms; /** * Implements the http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments * transform. * * @author Christian Geuer-Pollmann */ public class TransformC14NWithComments extends TransformSpi { /** Field implementedTransformURI */ public static final String implementedTransformURI = Transforms.TRANSFORM_C14N_WITH_COMMENTS; /** @inheritDoc */ protected String engineGetURI() { return implementedTransformURI; } /** @inheritDoc */ protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, OutputStream os, Transform transformObject ) throws CanonicalizationException { Canonicalizer20010315WithComments c14n = new Canonicalizer20010315WithComments(); c14n.setSecureValidation(secureValidation); if (os != null) { c14n.setWriter(os); } byte[] result = null; result = c14n.engineCanonicalize(input); XMLSignatureInput output = new XMLSignatureInput(result); output.setSecureValidation(secureValidation); if (os != null) { output.setOutputStream(os); } return output; } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/FuncHere.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/FuncHere0000644000175000017500000001176211750472047032523 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.transforms.implementations; import javax.xml.transform.TransformerException; import org.apache.xml.dtm.DTM; import org.apache.xml.security.utils.I18n; import org.apache.xml.security.utils.XMLUtils; import org.apache.xpath.NodeSetDTM; import org.apache.xpath.XPathContext; import org.apache.xpath.functions.Function; import org.apache.xpath.objects.XNodeSet; import org.apache.xpath.objects.XObject; import org.apache.xpath.res.XPATHErrorResources; import org.w3c.dom.Document; import org.w3c.dom.Node; /** * The 'here()' function returns a node-set containing the attribute or * processing instruction node or the parent element of the text node * that directly bears the XPath expression. This expression results * in an error if the containing XPath expression does not appear in the * same XML document against which the XPath expression is being evaluated. * * Mainpart is stolen from FuncId.java * * This does crash under Xalan2.2.D7 and works under Xalan2.2.D9 * * To get this baby to work, a special trick has to be used. The function needs * access to the Node where the XPath expression has been defined. This is done * by constructing a {@link FuncHere} which has this Node as 'owner'. * * @see "http://www.w3.org/Signature/Drafts/xmldsig-core/Overview.html#function-here" */ public class FuncHere extends Function { /** * */ private static final long serialVersionUID = 1L; /** * The here function returns a node-set containing the attribute or * processing instruction node or the parent element of the text node * that directly bears the XPath expression. This expression results * in an error if the containing XPath expression does not appear in the * same XML document against which the XPath expression is being evaluated. * * @param xctxt * @return the xobject * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { Node xpathOwnerNode = (Node) xctxt.getOwnerObject(); if (xpathOwnerNode == null) { return null; } int xpathOwnerNodeDTM = xctxt.getDTMHandleFromNode(xpathOwnerNode); int currentNode = xctxt.getCurrentNode(); DTM dtm = xctxt.getDTM(currentNode); int docContext = dtm.getDocument(); if (DTM.NULL == docContext) { error(xctxt, XPATHErrorResources.ER_CONTEXT_HAS_NO_OWNERDOC, null); } { // check whether currentNode and the node containing the XPath expression // are in the same document Document currentDoc = XMLUtils.getOwnerDocument(dtm.getNode(currentNode)); Document xpathOwnerDoc = XMLUtils.getOwnerDocument(xpathOwnerNode); if (currentDoc != xpathOwnerDoc) { throw new TransformerException(I18n.translate("xpath.funcHere.documentsDiffer")); } } XNodeSet nodes = new XNodeSet(xctxt.getDTMManager()); NodeSetDTM nodeSet = nodes.mutableNodeset(); { int hereNode = DTM.NULL; switch (dtm.getNodeType(xpathOwnerNodeDTM)) { case Node.ATTRIBUTE_NODE : case Node.PROCESSING_INSTRUCTION_NODE : { // returns a node-set containing the attribute / processing instruction node hereNode = xpathOwnerNodeDTM; nodeSet.addNode(hereNode); break; } case Node.TEXT_NODE : { // returns a node-set containing the parent element of the // text node that directly bears the XPath expression hereNode = dtm.getParent(xpathOwnerNodeDTM); nodeSet.addNode(hereNode); break; } default : break; } } /** $todo$ Do I have to do this detach() call? */ nodeSet.detach(); return nodes; } /** * No arguments to process, so this does nothing. * @param vars * @param globalsSize */ public void fixupVariables(java.util.Vector vars, int globalsSize) { // do nothing } } ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/TransformC14NExclusive.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/implementations/Transfor0000644000175000017500000000700612234745521032614 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.transforms.implementations; import java.io.OutputStream; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.implementations.Canonicalizer20010315ExclOmitComments; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.transforms.Transform; import org.apache.xml.security.transforms.TransformSpi; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.transforms.params.InclusiveNamespaces; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * Class TransformC14NExclusive * */ public class TransformC14NExclusive extends TransformSpi { /** Field implementedTransformURI */ public static final String implementedTransformURI = Transforms.TRANSFORM_C14N_EXCL_OMIT_COMMENTS; /** * Method engineGetURI * * @inheritDoc */ protected String engineGetURI() { return implementedTransformURI; } protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, OutputStream os, Transform transformObject ) throws CanonicalizationException { try { String inclusiveNamespaces = null; if (transformObject.length( InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES) == 1 ) { Element inclusiveElement = XMLUtils.selectNode( transformObject.getElement().getFirstChild(), InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES, 0 ); inclusiveNamespaces = new InclusiveNamespaces( inclusiveElement, transformObject.getBaseURI()).getInclusiveNamespaces(); } Canonicalizer20010315ExclOmitComments c14n = new Canonicalizer20010315ExclOmitComments(); c14n.setSecureValidation(secureValidation); if (os != null) { c14n.setWriter(os); } byte[] result = c14n.engineCanonicalize(input, inclusiveNamespaces); XMLSignatureInput output = new XMLSignatureInput(result); output.setSecureValidation(secureValidation); if (os != null) { output.setOutputStream(os); } return output; } catch (XMLSecurityException ex) { throw new CanonicalizationException("empty", ex); } } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/Transforms.java0000644000175000017500000003042612234743735030673 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.transforms; import java.io.IOException; import java.io.OutputStream; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.c14n.InvalidCanonicalizerException; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.signature.XMLSignatureException; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.SignatureElementProxy; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.DOMException; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * Holder of the {@link org.apache.xml.security.transforms.Transform} steps to * be performed on the data. * The input to the first Transform is the result of dereferencing the * URI attribute of the Reference element. * The output from the last Transform is the input for the * DigestMethod algorithm * * @author Christian Geuer-Pollmann * @see Transform * @see org.apache.xml.security.signature.Reference */ public class Transforms extends SignatureElementProxy { /** Canonicalization - Required Canonical XML (omits comments) */ public static final String TRANSFORM_C14N_OMIT_COMMENTS = Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS; /** Canonicalization - Recommended Canonical XML with Comments */ public static final String TRANSFORM_C14N_WITH_COMMENTS = Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS; /** Canonicalization - Required Canonical XML 1.1 (omits comments) */ public static final String TRANSFORM_C14N11_OMIT_COMMENTS = Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS; /** Canonicalization - Recommended Canonical XML 1.1 with Comments */ public static final String TRANSFORM_C14N11_WITH_COMMENTS = Canonicalizer.ALGO_ID_C14N11_WITH_COMMENTS; /** Canonicalization - Required Exclusive Canonicalization (omits comments) */ public static final String TRANSFORM_C14N_EXCL_OMIT_COMMENTS = Canonicalizer.ALGO_ID_C14N_EXCL_OMIT_COMMENTS; /** Canonicalization - Recommended Exclusive Canonicalization with Comments */ public static final String TRANSFORM_C14N_EXCL_WITH_COMMENTS = Canonicalizer.ALGO_ID_C14N_EXCL_WITH_COMMENTS; /** Transform - Optional XSLT */ public static final String TRANSFORM_XSLT = "http://www.w3.org/TR/1999/REC-xslt-19991116"; /** Transform - Required base64 decoding */ public static final String TRANSFORM_BASE64_DECODE = Constants.SignatureSpecNS + "base64"; /** Transform - Recommended XPath */ public static final String TRANSFORM_XPATH = "http://www.w3.org/TR/1999/REC-xpath-19991116"; /** Transform - Required Enveloped Signature */ public static final String TRANSFORM_ENVELOPED_SIGNATURE = Constants.SignatureSpecNS + "enveloped-signature"; /** Transform - XPointer */ public static final String TRANSFORM_XPOINTER = "http://www.w3.org/TR/2001/WD-xptr-20010108"; /** Transform - XPath Filter */ public static final String TRANSFORM_XPATH2FILTER = "http://www.w3.org/2002/06/xmldsig-filter2"; /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Transforms.class); private Element[] transforms; protected Transforms() { }; private boolean secureValidation; /** * Constructs {@link Transforms}. * * @param doc the {@link Document} in which XMLSignature will * be placed */ public Transforms(Document doc) { super(doc); XMLUtils.addReturnToElement(this.constructionElement); } /** * Constructs {@link Transforms} from {@link Element} which is * Transforms Element * * @param element is Transforms element * @param BaseURI the URI where the XML instance was stored * @throws DOMException * @throws InvalidTransformException * @throws TransformationException * @throws XMLSecurityException * @throws XMLSignatureException */ public Transforms(Element element, String BaseURI) throws DOMException, XMLSignatureException, InvalidTransformException, TransformationException, XMLSecurityException { super(element, BaseURI); int numberOfTransformElems = this.getLength(); if (numberOfTransformElems == 0) { // At least one Transform element must be present. Bad. Object exArgs[] = { Constants._TAG_TRANSFORM, Constants._TAG_TRANSFORMS }; throw new TransformationException("xml.WrongContent", exArgs); } } /** * Set whether secure validation is enabled or not. The default is false. */ public void setSecureValidation(boolean secureValidation) { this.secureValidation = secureValidation; } /** * Adds the Transform with the specified Transform * algorithm URI * * @param transformURI the URI form of transform that indicates which * transformation is applied to data * @throws TransformationException */ public void addTransform(String transformURI) throws TransformationException { try { if (log.isDebugEnabled()) { log.debug("Transforms.addTransform(" + transformURI + ")"); } Transform transform = new Transform(this.doc, transformURI); this.addTransform(transform); } catch (InvalidTransformException ex) { throw new TransformationException("empty", ex); } } /** * Adds the Transform with the specified Transform * algorithm URI * * @param transformURI the URI form of transform that indicates which * transformation is applied to data * @param contextElement * @throws TransformationException */ public void addTransform(String transformURI, Element contextElement) throws TransformationException { try { if (log.isDebugEnabled()) { log.debug("Transforms.addTransform(" + transformURI + ")"); } Transform transform = new Transform(this.doc, transformURI, contextElement); this.addTransform(transform); } catch (InvalidTransformException ex) { throw new TransformationException("empty", ex); } } /** * Adds the Transform with the specified Transform * algorithm URI. * * @param transformURI the URI form of transform that indicates which * transformation is applied to data * @param contextNodes * @throws TransformationException */ public void addTransform(String transformURI, NodeList contextNodes) throws TransformationException { try { Transform transform = new Transform(this.doc, transformURI, contextNodes); this.addTransform(transform); } catch (InvalidTransformException ex) { throw new TransformationException("empty", ex); } } /** * Adds a user-provided Transform step. * * @param transform {@link Transform} object */ private void addTransform(Transform transform) { if (log.isDebugEnabled()) { log.debug("Transforms.addTransform(" + transform.getURI() + ")"); } Element transformElement = transform.getElement(); this.constructionElement.appendChild(transformElement); XMLUtils.addReturnToElement(this.constructionElement); } /** * Applies all included Transforms to xmlSignatureInput and * returns the result of these transformations. * * @param xmlSignatureInput the input for the Transforms * @return the result of the Transforms * @throws TransformationException */ public XMLSignatureInput performTransforms( XMLSignatureInput xmlSignatureInput ) throws TransformationException { return performTransforms(xmlSignatureInput, null); } /** * Applies all included Transforms to xmlSignatureInput and * returns the result of these transformations. * * @param xmlSignatureInput the input for the Transforms * @param os where to output the last transformation. * @return the result of the Transforms * @throws TransformationException */ public XMLSignatureInput performTransforms( XMLSignatureInput xmlSignatureInput, OutputStream os ) throws TransformationException { try { int last = this.getLength() - 1; for (int i = 0; i < last; i++) { Transform t = this.item(i); String uri = t.getURI(); if (log.isDebugEnabled()) { log.debug("Perform the (" + i + ")th " + uri + " transform"); } checkSecureValidation(t); xmlSignatureInput = t.performTransform(xmlSignatureInput); } if (last >= 0) { Transform t = this.item(last); checkSecureValidation(t); xmlSignatureInput = t.performTransform(xmlSignatureInput, os); } return xmlSignatureInput; } catch (IOException ex) { throw new TransformationException("empty", ex); } catch (CanonicalizationException ex) { throw new TransformationException("empty", ex); } catch (InvalidCanonicalizerException ex) { throw new TransformationException("empty", ex); } } private void checkSecureValidation(Transform transform) throws TransformationException { String uri = transform.getURI(); if (secureValidation && Transforms.TRANSFORM_XSLT.equals(uri)) { Object exArgs[] = { uri }; throw new TransformationException( "signature.Transform.ForbiddenTransform", exArgs ); } transform.setSecureValidation(secureValidation); } /** * Return the nonnegative number of transformations. * * @return the number of transformations */ public int getLength() { if (transforms == null) { transforms = XMLUtils.selectDsNodes(this.constructionElement.getFirstChild(), "Transform"); } return transforms.length; } /** * Return the ith {@link Transform}. * Valid i values are 0 to {@link #getLength}-1. * * @param i index of {@link Transform} to return * @return the ith Transform * @throws TransformationException */ public Transform item(int i) throws TransformationException { try { if (transforms == null) { transforms = XMLUtils.selectDsNodes(this.constructionElement.getFirstChild(), "Transform"); } return new Transform(transforms[i], this.baseURI); } catch (XMLSecurityException ex) { throw new TransformationException("empty", ex); } } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_TRANSFORMS; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/params/0000755000175000017500000000000012273503734027144 5ustar tonytony././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/params/XPath2FilterContainer04.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/params/XPath2FilterConta0000644000175000017500000002041711670122756032335 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.transforms.params; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.transforms.TransformParam; import org.apache.xml.security.utils.ElementProxy; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * Implements the parameters for the XPath Filter v2.0. * * @author $Author: coheigea $ * @see XPath Filter v2.0 (TR) */ public class XPath2FilterContainer04 extends ElementProxy implements TransformParam { /** Field _ATT_FILTER */ private static final String _ATT_FILTER = "Filter"; /** Field _ATT_FILTER_VALUE_INTERSECT */ private static final String _ATT_FILTER_VALUE_INTERSECT = "intersect"; /** Field _ATT_FILTER_VALUE_SUBTRACT */ private static final String _ATT_FILTER_VALUE_SUBTRACT = "subtract"; /** Field _ATT_FILTER_VALUE_UNION */ private static final String _ATT_FILTER_VALUE_UNION = "union"; /** Field _TAG_XPATH2 */ public static final String _TAG_XPATH2 = "XPath"; /** Field XPathFiler2NS */ public static final String XPathFilter2NS = "http://www.w3.org/2002/04/xmldsig-filter2"; /** * Constructor XPath2FilterContainer04 * */ private XPath2FilterContainer04() { // no instantiation } /** * Constructor XPath2FilterContainer04 * * @param doc * @param xpath2filter * @param filterType */ private XPath2FilterContainer04(Document doc, String xpath2filter, String filterType) { super(doc); this.constructionElement.setAttributeNS( null, XPath2FilterContainer04._ATT_FILTER, filterType); if ((xpath2filter.length() > 2) && (!Character.isWhitespace(xpath2filter.charAt(0)))) { XMLUtils.addReturnToElement(this.constructionElement); this.constructionElement.appendChild(doc.createTextNode(xpath2filter)); XMLUtils.addReturnToElement(this.constructionElement); } else { this.constructionElement.appendChild(doc.createTextNode(xpath2filter)); } } /** * Constructor XPath2FilterContainer04 * * @param element * @param BaseURI * @throws XMLSecurityException */ private XPath2FilterContainer04(Element element, String BaseURI) throws XMLSecurityException { super(element, BaseURI); String filterStr = this.constructionElement.getAttributeNS(null, XPath2FilterContainer04._ATT_FILTER); if (!filterStr.equals(XPath2FilterContainer04._ATT_FILTER_VALUE_INTERSECT) && !filterStr.equals(XPath2FilterContainer04._ATT_FILTER_VALUE_SUBTRACT) && !filterStr.equals(XPath2FilterContainer04._ATT_FILTER_VALUE_UNION)) { Object exArgs[] = { XPath2FilterContainer04._ATT_FILTER, filterStr, XPath2FilterContainer04._ATT_FILTER_VALUE_INTERSECT + ", " + XPath2FilterContainer04._ATT_FILTER_VALUE_SUBTRACT + " or " + XPath2FilterContainer04._ATT_FILTER_VALUE_UNION }; throw new XMLSecurityException("attributeValueIllegal", exArgs); } } /** * Creates a new XPath2FilterContainer04 with the filter type "intersect". * * @param doc * @param xpath2filter * @return the instance */ public static XPath2FilterContainer04 newInstanceIntersect( Document doc, String xpath2filter ) { return new XPath2FilterContainer04( doc, xpath2filter, XPath2FilterContainer04._ATT_FILTER_VALUE_INTERSECT); } /** * Creates a new XPath2FilterContainer04 with the filter type "subtract". * * @param doc * @param xpath2filter * @return the instance */ public static XPath2FilterContainer04 newInstanceSubtract( Document doc, String xpath2filter ) { return new XPath2FilterContainer04( doc, xpath2filter, XPath2FilterContainer04._ATT_FILTER_VALUE_SUBTRACT); } /** * Creates a new XPath2FilterContainer04 with the filter type "union". * * @param doc * @param xpath2filter * @return the instance */ public static XPath2FilterContainer04 newInstanceUnion( Document doc, String xpath2filter ) { return new XPath2FilterContainer04( doc, xpath2filter, XPath2FilterContainer04._ATT_FILTER_VALUE_UNION); } /** * Creates a XPath2FilterContainer04 from an existing Element; needed for verification. * * @param element * @param BaseURI * @return the instance * * @throws XMLSecurityException */ public static XPath2FilterContainer04 newInstance( Element element, String BaseURI ) throws XMLSecurityException { return new XPath2FilterContainer04(element, BaseURI); } /** * Returns true if the Filter attribute has value "intersect". * * @return true if the Filter attribute has value "intersect". */ public boolean isIntersect() { return this.constructionElement.getAttributeNS( null, XPath2FilterContainer04._ATT_FILTER ).equals(XPath2FilterContainer04._ATT_FILTER_VALUE_INTERSECT); } /** * Returns true if the Filter attribute has value "subtract". * * @return true if the Filter attribute has value "subtract". */ public boolean isSubtract() { return this.constructionElement.getAttributeNS( null, XPath2FilterContainer04._ATT_FILTER ).equals(XPath2FilterContainer04._ATT_FILTER_VALUE_SUBTRACT); } /** * Returns true if the Filter attribute has value "union". * * @return true if the Filter attribute has value "union". */ public boolean isUnion() { return this.constructionElement.getAttributeNS( null, XPath2FilterContainer04._ATT_FILTER ).equals(XPath2FilterContainer04._ATT_FILTER_VALUE_UNION); } /** * Returns the XPath 2 Filter String * * @return the XPath 2 Filter String */ public String getXPathFilterStr() { return this.getTextFromTextChild(); } /** * Returns the first Text node which contains information from the XPath 2 * Filter String. We must use this stupid hook to enable the here() function * to work. * * $todo$ I dunno whether this crashes: here()/ds:Signature[1] * @return the first Text node which contains information from the XPath 2 Filter String */ public Node getXPathFilterTextNode() { NodeList children = this.constructionElement.getChildNodes(); int length = children.getLength(); for (int i = 0; i < length; i++) { if (children.item(i).getNodeType() == Node.TEXT_NODE) { return children.item(i); } } return null; } /** @inheritDoc */ public final String getBaseLocalName() { return XPath2FilterContainer04._TAG_XPATH2; } /** @inheritDoc */ public final String getBaseNamespace() { return XPath2FilterContainer04.XPathFilter2NS; } } ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/params/InclusiveNamespaces.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/params/InclusiveNamespac0000644000175000017500000001170111602637164032500 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.transforms.params; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.transforms.TransformParam; import org.apache.xml.security.utils.ElementProxy; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * This Object serves as Content for the ds:Transforms for exclusive * Canonicalization. *
* It implements the {@link Element} interface * and can be used directly in a DOM tree. * * @author Christian Geuer-Pollmann */ public class InclusiveNamespaces extends ElementProxy implements TransformParam { /** Field _TAG_EC_INCLUSIVENAMESPACES */ public static final String _TAG_EC_INCLUSIVENAMESPACES = "InclusiveNamespaces"; /** Field _ATT_EC_PREFIXLIST */ public static final String _ATT_EC_PREFIXLIST = "PrefixList"; /** Field ExclusiveCanonicalizationNamespace */ public static final String ExclusiveCanonicalizationNamespace = "http://www.w3.org/2001/10/xml-exc-c14n#"; /** * Constructor XPathContainer * * @param doc * @param prefixList */ public InclusiveNamespaces(Document doc, String prefixList) { this(doc, InclusiveNamespaces.prefixStr2Set(prefixList)); } /** * Constructor InclusiveNamespaces * * @param doc * @param prefixes */ public InclusiveNamespaces(Document doc, Set prefixes) { super(doc); SortedSet prefixList = null; if (prefixes instanceof SortedSet) { prefixList = (SortedSet)prefixes; } else { prefixList = new TreeSet(prefixes); } StringBuilder sb = new StringBuilder(); for (String prefix : prefixList) { if (prefix.equals("xmlns")) { sb.append("#default "); } else { sb.append(prefix + " "); } } this.constructionElement.setAttributeNS( null, InclusiveNamespaces._ATT_EC_PREFIXLIST, sb.toString().trim()); } /** * Constructor InclusiveNamespaces * * @param element * @param BaseURI * @throws XMLSecurityException */ public InclusiveNamespaces(Element element, String BaseURI) throws XMLSecurityException { super(element, BaseURI); } /** * Method getInclusiveNamespaces * * @return The Inclusive Namespace string */ public String getInclusiveNamespaces() { return this.constructionElement.getAttributeNS(null, InclusiveNamespaces._ATT_EC_PREFIXLIST); } /** * Decodes the inclusiveNamespaces String and returns all * selected namespace prefixes as a Set. The #default * namespace token is represented as an empty namespace prefix * ("xmlns"). *
* The String inclusiveNamespaces=" xenc ds #default" * is returned as a Set containing the following Strings: *
    *
  • xmlns
  • *
  • xenc
  • *
  • ds
  • *
* * @param inclusiveNamespaces * @return A set to string */ public static SortedSet prefixStr2Set(String inclusiveNamespaces) { SortedSet prefixes = new TreeSet(); if ((inclusiveNamespaces == null) || (inclusiveNamespaces.length() == 0)) { return prefixes; } String[] tokens = inclusiveNamespaces.split("\\s"); for (String prefix : tokens) { if (prefix.equals("#default")) { prefixes.add("xmlns"); } else { prefixes.add(prefix); } } return prefixes; } /** * Method getBaseNamespace * * @inheritDoc */ public String getBaseNamespace() { return InclusiveNamespaces.ExclusiveCanonicalizationNamespace; } /** * Method getBaseLocalName * * @inheritDoc */ public String getBaseLocalName() { return InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES; } } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/params/XPath2FilterContainer.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/params/XPath2FilterConta0000644000175000017500000002261011670122756032332 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.transforms.params; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.transforms.TransformParam; import org.apache.xml.security.utils.ElementProxy; import org.apache.xml.security.utils.HelperNodeList; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * Implements the parameters for the XPath Filter v2.0. * * @author $Author: coheigea $ * @see XPath Filter v2.0 (TR) */ public class XPath2FilterContainer extends ElementProxy implements TransformParam { /** Field _ATT_FILTER */ private static final String _ATT_FILTER = "Filter"; /** Field _ATT_FILTER_VALUE_INTERSECT */ private static final String _ATT_FILTER_VALUE_INTERSECT = "intersect"; /** Field _ATT_FILTER_VALUE_SUBTRACT */ private static final String _ATT_FILTER_VALUE_SUBTRACT = "subtract"; /** Field _ATT_FILTER_VALUE_UNION */ private static final String _ATT_FILTER_VALUE_UNION = "union"; /** Field INTERSECT */ public static final String INTERSECT = XPath2FilterContainer._ATT_FILTER_VALUE_INTERSECT; /** Field SUBTRACT */ public static final String SUBTRACT = XPath2FilterContainer._ATT_FILTER_VALUE_SUBTRACT; /** Field UNION */ public static final String UNION = XPath2FilterContainer._ATT_FILTER_VALUE_UNION; /** Field _TAG_XPATH2 */ public static final String _TAG_XPATH2 = "XPath"; /** Field XPathFiler2NS */ public static final String XPathFilter2NS = "http://www.w3.org/2002/06/xmldsig-filter2"; /** * Constructor XPath2FilterContainer * */ private XPath2FilterContainer() { // no instantiation } /** * Constructor XPath2FilterContainer * * @param doc * @param xpath2filter * @param filterType */ private XPath2FilterContainer(Document doc, String xpath2filter, String filterType) { super(doc); this.constructionElement.setAttributeNS( null, XPath2FilterContainer._ATT_FILTER, filterType); this.constructionElement.appendChild(doc.createTextNode(xpath2filter)); } /** * Constructor XPath2FilterContainer * * @param element * @param BaseURI * @throws XMLSecurityException */ private XPath2FilterContainer(Element element, String BaseURI) throws XMLSecurityException { super(element, BaseURI); String filterStr = this.constructionElement.getAttributeNS(null, XPath2FilterContainer._ATT_FILTER); if (!filterStr.equals(XPath2FilterContainer._ATT_FILTER_VALUE_INTERSECT) && !filterStr.equals(XPath2FilterContainer._ATT_FILTER_VALUE_SUBTRACT) && !filterStr.equals(XPath2FilterContainer._ATT_FILTER_VALUE_UNION)) { Object exArgs[] = { XPath2FilterContainer._ATT_FILTER, filterStr, XPath2FilterContainer._ATT_FILTER_VALUE_INTERSECT + ", " + XPath2FilterContainer._ATT_FILTER_VALUE_SUBTRACT + " or " + XPath2FilterContainer._ATT_FILTER_VALUE_UNION }; throw new XMLSecurityException("attributeValueIllegal", exArgs); } } /** * Creates a new XPath2FilterContainer with the filter type "intersect". * * @param doc * @param xpath2filter * @return the filter. */ public static XPath2FilterContainer newInstanceIntersect( Document doc, String xpath2filter ) { return new XPath2FilterContainer( doc, xpath2filter, XPath2FilterContainer._ATT_FILTER_VALUE_INTERSECT); } /** * Creates a new XPath2FilterContainer with the filter type "subtract". * * @param doc * @param xpath2filter * @return the filter. */ public static XPath2FilterContainer newInstanceSubtract(Document doc, String xpath2filter) { return new XPath2FilterContainer( doc, xpath2filter, XPath2FilterContainer._ATT_FILTER_VALUE_SUBTRACT); } /** * Creates a new XPath2FilterContainer with the filter type "union". * * @param doc * @param xpath2filter * @return the filter */ public static XPath2FilterContainer newInstanceUnion(Document doc, String xpath2filter) { return new XPath2FilterContainer( doc, xpath2filter, XPath2FilterContainer._ATT_FILTER_VALUE_UNION); } /** * Method newInstances * * @param doc * @param params * @return the nodelist with the data */ public static NodeList newInstances(Document doc, String[][] params) { HelperNodeList nl = new HelperNodeList(); XMLUtils.addReturnToElement(doc, nl); for (int i = 0; i < params.length; i++) { String type = params[i][0]; String xpath = params[i][1]; if (!(type.equals(XPath2FilterContainer._ATT_FILTER_VALUE_INTERSECT) || type.equals(XPath2FilterContainer._ATT_FILTER_VALUE_SUBTRACT) || type.equals(XPath2FilterContainer._ATT_FILTER_VALUE_UNION))) { throw new IllegalArgumentException("The type(" + i + ")=\"" + type + "\" is illegal"); } XPath2FilterContainer c = new XPath2FilterContainer(doc, xpath, type); nl.appendChild(c.getElement()); XMLUtils.addReturnToElement(doc, nl); } return nl; } /** * Creates a XPath2FilterContainer from an existing Element; needed for verification. * * @param element * @param BaseURI * @return the filter * * @throws XMLSecurityException */ public static XPath2FilterContainer newInstance( Element element, String BaseURI ) throws XMLSecurityException { return new XPath2FilterContainer(element, BaseURI); } /** * Returns true if the Filter attribute has value "intersect". * * @return true if the Filter attribute has value "intersect". */ public boolean isIntersect() { return this.constructionElement.getAttributeNS( null, XPath2FilterContainer._ATT_FILTER ).equals(XPath2FilterContainer._ATT_FILTER_VALUE_INTERSECT); } /** * Returns true if the Filter attribute has value "subtract". * * @return true if the Filter attribute has value "subtract". */ public boolean isSubtract() { return this.constructionElement.getAttributeNS( null, XPath2FilterContainer._ATT_FILTER ).equals(XPath2FilterContainer._ATT_FILTER_VALUE_SUBTRACT); } /** * Returns true if the Filter attribute has value "union". * * @return true if the Filter attribute has value "union". */ public boolean isUnion() { return this.constructionElement.getAttributeNS( null, XPath2FilterContainer._ATT_FILTER ).equals(XPath2FilterContainer._ATT_FILTER_VALUE_UNION); } /** * Returns the XPath 2 Filter String * * @return the XPath 2 Filter String */ public String getXPathFilterStr() { return this.getTextFromTextChild(); } /** * Returns the first Text node which contains information from the XPath 2 * Filter String. We must use this stupid hook to enable the here() function * to work. * * $todo$ I dunno whether this crashes: here()/ds:Signature[1] * @return the first Text node which contains information from the XPath 2 Filter String */ public Node getXPathFilterTextNode() { NodeList children = this.constructionElement.getChildNodes(); int length = children.getLength(); for (int i = 0; i < length; i++) { if (children.item(i).getNodeType() == Node.TEXT_NODE) { return children.item(i); } } return null; } /** * Method getBaseLocalName * * @return the XPATH2 tag */ public final String getBaseLocalName() { return XPath2FilterContainer._TAG_XPATH2; } /** * Method getBaseNamespace * * @return XPATH2 tag namespace */ public final String getBaseNamespace() { return XPath2FilterContainer.XPathFilter2NS; } } ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/params/XPathFilterCHGPContainer.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/params/XPathFilterCHGPCo0000644000175000017500000002260511670122756032213 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.transforms.params; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.transforms.TransformParam; import org.apache.xml.security.utils.ElementProxy; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; /** * Implements the parameters for a custom Transform which has a better performance * than the xfilter2. * * @author $Author: coheigea $ */ public class XPathFilterCHGPContainer extends ElementProxy implements TransformParam { public static final String TRANSFORM_XPATHFILTERCHGP = "http://www.nue.et-inf.uni-siegen.de/~geuer-pollmann/#xpathFilter"; /** Field _ATT_FILTER_VALUE_INTERSECT */ private static final String _TAG_INCLUDE_BUT_SEARCH = "IncludeButSearch"; /** Field _ATT_FILTER_VALUE_SUBTRACT */ private static final String _TAG_EXCLUDE_BUT_SEARCH = "ExcludeButSearch"; /** Field _ATT_FILTER_VALUE_UNION */ private static final String _TAG_EXCLUDE = "Exclude"; /** Field _TAG_XPATHCHGP */ public static final String _TAG_XPATHCHGP = "XPathAlternative"; /** Field _ATT_INCLUDESLASH */ public static final String _ATT_INCLUDESLASH = "IncludeSlashPolicy"; /** Field IncludeSlash */ public static final boolean IncludeSlash = true; /** Field ExcludeSlash */ public static final boolean ExcludeSlash = false; /** * Constructor XPathFilterCHGPContainer * */ private XPathFilterCHGPContainer() { // no instantiation } /** * Constructor XPathFilterCHGPContainer * * @param doc * @param includeSlashPolicy * @param includeButSearch * @param excludeButSearch * @param exclude */ private XPathFilterCHGPContainer( Document doc, boolean includeSlashPolicy, String includeButSearch, String excludeButSearch, String exclude ) { super(doc); if (includeSlashPolicy) { this.constructionElement.setAttributeNS( null, XPathFilterCHGPContainer._ATT_INCLUDESLASH, "true" ); } else { this.constructionElement.setAttributeNS( null, XPathFilterCHGPContainer._ATT_INCLUDESLASH, "false" ); } if ((includeButSearch != null) && (includeButSearch.trim().length() > 0)) { Element includeButSearchElem = ElementProxy.createElementForFamily( doc, this.getBaseNamespace(), XPathFilterCHGPContainer._TAG_INCLUDE_BUT_SEARCH ); includeButSearchElem.appendChild( this.doc.createTextNode(indentXPathText(includeButSearch)) ); XMLUtils.addReturnToElement(this.constructionElement); this.constructionElement.appendChild(includeButSearchElem); } if ((excludeButSearch != null) && (excludeButSearch.trim().length() > 0)) { Element excludeButSearchElem = ElementProxy.createElementForFamily( doc, this.getBaseNamespace(), XPathFilterCHGPContainer._TAG_EXCLUDE_BUT_SEARCH ); excludeButSearchElem.appendChild( this.doc.createTextNode(indentXPathText(excludeButSearch))); XMLUtils.addReturnToElement(this.constructionElement); this.constructionElement.appendChild(excludeButSearchElem); } if ((exclude != null) && (exclude.trim().length() > 0)) { Element excludeElem = ElementProxy.createElementForFamily( doc, this.getBaseNamespace(), XPathFilterCHGPContainer._TAG_EXCLUDE); excludeElem.appendChild(this.doc.createTextNode(indentXPathText(exclude))); XMLUtils.addReturnToElement(this.constructionElement); this.constructionElement.appendChild(excludeElem); } XMLUtils.addReturnToElement(this.constructionElement); } /** * Method indentXPathText * * @param xp * @return the string with enters */ static String indentXPathText(String xp) { if ((xp.length() > 2) && (!Character.isWhitespace(xp.charAt(0)))) { return "\n" + xp + "\n"; } return xp; } /** * Constructor XPathFilterCHGPContainer * * @param element * @param BaseURI * @throws XMLSecurityException */ private XPathFilterCHGPContainer(Element element, String BaseURI) throws XMLSecurityException { super(element, BaseURI); } /** * Creates a new XPathFilterCHGPContainer; needed for generation. * * @param doc * @param includeSlashPolicy * @param includeButSearch * @param excludeButSearch * @param exclude * @return the created object */ public static XPathFilterCHGPContainer getInstance( Document doc, boolean includeSlashPolicy, String includeButSearch, String excludeButSearch, String exclude ) { return new XPathFilterCHGPContainer( doc, includeSlashPolicy, includeButSearch, excludeButSearch, exclude); } /** * Creates a XPathFilterCHGPContainer from an existing Element; needed for verification. * * @param element * @param BaseURI * * @throws XMLSecurityException * @return the created object. */ public static XPathFilterCHGPContainer getInstance( Element element, String BaseURI ) throws XMLSecurityException { return new XPathFilterCHGPContainer(element, BaseURI); } /** * Method getXStr * * @param type * @return The Xstr */ private String getXStr(String type) { if (this.length(this.getBaseNamespace(), type) != 1) { return ""; } Element xElem = XMLUtils.selectNode( this.constructionElement.getFirstChild(), this.getBaseNamespace(), type, 0 ); return XMLUtils.getFullTextChildrenFromElement(xElem); } /** * Method getIncludeButSearch * * @return the string */ public String getIncludeButSearch() { return this.getXStr(XPathFilterCHGPContainer._TAG_INCLUDE_BUT_SEARCH); } /** * Method getExcludeButSearch * * @return the string */ public String getExcludeButSearch() { return this.getXStr(XPathFilterCHGPContainer._TAG_EXCLUDE_BUT_SEARCH); } /** * Method getExclude * * @return the string */ public String getExclude() { return this.getXStr(XPathFilterCHGPContainer._TAG_EXCLUDE); } /** * Method getIncludeSlashPolicy * * @return the string */ public boolean getIncludeSlashPolicy() { return this.constructionElement.getAttributeNS( null, XPathFilterCHGPContainer._ATT_INCLUDESLASH).equals("true"); } /** * Returns the first Text node which contains information from the XPath * Filter String. We must use this stupid hook to enable the here() function * to work. * * $todo$ I dunno whether this crashes: here()/ds:Signature[1] * @param type * @return the first Text node which contains information from the XPath 2 Filter String */ private Node getHereContextNode(String type) { if (this.length(this.getBaseNamespace(), type) != 1) { return null; } return XMLUtils.selectNodeText( this.constructionElement.getFirstChild(), this.getBaseNamespace(), type, 0 ); } /** * Method getHereContextNodeIncludeButSearch * * @return the string */ public Node getHereContextNodeIncludeButSearch() { return this.getHereContextNode(XPathFilterCHGPContainer._TAG_INCLUDE_BUT_SEARCH); } /** * Method getHereContextNodeExcludeButSearch * * @return the string */ public Node getHereContextNodeExcludeButSearch() { return this.getHereContextNode(XPathFilterCHGPContainer._TAG_EXCLUDE_BUT_SEARCH); } /** * Method getHereContextNodeExclude * * @return the string */ public Node getHereContextNodeExclude() { return this.getHereContextNode(XPathFilterCHGPContainer._TAG_EXCLUDE); } /** * Method getBaseLocalName * * @inheritDoc */ public final String getBaseLocalName() { return XPathFilterCHGPContainer._TAG_XPATHCHGP; } /** * Method getBaseNamespace * * @inheritDoc */ public final String getBaseNamespace() { return TRANSFORM_XPATHFILTERCHGP; } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/params/XPathContainer.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/params/XPathContainer.ja0000644000175000017500000000467711555760614032371 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.transforms.params; import org.apache.xml.security.transforms.TransformParam; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.SignatureElementProxy; import org.w3c.dom.Document; import org.w3c.dom.NodeList; import org.w3c.dom.Text; /** * This Object serves both as namespace prefix resolver and as container for * the ds:XPath Element. It implements the {@link org.w3c.dom.Element} interface * and can be used directly in a DOM tree. * * @author Christian Geuer-Pollmann */ public class XPathContainer extends SignatureElementProxy implements TransformParam { /** * Constructor XPathContainer * * @param doc */ public XPathContainer(Document doc) { super(doc); } /** * Sets the TEXT value of the ds:XPath Element. * * @param xpath */ public void setXPath(String xpath) { if (this.constructionElement.getChildNodes() != null) { NodeList nl = this.constructionElement.getChildNodes(); for (int i = 0; i < nl.getLength(); i++) { this.constructionElement.removeChild(nl.item(i)); } } Text xpathText = this.doc.createTextNode(xpath); this.constructionElement.appendChild(xpathText); } /** * Returns the TEXT value of the ds:XPath Element. * * @return the TEXT value of the ds:XPath Element. */ public String getXPath() { return this.getTextFromTextChild(); } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_XPATH; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/Transform.java0000644000175000017500000003654312234743735030516 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.transforms; import java.io.IOException; import java.io.OutputStream; import java.util.concurrent.ConcurrentHashMap; import java.util.Map; import javax.xml.parsers.ParserConfigurationException; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.InvalidCanonicalizerException; import org.apache.xml.security.exceptions.AlgorithmAlreadyRegisteredException; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.transforms.implementations.TransformBase64Decode; import org.apache.xml.security.transforms.implementations.TransformC14N; import org.apache.xml.security.transforms.implementations.TransformC14N11; import org.apache.xml.security.transforms.implementations.TransformC14N11_WithComments; import org.apache.xml.security.transforms.implementations.TransformC14NExclusive; import org.apache.xml.security.transforms.implementations.TransformC14NExclusiveWithComments; import org.apache.xml.security.transforms.implementations.TransformC14NWithComments; import org.apache.xml.security.transforms.implementations.TransformEnvelopedSignature; import org.apache.xml.security.transforms.implementations.TransformXPath; import org.apache.xml.security.transforms.implementations.TransformXPath2Filter; import org.apache.xml.security.transforms.implementations.TransformXSLT; import org.apache.xml.security.utils.ClassLoaderUtils; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.HelperNodeList; import org.apache.xml.security.utils.SignatureElementProxy; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; import org.xml.sax.SAXException; /** * Implements the behaviour of the ds:Transform element. * * This Transform(Factory) class acts as the Factory and Proxy of * the implementing class that supports the functionality of a Transform * algorithm. * Implements the Factory and Proxy pattern for ds:Transform algorithms. * * @author Christian Geuer-Pollmann * @see Transforms * @see TransformSpi */ public final class Transform extends SignatureElementProxy { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Transform.class); /** All available Transform classes are registered here */ private static Map> transformSpiHash = new ConcurrentHashMap>(); private final TransformSpi transformSpi; private boolean secureValidation; /** * Generates a Transform object that implements the specified * Transform algorithm URI. * * @param doc the proxy {@link Document} * @param algorithmURI Transform algorithm URI representation, * such as specified in * Transform algorithm * @throws InvalidTransformException */ public Transform(Document doc, String algorithmURI) throws InvalidTransformException { this(doc, algorithmURI, (NodeList)null); } /** * Generates a Transform object that implements the specified * Transform algorithm URI. * * @param algorithmURI Transform algorithm URI representation, * such as specified in * Transform algorithm * @param contextChild the child element of Transform element * @param doc the proxy {@link Document} * @throws InvalidTransformException */ public Transform(Document doc, String algorithmURI, Element contextChild) throws InvalidTransformException { super(doc); HelperNodeList contextNodes = null; if (contextChild != null) { contextNodes = new HelperNodeList(); XMLUtils.addReturnToElement(doc, contextNodes); contextNodes.appendChild(contextChild); XMLUtils.addReturnToElement(doc, contextNodes); } transformSpi = initializeTransform(algorithmURI, contextNodes); } /** * Constructs {@link Transform} * * @param doc the {@link Document} in which Transform will be * placed * @param algorithmURI URI representation of Transform algorithm * @param contextNodes the child node list of Transform element * @throws InvalidTransformException */ public Transform(Document doc, String algorithmURI, NodeList contextNodes) throws InvalidTransformException { super(doc); transformSpi = initializeTransform(algorithmURI, contextNodes); } /** * @param element ds:Transform element * @param BaseURI the URI of the resource where the XML instance was stored * @throws InvalidTransformException * @throws TransformationException * @throws XMLSecurityException */ public Transform(Element element, String BaseURI) throws InvalidTransformException, TransformationException, XMLSecurityException { super(element, BaseURI); // retrieve Algorithm Attribute from ds:Transform String algorithmURI = element.getAttributeNS(null, Constants._ATT_ALGORITHM); if (algorithmURI == null || algorithmURI.length() == 0) { Object exArgs[] = { Constants._ATT_ALGORITHM, Constants._TAG_TRANSFORM }; throw new TransformationException("xml.WrongContent", exArgs); } Class transformSpiClass = transformSpiHash.get(algorithmURI); if (transformSpiClass == null) { Object exArgs[] = { algorithmURI }; throw new InvalidTransformException("signature.Transform.UnknownTransform", exArgs); } try { transformSpi = transformSpiClass.newInstance(); } catch (InstantiationException ex) { Object exArgs[] = { algorithmURI }; throw new InvalidTransformException( "signature.Transform.UnknownTransform", exArgs, ex ); } catch (IllegalAccessException ex) { Object exArgs[] = { algorithmURI }; throw new InvalidTransformException( "signature.Transform.UnknownTransform", exArgs, ex ); } } /** * Registers implementing class of the Transform algorithm with algorithmURI * * @param algorithmURI algorithmURI URI representation of Transform algorithm * @param implementingClass implementingClass the implementing * class of {@link TransformSpi} * @throws AlgorithmAlreadyRegisteredException if specified algorithmURI * is already registered */ @SuppressWarnings("unchecked") public static void register(String algorithmURI, String implementingClass) throws AlgorithmAlreadyRegisteredException, ClassNotFoundException, InvalidTransformException { // are we already registered? Class transformSpi = transformSpiHash.get(algorithmURI); if (transformSpi != null) { Object exArgs[] = { algorithmURI, transformSpi }; throw new AlgorithmAlreadyRegisteredException("algorithm.alreadyRegistered", exArgs); } Class transformSpiClass = (Class) ClassLoaderUtils.loadClass(implementingClass, Transform.class); transformSpiHash.put(algorithmURI, transformSpiClass); } /** * Registers implementing class of the Transform algorithm with algorithmURI * * @param algorithmURI algorithmURI URI representation of Transform algorithm * @param implementingClass implementingClass the implementing * class of {@link TransformSpi} * @throws AlgorithmAlreadyRegisteredException if specified algorithmURI * is already registered */ public static void register(String algorithmURI, Class implementingClass) throws AlgorithmAlreadyRegisteredException { // are we already registered? Class transformSpi = transformSpiHash.get(algorithmURI); if (transformSpi != null) { Object exArgs[] = { algorithmURI, transformSpi }; throw new AlgorithmAlreadyRegisteredException("algorithm.alreadyRegistered", exArgs); } transformSpiHash.put(algorithmURI, implementingClass); } /** * This method registers the default algorithms. */ public static void registerDefaultAlgorithms() { transformSpiHash.put( Transforms.TRANSFORM_BASE64_DECODE, TransformBase64Decode.class ); transformSpiHash.put( Transforms.TRANSFORM_C14N_OMIT_COMMENTS, TransformC14N.class ); transformSpiHash.put( Transforms.TRANSFORM_C14N_WITH_COMMENTS, TransformC14NWithComments.class ); transformSpiHash.put( Transforms.TRANSFORM_C14N11_OMIT_COMMENTS, TransformC14N11.class ); transformSpiHash.put( Transforms.TRANSFORM_C14N11_WITH_COMMENTS, TransformC14N11_WithComments.class ); transformSpiHash.put( Transforms.TRANSFORM_C14N_EXCL_OMIT_COMMENTS, TransformC14NExclusive.class ); transformSpiHash.put( Transforms.TRANSFORM_C14N_EXCL_WITH_COMMENTS, TransformC14NExclusiveWithComments.class ); transformSpiHash.put( Transforms.TRANSFORM_XPATH, TransformXPath.class ); transformSpiHash.put( Transforms.TRANSFORM_ENVELOPED_SIGNATURE, TransformEnvelopedSignature.class ); transformSpiHash.put( Transforms.TRANSFORM_XSLT, TransformXSLT.class ); transformSpiHash.put( Transforms.TRANSFORM_XPATH2FILTER, TransformXPath2Filter.class ); } /** * Returns the URI representation of Transformation algorithm * * @return the URI representation of Transformation algorithm */ public String getURI() { return this.constructionElement.getAttributeNS(null, Constants._ATT_ALGORITHM); } /** * Transforms the input, and generates {@link XMLSignatureInput} as output. * * @param input input {@link XMLSignatureInput} which can supplied Octet * Stream and NodeSet as Input of Transformation * @return the {@link XMLSignatureInput} class as the result of * transformation * @throws CanonicalizationException * @throws IOException * @throws InvalidCanonicalizerException * @throws TransformationException */ public XMLSignatureInput performTransform(XMLSignatureInput input) throws IOException, CanonicalizationException, InvalidCanonicalizerException, TransformationException { return performTransform(input, null); } /** * Transforms the input, and generates {@link XMLSignatureInput} as output. * * @param input input {@link XMLSignatureInput} which can supplied Octect * Stream and NodeSet as Input of Transformation * @param os where to output the result of the last transformation * @return the {@link XMLSignatureInput} class as the result of * transformation * @throws CanonicalizationException * @throws IOException * @throws InvalidCanonicalizerException * @throws TransformationException */ public XMLSignatureInput performTransform( XMLSignatureInput input, OutputStream os ) throws IOException, CanonicalizationException, InvalidCanonicalizerException, TransformationException { XMLSignatureInput result = null; try { transformSpi.secureValidation = secureValidation; result = transformSpi.enginePerformTransform(input, os, this); } catch (ParserConfigurationException ex) { Object exArgs[] = { this.getURI(), "ParserConfigurationException" }; throw new CanonicalizationException( "signature.Transform.ErrorDuringTransform", exArgs, ex); } catch (SAXException ex) { Object exArgs[] = { this.getURI(), "SAXException" }; throw new CanonicalizationException( "signature.Transform.ErrorDuringTransform", exArgs, ex); } return result; } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_TRANSFORM; } /** * Initialize the transform object. */ private TransformSpi initializeTransform(String algorithmURI, NodeList contextNodes) throws InvalidTransformException { this.constructionElement.setAttributeNS(null, Constants._ATT_ALGORITHM, algorithmURI); Class transformSpiClass = transformSpiHash.get(algorithmURI); if (transformSpiClass == null) { Object exArgs[] = { algorithmURI }; throw new InvalidTransformException("signature.Transform.UnknownTransform", exArgs); } TransformSpi newTransformSpi = null; try { newTransformSpi = transformSpiClass.newInstance(); } catch (InstantiationException ex) { Object exArgs[] = { algorithmURI }; throw new InvalidTransformException( "signature.Transform.UnknownTransform", exArgs, ex ); } catch (IllegalAccessException ex) { Object exArgs[] = { algorithmURI }; throw new InvalidTransformException( "signature.Transform.UnknownTransform", exArgs, ex ); } if (log.isDebugEnabled()) { log.debug("Create URI \"" + algorithmURI + "\" class \"" + newTransformSpi.getClass() + "\""); log.debug("The NodeList is " + contextNodes); } // give it to the current document if (contextNodes != null) { for (int i = 0; i < contextNodes.getLength(); i++) { this.constructionElement.appendChild(contextNodes.item(i).cloneNode(true)); } } return newTransformSpi; } public boolean isSecureValidation() { return secureValidation; } public void setSecureValidation(boolean secureValidation) { this.secureValidation = secureValidation; } } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/InvalidTransformException.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/transforms/InvalidTransformExceptio0000644000175000017500000000417711555760614032604 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.transforms; import org.apache.xml.security.exceptions.XMLSecurityException; /** * * @author Christian Geuer-Pollmann */ public class InvalidTransformException extends XMLSecurityException { /** * */ private static final long serialVersionUID = 1L; /** * Constructor InvalidTransformException * */ public InvalidTransformException() { super(); } /** * Constructor InvalidTransformException * * @param msgId */ public InvalidTransformException(String msgId) { super(msgId); } /** * Constructor InvalidTransformException * * @param msgId * @param exArgs */ public InvalidTransformException(String msgId, Object exArgs[]) { super(msgId, exArgs); } /** * Constructor InvalidTransformException * * @param msgId * @param originalException */ public InvalidTransformException(String msgId, Exception originalException) { super(msgId, originalException); } /** * Constructor InvalidTransformException * * @param msgId * @param exArgs * @param originalException */ public InvalidTransformException(String msgId, Object exArgs[], Exception originalException) { super(msgId, exArgs, originalException); } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/Init.java0000644000175000017500000003453412214624666025245 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security; import java.io.InputStream; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.ArrayList; import java.util.List; import javax.xml.parsers.DocumentBuilder; import org.apache.xml.security.algorithms.JCEMapper; import org.apache.xml.security.algorithms.SignatureAlgorithm; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.keys.keyresolver.KeyResolver; import org.apache.xml.security.transforms.Transform; import org.apache.xml.security.utils.ElementProxy; import org.apache.xml.security.utils.I18n; import org.apache.xml.security.utils.XMLUtils; import org.apache.xml.security.utils.resolver.ResourceResolver; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; /** * This class does the configuration of the library. This includes creating * the mapping of Canonicalization and Transform algorithms. Initialization is * done by calling {@link Init#init} which should be done in any static block * of the files of this library. We ensure that this call is only executed once. */ public class Init { /** The namespace for CONF file **/ public static final String CONF_NS = "http://www.xmlsecurity.org/NS/#configuration"; /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Init.class); /** Field alreadyInitialized */ private static boolean alreadyInitialized = false; /** * Method isInitialized * @return true if the library is already initialized. */ public static synchronized final boolean isInitialized() { return Init.alreadyInitialized; } /** * Method init * */ public static synchronized void init() { if (alreadyInitialized) { return; } InputStream is = AccessController.doPrivileged( new PrivilegedAction() { public InputStream run() { String cfile = System.getProperty("org.apache.xml.security.resource.config"); if (cfile == null) { return null; } return getClass().getResourceAsStream(cfile); } }); if (is == null) { dynamicInit(); } else { fileInit(is); } alreadyInitialized = true; } /** * Dynamically initialise the library by registering the default algorithms/implementations */ private static void dynamicInit() { // // Load the Resource Bundle - the default is the English resource bundle. // To load another resource bundle, call I18n.init(...) before calling this // method. // I18n.init("en", "US"); if (log.isDebugEnabled()) { log.debug("Registering default algorithms"); } try { // // Bind the default prefixes // ElementProxy.registerDefaultPrefixes(); // // Set the default Transforms // Transform.registerDefaultAlgorithms(); // // Set the default signature algorithms // SignatureAlgorithm.registerDefaultAlgorithms(); // // Set the default JCE algorithms // JCEMapper.registerDefaultAlgorithms(); // // Set the default c14n algorithms // Canonicalizer.registerDefaultAlgorithms(); // // Register the default resolvers // ResourceResolver.registerDefaultResolvers(); // // Register the default key resolvers // KeyResolver.registerDefaultResolvers(); } catch (Exception ex) { log.error(ex); ex.printStackTrace(); } } /** * Initialise the library from a configuration file */ private static void fileInit(InputStream is) { try { /* read library configuration file */ DocumentBuilder db = XMLUtils.createDocumentBuilder(false); Document doc = db.parse(is); Node config = doc.getFirstChild(); for (; config != null; config = config.getNextSibling()) { if ("Configuration".equals(config.getLocalName())) { break; } } if (config == null) { log.error("Error in reading configuration file - Configuration element not found"); return; } for (Node el = config.getFirstChild(); el != null; el = el.getNextSibling()) { if (Node.ELEMENT_NODE != el.getNodeType()) { continue; } String tag = el.getLocalName(); if (tag.equals("ResourceBundles")) { Element resource = (Element)el; /* configure internationalization */ Attr langAttr = resource.getAttributeNodeNS(null, "defaultLanguageCode"); Attr countryAttr = resource.getAttributeNodeNS(null, "defaultCountryCode"); String languageCode = (langAttr == null) ? null : langAttr.getNodeValue(); String countryCode = (countryAttr == null) ? null : countryAttr.getNodeValue(); I18n.init(languageCode, countryCode); } if (tag.equals("CanonicalizationMethods")) { Element[] list = XMLUtils.selectNodes(el.getFirstChild(), CONF_NS, "CanonicalizationMethod"); for (int i = 0; i < list.length; i++) { String uri = list[i].getAttributeNS(null, "URI"); String javaClass = list[i].getAttributeNS(null, "JAVACLASS"); try { Canonicalizer.register(uri, javaClass); if (log.isDebugEnabled()) { log.debug("Canonicalizer.register(" + uri + ", " + javaClass + ")"); } } catch (ClassNotFoundException e) { Object exArgs[] = { uri, javaClass }; log.error(I18n.translate("algorithm.classDoesNotExist", exArgs)); } } } if (tag.equals("TransformAlgorithms")) { Element[] tranElem = XMLUtils.selectNodes(el.getFirstChild(), CONF_NS, "TransformAlgorithm"); for (int i = 0; i < tranElem.length; i++) { String uri = tranElem[i].getAttributeNS(null, "URI"); String javaClass = tranElem[i].getAttributeNS(null, "JAVACLASS"); try { Transform.register(uri, javaClass); if (log.isDebugEnabled()) { log.debug("Transform.register(" + uri + ", " + javaClass + ")"); } } catch (ClassNotFoundException e) { Object exArgs[] = { uri, javaClass }; log.error(I18n.translate("algorithm.classDoesNotExist", exArgs)); } catch (NoClassDefFoundError ex) { log.warn("Not able to found dependencies for algorithm, I'll keep working."); } } } if ("JCEAlgorithmMappings".equals(tag)) { Node algorithmsNode = ((Element)el).getElementsByTagName("Algorithms").item(0); if (algorithmsNode != null) { Element[] algorithms = XMLUtils.selectNodes(algorithmsNode.getFirstChild(), CONF_NS, "Algorithm"); for (int i = 0; i < algorithms.length; i++) { Element element = algorithms[i]; String id = element.getAttributeNS(null, "URI"); JCEMapper.register(id, new JCEMapper.Algorithm(element)); } } } if (tag.equals("SignatureAlgorithms")) { Element[] sigElems = XMLUtils.selectNodes(el.getFirstChild(), CONF_NS, "SignatureAlgorithm"); for (int i = 0; i < sigElems.length; i++) { String uri = sigElems[i].getAttributeNS(null, "URI"); String javaClass = sigElems[i].getAttributeNS(null, "JAVACLASS"); /** $todo$ handle registering */ try { SignatureAlgorithm.register(uri, javaClass); if (log.isDebugEnabled()) { log.debug("SignatureAlgorithm.register(" + uri + ", " + javaClass + ")"); } } catch (ClassNotFoundException e) { Object exArgs[] = { uri, javaClass }; log.error(I18n.translate("algorithm.classDoesNotExist", exArgs)); } } } if (tag.equals("ResourceResolvers")) { Element[]resolverElem = XMLUtils.selectNodes(el.getFirstChild(), CONF_NS, "Resolver"); for (int i = 0; i < resolverElem.length; i++) { String javaClass = resolverElem[i].getAttributeNS(null, "JAVACLASS"); String description = resolverElem[i].getAttributeNS(null, "DESCRIPTION"); if ((description != null) && (description.length() > 0)) { if (log.isDebugEnabled()) { log.debug("Register Resolver: " + javaClass + ": " + description); } } else { if (log.isDebugEnabled()) { log.debug("Register Resolver: " + javaClass + ": For unknown purposes"); } } try { ResourceResolver.register(javaClass); } catch (Throwable e) { log.warn( "Cannot register:" + javaClass + " perhaps some needed jars are not installed", e ); } } } if (tag.equals("KeyResolver")){ Element[] resolverElem = XMLUtils.selectNodes(el.getFirstChild(), CONF_NS, "Resolver"); List classNames = new ArrayList(resolverElem.length); for (int i = 0; i < resolverElem.length; i++) { String javaClass = resolverElem[i].getAttributeNS(null, "JAVACLASS"); String description = resolverElem[i].getAttributeNS(null, "DESCRIPTION"); if ((description != null) && (description.length() > 0)) { if (log.isDebugEnabled()) { log.debug("Register Resolver: " + javaClass + ": " + description); } } else { if (log.isDebugEnabled()) { log.debug("Register Resolver: " + javaClass + ": For unknown purposes"); } } classNames.add(javaClass); } KeyResolver.registerClassNames(classNames); } if (tag.equals("PrefixMappings")){ if (log.isDebugEnabled()) { log.debug("Now I try to bind prefixes:"); } Element[] nl = XMLUtils.selectNodes(el.getFirstChild(), CONF_NS, "PrefixMapping"); for (int i = 0; i < nl.length; i++) { String namespace = nl[i].getAttributeNS(null, "namespace"); String prefix = nl[i].getAttributeNS(null, "prefix"); if (log.isDebugEnabled()) { log.debug("Now I try to bind " + prefix + " to " + namespace); } ElementProxy.setDefaultPrefix(namespace, prefix); } } } } catch (Exception e) { log.error("Bad: ", e); e.printStackTrace(); } } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/0000755000175000017500000000000012273503734025464 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/package.html0000644000175000017500000000012007533712503027735 0ustar tonytony

XML Signature specific classes.

libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/XMLSignature.java0000644000175000017500000010077412233525734030662 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.signature; import java.io.IOException; import java.io.OutputStream; import java.security.Key; import java.security.PublicKey; import java.security.cert.X509Certificate; import javax.crypto.SecretKey; import org.apache.xml.security.algorithms.SignatureAlgorithm; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.c14n.InvalidCanonicalizerException; import org.apache.xml.security.exceptions.Base64DecodingException; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.keys.content.X509Data; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.utils.Base64; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.I18n; import org.apache.xml.security.utils.SignatureElementProxy; import org.apache.xml.security.utils.SignerOutputStream; import org.apache.xml.security.utils.UnsyncBufferedOutputStream; import org.apache.xml.security.utils.XMLUtils; import org.apache.xml.security.utils.resolver.ResourceResolver; import org.apache.xml.security.utils.resolver.ResourceResolverSpi; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.w3c.dom.Text; /** * Handles <ds:Signature> elements. * This is the main class that deals with creating and verifying signatures. * *

There are 2 types of constructors for this class. The ones that take a * document, baseURI and 1 or more Java Objects. This is mostly used for * signing purposes. * The other constructor is the one that takes a DOM Element and a baseURI. * This is used mostly with for verifying, when you have a SignatureElement. * * There are a few different types of methods: *

  • The addDocument* methods are used to add References with optional * transforms during signing.
  • *
  • addKeyInfo* methods are to add Certificates and Keys to the * KeyInfo tags during signing.
  • *
  • appendObject allows a user to add any XML Structure as an * ObjectContainer during signing.
  • *
  • sign and checkSignatureValue methods are used to sign and validate the * signature.
*/ public final class XMLSignature extends SignatureElementProxy { /** MAC - Required HMAC-SHA1 */ public static final String ALGO_ID_MAC_HMAC_SHA1 = Constants.SignatureSpecNS + "hmac-sha1"; /** Signature - Required DSAwithSHA1 (DSS) */ public static final String ALGO_ID_SIGNATURE_DSA = Constants.SignatureSpecNS + "dsa-sha1"; /** Signature - Recommended RSAwithSHA1 */ public static final String ALGO_ID_SIGNATURE_RSA = Constants.SignatureSpecNS + "rsa-sha1"; /** Signature - Recommended RSAwithSHA1 */ public static final String ALGO_ID_SIGNATURE_RSA_SHA1 = Constants.SignatureSpecNS + "rsa-sha1"; /** Signature - NOT Recommended RSAwithMD5 */ public static final String ALGO_ID_SIGNATURE_NOT_RECOMMENDED_RSA_MD5 = Constants.MoreAlgorithmsSpecNS + "rsa-md5"; /** Signature - Optional RSAwithRIPEMD160 */ public static final String ALGO_ID_SIGNATURE_RSA_RIPEMD160 = Constants.MoreAlgorithmsSpecNS + "rsa-ripemd160"; /** Signature - Optional RSAwithSHA256 */ public static final String ALGO_ID_SIGNATURE_RSA_SHA256 = Constants.MoreAlgorithmsSpecNS + "rsa-sha256"; /** Signature - Optional RSAwithSHA384 */ public static final String ALGO_ID_SIGNATURE_RSA_SHA384 = Constants.MoreAlgorithmsSpecNS + "rsa-sha384"; /** Signature - Optional RSAwithSHA512 */ public static final String ALGO_ID_SIGNATURE_RSA_SHA512 = Constants.MoreAlgorithmsSpecNS + "rsa-sha512"; /** HMAC - NOT Recommended HMAC-MD5 */ public static final String ALGO_ID_MAC_HMAC_NOT_RECOMMENDED_MD5 = Constants.MoreAlgorithmsSpecNS + "hmac-md5"; /** HMAC - Optional HMAC-RIPEMD160 */ public static final String ALGO_ID_MAC_HMAC_RIPEMD160 = Constants.MoreAlgorithmsSpecNS + "hmac-ripemd160"; /** HMAC - Optional HMAC-SHA256 */ public static final String ALGO_ID_MAC_HMAC_SHA256 = Constants.MoreAlgorithmsSpecNS + "hmac-sha256"; /** HMAC - Optional HMAC-SHA284 */ public static final String ALGO_ID_MAC_HMAC_SHA384 = Constants.MoreAlgorithmsSpecNS + "hmac-sha384"; /** HMAC - Optional HMAC-SHA512 */ public static final String ALGO_ID_MAC_HMAC_SHA512 = Constants.MoreAlgorithmsSpecNS + "hmac-sha512"; /**Signature - Optional ECDSAwithSHA1 */ public static final String ALGO_ID_SIGNATURE_ECDSA_SHA1 = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"; /**Signature - Optional ECDSAwithSHA256 */ public static final String ALGO_ID_SIGNATURE_ECDSA_SHA256 = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"; /**Signature - Optional ECDSAwithSHA384 */ public static final String ALGO_ID_SIGNATURE_ECDSA_SHA384 = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384"; /**Signature - Optional ECDSAwithSHA512 */ public static final String ALGO_ID_SIGNATURE_ECDSA_SHA512 = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512"; /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(XMLSignature.class); /** ds:Signature.ds:SignedInfo element */ private SignedInfo signedInfo; /** ds:Signature.ds:KeyInfo */ private KeyInfo keyInfo; /** * Checking the digests in References in a Signature are mandatory, but for * References inside a Manifest it is application specific. This boolean is * to indicate that the References inside Manifests should be validated. */ private boolean followManifestsDuringValidation = false; private Element signatureValueElement; private static final int MODE_SIGN = 0; private static final int MODE_VERIFY = 1; private int state = MODE_SIGN; /** * This creates a new ds:Signature Element and adds an empty * ds:SignedInfo. * The ds:SignedInfo is initialized with the specified Signature * algorithm and Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS which is REQUIRED * by the spec. This method's main use is for creating a new signature. * * @param doc Document in which the signature will be appended after creation. * @param baseURI URI to be used as context for all relative URIs. * @param signatureMethodURI signature algorithm to use. * @throws XMLSecurityException */ public XMLSignature(Document doc, String baseURI, String signatureMethodURI) throws XMLSecurityException { this(doc, baseURI, signatureMethodURI, 0, Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS); } /** * Constructor XMLSignature * * @param doc * @param baseURI * @param signatureMethodURI the Signature method to be used. * @param hmacOutputLength * @throws XMLSecurityException */ public XMLSignature(Document doc, String baseURI, String signatureMethodURI, int hmacOutputLength) throws XMLSecurityException { this( doc, baseURI, signatureMethodURI, hmacOutputLength, Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS ); } /** * Constructor XMLSignature * * @param doc * @param baseURI * @param signatureMethodURI the Signature method to be used. * @param canonicalizationMethodURI the canonicalization algorithm to be * used to c14nize the SignedInfo element. * @throws XMLSecurityException */ public XMLSignature( Document doc, String baseURI, String signatureMethodURI, String canonicalizationMethodURI ) throws XMLSecurityException { this(doc, baseURI, signatureMethodURI, 0, canonicalizationMethodURI); } /** * Constructor XMLSignature * * @param doc * @param baseURI * @param signatureMethodURI * @param hmacOutputLength * @param canonicalizationMethodURI * @throws XMLSecurityException */ public XMLSignature( Document doc, String baseURI, String signatureMethodURI, int hmacOutputLength, String canonicalizationMethodURI ) throws XMLSecurityException { super(doc); String xmlnsDsPrefix = getDefaultPrefix(Constants.SignatureSpecNS); if (xmlnsDsPrefix == null || xmlnsDsPrefix.length() == 0) { this.constructionElement.setAttributeNS( Constants.NamespaceSpecNS, "xmlns", Constants.SignatureSpecNS ); } else { this.constructionElement.setAttributeNS( Constants.NamespaceSpecNS, "xmlns:" + xmlnsDsPrefix, Constants.SignatureSpecNS ); } XMLUtils.addReturnToElement(this.constructionElement); this.baseURI = baseURI; this.signedInfo = new SignedInfo( this.doc, signatureMethodURI, hmacOutputLength, canonicalizationMethodURI ); this.constructionElement.appendChild(this.signedInfo.getElement()); XMLUtils.addReturnToElement(this.constructionElement); // create an empty SignatureValue; this is filled by setSignatureValueElement signatureValueElement = XMLUtils.createElementInSignatureSpace(this.doc, Constants._TAG_SIGNATUREVALUE); this.constructionElement.appendChild(signatureValueElement); XMLUtils.addReturnToElement(this.constructionElement); } /** * Creates a XMLSignature in a Document * @param doc * @param baseURI * @param SignatureMethodElem * @param CanonicalizationMethodElem * @throws XMLSecurityException */ public XMLSignature( Document doc, String baseURI, Element SignatureMethodElem, Element CanonicalizationMethodElem ) throws XMLSecurityException { super(doc); String xmlnsDsPrefix = getDefaultPrefix(Constants.SignatureSpecNS); if (xmlnsDsPrefix == null || xmlnsDsPrefix.length() == 0) { this.constructionElement.setAttributeNS( Constants.NamespaceSpecNS, "xmlns", Constants.SignatureSpecNS ); } else { this.constructionElement.setAttributeNS( Constants.NamespaceSpecNS, "xmlns:" + xmlnsDsPrefix, Constants.SignatureSpecNS ); } XMLUtils.addReturnToElement(this.constructionElement); this.baseURI = baseURI; this.signedInfo = new SignedInfo(this.doc, SignatureMethodElem, CanonicalizationMethodElem); this.constructionElement.appendChild(this.signedInfo.getElement()); XMLUtils.addReturnToElement(this.constructionElement); // create an empty SignatureValue; this is filled by setSignatureValueElement signatureValueElement = XMLUtils.createElementInSignatureSpace(this.doc, Constants._TAG_SIGNATUREVALUE); this.constructionElement.appendChild(signatureValueElement); XMLUtils.addReturnToElement(this.constructionElement); } /** * This will parse the element and construct the Java Objects. * That will allow a user to validate the signature. * * @param element ds:Signature element that contains the whole signature * @param baseURI URI to be prepended to all relative URIs * @throws XMLSecurityException * @throws XMLSignatureException if the signature is badly formatted */ public XMLSignature(Element element, String baseURI) throws XMLSignatureException, XMLSecurityException { this(element, baseURI, false); } /** * This will parse the element and construct the Java Objects. * That will allow a user to validate the signature. * * @param element ds:Signature element that contains the whole signature * @param baseURI URI to be prepended to all relative URIs * @param secureValidation whether secure secureValidation is enabled or not * @throws XMLSecurityException * @throws XMLSignatureException if the signature is badly formatted */ public XMLSignature(Element element, String baseURI, boolean secureValidation) throws XMLSignatureException, XMLSecurityException { super(element, baseURI); // check out SignedInfo child Element signedInfoElem = XMLUtils.getNextElement(element.getFirstChild()); // check to see if it is there if (signedInfoElem == null) { Object exArgs[] = { Constants._TAG_SIGNEDINFO, Constants._TAG_SIGNATURE }; throw new XMLSignatureException("xml.WrongContent", exArgs); } // create a SignedInfo object from that element this.signedInfo = new SignedInfo(signedInfoElem, baseURI, secureValidation); // get signedInfoElem again in case it has changed signedInfoElem = XMLUtils.getNextElement(element.getFirstChild()); // check out SignatureValue child this.signatureValueElement = XMLUtils.getNextElement(signedInfoElem.getNextSibling()); // check to see if it exists if (signatureValueElement == null) { Object exArgs[] = { Constants._TAG_SIGNATUREVALUE, Constants._TAG_SIGNATURE }; throw new XMLSignatureException("xml.WrongContent", exArgs); } Attr signatureValueAttr = signatureValueElement.getAttributeNodeNS(null, "Id"); if (signatureValueAttr != null) { signatureValueElement.setIdAttributeNode(signatureValueAttr, true); } // Element keyInfoElem = XMLUtils.getNextElement(signatureValueElement.getNextSibling()); // If it exists use it, but it's not mandatory if (keyInfoElem != null && Constants.SignatureSpecNS.equals(keyInfoElem.getNamespaceURI()) && Constants._TAG_KEYINFO.equals(keyInfoElem.getLocalName())) { this.keyInfo = new KeyInfo(keyInfoElem, baseURI); this.keyInfo.setSecureValidation(secureValidation); } // Element objectElem = XMLUtils.getNextElement(signatureValueElement.getNextSibling()); while (objectElem != null) { Attr objectAttr = objectElem.getAttributeNodeNS(null, "Id"); if (objectAttr != null) { objectElem.setIdAttributeNode(objectAttr, true); } NodeList nodes = objectElem.getChildNodes(); int length = nodes.getLength(); // Register Ids of the Object child elements for (int i = 0; i < length; i++) { Node child = nodes.item(i); if (child.getNodeType() == Node.ELEMENT_NODE) { Element childElem = (Element)child; String tag = childElem.getLocalName(); if (tag.equals("Manifest")) { new Manifest(childElem, baseURI); } else if (tag.equals("SignatureProperties")) { new SignatureProperties(childElem, baseURI); } } } objectElem = XMLUtils.getNextElement(objectElem.getNextSibling()); } this.state = MODE_VERIFY; } /** * Sets the Id attribute * * @param id Id value for the id attribute on the Signature Element */ public void setId(String id) { if (id != null) { this.constructionElement.setAttributeNS(null, Constants._ATT_ID, id); this.constructionElement.setIdAttributeNS(null, Constants._ATT_ID, true); } } /** * Returns the Id attribute * * @return the Id attribute */ public String getId() { return this.constructionElement.getAttributeNS(null, Constants._ATT_ID); } /** * Returns the completely parsed SignedInfo object. * * @return the completely parsed SignedInfo object. */ public SignedInfo getSignedInfo() { return this.signedInfo; } /** * Returns the octet value of the SignatureValue element. * Throws an XMLSignatureException if it has no or wrong content. * * @return the value of the SignatureValue element. * @throws XMLSignatureException If there is no content */ public byte[] getSignatureValue() throws XMLSignatureException { try { return Base64.decode(signatureValueElement); } catch (Base64DecodingException ex) { throw new XMLSignatureException("empty", ex); } } /** * Base64 encodes and sets the bytes as the content of the SignatureValue * Node. * * @param bytes bytes to be used by SignatureValue before Base64 encoding */ private void setSignatureValueElement(byte[] bytes) { while (signatureValueElement.hasChildNodes()) { signatureValueElement.removeChild(signatureValueElement.getFirstChild()); } String base64codedValue = Base64.encode(bytes); if (base64codedValue.length() > 76 && !XMLUtils.ignoreLineBreaks()) { base64codedValue = "\n" + base64codedValue + "\n"; } Text t = this.doc.createTextNode(base64codedValue); signatureValueElement.appendChild(t); } /** * Returns the KeyInfo child. If we are in signing mode and the KeyInfo * does not exist yet, it is created on demand and added to the Signature. *
* This allows to add arbitrary content to the KeyInfo during signing. * * @return the KeyInfo object */ public KeyInfo getKeyInfo() { // check to see if we are signing and if we have to create a keyinfo if (this.state == MODE_SIGN && this.keyInfo == null) { // create the KeyInfo this.keyInfo = new KeyInfo(this.doc); // get the Element from KeyInfo Element keyInfoElement = this.keyInfo.getElement(); Element firstObject = XMLUtils.selectDsNode( this.constructionElement.getFirstChild(), Constants._TAG_OBJECT, 0 ); if (firstObject != null) { // add it before the object this.constructionElement.insertBefore(keyInfoElement, firstObject); XMLUtils.addReturnBeforeChild(this.constructionElement, firstObject); } else { // add it as the last element to the signature this.constructionElement.appendChild(keyInfoElement); XMLUtils.addReturnToElement(this.constructionElement); } } return this.keyInfo; } /** * Appends an Object (not a java.lang.Object but an Object * element) to the Signature. Please note that this is only possible * when signing. * * @param object ds:Object to be appended. * @throws XMLSignatureException When this object is used to verify. */ public void appendObject(ObjectContainer object) throws XMLSignatureException { //try { //if (this.state != MODE_SIGN) { // throw new XMLSignatureException( // "signature.operationOnlyBeforeSign"); //} this.constructionElement.appendChild(object.getElement()); XMLUtils.addReturnToElement(this.constructionElement); //} catch (XMLSecurityException ex) { // throw new XMLSignatureException("empty", ex); //} } /** * Returns the ith ds:Object child of the signature * or null if no such ds:Object element exists. * * @param i * @return the ith ds:Object child of the signature * or null if no such ds:Object element exists. */ public ObjectContainer getObjectItem(int i) { Element objElem = XMLUtils.selectDsNode( this.constructionElement.getFirstChild(), Constants._TAG_OBJECT, i ); try { return new ObjectContainer(objElem, this.baseURI); } catch (XMLSecurityException ex) { return null; } } /** * Returns the number of all ds:Object elements. * * @return the number of all ds:Object elements. */ public int getObjectLength() { return this.length(Constants.SignatureSpecNS, Constants._TAG_OBJECT); } /** * Digests all References in the SignedInfo, calculates the signature value * and sets it in the SignatureValue Element. * * @param signingKey the {@link java.security.PrivateKey} or * {@link javax.crypto.SecretKey} that is used to sign. * @throws XMLSignatureException */ public void sign(Key signingKey) throws XMLSignatureException { if (signingKey instanceof PublicKey) { throw new IllegalArgumentException( I18n.translate("algorithms.operationOnlyVerification") ); } try { //Create a SignatureAlgorithm object SignedInfo si = this.getSignedInfo(); SignatureAlgorithm sa = si.getSignatureAlgorithm(); OutputStream so = null; try { // initialize SignatureAlgorithm for signing sa.initSign(signingKey); // generate digest values for all References in this SignedInfo si.generateDigestValues(); so = new UnsyncBufferedOutputStream(new SignerOutputStream(sa)); // get the canonicalized bytes from SignedInfo si.signInOctetStream(so); } catch (XMLSecurityException ex) { throw ex; } finally { if (so != null) { try { so.close(); } catch (IOException ex) { if (log.isDebugEnabled()) { log.debug(ex); } } } } // set them on the SignatureValue element this.setSignatureValueElement(sa.sign()); } catch (XMLSignatureException ex) { throw ex; } catch (CanonicalizationException ex) { throw new XMLSignatureException("empty", ex); } catch (InvalidCanonicalizerException ex) { throw new XMLSignatureException("empty", ex); } catch (XMLSecurityException ex) { throw new XMLSignatureException("empty", ex); } } /** * Adds a {@link ResourceResolver} to enable the retrieval of resources. * * @param resolver */ public void addResourceResolver(ResourceResolver resolver) { this.getSignedInfo().addResourceResolver(resolver); } /** * Adds a {@link ResourceResolverSpi} to enable the retrieval of resources. * * @param resolver */ public void addResourceResolver(ResourceResolverSpi resolver) { this.getSignedInfo().addResourceResolver(resolver); } /** * Extracts the public key from the certificate and verifies if the signature * is valid by re-digesting all References, comparing those against the * stored DigestValues and then checking to see if the Signatures match on * the SignedInfo. * * @param cert Certificate that contains the public key part of the keypair * that was used to sign. * @return true if the signature is valid, false otherwise * @throws XMLSignatureException */ public boolean checkSignatureValue(X509Certificate cert) throws XMLSignatureException { // see if cert is null if (cert != null) { // check the values with the public key from the cert return this.checkSignatureValue(cert.getPublicKey()); } Object exArgs[] = { "Didn't get a certificate" }; throw new XMLSignatureException("empty", exArgs); } /** * Verifies if the signature is valid by redigesting all References, * comparing those against the stored DigestValues and then checking to see * if the Signatures match on the SignedInfo. * * @param pk {@link java.security.PublicKey} part of the keypair or * {@link javax.crypto.SecretKey} that was used to sign * @return true if the signature is valid, false otherwise * @throws XMLSignatureException */ public boolean checkSignatureValue(Key pk) throws XMLSignatureException { //COMMENT: pk suggests it can only be a public key? //check to see if the key is not null if (pk == null) { Object exArgs[] = { "Didn't get a key" }; throw new XMLSignatureException("empty", exArgs); } // all references inside the signedinfo need to be dereferenced and // digested again to see if the outcome matches the stored value in the // SignedInfo. // If followManifestsDuringValidation is true it will do the same for // References inside a Manifest. try { SignedInfo si = this.getSignedInfo(); //create a SignatureAlgorithms from the SignatureMethod inside //SignedInfo. This is used to validate the signature. SignatureAlgorithm sa = si.getSignatureAlgorithm(); if (log.isDebugEnabled()) { log.debug("signatureMethodURI = " + sa.getAlgorithmURI()); log.debug("jceSigAlgorithm = " + sa.getJCEAlgorithmString()); log.debug("jceSigProvider = " + sa.getJCEProviderName()); log.debug("PublicKey = " + pk); } byte sigBytes[] = null; try { sa.initVerify(pk); // Get the canonicalized (normalized) SignedInfo SignerOutputStream so = new SignerOutputStream(sa); OutputStream bos = new UnsyncBufferedOutputStream(so); si.signInOctetStream(bos); bos.close(); // retrieve the byte[] from the stored signature sigBytes = this.getSignatureValue(); } catch (IOException ex) { if (log.isDebugEnabled()) { log.debug(ex); } // Impossible... } catch (XMLSecurityException ex) { throw ex; } // have SignatureAlgorithm sign the input bytes and compare them to // the bytes that were stored in the signature. if (!sa.verify(sigBytes)) { log.warn("Signature verification failed."); return false; } return si.verify(this.followManifestsDuringValidation); } catch (XMLSignatureException ex) { throw ex; } catch (XMLSecurityException ex) { throw new XMLSignatureException("empty", ex); } } /** * Add a Reference with full parameters to this Signature * * @param referenceURI URI of the resource to be signed. Can be null in * which case the dereferencing is application specific. Can be "" in which * it's the parent node (or parent document?). There can only be one "" in * each signature. * @param trans Optional list of transformations to be done before digesting * @param digestURI Mandatory URI of the digesting algorithm to use. * @param referenceId Optional id attribute for this Reference * @param referenceType Optional mimetype for the URI * @throws XMLSignatureException */ public void addDocument( String referenceURI, Transforms trans, String digestURI, String referenceId, String referenceType ) throws XMLSignatureException { this.signedInfo.addDocument( this.baseURI, referenceURI, trans, digestURI, referenceId, referenceType ); } /** * This method is a proxy method for the {@link Manifest#addDocument} method. * * @param referenceURI URI according to the XML Signature specification. * @param trans List of transformations to be applied. * @param digestURI URI of the digest algorithm to be used. * @see Manifest#addDocument * @throws XMLSignatureException */ public void addDocument( String referenceURI, Transforms trans, String digestURI ) throws XMLSignatureException { this.signedInfo.addDocument(this.baseURI, referenceURI, trans, digestURI, null, null); } /** * Adds a Reference with just the URI and the transforms. This used the * SHA1 algorithm as a default digest algorithm. * * @param referenceURI URI according to the XML Signature specification. * @param trans List of transformations to be applied. * @throws XMLSignatureException */ public void addDocument(String referenceURI, Transforms trans) throws XMLSignatureException { this.signedInfo.addDocument( this.baseURI, referenceURI, trans, Constants.ALGO_ID_DIGEST_SHA1, null, null ); } /** * Add a Reference with just this URI. It uses SHA1 by default as the digest * algorithm * * @param referenceURI URI according to the XML Signature specification. * @throws XMLSignatureException */ public void addDocument(String referenceURI) throws XMLSignatureException { this.signedInfo.addDocument( this.baseURI, referenceURI, null, Constants.ALGO_ID_DIGEST_SHA1, null, null ); } /** * Add an X509 Certificate to the KeyInfo. This will include the whole cert * inside X509Data/X509Certificate tags. * * @param cert Certificate to be included. This should be the certificate of * the key that was used to sign. * @throws XMLSecurityException */ public void addKeyInfo(X509Certificate cert) throws XMLSecurityException { X509Data x509data = new X509Data(this.doc); x509data.addCertificate(cert); this.getKeyInfo().add(x509data); } /** * Add this public key to the KeyInfo. This will include the complete key in * the KeyInfo structure. * * @param pk */ public void addKeyInfo(PublicKey pk) { this.getKeyInfo().add(pk); } /** * Proxy method for {@link SignedInfo#createSecretKey(byte[])}. If you want * to create a MAC, this method helps you to obtain the * {@link javax.crypto.SecretKey} from octets. * * @param secretKeyBytes * @return the secret key created. * @see SignedInfo#createSecretKey(byte[]) */ public SecretKey createSecretKey(byte[] secretKeyBytes) { return this.getSignedInfo().createSecretKey(secretKeyBytes); } /** * Signal whether Manifest should be automatically validated. * Checking the digests in References in a Signature are mandatory, but for * References inside a Manifest it is application specific. This boolean is * to indicate that the References inside Manifests should be validated. * * @param followManifests * @see * Core validation section in the XML Signature Rec. */ public void setFollowNestedManifests(boolean followManifests) { this.followManifestsDuringValidation = followManifests; } /** * Get the local name of this element * * @return Constants._TAG_SIGNATURE */ public String getBaseLocalName() { return Constants._TAG_SIGNATURE; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/Reference.java0000644000175000017500000007325612233525734030242 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.signature; import java.io.IOException; import java.io.OutputStream; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.HashSet; import java.util.Iterator; import java.util.Set; import org.apache.xml.security.algorithms.MessageDigestAlgorithm; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.InvalidCanonicalizerException; import org.apache.xml.security.exceptions.Base64DecodingException; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.signature.reference.ReferenceData; import org.apache.xml.security.signature.reference.ReferenceNodeSetData; import org.apache.xml.security.signature.reference.ReferenceOctetStreamData; import org.apache.xml.security.signature.reference.ReferenceSubTreeData; import org.apache.xml.security.transforms.InvalidTransformException; import org.apache.xml.security.transforms.Transform; import org.apache.xml.security.transforms.TransformationException; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.transforms.params.InclusiveNamespaces; import org.apache.xml.security.utils.Base64; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.DigesterOutputStream; import org.apache.xml.security.utils.SignatureElementProxy; import org.apache.xml.security.utils.UnsyncBufferedOutputStream; import org.apache.xml.security.utils.XMLUtils; import org.apache.xml.security.utils.resolver.ResourceResolver; import org.apache.xml.security.utils.resolver.ResourceResolverException; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.Text; /** * Handles <ds:Reference> elements. * * This includes: * * Construct a ds:Reference from an {@link org.w3c.dom.Element}. * *

Create a new reference

*
 * Document doc;
 * MessageDigestAlgorithm sha1 = MessageDigestAlgorithm.getInstance("http://#sha1");
 * Reference ref = new Reference(new XMLSignatureInput(new FileInputStream("1.gif"),
 *                               "http://localhost/1.gif",
 *                               (Transforms) null, sha1);
 * Element refElem = ref.toElement(doc);
 * 
* *

Verify a reference

*
 * Element refElem = doc.getElement("Reference"); // PSEUDO
 * Reference ref = new Reference(refElem);
 * String url = ref.getURI();
 * ref.setData(new XMLSignatureInput(new FileInputStream(url)));
 * if (ref.verify()) {
 *    System.out.println("verified");
 * }
 * 
* *
 * <element name="Reference" type="ds:ReferenceType"/>
 *  <complexType name="ReferenceType">
 *    <sequence>
 *      <element ref="ds:Transforms" minOccurs="0"/>
 *      <element ref="ds:DigestMethod"/>
 *      <element ref="ds:DigestValue"/>
 *    </sequence>
 *    <attribute name="Id" type="ID" use="optional"/>
 *    <attribute name="URI" type="anyURI" use="optional"/>
 *    <attribute name="Type" type="anyURI" use="optional"/>
 *  </complexType>
 * 
* * @author Christian Geuer-Pollmann * @see ObjectContainer * @see Manifest */ public class Reference extends SignatureElementProxy { /** Field OBJECT_URI */ public static final String OBJECT_URI = Constants.SignatureSpecNS + Constants._TAG_OBJECT; /** Field MANIFEST_URI */ public static final String MANIFEST_URI = Constants.SignatureSpecNS + Constants._TAG_MANIFEST; /** * The maximum number of transforms per reference, if secure validation is enabled. */ public static final int MAXIMUM_TRANSFORM_COUNT = 5; private boolean secureValidation; /** * Look up useC14N11 system property. If true, an explicit C14N11 transform * will be added if necessary when generating the signature. See section * 3.1.1 of http://www.w3.org/2007/xmlsec/Drafts/xmldsig-core/ for more info. */ private static boolean useC14N11 = ((Boolean) AccessController.doPrivileged(new PrivilegedAction() { public Boolean run() { return Boolean.valueOf(Boolean.getBoolean("org.apache.xml.security.useC14N11")); } })).booleanValue(); /** {@link org.apache.commons.logging} logging facility */ private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Reference.class); private Manifest manifest; private XMLSignatureInput transformsOutput; private Transforms transforms; private Element digestMethodElem; private Element digestValueElement; private ReferenceData referenceData; /** * Constructor Reference * * @param doc the {@link Document} in which XMLsignature is placed * @param baseURI the URI of the resource where the XML instance will be stored * @param referenceURI URI indicate where is data which will digested * @param manifest * @param transforms {@link Transforms} applied to data * @param messageDigestAlgorithm {@link MessageDigestAlgorithm Digest algorithm} which is * applied to the data * TODO should we throw XMLSignatureException if MessageDigestAlgoURI is wrong? * @throws XMLSignatureException */ protected Reference( Document doc, String baseURI, String referenceURI, Manifest manifest, Transforms transforms, String messageDigestAlgorithm ) throws XMLSignatureException { super(doc); XMLUtils.addReturnToElement(this.constructionElement); this.baseURI = baseURI; this.manifest = manifest; this.setURI(referenceURI); // important: The ds:Reference must be added to the associated ds:Manifest // or ds:SignedInfo _before_ the this.resolverResult() is called. // this.manifest.appendChild(this.constructionElement); // this.manifest.appendChild(this.doc.createTextNode("\n")); if (transforms != null) { this.transforms=transforms; this.constructionElement.appendChild(transforms.getElement()); XMLUtils.addReturnToElement(this.constructionElement); } MessageDigestAlgorithm mda = MessageDigestAlgorithm.getInstance(this.doc, messageDigestAlgorithm); digestMethodElem = mda.getElement(); this.constructionElement.appendChild(digestMethodElem); XMLUtils.addReturnToElement(this.constructionElement); digestValueElement = XMLUtils.createElementInSignatureSpace(this.doc, Constants._TAG_DIGESTVALUE); this.constructionElement.appendChild(digestValueElement); XMLUtils.addReturnToElement(this.constructionElement); } /** * Build a {@link Reference} from an {@link Element} * * @param element Reference element * @param baseURI the URI of the resource where the XML instance was stored * @param manifest is the {@link Manifest} of {@link SignedInfo} in which the Reference occurs. * We need this because the Manifest has the individual {@link ResourceResolver}s which have * been set by the user * @throws XMLSecurityException */ protected Reference(Element element, String baseURI, Manifest manifest) throws XMLSecurityException { this(element, baseURI, manifest, false); } /** * Build a {@link Reference} from an {@link Element} * * @param element Reference element * @param baseURI the URI of the resource where the XML instance was stored * @param manifest is the {@link Manifest} of {@link SignedInfo} in which the Reference occurs. * @param secureValidation whether secure validation is enabled or not * We need this because the Manifest has the individual {@link ResourceResolver}s which have * been set by the user * @throws XMLSecurityException */ protected Reference(Element element, String baseURI, Manifest manifest, boolean secureValidation) throws XMLSecurityException { super(element, baseURI); this.secureValidation = secureValidation; this.baseURI = baseURI; Element el = XMLUtils.getNextElement(element.getFirstChild()); if (Constants._TAG_TRANSFORMS.equals(el.getLocalName()) && Constants.SignatureSpecNS.equals(el.getNamespaceURI())) { transforms = new Transforms(el, this.baseURI); transforms.setSecureValidation(secureValidation); if (secureValidation && transforms.getLength() > MAXIMUM_TRANSFORM_COUNT) { Object exArgs[] = { transforms.getLength(), MAXIMUM_TRANSFORM_COUNT }; throw new XMLSecurityException("signature.tooManyTransforms", exArgs); } el = XMLUtils.getNextElement(el.getNextSibling()); } digestMethodElem = el; digestValueElement = XMLUtils.getNextElement(digestMethodElem.getNextSibling()); this.manifest = manifest; } /** * Returns {@link MessageDigestAlgorithm} * * * @return {@link MessageDigestAlgorithm} * * @throws XMLSignatureException */ public MessageDigestAlgorithm getMessageDigestAlgorithm() throws XMLSignatureException { if (digestMethodElem == null) { return null; } String uri = digestMethodElem.getAttributeNS(null, Constants._ATT_ALGORITHM); if (uri == null) { return null; } if (secureValidation && MessageDigestAlgorithm.ALGO_ID_DIGEST_NOT_RECOMMENDED_MD5.equals(uri)) { Object exArgs[] = { uri }; throw new XMLSignatureException("signature.signatureAlgorithm", exArgs); } return MessageDigestAlgorithm.getInstance(this.doc, uri); } /** * Sets the URI of this Reference element * * @param uri the URI of this Reference element */ public void setURI(String uri) { if (uri != null) { this.constructionElement.setAttributeNS(null, Constants._ATT_URI, uri); } } /** * Returns the URI of this Reference element * * @return URI the URI of this Reference element */ public String getURI() { return this.constructionElement.getAttributeNS(null, Constants._ATT_URI); } /** * Sets the Id attribute of this Reference element * * @param id the Id attribute of this Reference element */ public void setId(String id) { if (id != null) { this.constructionElement.setAttributeNS(null, Constants._ATT_ID, id); this.constructionElement.setIdAttributeNS(null, Constants._ATT_ID, true); } } /** * Returns the Id attribute of this Reference element * * @return Id the Id attribute of this Reference element */ public String getId() { return this.constructionElement.getAttributeNS(null, Constants._ATT_ID); } /** * Sets the type atttibute of the Reference indicate whether an * ds:Object, ds:SignatureProperty, or ds:Manifest * element. * * @param type the type attribute of the Reference */ public void setType(String type) { if (type != null) { this.constructionElement.setAttributeNS(null, Constants._ATT_TYPE, type); } } /** * Return the type atttibute of the Reference indicate whether an * ds:Object, ds:SignatureProperty, or ds:Manifest * element * * @return the type attribute of the Reference */ public String getType() { return this.constructionElement.getAttributeNS(null, Constants._ATT_TYPE); } /** * Method isReferenceToObject * * This returns true if the Type attribute of the * Reference element points to a #Object element * * @return true if the Reference type indicates that this Reference points to an * Object */ public boolean typeIsReferenceToObject() { if (Reference.OBJECT_URI.equals(this.getType())) { return true; } return false; } /** * Method isReferenceToManifest * * This returns true if the Type attribute of the * Reference element points to a #Manifest element * * @return true if the Reference type indicates that this Reference points to a * {@link Manifest} */ public boolean typeIsReferenceToManifest() { if (Reference.MANIFEST_URI.equals(this.getType())) { return true; } return false; } /** * Method setDigestValueElement * * @param digestValue */ private void setDigestValueElement(byte[] digestValue) { Node n = digestValueElement.getFirstChild(); while (n != null) { digestValueElement.removeChild(n); n = n.getNextSibling(); } String base64codedValue = Base64.encode(digestValue); Text t = this.doc.createTextNode(base64codedValue); digestValueElement.appendChild(t); } /** * Method generateDigestValue * * @throws ReferenceNotInitializedException * @throws XMLSignatureException */ public void generateDigestValue() throws XMLSignatureException, ReferenceNotInitializedException { this.setDigestValueElement(this.calculateDigest(false)); } /** * Returns the XMLSignatureInput which is created by de-referencing the URI attribute. * @return the XMLSignatureInput of the source of this reference * @throws ReferenceNotInitializedException If the resolver found any * problem resolving the reference */ public XMLSignatureInput getContentsBeforeTransformation() throws ReferenceNotInitializedException { try { Attr uriAttr = this.constructionElement.getAttributeNodeNS(null, Constants._ATT_URI); ResourceResolver resolver = ResourceResolver.getInstance( uriAttr, this.baseURI, this.manifest.getPerManifestResolvers(), secureValidation ); resolver.addProperties(this.manifest.getResolverProperties()); return resolver.resolve(uriAttr, this.baseURI, secureValidation); } catch (ResourceResolverException ex) { throw new ReferenceNotInitializedException("empty", ex); } } private XMLSignatureInput getContentsAfterTransformation( XMLSignatureInput input, OutputStream os ) throws XMLSignatureException { try { Transforms transforms = this.getTransforms(); XMLSignatureInput output = null; if (transforms != null) { output = transforms.performTransforms(input, os); this.transformsOutput = output;//new XMLSignatureInput(output.getBytes()); //this.transformsOutput.setSourceURI(output.getSourceURI()); } else { output = input; } return output; } catch (ResourceResolverException ex) { throw new XMLSignatureException("empty", ex); } catch (CanonicalizationException ex) { throw new XMLSignatureException("empty", ex); } catch (InvalidCanonicalizerException ex) { throw new XMLSignatureException("empty", ex); } catch (TransformationException ex) { throw new XMLSignatureException("empty", ex); } catch (XMLSecurityException ex) { throw new XMLSignatureException("empty", ex); } } /** * Returns the XMLSignatureInput which is the result of the Transforms. * @return a XMLSignatureInput with all transformations applied. * @throws XMLSignatureException */ public XMLSignatureInput getContentsAfterTransformation() throws XMLSignatureException { XMLSignatureInput input = this.getContentsBeforeTransformation(); cacheDereferencedElement(input); return this.getContentsAfterTransformation(input, null); } /** * This method returns the XMLSignatureInput which represents the node set before * some kind of canonicalization is applied for the first time. * @return Gets a the node doing everything till the first c14n is needed * * @throws XMLSignatureException */ public XMLSignatureInput getNodesetBeforeFirstCanonicalization() throws XMLSignatureException { try { XMLSignatureInput input = this.getContentsBeforeTransformation(); cacheDereferencedElement(input); XMLSignatureInput output = input; Transforms transforms = this.getTransforms(); if (transforms != null) { doTransforms: for (int i = 0; i < transforms.getLength(); i++) { Transform t = transforms.item(i); String uri = t.getURI(); if (uri.equals(Transforms.TRANSFORM_C14N_EXCL_OMIT_COMMENTS) || uri.equals(Transforms.TRANSFORM_C14N_EXCL_WITH_COMMENTS) || uri.equals(Transforms.TRANSFORM_C14N_OMIT_COMMENTS) || uri.equals(Transforms.TRANSFORM_C14N_WITH_COMMENTS)) { break doTransforms; } output = t.performTransform(output, null); } output.setSourceURI(input.getSourceURI()); } return output; } catch (IOException ex) { throw new XMLSignatureException("empty", ex); } catch (ResourceResolverException ex) { throw new XMLSignatureException("empty", ex); } catch (CanonicalizationException ex) { throw new XMLSignatureException("empty", ex); } catch (InvalidCanonicalizerException ex) { throw new XMLSignatureException("empty", ex); } catch (TransformationException ex) { throw new XMLSignatureException("empty", ex); } catch (XMLSecurityException ex) { throw new XMLSignatureException("empty", ex); } } /** * Method getHTMLRepresentation * @return The HTML of the transformation * @throws XMLSignatureException */ public String getHTMLRepresentation() throws XMLSignatureException { try { XMLSignatureInput nodes = this.getNodesetBeforeFirstCanonicalization(); Transforms transforms = this.getTransforms(); Transform c14nTransform = null; if (transforms != null) { doTransforms: for (int i = 0; i < transforms.getLength(); i++) { Transform t = transforms.item(i); String uri = t.getURI(); if (uri.equals(Transforms.TRANSFORM_C14N_EXCL_OMIT_COMMENTS) || uri.equals(Transforms.TRANSFORM_C14N_EXCL_WITH_COMMENTS)) { c14nTransform = t; break doTransforms; } } } Set inclusiveNamespaces = new HashSet(); if (c14nTransform != null && (c14nTransform.length( InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES) == 1)) { // there is one InclusiveNamespaces element InclusiveNamespaces in = new InclusiveNamespaces( XMLUtils.selectNode( c14nTransform.getElement().getFirstChild(), InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES, 0 ), this.getBaseURI()); inclusiveNamespaces = InclusiveNamespaces.prefixStr2Set(in.getInclusiveNamespaces()); } return nodes.getHTMLRepresentation(inclusiveNamespaces); } catch (TransformationException ex) { throw new XMLSignatureException("empty", ex); } catch (InvalidTransformException ex) { throw new XMLSignatureException("empty", ex); } catch (XMLSecurityException ex) { throw new XMLSignatureException("empty", ex); } } /** * This method only works works after a call to verify. * @return the transformed output(i.e. what is going to be digested). */ public XMLSignatureInput getTransformsOutput() { return this.transformsOutput; } /** * Get the ReferenceData that corresponds to the cached representation of the dereferenced * object before transformation. */ public ReferenceData getReferenceData() { return referenceData; } /** * This method returns the {@link XMLSignatureInput} which is referenced by the * URI Attribute. * @param os where to write the transformation can be null. * @return the element to digest * * @throws XMLSignatureException * @see Manifest#verifyReferences() */ protected XMLSignatureInput dereferenceURIandPerformTransforms(OutputStream os) throws XMLSignatureException { try { XMLSignatureInput input = this.getContentsBeforeTransformation(); cacheDereferencedElement(input); XMLSignatureInput output = this.getContentsAfterTransformation(input, os); this.transformsOutput = output; return output; } catch (XMLSecurityException ex) { throw new ReferenceNotInitializedException("empty", ex); } } /** * Store the dereferenced Element(s) so that it/they can be retrieved later. */ private void cacheDereferencedElement(XMLSignatureInput input) { if (input.isNodeSet()) { try { final Set s = input.getNodeSet(); referenceData = new ReferenceNodeSetData() { public Iterator iterator() { return new Iterator() { Iterator sIterator = s.iterator(); public boolean hasNext() { return sIterator.hasNext(); } public Node next() { return sIterator.next(); } public void remove() { throw new UnsupportedOperationException(); } }; } }; } catch (Exception e) { // log a warning log.warn("cannot cache dereferenced data: " + e); } } else if (input.isElement()) { referenceData = new ReferenceSubTreeData (input.getSubNode(), input.isExcludeComments()); } else if (input.isOctetStream() || input.isByteArray()) { try { referenceData = new ReferenceOctetStreamData (input.getOctetStream(), input.getSourceURI(), input.getMIMEType()); } catch (IOException ioe) { // log a warning log.warn("cannot cache dereferenced data: " + ioe); } } } /** * Method getTransforms * * @return The transforms that applied this reference. * @throws InvalidTransformException * @throws TransformationException * @throws XMLSecurityException * @throws XMLSignatureException */ public Transforms getTransforms() throws XMLSignatureException, InvalidTransformException, TransformationException, XMLSecurityException { return transforms; } /** * Method getReferencedBytes * * @return the bytes that will be used to generated digest. * @throws ReferenceNotInitializedException * @throws XMLSignatureException */ public byte[] getReferencedBytes() throws ReferenceNotInitializedException, XMLSignatureException { try { XMLSignatureInput output = this.dereferenceURIandPerformTransforms(null); return output.getBytes(); } catch (IOException ex) { throw new ReferenceNotInitializedException("empty", ex); } catch (CanonicalizationException ex) { throw new ReferenceNotInitializedException("empty", ex); } } /** * Method calculateDigest * * @param validating true if validating the reference * @return reference Calculate the digest of this reference. * @throws ReferenceNotInitializedException * @throws XMLSignatureException */ private byte[] calculateDigest(boolean validating) throws ReferenceNotInitializedException, XMLSignatureException { OutputStream os = null; try { MessageDigestAlgorithm mda = this.getMessageDigestAlgorithm(); mda.reset(); DigesterOutputStream diOs = new DigesterOutputStream(mda); os = new UnsyncBufferedOutputStream(diOs); XMLSignatureInput output = this.dereferenceURIandPerformTransforms(os); // if signing and c14n11 property == true explicitly add // C14N11 transform if needed if (Reference.useC14N11 && !validating && !output.isOutputStreamSet() && !output.isOctetStream()) { if (transforms == null) { transforms = new Transforms(this.doc); transforms.setSecureValidation(secureValidation); this.constructionElement.insertBefore(transforms.getElement(), digestMethodElem); } transforms.addTransform(Transforms.TRANSFORM_C14N11_OMIT_COMMENTS); output.updateOutputStream(os, true); } else { output.updateOutputStream(os); } os.flush(); if (output.getOctetStreamReal() != null) { output.getOctetStreamReal().close(); } //this.getReferencedBytes(diOs); //mda.update(data); return diOs.getDigestValue(); } catch (XMLSecurityException ex) { throw new ReferenceNotInitializedException("empty", ex); } catch (IOException ex) { throw new ReferenceNotInitializedException("empty", ex); } finally { if (os != null) { try { os.close(); } catch (IOException ex) { throw new ReferenceNotInitializedException("empty", ex); } } } } /** * Returns the digest value. * * @return the digest value. * @throws Base64DecodingException if Reference contains no proper base64 encoded data. * @throws XMLSecurityException if the Reference does not contain a DigestValue element */ public byte[] getDigestValue() throws Base64DecodingException, XMLSecurityException { if (digestValueElement == null) { // The required element is not in the XML! Object[] exArgs ={ Constants._TAG_DIGESTVALUE, Constants.SignatureSpecNS }; throw new XMLSecurityException( "signature.Verification.NoSignatureElement", exArgs ); } return Base64.decode(digestValueElement); } /** * Tests reference validation is success or false * * @return true if reference validation is success, otherwise false * @throws ReferenceNotInitializedException * @throws XMLSecurityException */ public boolean verify() throws ReferenceNotInitializedException, XMLSecurityException { byte[] elemDig = this.getDigestValue(); byte[] calcDig = this.calculateDigest(true); boolean equal = MessageDigestAlgorithm.isEqual(elemDig, calcDig); if (!equal) { log.warn("Verification failed for URI \"" + this.getURI() + "\""); log.warn("Expected Digest: " + Base64.encode(elemDig)); log.warn("Actual Digest: " + Base64.encode(calcDig)); } else { if (log.isDebugEnabled()) { log.debug("Verification successful for URI \"" + this.getURI() + "\""); } } return equal; } /** * Method getBaseLocalName * @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_REFERENCE; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/Manifest.java0000644000175000017500000005455012234743735030112 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.signature; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import javax.xml.parsers.ParserConfigurationException; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.InvalidCanonicalizerException; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.I18n; import org.apache.xml.security.utils.SignatureElementProxy; import org.apache.xml.security.utils.XMLUtils; import org.apache.xml.security.utils.resolver.ResourceResolver; import org.apache.xml.security.utils.resolver.ResourceResolverSpi; import org.w3c.dom.Attr; import org.w3c.dom.DOMException; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.xml.sax.SAXException; /** * Handles <ds:Manifest> elements. *

This element holds the Reference elements

*/ public class Manifest extends SignatureElementProxy { /** * The maximum number of references per Manifest, if secure validation is enabled. */ public static final int MAXIMUM_REFERENCE_COUNT = 30; /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Manifest.class); /** Field references */ private List references; private Element[] referencesEl; /** Field verificationResults[] */ private boolean verificationResults[] = null; /** Field resolverProperties */ private Map resolverProperties = null; /** Field perManifestResolvers */ private List perManifestResolvers = null; private boolean secureValidation; /** * Constructs {@link Manifest} * * @param doc the {@link Document} in which XMLsignature is placed */ public Manifest(Document doc) { super(doc); XMLUtils.addReturnToElement(this.constructionElement); this.references = new ArrayList(); } /** * Constructor Manifest * * @param element * @param baseURI * @throws XMLSecurityException */ public Manifest(Element element, String baseURI) throws XMLSecurityException { this(element, baseURI, false); } /** * Constructor Manifest * * @param element * @param baseURI * @param secureValidation * @throws XMLSecurityException */ public Manifest( Element element, String baseURI, boolean secureValidation ) throws XMLSecurityException { super(element, baseURI); Attr attr = element.getAttributeNodeNS(null, "Id"); if (attr != null) { element.setIdAttributeNode(attr, true); } this.secureValidation = secureValidation; // check out Reference children this.referencesEl = XMLUtils.selectDsNodes( this.constructionElement.getFirstChild(), Constants._TAG_REFERENCE ); int le = this.referencesEl.length; if (le == 0) { // At least one Reference must be present. Bad. Object exArgs[] = { Constants._TAG_REFERENCE, Constants._TAG_MANIFEST }; throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, I18n.translate("xml.WrongContent", exArgs)); } if (secureValidation && le > MAXIMUM_REFERENCE_COUNT) { Object exArgs[] = { le, MAXIMUM_REFERENCE_COUNT }; throw new XMLSecurityException("signature.tooManyReferences", exArgs); } // create List this.references = new ArrayList(le); for (int i = 0; i < le; i++) { Element refElem = referencesEl[i]; Attr refAttr = refElem.getAttributeNodeNS(null, "Id"); if (refAttr != null) { refElem.setIdAttributeNode(refAttr, true); } this.references.add(null); } } /** * This addDocument method is used to add a new resource to the * signed info. A {@link org.apache.xml.security.signature.Reference} is built * from the supplied values. * * @param baseURI the URI of the resource where the XML instance was stored * @param referenceURI URI attribute in Reference for specifying * where data is * @param transforms org.apache.xml.security.signature.Transforms object with an ordered * list of transformations to be performed. * @param digestURI The digest algorithm URI to be used. * @param referenceId * @param referenceType * @throws XMLSignatureException */ public void addDocument( String baseURI, String referenceURI, Transforms transforms, String digestURI, String referenceId, String referenceType ) throws XMLSignatureException { // the this.doc is handed implicitly by the this.getOwnerDocument() Reference ref = new Reference(this.doc, baseURI, referenceURI, this, transforms, digestURI); if (referenceId != null) { ref.setId(referenceId); } if (referenceType != null) { ref.setType(referenceType); } // add Reference object to our cache vector this.references.add(ref); // add the Element of the Reference object to the Manifest/SignedInfo this.constructionElement.appendChild(ref.getElement()); XMLUtils.addReturnToElement(this.constructionElement); } /** * The calculation of the DigestValues in the References must be after the * References are already added to the document and during the signing * process. This ensures that all necessary data is in place. * * @throws ReferenceNotInitializedException * @throws XMLSignatureException */ public void generateDigestValues() throws XMLSignatureException, ReferenceNotInitializedException { for (int i = 0; i < this.getLength(); i++) { // update the cached Reference object, the Element content is automatically updated Reference currentRef = this.references.get(i); currentRef.generateDigestValue(); } } /** * Return the nonnegative number of added references. * * @return the number of references */ public int getLength() { return this.references.size(); } /** * Return the ith reference. Valid i * values are 0 to {link@ getSize}-1. * * @param i Index of the requested {@link Reference} * @return the ith reference * @throws XMLSecurityException */ public Reference item(int i) throws XMLSecurityException { if (this.references.get(i) == null) { // not yet constructed, so _we_ have to Reference ref = new Reference(referencesEl[i], this.baseURI, this, secureValidation); this.references.set(i, ref); } return this.references.get(i); } /** * Sets the Id attribute * * @param Id the Id attribute in ds:Manifest */ public void setId(String Id) { if (Id != null) { this.constructionElement.setAttributeNS(null, Constants._ATT_ID, Id); this.constructionElement.setIdAttributeNS(null, Constants._ATT_ID, true); } } /** * Returns the Id attribute * * @return the Id attribute in ds:Manifest */ public String getId() { return this.constructionElement.getAttributeNS(null, Constants._ATT_ID); } /** * Used to do a reference * validation of all enclosed references using the {@link Reference#verify} method. * *

This step loops through all {@link Reference}s and does verify the hash * values. If one or more verifications fail, the method returns * false. If all verifications are successful, * it returns true. The results of the individual reference * validations are available by using the {@link #getVerificationResult(int)} method * * @return true if all References verify, false if one or more do not verify. * @throws MissingResourceFailureException if a {@link Reference} does not verify * (throws a {@link org.apache.xml.security.signature.ReferenceNotInitializedException} * because of an uninitialized {@link XMLSignatureInput} * @see org.apache.xml.security.signature.Reference#verify * @see org.apache.xml.security.signature.SignedInfo#verify() * @see org.apache.xml.security.signature.MissingResourceFailureException * @throws XMLSecurityException */ public boolean verifyReferences() throws MissingResourceFailureException, XMLSecurityException { return this.verifyReferences(false); } /** * Used to do a reference * validation of all enclosed references using the {@link Reference#verify} method. * *

This step loops through all {@link Reference}s and does verify the hash * values. If one or more verifications fail, the method returns * false. If all verifications are successful, * it returns true. The results of the individual reference * validations are available by using the {@link #getVerificationResult(int)} method * * @param followManifests * @return true if all References verify, false if one or more do not verify. * @throws MissingResourceFailureException if a {@link Reference} does not verify * (throws a {@link org.apache.xml.security.signature.ReferenceNotInitializedException} * because of an uninitialized {@link XMLSignatureInput} * @see org.apache.xml.security.signature.Reference#verify * @see org.apache.xml.security.signature.SignedInfo#verify(boolean) * @see org.apache.xml.security.signature.MissingResourceFailureException * @throws XMLSecurityException */ public boolean verifyReferences(boolean followManifests) throws MissingResourceFailureException, XMLSecurityException { if (referencesEl == null) { this.referencesEl = XMLUtils.selectDsNodes( this.constructionElement.getFirstChild(), Constants._TAG_REFERENCE ); } if (log.isDebugEnabled()) { log.debug("verify " + referencesEl.length + " References"); log.debug("I am " + (followManifests ? "" : "not") + " requested to follow nested Manifests"); } if (referencesEl.length == 0) { throw new XMLSecurityException("empty"); } if (secureValidation && referencesEl.length > MAXIMUM_REFERENCE_COUNT) { Object exArgs[] = { referencesEl.length, MAXIMUM_REFERENCE_COUNT }; throw new XMLSecurityException("signature.tooManyReferences", exArgs); } this.verificationResults = new boolean[referencesEl.length]; boolean verify = true; for (int i = 0; i < this.referencesEl.length; i++) { Reference currentRef = new Reference(referencesEl[i], this.baseURI, this, secureValidation); this.references.set(i, currentRef); // if only one item does not verify, the whole verification fails try { boolean currentRefVerified = currentRef.verify(); this.setVerificationResult(i, currentRefVerified); if (!currentRefVerified) { verify = false; } if (log.isDebugEnabled()) { log.debug("The Reference has Type " + currentRef.getType()); } // was verification successful till now and do we want to verify the Manifest? if (verify && followManifests && currentRef.typeIsReferenceToManifest()) { if (log.isDebugEnabled()) { log.debug("We have to follow a nested Manifest"); } try { XMLSignatureInput signedManifestNodes = currentRef.dereferenceURIandPerformTransforms(null); Set nl = signedManifestNodes.getNodeSet(); Manifest referencedManifest = null; Iterator nlIterator = nl.iterator(); findManifest: while (nlIterator.hasNext()) { Node n = nlIterator.next(); if ((n.getNodeType() == Node.ELEMENT_NODE) && ((Element) n).getNamespaceURI().equals(Constants.SignatureSpecNS) && ((Element) n).getLocalName().equals(Constants._TAG_MANIFEST) ) { try { referencedManifest = new Manifest( (Element)n, signedManifestNodes.getSourceURI(), secureValidation ); break findManifest; } catch (XMLSecurityException ex) { if (log.isDebugEnabled()) { log.debug(ex); } // Hm, seems not to be a ds:Manifest } } } if (referencedManifest == null) { // The Reference stated that it points to a ds:Manifest // but we did not find a ds:Manifest in the signed area throw new MissingResourceFailureException("empty", currentRef); } referencedManifest.perManifestResolvers = this.perManifestResolvers; referencedManifest.resolverProperties = this.resolverProperties; boolean referencedManifestValid = referencedManifest.verifyReferences(followManifests); if (!referencedManifestValid) { verify = false; log.warn("The nested Manifest was invalid (bad)"); } else { if (log.isDebugEnabled()) { log.debug("The nested Manifest was valid (good)"); } } } catch (IOException ex) { throw new ReferenceNotInitializedException("empty", ex); } catch (ParserConfigurationException ex) { throw new ReferenceNotInitializedException("empty", ex); } catch (SAXException ex) { throw new ReferenceNotInitializedException("empty", ex); } } } catch (ReferenceNotInitializedException ex) { Object exArgs[] = { currentRef.getURI() }; throw new MissingResourceFailureException( "signature.Verification.Reference.NoInput", exArgs, ex, currentRef ); } } return verify; } /** * Method setVerificationResult * * @param index * @param verify */ private void setVerificationResult(int index, boolean verify) { if (this.verificationResults == null) { this.verificationResults = new boolean[this.getLength()]; } this.verificationResults[index] = verify; } /** * After verifying a {@link Manifest} or a {@link SignedInfo} using the * {@link Manifest#verifyReferences()} or {@link SignedInfo#verify()} methods, * the individual results can be retrieved with this method. * * @param index an index of into a {@link Manifest} or a {@link SignedInfo} * @return the results of reference validation at the specified index * @throws XMLSecurityException */ public boolean getVerificationResult(int index) throws XMLSecurityException { if ((index < 0) || (index > this.getLength() - 1)) { Object exArgs[] = { Integer.toString(index), Integer.toString(this.getLength()) }; Exception e = new IndexOutOfBoundsException( I18n.translate("signature.Verification.IndexOutOfBounds", exArgs) ); throw new XMLSecurityException("generic.EmptyMessage", e); } if (this.verificationResults == null) { try { this.verifyReferences(); } catch (Exception ex) { throw new XMLSecurityException("generic.EmptyMessage", ex); } } return this.verificationResults[index]; } /** * Adds Resource Resolver for retrieving resources at specified URI attribute * in reference element * * @param resolver {@link ResourceResolver} can provide the implemenatin subclass of * {@link ResourceResolverSpi} for retrieving resource. */ public void addResourceResolver(ResourceResolver resolver) { if (resolver == null) { return; } if (perManifestResolvers == null) { perManifestResolvers = new ArrayList(); } this.perManifestResolvers.add(resolver); } /** * Adds Resource Resolver for retrieving resources at specified URI attribute * in reference element * * @param resolverSpi the implementation subclass of {@link ResourceResolverSpi} for * retrieving the resource. */ public void addResourceResolver(ResourceResolverSpi resolverSpi) { if (resolverSpi == null) { return; } if (perManifestResolvers == null) { perManifestResolvers = new ArrayList(); } perManifestResolvers.add(new ResourceResolver(resolverSpi)); } /** * Get the Per-Manifest Resolver List * @return the per-manifest Resolver List */ public List getPerManifestResolvers() { return perManifestResolvers; } /** * Get the resolver property map * @return the resolver property map */ public Map getResolverProperties() { return resolverProperties; } /** * Used to pass parameters like proxy servers etc to the ResourceResolver * implementation. * * @param key the key * @param value the value */ public void setResolverProperty(String key, String value) { if (resolverProperties == null) { resolverProperties = new HashMap(10); } this.resolverProperties.put(key, value); } /** * Returns the value at specified key * * @param key the key * @return the value */ public String getResolverProperty(String key) { return this.resolverProperties.get(key); } /** * Method getSignedContentItem * * @param i * @return The signed content of the i reference. * * @throws XMLSignatureException */ public byte[] getSignedContentItem(int i) throws XMLSignatureException { try { return this.getReferencedContentAfterTransformsItem(i).getBytes(); } catch (IOException ex) { throw new XMLSignatureException("empty", ex); } catch (CanonicalizationException ex) { throw new XMLSignatureException("empty", ex); } catch (InvalidCanonicalizerException ex) { throw new XMLSignatureException("empty", ex); } catch (XMLSecurityException ex) { throw new XMLSignatureException("empty", ex); } } /** * Method getReferencedContentPriorTransformsItem * * @param i * @return The contents before transformation of the reference i. * @throws XMLSecurityException */ public XMLSignatureInput getReferencedContentBeforeTransformsItem(int i) throws XMLSecurityException { return this.item(i).getContentsBeforeTransformation(); } /** * Method getReferencedContentAfterTransformsItem * * @param i * @return The contents after transformation of the reference i. * @throws XMLSecurityException */ public XMLSignatureInput getReferencedContentAfterTransformsItem(int i) throws XMLSecurityException { return this.item(i).getContentsAfterTransformation(); } /** * Method getSignedContentLength * * @return The number of references contained in this reference. */ public int getSignedContentLength() { return this.getLength(); } /** * Method getBaseLocalName * * @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_MANIFEST; } public boolean isSecureValidation() { return secureValidation; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/SignatureProperties.java0000644000175000017500000001146011704017634032344 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.signature; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.SignatureElementProxy; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * Handles <ds:SignatureProperties> elements * This Element holds {@link SignatureProperty} that contian additional information items * concerning the generation of the signature. * for example, data-time stamp, serial number of cryptographic hardware. * * @author Christian Geuer-Pollmann */ public class SignatureProperties extends SignatureElementProxy { /** * Constructor SignatureProperties * * @param doc */ public SignatureProperties(Document doc) { super(doc); XMLUtils.addReturnToElement(this.constructionElement); } /** * Constructs {@link SignatureProperties} from {@link Element} * @param element SignatureProperties element * @param BaseURI the URI of the resource where the XML instance was stored * @throws XMLSecurityException */ public SignatureProperties(Element element, String BaseURI) throws XMLSecurityException { super(element, BaseURI); Attr attr = element.getAttributeNodeNS(null, "Id"); if (attr != null) { element.setIdAttributeNode(attr, true); } int length = getLength(); for (int i = 0; i < length; i++) { Element propertyElem = XMLUtils.selectDsNode(this.constructionElement, Constants._TAG_SIGNATUREPROPERTY, i); Attr propertyAttr = propertyElem.getAttributeNodeNS(null, "Id"); if (propertyAttr != null) { propertyElem.setIdAttributeNode(propertyAttr, true); } } } /** * Return the nonnegative number of added SignatureProperty elements. * * @return the number of SignatureProperty elements */ public int getLength() { Element[] propertyElems = XMLUtils.selectDsNodes(this.constructionElement, Constants._TAG_SIGNATUREPROPERTY); return propertyElems.length; } /** * Return the ith SignatureProperty. Valid i * values are 0 to {link@ getSize}-1. * * @param i Index of the requested {@link SignatureProperty} * @return the ith SignatureProperty * @throws XMLSignatureException */ public SignatureProperty item(int i) throws XMLSignatureException { try { Element propertyElem = XMLUtils.selectDsNode(this.constructionElement, Constants._TAG_SIGNATUREPROPERTY, i); if (propertyElem == null) { return null; } return new SignatureProperty(propertyElem, this.baseURI); } catch (XMLSecurityException ex) { throw new XMLSignatureException("empty", ex); } } /** * Sets the Id attribute * * @param Id the Id attribute */ public void setId(String Id) { if (Id != null) { this.constructionElement.setAttributeNS(null, Constants._ATT_ID, Id); this.constructionElement.setIdAttributeNS(null, Constants._ATT_ID, true); } } /** * Returns the Id attribute * * @return the Id attribute */ public String getId() { return this.constructionElement.getAttributeNS(null, Constants._ATT_ID); } /** * Method addSignatureProperty * * @param sp */ public void addSignatureProperty(SignatureProperty sp) { this.constructionElement.appendChild(sp.getElement()); XMLUtils.addReturnToElement(this.constructionElement); } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_SIGNATUREPROPERTIES; } } ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/InvalidDigestValueException.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/InvalidDigestValueExcepti0000644000175000017500000000446311555760614032467 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.signature; /** * Raised when the computed hash value doesn't match the given DigestValue. * Additional human readable info is passed to the constructor -- this being the benefit * of raising an exception or returning a value. * * @author Christian Geuer-Pollmann */ public class InvalidDigestValueException extends XMLSignatureException { /** * */ private static final long serialVersionUID = 1L; /** * Constructor InvalidDigestValueException * */ public InvalidDigestValueException() { super(); } /** * Constructor InvalidDigestValueException * * @param msgID */ public InvalidDigestValueException(String msgID) { super(msgID); } /** * Constructor InvalidDigestValueException * * @param msgID * @param exArgs */ public InvalidDigestValueException(String msgID, Object exArgs[]) { super(msgID, exArgs); } /** * Constructor InvalidDigestValueException * * @param msgID * @param originalException */ public InvalidDigestValueException(String msgID, Exception originalException) { super(msgID, originalException); } /** * Constructor InvalidDigestValueException * * @param msgID * @param exArgs * @param originalException */ public InvalidDigestValueException(String msgID, Object exArgs[], Exception originalException) { super(msgID, exArgs, originalException); } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/ObjectContainer.java0000644000175000017500000000776311750731244031413 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.signature; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.SignatureElementProxy; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; /** * Handles <ds:Object> elements * Object {@link Element} supply facility which can contain any kind data * * @author Christian Geuer-Pollmann * $todo$ if we remove childen, the boolean values are not updated */ public class ObjectContainer extends SignatureElementProxy { /** * Constructs {@link ObjectContainer} * * @param doc the {@link Document} in which Object element is placed */ public ObjectContainer(Document doc) { super(doc); } /** * Constructs {@link ObjectContainer} from {@link Element} * * @param element is Object element * @param baseURI the URI of the resource where the XML instance was stored * @throws XMLSecurityException */ public ObjectContainer(Element element, String baseURI) throws XMLSecurityException { super(element, baseURI); } /** * Sets the Id attribute * * @param Id Id attribute */ public void setId(String Id) { if (Id != null) { this.constructionElement.setAttributeNS(null, Constants._ATT_ID, Id); this.constructionElement.setIdAttributeNS(null, Constants._ATT_ID, true); } } /** * Returns the Id attribute * * @return the Id attribute */ public String getId() { return this.constructionElement.getAttributeNS(null, Constants._ATT_ID); } /** * Sets the MimeType attribute * * @param MimeType the MimeType attribute */ public void setMimeType(String MimeType) { if (MimeType != null) { this.constructionElement.setAttributeNS(null, Constants._ATT_MIMETYPE, MimeType); } } /** * Returns the MimeType attribute * * @return the MimeType attribute */ public String getMimeType() { return this.constructionElement.getAttributeNS(null, Constants._ATT_MIMETYPE); } /** * Sets the Encoding attribute * * @param Encoding the Encoding attribute */ public void setEncoding(String Encoding) { if (Encoding != null) { this.constructionElement.setAttributeNS(null, Constants._ATT_ENCODING, Encoding); } } /** * Returns the Encoding attribute * * @return the Encoding attribute */ public String getEncoding() { return this.constructionElement.getAttributeNS(null, Constants._ATT_ENCODING); } /** * Adds child Node * * @param node child Node * @return the new node in the tree. */ public Node appendChild(Node node) { return this.constructionElement.appendChild(node); } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_OBJECT; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/reference/0000755000175000017500000000000012273503733027421 5ustar tonytony././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/reference/ReferenceData.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/reference/ReferenceData.j0000644000175000017500000000205111703064424032256 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id$ */ package org.apache.xml.security.signature.reference; /** * An abstract representation of the result of dereferencing a ds:Reference URI. */ public interface ReferenceData { } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/reference/ReferenceNodeSetData.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/reference/ReferenceNodeSe0000644000175000017500000000323111703064424032333 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id$ */ package org.apache.xml.security.signature.reference; import java.util.Iterator; import org.w3c.dom.Node; /** * An abstract representation of a ReferenceData type containing a node-set. */ public interface ReferenceNodeSetData extends ReferenceData { /** * Returns a read-only iterator over the nodes contained in this * NodeSetData in * * document order. Attempts to modify the returned iterator * via the remove method throw * UnsupportedOperationException. * * @return an Iterator over the nodes in this * NodeSetData in document order */ Iterator iterator(); } ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/reference/ReferenceOctetStreamData.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/reference/ReferenceOctetS0000644000175000017500000000631211703064424032362 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id$ */ package org.apache.xml.security.signature.reference; import java.io.InputStream; /** * A representation of a ReferenceData type containing an OctetStream. */ public class ReferenceOctetStreamData implements ReferenceData { private InputStream octetStream; private String uri; private String mimeType; /** * Creates a new ReferenceOctetStreamData. * * @param octetStream the input stream containing the octets * @throws NullPointerException if octetStream is * null */ public ReferenceOctetStreamData(InputStream octetStream) { if (octetStream == null) { throw new NullPointerException("octetStream is null"); } this.octetStream = octetStream; } /** * Creates a new ReferenceOctetStreamData. * * @param octetStream the input stream containing the octets * @param uri the URI String identifying the data object (may be * null) * @param mimeType the MIME type associated with the data object (may be * null) * @throws NullPointerException if octetStream is * null */ public ReferenceOctetStreamData(InputStream octetStream, String uri, String mimeType) { if (octetStream == null) { throw new NullPointerException("octetStream is null"); } this.octetStream = octetStream; this.uri = uri; this.mimeType = mimeType; } /** * Returns the input stream of this ReferenceOctetStreamData. * * @return the input stream of this ReferenceOctetStreamData. */ public InputStream getOctetStream() { return octetStream; } /** * Returns the URI String identifying the data object represented by this * ReferenceOctetStreamData. * * @return the URI String or null if not applicable */ public String getURI() { return uri; } /** * Returns the MIME type associated with the data object represented by this * ReferenceOctetStreamData. * * @return the MIME type or null if not applicable */ public String getMimeType() { return mimeType; } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/reference/ReferenceSubTreeData.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/reference/ReferenceSubTre0000644000175000017500000001427512116066741032377 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id$ */ package org.apache.xml.security.signature.reference; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.ListIterator; import java.util.NoSuchElementException; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; /** * A representation of a ReferenceNodeSetData type containing a node-set. * This is a subtype of NodeSetData that represents a dereferenced * same-document URI as the root of a subdocument. The main reason is * for efficiency and performance, as some transforms can operate * directly on the subdocument and there is no need to convert it * first to an XPath node-set. */ public class ReferenceSubTreeData implements ReferenceNodeSetData { private boolean excludeComments; private Node root; public ReferenceSubTreeData(Node root, boolean excludeComments) { this.root = root; this.excludeComments = excludeComments; } public Iterator iterator() { return new DelayedNodeIterator(root, excludeComments); } public Node getRoot() { return root; } public boolean excludeComments() { return excludeComments; } /** * This is an Iterator that contains a backing node-set that is * not populated until the caller first attempts to advance the iterator. */ static class DelayedNodeIterator implements Iterator { private Node root; private List nodeSet; private ListIterator li; private boolean withComments; DelayedNodeIterator(Node root, boolean excludeComments) { this.root = root; this.withComments = !excludeComments; } public boolean hasNext() { if (nodeSet == null) { nodeSet = dereferenceSameDocumentURI(root); li = nodeSet.listIterator(); } return li.hasNext(); } public Node next() { if (nodeSet == null) { nodeSet = dereferenceSameDocumentURI(root); li = nodeSet.listIterator(); } if (li.hasNext()) { return li.next(); } else { throw new NoSuchElementException(); } } public void remove() { throw new UnsupportedOperationException(); } /** * Dereferences a same-document URI fragment. * * @param node the node (document or element) referenced by the * URI fragment. If null, returns an empty set. * @return a set of nodes (minus any comment nodes) */ private List dereferenceSameDocumentURI(Node node) { List nodeSet = new ArrayList(); if (node != null) { nodeSetMinusCommentNodes(node, nodeSet, null); } return nodeSet; } /** * Recursively traverses the subtree, and returns an XPath-equivalent * node-set of all nodes traversed, excluding any comment nodes, * if specified. * * @param node the node to traverse * @param nodeSet the set of nodes traversed so far * @param the previous sibling node */ @SuppressWarnings("fallthrough") private void nodeSetMinusCommentNodes(Node node, List nodeSet, Node prevSibling) { switch (node.getNodeType()) { case Node.ELEMENT_NODE : nodeSet.add(node); NamedNodeMap attrs = node.getAttributes(); if (attrs != null) { for (int i = 0, len = attrs.getLength(); i < len; i++) { nodeSet.add(attrs.item(i)); } } Node pSibling = null; for (Node child = node.getFirstChild(); child != null; child = child.getNextSibling()) { nodeSetMinusCommentNodes(child, nodeSet, pSibling); pSibling = child; } break; case Node.DOCUMENT_NODE : pSibling = null; for (Node child = node.getFirstChild(); child != null; child = child.getNextSibling()) { nodeSetMinusCommentNodes(child, nodeSet, pSibling); pSibling = child; } break; case Node.TEXT_NODE : case Node.CDATA_SECTION_NODE: // emulate XPath which only returns the first node in // contiguous text/cdata nodes if (prevSibling != null && (prevSibling.getNodeType() == Node.TEXT_NODE || prevSibling.getNodeType() == Node.CDATA_SECTION_NODE)) { return; } nodeSet.add(node); break; case Node.PROCESSING_INSTRUCTION_NODE : nodeSet.add(node); break; case Node.COMMENT_NODE: if (withComments) { nodeSet.add(node); } } } } } ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/ReferenceNotInitializedException.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/ReferenceNotInitializedEx0000644000175000017500000000447111555760614032463 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.signature; /** * Raised if verifying a {@link org.apache.xml.security.signature.Reference} fails * because of an uninitialized {@link org.apache.xml.security.signature.XMLSignatureInput} * * @author Christian Geuer-Pollmann */ public class ReferenceNotInitializedException extends XMLSignatureException { /** * */ private static final long serialVersionUID = 1L; /** * Constructor ReferenceNotInitializedException * */ public ReferenceNotInitializedException() { super(); } /** * Constructor ReferenceNotInitializedException * * @param msgID */ public ReferenceNotInitializedException(String msgID) { super(msgID); } /** * Constructor ReferenceNotInitializedException * * @param msgID * @param exArgs */ public ReferenceNotInitializedException(String msgID, Object exArgs[]) { super(msgID, exArgs); } /** * Constructor ReferenceNotInitializedException * * @param msgID * @param originalException */ public ReferenceNotInitializedException(String msgID, Exception originalException) { super(msgID, originalException); } /** * Constructor ReferenceNotInitializedException * * @param msgID * @param exArgs * @param originalException */ public ReferenceNotInitializedException(String msgID, Object exArgs[], Exception originalException) { super(msgID, exArgs, originalException); } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/XMLSignatureInput.java0000644000175000017500000004264712234743735031712 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.signature; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.ParserConfigurationException; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.implementations.CanonicalizerBase; import org.apache.xml.security.c14n.implementations.Canonicalizer20010315OmitComments; import org.apache.xml.security.c14n.implementations.Canonicalizer11_OmitComments; import org.apache.xml.security.exceptions.XMLSecurityRuntimeException; import org.apache.xml.security.utils.JavaUtils; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.xml.sax.SAXException; /** * Class XMLSignatureInput * * @author Christian Geuer-Pollmann * $todo$ check whether an XMLSignatureInput can be _both_, octet stream _and_ node set? */ public class XMLSignatureInput { /* * The XMLSignature Input can be either: * A byteArray like with/or without InputStream. * Or a nodeSet like defined either: * * as a collection of nodes * * or as subnode excluding or not comments and excluding or * not other nodes. */ /** * Some InputStreams do not support the {@link java.io.InputStream#reset} * method, so we read it in completely and work on our Proxy. */ private InputStream inputOctetStreamProxy = null; /** * The original NodeSet for this XMLSignatureInput */ private Set inputNodeSet = null; /** * The original Element */ private Node subNode = null; /** * Exclude Node *for enveloped transformations* */ private Node excludeNode = null; /** * */ private boolean excludeComments = false; private boolean isNodeSet = false; /** * A cached bytes */ private byte[] bytes = null; private boolean secureValidation; /** * Some Transforms may require explicit MIME type, charset (IANA registered * "character set"), or other such information concerning the data they are * receiving from an earlier Transform or the source data, although no * Transform algorithm specified in this document needs such explicit * information. Such data characteristics are provided as parameters to the * Transform algorithm and should be described in the specification for the * algorithm. */ private String mimeType = null; /** * Field sourceURI */ private String sourceURI = null; /** * Node Filter list. */ private List nodeFilters = new ArrayList(); private boolean needsToBeExpanded = false; private OutputStream outputStream = null; /** * Construct a XMLSignatureInput from an octet array. *

* This is a comfort method, which internally converts the byte[] array into * an InputStream *

NOTE: no defensive copy

* @param inputOctets an octet array which including XML document or node */ public XMLSignatureInput(byte[] inputOctets) { // NO defensive copy this.bytes = inputOctets; } /** * Constructs a XMLSignatureInput from an octet stream. The * stream is directly read. * * @param inputOctetStream */ public XMLSignatureInput(InputStream inputOctetStream) { this.inputOctetStreamProxy = inputOctetStream; } /** * Construct a XMLSignatureInput from a subtree rooted by rootNode. This * method included the node and all his descendants in the output. * * @param rootNode */ public XMLSignatureInput(Node rootNode) { this.subNode = rootNode; } /** * Constructor XMLSignatureInput * * @param inputNodeSet */ public XMLSignatureInput(Set inputNodeSet) { this.inputNodeSet = inputNodeSet; } /** * Check if the structure needs to be expanded. * @return true if so. */ public boolean isNeedsToBeExpanded() { return needsToBeExpanded; } /** * Set if the structure needs to be expanded. * @param needsToBeExpanded true if so. */ public void setNeedsToBeExpanded(boolean needsToBeExpanded) { this.needsToBeExpanded = needsToBeExpanded; } /** * Returns the node set from input which was specified as the parameter of * {@link XMLSignatureInput} constructor * * @return the node set * @throws SAXException * @throws IOException * @throws ParserConfigurationException * @throws CanonicalizationException */ public Set getNodeSet() throws CanonicalizationException, ParserConfigurationException, IOException, SAXException { return getNodeSet(false); } /** * Get the Input NodeSet. * @return the Input NodeSet. */ public Set getInputNodeSet() { return inputNodeSet; } /** * Returns the node set from input which was specified as the parameter of * {@link XMLSignatureInput} constructor * @param circumvent * * @return the node set * @throws SAXException * @throws IOException * @throws ParserConfigurationException * @throws CanonicalizationException */ public Set getNodeSet(boolean circumvent) throws ParserConfigurationException, IOException, SAXException, CanonicalizationException { if (inputNodeSet != null) { return inputNodeSet; } if (inputOctetStreamProxy == null && subNode != null) { if (circumvent) { XMLUtils.circumventBug2650(XMLUtils.getOwnerDocument(subNode)); } inputNodeSet = new LinkedHashSet(); XMLUtils.getSet(subNode, inputNodeSet, excludeNode, excludeComments); return inputNodeSet; } else if (isOctetStream()) { convertToNodes(); Set result = new LinkedHashSet(); XMLUtils.getSet(subNode, result, null, false); return result; } throw new RuntimeException("getNodeSet() called but no input data present"); } /** * Returns the Octet stream(byte Stream) from input which was specified as * the parameter of {@link XMLSignatureInput} constructor * * @return the Octet stream(byte Stream) from input which was specified as * the parameter of {@link XMLSignatureInput} constructor * @throws IOException */ public InputStream getOctetStream() throws IOException { if (inputOctetStreamProxy != null) { return inputOctetStreamProxy; } if (bytes != null) { inputOctetStreamProxy = new ByteArrayInputStream(bytes); return inputOctetStreamProxy; } return null; } /** * @return real octet stream */ public InputStream getOctetStreamReal() { return inputOctetStreamProxy; } /** * Returns the byte array from input which was specified as the parameter of * {@link XMLSignatureInput} constructor * * @return the byte[] from input which was specified as the parameter of * {@link XMLSignatureInput} constructor * * @throws CanonicalizationException * @throws IOException */ public byte[] getBytes() throws IOException, CanonicalizationException { byte[] inputBytes = getBytesFromInputStream(); if (inputBytes != null) { return inputBytes; } Canonicalizer20010315OmitComments c14nizer = new Canonicalizer20010315OmitComments(); bytes = c14nizer.engineCanonicalize(this); return bytes; } /** * Determines if the object has been set up with a Node set * * @return true if the object has been set up with a Node set */ public boolean isNodeSet() { return ((inputOctetStreamProxy == null && inputNodeSet != null) || isNodeSet); } /** * Determines if the object has been set up with an Element * * @return true if the object has been set up with an Element */ public boolean isElement() { return (inputOctetStreamProxy == null && subNode != null && inputNodeSet == null && !isNodeSet); } /** * Determines if the object has been set up with an octet stream * * @return true if the object has been set up with an octet stream */ public boolean isOctetStream() { return ((inputOctetStreamProxy != null || bytes != null) && (inputNodeSet == null && subNode == null)); } /** * Determines if {@link #setOutputStream} has been called with a * non-null OutputStream. * * @return true if {@link #setOutputStream} has been called with a * non-null OutputStream */ public boolean isOutputStreamSet() { return outputStream != null; } /** * Determines if the object has been set up with a ByteArray * * @return true is the object has been set up with an octet stream */ public boolean isByteArray() { return (bytes != null && (this.inputNodeSet == null && subNode == null)); } /** * Is the object correctly set up? * * @return true if the object has been set up correctly */ public boolean isInitialized() { return isOctetStream() || isNodeSet(); } /** * Returns mimeType * * @return mimeType */ public String getMIMEType() { return mimeType; } /** * Sets mimeType * * @param mimeType */ public void setMIMEType(String mimeType) { this.mimeType = mimeType; } /** * Return SourceURI * * @return SourceURI */ public String getSourceURI() { return sourceURI; } /** * Sets SourceURI * * @param sourceURI */ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } /** * Method toString * @inheritDoc */ public String toString() { if (isNodeSet()) { return "XMLSignatureInput/NodeSet/" + inputNodeSet.size() + " nodes/" + getSourceURI(); } if (isElement()) { return "XMLSignatureInput/Element/" + subNode + " exclude "+ excludeNode + " comments:" + excludeComments +"/" + getSourceURI(); } try { return "XMLSignatureInput/OctetStream/" + getBytes().length + " octets/" + getSourceURI(); } catch (IOException iex) { return "XMLSignatureInput/OctetStream//" + getSourceURI(); } catch (CanonicalizationException cex) { return "XMLSignatureInput/OctetStream//" + getSourceURI(); } } /** * Method getHTMLRepresentation * * @throws XMLSignatureException * @return The HTML representation for this XMLSignature */ public String getHTMLRepresentation() throws XMLSignatureException { XMLSignatureInputDebugger db = new XMLSignatureInputDebugger(this); return db.getHTMLRepresentation(); } /** * Method getHTMLRepresentation * * @param inclusiveNamespaces * @throws XMLSignatureException * @return The HTML representation for this XMLSignature */ public String getHTMLRepresentation(Set inclusiveNamespaces) throws XMLSignatureException { XMLSignatureInputDebugger db = new XMLSignatureInputDebugger(this, inclusiveNamespaces); return db.getHTMLRepresentation(); } /** * Gets the exclude node of this XMLSignatureInput * @return Returns the excludeNode. */ public Node getExcludeNode() { return excludeNode; } /** * Sets the exclude node of this XMLSignatureInput * @param excludeNode The excludeNode to set. */ public void setExcludeNode(Node excludeNode) { this.excludeNode = excludeNode; } /** * Gets the node of this XMLSignatureInput * @return The excludeNode set. */ public Node getSubNode() { return subNode; } /** * @return Returns the excludeComments. */ public boolean isExcludeComments() { return excludeComments; } /** * @param excludeComments The excludeComments to set. */ public void setExcludeComments(boolean excludeComments) { this.excludeComments = excludeComments; } /** * @param diOs * @throws IOException * @throws CanonicalizationException */ public void updateOutputStream(OutputStream diOs) throws CanonicalizationException, IOException { updateOutputStream(diOs, false); } public void updateOutputStream(OutputStream diOs, boolean c14n11) throws CanonicalizationException, IOException { if (diOs == outputStream) { return; } if (bytes != null) { diOs.write(bytes); } else if (inputOctetStreamProxy == null) { CanonicalizerBase c14nizer = null; if (c14n11) { c14nizer = new Canonicalizer11_OmitComments(); } else { c14nizer = new Canonicalizer20010315OmitComments(); } c14nizer.setWriter(diOs); c14nizer.engineCanonicalize(this); } else { byte[] buffer = new byte[4 * 1024]; int bytesread = 0; try { while ((bytesread = inputOctetStreamProxy.read(buffer)) != -1) { diOs.write(buffer, 0, bytesread); } } catch (IOException ex) { inputOctetStreamProxy.close(); throw ex; } } } /** * @param os */ public void setOutputStream(OutputStream os) { outputStream = os; } private byte[] getBytesFromInputStream() throws IOException { if (bytes != null) { return bytes; } if (inputOctetStreamProxy == null) { return null; } try { bytes = JavaUtils.getBytesFromStream(inputOctetStreamProxy); } finally { inputOctetStreamProxy.close(); } return bytes; } /** * @param filter */ public void addNodeFilter(NodeFilter filter) { if (isOctetStream()) { try { convertToNodes(); } catch (Exception e) { throw new XMLSecurityRuntimeException( "signature.XMLSignatureInput.nodesetReference", e ); } } nodeFilters.add(filter); } /** * @return the node filters */ public List getNodeFilters() { return nodeFilters; } /** * @param b */ public void setNodeSet(boolean b) { isNodeSet = b; } void convertToNodes() throws CanonicalizationException, ParserConfigurationException, IOException, SAXException { DocumentBuilder db = XMLUtils.createDocumentBuilder(false, secureValidation); // select all nodes, also the comments. try { db.setErrorHandler(new org.apache.xml.security.utils.IgnoreAllErrorHandler()); Document doc = db.parse(this.getOctetStream()); this.subNode = doc; } catch (SAXException ex) { // if a not-wellformed nodeset exists, put a container around it... ByteArrayOutputStream baos = new ByteArrayOutputStream(); baos.write("".getBytes("UTF-8")); baos.write(this.getBytes()); baos.write("".getBytes("UTF-8")); byte result[] = baos.toByteArray(); Document document = db.parse(new ByteArrayInputStream(result)); this.subNode = document.getDocumentElement().getFirstChild().getFirstChild(); } finally { if (this.inputOctetStreamProxy != null) { this.inputOctetStreamProxy.close(); } this.inputOctetStreamProxy = null; this.bytes = null; } } public boolean isSecureValidation() { return secureValidation; } public void setSecureValidation(boolean secureValidation) { this.secureValidation = secureValidation; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/SignatureProperty.java0000644000175000017500000001035611750731244032040 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.signature; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.SignatureElementProxy; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; /** * Handles <ds:SignatureProperty> elements * Additional information item concerning the generation of the signature(s) can * be placed in this Element * * @author Christian Geuer-Pollmann */ public class SignatureProperty extends SignatureElementProxy { /** * Constructs{@link SignatureProperty} using specified target attribute * * @param doc the {@link Document} in which XMLsignature is placed * @param target the target attribute references the Signature * element to which the property applies SignatureProperty */ public SignatureProperty(Document doc, String target) { this(doc, target, null); } /** * Constructs {@link SignatureProperty} using sepcified target attribute and * id attribute * * @param doc the {@link Document} in which XMLsignature is placed * @param target the target attribute references the Signature * element to which the property applies * @param id the id will be specified by {@link Reference#getURI} in validation */ public SignatureProperty(Document doc, String target, String id) { super(doc); this.setTarget(target); this.setId(id); } /** * Constructs a {@link SignatureProperty} from an {@link Element} * @param element SignatureProperty element * @param BaseURI the URI of the resource where the XML instance was stored * @throws XMLSecurityException */ public SignatureProperty(Element element, String BaseURI) throws XMLSecurityException { super(element, BaseURI); } /** * Sets the id attribute * * @param id the id attribute */ public void setId(String id) { if (id != null) { this.constructionElement.setAttributeNS(null, Constants._ATT_ID, id); this.constructionElement.setIdAttributeNS(null, Constants._ATT_ID, true); } } /** * Returns the id attribute * * @return the id attribute */ public String getId() { return this.constructionElement.getAttributeNS(null, Constants._ATT_ID); } /** * Sets the target attribute * * @param target the target attribute */ public void setTarget(String target) { if (target != null) { this.constructionElement.setAttributeNS(null, Constants._ATT_TARGET, target); } } /** * Returns the target attribute * * @return the target attribute */ public String getTarget() { return this.constructionElement.getAttributeNS(null, Constants._ATT_TARGET); } /** * Method appendChild * * @param node * @return the node in this element. */ public Node appendChild(Node node) { return this.constructionElement.appendChild(node); } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_SIGNATUREPROPERTY; } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/InvalidSignatureValueException.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/InvalidSignatureValueExce0000644000175000017500000000447311555760614032475 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.signature; /** * Raised if testing the signature value over DigestValue fails because of invalid signature. * * @see InvalidDigestValueException MissingKeyFailureException MissingResourceFailureException * @author Christian Geuer-Pollmann */ public class InvalidSignatureValueException extends XMLSignatureException { /** * */ private static final long serialVersionUID = 1L; /** * Constructor InvalidSignatureValueException * */ public InvalidSignatureValueException() { super(); } /** * Constructor InvalidSignatureValueException * * @param msgID */ public InvalidSignatureValueException(String msgID) { super(msgID); } /** * Constructor InvalidSignatureValueException * * @param msgID * @param exArgs */ public InvalidSignatureValueException(String msgID, Object exArgs[]) { super(msgID, exArgs); } /** * Constructor InvalidSignatureValueException * * @param msgID * @param originalException */ public InvalidSignatureValueException(String msgID, Exception originalException) { super(msgID, originalException); } /** * Constructor InvalidSignatureValueException * * @param msgID * @param exArgs * @param originalException */ public InvalidSignatureValueException(String msgID, Object exArgs[], Exception originalException) { super(msgID, exArgs, originalException); } } ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/MissingResourceFailureException.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/MissingResourceFailureExc0000644000175000017500000000705311555760614032511 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.signature; /** * Thrown by {@link org.apache.xml.security.signature.SignedInfo#verify()} when * testing the signature fails because of uninitialized * {@link org.apache.xml.security.signature.Reference}s. * * @author Christian Geuer-Pollmann * @see ReferenceNotInitializedException */ public class MissingResourceFailureException extends XMLSignatureException { /** * */ private static final long serialVersionUID = 1L; /** Field uninitializedReference */ private Reference uninitializedReference = null; /** * MissingKeyResourceFailureException constructor. * @param msgID * @param reference * @see #getReference */ public MissingResourceFailureException(String msgID, Reference reference) { super(msgID); this.uninitializedReference = reference; } /** * Constructor MissingResourceFailureException * * @param msgID * @param exArgs * @param reference * @see #getReference */ public MissingResourceFailureException(String msgID, Object exArgs[], Reference reference) { super(msgID, exArgs); this.uninitializedReference = reference; } /** * Constructor MissingResourceFailureException * * @param msgID * @param originalException * @param reference * @see #getReference */ public MissingResourceFailureException( String msgID, Exception originalException, Reference reference ) { super(msgID, originalException); this.uninitializedReference = reference; } /** * Constructor MissingResourceFailureException * * @param msgID * @param exArgs * @param originalException * @param reference * @see #getReference */ public MissingResourceFailureException( String msgID, Object exArgs[], Exception originalException, Reference reference ) { super(msgID, exArgs, originalException); this.uninitializedReference = reference; } /** * used to set the uninitialized {@link org.apache.xml.security.signature.Reference} * * @param reference the Reference object * @see #getReference */ public void setReference(Reference reference) { this.uninitializedReference = reference; } /** * used to get the uninitialized {@link org.apache.xml.security.signature.Reference} * * This allows to supply the correct {@link org.apache.xml.security.signature.XMLSignatureInput} * to the {@link org.apache.xml.security.signature.Reference} to try again verification. * * @return the Reference object * @see #setReference */ public Reference getReference() { return this.uninitializedReference; } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/XMLSignatureException.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/XMLSignatureException.jav0000644000175000017500000000435711555760614032404 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.signature; import org.apache.xml.security.exceptions.XMLSecurityException; /** * All XML Signature related exceptions inherit herefrom. * * @see MissingResourceFailureException InvalidDigestValueException InvalidSignatureValueException * @author Christian Geuer-Pollmann */ public class XMLSignatureException extends XMLSecurityException { /** * */ private static final long serialVersionUID = 1L; /** * Constructor XMLSignatureException * */ public XMLSignatureException() { super(); } /** * Constructor XMLSignatureException * * @param msgID */ public XMLSignatureException(String msgID) { super(msgID); } /** * Constructor XMLSignatureException * * @param msgID * @param exArgs */ public XMLSignatureException(String msgID, Object exArgs[]) { super(msgID, exArgs); } /** * Constructor XMLSignatureException * * @param msgID * @param originalException */ public XMLSignatureException(String msgID, Exception originalException) { super(msgID, originalException); } /** * Constructor XMLSignatureException * * @param msgID * @param exArgs * @param originalException */ public XMLSignatureException(String msgID, Object exArgs[], Exception originalException) { super(msgID, exArgs, originalException); } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/NodeFilter.java0000644000175000017500000000337011750731244030363 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.signature; import org.w3c.dom.Node; /** * An interface to tell to the c14n if a node is included or not in the output */ public interface NodeFilter { /** * Tells if a node must be output in c14n. * @param n * @return 1 if the node should be output. * 0 if node must not be output, * -1 if the node and all it's child must not be output. * */ int isNodeInclude(Node n); /** * Tells if a node must be output in a c14n. * The caller must assured that this method is always call * in document order. The implementations can use this * restriction to optimize the transformation. * @param n * @param level the relative level in the tree * @return 1 if the node should be output. * 0 if node must not be output, * -1 if the node and all it's child must not be output. */ int isNodeIncludeDO(Node n, int level); } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/XMLSignatureInputDebugger.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/XMLSignatureInputDebugger0000644000175000017500000004573311750472047032433 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.signature; import java.io.IOException; import java.io.StringWriter; import java.io.Writer; import java.util.Arrays; import java.util.Set; import org.apache.xml.security.c14n.helper.AttrCompare; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Attr; import org.w3c.dom.Comment; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.ProcessingInstruction; /** * Class XMLSignatureInputDebugger */ public class XMLSignatureInputDebugger { /** Field _xmlSignatureInput */ private Set xpathNodeSet; private Set inclusiveNamespaces; /** Field doc */ private Document doc = null; /** Field writer */ private Writer writer = null; /** The HTML Prefix* */ static final String HTMLPrefix = "\n" + "\n" + "\n" + "Caninical XML node set\n" + " \n" + "\n" + "\n" + "

Explanation of the output

\n" + "

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

\n" + "
    \n" + "
  • A node which is in the node set is labeled using the INCLUDED style.
  • \n" + "
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • \n" + "
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • \n" + "
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • \n" + "
\n" + "

Output

\n" + "
\n";

    /** HTML Suffix * */
    static final String HTMLSuffix = "
"; static final String HTMLExcludePrefix = ""; static final String HTMLIncludePrefix = ""; static final String HTMLIncludeOrExcludeSuffix = ""; static final String HTMLIncludedInclusiveNamespacePrefix = ""; static final String HTMLExcludedInclusiveNamespacePrefix = ""; private static final int NODE_BEFORE_DOCUMENT_ELEMENT = -1; private static final int NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT = 0; private static final int NODE_AFTER_DOCUMENT_ELEMENT = 1; static final AttrCompare ATTR_COMPARE = new AttrCompare(); /** * Constructor XMLSignatureInputDebugger * * @param xmlSignatureInput the signature to pretty print */ public XMLSignatureInputDebugger(XMLSignatureInput xmlSignatureInput) { if (!xmlSignatureInput.isNodeSet()) { this.xpathNodeSet = null; } else { this.xpathNodeSet = xmlSignatureInput.getInputNodeSet(); } } /** * Constructor XMLSignatureInputDebugger * * @param xmlSignatureInput the signatur to pretty print * @param inclusiveNamespace */ public XMLSignatureInputDebugger( XMLSignatureInput xmlSignatureInput, Set inclusiveNamespace ) { this(xmlSignatureInput); this.inclusiveNamespaces = inclusiveNamespace; } /** * Method getHTMLRepresentation * * @return The HTML Representation. * @throws XMLSignatureException */ public String getHTMLRepresentation() throws XMLSignatureException { if ((this.xpathNodeSet == null) || (this.xpathNodeSet.size() == 0)) { return HTMLPrefix + "no node set, sorry" + HTMLSuffix; } // get only a single node as anchor to fetch the owner document Node n = (Node) this.xpathNodeSet.iterator().next(); this.doc = XMLUtils.getOwnerDocument(n); try { this.writer = new StringWriter(); this.canonicalizeXPathNodeSet(this.doc); this.writer.close(); return this.writer.toString(); } catch (IOException ex) { throw new XMLSignatureException("empty", ex); } finally { this.xpathNodeSet = null; this.doc = null; this.writer = null; } } /** * Method canonicalizeXPathNodeSet * * @param currentNode * @throws XMLSignatureException * @throws IOException */ private void canonicalizeXPathNodeSet(Node currentNode) throws XMLSignatureException, IOException { int currentNodeType = currentNode.getNodeType(); switch (currentNodeType) { case Node.ENTITY_NODE: case Node.NOTATION_NODE: case Node.DOCUMENT_FRAGMENT_NODE: case Node.ATTRIBUTE_NODE: throw new XMLSignatureException("empty"); case Node.DOCUMENT_NODE: this.writer.write(HTMLPrefix); for (Node currentChild = currentNode.getFirstChild(); currentChild != null; currentChild = currentChild.getNextSibling()) { this.canonicalizeXPathNodeSet(currentChild); } this.writer.write(HTMLSuffix); break; case Node.COMMENT_NODE: if (this.xpathNodeSet.contains(currentNode)) { this.writer.write(HTMLIncludePrefix); } else { this.writer.write(HTMLExcludePrefix); } int position = getPositionRelativeToDocumentElement(currentNode); if (position == NODE_AFTER_DOCUMENT_ELEMENT) { this.writer.write("\n"); } this.outputCommentToWriter((Comment) currentNode); if (position == NODE_BEFORE_DOCUMENT_ELEMENT) { this.writer.write("\n"); } this.writer.write(HTMLIncludeOrExcludeSuffix); break; case Node.PROCESSING_INSTRUCTION_NODE: if (this.xpathNodeSet.contains(currentNode)) { this.writer.write(HTMLIncludePrefix); } else { this.writer.write(HTMLExcludePrefix); } position = getPositionRelativeToDocumentElement(currentNode); if (position == NODE_AFTER_DOCUMENT_ELEMENT) { this.writer.write("\n"); } this.outputPItoWriter((ProcessingInstruction) currentNode); if (position == NODE_BEFORE_DOCUMENT_ELEMENT) { this.writer.write("\n"); } this.writer.write(HTMLIncludeOrExcludeSuffix); break; case Node.TEXT_NODE: case Node.CDATA_SECTION_NODE: if (this.xpathNodeSet.contains(currentNode)) { this.writer.write(HTMLIncludePrefix); } else { this.writer.write(HTMLExcludePrefix); } outputTextToWriter(currentNode.getNodeValue()); for (Node nextSibling = currentNode.getNextSibling(); (nextSibling != null) && ((nextSibling.getNodeType() == Node.TEXT_NODE) || (nextSibling.getNodeType() == Node.CDATA_SECTION_NODE)); nextSibling = nextSibling.getNextSibling()) { /* * The XPath data model allows to select only the first of a * sequence of mixed text and CDATA nodes. But we must output * them all, so we must search: * * @see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6329 */ this.outputTextToWriter(nextSibling.getNodeValue()); } this.writer.write(HTMLIncludeOrExcludeSuffix); break; case Node.ELEMENT_NODE: Element currentElement = (Element) currentNode; if (this.xpathNodeSet.contains(currentNode)) { this.writer.write(HTMLIncludePrefix); } else { this.writer.write(HTMLExcludePrefix); } this.writer.write("<"); this.writer.write(currentElement.getTagName()); this.writer.write(HTMLIncludeOrExcludeSuffix); // we output all Attrs which are available NamedNodeMap attrs = currentElement.getAttributes(); int attrsLength = attrs.getLength(); Attr attrs2[] = new Attr[attrsLength]; for (int i = 0; i < attrsLength; i++) { attrs2[i] = (Attr)attrs.item(i); } Arrays.sort(attrs2, ATTR_COMPARE); Object attrs3[] = attrs2; for (int i = 0; i < attrsLength; i++) { Attr a = (Attr) attrs3[i]; boolean included = this.xpathNodeSet.contains(a); boolean inclusive = this.inclusiveNamespaces.contains(a.getName()); if (included) { if (inclusive) { // included and inclusive this.writer.write(HTMLIncludedInclusiveNamespacePrefix); } else { // included and not inclusive this.writer.write(HTMLIncludePrefix); } } else { if (inclusive) { // excluded and inclusive this.writer.write(HTMLExcludedInclusiveNamespacePrefix); } else { // excluded and not inclusive this.writer.write(HTMLExcludePrefix); } } this.outputAttrToWriter(a.getNodeName(), a.getNodeValue()); this.writer.write(HTMLIncludeOrExcludeSuffix); } if (this.xpathNodeSet.contains(currentNode)) { this.writer.write(HTMLIncludePrefix); } else { this.writer.write(HTMLExcludePrefix); } this.writer.write(">"); this.writer.write(HTMLIncludeOrExcludeSuffix); // traversal for (Node currentChild = currentNode.getFirstChild(); currentChild != null; currentChild = currentChild.getNextSibling()) { this.canonicalizeXPathNodeSet(currentChild); } if (this.xpathNodeSet.contains(currentNode)) { this.writer.write(HTMLIncludePrefix); } else { this.writer.write(HTMLExcludePrefix); } this.writer.write("</"); this.writer.write(currentElement.getTagName()); this.writer.write(">"); this.writer.write(HTMLIncludeOrExcludeSuffix); break; case Node.DOCUMENT_TYPE_NODE: default: break; } } /** * Checks whether a Comment or ProcessingInstruction is before or after the * document element. This is needed for prepending or appending "\n"s. * * @param currentNode * comment or pi to check * @return NODE_BEFORE_DOCUMENT_ELEMENT, * NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT or * NODE_AFTER_DOCUMENT_ELEMENT * @see #NODE_BEFORE_DOCUMENT_ELEMENT * @see #NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT * @see #NODE_AFTER_DOCUMENT_ELEMENT */ private int getPositionRelativeToDocumentElement(Node currentNode) { if (currentNode == null) { return NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT; } Document doc = currentNode.getOwnerDocument(); if (currentNode.getParentNode() != doc) { return NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT; } Element documentElement = doc.getDocumentElement(); if (documentElement == null) { return NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT; } if (documentElement == currentNode) { return NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT; } for (Node x = currentNode; x != null; x = x.getNextSibling()) { if (x == documentElement) { return NODE_BEFORE_DOCUMENT_ELEMENT; } } return NODE_AFTER_DOCUMENT_ELEMENT; } /** * Normalizes an {@link Attr}ibute value * * The string value of the node is modified by replacing *
    *
  • all ampersands (&) with &amp;
  • *
  • all open angle brackets (<) with &lt;
  • *
  • all quotation mark characters with &quot;
  • *
  • and the whitespace characters #x9, #xA, and #xD, * with character references. The character references are written in * uppercase hexadecimal with no leading zeroes (for example, #xD * is represented by the character reference &#xD;)
  • *
* * @param name * @param value * @throws IOException */ private void outputAttrToWriter(String name, String value) throws IOException { this.writer.write(" "); this.writer.write(name); this.writer.write("=\""); int length = value.length(); for (int i = 0; i < length; i++) { char c = value.charAt(i); switch (c) { case '&': this.writer.write("&amp;"); break; case '<': this.writer.write("&lt;"); break; case '"': this.writer.write("&quot;"); break; case 0x09: // '\t' this.writer.write("&#x9;"); break; case 0x0A: // '\n' this.writer.write("&#xA;"); break; case 0x0D: // '\r' this.writer.write("&#xD;"); break; default: this.writer.write(c); break; } } this.writer.write("\""); } /** * Normalizes a {@link org.w3c.dom.Comment} value * * @param currentPI * @throws IOException */ private void outputPItoWriter(ProcessingInstruction currentPI) throws IOException { if (currentPI == null) { return; } this.writer.write("<?"); String target = currentPI.getTarget(); int length = target.length(); for (int i = 0; i < length; i++) { char c = target.charAt(i); switch (c) { case 0x0D: this.writer.write("&#xD;"); break; case ' ': this.writer.write("·"); break; case '\n': this.writer.write("¶\n"); break; default: this.writer.write(c); break; } } String data = currentPI.getData(); length = data.length(); if (length > 0) { this.writer.write(" "); for (int i = 0; i < length; i++) { char c = data.charAt(i); switch (c) { case 0x0D: this.writer.write("&#xD;"); break; default: this.writer.write(c); break; } } } this.writer.write("?>"); } /** * Method outputCommentToWriter * * @param currentComment * @throws IOException */ private void outputCommentToWriter(Comment currentComment) throws IOException { if (currentComment == null) { return; } this.writer.write("<!--"); String data = currentComment.getData(); int length = data.length(); for (int i = 0; i < length; i++) { char c = data.charAt(i); switch (c) { case 0x0D: this.writer.write("&#xD;"); break; case ' ': this.writer.write("·"); break; case '\n': this.writer.write("¶\n"); break; default: this.writer.write(c); break; } } this.writer.write("-->"); } /** * Method outputTextToWriter * * @param text * @throws IOException */ private void outputTextToWriter(String text) throws IOException { if (text == null) { return; } int length = text.length(); for (int i = 0; i < length; i++) { char c = text.charAt(i); switch (c) { case '&': this.writer.write("&amp;"); break; case '<': this.writer.write("&lt;"); break; case '>': this.writer.write("&gt;"); break; case 0xD: this.writer.write("&#xD;"); break; case ' ': this.writer.write("·"); break; case '\n': this.writer.write("¶\n"); break; default: this.writer.write(c); break; } } } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/signature/SignedInfo.java0000644000175000017500000003472712234743735030375 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.signature; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.OutputStream; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; import javax.xml.parsers.ParserConfigurationException; import org.apache.xml.security.algorithms.SignatureAlgorithm; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.c14n.InvalidCanonicalizerException; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.apache.xml.security.transforms.params.InclusiveNamespaces; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.xml.sax.SAXException; /** * Handles <ds:SignedInfo> elements * This SignedInfo element includes the canonicalization algorithm, * a signature algorithm, and one or more references. * * @author Christian Geuer-Pollmann */ public class SignedInfo extends Manifest { /** Field signatureAlgorithm */ private SignatureAlgorithm signatureAlgorithm = null; /** Field c14nizedBytes */ private byte[] c14nizedBytes = null; private Element c14nMethod; private Element signatureMethod; /** * Overwrites {@link Manifest#addDocument} because it creates another * Element. * * @param doc the {@link Document} in which XMLsignature will * be placed * @throws XMLSecurityException */ public SignedInfo(Document doc) throws XMLSecurityException { this(doc, XMLSignature.ALGO_ID_SIGNATURE_DSA, Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS); } /** * Constructs {@link SignedInfo} using given Canonicalization algorithm and * Signature algorithm. * * @param doc SignedInfo is placed in this document * @param signatureMethodURI URI representation of the Digest and * Signature algorithm * @param canonicalizationMethodURI URI representation of the * Canonicalization method * @throws XMLSecurityException */ public SignedInfo( Document doc, String signatureMethodURI, String canonicalizationMethodURI ) throws XMLSecurityException { this(doc, signatureMethodURI, 0, canonicalizationMethodURI); } /** * Constructor SignedInfo * * @param doc SignedInfo is placed in this document * @param signatureMethodURI URI representation of the Digest and * Signature algorithm * @param hMACOutputLength * @param canonicalizationMethodURI URI representation of the * Canonicalization method * @throws XMLSecurityException */ public SignedInfo( Document doc, String signatureMethodURI, int hMACOutputLength, String canonicalizationMethodURI ) throws XMLSecurityException { super(doc); c14nMethod = XMLUtils.createElementInSignatureSpace(this.doc, Constants._TAG_CANONICALIZATIONMETHOD); c14nMethod.setAttributeNS(null, Constants._ATT_ALGORITHM, canonicalizationMethodURI); this.constructionElement.appendChild(c14nMethod); XMLUtils.addReturnToElement(this.constructionElement); if (hMACOutputLength > 0) { this.signatureAlgorithm = new SignatureAlgorithm(this.doc, signatureMethodURI, hMACOutputLength); } else { this.signatureAlgorithm = new SignatureAlgorithm(this.doc, signatureMethodURI); } signatureMethod = this.signatureAlgorithm.getElement(); this.constructionElement.appendChild(signatureMethod); XMLUtils.addReturnToElement(this.constructionElement); } /** * @param doc * @param signatureMethodElem * @param canonicalizationMethodElem * @throws XMLSecurityException */ public SignedInfo( Document doc, Element signatureMethodElem, Element canonicalizationMethodElem ) throws XMLSecurityException { super(doc); // Check this? this.c14nMethod = canonicalizationMethodElem; this.constructionElement.appendChild(c14nMethod); XMLUtils.addReturnToElement(this.constructionElement); this.signatureAlgorithm = new SignatureAlgorithm(signatureMethodElem, null); signatureMethod = this.signatureAlgorithm.getElement(); this.constructionElement.appendChild(signatureMethod); XMLUtils.addReturnToElement(this.constructionElement); } /** * Build a {@link SignedInfo} from an {@link Element} * * @param element SignedInfo * @param baseURI the URI of the resource where the XML instance was stored * @throws XMLSecurityException * @see * Question * @see * Answer */ public SignedInfo(Element element, String baseURI) throws XMLSecurityException { this(element, baseURI, false); } /** * Build a {@link SignedInfo} from an {@link Element} * * @param element SignedInfo * @param baseURI the URI of the resource where the XML instance was stored * @param secureValidation whether secure validation is enabled or not * @throws XMLSecurityException * @see * Question * @see * Answer */ public SignedInfo( Element element, String baseURI, boolean secureValidation ) throws XMLSecurityException { // Parse the Reference children and Id attribute in the Manifest super(reparseSignedInfoElem(element, secureValidation), baseURI, secureValidation); c14nMethod = XMLUtils.getNextElement(element.getFirstChild()); signatureMethod = XMLUtils.getNextElement(c14nMethod.getNextSibling()); this.signatureAlgorithm = new SignatureAlgorithm(signatureMethod, this.getBaseURI(), secureValidation); } private static Element reparseSignedInfoElem(Element element, boolean secureValidation) throws XMLSecurityException { /* * If a custom canonicalizationMethod is used, canonicalize * ds:SignedInfo, reparse it into a new document * and replace the original not-canonicalized ds:SignedInfo by * the re-parsed canonicalized one. */ Element c14nMethod = XMLUtils.getNextElement(element.getFirstChild()); String c14nMethodURI = c14nMethod.getAttributeNS(null, Constants._ATT_ALGORITHM); if (!(c14nMethodURI.equals(Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS) || c14nMethodURI.equals(Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS) || c14nMethodURI.equals(Canonicalizer.ALGO_ID_C14N_EXCL_OMIT_COMMENTS) || c14nMethodURI.equals(Canonicalizer.ALGO_ID_C14N_EXCL_WITH_COMMENTS) || c14nMethodURI.equals(Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS) || c14nMethodURI.equals(Canonicalizer.ALGO_ID_C14N11_WITH_COMMENTS))) { // the c14n is not a secure one and can rewrite the URIs or like // so reparse the SignedInfo to be sure try { Canonicalizer c14nizer = Canonicalizer.getInstance(c14nMethodURI); c14nizer.setSecureValidation(secureValidation); byte[] c14nizedBytes = c14nizer.canonicalizeSubtree(element); javax.xml.parsers.DocumentBuilder db = XMLUtils.createDocumentBuilder(false, secureValidation); Document newdoc = db.parse(new ByteArrayInputStream(c14nizedBytes)); Node imported = element.getOwnerDocument().importNode(newdoc.getDocumentElement(), true); element.getParentNode().replaceChild(imported, element); return (Element) imported; } catch (ParserConfigurationException ex) { throw new XMLSecurityException("empty", ex); } catch (IOException ex) { throw new XMLSecurityException("empty", ex); } catch (SAXException ex) { throw new XMLSecurityException("empty", ex); } } return element; } /** * Tests core validation process * * @return true if verification was successful * @throws MissingResourceFailureException * @throws XMLSecurityException */ public boolean verify() throws MissingResourceFailureException, XMLSecurityException { return super.verifyReferences(false); } /** * Tests core validation process * * @param followManifests defines whether the verification process has to verify referenced ds:Manifests, too * @return true if verification was successful * @throws MissingResourceFailureException * @throws XMLSecurityException */ public boolean verify(boolean followManifests) throws MissingResourceFailureException, XMLSecurityException { return super.verifyReferences(followManifests); } /** * Returns getCanonicalizedOctetStream * * @return the canonicalization result octet stream of SignedInfo element * @throws CanonicalizationException * @throws InvalidCanonicalizerException * @throws XMLSecurityException */ public byte[] getCanonicalizedOctetStream() throws CanonicalizationException, InvalidCanonicalizerException, XMLSecurityException { if (this.c14nizedBytes == null) { Canonicalizer c14nizer = Canonicalizer.getInstance(this.getCanonicalizationMethodURI()); c14nizer.setSecureValidation(isSecureValidation()); this.c14nizedBytes = c14nizer.canonicalizeSubtree(this.constructionElement); } // make defensive copy return (byte[]) this.c14nizedBytes.clone(); } /** * Output the C14n stream to the given OutputStream. * @param os * @throws CanonicalizationException * @throws InvalidCanonicalizerException * @throws XMLSecurityException */ public void signInOctetStream(OutputStream os) throws CanonicalizationException, InvalidCanonicalizerException, XMLSecurityException { if (this.c14nizedBytes == null) { Canonicalizer c14nizer = Canonicalizer.getInstance(this.getCanonicalizationMethodURI()); c14nizer.setSecureValidation(isSecureValidation()); c14nizer.setWriter(os); String inclusiveNamespaces = this.getInclusiveNamespaces(); if (inclusiveNamespaces == null) { c14nizer.canonicalizeSubtree(this.constructionElement); } else { c14nizer.canonicalizeSubtree(this.constructionElement, inclusiveNamespaces); } } else { try { os.write(this.c14nizedBytes); } catch (IOException e) { throw new RuntimeException(e); } } } /** * Returns the Canonicalization method URI * * @return the Canonicalization method URI */ public String getCanonicalizationMethodURI() { return c14nMethod.getAttributeNS(null, Constants._ATT_ALGORITHM); } /** * Returns the Signature method URI * * @return the Signature method URI */ public String getSignatureMethodURI() { Element signatureElement = this.getSignatureMethodElement(); if (signatureElement != null) { return signatureElement.getAttributeNS(null, Constants._ATT_ALGORITHM); } return null; } /** * Method getSignatureMethodElement * @return returns the SignatureMethod Element * */ public Element getSignatureMethodElement() { return signatureMethod; } /** * Creates a SecretKey for the appropriate Mac algorithm based on a * byte[] array password. * * @param secretKeyBytes * @return the secret key for the SignedInfo element. */ public SecretKey createSecretKey(byte[] secretKeyBytes) { return new SecretKeySpec(secretKeyBytes, this.signatureAlgorithm.getJCEAlgorithmString()); } protected SignatureAlgorithm getSignatureAlgorithm() { return signatureAlgorithm; } /** * Method getBaseLocalName * @inheritDoc * */ public String getBaseLocalName() { return Constants._TAG_SIGNEDINFO; } public String getInclusiveNamespaces() { String c14nMethodURI = c14nMethod.getAttributeNS(null, Constants._ATT_ALGORITHM); if (!(c14nMethodURI.equals("http://www.w3.org/2001/10/xml-exc-c14n#") || c14nMethodURI.equals("http://www.w3.org/2001/10/xml-exc-c14n#WithComments"))) { return null; } Element inclusiveElement = XMLUtils.getNextElement(c14nMethod.getFirstChild()); if (inclusiveElement != null) { try { String inclusiveNamespaces = new InclusiveNamespaces( inclusiveElement, InclusiveNamespaces.ExclusiveCanonicalizationNamespace ).getInclusiveNamespaces(); return inclusiveNamespaces; } catch (XMLSecurityException e) { return null; } } return null; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/exceptions/0000755000175000017500000000000012273503733025643 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/exceptions/package.html0000644000175000017500000000013107533712503030117 0ustar tonytony

general exceptions used by this library.

././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/exceptions/XMLSecurityRuntimeException.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/exceptions/XMLSecurityRuntimeExcept0000644000175000017500000001256311713726667032515 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.exceptions; import java.io.PrintStream; import java.io.PrintWriter; import java.text.MessageFormat; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.I18n; /** * The mother of all runtime Exceptions in this bundle. It allows exceptions to have * their messages translated to the different locales. * * The xmlsecurity_en.properties file contains this line: *
 * xml.WrongElement = Can't create a {0} from a {1} element
 * 
* * Usage in the Java source is: *
 * {
 *    Object exArgs[] = { Constants._TAG_TRANSFORMS, "BadElement" };
 *
 *    throw new XMLSecurityException("xml.WrongElement", exArgs);
 * }
 * 
* * Additionally, if another Exception has been caught, we can supply it, too> *
 * try {
 *    ...
 * } catch (Exception oldEx) {
 *    Object exArgs[] = { Constants._TAG_TRANSFORMS, "BadElement" };
 *
 *    throw new XMLSecurityException("xml.WrongElement", exArgs, oldEx);
 * }
 * 
* * * @author Christian Geuer-Pollmann */ public class XMLSecurityRuntimeException extends RuntimeException { private static final long serialVersionUID = 1L; /** Field msgID */ protected String msgID; /** * Constructor XMLSecurityRuntimeException * */ public XMLSecurityRuntimeException() { super("Missing message string"); this.msgID = null; } /** * Constructor XMLSecurityRuntimeException * * @param msgID */ public XMLSecurityRuntimeException(String msgID) { super(I18n.getExceptionMessage(msgID)); this.msgID = msgID; } /** * Constructor XMLSecurityRuntimeException * * @param msgID * @param exArgs */ public XMLSecurityRuntimeException(String msgID, Object exArgs[]) { super(MessageFormat.format(I18n.getExceptionMessage(msgID), exArgs)); this.msgID = msgID; } /** * Constructor XMLSecurityRuntimeException * * @param originalException */ public XMLSecurityRuntimeException(Exception originalException) { super("Missing message ID to locate message string in resource bundle \"" + Constants.exceptionMessagesResourceBundleBase + "\". Original Exception was a " + originalException.getClass().getName() + " and message " + originalException.getMessage(), originalException); } /** * Constructor XMLSecurityRuntimeException * * @param msgID * @param originalException */ public XMLSecurityRuntimeException(String msgID, Exception originalException) { super(I18n.getExceptionMessage(msgID, originalException), originalException); this.msgID = msgID; } /** * Constructor XMLSecurityRuntimeException * * @param msgID * @param exArgs * @param originalException */ public XMLSecurityRuntimeException(String msgID, Object exArgs[], Exception originalException) { super(MessageFormat.format(I18n.getExceptionMessage(msgID), exArgs)); this.msgID = msgID; } /** * Method getMsgID * * @return the messageId */ public String getMsgID() { if (msgID == null) { return "Missing message ID"; } return msgID; } /** @inheritDoc */ public String toString() { String s = this.getClass().getName(); String message = super.getLocalizedMessage(); if (message != null) { message = s + ": " + message; } else { message = s; } if (this.getCause() != null) { message = message + "\nOriginal Exception was " + this.getCause().toString(); } return message; } /** * Method printStackTrace * */ public void printStackTrace() { synchronized (System.err) { super.printStackTrace(System.err); } } /** * Method printStackTrace * * @param printwriter */ public void printStackTrace(PrintWriter printwriter) { super.printStackTrace(printwriter); } /** * Method printStackTrace * * @param printstream */ public void printStackTrace(PrintStream printstream) { super.printStackTrace(printstream); } /** * Method getOriginalException * * @return the original exception */ public Exception getOriginalException() { if (this.getCause() instanceof Exception) { return (Exception)this.getCause(); } return null; } }././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/exceptions/XMLSecurityException.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/exceptions/XMLSecurityException.jav0000644000175000017500000001246011713725356032424 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.exceptions; import java.io.PrintStream; import java.io.PrintWriter; import java.text.MessageFormat; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.I18n; /** * The mother of all Exceptions in this bundle. It allows exceptions to have * their messages translated to the different locales. * * The xmlsecurity_en.properties file contains this line: *
 * xml.WrongElement = Can't create a {0} from a {1} element
 * 
* * Usage in the Java source is: *
 * {
 *    Object exArgs[] = { Constants._TAG_TRANSFORMS, "BadElement" };
 *
 *    throw new XMLSecurityException("xml.WrongElement", exArgs);
 * }
 * 
* * Additionally, if another Exception has been caught, we can supply it, too> *
 * try {
 *    ...
 * } catch (Exception oldEx) {
 *    Object exArgs[] = { Constants._TAG_TRANSFORMS, "BadElement" };
 *
 *    throw new XMLSecurityException("xml.WrongElement", exArgs, oldEx);
 * }
 * 
* * * @author Christian Geuer-Pollmann */ public class XMLSecurityException extends Exception { /** * */ private static final long serialVersionUID = 1L; /** Field msgID */ protected String msgID; /** * Constructor XMLSecurityException * */ public XMLSecurityException() { super("Missing message string"); this.msgID = null; } /** * Constructor XMLSecurityException * * @param msgID */ public XMLSecurityException(String msgID) { super(I18n.getExceptionMessage(msgID)); this.msgID = msgID; } /** * Constructor XMLSecurityException * * @param msgID * @param exArgs */ public XMLSecurityException(String msgID, Object exArgs[]) { super(MessageFormat.format(I18n.getExceptionMessage(msgID), exArgs)); this.msgID = msgID; } /** * Constructor XMLSecurityException * * @param originalException */ public XMLSecurityException(Exception originalException) { super("Missing message ID to locate message string in resource bundle \"" + Constants.exceptionMessagesResourceBundleBase + "\". Original Exception was a " + originalException.getClass().getName() + " and message " + originalException.getMessage(), originalException); } /** * Constructor XMLSecurityException * * @param msgID * @param originalException */ public XMLSecurityException(String msgID, Exception originalException) { super(I18n.getExceptionMessage(msgID, originalException), originalException); this.msgID = msgID; } /** * Constructor XMLSecurityException * * @param msgID * @param exArgs * @param originalException */ public XMLSecurityException(String msgID, Object exArgs[], Exception originalException) { super(MessageFormat.format(I18n.getExceptionMessage(msgID), exArgs), originalException); this.msgID = msgID; } /** * Method getMsgID * * @return the messageId */ public String getMsgID() { if (msgID == null) { return "Missing message ID"; } return msgID; } /** @inheritDoc */ public String toString() { String s = this.getClass().getName(); String message = super.getLocalizedMessage(); if (message != null) { message = s + ": " + message; } else { message = s; } if (super.getCause() != null) { message = message + "\nOriginal Exception was " + super.getCause().toString(); } return message; } /** * Method printStackTrace * */ public void printStackTrace() { synchronized (System.err) { super.printStackTrace(System.err); } } /** * Method printStackTrace * * @param printwriter */ public void printStackTrace(PrintWriter printwriter) { super.printStackTrace(printwriter); } /** * Method printStackTrace * * @param printstream */ public void printStackTrace(PrintStream printstream) { super.printStackTrace(printstream); } /** * Method getOriginalException * * @return the original exception */ public Exception getOriginalException() { if (this.getCause() instanceof Exception) { return (Exception)this.getCause(); } return null; } } ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/exceptions/AlgorithmAlreadyRegisteredException.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/exceptions/AlgorithmAlreadyRegister0000644000175000017500000000421711553001352032515 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.exceptions; public class AlgorithmAlreadyRegisteredException extends XMLSecurityException { /** * */ private static final long serialVersionUID = 1L; /** * Constructor AlgorithmAlreadyRegisteredException * */ public AlgorithmAlreadyRegisteredException() { super(); } /** * Constructor AlgorithmAlreadyRegisteredException * * @param msgID */ public AlgorithmAlreadyRegisteredException(String msgID) { super(msgID); } /** * Constructor AlgorithmAlreadyRegisteredException * * @param msgID * @param exArgs */ public AlgorithmAlreadyRegisteredException(String msgID, Object exArgs[]) { super(msgID, exArgs); } /** * Constructor AlgorithmAlreadyRegisteredException * * @param msgID * @param originalException */ public AlgorithmAlreadyRegisteredException(String msgID, Exception originalException) { super(msgID, originalException); } /** * Constructor AlgorithmAlreadyRegisteredException * * @param msgID * @param exArgs * @param originalException */ public AlgorithmAlreadyRegisteredException( String msgID, Object exArgs[], Exception originalException ) { super(msgID, exArgs, originalException); } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/exceptions/Base64DecodingException.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/exceptions/Base64DecodingException.0000644000175000017500000000412311553001352032172 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.exceptions; /** * This Exception is thrown if decoding of Base64 data fails. * * @author Christian Geuer-Pollmann */ public class Base64DecodingException extends XMLSecurityException { private static final long serialVersionUID = 1L; /** * Constructor Base64DecodingException * */ public Base64DecodingException() { super(); } /** * Constructor Base64DecodingException * * @param msgID */ public Base64DecodingException(String msgID) { super(msgID); } /** * Constructor Base64DecodingException * * @param msgID * @param exArgs */ public Base64DecodingException(String msgID, Object exArgs[]) { super(msgID, exArgs); } /** * Constructor Base64DecodingException * * @param msgID * @param originalException */ public Base64DecodingException(String msgID, Exception originalException) { super(msgID, originalException); } /** * Constructor Base64DecodingException * * @param msgID * @param exArgs * @param originalException */ public Base64DecodingException(String msgID, Object exArgs[], Exception originalException) { super(msgID, exArgs, originalException); } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/algorithms/0000755000175000017500000000000012273503734025634 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/algorithms/package.html0000644000175000017500000000010407533712503030107 0ustar tonytony

algorithm factories.

libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/algorithms/implementations/0000755000175000017500000000000012273503734031044 5ustar tonytony././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/algorithms/implementations/package.htmllibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/algorithms/implementations/package.0000644000175000017500000000021207533712503032432 0ustar tonytony

implementations of {@link org.apache.xml.security.algorithms.SignatureAlgorithmSpi}.

././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/algorithms/implementations/SignatureECDSA.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/algorithms/implementations/Signatur0000644000175000017500000003470611553001352032562 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.algorithms.implementations; import java.io.IOException; import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException; import java.security.Key; import java.security.NoSuchProviderException; import java.security.PrivateKey; import java.security.PublicKey; import java.security.SecureRandom; import java.security.Signature; import java.security.SignatureException; import java.security.spec.AlgorithmParameterSpec; import org.apache.xml.security.algorithms.JCEMapper; import org.apache.xml.security.algorithms.SignatureAlgorithmSpi; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.signature.XMLSignatureException; import org.apache.xml.security.utils.Base64; /** * * @author $Author: raul $ * @author Alex Dupre */ public abstract class SignatureECDSA extends SignatureAlgorithmSpi { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(SignatureECDSA.class); /** @inheritDoc */ public abstract String engineGetURI(); /** Field algorithm */ private java.security.Signature signatureAlgorithm = null; /** * Converts an ASN.1 ECDSA value to a XML Signature ECDSA Value. * * The JAVA JCE ECDSA Signature algorithm creates ASN.1 encoded (r,s) value * pairs; the XML Signature requires the core BigInteger values. * * @param asn1Bytes * @return the decode bytes * * @throws IOException * @see 6.4.1 DSA * @see 3.3. ECDSA Signatures */ public static byte[] convertASN1toXMLDSIG(byte asn1Bytes[]) throws IOException { if (asn1Bytes.length < 8 || asn1Bytes[0] != 48) { throw new IOException("Invalid ASN.1 format of ECDSA signature"); } int offset; if (asn1Bytes[1] > 0) { offset = 2; } else if (asn1Bytes[1] == (byte) 0x81) { offset = 3; } else { throw new IOException("Invalid ASN.1 format of ECDSA signature"); } byte rLength = asn1Bytes[offset + 1]; int i; for (i = rLength; (i > 0) && (asn1Bytes[(offset + 2 + rLength) - i] == 0); i--); byte sLength = asn1Bytes[offset + 2 + rLength + 1]; int j; for (j = sLength; (j > 0) && (asn1Bytes[(offset + 2 + rLength + 2 + sLength) - j] == 0); j--); int rawLen = Math.max(i, j); if ((asn1Bytes[offset - 1] & 0xff) != asn1Bytes.length - offset || (asn1Bytes[offset - 1] & 0xff) != 2 + rLength + 2 + sLength || asn1Bytes[offset] != 2 || asn1Bytes[offset + 2 + rLength] != 2) { throw new IOException("Invalid ASN.1 format of ECDSA signature"); } byte xmldsigBytes[] = new byte[2*rawLen]; System.arraycopy(asn1Bytes, (offset + 2 + rLength) - i, xmldsigBytes, rawLen - i, i); System.arraycopy(asn1Bytes, (offset + 2 + rLength + 2 + sLength) - j, xmldsigBytes, 2*rawLen - j, j); return xmldsigBytes; } /** * Converts a XML Signature ECDSA Value to an ASN.1 DSA value. * * The JAVA JCE ECDSA Signature algorithm creates ASN.1 encoded (r,s) value * pairs; the XML Signature requires the core BigInteger values. * * @param xmldsigBytes * @return the encoded ASN.1 bytes * * @throws IOException * @see 6.4.1 DSA * @see 3.3. ECDSA Signatures */ public static byte[] convertXMLDSIGtoASN1(byte xmldsigBytes[]) throws IOException { int rawLen = xmldsigBytes.length/2; int i; for (i = rawLen; (i > 0) && (xmldsigBytes[rawLen - i] == 0); i--); int j = i; if (xmldsigBytes[rawLen - i] < 0) { j += 1; } int k; for (k = rawLen; (k > 0) && (xmldsigBytes[2*rawLen - k] == 0); k--); int l = k; if (xmldsigBytes[2*rawLen - k] < 0) { l += 1; } int len = 2 + j + 2 + l; if (len > 255) { throw new IOException("Invalid XMLDSIG format of ECDSA signature"); } int offset; byte asn1Bytes[]; if (len < 128) { asn1Bytes = new byte[2 + 2 + j + 2 + l]; offset = 1; } else { asn1Bytes = new byte[3 + 2 + j + 2 + l]; asn1Bytes[1] = (byte) 0x81; offset = 2; } asn1Bytes[0] = 48; asn1Bytes[offset++] = (byte) len; asn1Bytes[offset++] = 2; asn1Bytes[offset++] = (byte) j; System.arraycopy(xmldsigBytes, rawLen - i, asn1Bytes, (offset + j) - i, i); offset += j; asn1Bytes[offset++] = 2; asn1Bytes[offset++] = (byte) l; System.arraycopy(xmldsigBytes, 2*rawLen - k, asn1Bytes, (offset + l) - k, k); return asn1Bytes; } /** * Constructor SignatureRSA * * @throws XMLSignatureException */ public SignatureECDSA() throws XMLSignatureException { String algorithmID = JCEMapper.translateURItoJCEID(this.engineGetURI()); if (log.isDebugEnabled()) { log.debug("Created SignatureECDSA using " + algorithmID); } String provider = JCEMapper.getProviderId(); try { if (provider == null) { this.signatureAlgorithm = Signature.getInstance(algorithmID); } else { this.signatureAlgorithm = Signature.getInstance(algorithmID,provider); } } catch (java.security.NoSuchAlgorithmException ex) { Object[] exArgs = { algorithmID, ex.getLocalizedMessage() }; throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs); } catch (NoSuchProviderException ex) { Object[] exArgs = { algorithmID, ex.getLocalizedMessage() }; throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs); } } /** @inheritDoc */ protected void engineSetParameter(AlgorithmParameterSpec params) throws XMLSignatureException { try { this.signatureAlgorithm.setParameter(params); } catch (InvalidAlgorithmParameterException ex) { throw new XMLSignatureException("empty", ex); } } /** @inheritDoc */ protected boolean engineVerify(byte[] signature) throws XMLSignatureException { try { byte[] jcebytes = SignatureECDSA.convertXMLDSIGtoASN1(signature); if (log.isDebugEnabled()) { log.debug("Called ECDSA.verify() on " + Base64.encode(signature)); } return this.signatureAlgorithm.verify(jcebytes); } catch (SignatureException ex) { throw new XMLSignatureException("empty", ex); } catch (IOException ex) { throw new XMLSignatureException("empty", ex); } } /** @inheritDoc */ protected void engineInitVerify(Key publicKey) throws XMLSignatureException { if (!(publicKey instanceof PublicKey)) { String supplied = publicKey.getClass().getName(); String needed = PublicKey.class.getName(); Object exArgs[] = { supplied, needed }; throw new XMLSignatureException("algorithms.WrongKeyForThisOperation", exArgs); } try { this.signatureAlgorithm.initVerify((PublicKey) publicKey); } catch (InvalidKeyException ex) { // reinstantiate Signature object to work around bug in JDK // see: http://bugs.sun.com/view_bug.do?bug_id=4953555 Signature sig = this.signatureAlgorithm; try { this.signatureAlgorithm = Signature.getInstance(signatureAlgorithm.getAlgorithm()); } catch (Exception e) { // this shouldn't occur, but if it does, restore previous // Signature if (log.isDebugEnabled()) { log.debug("Exception when reinstantiating Signature:" + e); } this.signatureAlgorithm = sig; } throw new XMLSignatureException("empty", ex); } } /** @inheritDoc */ protected byte[] engineSign() throws XMLSignatureException { try { byte jcebytes[] = this.signatureAlgorithm.sign(); return SignatureECDSA.convertASN1toXMLDSIG(jcebytes); } catch (SignatureException ex) { throw new XMLSignatureException("empty", ex); } catch (IOException ex) { throw new XMLSignatureException("empty", ex); } } /** @inheritDoc */ protected void engineInitSign(Key privateKey, SecureRandom secureRandom) throws XMLSignatureException { if (!(privateKey instanceof PrivateKey)) { String supplied = privateKey.getClass().getName(); String needed = PrivateKey.class.getName(); Object exArgs[] = { supplied, needed }; throw new XMLSignatureException("algorithms.WrongKeyForThisOperation", exArgs); } try { this.signatureAlgorithm.initSign((PrivateKey) privateKey, secureRandom); } catch (InvalidKeyException ex) { throw new XMLSignatureException("empty", ex); } } /** @inheritDoc */ protected void engineInitSign(Key privateKey) throws XMLSignatureException { if (!(privateKey instanceof PrivateKey)) { String supplied = privateKey.getClass().getName(); String needed = PrivateKey.class.getName(); Object exArgs[] = { supplied, needed }; throw new XMLSignatureException("algorithms.WrongKeyForThisOperation", exArgs); } try { this.signatureAlgorithm.initSign((PrivateKey) privateKey); } catch (InvalidKeyException ex) { throw new XMLSignatureException("empty", ex); } } /** @inheritDoc */ protected void engineUpdate(byte[] input) throws XMLSignatureException { try { this.signatureAlgorithm.update(input); } catch (SignatureException ex) { throw new XMLSignatureException("empty", ex); } } /** @inheritDoc */ protected void engineUpdate(byte input) throws XMLSignatureException { try { this.signatureAlgorithm.update(input); } catch (SignatureException ex) { throw new XMLSignatureException("empty", ex); } } /** @inheritDoc */ protected void engineUpdate(byte buf[], int offset, int len) throws XMLSignatureException { try { this.signatureAlgorithm.update(buf, offset, len); } catch (SignatureException ex) { throw new XMLSignatureException("empty", ex); } } /** @inheritDoc */ protected String engineGetJCEAlgorithmString() { return this.signatureAlgorithm.getAlgorithm(); } /** @inheritDoc */ protected String engineGetJCEProviderName() { return this.signatureAlgorithm.getProvider().getName(); } /** @inheritDoc */ protected void engineSetHMACOutputLength(int HMACOutputLength) throws XMLSignatureException { throw new XMLSignatureException("algorithms.HMACOutputLengthOnlyForHMAC"); } /** @inheritDoc */ protected void engineInitSign( Key signingKey, AlgorithmParameterSpec algorithmParameterSpec ) throws XMLSignatureException { throw new XMLSignatureException("algorithms.CannotUseAlgorithmParameterSpecOnRSA"); } /** * Class SignatureRSASHA1 * * @author $Author: marcx $ */ public static class SignatureECDSASHA1 extends SignatureECDSA { /** * Constructor SignatureRSASHA1 * * @throws XMLSignatureException */ public SignatureECDSASHA1() throws XMLSignatureException { super(); } /** @inheritDoc */ public String engineGetURI() { return XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA1; } } /** * Class SignatureRSASHA256 * * @author Alex Dupre */ public static class SignatureECDSASHA256 extends SignatureECDSA { /** * Constructor SignatureRSASHA256 * * @throws XMLSignatureException */ public SignatureECDSASHA256() throws XMLSignatureException { super(); } /** @inheritDoc */ public String engineGetURI() { return XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA256; } } /** * Class SignatureRSASHA384 * * @author Alex Dupre */ public static class SignatureECDSASHA384 extends SignatureECDSA { /** * Constructor SignatureRSASHA384 * * @throws XMLSignatureException */ public SignatureECDSASHA384() throws XMLSignatureException { super(); } /** @inheritDoc */ public String engineGetURI() { return XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA384; } } /** * Class SignatureRSASHA512 * * @author Alex Dupre */ public static class SignatureECDSASHA512 extends SignatureECDSA { /** * Constructor SignatureRSASHA512 * * @throws XMLSignatureException */ public SignatureECDSASHA512() throws XMLSignatureException { super(); } /** @inheritDoc */ public String engineGetURI() { return XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA512; } } } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/algorithms/implementations/SignatureDSA.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/algorithms/implementations/Signatur0000644000175000017500000002747011553001352032562 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.algorithms.implementations; import java.io.IOException; import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException; import java.security.Key; import java.security.PrivateKey; import java.security.PublicKey; import java.security.SecureRandom; import java.security.Signature; import java.security.SignatureException; import java.security.spec.AlgorithmParameterSpec; import org.apache.xml.security.algorithms.JCEMapper; import org.apache.xml.security.algorithms.SignatureAlgorithmSpi; import org.apache.xml.security.signature.XMLSignatureException; import org.apache.xml.security.utils.Base64; import org.apache.xml.security.utils.Constants; public class SignatureDSA extends SignatureAlgorithmSpi { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(SignatureDSA.class); /** Field URI */ public static final String URI = Constants.SignatureSpecNS + "dsa-sha1"; /** Field algorithm */ private java.security.Signature signatureAlgorithm = null; /** * Method engineGetURI * * @inheritDoc */ protected String engineGetURI() { return SignatureDSA.URI; } /** * Constructor SignatureDSA * * @throws XMLSignatureException */ public SignatureDSA() throws XMLSignatureException { String algorithmID = JCEMapper.translateURItoJCEID(SignatureDSA.URI); if (log.isDebugEnabled()) { log.debug("Created SignatureDSA using " + algorithmID); } String provider = JCEMapper.getProviderId(); try { if (provider == null) { this.signatureAlgorithm = Signature.getInstance(algorithmID); } else { this.signatureAlgorithm = Signature.getInstance(algorithmID, provider); } } catch (java.security.NoSuchAlgorithmException ex) { Object[] exArgs = { algorithmID, ex.getLocalizedMessage() }; throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs); } catch (java.security.NoSuchProviderException ex) { Object[] exArgs = { algorithmID, ex.getLocalizedMessage() }; throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs); } } /** * @inheritDoc */ protected void engineSetParameter(AlgorithmParameterSpec params) throws XMLSignatureException { try { this.signatureAlgorithm.setParameter(params); } catch (InvalidAlgorithmParameterException ex) { throw new XMLSignatureException("empty", ex); } } /** * @inheritDoc */ protected boolean engineVerify(byte[] signature) throws XMLSignatureException { try { if (log.isDebugEnabled()) { log.debug("Called DSA.verify() on " + Base64.encode(signature)); } byte[] jcebytes = SignatureDSA.convertXMLDSIGtoASN1(signature); return this.signatureAlgorithm.verify(jcebytes); } catch (SignatureException ex) { throw new XMLSignatureException("empty", ex); } catch (IOException ex) { throw new XMLSignatureException("empty", ex); } } /** * @inheritDoc */ protected void engineInitVerify(Key publicKey) throws XMLSignatureException { if (!(publicKey instanceof PublicKey)) { String supplied = publicKey.getClass().getName(); String needed = PublicKey.class.getName(); Object exArgs[] = { supplied, needed }; throw new XMLSignatureException("algorithms.WrongKeyForThisOperation", exArgs); } try { this.signatureAlgorithm.initVerify((PublicKey) publicKey); } catch (InvalidKeyException ex) { // reinstantiate Signature object to work around bug in JDK // see: http://bugs.sun.com/view_bug.do?bug_id=4953555 Signature sig = this.signatureAlgorithm; try { this.signatureAlgorithm = Signature.getInstance(signatureAlgorithm.getAlgorithm()); } catch (Exception e) { // this shouldn't occur, but if it does, restore previous // Signature if (log.isDebugEnabled()) { log.debug("Exception when reinstantiating Signature:" + e); } this.signatureAlgorithm = sig; } throw new XMLSignatureException("empty", ex); } } /** * @inheritDoc */ protected byte[] engineSign() throws XMLSignatureException { try { byte jcebytes[] = this.signatureAlgorithm.sign(); return SignatureDSA.convertASN1toXMLDSIG(jcebytes); } catch (IOException ex) { throw new XMLSignatureException("empty", ex); } catch (SignatureException ex) { throw new XMLSignatureException("empty", ex); } } /** * @inheritDoc */ protected void engineInitSign(Key privateKey, SecureRandom secureRandom) throws XMLSignatureException { if (!(privateKey instanceof PrivateKey)) { String supplied = privateKey.getClass().getName(); String needed = PrivateKey.class.getName(); Object exArgs[] = { supplied, needed }; throw new XMLSignatureException("algorithms.WrongKeyForThisOperation", exArgs); } try { this.signatureAlgorithm.initSign((PrivateKey) privateKey, secureRandom); } catch (InvalidKeyException ex) { throw new XMLSignatureException("empty", ex); } } /** * @inheritDoc */ protected void engineInitSign(Key privateKey) throws XMLSignatureException { if (!(privateKey instanceof PrivateKey)) { String supplied = privateKey.getClass().getName(); String needed = PrivateKey.class.getName(); Object exArgs[] = { supplied, needed }; throw new XMLSignatureException("algorithms.WrongKeyForThisOperation", exArgs); } try { this.signatureAlgorithm.initSign((PrivateKey) privateKey); } catch (InvalidKeyException ex) { throw new XMLSignatureException("empty", ex); } } /** * @inheritDoc */ protected void engineUpdate(byte[] input) throws XMLSignatureException { try { this.signatureAlgorithm.update(input); } catch (SignatureException ex) { throw new XMLSignatureException("empty", ex); } } /** * @inheritDoc */ protected void engineUpdate(byte input) throws XMLSignatureException { try { this.signatureAlgorithm.update(input); } catch (SignatureException ex) { throw new XMLSignatureException("empty", ex); } } /** * @inheritDoc */ protected void engineUpdate(byte buf[], int offset, int len) throws XMLSignatureException { try { this.signatureAlgorithm.update(buf, offset, len); } catch (SignatureException ex) { throw new XMLSignatureException("empty", ex); } } /** * Method engineGetJCEAlgorithmString * * @inheritDoc */ protected String engineGetJCEAlgorithmString() { return this.signatureAlgorithm.getAlgorithm(); } /** * Method engineGetJCEProviderName * * @inheritDoc */ protected String engineGetJCEProviderName() { return this.signatureAlgorithm.getProvider().getName(); } /** * Converts an ASN.1 DSA value to a XML Signature DSA Value. * * The JAVA JCE DSA Signature algorithm creates ASN.1 encoded (r,s) value * pairs; the XML Signature requires the core BigInteger values. * * @param asn1Bytes * @return the decode bytes * * @throws IOException * @see 6.4.1 DSA */ private static byte[] convertASN1toXMLDSIG(byte asn1Bytes[]) throws IOException { byte rLength = asn1Bytes[3]; int i; for (i = rLength; (i > 0) && (asn1Bytes[(4 + rLength) - i] == 0); i--); byte sLength = asn1Bytes[5 + rLength]; int j; for (j = sLength; (j > 0) && (asn1Bytes[(6 + rLength + sLength) - j] == 0); j--); if ((asn1Bytes[0] != 48) || (asn1Bytes[1] != asn1Bytes.length - 2) || (asn1Bytes[2] != 2) || (i > 20) || (asn1Bytes[4 + rLength] != 2) || (j > 20)) { throw new IOException("Invalid ASN.1 format of DSA signature"); } byte xmldsigBytes[] = new byte[40]; System.arraycopy(asn1Bytes, (4 + rLength) - i, xmldsigBytes, 20 - i, i); System.arraycopy(asn1Bytes, (6 + rLength + sLength) - j, xmldsigBytes, 40 - j, j); return xmldsigBytes; } /** * Converts a XML Signature DSA Value to an ASN.1 DSA value. * * The JAVA JCE DSA Signature algorithm creates ASN.1 encoded (r,s) value * pairs; the XML Signature requires the core BigInteger values. * * @param xmldsigBytes * @return the encoded ASN.1 bytes * * @throws IOException * @see 6.4.1 DSA */ private static byte[] convertXMLDSIGtoASN1(byte xmldsigBytes[]) throws IOException { if (xmldsigBytes.length != 40) { throw new IOException("Invalid XMLDSIG format of DSA signature"); } int i; for (i = 20; (i > 0) && (xmldsigBytes[20 - i] == 0); i--); int j = i; if (xmldsigBytes[20 - i] < 0) { j += 1; } int k; for (k = 20; (k > 0) && (xmldsigBytes[40 - k] == 0); k--); int l = k; if (xmldsigBytes[40 - k] < 0) { l += 1; } byte asn1Bytes[] = new byte[6 + j + l]; asn1Bytes[0] = 48; asn1Bytes[1] = (byte) (4 + j + l); asn1Bytes[2] = 2; asn1Bytes[3] = (byte) j; System.arraycopy(xmldsigBytes, 20 - i, asn1Bytes, (4 + j) - i, i); asn1Bytes[4 + j] = 2; asn1Bytes[5 + j] = (byte) l; System.arraycopy(xmldsigBytes, 40 - k, asn1Bytes, (6 + j + l) - k, k); return asn1Bytes; } /** * Method engineSetHMACOutputLength * * @param HMACOutputLength * @throws XMLSignatureException */ protected void engineSetHMACOutputLength(int HMACOutputLength) throws XMLSignatureException { throw new XMLSignatureException("algorithms.HMACOutputLengthOnlyForHMAC"); } /** * Method engineInitSign * * @param signingKey * @param algorithmParameterSpec * @throws XMLSignatureException */ protected void engineInitSign( Key signingKey, AlgorithmParameterSpec algorithmParameterSpec ) throws XMLSignatureException { throw new XMLSignatureException("algorithms.CannotUseAlgorithmParameterSpecOnDSA"); } } ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/algorithms/implementations/SignatureBaseRSA.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/algorithms/implementations/Signatur0000644000175000017500000002545711553001352032565 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.algorithms.implementations; import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException; import java.security.Key; import java.security.NoSuchProviderException; import java.security.PrivateKey; import java.security.PublicKey; import java.security.SecureRandom; import java.security.Signature; import java.security.SignatureException; import java.security.spec.AlgorithmParameterSpec; import org.apache.xml.security.algorithms.JCEMapper; import org.apache.xml.security.algorithms.SignatureAlgorithmSpi; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.signature.XMLSignatureException; public abstract class SignatureBaseRSA extends SignatureAlgorithmSpi { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(SignatureBaseRSA.class); /** @inheritDoc */ public abstract String engineGetURI(); /** Field algorithm */ private java.security.Signature signatureAlgorithm = null; /** * Constructor SignatureRSA * * @throws XMLSignatureException */ public SignatureBaseRSA() throws XMLSignatureException { String algorithmID = JCEMapper.translateURItoJCEID(this.engineGetURI()); if (log.isDebugEnabled()) { log.debug("Created SignatureRSA using " + algorithmID); } String provider = JCEMapper.getProviderId(); try { if (provider == null) { this.signatureAlgorithm = Signature.getInstance(algorithmID); } else { this.signatureAlgorithm = Signature.getInstance(algorithmID,provider); } } catch (java.security.NoSuchAlgorithmException ex) { Object[] exArgs = { algorithmID, ex.getLocalizedMessage() }; throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs); } catch (NoSuchProviderException ex) { Object[] exArgs = { algorithmID, ex.getLocalizedMessage() }; throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs); } } /** @inheritDoc */ protected void engineSetParameter(AlgorithmParameterSpec params) throws XMLSignatureException { try { this.signatureAlgorithm.setParameter(params); } catch (InvalidAlgorithmParameterException ex) { throw new XMLSignatureException("empty", ex); } } /** @inheritDoc */ protected boolean engineVerify(byte[] signature) throws XMLSignatureException { try { return this.signatureAlgorithm.verify(signature); } catch (SignatureException ex) { throw new XMLSignatureException("empty", ex); } } /** @inheritDoc */ protected void engineInitVerify(Key publicKey) throws XMLSignatureException { if (!(publicKey instanceof PublicKey)) { String supplied = publicKey.getClass().getName(); String needed = PublicKey.class.getName(); Object exArgs[] = { supplied, needed }; throw new XMLSignatureException("algorithms.WrongKeyForThisOperation", exArgs); } try { this.signatureAlgorithm.initVerify((PublicKey) publicKey); } catch (InvalidKeyException ex) { // reinstantiate Signature object to work around bug in JDK // see: http://bugs.sun.com/view_bug.do?bug_id=4953555 Signature sig = this.signatureAlgorithm; try { this.signatureAlgorithm = Signature.getInstance(signatureAlgorithm.getAlgorithm()); } catch (Exception e) { // this shouldn't occur, but if it does, restore previous // Signature if (log.isDebugEnabled()) { log.debug("Exception when reinstantiating Signature:" + e); } this.signatureAlgorithm = sig; } throw new XMLSignatureException("empty", ex); } } /** @inheritDoc */ protected byte[] engineSign() throws XMLSignatureException { try { return this.signatureAlgorithm.sign(); } catch (SignatureException ex) { throw new XMLSignatureException("empty", ex); } } /** @inheritDoc */ protected void engineInitSign(Key privateKey, SecureRandom secureRandom) throws XMLSignatureException { if (!(privateKey instanceof PrivateKey)) { String supplied = privateKey.getClass().getName(); String needed = PrivateKey.class.getName(); Object exArgs[] = { supplied, needed }; throw new XMLSignatureException("algorithms.WrongKeyForThisOperation", exArgs); } try { this.signatureAlgorithm.initSign((PrivateKey) privateKey, secureRandom); } catch (InvalidKeyException ex) { throw new XMLSignatureException("empty", ex); } } /** @inheritDoc */ protected void engineInitSign(Key privateKey) throws XMLSignatureException { if (!(privateKey instanceof PrivateKey)) { String supplied = privateKey.getClass().getName(); String needed = PrivateKey.class.getName(); Object exArgs[] = { supplied, needed }; throw new XMLSignatureException("algorithms.WrongKeyForThisOperation", exArgs); } try { this.signatureAlgorithm.initSign((PrivateKey) privateKey); } catch (InvalidKeyException ex) { throw new XMLSignatureException("empty", ex); } } /** @inheritDoc */ protected void engineUpdate(byte[] input) throws XMLSignatureException { try { this.signatureAlgorithm.update(input); } catch (SignatureException ex) { throw new XMLSignatureException("empty", ex); } } /** @inheritDoc */ protected void engineUpdate(byte input) throws XMLSignatureException { try { this.signatureAlgorithm.update(input); } catch (SignatureException ex) { throw new XMLSignatureException("empty", ex); } } /** @inheritDoc */ protected void engineUpdate(byte buf[], int offset, int len) throws XMLSignatureException { try { this.signatureAlgorithm.update(buf, offset, len); } catch (SignatureException ex) { throw new XMLSignatureException("empty", ex); } } /** @inheritDoc */ protected String engineGetJCEAlgorithmString() { return this.signatureAlgorithm.getAlgorithm(); } /** @inheritDoc */ protected String engineGetJCEProviderName() { return this.signatureAlgorithm.getProvider().getName(); } /** @inheritDoc */ protected void engineSetHMACOutputLength(int HMACOutputLength) throws XMLSignatureException { throw new XMLSignatureException("algorithms.HMACOutputLengthOnlyForHMAC"); } /** @inheritDoc */ protected void engineInitSign( Key signingKey, AlgorithmParameterSpec algorithmParameterSpec ) throws XMLSignatureException { throw new XMLSignatureException("algorithms.CannotUseAlgorithmParameterSpecOnRSA"); } /** * Class SignatureRSASHA1 */ public static class SignatureRSASHA1 extends SignatureBaseRSA { /** * Constructor SignatureRSASHA1 * * @throws XMLSignatureException */ public SignatureRSASHA1() throws XMLSignatureException { super(); } /** @inheritDoc */ public String engineGetURI() { return XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA1; } } /** * Class SignatureRSASHA256 */ public static class SignatureRSASHA256 extends SignatureBaseRSA { /** * Constructor SignatureRSASHA256 * * @throws XMLSignatureException */ public SignatureRSASHA256() throws XMLSignatureException { super(); } /** @inheritDoc */ public String engineGetURI() { return XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA256; } } /** * Class SignatureRSASHA384 */ public static class SignatureRSASHA384 extends SignatureBaseRSA { /** * Constructor SignatureRSASHA384 * * @throws XMLSignatureException */ public SignatureRSASHA384() throws XMLSignatureException { super(); } /** @inheritDoc */ public String engineGetURI() { return XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA384; } } /** * Class SignatureRSASHA512 */ public static class SignatureRSASHA512 extends SignatureBaseRSA { /** * Constructor SignatureRSASHA512 * * @throws XMLSignatureException */ public SignatureRSASHA512() throws XMLSignatureException { super(); } /** @inheritDoc */ public String engineGetURI() { return XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA512; } } /** * Class SignatureRSARIPEMD160 */ public static class SignatureRSARIPEMD160 extends SignatureBaseRSA { /** * Constructor SignatureRSARIPEMD160 * * @throws XMLSignatureException */ public SignatureRSARIPEMD160() throws XMLSignatureException { super(); } /** @inheritDoc */ public String engineGetURI() { return XMLSignature.ALGO_ID_SIGNATURE_RSA_RIPEMD160; } } /** * Class SignatureRSAMD5 */ public static class SignatureRSAMD5 extends SignatureBaseRSA { /** * Constructor SignatureRSAMD5 * * @throws XMLSignatureException */ public SignatureRSAMD5() throws XMLSignatureException { super(); } /** @inheritDoc */ public String engineGetURI() { return XMLSignature.ALGO_ID_SIGNATURE_NOT_RECOMMENDED_RSA_MD5; } } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/algorithms/implementations/IntegrityHmac.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/algorithms/implementations/Integrit0000644000175000017500000003754511556237546032602 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.algorithms.implementations; import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException; import java.security.Key; import java.security.SecureRandom; import java.security.spec.AlgorithmParameterSpec; import javax.crypto.Mac; import javax.crypto.SecretKey; import org.apache.xml.security.algorithms.JCEMapper; import org.apache.xml.security.algorithms.MessageDigestAlgorithm; import org.apache.xml.security.algorithms.SignatureAlgorithmSpi; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.signature.XMLSignatureException; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Text; public abstract class IntegrityHmac extends SignatureAlgorithmSpi { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(IntegrityHmac.class); /** Field macAlgorithm */ private Mac macAlgorithm = null; /** Field HMACOutputLength */ private int HMACOutputLength = 0; private boolean HMACOutputLengthSet = false; /** * Method engineGetURI * *@inheritDoc */ public abstract String engineGetURI(); /** * Returns the output length of the hash/digest. */ abstract int getDigestLength(); /** * Method IntegrityHmac * * @throws XMLSignatureException */ public IntegrityHmac() throws XMLSignatureException { String algorithmID = JCEMapper.translateURItoJCEID(this.engineGetURI()); if (log.isDebugEnabled()) { log.debug("Created IntegrityHmacSHA1 using " + algorithmID); } try { this.macAlgorithm = Mac.getInstance(algorithmID); } catch (java.security.NoSuchAlgorithmException ex) { Object[] exArgs = { algorithmID, ex.getLocalizedMessage() }; throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs); } } /** * Proxy method for {@link java.security.Signature#setParameter( * java.security.spec.AlgorithmParameterSpec)} * which is executed on the internal {@link java.security.Signature} object. * * @param params * @throws XMLSignatureException */ protected void engineSetParameter(AlgorithmParameterSpec params) throws XMLSignatureException { throw new XMLSignatureException("empty"); } public void reset() { HMACOutputLength = 0; HMACOutputLengthSet = false; this.macAlgorithm.reset(); } /** * Proxy method for {@link java.security.Signature#verify(byte[])} * which is executed on the internal {@link java.security.Signature} object. * * @param signature * @return true if the signature is correct * @throws XMLSignatureException */ protected boolean engineVerify(byte[] signature) throws XMLSignatureException { try { if (this.HMACOutputLengthSet && this.HMACOutputLength < getDigestLength()) { if (log.isDebugEnabled()) { log.debug("HMACOutputLength must not be less than " + getDigestLength()); } Object[] exArgs = { String.valueOf(getDigestLength()) }; throw new XMLSignatureException("algorithms.HMACOutputLengthMin", exArgs); } else { byte[] completeResult = this.macAlgorithm.doFinal(); return MessageDigestAlgorithm.isEqual(completeResult, signature); } } catch (IllegalStateException ex) { throw new XMLSignatureException("empty", ex); } } /** * Proxy method for {@link java.security.Signature#initVerify(java.security.PublicKey)} * which is executed on the internal {@link java.security.Signature} object. * * @param secretKey * @throws XMLSignatureException */ protected void engineInitVerify(Key secretKey) throws XMLSignatureException { if (!(secretKey instanceof SecretKey)) { String supplied = secretKey.getClass().getName(); String needed = SecretKey.class.getName(); Object exArgs[] = { supplied, needed }; throw new XMLSignatureException("algorithms.WrongKeyForThisOperation", exArgs); } try { this.macAlgorithm.init(secretKey); } catch (InvalidKeyException ex) { // reinstantiate Mac object to work around bug in JDK // see: http://bugs.sun.com/view_bug.do?bug_id=4953555 Mac mac = this.macAlgorithm; try { this.macAlgorithm = Mac.getInstance(macAlgorithm.getAlgorithm()); } catch (Exception e) { // this shouldn't occur, but if it does, restore previous Mac if (log.isDebugEnabled()) { log.debug("Exception when reinstantiating Mac:" + e); } this.macAlgorithm = mac; } throw new XMLSignatureException("empty", ex); } } /** * Proxy method for {@link java.security.Signature#sign()} * which is executed on the internal {@link java.security.Signature} object. * * @return the result of the {@link java.security.Signature#sign()} method * @throws XMLSignatureException */ protected byte[] engineSign() throws XMLSignatureException { try { if (this.HMACOutputLengthSet && this.HMACOutputLength < getDigestLength()) { if (log.isDebugEnabled()) { log.debug("HMACOutputLength must not be less than " + getDigestLength()); } Object[] exArgs = { String.valueOf(getDigestLength()) }; throw new XMLSignatureException("algorithms.HMACOutputLengthMin", exArgs); } else { return this.macAlgorithm.doFinal(); } } catch (IllegalStateException ex) { throw new XMLSignatureException("empty", ex); } } /** * Method engineInitSign * * @param secretKey * @throws XMLSignatureException */ protected void engineInitSign(Key secretKey) throws XMLSignatureException { if (!(secretKey instanceof SecretKey)) { String supplied = secretKey.getClass().getName(); String needed = SecretKey.class.getName(); Object exArgs[] = { supplied, needed }; throw new XMLSignatureException("algorithms.WrongKeyForThisOperation", exArgs); } try { this.macAlgorithm.init(secretKey); } catch (InvalidKeyException ex) { throw new XMLSignatureException("empty", ex); } } /** * Method engineInitSign * * @param secretKey * @param algorithmParameterSpec * @throws XMLSignatureException */ protected void engineInitSign( Key secretKey, AlgorithmParameterSpec algorithmParameterSpec ) throws XMLSignatureException { if (!(secretKey instanceof SecretKey)) { String supplied = secretKey.getClass().getName(); String needed = SecretKey.class.getName(); Object exArgs[] = { supplied, needed }; throw new XMLSignatureException("algorithms.WrongKeyForThisOperation", exArgs); } try { this.macAlgorithm.init(secretKey, algorithmParameterSpec); } catch (InvalidKeyException ex) { throw new XMLSignatureException("empty", ex); } catch (InvalidAlgorithmParameterException ex) { throw new XMLSignatureException("empty", ex); } } /** * Method engineInitSign * * @param secretKey * @param secureRandom * @throws XMLSignatureException */ protected void engineInitSign(Key secretKey, SecureRandom secureRandom) throws XMLSignatureException { throw new XMLSignatureException("algorithms.CannotUseSecureRandomOnMAC"); } /** * Proxy method for {@link java.security.Signature#update(byte[])} * which is executed on the internal {@link java.security.Signature} object. * * @param input * @throws XMLSignatureException */ protected void engineUpdate(byte[] input) throws XMLSignatureException { try { this.macAlgorithm.update(input); } catch (IllegalStateException ex) { throw new XMLSignatureException("empty", ex); } } /** * Proxy method for {@link java.security.Signature#update(byte)} * which is executed on the internal {@link java.security.Signature} object. * * @param input * @throws XMLSignatureException */ protected void engineUpdate(byte input) throws XMLSignatureException { try { this.macAlgorithm.update(input); } catch (IllegalStateException ex) { throw new XMLSignatureException("empty", ex); } } /** * Proxy method for {@link java.security.Signature#update(byte[], int, int)} * which is executed on the internal {@link java.security.Signature} object. * * @param buf * @param offset * @param len * @throws XMLSignatureException */ protected void engineUpdate(byte buf[], int offset, int len) throws XMLSignatureException { try { this.macAlgorithm.update(buf, offset, len); } catch (IllegalStateException ex) { throw new XMLSignatureException("empty", ex); } } /** * Method engineGetJCEAlgorithmString * @inheritDoc * */ protected String engineGetJCEAlgorithmString() { return this.macAlgorithm.getAlgorithm(); } /** * Method engineGetJCEAlgorithmString * * @inheritDoc */ protected String engineGetJCEProviderName() { return this.macAlgorithm.getProvider().getName(); } /** * Method engineSetHMACOutputLength * * @param HMACOutputLength */ protected void engineSetHMACOutputLength(int HMACOutputLength) { this.HMACOutputLength = HMACOutputLength; this.HMACOutputLengthSet = true; } /** * Method engineGetContextFromElement * * @param element */ protected void engineGetContextFromElement(Element element) { super.engineGetContextFromElement(element); if (element == null) { throw new IllegalArgumentException("element null"); } Text hmaclength = XMLUtils.selectDsNodeText(element.getFirstChild(), Constants._TAG_HMACOUTPUTLENGTH, 0); if (hmaclength != null) { this.HMACOutputLength = Integer.parseInt(hmaclength.getData()); this.HMACOutputLengthSet = true; } } /** * Method engineAddContextToElement * * @param element */ public void engineAddContextToElement(Element element) { if (element == null) { throw new IllegalArgumentException("null element"); } if (this.HMACOutputLengthSet) { Document doc = element.getOwnerDocument(); Element HMElem = XMLUtils.createElementInSignatureSpace(doc, Constants._TAG_HMACOUTPUTLENGTH); Text HMText = doc.createTextNode(Integer.valueOf(this.HMACOutputLength).toString()); HMElem.appendChild(HMText); XMLUtils.addReturnToElement(element); element.appendChild(HMElem); XMLUtils.addReturnToElement(element); } } /** * Class IntegrityHmacSHA1 */ public static class IntegrityHmacSHA1 extends IntegrityHmac { /** * Constructor IntegrityHmacSHA1 * * @throws XMLSignatureException */ public IntegrityHmacSHA1() throws XMLSignatureException { super(); } /** * Method engineGetURI * @inheritDoc * */ public String engineGetURI() { return XMLSignature.ALGO_ID_MAC_HMAC_SHA1; } int getDigestLength() { return 160; } } /** * Class IntegrityHmacSHA256 */ public static class IntegrityHmacSHA256 extends IntegrityHmac { /** * Constructor IntegrityHmacSHA256 * * @throws XMLSignatureException */ public IntegrityHmacSHA256() throws XMLSignatureException { super(); } /** * Method engineGetURI * * @inheritDoc */ public String engineGetURI() { return XMLSignature.ALGO_ID_MAC_HMAC_SHA256; } int getDigestLength() { return 256; } } /** * Class IntegrityHmacSHA384 */ public static class IntegrityHmacSHA384 extends IntegrityHmac { /** * Constructor IntegrityHmacSHA384 * * @throws XMLSignatureException */ public IntegrityHmacSHA384() throws XMLSignatureException { super(); } /** * Method engineGetURI * @inheritDoc * */ public String engineGetURI() { return XMLSignature.ALGO_ID_MAC_HMAC_SHA384; } int getDigestLength() { return 384; } } /** * Class IntegrityHmacSHA512 */ public static class IntegrityHmacSHA512 extends IntegrityHmac { /** * Constructor IntegrityHmacSHA512 * * @throws XMLSignatureException */ public IntegrityHmacSHA512() throws XMLSignatureException { super(); } /** * Method engineGetURI * @inheritDoc * */ public String engineGetURI() { return XMLSignature.ALGO_ID_MAC_HMAC_SHA512; } int getDigestLength() { return 512; } } /** * Class IntegrityHmacRIPEMD160 */ public static class IntegrityHmacRIPEMD160 extends IntegrityHmac { /** * Constructor IntegrityHmacRIPEMD160 * * @throws XMLSignatureException */ public IntegrityHmacRIPEMD160() throws XMLSignatureException { super(); } /** * Method engineGetURI * * @inheritDoc */ public String engineGetURI() { return XMLSignature.ALGO_ID_MAC_HMAC_RIPEMD160; } int getDigestLength() { return 160; } } /** * Class IntegrityHmacMD5 */ public static class IntegrityHmacMD5 extends IntegrityHmac { /** * Constructor IntegrityHmacMD5 * * @throws XMLSignatureException */ public IntegrityHmacMD5() throws XMLSignatureException { super(); } /** * Method engineGetURI * * @inheritDoc */ public String engineGetURI() { return XMLSignature.ALGO_ID_MAC_HMAC_NOT_RECOMMENDED_MD5; } int getDigestLength() { return 128; } } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/algorithms/JCEMapper.java0000644000175000017500000002645312122356506030253 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.algorithms; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import org.apache.xml.security.encryption.XMLCipher; import org.apache.xml.security.signature.XMLSignature; import org.w3c.dom.Element; /** * This class maps algorithm identifier URIs to JAVA JCE class names. */ public class JCEMapper { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(JCEMapper.class); private static Map algorithmsMap = new ConcurrentHashMap(); private static String providerName = null; /** * Method register * * @param id * @param algorithm */ public static void register(String id, Algorithm algorithm) { algorithmsMap.put(id, algorithm); } /** * This method registers the default algorithms. */ public static void registerDefaultAlgorithms() { algorithmsMap.put( MessageDigestAlgorithm.ALGO_ID_DIGEST_NOT_RECOMMENDED_MD5, new Algorithm("", "MD5", "MessageDigest") ); algorithmsMap.put( MessageDigestAlgorithm.ALGO_ID_DIGEST_RIPEMD160, new Algorithm("", "RIPEMD160", "MessageDigest") ); algorithmsMap.put( MessageDigestAlgorithm.ALGO_ID_DIGEST_SHA1, new Algorithm("", "SHA-1", "MessageDigest") ); algorithmsMap.put( MessageDigestAlgorithm.ALGO_ID_DIGEST_SHA256, new Algorithm("", "SHA-256", "MessageDigest") ); algorithmsMap.put( MessageDigestAlgorithm.ALGO_ID_DIGEST_SHA384, new Algorithm("", "SHA-384", "MessageDigest") ); algorithmsMap.put( MessageDigestAlgorithm.ALGO_ID_DIGEST_SHA512, new Algorithm("", "SHA-512", "MessageDigest") ); algorithmsMap.put( XMLSignature.ALGO_ID_SIGNATURE_DSA, new Algorithm("", "SHA1withDSA", "Signature") ); algorithmsMap.put( XMLSignature.ALGO_ID_SIGNATURE_NOT_RECOMMENDED_RSA_MD5, new Algorithm("", "MD5withRSA", "Signature") ); algorithmsMap.put( XMLSignature.ALGO_ID_SIGNATURE_RSA_RIPEMD160, new Algorithm("", "RIPEMD160withRSA", "Signature") ); algorithmsMap.put( XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA1, new Algorithm("", "SHA1withRSA", "Signature") ); algorithmsMap.put( XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA256, new Algorithm("", "SHA256withRSA", "Signature") ); algorithmsMap.put( XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA384, new Algorithm("", "SHA384withRSA", "Signature") ); algorithmsMap.put( XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA512, new Algorithm("", "SHA512withRSA", "Signature") ); algorithmsMap.put( XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA1, new Algorithm("", "SHA1withECDSA", "Signature") ); algorithmsMap.put( XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA256, new Algorithm("", "SHA256withECDSA", "Signature") ); algorithmsMap.put( XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA384, new Algorithm("", "SHA384withECDSA", "Signature") ); algorithmsMap.put( XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA512, new Algorithm("", "SHA512withECDSA", "Signature") ); algorithmsMap.put( XMLSignature.ALGO_ID_MAC_HMAC_NOT_RECOMMENDED_MD5, new Algorithm("", "HmacMD5", "Mac") ); algorithmsMap.put( XMLSignature.ALGO_ID_MAC_HMAC_RIPEMD160, new Algorithm("", "HMACRIPEMD160", "Mac") ); algorithmsMap.put( XMLSignature.ALGO_ID_MAC_HMAC_SHA1, new Algorithm("", "HmacSHA1", "Mac") ); algorithmsMap.put( XMLSignature.ALGO_ID_MAC_HMAC_SHA256, new Algorithm("", "HmacSHA256", "Mac") ); algorithmsMap.put( XMLSignature.ALGO_ID_MAC_HMAC_SHA384, new Algorithm("", "HmacSHA384", "Mac") ); algorithmsMap.put( XMLSignature.ALGO_ID_MAC_HMAC_SHA512, new Algorithm("", "HmacSHA512", "Mac") ); algorithmsMap.put( XMLCipher.TRIPLEDES, new Algorithm("DESede", "DESede/CBC/ISO10126Padding", "BlockEncryption", 192) ); algorithmsMap.put( XMLCipher.AES_128, new Algorithm("AES", "AES/CBC/ISO10126Padding", "BlockEncryption", 128) ); algorithmsMap.put( XMLCipher.AES_192, new Algorithm("AES", "AES/CBC/ISO10126Padding", "BlockEncryption", 192) ); algorithmsMap.put( XMLCipher.AES_256, new Algorithm("AES", "AES/CBC/ISO10126Padding", "BlockEncryption", 256) ); algorithmsMap.put( XMLCipher.AES_128_GCM, new Algorithm("AES", "AES/GCM/NoPadding", "BlockEncryption", 128) ); algorithmsMap.put( XMLCipher.AES_192_GCM, new Algorithm("AES", "AES/GCM/NoPadding", "BlockEncryption", 192) ); algorithmsMap.put( XMLCipher.AES_256_GCM, new Algorithm("AES", "AES/GCM/NoPadding", "BlockEncryption", 256) ); algorithmsMap.put( XMLCipher.RSA_v1dot5, new Algorithm("RSA", "RSA/ECB/PKCS1Padding", "KeyTransport") ); algorithmsMap.put( XMLCipher.RSA_OAEP, new Algorithm("RSA", "RSA/ECB/OAEPPadding", "KeyTransport") ); algorithmsMap.put( XMLCipher.RSA_OAEP_11, new Algorithm("RSA", "RSA/ECB/OAEPPadding", "KeyTransport") ); algorithmsMap.put( XMLCipher.DIFFIE_HELLMAN, new Algorithm("", "", "KeyAgreement") ); algorithmsMap.put( XMLCipher.TRIPLEDES_KeyWrap, new Algorithm("DESede", "DESedeWrap", "SymmetricKeyWrap", 192) ); algorithmsMap.put( XMLCipher.AES_128_KeyWrap, new Algorithm("AES", "AESWrap", "SymmetricKeyWrap", 128) ); algorithmsMap.put( XMLCipher.AES_192_KeyWrap, new Algorithm("AES", "AESWrap", "SymmetricKeyWrap", 192) ); algorithmsMap.put( XMLCipher.AES_256_KeyWrap, new Algorithm("AES", "AESWrap", "SymmetricKeyWrap", 256) ); } /** * Method translateURItoJCEID * * @param algorithmURI * @return the JCE standard name corresponding to the given URI */ public static String translateURItoJCEID(String algorithmURI) { if (log.isDebugEnabled()) { log.debug("Request for URI " + algorithmURI); } Algorithm algorithm = algorithmsMap.get(algorithmURI); if (algorithm != null) { return algorithm.jceName; } return null; } /** * Method getAlgorithmClassFromURI * @param algorithmURI * @return the class name that implements this algorithm */ public static String getAlgorithmClassFromURI(String algorithmURI) { if (log.isDebugEnabled()) { log.debug("Request for URI " + algorithmURI); } Algorithm algorithm = algorithmsMap.get(algorithmURI); if (algorithm != null) { return algorithm.algorithmClass; } return null; } /** * Returns the keylength in bits for a particular algorithm. * * @param algorithmURI * @return The length of the key used in the algorithm */ public static int getKeyLengthFromURI(String algorithmURI) { if (log.isDebugEnabled()) { log.debug("Request for URI " + algorithmURI); } Algorithm algorithm = algorithmsMap.get(algorithmURI); if (algorithm != null) { return algorithm.keyLength; } return 0; } /** * Method getJCEKeyAlgorithmFromURI * * @param algorithmURI * @return The KeyAlgorithm for the given URI. */ public static String getJCEKeyAlgorithmFromURI(String algorithmURI) { if (log.isDebugEnabled()) { log.debug("Request for URI " + algorithmURI); } Algorithm algorithm = algorithmsMap.get(algorithmURI); if (algorithm != null) { return algorithm.requiredKey; } return null; } /** * Gets the default Provider for obtaining the security algorithms * @return the default providerId. */ public static String getProviderId() { return providerName; } /** * Sets the default Provider for obtaining the security algorithms * @param provider the default providerId. */ public static void setProviderId(String provider) { providerName = provider; } /** * Represents the Algorithm xml element */ public static class Algorithm { final String requiredKey; final String jceName; final String algorithmClass; final int keyLength; /** * Gets data from element * @param el */ public Algorithm(Element el) { requiredKey = el.getAttributeNS(null, "RequiredKey"); jceName = el.getAttributeNS(null, "JCEName"); algorithmClass = el.getAttributeNS(null, "AlgorithmClass"); if (el.hasAttribute("KeyLength")) { keyLength = Integer.parseInt(el.getAttributeNS(null, "KeyLength")); } else { keyLength = 0; } } public Algorithm(String requiredKey, String jceName) { this(requiredKey, jceName, null, 0); } public Algorithm(String requiredKey, String jceName, String algorithmClass) { this(requiredKey, jceName, algorithmClass, 0); } public Algorithm(String requiredKey, String jceName, int keyLength) { this(requiredKey, jceName, null, keyLength); } public Algorithm(String requiredKey, String jceName, String algorithmClass, int keyLength) { this.requiredKey = requiredKey; this.jceName = jceName; this.algorithmClass = algorithmClass; this.keyLength = keyLength; } } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/algorithms/SignatureAlgorithmSpi.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/algorithms/SignatureAlgorithmSpi.ja0000644000175000017500000001345211553001352032426 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.algorithms; import java.security.Key; import java.security.SecureRandom; import java.security.spec.AlgorithmParameterSpec; import org.apache.xml.security.signature.XMLSignatureException; import org.w3c.dom.Element; public abstract class SignatureAlgorithmSpi { /** * Returns the URI representation of Transformation algorithm * * @return the URI representation of Transformation algorithm */ protected abstract String engineGetURI(); /** * Proxy method for {@link java.security.Signature#getAlgorithm} * which is executed on the internal {@link java.security.Signature} object. * * @return the result of the {@link java.security.Signature#getAlgorithm} method */ protected abstract String engineGetJCEAlgorithmString(); /** * Method engineGetJCEProviderName * * @return the JCE ProviderName */ protected abstract String engineGetJCEProviderName(); /** * Proxy method for {@link java.security.Signature#update(byte[])} * which is executed on the internal {@link java.security.Signature} object. * * @param input * @throws XMLSignatureException */ protected abstract void engineUpdate(byte[] input) throws XMLSignatureException; /** * Proxy method for {@link java.security.Signature#update(byte[])} * which is executed on the internal {@link java.security.Signature} object. * * @param input * @throws XMLSignatureException */ protected abstract void engineUpdate(byte input) throws XMLSignatureException; /** * Proxy method for {@link java.security.Signature#update(byte[], int, int)} * which is executed on the internal {@link java.security.Signature} object. * * @param buf * @param offset * @param len * @throws XMLSignatureException */ protected abstract void engineUpdate(byte buf[], int offset, int len) throws XMLSignatureException; /** * Proxy method for {@link java.security.Signature#initSign(java.security.PrivateKey)} * which is executed on the internal {@link java.security.Signature} object. * * @param signingKey * @throws XMLSignatureException if this method is called on a MAC */ protected abstract void engineInitSign(Key signingKey) throws XMLSignatureException; /** * Proxy method for {@link java.security.Signature#initSign(java.security.PrivateKey, * java.security.SecureRandom)} * which is executed on the internal {@link java.security.Signature} object. * * @param signingKey * @param secureRandom * @throws XMLSignatureException if this method is called on a MAC */ protected abstract void engineInitSign(Key signingKey, SecureRandom secureRandom) throws XMLSignatureException; /** * Proxy method for {@link javax.crypto.Mac} * which is executed on the internal {@link javax.crypto.Mac#init(Key)} object. * * @param signingKey * @param algorithmParameterSpec * @throws XMLSignatureException if this method is called on a Signature */ protected abstract void engineInitSign( Key signingKey, AlgorithmParameterSpec algorithmParameterSpec ) throws XMLSignatureException; /** * Proxy method for {@link java.security.Signature#sign()} * which is executed on the internal {@link java.security.Signature} object. * * @return the result of the {@link java.security.Signature#sign()} method * @throws XMLSignatureException */ protected abstract byte[] engineSign() throws XMLSignatureException; /** * Method engineInitVerify * * @param verificationKey * @throws XMLSignatureException */ protected abstract void engineInitVerify(Key verificationKey) throws XMLSignatureException; /** * Proxy method for {@link java.security.Signature#verify(byte[])} * which is executed on the internal {@link java.security.Signature} object. * * @param signature * @return true if the signature is correct * @throws XMLSignatureException */ protected abstract boolean engineVerify(byte[] signature) throws XMLSignatureException; /** * Proxy method for {@link java.security.Signature#setParameter( * java.security.spec.AlgorithmParameterSpec)} * which is executed on the internal {@link java.security.Signature} object. * * @param params * @throws XMLSignatureException */ protected abstract void engineSetParameter(AlgorithmParameterSpec params) throws XMLSignatureException; /** * Method engineGetContextFromElement * * @param element */ protected void engineGetContextFromElement(Element element) { } /** * Method engineSetHMACOutputLength * * @param HMACOutputLength * @throws XMLSignatureException */ protected abstract void engineSetHMACOutputLength(int HMACOutputLength) throws XMLSignatureException; public void reset() { } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/algorithms/MessageDigestAlgorithm.javalibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/algorithms/MessageDigestAlgorithm.j0000644000175000017500000002110011750767342032402 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.algorithms; import java.security.MessageDigest; import java.security.NoSuchProviderException; import org.apache.xml.security.signature.XMLSignatureException; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.EncryptionConstants; import org.w3c.dom.Document; /** * Digest Message wrapper & selector class. * *
 * MessageDigestAlgorithm.getInstance()
 * 
*/ public class MessageDigestAlgorithm extends Algorithm { /** Message Digest - NOT RECOMMENDED MD5*/ public static final String ALGO_ID_DIGEST_NOT_RECOMMENDED_MD5 = Constants.MoreAlgorithmsSpecNS + "md5"; /** Digest - Required SHA1*/ public static final String ALGO_ID_DIGEST_SHA1 = Constants.SignatureSpecNS + "sha1"; /** Message Digest - RECOMMENDED SHA256*/ public static final String ALGO_ID_DIGEST_SHA256 = EncryptionConstants.EncryptionSpecNS + "sha256"; /** Message Digest - OPTIONAL SHA384*/ public static final String ALGO_ID_DIGEST_SHA384 = Constants.MoreAlgorithmsSpecNS + "sha384"; /** Message Digest - OPTIONAL SHA512*/ public static final String ALGO_ID_DIGEST_SHA512 = EncryptionConstants.EncryptionSpecNS + "sha512"; /** Message Digest - OPTIONAL RIPEMD-160*/ public static final String ALGO_ID_DIGEST_RIPEMD160 = EncryptionConstants.EncryptionSpecNS + "ripemd160"; /** Field algorithm stores the actual {@link java.security.MessageDigest} */ private final MessageDigest algorithm; /** * Constructor for the brave who pass their own message digest algorithms and the * corresponding URI. * @param doc * @param algorithmURI */ private MessageDigestAlgorithm(Document doc, String algorithmURI) throws XMLSignatureException { super(doc, algorithmURI); algorithm = getDigestInstance(algorithmURI); } /** * Factory method for constructing a message digest algorithm by name. * * @param doc * @param algorithmURI * @return The MessageDigestAlgorithm element to attach in document and to digest * @throws XMLSignatureException */ public static MessageDigestAlgorithm getInstance( Document doc, String algorithmURI ) throws XMLSignatureException { return new MessageDigestAlgorithm(doc, algorithmURI); } private static MessageDigest getDigestInstance(String algorithmURI) throws XMLSignatureException { String algorithmID = JCEMapper.translateURItoJCEID(algorithmURI); if (algorithmID == null) { Object[] exArgs = { algorithmURI }; throw new XMLSignatureException("algorithms.NoSuchMap", exArgs); } MessageDigest md; String provider = JCEMapper.getProviderId(); try { if (provider == null) { md = MessageDigest.getInstance(algorithmID); } else { md = MessageDigest.getInstance(algorithmID, provider); } } catch (java.security.NoSuchAlgorithmException ex) { Object[] exArgs = { algorithmID, ex.getLocalizedMessage() }; throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs); } catch (NoSuchProviderException ex) { Object[] exArgs = { algorithmID, ex.getLocalizedMessage() }; throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs); } return md; } /** * Returns the actual {@link java.security.MessageDigest} algorithm object * * @return the actual {@link java.security.MessageDigest} algorithm object */ public java.security.MessageDigest getAlgorithm() { return algorithm; } /** * Proxy method for {@link java.security.MessageDigest#isEqual} * which is executed on the internal {@link java.security.MessageDigest} object. * * @param digesta * @param digestb * @return the result of the {@link java.security.MessageDigest#isEqual} method */ public static boolean isEqual(byte[] digesta, byte[] digestb) { return java.security.MessageDigest.isEqual(digesta, digestb); } /** * Proxy method for {@link java.security.MessageDigest#digest()} * which is executed on the internal {@link java.security.MessageDigest} object. * * @return the result of the {@link java.security.MessageDigest#digest()} method */ public byte[] digest() { return algorithm.digest(); } /** * Proxy method for {@link java.security.MessageDigest#digest(byte[])} * which is executed on the internal {@link java.security.MessageDigest} object. * * @param input * @return the result of the {@link java.security.MessageDigest#digest(byte[])} method */ public byte[] digest(byte input[]) { return algorithm.digest(input); } /** * Proxy method for {@link java.security.MessageDigest#digest(byte[], int, int)} * which is executed on the internal {@link java.security.MessageDigest} object. * * @param buf * @param offset * @param len * @return the result of the {@link java.security.MessageDigest#digest(byte[], int, int)} method * @throws java.security.DigestException */ public int digest(byte buf[], int offset, int len) throws java.security.DigestException { return algorithm.digest(buf, offset, len); } /** * Proxy method for {@link java.security.MessageDigest#getAlgorithm} * which is executed on the internal {@link java.security.MessageDigest} object. * * @return the result of the {@link java.security.MessageDigest#getAlgorithm} method */ public String getJCEAlgorithmString() { return algorithm.getAlgorithm(); } /** * Proxy method for {@link java.security.MessageDigest#getProvider} * which is executed on the internal {@link java.security.MessageDigest} object. * * @return the result of the {@link java.security.MessageDigest#getProvider} method */ public java.security.Provider getJCEProvider() { return algorithm.getProvider(); } /** * Proxy method for {@link java.security.MessageDigest#getDigestLength} * which is executed on the internal {@link java.security.MessageDigest} object. * * @return the result of the {@link java.security.MessageDigest#getDigestLength} method */ public int getDigestLength() { return algorithm.getDigestLength(); } /** * Proxy method for {@link java.security.MessageDigest#reset} * which is executed on the internal {@link java.security.MessageDigest} object. * */ public void reset() { algorithm.reset(); } /** * Proxy method for {@link java.security.MessageDigest#update(byte[])} * which is executed on the internal {@link java.security.MessageDigest} object. * * @param input */ public void update(byte[] input) { algorithm.update(input); } /** * Proxy method for {@link java.security.MessageDigest#update(byte)} * which is executed on the internal {@link java.security.MessageDigest} object. * * @param input */ public void update(byte input) { algorithm.update(input); } /** * Proxy method for {@link java.security.MessageDigest#update(byte[], int, int)} * which is executed on the internal {@link java.security.MessageDigest} object. * * @param buf * @param offset * @param len */ public void update(byte buf[], int offset, int len) { algorithm.update(buf, offset, len); } /** @inheritDoc */ public String getBaseNamespace() { return Constants.SignatureSpecNS; } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_DIGESTMETHOD; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/algorithms/SignatureAlgorithm.java0000644000175000017500000004127211750731244032313 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.algorithms; import java.security.Key; import java.security.SecureRandom; import java.security.spec.AlgorithmParameterSpec; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import org.apache.xml.security.algorithms.implementations.IntegrityHmac; import org.apache.xml.security.algorithms.implementations.SignatureBaseRSA; import org.apache.xml.security.algorithms.implementations.SignatureDSA; import org.apache.xml.security.algorithms.implementations.SignatureECDSA; import org.apache.xml.security.exceptions.AlgorithmAlreadyRegisteredException; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.signature.XMLSignatureException; import org.apache.xml.security.utils.ClassLoaderUtils; import org.apache.xml.security.utils.Constants; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * Allows selection of digital signature's algorithm, private keys, other * security parameters, and algorithm's ID. * * @author Christian Geuer-Pollmann */ public class SignatureAlgorithm extends Algorithm { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(SignatureAlgorithm.class); /** All available algorithm classes are registered here */ private static Map> algorithmHash = new ConcurrentHashMap>(); /** Field signatureAlgorithm */ private final SignatureAlgorithmSpi signatureAlgorithm; private final String algorithmURI; /** * Constructor SignatureAlgorithm * * @param doc * @param algorithmURI * @throws XMLSecurityException */ public SignatureAlgorithm(Document doc, String algorithmURI) throws XMLSecurityException { super(doc, algorithmURI); this.algorithmURI = algorithmURI; signatureAlgorithm = getSignatureAlgorithmSpi(algorithmURI); signatureAlgorithm.engineGetContextFromElement(this.constructionElement); } /** * Constructor SignatureAlgorithm * * @param doc * @param algorithmURI * @param hmacOutputLength * @throws XMLSecurityException */ public SignatureAlgorithm( Document doc, String algorithmURI, int hmacOutputLength ) throws XMLSecurityException { super(doc, algorithmURI); this.algorithmURI = algorithmURI; signatureAlgorithm = getSignatureAlgorithmSpi(algorithmURI); signatureAlgorithm.engineGetContextFromElement(this.constructionElement); signatureAlgorithm.engineSetHMACOutputLength(hmacOutputLength); ((IntegrityHmac)signatureAlgorithm).engineAddContextToElement(constructionElement); } /** * Constructor SignatureAlgorithm * * @param element * @param baseURI * @throws XMLSecurityException */ public SignatureAlgorithm(Element element, String baseURI) throws XMLSecurityException { this(element, baseURI, false); } /** * Constructor SignatureAlgorithm * * @param element * @param baseURI * @param secureValidation * @throws XMLSecurityException */ public SignatureAlgorithm( Element element, String baseURI, boolean secureValidation ) throws XMLSecurityException { super(element, baseURI); algorithmURI = this.getURI(); Attr attr = element.getAttributeNodeNS(null, "Id"); if (attr != null) { element.setIdAttributeNode(attr, true); } if (secureValidation && (XMLSignature.ALGO_ID_MAC_HMAC_NOT_RECOMMENDED_MD5.equals(algorithmURI) || XMLSignature.ALGO_ID_SIGNATURE_NOT_RECOMMENDED_RSA_MD5.equals(algorithmURI))) { Object exArgs[] = { algorithmURI }; throw new XMLSecurityException("signature.signatureAlgorithm", exArgs); } signatureAlgorithm = getSignatureAlgorithmSpi(algorithmURI); signatureAlgorithm.engineGetContextFromElement(this.constructionElement); } /** * Get a SignatureAlgorithmSpi object corresponding to the algorithmURI argument */ private static SignatureAlgorithmSpi getSignatureAlgorithmSpi(String algorithmURI) throws XMLSignatureException { try { Class implementingClass = algorithmHash.get(algorithmURI); if (log.isDebugEnabled()) { log.debug("Create URI \"" + algorithmURI + "\" class \"" + implementingClass + "\""); } return implementingClass.newInstance(); } catch (IllegalAccessException ex) { Object exArgs[] = { algorithmURI, ex.getMessage() }; throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs, ex); } catch (InstantiationException ex) { Object exArgs[] = { algorithmURI, ex.getMessage() }; throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs, ex); } catch (NullPointerException ex) { Object exArgs[] = { algorithmURI, ex.getMessage() }; throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs, ex); } } /** * Proxy method for {@link java.security.Signature#sign()} * which is executed on the internal {@link java.security.Signature} object. * * @return the result of the {@link java.security.Signature#sign()} method * @throws XMLSignatureException */ public byte[] sign() throws XMLSignatureException { return signatureAlgorithm.engineSign(); } /** * Proxy method for {@link java.security.Signature#getAlgorithm} * which is executed on the internal {@link java.security.Signature} object. * * @return the result of the {@link java.security.Signature#getAlgorithm} method */ public String getJCEAlgorithmString() { return signatureAlgorithm.engineGetJCEAlgorithmString(); } /** * Method getJCEProviderName * * @return The Provider of this Signature Algorithm */ public String getJCEProviderName() { return signatureAlgorithm.engineGetJCEProviderName(); } /** * Proxy method for {@link java.security.Signature#update(byte[])} * which is executed on the internal {@link java.security.Signature} object. * * @param input * @throws XMLSignatureException */ public void update(byte[] input) throws XMLSignatureException { signatureAlgorithm.engineUpdate(input); } /** * Proxy method for {@link java.security.Signature#update(byte)} * which is executed on the internal {@link java.security.Signature} object. * * @param input * @throws XMLSignatureException */ public void update(byte input) throws XMLSignatureException { signatureAlgorithm.engineUpdate(input); } /** * Proxy method for {@link java.security.Signature#update(byte[], int, int)} * which is executed on the internal {@link java.security.Signature} object. * * @param buf * @param offset * @param len * @throws XMLSignatureException */ public void update(byte buf[], int offset, int len) throws XMLSignatureException { signatureAlgorithm.engineUpdate(buf, offset, len); } /** * Proxy method for {@link java.security.Signature#initSign(java.security.PrivateKey)} * which is executed on the internal {@link java.security.Signature} object. * * @param signingKey * @throws XMLSignatureException */ public void initSign(Key signingKey) throws XMLSignatureException { signatureAlgorithm.engineInitSign(signingKey); } /** * Proxy method for {@link java.security.Signature#initSign(java.security.PrivateKey, * java.security.SecureRandom)} * which is executed on the internal {@link java.security.Signature} object. * * @param signingKey * @param secureRandom * @throws XMLSignatureException */ public void initSign(Key signingKey, SecureRandom secureRandom) throws XMLSignatureException { signatureAlgorithm.engineInitSign(signingKey, secureRandom); } /** * Proxy method for {@link java.security.Signature#initSign(java.security.PrivateKey)} * which is executed on the internal {@link java.security.Signature} object. * * @param signingKey * @param algorithmParameterSpec * @throws XMLSignatureException */ public void initSign( Key signingKey, AlgorithmParameterSpec algorithmParameterSpec ) throws XMLSignatureException { signatureAlgorithm.engineInitSign(signingKey, algorithmParameterSpec); } /** * Proxy method for {@link java.security.Signature#setParameter( * java.security.spec.AlgorithmParameterSpec)} * which is executed on the internal {@link java.security.Signature} object. * * @param params * @throws XMLSignatureException */ public void setParameter(AlgorithmParameterSpec params) throws XMLSignatureException { signatureAlgorithm.engineSetParameter(params); } /** * Proxy method for {@link java.security.Signature#initVerify(java.security.PublicKey)} * which is executed on the internal {@link java.security.Signature} object. * * @param verificationKey * @throws XMLSignatureException */ public void initVerify(Key verificationKey) throws XMLSignatureException { signatureAlgorithm.engineInitVerify(verificationKey); } /** * Proxy method for {@link java.security.Signature#verify(byte[])} * which is executed on the internal {@link java.security.Signature} object. * * @param signature * @return true if if the signature is valid. * * @throws XMLSignatureException */ public boolean verify(byte[] signature) throws XMLSignatureException { return signatureAlgorithm.engineVerify(signature); } /** * Returns the URI representation of Transformation algorithm * * @return the URI representation of Transformation algorithm */ public final String getURI() { return constructionElement.getAttributeNS(null, Constants._ATT_ALGORITHM); } /** * Registers implementing class of the Transform algorithm with algorithmURI * * @param algorithmURI algorithmURI URI representation of Transform algorithm. * @param implementingClass implementingClass the implementing class of * {@link SignatureAlgorithmSpi} * @throws AlgorithmAlreadyRegisteredException if specified algorithmURI is already registered * @throws XMLSignatureException */ @SuppressWarnings("unchecked") public static void register(String algorithmURI, String implementingClass) throws AlgorithmAlreadyRegisteredException, ClassNotFoundException, XMLSignatureException { if (log.isDebugEnabled()) { log.debug("Try to register " + algorithmURI + " " + implementingClass); } // are we already registered? Class registeredClass = algorithmHash.get(algorithmURI); if (registeredClass != null) { Object exArgs[] = { algorithmURI, registeredClass }; throw new AlgorithmAlreadyRegisteredException( "algorithm.alreadyRegistered", exArgs ); } try { Class clazz = (Class) ClassLoaderUtils.loadClass(implementingClass, SignatureAlgorithm.class); algorithmHash.put(algorithmURI, clazz); } catch (NullPointerException ex) { Object exArgs[] = { algorithmURI, ex.getMessage() }; throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs, ex); } } /** * Registers implementing class of the Transform algorithm with algorithmURI * * @param algorithmURI algorithmURI URI representation of Transform algorithm. * @param implementingClass implementingClass the implementing class of * {@link SignatureAlgorithmSpi} * @throws AlgorithmAlreadyRegisteredException if specified algorithmURI is already registered * @throws XMLSignatureException */ public static void register(String algorithmURI, Class implementingClass) throws AlgorithmAlreadyRegisteredException, ClassNotFoundException, XMLSignatureException { if (log.isDebugEnabled()) { log.debug("Try to register " + algorithmURI + " " + implementingClass); } // are we already registered? Class registeredClass = algorithmHash.get(algorithmURI); if (registeredClass != null) { Object exArgs[] = { algorithmURI, registeredClass }; throw new AlgorithmAlreadyRegisteredException( "algorithm.alreadyRegistered", exArgs ); } algorithmHash.put(algorithmURI, implementingClass); } /** * This method registers the default algorithms. */ public static void registerDefaultAlgorithms() { algorithmHash.put(SignatureDSA.URI, SignatureDSA.class); algorithmHash.put( XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA1, SignatureBaseRSA.SignatureRSASHA1.class ); algorithmHash.put( XMLSignature.ALGO_ID_MAC_HMAC_SHA1, IntegrityHmac.IntegrityHmacSHA1.class ); algorithmHash.put( XMLSignature.ALGO_ID_SIGNATURE_NOT_RECOMMENDED_RSA_MD5, SignatureBaseRSA.SignatureRSAMD5.class ); algorithmHash.put( XMLSignature.ALGO_ID_SIGNATURE_RSA_RIPEMD160, SignatureBaseRSA.SignatureRSARIPEMD160.class ); algorithmHash.put( XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA256, SignatureBaseRSA.SignatureRSASHA256.class ); algorithmHash.put( XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA384, SignatureBaseRSA.SignatureRSASHA384.class ); algorithmHash.put( XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA512, SignatureBaseRSA.SignatureRSASHA512.class ); algorithmHash.put( XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA1, SignatureECDSA.SignatureECDSASHA1.class ); algorithmHash.put( XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA256, SignatureECDSA.SignatureECDSASHA256.class ); algorithmHash.put( XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA384, SignatureECDSA.SignatureECDSASHA384.class ); algorithmHash.put( XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA512, SignatureECDSA.SignatureECDSASHA512.class ); algorithmHash.put( XMLSignature.ALGO_ID_MAC_HMAC_NOT_RECOMMENDED_MD5, IntegrityHmac.IntegrityHmacMD5.class ); algorithmHash.put( XMLSignature.ALGO_ID_MAC_HMAC_RIPEMD160, IntegrityHmac.IntegrityHmacRIPEMD160.class ); algorithmHash.put( XMLSignature.ALGO_ID_MAC_HMAC_SHA256, IntegrityHmac.IntegrityHmacSHA256.class ); algorithmHash.put( XMLSignature.ALGO_ID_MAC_HMAC_SHA384, IntegrityHmac.IntegrityHmacSHA384.class ); algorithmHash.put( XMLSignature.ALGO_ID_MAC_HMAC_SHA512, IntegrityHmac.IntegrityHmacSHA512.class ); } /** * Method getBaseNamespace * * @return URI of this element */ public String getBaseNamespace() { return Constants.SignatureSpecNS; } /** * Method getBaseLocalName * * @return Local name */ public String getBaseLocalName() { return Constants._TAG_SIGNATUREMETHOD; } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/algorithms/Algorithm.java0000644000175000017500000000442311553001352030415 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.algorithms; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.SignatureElementProxy; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * The Algorithm class which stores the Algorithm URI as a string. */ public abstract class Algorithm extends SignatureElementProxy { /** * * @param doc * @param algorithmURI is the URI of the algorithm as String */ public Algorithm(Document doc, String algorithmURI) { super(doc); this.setAlgorithmURI(algorithmURI); } /** * Constructor Algorithm * * @param element * @param BaseURI * @throws XMLSecurityException */ public Algorithm(Element element, String BaseURI) throws XMLSecurityException { super(element, BaseURI); } /** * Method getAlgorithmURI * * @return The URI of the algorithm */ public String getAlgorithmURI() { return this.constructionElement.getAttributeNS(null, Constants._ATT_ALGORITHM); } /** * Sets the algorithm's URI as used in the signature. * * @param algorithmURI is the URI of the algorithm as String */ protected void setAlgorithmURI(String algorithmURI) { if (algorithmURI != null) { this.constructionElement.setAttributeNS( null, Constants._ATT_ALGORITHM, algorithmURI ); } } } libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/resource/0000755000175000017500000000000012273503734025312 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/resource/package.html0000644000175000017500000000022307533712503027567 0ustar tonytony

software configuration and internationalization ({@link org.apache.xml.security.utils.I18n}).

libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/resource/xmlsecurity_en.properties0000644000175000017500000002606611704017634032511 0ustar tonytonyalgorithm.alreadyRegistered = URI {0} already assigned to class {1} algorithm.classDoesNotExist = Cannot register URI {0} to class {1} because this class does not exist in CLASSPATH algorithm.ClassDoesNotExist = Class {0} does not exist algorithm.extendsWrongClass = Cannot register URI {0} to class {1} because it does not extend {2} algorithms.CannotUseAlgorithmParameterSpecOnDSA = Sorry, but you cannot use a AlgorithmParameterSpec object for creating DSA signatures. algorithms.CannotUseAlgorithmParameterSpecOnRSA = Sorry, but you cannot use a AlgorithmParameterSpec object for creating RSA signatures. algorithms.CannotUseSecureRandomOnMAC = Sorry, but you cannot use a SecureRandom object for creating MACs. algorithms.HMACOutputLengthMin = HMACOutputLength must not be less than {0} algorithms.HMACOutputLengthOnlyForHMAC = A HMACOutputLength can only be specified for HMAC integrity algorithms algorithms.NoSuchAlgorithm = The requested algorithm {0} does not exist. Original Message was: {1} algorithms.NoSuchMap = The algorithm URI "{0}" could not be mapped to a JCE algorithm algorithms.NoSuchProvider = The specified Provider {0} does not exist. Original Message was: {1} algorithms.operationOnlyVerification = A public key can only used for verification of a signature. algorithms.WrongKeyForThisOperation = Sorry, you supplied the wrong key type for this operation! You supplied a {0} but a {1} is needed. attributeValueIllegal = The attribute {0} has value {1} but must be {2} c14n.Canonicalizer.Exception = Exception during Canonicalization: Original Message was {0} c14n.Canonicalizer.IllegalNode = Illegal node type {0}, node name was {1} c14n.Canonicalizer.NoSuchCanonicalizer = No canonicalizer found with URI {0} c14n.Canonicalizer.ParserConfigurationException = ParserConfigurationException during Canonicalization: Original Message was {0} c14n.Canonicalizer.RelativeNamespace = Element {0} has a relative namespace: {1}="{2}" c14n.Canonicalizer.SAXException = SAXException during Canonicalization: Original Message was {0} c14n.Canonicalizer.TraversalNotSupported = This DOM document does not support Traversal {0} c14n.Canonicalizer.UnsupportedEncoding = Unsupported encoding {0} c14n.Canonicalizer.UnsupportedOperation = This canonicalizer does not support this operation c14n.XMLUtils.circumventBug2650forgotten = The tree has not been prepared for canonicalization using XMLUtils#circumventBug2650(Document) certificate.noSki.lowVersion = Certificate cannot contain a SubjectKeyIdentifier because it is only X509v{0} certificate.noSki.notOctetString = Certificates SubjectKeyIdentifier is not a OctetString certificate.noSki.null = Certificate does not contain a SubjectKeyIdentifier defaultNamespaceCannotBeSetHere = Default namespace cannot be set here ElementProxy.nullElement = Cannot create an ElementProxy from a null argument empty = {0} encryption.algorithmCannotBeUsedForEncryptedData = encryption.algorithmCannotBeUsedForEncryptedData {0} encryption.algorithmCannotEatInitParams = encryption.algorithmCannotEatInitParams encryption.algorithmCannotEncryptDecrypt = encryption.algorithmCannotEncryptDecrypt encryption.algorithmCannotWrapUnWrap = encryption.algorithmCannotWrapUnWrap encryption.ExplicitKeySizeMismatch = The xenc:KeySize element requests a key size of {0} bit but the algorithm implements {1} bit encryption.nonceLongerThanDecryptedPlaintext = The given nonce is longer than the available plaintext. I Cannot strip away this. encryption.RSAOAEP.dataHashWrong = data hash wrong encryption.RSAOAEP.dataStartWrong = data wrong start {0} encryption.RSAOAEP.dataTooShort = data too short encryption.RSAPKCS15.blockTruncated = block truncated encryption.RSAPKCS15.noDataInBlock = no data in block encryption.RSAPKCS15.unknownBlockType = unknown block type encryption.nokey = No Key Encryption Key loaded and cannot determine using key resolvers endorsed.jdk1.4.0 = Since it seems that nobody reads our installation notes, we must do it in the exception messages. Hope you read them. You did NOT use the endorsed mechanism from JDK 1.4 properly; look at how to solve this problem. errorMessages.InvalidDigestValueException = INVALID signature -- check reference resolution. errorMessages.InvalidSignatureValueException = INVALID signature -- core validation failed. errorMessages.IOException = Other file I/O and similar exceptions. errorMessages.MissingKeyFailureException = Cannot verify because of missing public key. Provide it via addResource and try again. errorMessages.MissingResourceFailureException = Cannot verify because of unresolved references. Provide it via addResource and try again. errorMessages.NoSuchAlgorithmException = Unknown Algorithm {0} errorMessages.NotYetImplementedException = Functionality not yet there. errorMessages.XMLSignatureException = Verification failed for some other reason. decoding.divisible.four = It should be divisible by four decoding.general = Error while decoding FileKeyStorageImpl.addToDefaultFromRemoteNotImplemented = Method addToDefaultFromRemote() not yet implemented. FileKeyStorageImpl.NoCert.Context = Not found such a X509Certificate including context {0} FileKeyStorageImpl.NoCert.IssNameSerNo = Not found such a X509Certificate with IssuerName {0} and serial number {1} FileKeyStorageImpl.NoCert.SubjName = Not found such a X509Certificate including SubjectName {0} generic.dontHaveConstructionElement = I do not have a construction Element generic.EmptyMessage = {0} generic.NotYetImplemented = {0} Not YET implemented ;-(( java.security.InvalidKeyException = Invalid key java.security.NoSuchProviderException = Unknown or unsupported provider java.security.UnknownKeyType = Unknown or unsupported key type {0} KeyInfo.needKeyResolver = More than one keyResovler have to be registered KeyInfo.nokey = Cannot get key from {0} KeyInfo.noKey = Cannot get the public key KeyInfo.wrongNumberOfObject = Need {0} keyObjects KeyInfo.wrongUse = This object was made for getting {0} keyResolver.alreadyRegistered = {1} class has already been registered for {0} KeyResolver.needStorageResolver = Need a StorageResolver to retrieve a Certificate from a {0} KeyResoverSpiImpl.cannotGetCert = Cannot get the Certificate that include or in {1} in implement class {0} KeyResoverSpiImpl.elementGeneration = Cannot make {1} element in implement class {0} KeyResoverSpiImpl.getPoublicKey = Cannot get the public key from implement class {0} KeyResoverSpiImpl.InvalidElement = Cannot set (2) Element in implement class {0} KeyResoverSpiImpl.keyStore = KeyStorage error in implement class {0} KeyResoverSpiImpl.need.Element = {1} type of Element is needed in implement class {0} KeyResoverSpiImpl.wrongCRLElement = Cannot make CRL from {1} in implement class {0} KeyResoverSpiImpl.wrongKeyObject = Need {1} type of KeyObject for generation Element in implement class{0} KeyResoverSpiImpl.wrongNumberOfObject = Need {1} keyObject in implement class {0} KeyStore.alreadyRegistered = {0} Class has already been registered for {1} KeyStore.register = {1} type class register error in class {0} KeyStore.registerStore.register = Registeration error for type {0} KeyValue.IllegalArgument = Cannot create a {0} from {1} namespacePrefixAlreadyUsedByOtherURI = Namespace prefix {0} already used by other URI {1} notYetInitialized = The module {0} is not yet initialized prefix.AlreadyAssigned = You want to assign {0} as prefix for namespace {1} but it is already assigned for {2} signature.Canonicalizer.UnknownCanonicalizer = Unknown canonicalizer. No handler installed for URI {0} signature.DSA.invalidFormat = Invalid ASN.1 encoding of the DSA signature signature.Generation.signBeforeGetValue = You have to XMLSignature.sign(java.security.PrivateKey) first signature.Reference.ForbiddenResolver = It is forbidden to access resolver {0} when secure validation is enabled signature.signatureAlgorithm = It is forbidden to use algorithm {0} when secure validation is enabled signature.signaturePropertyHasNoTarget = The Target attribute of the SignatureProperty must be set signature.tooManyReferences = {0} references are contained in the Manifest, maximum {1} are allowed with secure validation signature.tooManyTransforms = {0} transforms are contained in the Reference, maximum {1} are allowed with secure validation signature.Transform.ErrorDuringTransform = A {1} was thrown during the {0} transform signature.Transform.ForbiddenTransform = Transform {0} is forbidden when secure validation is enabled signature.Transform.NotYetImplemented = Transform {0} not yet implemented signature.Transform.NullPointerTransform = Null pointer as URI. Programming bug? signature.Transform.UnknownTransform = Unknown transformation. No handler installed for URI {0} signature.Transform.node = Current Node: {0} signature.Transform.nodeAndType = Current Node: {0}, type: {1} signature.Util.BignumNonPositive = bigInteger.signum() must be positive signature.Util.NonTextNode = Not a text node signature.Util.TooManyChilds = Too many childs of Type {0} in {1} signature.Verification.certificateError = Certificate error signature.Verification.IndexOutOfBounds = Index {0} illegal. We only have {1} References signature.Verification.internalError = Internal error signature.Verification.InvalidDigestOrReference = Invalid digest of reference {0} signature.Verification.keyStore = KeyStore error signature.Verification.MissingID = Cannot resolve element with ID {0} signature.Verification.MissingResources = Cannot resolve external resource {0} signature.Verification.MultipleIDs = Multiple Elements with the same ID {0} were detected signature.Verification.NoSignatureElement = Input document contains no {0} Element in namespace {1} signature.Verification.Reference.NoInput = The Reference for URI {0} has no XMLSignatureInput signature.Verification.SignatureError = Signature error signature.XMLSignatureInput.MissingConstuctor = Cannot construct a XMLSignatureInput from class {0} signature.XMLSignatureInput.SerializeDOM = Input initialized with DOM Element. Use Canonicalization to serialize it signature.XMLSignatureInput.nodesetReference = Unable to convert to nodeset the reference transform.Init.IllegalContextArgument = Invalid context argument of class {0}. Must be String, org.w3c.dom.NodeList or java.io.InputStream. transform.init.NotInitialized = transform.init.wrongURI = Initialized with wrong URI. How could this happen? We implement {0} but {1} was used during initialization transform.envelopedSignatureTransformNotInSignatureElement = Enveloped Transform cannot find Signature element utils.Base64.IllegalBitlength = Illegal byte length; Data to be decoded must be a multiple of 4 Base64Decoding = Error while decoding utils.resolver.noClass = Could not find a resolver for URI {0} and Base {1} xml.WrongContent = Cannot find {0} in {1} xml.WrongElement = Cannot create a {0} from a {1} element xpath.funcHere.documentsDiffer = The XPath is not in the same document as the context node xpath.funcHere.noXPathContext = Try to evaluate an XPath which uses the here() function but XPath is not inside an ds:XPath Element. XPath was : {0} libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/resource/xmlsecurity_de.properties0000644000175000017500000002626411704017634032477 0ustar tonytonyalgorithm.alreadyRegistered = URI {0} wurde bereits an die Klasse {1} gebunden algorithm.classDoesNotExist = Kann URI {0} nicht fr Klasse {1} registrieren weil sie nicht existiert algorithm.ClassDoesNotExist = Klasse {0} existiert nicht algorithm.extendsWrongClass = Kann URI {0} nicht fr Klasse {1} registrieren weil sie nicht {2} extended algorithms.CannotUseAlgorithmParameterSpecOnDSA = Sorry, but you cannot use a AlgorithmParameterSpec object for creating DSA signatures. algorithms.CannotUseAlgorithmParameterSpecOnRSA = Sorry, but you cannot use a AlgorithmParameterSpec object for creating RSA signatures. algorithms.CannotUseSecureRandomOnMAC = Sorry, but you cannot use a SecureRandom object for creating MACs. algorithms.HMACOutputLengthMin = HMACOutputLength must not be less than {0} algorithms.HMACOutputLengthOnlyForHMAC = A HMACOutputLength can only be specified for HMAC integrity algorithms algorithms.NoSuchAlgorithm = Der Algorithmus {0} ist nicht verfgbar. Original Nachricht war: {1} algorithms.NoSuchMap = The algorithm URI "{0}" could not be mapped to a JCE algorithm algorithms.NoSuchProvider = The specified Provider {0} does not exist. Original Message was: {1} algorithms.operationOnlyVerification = A public key can only used for verification of a signature. algorithms.WrongKeyForThisOperation = Sorry, you supplied the wrong key type for this operation! You supplied a {0} but a {1} is needed. attributeValueIllegal = The attribute {0} has value {1} but must be {2} c14n.Canonicalizer.Exception = Exception whrend Kanonisierung: Original Nachricht war {0} c14n.Canonicalizer.IllegalNode = Unzulssiger NodeType {0}, NodeName lautete {1} c14n.Canonicalizer.NoSuchCanonicalizer = Kein Canonicalizer mit dem URI {0} gefunden c14n.Canonicalizer.ParserConfigurationException = ParserConfigurationException whrend Kanonisierung: Original Nachricht war {0} c14n.Canonicalizer.RelativeNamespace = Das Element {0} hat einen relativen Namespace: {1}="{2}" c14n.Canonicalizer.SAXException = SAXException whrend Kanonisierung: Original Nachricht war {0} c14n.Canonicalizer.TraversalNotSupported = Das DOM Dokument untersttzt keine Traversal {0} c14n.Canonicalizer.UnsupportedEncoding = Unbekannte Kodierung {0} c14n.Canonicalizer.UnsupportedOperation = This canonicalizer does not support this operation c14n.XMLUtils.circumventBug2650forgotten = The tree has not been prepared for canonicalization using XMLUtils#circumventBug2650(Document) certificate.noSki.lowVersion = Certificate cannot contain a SubjectKeyIdentifier because it is only X509v{0} certificate.noSki.notOctetString = Certificates SubjectKeyIdentifier is not a OctetString certificate.noSki.null = Certificate does not contain a SubjectKeyIdentifier defaultNamespaceCannotBeSetHere = Default namespace cannot be set here ElementProxy.nullElement = Kann einen ElementProxy aus einem null Argument erzeugen empty = {0} encryption.algorithmCannotBeUsedForEncryptedData = encryption.algorithmCannotBeUsedForEncryptedData {0} encryption.algorithmCannotEatInitParams = encryption.algorithmCannotEatInitParams encryption.algorithmCannotEncryptDecrypt = encryption.algorithmCannotEncryptDecrypt encryption.algorithmCannotWrapUnWrap = encryption.algorithmCannotWrapUnWrap encryption.ExplicitKeySizeMismatch = The xenc:KeySize element requests a key size of {0} bit but the algorithm implements {1} bit encryption.nonceLongerThanDecryptedPlaintext = The given nonce is longer than the available plaintext. I Cannot strip away this. encryption.RSAOAEP.dataHashWrong = data hash wrong encryption.RSAOAEP.dataStartWrong = data wrong start {0} encryption.RSAOAEP.dataTooShort = data too short encryption.RSAPKCS15.blockTruncated = block truncated encryption.RSAPKCS15.noDataInBlock = no data in block encryption.RSAPKCS15.unknownBlockType = unknown block type encryption.nokey = No Key Encryption Key loaded and cannot determine using key resolvers endorsed.jdk1.4.0 = Since it seems that nobody reads our installation notes, we must do it in the exception messages. Hope you read them. You did NOT use the endorsed mechanism from JDK 1.4 properly; look at how to solve this problem. errorMessages.InvalidDigestValueException = Ungltige Signatur: Reference Validation fehlgeschlagen. errorMessages.InvalidSignatureValueException = Ungltige Signatur: Core Validation fehlgeschlagen. errorMessages.IOException = Datei oder Resource kann nicht gelesen werden. errorMessages.MissingKeyFailureException = Verifizieren fehlgeschlagen, weil der ffentliche Schlssel (public key) nicht verfgbar ist. Resourcen via addResource() hinzufgen und erneut verifizieren. errorMessages.MissingResourceFailureException = Verifizieren fehlgeschlagen, weil Resourcen nicht verfgbar sind. Resourcen via addResource() hinzufgen und erneut verifizieren. errorMessages.NoSuchAlgorithmException = Unbekannter Algorithmus {0} errorMessages.NotYetImplementedException = Funktionalitt noch nicht implementiert. errorMessages.XMLSignatureException = Verifizieren aus unbekanntem Grund fehlgeschlagen. decoding.divisible.four = It should be divisible by four decoding.general = Error while decoding FileKeyStorageImpl.addToDefaultFromRemoteNotImplemented = Method addToDefaultFromRemote() not yet implemented. FileKeyStorageImpl.NoCert.Context = Not found such a X509Certificate including context {0} FileKeyStorageImpl.NoCert.IssNameSerNo = Not found such a X509Certificate with IssuerName {0} and serial number {1} FileKeyStorageImpl.NoCert.SubjName = Not found such a X509Certificate including SubjectName {0} generic.dontHaveConstructionElement = I do not have a construction Element generic.EmptyMessage = {0} generic.NotYetImplemented = {0} Leider noch nicht implementiert ;-(( java.security.InvalidKeyException = Ungltiger Schlssel java.security.NoSuchProviderException = Unbekannter oder nicht untersttzter Provider java.security.UnknownKeyType = Unbekannter oder nicht untersttzter Key type {0} KeyInfo.needKeyResolver = Es mssen mehrere KeyResolver registriert sein KeyInfo.nokey = Kann keinen Schlssel aus {0} gewinnen KeyInfo.noKey = Kann keinen ffentlichen Schlssel finden KeyInfo.wrongNumberOfObject = Bentige {0} keyObjects KeyInfo.wrongUse = Dieses Objekt wird verwendet, um {0} zu gewinnen keyResolver.alreadyRegistered = Die Klasse {1} wurde bereits registriert fr {0} KeyResolver.needStorageResolver = Need a StorageResolver to retrieve a Certificate from a {0} KeyResoverSpiImpl.cannotGetCert = Cannot get the Certificate that include or in {1} in implement class {0} KeyResoverSpiImpl.elementGeneration = Cannot make {1} element in implement class {0} KeyResoverSpiImpl.getPoublicKey = Cannot get the public key from implement class {0} KeyResoverSpiImpl.InvalidElement = Cannot set (2) Element in implement class {0} KeyResoverSpiImpl.keyStore = KeyStorage error in implement class {0} KeyResoverSpiImpl.need.Element = {1} type of Element is needed in implement class {0} KeyResoverSpiImpl.wrongCRLElement = Cannot make CRL from {1} in implement class {0} KeyResoverSpiImpl.wrongKeyObject = Need {1} type of KeyObject for generation Element in implement class{0} KeyResoverSpiImpl.wrongNumberOfObject = Need {1} keyObject in implement class {0} KeyStore.alreadyRegistered = {0} Class has already been registered for {1} KeyStore.register = {1} type class register error in class {0} KeyStore.registerStore.register = Registeration error for type {0} KeyValue.IllegalArgument = Cannot create a {0} from {1} namespacePrefixAlreadyUsedByOtherURI = Namespace {0} already used by other URI {1} notYetInitialized = Das Modul {0} ist noch nicht initialisiert prefix.AlreadyAssigned = Sie binden den Prefix {0} an den Namespace {1} aber er ist bereits an {2} zugewiesen signature.Canonicalizer.UnknownCanonicalizer = Unbekannter Canonicalizer. Kein Handler installiert fr URI {0} signature.DSA.invalidFormat = Invalid ASN.1 encoding of the DSA signature signature.Generation.signBeforeGetValue = You have to XMLSignature.sign(java.security.PrivateKey) first signature.Reference.ForbiddenResolver = It is forbidden to access resolver {0} when secure validation is enabled signature.signatureAlgorithm = It is forbidden to use algorithm {0} when secure validation is enabled signature.signaturePropertyHasNoTarget = Das Target Attribut der SignatureProperty muss gesetzt sein signature.tooManyReferences = {0} references are contained in the Manifest, maximum {1} are allowed with secure validation signature.tooManyTransforms = {0} transforms are contained in the Reference, maximum {1} are allowed with secure validation signature.Transform.ErrorDuringTransform = Whrend der Transformation {0} trat eine {1} auf. signature.Transform.ForbiddenTransform = Transform {0} is forbidden when secure validation is enabled signature.Transform.NotYetImplemented = Transform {0} noch nicht implementiert signature.Transform.NullPointerTransform = Null pointer als URI bergeben. Programmierfehler? signature.Transform.UnknownTransform = Unbekannte Transformation. Kein Handler installiert fr URI {0} signature.Util.BignumNonPositive = bigInteger.signum() mu positiv sein signature.Util.NonTextNode = Kein Text Node signature.Util.TooManyChilds = Zu viele Child-Elemente vom Type {0} in {1} signature.Verification.certificateError = Zertifikatsfehler signature.Verification.IndexOutOfBounds = Index {0} illegal. We only have {1} References signature.Verification.internalError = Interner Fehler signature.Verification.InvalidDigestOrReference = Ungltiger Digest Wert oder Reference Element {0} signature.Verification.keyStore = ffnen des KeyStore fehlgeschlagen signature.Verification.MissingID = Cannot resolve element with ID {0} signature.Verification.MissingResources = Kann die externe Resource {0} nicht auflsen signature.Verification.MultipleIDs = Multiple Elements with the same ID {0} were detected signature.Verification.NoSignatureElement = Input Dokument enthlt kein {0} Element mit dem Namespace {1} signature.Verification.Reference.NoInput = Die Reference fr den URI {0} hat keinen XMLSignatureInput erhalten. signature.Verification.SignatureError = Signatur Fehler signature.XMLSignatureInput.MissingConstuctor = Kann aus der Klasse {0} keinen XMLSignatureInput erzeugen signature.XMLSignatureInput.SerializeDOM = Input mit einem DOM Dokument initialisiert. Mu mit C14N serialisiert werden transform.Init.IllegalContextArgument = Unzulssiges Kontext Argument der Klasse {0}. Muss String, org.w3c.dom.NodeList oder java.io.InputStream sein. transform.init.NotInitialized = transform.init.wrongURI = Initialisiert mit dem falschen URI. Das sollte nie passieren. Die Transformation implementiert {0} aber {1} wurde bei der Instantiierung verwendet. utils.Base64.IllegalBitlength = Ungltige Bytelnge; Muss ein vielfaches von 4 sein utils.resolver.noClass = Could not find a resolver for URI {0} and Base {1} xml.WrongContent = Kann {0} nicht finden in {1} xml.WrongElement = Kann kein {0} aus einem {1} Element erzeugen xpath.funcHere.documentsDiffer = Der XPath ist nicht im selben Dokument wie der Kontext Node xpath.funcHere.noXPathContext = Try to evaluate an XPath which uses the here() function but XPath is not inside an ds:XPath Element. XPath was : {0} libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/resource/config.xml0000644000175000017500000006131511703337722027306 0ustar tonytony libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/resource/config.dtd0000644000175000017500000000552107356024451027257 0ustar tonytony libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/resource/schema/0000755000175000017500000000000012273503734026552 5ustar tonytony././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/resource/schema/xmldsig-core-schema.dtdlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/resource/schema/xmldsig-core-schema0000644000175000017500000001105507537132224032331 0ustar tonytony ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/resource/schema/xmldsig-core-schema.xsdlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/resource/schema/xmldsig-core-schema0000644000175000017500000002406507537132224032336 0ustar tonytony ]> libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/resource/schema/etsi.xsd0000644000175000017500000004031607537132224030241 0ustar tonytony libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/resource/schema/xenc-schema.xsd0000644000175000017500000001216207537132224031466 0ustar tonytony ]> ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/resource/schema/xmldsig-core-schema.rnglibxml-security-java-1.5.6/src/main/java/org/apache/xml/security/resource/schema/xmldsig-core-schema0000644000175000017500000002660407537132224032337 0ustar tonytony libxml-security-java-1.5.6/src/main/java/org/apache/xml/security/resource/schema/xenc-schema.rng0000644000175000017500000001743507537132224031466 0ustar tonytony libxml-security-java-1.5.6/src/main/java/javax/0000755000175000017500000000000012273503733020114 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/javax/xml/0000755000175000017500000000000012273503733020714 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/javax/xml/crypto/0000755000175000017500000000000012273503733022234 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/javax/xml/crypto/package.html0000644000175000017500000000225710372164212024514 0ustar tonytony Common classes for XML cryptography. This package includes common classes that are used to perform XML cryptographic operations, such as generating an XML signature or encrypting XML data.

Package Specification

libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/Data.java0000644000175000017500000000251311552016322023741 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: Data.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto; import javax.xml.crypto.dsig.Transform; /** * An abstract representation of the result of dereferencing a * {@link URIReference} or the input/output of subsequent {@link Transform}s. * The primary purpose of this interface is to group and provide type safety * for all Data subtypes. * * @author Sean Mullan * @author JSR 105 Expert Group */ public interface Data { } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/XMLStructure.java0000644000175000017500000000314211552016322025450 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: XMLStructure.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto; /** * A representation of an XML structure from any namespace. The purpose of * this interface is to group (and provide type safety for) all * representations of XML structures. * * @author Sean Mullan * @author JSR 105 Expert Group */ public interface XMLStructure { /** * Indicates whether a specified feature is supported. * * @param feature the feature name (as an absolute URI) * @return true if the specified feature is supported, * false otherwise * @throws NullPointerException if feature is null */ boolean isFeatureSupported(String feature); } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/URIReferenceException.java0000644000175000017500000001434511562205550027237 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: URIReferenceException.java 1101389 2011-05-10 09:54:48Z coheigea $ */ package javax.xml.crypto; import java.io.PrintStream; import java.io.PrintWriter; import javax.xml.crypto.dsig.keyinfo.RetrievalMethod; /** * Indicates an exceptional condition thrown while dereferencing a * {@link URIReference}. * *

A URIReferenceException can contain a cause: another * throwable that caused this URIReferenceException to get thrown. * * @author Sean Mullan * @author JSR 105 Expert Group * @see URIDereferencer#dereference(URIReference, XMLCryptoContext) * @see RetrievalMethod#dereference(XMLCryptoContext) */ public class URIReferenceException extends Exception { private static final long serialVersionUID = 7173469703932561419L; /** * The throwable that caused this exception to get thrown, or null if this * exception was not caused by another throwable or if the causative * throwable is unknown. * * @serial */ private Throwable cause; private URIReference uriReference; /** * Constructs a new URIReferenceException with * null as its detail message. */ public URIReferenceException() { super(); } /** * Constructs a new URIReferenceException with the specified * detail message. * * @param message the detail message */ public URIReferenceException(String message) { super(message); } /** * Constructs a new URIReferenceException with the * specified detail message and cause. *

Note that the detail message associated with * cause is not automatically incorporated in * this exception's detail message. * * @param message the detail message * @param cause the cause (A null value is permitted, and * indicates that the cause is nonexistent or unknown.) */ public URIReferenceException(String message, Throwable cause) { super(message); this.cause = cause; } /** * Constructs a new URIReferenceException with the * specified detail message, cause and URIReference. *

Note that the detail message associated with * cause is not automatically incorporated in * this exception's detail message. * * @param message the detail message * @param cause the cause (A null value is permitted, and * indicates that the cause is nonexistent or unknown.) * @param uriReference the URIReference that was being * dereferenced when the error was encountered * @throws NullPointerException if uriReference is * null */ public URIReferenceException(String message, Throwable cause, URIReference uriReference) { this(message, cause); if (uriReference == null) { throw new NullPointerException("uriReference cannot be null"); } this.uriReference = uriReference; } /** * Constructs a new URIReferenceException with the specified * cause and a detail message of (cause==null ? null : * cause.toString()) (which typically contains the class and detail * message of cause). * * @param cause the cause (A null value is permitted, and * indicates that the cause is nonexistent or unknown.) */ public URIReferenceException(Throwable cause) { super(cause == null ? null : cause.toString()); this.cause = cause; } /** * Returns the URIReference that was being dereferenced * when the exception was thrown. * * @return the URIReference that was being dereferenced * when the exception was thrown, or null if not specified */ public URIReference getURIReference() { return uriReference; } /** * Returns the cause of this URIReferenceException or * null if the cause is nonexistent or unknown. (The * cause is the throwable that caused this * URIReferenceException to get thrown.) * * @return the cause of this URIReferenceException or * null if the cause is nonexistent or unknown. */ public Throwable getCause() { return cause; } /** * Prints this URIReferenceException, its backtrace and * the cause's backtrace to the standard error stream. */ public void printStackTrace() { super.printStackTrace(); cause.printStackTrace(); } /** * Prints this URIReferenceException, its backtrace and * the cause's backtrace to the specified print stream. * * @param s PrintStream to use for output */ public void printStackTrace(PrintStream s) { super.printStackTrace(s); cause.printStackTrace(s); } /** * Prints this URIReferenceException, its backtrace and * the cause's backtrace to the specified print writer. * * @param s PrintWriter to use for output */ public void printStackTrace(PrintWriter s) { super.printStackTrace(s); cause.printStackTrace(s); } } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/URIDereferencer.java0000644000175000017500000000537511552016322026052 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Portions copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * =========================================================================== * * (C) Copyright IBM Corp. 2003 All Rights Reserved. * * =========================================================================== */ /* * $Id: URIDereferencer.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto; /** * A dereferencer of {@link URIReference}s. *

* The result of dereferencing a URIReference is either an * instance of {@link OctetStreamData} or {@link NodeSetData}. Unless the * URIReference is a same-document reference as defined * in section 4.2 of the W3C Recommendation for XML-Signature Syntax and * Processing, the result of dereferencing the URIReference * MUST be an OctetStreamData. * * @author Sean Mullan * @author Joyce Leung * @author JSR 105 Expert Group * @see XMLCryptoContext#setURIDereferencer(URIDereferencer) * @see XMLCryptoContext#getURIDereferencer */ public interface URIDereferencer { /** * Dereferences the specified URIReference and returns the * dereferenced data. * * @param uriReference the URIReference * @param context an XMLCryptoContext that may * contain additional useful information for dereferencing the URI. This * implementation should dereference the specified * URIReference against the context's baseURI * parameter, if specified. * @return the dereferenced data * @throws NullPointerException if uriReference or * context are null * @throws URIReferenceException if an exception occurs while * dereferencing the specified uriReference */ Data dereference(URIReference uriReference, XMLCryptoContext context) throws URIReferenceException; } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/0000755000175000017500000000000012273503733023162 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/package.html0000644000175000017500000000466510372164212025447 0ustar tonytony Classes for generating and validating XML digital signatures. This package includes classes that represent the core elements defined in the W3C XML digital signature specification: {@link javax.xml.crypto.dsig.XMLSignature XMLSignature}, {@link javax.xml.crypto.dsig.SignedInfo SignedInfo}, {@link javax.xml.crypto.dsig.CanonicalizationMethod CanonicalizationMethod}, {@link javax.xml.crypto.dsig.SignatureMethod SignatureMethod}, {@link javax.xml.crypto.dsig.Reference Reference}, {@link javax.xml.crypto.dsig.DigestMethod DigestMethod}, {@link javax.xml.crypto.dsig.XMLObject XMLObject}, {@link javax.xml.crypto.dsig.Manifest Manifest}, {@link javax.xml.crypto.dsig.SignatureProperties SignatureProperties}, and {@link javax.xml.crypto.dsig.SignatureProperty SignatureProperty}. KeyInfo types are defined in the {@link javax.xml.crypto.dsig.keyinfo} subpackage. {@link javax.xml.crypto.dsig.XMLSignatureFactory XMLSignatureFactory} is an abstract factory that creates {@link javax.xml.crypto.dsig.XMLSignature XMLSignature} objects from scratch or from a pre-existing XML representation, such as a DOM node. {@link javax.xml.crypto.dsig.TransformService} is a service provider interface for creating and plugging in implementations of transform and canonicalization algorithms.

Of primary significance in this package is the {@link javax.xml.crypto.dsig.XMLSignature XMLSignature} class, which allows you to sign and validate an XML digital signature.

Package Specification

libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/XMLSignatureFactory.java0000644000175000017500000010610411661506004027673 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: XMLSignatureFactory.java 1203738 2011-11-18 16:47:00Z mullan $ */ package javax.xml.crypto.dsig; import javax.xml.crypto.Data; import javax.xml.crypto.MarshalException; import javax.xml.crypto.NoSuchMechanismException; import javax.xml.crypto.URIDereferencer; import javax.xml.crypto.XMLStructure; import javax.xml.crypto.dom.DOMStructure; import javax.xml.crypto.dsig.keyinfo.KeyInfo; import javax.xml.crypto.dsig.keyinfo.KeyInfoFactory; import javax.xml.crypto.dsig.spec.*; import javax.xml.crypto.dsig.dom.DOMSignContext; import java.security.InvalidAlgorithmParameterException; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.security.Provider; import java.security.Security; import java.util.List; /** * A factory for creating {@link XMLSignature} objects from scratch or * for unmarshalling an XMLSignature object from a corresponding * XML representation. * *

XMLSignatureFactory Type

* *

Each instance of XMLSignatureFactory supports a specific * XML mechanism type. To create an XMLSignatureFactory, call one * of the static {@link #getInstance getInstance} methods, passing in the XML * mechanism type desired, for example: * *

* XMLSignatureFactory factory = XMLSignatureFactory.getInstance("DOM"); *
* *

The objects that this factory produces will be based * on DOM and abide by the DOM interoperability requirements as defined in the * DOM * Mechanism Requirements section of the API overview. See the * Service * Providers section of the API overview for a list of standard mechanism * types. * *

XMLSignatureFactory implementations are registered and loaded * using the {@link java.security.Provider} mechanism. * For example, a service provider that supports the * DOM mechanism would be specified in the Provider subclass as: *

 *     put("XMLSignatureFactory.DOM", "org.example.DOMXMLSignatureFactory");
 * 
* *

An implementation MUST minimally support the default mechanism type: DOM. * *

Note that a caller must use the same XMLSignatureFactory * instance to create the XMLStructures of a particular * XMLSignature that is to be generated. The behavior is * undefined if XMLStructures from different providers or * different mechanism types are used together. * *

Also, the XMLStructures that are created by this factory * may contain state specific to the XMLSignature and are not * intended to be reusable. * *

Creating XMLSignatures from scratch

* *

Once the XMLSignatureFactory has been created, objects * can be instantiated by calling the appropriate method. For example, a * {@link Reference} instance may be created by invoking one of the * {@link #newReference newReference} methods. * *

Unmarshalling XMLSignatures from XML

* *

Alternatively, an XMLSignature may be created from an * existing XML representation by invoking the {@link #unmarshalXMLSignature * unmarshalXMLSignature} method and passing it a mechanism-specific * {@link XMLValidateContext} instance containing the XML content: * *

 * DOMValidateContext context = new DOMValidateContext(key, signatureElement);
 * XMLSignature signature = factory.unmarshalXMLSignature(context);
 * 
* * Each XMLSignatureFactory must support the required * XMLValidateContext types for that factory type, but may support * others. A DOM XMLSignatureFactory must support {@link * javax.xml.crypto.dsig.dom.DOMValidateContext} objects. * *

Signing and marshalling XMLSignatures to XML

* * Each XMLSignature created by the factory can also be * marshalled to an XML representation and signed, by invoking the * {@link XMLSignature#sign sign} method of the * {@link XMLSignature} object and passing it a mechanism-specific * {@link XMLSignContext} object containing the signing key and * marshalling parameters (see {@link DOMSignContext}). * For example: * *
 *    DOMSignContext context = new DOMSignContext(privateKey, document);
 *    signature.sign(context);
 * 
* * Concurrent Access *

The static methods of this class are guaranteed to be thread-safe. * Multiple threads may concurrently invoke the static methods defined in this * class with no ill effects. * *

However, this is not true for the non-static methods defined by this * class. Unless otherwise documented by a specific provider, threads that * need to access a single XMLSignatureFactory instance * concurrently should synchronize amongst themselves and provide the * necessary locking. Multiple threads each manipulating a different * XMLSignatureFactory instance need not synchronize. * * @author Sean Mullan * @author JSR 105 Expert Group */ public abstract class XMLSignatureFactory { private String mechanismType; private Provider provider; /** * Default constructor, for invocation by subclasses. */ protected XMLSignatureFactory() {} /** * Returns an XMLSignatureFactory that supports the * specified XML processing mechanism and representation type (ex: "DOM"). * *

This method uses the standard JCA provider lookup mechanism to * locate and instantiate an XMLSignatureFactory * implementation of the desired mechanism type. It traverses the list of * registered security Providers, starting with the most * preferred Provider. A new XMLSignatureFactory * object from the first Provider that supports the specified * mechanism is returned. * *

Note that the list of registered providers may be retrieved via * the {@link Security#getProviders() Security.getProviders()} method. * * @param mechanismType the type of the XML processing mechanism and * representation. See the Service * Providers section of the API overview for a list of standard * mechanism types. * @return a new XMLSignatureFactory * @throws NullPointerException if mechanismType is * null * @throws NoSuchMechanismException if no Provider supports an * XMLSignatureFactory implementation for the specified * mechanism * @see Provider */ public static XMLSignatureFactory getInstance(String mechanismType) { if (mechanismType == null) { throw new NullPointerException("mechanismType cannot be null"); } return findInstance(mechanismType, null); } private static XMLSignatureFactory findInstance(String mechanismType, Provider provider) { if (provider == null) { provider = getProvider("XMLSignatureFactory", mechanismType); } Provider.Service ps = provider.getService("XMLSignatureFactory", mechanismType); if (ps == null) { throw new NoSuchMechanismException("Cannot find " + mechanismType + " mechanism type"); } try { XMLSignatureFactory fac = (XMLSignatureFactory)ps.newInstance(null); fac.mechanismType = mechanismType; fac.provider = provider; return fac; } catch (NoSuchAlgorithmException nsae) { throw new NoSuchMechanismException("Cannot find " + mechanismType + " mechanism type", nsae); } } private static Provider getProvider(String engine, String mech) { Provider[] providers = Security.getProviders(engine + "." + mech); if (providers == null) { throw new NoSuchMechanismException("Mechanism type " + mech + " not available"); } return providers[0]; } /** * Returns an XMLSignatureFactory that supports the * requested XML processing mechanism and representation type (ex: "DOM"), * as supplied by the specified provider. Note that the specified * Provider object does not have to be registered in the * provider list. * * @param mechanismType the type of the XML processing mechanism and * representation. See the Service * Providers section of the API overview for a list of standard * mechanism types. * @param provider the Provider object * @return a new XMLSignatureFactory * @throws NullPointerException if provider or * mechanismType is null * @throws NoSuchMechanismException if an XMLSignatureFactory * implementation for the specified mechanism is not available * from the specified Provider object * @see Provider */ public static XMLSignatureFactory getInstance(String mechanismType, Provider provider) { if (mechanismType == null) { throw new NullPointerException("mechanismType cannot be null"); } else if (provider == null) { throw new NullPointerException("provider cannot be null"); } return findInstance(mechanismType, provider); } /** * Returns an XMLSignatureFactory that supports the * requested XML processing mechanism and representation type (ex: "DOM"), * as supplied by the specified provider. The specified provider must be * registered in the security provider list. * *

Note that the list of registered providers may be retrieved via * the {@link Security#getProviders() Security.getProviders()} method. * * @param mechanismType the type of the XML processing mechanism and * representation. See the Service * Providers section of the API overview for a list of standard * mechanism types. * @param provider the string name of the provider * @return a new XMLSignatureFactory * @throws NoSuchProviderException if the specified provider is not * registered in the security provider list * @throws NullPointerException if provider or * mechanismType is null * @throws NoSuchMechanismException if an XMLSignatureFactory * implementation for the specified mechanism is not * available from the specified provider * @see Provider */ public static XMLSignatureFactory getInstance(String mechanismType, String provider) throws NoSuchProviderException { if (mechanismType == null) { throw new NullPointerException("mechanismType cannot be null"); } else if (provider == null) { throw new NullPointerException("provider cannot be null"); } Provider prov = Security.getProvider(provider); if (prov == null) { throw new NoSuchProviderException("cannot find provider named " + provider); } return findInstance(mechanismType, prov); } /** * Returns an XMLSignatureFactory that supports the * default XML processing mechanism and representation type ("DOM"). * *

This method uses the standard JCA provider lookup mechanism to * locate and instantiate an XMLSignatureFactory * implementation of the default mechanism type. It traverses the list of * registered security Providers, starting with the most * preferred Provider. A new XMLSignatureFactory * object from the first Provider that supports the DOM * mechanism is returned. * *

Note that the list of registered providers may be retrieved via * the {@link Security#getProviders() Security.getProviders()} method. * * @return a new XMLSignatureFactory * @throws NoSuchMechanismException if no Provider supports an * XMLSignatureFactory implementation for the DOM * mechanism * @see Provider */ public static XMLSignatureFactory getInstance() { return getInstance("DOM"); } /** * Returns the type of the XML processing mechanism and representation * supported by this XMLSignatureFactory (ex: "DOM"). * * @return the XML processing mechanism type supported by this * XMLSignatureFactory */ public final String getMechanismType() { return mechanismType; } /** * Returns the provider of this XMLSignatureFactory. * * @return the provider of this XMLSignatureFactory */ public final Provider getProvider() { return provider; } /** * Creates an XMLSignature and initializes it with the contents * of the specified SignedInfo and KeyInfo * objects. * * @param si the signed info * @param ki the key info (may be null) * @return an XMLSignature * @throws NullPointerException if si is null */ public abstract XMLSignature newXMLSignature(SignedInfo si, KeyInfo ki); /** * Creates an XMLSignature and initializes it with the * specified parameters. * * @param si the signed info * @param ki the key info (may be null) * @param objects a list of {@link XMLObject}s (may be empty or * null) * @param id the Id (may be null) * @param signatureValueId the SignatureValue Id (may be null) * @return an XMLSignature * @throws NullPointerException if si is null * @throws ClassCastException if any of the objects are not of * type XMLObject */ public abstract XMLSignature newXMLSignature(SignedInfo si, KeyInfo ki, List objects, String id, String signatureValueId); /** * Creates a Reference with the specified URI and digest * method. * * @param uri the reference URI (may be null) * @param dm the digest method * @return a Reference * @throws IllegalArgumentException if uri is not RFC 2396 * compliant * @throws NullPointerException if dm is null */ public abstract Reference newReference(String uri, DigestMethod dm); /** * Creates a Reference with the specified parameters. * * @param uri the reference URI (may be null) * @param dm the digest method * @param transforms a list of {@link Transform}s. The list is defensively * copied to protect against subsequent modification. May be * null or empty. * @param type the reference type, as a URI (may be null) * @param id the reference ID (may be null) * @return a Reference * @throws ClassCastException if any of the transforms are * not of type Transform * @throws IllegalArgumentException if uri is not RFC 2396 * compliant * @throws NullPointerException if dm is null */ public abstract Reference newReference(String uri, DigestMethod dm, List transforms, String type, String id); /** * Creates a Reference with the specified parameters and * pre-calculated digest value. * *

This method is useful when the digest value of a * Reference has been previously computed. See for example, * the * * OASIS-DSS (Digital Signature Services) specification. * * @param uri the reference URI (may be null) * @param dm the digest method * @param transforms a list of {@link Transform}s. The list is defensively * copied to protect against subsequent modification. May be * null or empty. * @param type the reference type, as a URI (may be null) * @param id the reference ID (may be null) * @param digestValue the digest value. The array is cloned to protect * against subsequent modification. * @return a Reference * @throws ClassCastException if any of the transforms are * not of type Transform * @throws IllegalArgumentException if uri is not RFC 2396 * compliant * @throws NullPointerException if dm or * digestValue is null */ public abstract Reference newReference(String uri, DigestMethod dm, List transforms, String type, String id, byte[] digestValue); /** * Creates a Reference with the specified parameters. * *

This method is useful when a list of transforms have already been * applied to the Reference. See for example, * the * * OASIS-DSS (Digital Signature Services) specification. * *

When an XMLSignature containing this reference is * generated, the specified transforms (if non-null) are * applied to the specified result. The * Transforms element of the resulting Reference * element is set to the concatenation of the * appliedTransforms and transforms. * * @param uri the reference URI (may be null) * @param dm the digest method * @param appliedTransforms a list of {@link Transform}s that have * already been applied. The list is defensively * copied to protect against subsequent modification. The list must * contain at least one entry. * @param result the result of processing the sequence of * appliedTransforms * @param transforms a list of {@link Transform}s that are to be applied * when generating the signature. The list is defensively copied to * protect against subsequent modification. May be null * or empty. * @param type the reference type, as a URI (may be null) * @param id the reference ID (may be null) * @return a Reference * @throws ClassCastException if any of the transforms (in either list) * are not of type Transform * @throws IllegalArgumentException if uri is not RFC 2396 * compliant or appliedTransforms is empty * @throws NullPointerException if dm, * appliedTransforms or result is * null */ public abstract Reference newReference(String uri, DigestMethod dm, List appliedTransforms, Data result, List transforms, String type, String id); /** * Creates a SignedInfo with the specified canonicalization * and signature methods, and list of one or more references. * * @param cm the canonicalization method * @param sm the signature method * @param references a list of one or more {@link Reference}s. The list is * defensively copied to protect against subsequent modification. * @return a SignedInfo * @throws ClassCastException if any of the references are not of * type Reference * @throws IllegalArgumentException if references is empty * @throws NullPointerException if any of the parameters * are null */ public abstract SignedInfo newSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List references); /** * Creates a SignedInfo with the specified parameters. * * @param cm the canonicalization method * @param sm the signature method * @param references a list of one or more {@link Reference}s. The list is * defensively copied to protect against subsequent modification. * @param id the id (may be null) * @return a SignedInfo * @throws ClassCastException if any of the references are not of * type Reference * @throws IllegalArgumentException if references is empty * @throws NullPointerException if cm, sm, or * references are null */ public abstract SignedInfo newSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List references, String id); // Object factory methods /** * Creates an XMLObject from the specified parameters. * * @param content a list of {@link XMLStructure}s. The list * is defensively copied to protect against subsequent modification. * May be null or empty. * @param id the Id (may be null) * @param mimeType the mime type (may be null) * @param encoding the encoding (may be null) * @return an XMLObject * @throws ClassCastException if content contains any * entries that are not of type {@link XMLStructure} */ public abstract XMLObject newXMLObject(List content, String id, String mimeType, String encoding); /** * Creates a Manifest containing the specified * list of {@link Reference}s. * * @param references a list of one or more References. The list * is defensively copied to protect against subsequent modification. * @return a Manifest * @throws NullPointerException if references is * null * @throws IllegalArgumentException if references is empty * @throws ClassCastException if references contains any * entries that are not of type {@link Reference} */ public abstract Manifest newManifest(List references); /** * Creates a Manifest containing the specified * list of {@link Reference}s and optional id. * * @param references a list of one or more References. The list * is defensively copied to protect against subsequent modification. * @param id the id (may be null) * @return a Manifest * @throws NullPointerException if references is * null * @throws IllegalArgumentException if references is empty * @throws ClassCastException if references contains any * entries that are not of type {@link Reference} */ public abstract Manifest newManifest(List references, String id); /** * Creates a SignatureProperty containing the specified * list of {@link XMLStructure}s, target URI and optional id. * * @param content a list of one or more XMLStructures. The list * is defensively copied to protect against subsequent modification. * @param target the target URI of the Signature that this property applies * to * @param id the id (may be null) * @return a SignatureProperty * @throws NullPointerException if content or * target is null * @throws IllegalArgumentException if content is empty * @throws ClassCastException if content contains any * entries that are not of type {@link XMLStructure} */ public abstract SignatureProperty newSignatureProperty (List content, String target, String id); /** * Creates a SignatureProperties containing the specified * list of {@link SignatureProperty}s and optional id. * * @param properties a list of one or more SignaturePropertys. * The list is defensively copied to protect against subsequent * modification. * @param id the id (may be null) * @return a SignatureProperties * @throws NullPointerException if properties * is null * @throws IllegalArgumentException if properties is empty * @throws ClassCastException if properties contains any * entries that are not of type {@link SignatureProperty} */ public abstract SignatureProperties newSignatureProperties (List properties, String id); // Algorithm factory methods /** * Creates a DigestMethod for the specified algorithm URI * and parameters. * * @param algorithm the URI identifying the digest algorithm * @param params algorithm-specific digest parameters (may be * null) * @return the DigestMethod * @throws InvalidAlgorithmParameterException if the specified parameters * are inappropriate for the requested algorithm * @throws NoSuchAlgorithmException if an implementation of the * specified algorithm cannot be found * @throws NullPointerException if algorithm is * null */ public abstract DigestMethod newDigestMethod(String algorithm, DigestMethodParameterSpec params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException; /** * Creates a SignatureMethod for the specified algorithm URI * and parameters. * * @param algorithm the URI identifying the signature algorithm * @param params algorithm-specific signature parameters (may be * null) * @return the SignatureMethod * @throws InvalidAlgorithmParameterException if the specified parameters * are inappropriate for the requested algorithm * @throws NoSuchAlgorithmException if an implementation of the * specified algorithm cannot be found * @throws NullPointerException if algorithm is * null */ public abstract SignatureMethod newSignatureMethod(String algorithm, SignatureMethodParameterSpec params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException; /** * Creates a Transform for the specified algorithm URI * and parameters. * * @param algorithm the URI identifying the transform algorithm * @param params algorithm-specific transform parameters (may be * null) * @return the Transform * @throws InvalidAlgorithmParameterException if the specified parameters * are inappropriate for the requested algorithm * @throws NoSuchAlgorithmException if an implementation of the * specified algorithm cannot be found * @throws NullPointerException if algorithm is * null */ public abstract Transform newTransform(String algorithm, TransformParameterSpec params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException; /** * Creates a Transform for the specified algorithm URI * and parameters. The parameters are specified as a mechanism-specific * XMLStructure (ex: {@link DOMStructure}). This method is * useful when the parameters are in XML form or there is no standard * class for specifying the parameters. * * @param algorithm the URI identifying the transform algorithm * @param params a mechanism-specific XML structure from which to * unmarshal the parameters from (may be null if * not required or optional) * @return the Transform * @throws ClassCastException if the type of params is * inappropriate for this XMLSignatureFactory * @throws InvalidAlgorithmParameterException if the specified parameters * are inappropriate for the requested algorithm * @throws NoSuchAlgorithmException if an implementation of the * specified algorithm cannot be found * @throws NullPointerException if algorithm is * null */ public abstract Transform newTransform(String algorithm, XMLStructure params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException; /** * Creates a CanonicalizationMethod for the specified * algorithm URI and parameters. * * @param algorithm the URI identifying the canonicalization algorithm * @param params algorithm-specific canonicalization parameters (may be * null) * @return the CanonicalizationMethod * @throws InvalidAlgorithmParameterException if the specified parameters * are inappropriate for the requested algorithm * @throws NoSuchAlgorithmException if an implementation of the * specified algorithm cannot be found * @throws NullPointerException if algorithm is * null */ public abstract CanonicalizationMethod newCanonicalizationMethod( String algorithm, C14NMethodParameterSpec params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException; /** * Creates a CanonicalizationMethod for the specified * algorithm URI and parameters. The parameters are specified as a * mechanism-specific XMLStructure (ex: {@link DOMStructure}). * This method is useful when the parameters are in XML form or there is * no standard class for specifying the parameters. * * @param algorithm the URI identifying the canonicalization algorithm * @param params a mechanism-specific XML structure from which to * unmarshal the parameters from (may be null if * not required or optional) * @return the CanonicalizationMethod * @throws ClassCastException if the type of params is * inappropriate for this XMLSignatureFactory * @throws InvalidAlgorithmParameterException if the specified parameters * are inappropriate for the requested algorithm * @throws NoSuchAlgorithmException if an implementation of the * specified algorithm cannot be found * @throws NullPointerException if algorithm is * null */ public abstract CanonicalizationMethod newCanonicalizationMethod( String algorithm, XMLStructure params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException; /** * Returns a KeyInfoFactory that creates KeyInfo * objects. The returned KeyInfoFactory has the same * mechanism type and provider as this XMLSignatureFactory. * * @return a KeyInfoFactory * @throws NoSuchMechanismException if a KeyFactory * implementation with the same mechanism type and provider * is not available */ public final KeyInfoFactory getKeyInfoFactory() { return KeyInfoFactory.getInstance(getMechanismType(), getProvider()); } /** * Unmarshals a new XMLSignature instance from a * mechanism-specific XMLValidateContext instance. * * @param context a mechanism-specific context from which to unmarshal the * signature from * @return the XMLSignature * @throws NullPointerException if context is * null * @throws ClassCastException if the type of context is * inappropriate for this factory * @throws MarshalException if an unrecoverable exception occurs * during unmarshalling */ public abstract XMLSignature unmarshalXMLSignature (XMLValidateContext context) throws MarshalException; /** * Unmarshals a new XMLSignature instance from a * mechanism-specific XMLStructure instance. * This method is useful if you only want to unmarshal (and not * validate) an XMLSignature. * * @param xmlStructure a mechanism-specific XML structure from which to * unmarshal the signature from * @return the XMLSignature * @throws NullPointerException if xmlStructure is * null * @throws ClassCastException if the type of xmlStructure is * inappropriate for this factory * @throws MarshalException if an unrecoverable exception occurs * during unmarshalling */ public abstract XMLSignature unmarshalXMLSignature (XMLStructure xmlStructure) throws MarshalException; /** * Indicates whether a specified feature is supported. * * @param feature the feature name (as an absolute URI) * @return true if the specified feature is supported, * false otherwise * @throws NullPointerException if feature is null */ public abstract boolean isFeatureSupported(String feature); /** * Returns a reference to the URIDereferencer that is used by * default to dereference URIs in {@link Reference} objects. * * @return a reference to the default URIDereferencer (never * null) */ public abstract URIDereferencer getURIDereferencer(); } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/SignatureMethod.java0000644000175000017500000000663111750731244027134 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: SignatureMethod.java 1333869 2012-05-04 10:42:44Z coheigea $ */ package javax.xml.crypto.dsig; import javax.xml.crypto.AlgorithmMethod; import javax.xml.crypto.XMLStructure; import java.security.spec.AlgorithmParameterSpec; /** * A representation of the XML SignatureMethod element * as defined in the * W3C Recommendation for XML-Signature Syntax and Processing. * The XML Schema Definition is defined as: *

*

 *   <element name="SignatureMethod" type="ds:SignatureMethodType"/>
 *     <complexType name="SignatureMethodType" mixed="true">
 *       <sequence>
 *         <element name="HMACOutputLength" minOccurs="0" type="ds:HMACOutputLengthType"/>
 *         <any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
 *           <!-- (0,unbounded) elements from (1,1) namespace -->
 *       </sequence>
 *       <attribute name="Algorithm" type="anyURI" use="required"/>
 *     </complexType>
 * 
* * A SignatureMethod instance may be created by invoking the * {@link XMLSignatureFactory#newSignatureMethod newSignatureMethod} method * of the {@link XMLSignatureFactory} class. * * @author Sean Mullan * @author JSR 105 Expert Group * @see XMLSignatureFactory#newSignatureMethod(String, SignatureMethodParameterSpec) */ public interface SignatureMethod extends XMLStructure, AlgorithmMethod { /** * The DSAwithSHA1 * (DSS) signature method algorithm URI. */ String DSA_SHA1 = "http://www.w3.org/2000/09/xmldsig#dsa-sha1"; /** * The RSAwithSHA1 * (PKCS #1) signature method algorithm URI. */ String RSA_SHA1 = "http://www.w3.org/2000/09/xmldsig#rsa-sha1"; /** * The HMAC-SHA1 * MAC signature method algorithm URI */ String HMAC_SHA1 = "http://www.w3.org/2000/09/xmldsig#hmac-sha1"; /** * Returns the algorithm-specific input parameters of this * SignatureMethod. * *

The returned parameters can be typecast to a {@link * javax.xml.crypto.dsig.spec.SignatureMethodParameterSpec} object. * * @return the algorithm-specific input parameters of this * SignatureMethod (may be null if not * specified) */ AlgorithmParameterSpec getParameterSpec(); } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/XMLObject.java0000644000175000017500000001114711750731244025617 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Portions copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * =========================================================================== * * (C) Copyright IBM Corp. 2003 All Rights Reserved. * * =========================================================================== */ /* * $Id: XMLObject.java 1333869 2012-05-04 10:42:44Z coheigea $ */ package javax.xml.crypto.dsig; import java.util.List; import javax.xml.crypto.XMLStructure; /** * A representation of the XML Object element as defined in * the * W3C Recommendation for XML-Signature Syntax and Processing. * An XMLObject may contain any data and may include optional * MIME type, ID, and encoding attributes. The XML Schema Definition is * defined as: * *


 * <element name="Object" type="ds:ObjectType"/> 
 * <complexType name="ObjectType" mixed="true">
 *   <sequence minOccurs="0" maxOccurs="unbounded">
 *     <any namespace="##any" processContents="lax"/>
 *   </sequence>
 *   <attribute name="Id" type="ID" use="optional"/> 
 *   <attribute name="MimeType" type="string" use="optional"/>
 *   <attribute name="Encoding" type="anyURI" use="optional"/> 
 * </complexType>
 * 
* * A XMLObject instance may be created by invoking the * {@link XMLSignatureFactory#newXMLObject newXMLObject} method of the * {@link XMLSignatureFactory} class; for example: * *
 *   XMLSignatureFactory fac = XMLSignatureFactory.getInstance("DOM");
 *   List content = Collections.singletonList(fac.newManifest(references)));
 *   XMLObject object = factory.newXMLObject(content, "object-1", null, null);
 * 
* *

Note that this class is named XMLObject rather than * Object to avoid naming clashes with the existing * {@link java.lang.Object java.lang.Object} class. * * @author Sean Mullan * @author JSR 105 Expert Group * @author Joyce L. Leung * @see XMLSignatureFactory#newXMLObject(List, String, String, String) */ public interface XMLObject extends XMLStructure { /** * URI that identifies the Object element (this can be * specified as the value of the type parameter of the * {@link Reference} class to identify the referent's type). */ String TYPE = "http://www.w3.org/2000/09/xmldsig#Object"; /** * Returns an {@link java.util.Collections#unmodifiableList unmodifiable * list} of {@link XMLStructure}s contained in this XMLObject, * which represent elements from any namespace. * *

If there is a public subclass representing the type of * XMLStructure, it is returned as an instance of that class * (ex: a SignatureProperties element would be returned * as an instance of {@link javax.xml.crypto.dsig.SignatureProperties}). * * @return an unmodifiable list of XMLStructures (may be empty * but never null) */ List getContent(); /** * Returns the Id of this XMLObject. * * @return the Id (or null if not specified) */ String getId(); /** * Returns the mime type of this XMLObject. The * mime type is an optional attribute which describes the data within this * XMLObject (independent of its encoding). * * @return the mime type (or null if not specified) */ String getMimeType(); /** * Returns the encoding URI of this XMLObject. The encoding * URI identifies the method by which the object is encoded. * * @return the encoding URI (or null if not specified) */ String getEncoding(); } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/TransformException.java0000644000175000017500000001141612233525734027663 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: TransformException.java 1536468 2013-10-28 18:24:28Z mullan $ */ package javax.xml.crypto.dsig; import java.io.PrintStream; import java.io.PrintWriter; /** * Indicates an exceptional condition that occurred while executing a * transform algorithm. * *

A TransformException can contain a cause: another * throwable that caused this TransformException to get thrown. * * @see Transform#transform * @author Sean Mullan * @author JSR 105 Expert Group */ public class TransformException extends Exception { private static final long serialVersionUID = 5082634801360427800L; /** * The throwable that caused this exception to get thrown, or null if this * exception was not caused by another throwable or if the causative * throwable is unknown. * * @serial */ private Throwable cause; /** * Constructs a new TransformException with * null as its detail message. */ public TransformException() { super(); } /** * Constructs a new TransformException with the specified * detail message. * * @param message the detail message */ public TransformException(String message) { super(message); } /** * Constructs a new TransformException with the * specified detail message and cause. *

Note that the detail message associated with * cause is not automatically incorporated in * this exception's detail message. * * @param message the detail message * @param cause the cause (A null value is permitted, and * indicates that the cause is nonexistent or unknown.) */ public TransformException(String message, Throwable cause) { super(message); this.cause = cause; } /** * Constructs a new TransformException with the specified * cause and a detail message of * (cause==null ? null : cause.toString()) * (which typically contains the class and detail message of * cause). * * @param cause the cause (A null value is permitted, and * indicates that the cause is nonexistent or unknown.) */ public TransformException(Throwable cause) { super(cause==null ? null : cause.toString()); this.cause = cause; } /** * Returns the cause of this TransformException or * null if the cause is nonexistent or unknown. (The * cause is the throwable that caused this * TransformException to get thrown.) * * @return the cause of this TransformException or * null if the cause is nonexistent or unknown. */ public Throwable getCause() { return cause; } /** * Prints this TransformException, its backtrace and * the cause's backtrace to the standard error stream. */ public void printStackTrace() { super.printStackTrace(); if (cause != null) { cause.printStackTrace(); } } /** * Prints this TransformException, its backtrace and * the cause's backtrace to the specified print stream. * * @param s PrintStream to use for output */ public void printStackTrace(PrintStream s) { super.printStackTrace(s); if (cause != null) { cause.printStackTrace(s); } } /** * Prints this TransformException, its backtrace and * the cause's backtrace to the specified print writer. * * @param s PrintWriter to use for output */ public void printStackTrace(PrintWriter s) { super.printStackTrace(s); if (cause != null) { cause.printStackTrace(s); } } } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/XMLSignature.java0000644000175000017500000002234011750731244026347 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Portions copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * =========================================================================== * * (C) Copyright IBM Corp. 2003 All Rights Reserved. * * =========================================================================== */ /* * $Id: XMLSignature.java 1333869 2012-05-04 10:42:44Z coheigea $ */ package javax.xml.crypto.dsig; import javax.xml.crypto.KeySelector; import javax.xml.crypto.KeySelectorResult; import javax.xml.crypto.MarshalException; import javax.xml.crypto.XMLStructure; import javax.xml.crypto.dsig.keyinfo.KeyInfo; import java.security.Signature; import java.util.List; /** * A representation of the XML Signature element as * defined in the * W3C Recommendation for XML-Signature Syntax and Processing. * This class contains methods for signing and validating XML signatures * with behavior as defined by the W3C specification. The XML Schema Definition * is defined as: *


 * <element name="Signature" type="ds:SignatureType"/>
 * <complexType name="SignatureType">
 *    <sequence> 
 *      <element ref="ds:SignedInfo"/> 
 *      <element ref="ds:SignatureValue"/> 
 *      <element ref="ds:KeyInfo" minOccurs="0"/> 
 *      <element ref="ds:Object" minOccurs="0" maxOccurs="unbounded"/> 
 *    </sequence>  
 *    <attribute name="Id" type="ID" use="optional"/>
 * </complexType>
 * 
*

* An XMLSignature instance may be created by invoking one of the * {@link XMLSignatureFactory#newXMLSignature newXMLSignature} methods of the * {@link XMLSignatureFactory} class. * *

If the contents of the underlying document containing the * XMLSignature are subsequently modified, the behavior is * undefined. * *

Note that this class is named XMLSignature rather than * Signature to avoid naming clashes with the existing * {@link Signature java.security.Signature} class. * * @see XMLSignatureFactory#newXMLSignature(SignedInfo, KeyInfo) * @see XMLSignatureFactory#newXMLSignature(SignedInfo, KeyInfo, List, String, String) * @author Joyce L. Leung * @author Sean Mullan * @author Erwin van der Koogh * @author JSR 105 Expert Group */ public interface XMLSignature extends XMLStructure { /** * The XML Namespace URI of the W3C Recommendation for XML-Signature * Syntax and Processing. */ String XMLNS = "http://www.w3.org/2000/09/xmldsig#"; /** * Validates the signature according to the * * core validation processing rules. This method validates the * signature using the existing state, it does not unmarshal and * reinitialize the contents of the XMLSignature using the * location information specified in the context. * *

This method only validates the signature the first time it is * invoked. On subsequent invocations, it returns a cached result. * * @param validateContext the validating context * @return true if the signature passed core validation, * otherwise false * @throws ClassCastException if the type of validateContext * is not compatible with this XMLSignature * @throws NullPointerException if validateContext is * null * @throws XMLSignatureException if an unexpected error occurs during * validation that prevented the validation operation from completing */ boolean validate(XMLValidateContext validateContext) throws XMLSignatureException; /** * Returns the key info of this XMLSignature. * * @return the key info (may be null if not specified) */ KeyInfo getKeyInfo(); /** * Returns the signed info of this XMLSignature. * * @return the signed info (never null) */ SignedInfo getSignedInfo(); /** * Returns an {@link java.util.Collections#unmodifiableList unmodifiable * list} of {@link XMLObject}s contained in this XMLSignature. * * @return an unmodifiable list of XMLObjects (may be empty * but never null) */ List getObjects(); /** * Returns the optional Id of this XMLSignature. * * @return the Id (may be null if not specified) */ String getId(); /** * Returns the signature value of this XMLSignature. * * @return the signature value */ SignatureValue getSignatureValue(); /** * Signs this XMLSignature. * *

If this method throws an exception, this XMLSignature and * the signContext parameter will be left in the state that * it was in prior to the invocation. * * @param signContext the signing context * @throws ClassCastException if the type of signContext is * not compatible with this XMLSignature * @throws NullPointerException if signContext is * null * @throws MarshalException if an exception occurs while marshalling * @throws XMLSignatureException if an unexpected exception occurs while * generating the signature */ void sign(XMLSignContext signContext) throws MarshalException, XMLSignatureException; /** * Returns the result of the {@link KeySelector}, if specified, after * this XMLSignature has been signed or validated. * * @return the key selector result, or null if a key * selector has not been specified or this XMLSignature * has not been signed or validated */ KeySelectorResult getKeySelectorResult(); /** * A representation of the XML SignatureValue element as * defined in the * W3C Recommendation for XML-Signature Syntax and Processing. * The XML Schema Definition is defined as: *

*

     *   <element name="SignatureValue" type="ds:SignatureValueType"/>
     *     <complexType name="SignatureValueType">
     *       <simpleContent>
     *         <extension base="base64Binary">
     *           <attribute name="Id" type="ID" use="optional"/>
     *         </extension>
     *       </simpleContent>
     *     </complexType>
     * 
* * @author Sean Mullan * @author JSR 105 Expert Group */ public interface SignatureValue extends XMLStructure { /** * Returns the optional Id attribute of this * SignatureValue, which permits this element to be * referenced from elsewhere. * * @return the Id attribute (may be null if * not specified) */ String getId(); /** * Returns the signature value of this SignatureValue. * * @return the signature value (may be null if the * XMLSignature has not been signed yet). Each * invocation of this method returns a new clone of the array to * prevent subsequent modification. */ byte[] getValue(); /** * Validates the signature value. This method performs a * cryptographic validation of the signature calculated over the * SignedInfo of the XMLSignature. * *

This method only validates the signature the first * time it is invoked. On subsequent invocations, it returns a cached * result. * * @return true if the signature was * validated successfully; false otherwise * @param validateContext the validating context * @throws NullPointerException if validateContext is * null * @throws XMLSignatureException if an unexpected exception occurs while * validating the signature */ boolean validate(XMLValidateContext validateContext) throws XMLSignatureException; } } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/Reference.java0000644000175000017500000001406611552016322025722 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: Reference.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto.dsig; import javax.xml.crypto.Data; import javax.xml.crypto.URIReference; import javax.xml.crypto.XMLStructure; import java.io.InputStream; import java.util.List; /** * A representation of the Reference element as defined in the * * W3C Recommendation for XML-Signature Syntax and Processing. * The XML schema is defined as: *

 * <element name="Reference" type="ds:ReferenceType"/>
 * <complexType name="ReferenceType">
 *   <sequence>
 *     <element ref="ds:Transforms" minOccurs="0"/>
 *     <element ref="ds:DigestMethod"/>
 *     <element ref="ds:DigestValue"/>
 *   </sequence>
 *   <attribute name="Id" type="ID" use="optional"/>
 *   <attribute name="URI" type="anyURI" use="optional"/>
 *   <attribute name="Type" type="anyURI" use="optional"/>
 * </complexType>
 *
 * <element name="DigestValue" type="ds:DigestValueType"/>
 * <simpleType name="DigestValueType">
 *   <restriction base="base64Binary"/>
 * </simpleType>
 * 
* *

A Reference instance may be created by invoking one of the * {@link XMLSignatureFactory#newReference newReference} methods of the * {@link XMLSignatureFactory} class; for example: * *

 *   XMLSignatureFactory factory = XMLSignatureFactory.getInstance("DOM");
 *   Reference ref = factory.newReference
 *     ("http://www.ietf.org/rfc/rfc3275.txt", 
 *	factory.newDigestMethod(DigestMethod.SHA1, null));
 * 
* * @author Sean Mullan * @author Erwin van der Koogh * @author JSR 105 Expert Group * @see XMLSignatureFactory#newReference(String, DigestMethod) * @see XMLSignatureFactory#newReference(String, DigestMethod, List, String, String) */ public interface Reference extends URIReference, XMLStructure { /** * Returns an {@link java.util.Collections#unmodifiableList unmodifiable * list} of {@link Transform}s that are contained in this * Reference. * * @return an unmodifiable list of Transforms * (may be empty but never null) */ List getTransforms(); /** * Returns the digest method of this Reference. * * @return the digest method */ DigestMethod getDigestMethod(); /** * Returns the optional Id attribute of this * Reference, which permits this reference to be * referenced from elsewhere. * * @return the Id attribute (may be null if not * specified) */ String getId(); /** * Returns the digest value of this Reference. * * @return the raw digest value, or null if this reference has * not been digested yet. Each invocation of this method returns a new * clone to protect against subsequent modification. */ byte[] getDigestValue(); /** * Returns the calculated digest value of this Reference * after a validation operation. This method is useful for debugging if * the reference fails to validate. * * @return the calculated digest value, or null if this * reference has not been validated yet. Each invocation of this method * returns a new clone to protect against subsequent modification. */ byte[] getCalculatedDigestValue(); /** * Validates this reference. This method verifies the digest of this * reference. * *

This method only validates the reference the first time it is * invoked. On subsequent invocations, it returns a cached result. * * @return true if this reference was validated successfully; * false otherwise * @param validateContext the validating context * @throws NullPointerException if validateContext is * null * @throws XMLSignatureException if an unexpected exception occurs while * validating the reference */ boolean validate(XMLValidateContext validateContext) throws XMLSignatureException; /** * Returns the dereferenced data, if * reference caching * is enabled. This is the result of dereferencing the URI of this * reference during a validation or generation operation. * * @return the dereferenced data, or null if reference * caching is not enabled or this reference has not been generated or * validated */ Data getDereferencedData(); /** * Returns the pre-digested input stream, if * reference caching * is enabled. This is the input to the digest operation during a * validation or signing operation. * * @return an input stream containing the pre-digested input, or * null if reference caching is not enabled or this * reference has not been generated or validated */ InputStream getDigestInputStream(); } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/Manifest.java0000644000175000017500000000606711750731244025603 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: Manifest.java 1333869 2012-05-04 10:42:44Z coheigea $ */ package javax.xml.crypto.dsig; import javax.xml.crypto.XMLStructure; import java.util.List; /** * A representation of the XML Manifest element as defined in * the * W3C Recommendation for XML-Signature Syntax and Processing. * The XML Schema Definition is defined as: *


 * <element name="Manifest" type="ds:ManifestType"/> 
 *   <complexType name="ManifestType">
 *     <sequence>
 *       <element ref="ds:Reference" maxOccurs="unbounded"/> 
 *     </sequence>  
 *     <attribute name="Id" type="ID" use="optional"/> 
 *   </complexType>
 * 
* * A Manifest instance may be created by invoking * one of the {@link XMLSignatureFactory#newManifest newManifest} * methods of the {@link XMLSignatureFactory} class; for example: * *
 *   XMLSignatureFactory factory = XMLSignatureFactory.getInstance("DOM");
 *   List references = Collections.singletonList(factory.newReference
 *       ("#reference-1", DigestMethod.SHA1));
 *   Manifest manifest = factory.newManifest(references, "manifest-1");
 * 
* * @author Sean Mullan * @author JSR 105 Expert Group * @see XMLSignatureFactory#newManifest(List) * @see XMLSignatureFactory#newManifest(List, String) */ public interface Manifest extends XMLStructure { /** * URI that identifies the Manifest element (this can be * specified as the value of the type parameter of the * {@link Reference} class to identify the referent's type). */ String TYPE = "http://www.w3.org/2000/09/xmldsig#Manifest"; /** * Returns the Id of this Manifest. * * @return the Id of this Manifest (or null * if not specified) */ String getId(); /** * Returns an {@link java.util.Collections#unmodifiableList unmodifiable * list} of one or more {@link Reference}s that are contained in this * Manifest. * * @return an unmodifiable list of one or more References */ List getReferences(); } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/SignatureProperties.java0000644000175000017500000000623211750731244030045 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: SignatureProperties.java 1333869 2012-05-04 10:42:44Z coheigea $ */ package javax.xml.crypto.dsig; import javax.xml.crypto.XMLStructure; import java.util.List; /** * A representation of the XML SignatureProperties element as * defined in the * W3C Recommendation for XML-Signature Syntax and Processing. * The XML Schema Definition is defined as: *

 *<element name="SignatureProperties" type="ds:SignaturePropertiesType"/> 
 *   <complexType name="SignaturePropertiesType">
 *     <sequence>
 *       <element ref="ds:SignatureProperty" maxOccurs="unbounded"/> 
 *     </sequence>
 *     <attribute name="Id" type="ID" use="optional"/> 
 *   </complexType>
 * 
* * A SignatureProperties instance may be created by invoking the * {@link XMLSignatureFactory#newSignatureProperties newSignatureProperties} * method of the {@link XMLSignatureFactory} class; for example: * *
 *   XMLSignatureFactory factory = XMLSignatureFactory.getInstance("DOM");
 *   SignatureProperties properties = 
 *	factory.newSignatureProperties(props, "signature-properties-1");
 * 
* * @author Sean Mullan * @author JSR 105 Expert Group * @see XMLSignatureFactory#newSignatureProperties(List, String) * @see SignatureProperty */ public interface SignatureProperties extends XMLStructure { /** * URI that identifies the SignatureProperties element (this * can be specified as the value of the type parameter of the * {@link Reference} class to identify the referent's type). */ String TYPE = "http://www.w3.org/2000/09/xmldsig#SignatureProperties"; /** * Returns the Id of this SignatureProperties. * * @return the Id of this SignatureProperties (or * null if not specified) */ String getId(); /** * Returns an {@link java.util.Collections#unmodifiableList unmodifiable * list} of one or more {@link SignatureProperty}s that are contained in * this SignatureProperties. * * @return an unmodifiable list of one or more * SignaturePropertys */ List getProperties(); } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/keyinfo/0000755000175000017500000000000012273503733024626 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/keyinfo/package.html0000644000175000017500000000405110372164212027100 0ustar tonytony Classes for parsing and processing {@link javax.xml.crypto.dsig.keyinfo.KeyInfo KeyInfo} elements and structures. KeyInfo is an optional element that enables the recipient(s) to obtain the key needed to validate an {@link javax.xml.crypto.dsig.XMLSignature XMLSignature}. KeyInfo may contain keys, names, certificates and other public key management information, such as in-band key distribution or key agreement data. This package contains classes representing types defined in the W3C specification for XML Signatures, such as {@link javax.xml.crypto.dsig.keyinfo.KeyName KeyName}, {@link javax.xml.crypto.dsig.keyinfo.KeyValue KeyValue}, {@link javax.xml.crypto.dsig.keyinfo.RetrievalMethod RetrievalMethod}, {@link javax.xml.crypto.dsig.keyinfo.X509Data X509Data}, {@link javax.xml.crypto.dsig.keyinfo.X509IssuerSerial X509IssuerSerial}, and {@link javax.xml.crypto.dsig.keyinfo.PGPData PGPData}. {@link javax.xml.crypto.dsig.keyinfo.KeyInfoFactory KeyInfoFactory} is an abstract factory that creates KeyInfo objects from scratch.

Package Specification

libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/keyinfo/KeyValue.java0000644000175000017500000001231111750731244027213 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: KeyValue.java 1333869 2012-05-04 10:42:44Z coheigea $ */ package javax.xml.crypto.dsig.keyinfo; import java.security.KeyException; import java.security.PublicKey; import java.security.interfaces.DSAPublicKey; import java.security.interfaces.RSAPublicKey; import javax.xml.crypto.XMLStructure; /** * A representation of the XML KeyValue element as defined * in the * W3C Recommendation for XML-Signature Syntax and Processing. A * KeyValue object contains a single public key that may be * useful in validating the signature. The XML schema definition is defined as: * *
 *    <element name="KeyValue" type="ds:KeyValueType"/>
 *    <complexType name="KeyValueType" mixed="true">
 *      <choice>
 *        <element ref="ds:DSAKeyValue"/>
 *        <element ref="ds:RSAKeyValue"/>
 *        <any namespace="##other" processContents="lax"/>
 *      </choice>
 *    </complexType>
 *
 *    <element name="DSAKeyValue" type="ds:DSAKeyValueType"/>
 *    <complexType name="DSAKeyValueType">
 *      <sequence>
 *        <sequence minOccurs="0">
 *          <element name="P" type="ds:CryptoBinary"/>
 *          <element name="Q" type="ds:CryptoBinary"/>
 *        </sequence>
 *        <element name="G" type="ds:CryptoBinary" minOccurs="0"/> 
 *        <element name="Y" type="ds:CryptoBinary"/> 
 *        <element name="J" type="ds:CryptoBinary" minOccurs="0"/>
 *        <sequence minOccurs="0">
 *          <element name="Seed" type="ds:CryptoBinary"/> 
 *          <element name="PgenCounter" type="ds:CryptoBinary"/> 
 *        </sequence>
 *      </sequence>
 *    </complexType>
 *
 *    <element name="RSAKeyValue" type="ds:RSAKeyValueType"/>
 *    <complexType name="RSAKeyValueType">
 *      <sequence>
 *        <element name="Modulus" type="ds:CryptoBinary"/> 
 *        <element name="Exponent" type="ds:CryptoBinary"/>
 *      </sequence>
 *    </complexType>
 * 
* A KeyValue instance may be created by invoking the * {@link KeyInfoFactory#newKeyValue newKeyValue} method of the * {@link KeyInfoFactory} class, and passing it a {@link * java.security.PublicKey} representing the value of the public key. Here is * an example of creating a KeyValue from a {@link DSAPublicKey} * of a {@link java.security.cert.Certificate} stored in a * {@link java.security.KeyStore}: *
 * KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
 * PublicKey dsaPublicKey = keyStore.getCertificate("myDSASigningCert").getPublicKey();
 * KeyInfoFactory factory = KeyInfoFactory.getInstance("DOM");
 * KeyValue keyValue = factory.newKeyValue(dsaPublicKey);
 * 
* * This class returns the DSAKeyValue and * RSAKeyValue elements as objects of type * {@link DSAPublicKey} and {@link RSAPublicKey}, respectively. Note that not * all of the fields in the schema are accessible as parameters of these * types. * * @author Sean Mullan * @author JSR 105 Expert Group * @see KeyInfoFactory#newKeyValue(PublicKey) */ public interface KeyValue extends XMLStructure { /** * URI identifying the DSA KeyValue KeyInfo type: * http://www.w3.org/2000/09/xmldsig#DSAKeyValue. This can be specified as * the value of the type parameter of the * {@link RetrievalMethod} class to describe a remote * DSAKeyValue structure. */ String DSA_TYPE = "http://www.w3.org/2000/09/xmldsig#DSAKeyValue"; /** * URI identifying the RSA KeyValue KeyInfo type: * http://www.w3.org/2000/09/xmldsig#RSAKeyValue. This can be specified as * the value of the type parameter of the * {@link RetrievalMethod} class to describe a remote * RSAKeyValue structure. */ String RSA_TYPE = "http://www.w3.org/2000/09/xmldsig#RSAKeyValue"; /** * Returns the public key of this KeyValue. * * @return the public key of this KeyValue * @throws KeyException if this KeyValue cannot be converted * to a PublicKey */ PublicKey getPublicKey() throws KeyException; } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/keyinfo/PGPData.java0000644000175000017500000001046111750731244026712 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: PGPData.java 1333869 2012-05-04 10:42:44Z coheigea $ */ package javax.xml.crypto.dsig.keyinfo; import java.util.Collections; import java.util.List; import javax.xml.crypto.XMLStructure; /** * A representation of the XML PGPData element as defined in * the * W3C Recommendation for XML-Signature Syntax and Processing. A * PGPData object is used to convey information related to * PGP public key pairs and signatures on such keys. The XML Schema Definition * is defined as: * *
 *    <element name="PGPData" type="ds:PGPDataType"/> 
 *    <complexType name="PGPDataType"> 
 *      <choice>
 *        <sequence>
 *          <element name="PGPKeyID" type="base64Binary"/> 
 *          <element name="PGPKeyPacket" type="base64Binary" minOccurs="0"/> 
 *          <any namespace="##other" processContents="lax" minOccurs="0"
 *           maxOccurs="unbounded"/>
 *        </sequence>
 *        <sequence>
 *          <element name="PGPKeyPacket" type="base64Binary"/> 
 *          <any namespace="##other" processContents="lax" minOccurs="0"
 *           maxOccurs="unbounded"/>
 *        </sequence>
 *      </choice>
 *    </complexType>
 * 
* * A PGPData instance may be created by invoking one of the * {@link KeyInfoFactory#newPGPData newPGPData} methods of the {@link * KeyInfoFactory} class, and passing it * byte arrays representing the contents of the PGP public key * identifier and/or PGP key material packet, and an optional list of * elements from an external namespace. * * @author Sean Mullan * @author JSR 105 Expert Group * @see KeyInfoFactory#newPGPData(byte[]) * @see KeyInfoFactory#newPGPData(byte[], byte[], List) * @see KeyInfoFactory#newPGPData(byte[], List) */ public interface PGPData extends XMLStructure { /** * URI identifying the PGPData KeyInfo type: * http://www.w3.org/2000/09/xmldsig#PGPData. This can be specified as the * value of the type parameter of the {@link RetrievalMethod} * class to describe a remote PGPData structure. */ String TYPE = "http://www.w3.org/2000/09/xmldsig#PGPData"; /** * Returns the PGP public key identifier of this PGPData as * defined in RFC 2440, * section 11.2. * * @return the PGP public key identifier (may be null if * not specified). Each invocation of this method returns a new clone * to protect against subsequent modification. */ byte[] getKeyId(); /** * Returns the PGP key material packet of this PGPData as * defined in RFC 2440, * section 5.5. * * @return the PGP key material packet (may be null if not * specified). Each invocation of this method returns a new clone to * protect against subsequent modification. */ byte[] getKeyPacket(); /** * Returns an {@link Collections#unmodifiableList unmodifiable list} * of {@link XMLStructure}s representing elements from an external * namespace. * * @return an unmodifiable list of XMLStructures (may be * empty, but never null) */ List getExternalElements(); } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/keyinfo/KeyInfo.java0000644000175000017500000001133411552016322027027 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: KeyInfo.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto.dsig.keyinfo; import java.util.List; import javax.xml.crypto.MarshalException; import javax.xml.crypto.XMLCryptoContext; import javax.xml.crypto.XMLStructure; /** * A representation of the XML KeyInfo element as defined in * the * W3C Recommendation for XML-Signature Syntax and Processing. * A KeyInfo contains a list of {@link XMLStructure}s, each of * which contain information that enables the recipient(s) to obtain the key * needed to validate an XML signature. The XML Schema Definition is defined as: * *
 * <element name="KeyInfo" type="ds:KeyInfoType"/> 
 * <complexType name="KeyInfoType" mixed="true">
 *   <choice maxOccurs="unbounded">     
 *     <element ref="ds:KeyName"/> 
 *     <element ref="ds:KeyValue"/> 
 *     <element ref="ds:RetrievalMethod"/>
 *     <element ref="ds:X509Data"/>
 *     <element ref="ds:PGPData"/>
 *     <element ref="ds:SPKIData"/>
 *     <element ref="ds:MgmtData"/>
 *     <any processContents="lax" namespace="##other"/>
 *     <!-- (1,1) elements from (0,unbounded) namespaces -->
 *   </choice>
 *   <attribute name="Id" type="ID" use="optional"/> 
 * </complexType>
 * 
* * A KeyInfo instance may be created by invoking one of the * {@link KeyInfoFactory#newKeyInfo newKeyInfo} methods of the * {@link KeyInfoFactory} class, and passing it a list of one or more * XMLStructures and an optional id parameter; * for example: *
 *   KeyInfoFactory factory = KeyInfoFactory.getInstance("DOM");
 *   KeyInfo keyInfo = factory.newKeyInfo
 *	(Collections.singletonList(factory.newKeyName("Alice"), "keyinfo-1"));
 * 
* *

KeyInfo objects can also be marshalled to XML by invoking * the {@link #marshal marshal} method. * * @author Sean Mullan * @author JSR 105 Expert Group * @see KeyInfoFactory#newKeyInfo(List) * @see KeyInfoFactory#newKeyInfo(List, String) */ public interface KeyInfo extends XMLStructure { /** * Returns an {@link java.util.Collections#unmodifiableList unmodifiable * list} containing the key information. Each entry of the list is * an {@link XMLStructure}. * *

If there is a public subclass representing the type of * XMLStructure, it is returned as an instance of that * class (ex: an X509Data element would be returned as an * instance of {@link javax.xml.crypto.dsig.keyinfo.X509Data}). * * @return an unmodifiable list of one or more XMLStructures * in this KeyInfo. Never returns null or an * empty list. */ List getContent(); /** * Return the optional Id attribute of this KeyInfo, which * may be useful for referencing this KeyInfo from other * XML structures. * * @return the Id attribute of this KeyInfo (may be * null if not specified) */ String getId(); /** * Marshals the key info to XML. * * @param parent a mechanism-specific structure containing the parent node * that the marshalled key info will be appended to * @param context the XMLCryptoContext containing additional * context (may be null if not applicable) * @throws ClassCastException if the type of parent or * context is not compatible with this key info * @throws MarshalException if the key info cannot be marshalled * @throws NullPointerException if parent is null */ void marshal(XMLStructure parent, XMLCryptoContext context) throws MarshalException; } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/keyinfo/X509IssuerSerial.java0000644000175000017500000000625011552016322030464 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: X509IssuerSerial.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto.dsig.keyinfo; import java.math.BigInteger; import java.security.cert.X509Certificate; import javax.xml.crypto.XMLStructure; /** * A representation of the XML X509IssuerSerial element as * defined in the * W3C Recommendation for XML-Signature Syntax and Processing. * An X509IssuerSerial object contains an X.509 issuer * distinguished name (DN) and serial number pair. The XML schema definition is * defined as: * *

 *   <element name="X509IssuerSerial" type="ds:X509IssuerSerialType"/>
 *   <complexType name="X509IssuerSerialType">
 *     <sequence>
 *       <element name="X509IssuerName" type="string"/> 
 *       <element name="X509SerialNumber" type="integer"/> 
 *     </sequence>  
 *   </complexType>
 * 
* * An X509IssuerSerial instance may be created by invoking the * {@link KeyInfoFactory#newX509IssuerSerial newX509IssuerSerial} method * of the {@link KeyInfoFactory} class, and passing it a * String and BigInteger representing the X.500 * DN and serial number. Here is an example of creating an * X509IssuerSerial from the issuer DN and serial number of an * existing {@link X509Certificate}: *
 * KeyInfoFactory factory = KeyInfoFactory.getInstance("DOM");
 * X509IssuerSerial issuer = factory.newX509IssuerSerial
 *     (cert.getIssuerX500Principal().getName(), cert.getSerialNumber());
 * 
* * @author Sean Mullan * @author JSR 105 Expert Group * @see X509Data#getContent * @see KeyInfoFactory#newX509IssuerSerial(String, BigInteger) */ public interface X509IssuerSerial extends XMLStructure { /** * Returns the X.500 distinguished name of this * X509IssuerSerial in * RFC 2253 String format. * * @return the X.500 distinguished name in RFC 2253 String format (never * null) */ String getIssuerName(); /** * Returns the serial number of this X509IssuerSerial. * * @return the serial number (never null) */ BigInteger getSerialNumber(); } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/keyinfo/X509Data.java0000644000175000017500000001065211750731244026733 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: X509Data.java 1333869 2012-05-04 10:42:44Z coheigea $ */ package javax.xml.crypto.dsig.keyinfo; import javax.xml.crypto.XMLStructure; import java.security.cert.X509CRL; import java.util.List; /** * A representation of the XML X509Data element as defined in * the * W3C Recommendation for XML-Signature Syntax and Processing. An * X509Data object contains one or more identifers of keys * or X.509 certificates (or certificates' identifiers or a revocation list). * The XML Schema Definition is defined as: * *
 *    <element name="X509Data" type="ds:X509DataType"/>
 *    <complexType name="X509DataType"> 
 *        <sequence maxOccurs="unbounded"> 
 *          <choice> 
 *            <element name="X509IssuerSerial" type="ds:X509IssuerSerialType"/>
 *            <element name="X509SKI" type="base64Binary"/>
 *            <element name="X509SubjectName" type="string"/> 
 *            <element name="X509Certificate" type="base64Binary"/>
 *            <element name="X509CRL" type="base64Binary"/> 
 *            <any namespace="##other" processContents="lax"/>
 *          </choice>  
 *        </sequence>
 *    </complexType>
 *
 *    <complexType name="X509IssuerSerialType"> 
 *      <sequence> 
 *        <element name="X509IssuerName" type="string"/> 
 *        <element name="X509SerialNumber" type="integer"/> 
 *      </sequence>
 *    </complexType>
 * 
* * An X509Data instance may be created by invoking the * {@link KeyInfoFactory#newX509Data newX509Data} methods of the * {@link KeyInfoFactory} class and passing it a list of one or more * {@link XMLStructure}s representing X.509 content; for example: *
 *   KeyInfoFactory factory = KeyInfoFactory.getInstance("DOM");
 *   X509Data x509Data = factory.newX509Data
 *       (Collections.singletonList("cn=Alice"));
 * 
* * @author Sean Mullan * @author JSR 105 Expert Group * @see KeyInfoFactory#newX509Data(List) */ //@@@ check for illegal combinations of data violating MUSTs in W3c spec public interface X509Data extends XMLStructure { /** * URI identifying the X509Data KeyInfo type: * http://www.w3.org/2000/09/xmldsig#X509Data. This can be specified as * the value of the type parameter of the * {@link RetrievalMethod} class to describe a remote * X509Data structure. */ String TYPE = "http://www.w3.org/2000/09/xmldsig#X509Data"; /** * URI identifying the binary (ASN.1 DER) X.509 Certificate KeyInfo type: * http://www.w3.org/2000/09/xmldsig#rawX509Certificate. This can be * specified as the value of the type parameter of the * {@link RetrievalMethod} class to describe a remote X509 Certificate. */ String RAW_X509_CERTIFICATE_TYPE = "http://www.w3.org/2000/09/xmldsig#rawX509Certificate"; /** * Returns an {@link java.util.Collections#unmodifiableList unmodifiable * list} of the content in this X509Data. Valid types are * {@link String} (subject names), byte[] (subject key ids), * {@link java.security.cert.X509Certificate}, {@link X509CRL}, * or {@link XMLStructure} ({@link X509IssuerSerial} * objects or elements from an external namespace). * * @return an unmodifiable list of the content in this X509Data * (never null or empty) */ List getContent(); } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/keyinfo/KeyName.java0000644000175000017500000000423711552016322027020 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: KeyName.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto.dsig.keyinfo; import javax.xml.crypto.XMLStructure; /** * A representation of the XML KeyName element as * defined in the * W3C Recommendation for XML-Signature Syntax and Processing. * A KeyName object contains a string value which may be used * by the signer to communicate a key identifier to the recipient. The * XML Schema Definition is defined as: * *
 * <element name="KeyName" type="string"/>
 * 
* * A KeyName instance may be created by invoking the * {@link KeyInfoFactory#newKeyName newKeyName} method of the * {@link KeyInfoFactory} class, and passing it a String * representing the name of the key; for example: *
 * KeyInfoFactory factory = KeyInfoFactory.getInstance("DOM");
 * KeyName keyName = factory.newKeyName("Alice");   
 * 
* * @author Sean Mullan * @author JSR 105 Expert Group * @see KeyInfoFactory#newKeyName(String) */ public interface KeyName extends XMLStructure { /** * Returns the name of this KeyName. * * @return the name of this KeyName (never * null) */ String getName(); } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/keyinfo/KeyInfoFactory.java0000644000175000017500000005600311661503571030371 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: KeyInfoFactory.java 1203722 2011-11-18 16:27:37Z mullan $ */ package javax.xml.crypto.dsig.keyinfo; import java.math.BigInteger; import java.security.KeyException; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.security.Provider; import java.security.PublicKey; import java.security.Security; import java.security.cert.X509CRL; import java.util.List; import javax.xml.crypto.MarshalException; import javax.xml.crypto.NoSuchMechanismException; import javax.xml.crypto.URIDereferencer; import javax.xml.crypto.XMLStructure; import javax.xml.crypto.dom.DOMStructure; import javax.xml.crypto.dsig.*; /** * A factory for creating {@link KeyInfo} objects from scratch or for * unmarshalling a KeyInfo object from a corresponding XML * representation. * *

Each instance of KeyInfoFactory supports a specific * XML mechanism type. To create a KeyInfoFactory, call one of the * static {@link #getInstance getInstance} methods, passing in the XML * mechanism type desired, for example: * *

* KeyInfoFactory factory = KeyInfoFactory.getInstance("DOM"); *
* *

The objects that this factory produces will be based * on DOM and abide by the DOM interoperability requirements as defined in the * * DOM Mechanism Requirements section of the API overview. See the * Service * Providers section of the API overview for a list of standard mechanism * types. * *

KeyInfoFactory implementations are registered and loaded * using the {@link java.security.Provider} mechanism. * For example, a service provider that supports the * DOM mechanism would be specified in the Provider subclass as: *

 *     put("KeyInfoFactory.DOM", "org.example.DOMKeyInfoFactory");
 * 
* *

Also, the XMLStructures that are created by this factory * may contain state specific to the KeyInfo and are not * intended to be reusable. * *

An implementation MUST minimally support the default mechanism type: DOM. * *

Note that a caller must use the same KeyInfoFactory * instance to create the XMLStructures of a particular * KeyInfo object. The behavior is undefined if * XMLStructures from different providers or different mechanism * types are used together. * *

Concurrent Access *

The static methods of this class are guaranteed to be thread-safe. * Multiple threads may concurrently invoke the static methods defined in this * class with no ill effects. * *

However, this is not true for the non-static methods defined by this * class. Unless otherwise documented by a specific provider, threads that * need to access a single KeyInfoFactory instance concurrently * should synchronize amongst themselves and provide the necessary locking. * Multiple threads each manipulating a different KeyInfoFactory * instance need not synchronize. * * @author Sean Mullan * @author JSR 105 Expert Group */ public abstract class KeyInfoFactory { private String mechanismType; private Provider provider; /** * Default constructor, for invocation by subclasses. */ protected KeyInfoFactory() {} /** * Returns a KeyInfoFactory that supports the * specified XML processing mechanism and representation type (ex: "DOM"). * *

This method uses the standard JCA provider lookup mechanism to * locate and instantiate a KeyInfoFactory implementation of * the desired mechanism type. It traverses the list of registered security * Providers, starting with the most preferred * Provider. A new KeyInfoFactory object * from the first Provider that supports the specified * mechanism is returned. * *

Note that the list of registered providers may be retrieved via * the {@link Security#getProviders() Security.getProviders()} method. * * @param mechanismType the type of the XML processing mechanism and * representation. See the Service * Providers section of the API overview for a list of standard * mechanism types. * @return a new KeyInfoFactory * @throws NullPointerException if mechanismType is * null * @throws NoSuchMechanismException if no Provider supports a * KeyInfoFactory implementation for the specified mechanism * @see Provider */ public static KeyInfoFactory getInstance(String mechanismType) { if (mechanismType == null) { throw new NullPointerException("mechanismType cannot be null"); } return findInstance(mechanismType, null); } private static KeyInfoFactory findInstance(String mechanismType, Provider provider) { if (provider == null) { provider = getProvider("KeyInfoFactory", mechanismType); } Provider.Service ps = provider.getService("KeyInfoFactory", mechanismType); if (ps == null) { throw new NoSuchMechanismException("Cannot find " + mechanismType + " mechanism type"); } try { KeyInfoFactory fac = (KeyInfoFactory)ps.newInstance(null); fac.mechanismType = mechanismType; fac.provider = provider; return fac; } catch (NoSuchAlgorithmException nsae) { throw new NoSuchMechanismException("Cannot find " + mechanismType + " mechanism type", nsae); } } private static Provider getProvider(String engine, String mech) { Provider[] providers = Security.getProviders(engine + "." + mech); if (providers == null) { throw new NoSuchMechanismException("Mechanism type " + mech + " not available"); } return providers[0]; } /** * Returns a KeyInfoFactory that supports the * requested XML processing mechanism and representation type (ex: "DOM"), * as supplied by the specified provider. Note that the specified * Provider object does not have to be registered in the * provider list. * * @param mechanismType the type of the XML processing mechanism and * representation. See the Service * Providers section of the API overview for a list of standard * mechanism types. * @param provider the Provider object * @return a new KeyInfoFactory * @throws NullPointerException if mechanismType or * provider are null * @throws NoSuchMechanismException if a KeyInfoFactory * implementation for the specified mechanism is not available from the * specified Provider object * @see Provider */ public static KeyInfoFactory getInstance(String mechanismType, Provider provider) { if (mechanismType == null) { throw new NullPointerException("mechanismType cannot be null"); } else if (provider == null) { throw new NullPointerException("provider cannot be null"); } return findInstance(mechanismType, provider); } /** * Returns a KeyInfoFactory that supports the * requested XML processing mechanism and representation type (ex: "DOM"), * as supplied by the specified provider. The specified provider must be * registered in the security provider list. * *

Note that the list of registered providers may be retrieved via * the {@link Security#getProviders() Security.getProviders()} method. * * @param mechanismType the type of the XML processing mechanism and * representation. See the Service * Providers section of the API overview for a list of standard * mechanism types. * @param provider the string name of the provider * @return a new KeyInfoFactory * @throws NoSuchProviderException if the specified provider is not * registered in the security provider list * @throws NullPointerException if mechanismType or * provider are null * @throws NoSuchMechanismException if a KeyInfoFactory * implementation for the specified mechanism is not available from the * specified provider * @see Provider */ public static KeyInfoFactory getInstance(String mechanismType, String provider) throws NoSuchProviderException { if (mechanismType == null) { throw new NullPointerException("mechanismType cannot be null"); } else if (provider == null) { throw new NullPointerException("provider cannot be null"); } Provider prov = Security.getProvider(provider); if (prov == null) { throw new NoSuchProviderException("cannot find provider named " + provider); } return findInstance(mechanismType, prov); } /** * Returns a KeyInfoFactory that supports the * default XML processing mechanism and representation type ("DOM"). * *

This method uses the standard JCA provider lookup mechanism to * locate and instantiate a KeyInfoFactory implementation of * the default mechanism type. It traverses the list of registered security * Providers, starting with the most preferred * Provider. A new KeyInfoFactory object * from the first Provider that supports the DOM mechanism is * returned. * *

Note that the list of registered providers may be retrieved via * the {@link Security#getProviders() Security.getProviders()} method. * * @return a new KeyInfoFactory * @throws NoSuchMechanismException if no Provider supports a * KeyInfoFactory implementation for the DOM mechanism * @see Provider */ public static KeyInfoFactory getInstance() { return getInstance("DOM"); } /** * Returns the type of the XML processing mechanism and representation * supported by this KeyInfoFactory (ex: "DOM") * * @return the XML processing mechanism type supported by this * KeyInfoFactory */ public final String getMechanismType() { return mechanismType; } /** * Returns the provider of this KeyInfoFactory. * * @return the provider of this KeyInfoFactory */ public final Provider getProvider() { return provider; } /** * Creates a KeyInfo containing the specified list of * key information types. * * @param content a list of one or more {@link XMLStructure}s representing * key information types. The list is defensively copied to protect * against subsequent modification. * @return a KeyInfo * @throws NullPointerException if content is null * @throws IllegalArgumentException if content is empty * @throws ClassCastException if content contains any entries * that are not of type {@link XMLStructure} */ public abstract KeyInfo newKeyInfo(List content); /** * Creates a KeyInfo containing the specified list of key * information types and optional id. The * id parameter represents the value of an XML * ID attribute and is useful for referencing * the KeyInfo from other XML structures. * * @param content a list of one or more {@link XMLStructure}s representing * key information types. The list is defensively copied to protect * against subsequent modification. * @param id the value of an XML ID (may be null) * @return a KeyInfo * @throws NullPointerException if content is null * @throws IllegalArgumentException if content is empty * @throws ClassCastException if content contains any entries * that are not of type {@link XMLStructure} */ public abstract KeyInfo newKeyInfo(List content, String id); /** * Creates a KeyName from the specified name. * * @param name the name that identifies the key * @return a KeyName * @throws NullPointerException if name is null */ public abstract KeyName newKeyName(String name); /** * Creates a KeyValue from the specified public key. * * @param key the public key * @return a KeyValue * @throws KeyException if the key's algorithm is not * recognized or supported by this KeyInfoFactory * @throws NullPointerException if key is null */ public abstract KeyValue newKeyValue(PublicKey key) throws KeyException; /** * Creates a PGPData from the specified PGP public key * identifier. * * @param keyId a PGP public key identifier as defined in RFC 2440, section 11.2. * The array is cloned to protect against subsequent modification. * @return a PGPData * @throws NullPointerException if keyId is null * @throws IllegalArgumentException if the key id is not in the correct * format */ public abstract PGPData newPGPData(byte[] keyId); /** * Creates a PGPData from the specified PGP public key * identifier, and optional key material packet and list of external * elements. * * @param keyId a PGP public key identifier as defined in RFC 2440, section 11.2. * The array is cloned to protect against subsequent modification. * @param keyPacket a PGP key material packet as defined in RFC 2440, section 5.5. * The array is cloned to protect against subsequent modification. May * be null. * @param other a list of {@link XMLStructure}s representing elements from * an external namespace. The list is defensively copied to protect * against subsequent modification. May be null or empty. * @return a PGPData * @throws NullPointerException if keyId is null * @throws IllegalArgumentException if the keyId or * keyPacket is not in the correct format. For * keyPacket, the format of the packet header is * checked and the tag is verified that it is of type key material. The * contents and format of the packet body are not checked. * @throws ClassCastException if other contains any * entries that are not of type {@link XMLStructure} */ public abstract PGPData newPGPData(byte[] keyId, byte[] keyPacket, List other); /** * Creates a PGPData from the specified PGP key material * packet and optional list of external elements. * * @param keyPacket a PGP key material packet as defined in RFC 2440, section 5.5. * The array is cloned to protect against subsequent modification. * @param other a list of {@link XMLStructure}s representing elements from * an external namespace. The list is defensively copied to protect * against subsequent modification. May be null or empty. * @return a PGPData * @throws NullPointerException if keyPacket is * null * @throws IllegalArgumentException if keyPacket is not in the * correct format. For keyPacket, the format of the packet * header is checked and the tag is verified that it is of type key * material. The contents and format of the packet body are not checked. * @throws ClassCastException if other contains any * entries that are not of type {@link XMLStructure} */ public abstract PGPData newPGPData(byte[] keyPacket, List other); /** * Creates a RetrievalMethod from the specified URI. * * @param uri the URI that identifies the KeyInfo information * to be retrieved * @return a RetrievalMethod * @throws NullPointerException if uri is null * @throws IllegalArgumentException if uri is not RFC 2396 * compliant */ public abstract RetrievalMethod newRetrievalMethod(String uri); /** * Creates a RetrievalMethod from the specified parameters. * * @param uri the URI that identifies the KeyInfo information * to be retrieved * @param type a URI that identifies the type of KeyInfo * information to be retrieved (may be null) * @param transforms a list of {@link Transform}s. The list is defensively * copied to protect against subsequent modification. May be * null or empty. * @return a RetrievalMethod * @throws NullPointerException if uri is null * @throws IllegalArgumentException if uri is not RFC 2396 * compliant * @throws ClassCastException if transforms contains any * entries that are not of type {@link Transform} */ public abstract RetrievalMethod newRetrievalMethod(String uri, String type, List transforms); /** * Creates a X509Data containing the specified list of * X.509 content. * * @param content a list of one or more X.509 content types. Valid types are * {@link String} (subject names), byte[] (subject key ids), * {@link java.security.cert.X509Certificate}, {@link X509CRL}, * or {@link XMLStructure} ({@link X509IssuerSerial} * objects or elements from an external namespace). Subject names are * distinguished names in RFC 2253 String format. Implementations MUST * support the attribute type keywords defined in RFC 2253 (CN, L, ST, * O, OU, C, STREET, DC and UID). Implementations MAY support additional * keywords. The list is defensively copied to protect against * subsequent modification. * @return a X509Data * @throws NullPointerException if content is null * @throws IllegalArgumentException if content is empty, or * if a subject name is not RFC 2253 compliant or one of the attribute * type keywords is not recognized. * @throws ClassCastException if content contains any entries * that are not of one of the valid types mentioned above */ public abstract X509Data newX509Data(List content); /** * Creates an X509IssuerSerial from the specified X.500 issuer * distinguished name and serial number. * * @param issuerName the issuer's distinguished name in RFC 2253 String * format. Implementations MUST support the attribute type keywords * defined in RFC 2253 (CN, L, ST, O, OU, C, STREET, DC and UID). * Implementations MAY support additional keywords. * @param serialNumber the serial number * @return an X509IssuerSerial * @throws NullPointerException if issuerName or * serialNumber are null * @throws IllegalArgumentException if the issuer name is not RFC 2253 * compliant or one of the attribute type keywords is not recognized. */ public abstract X509IssuerSerial newX509IssuerSerial (String issuerName, BigInteger serialNumber); /** * Indicates whether a specified feature is supported. * * @param feature the feature name (as an absolute URI) * @return true if the specified feature is supported, * false otherwise * @throws NullPointerException if feature is null */ public abstract boolean isFeatureSupported(String feature); /** * Returns a reference to the URIDereferencer that is used by * default to dereference URIs in {@link RetrievalMethod} objects. * * @return a reference to the default URIDereferencer */ public abstract URIDereferencer getURIDereferencer(); /** * Unmarshals a new KeyInfo instance from a * mechanism-specific XMLStructure (ex: {@link DOMStructure}) * instance. * * @param xmlStructure a mechanism-specific XML structure from which to * unmarshal the keyinfo from * @return the KeyInfo * @throws NullPointerException if xmlStructure is * null * @throws ClassCastException if the type of xmlStructure is * inappropriate for this factory * @throws MarshalException if an unrecoverable exception occurs during * unmarshalling */ public abstract KeyInfo unmarshalKeyInfo(XMLStructure xmlStructure) throws MarshalException; } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/keyinfo/RetrievalMethod.java0000644000175000017500000001072611552016322030565 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: RetrievalMethod.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto.dsig.keyinfo; import javax.xml.crypto.Data; import javax.xml.crypto.URIReference; import javax.xml.crypto.URIReferenceException; import javax.xml.crypto.XMLCryptoContext; import javax.xml.crypto.XMLStructure; import javax.xml.crypto.dsig.Transform; import java.util.List; /** * A representation of the XML RetrievalMethod element as * defined in the * W3C Recommendation for XML-Signature Syntax and Processing. * A RetrievalMethod object is used to convey a reference to * KeyInfo information that is stored at another location. * The XML schema definition is defined as: * *

 *   <element name="RetrievalMethod" type="ds:RetrievalMethodType"/>
 *   <complexType name="RetrievalMethodType">
 *     <sequence>
 *       <element name="Transforms" type="ds:TransformsType" minOccurs="0"/> 
 *     </sequence>  
 *     <attribute name="URI" type="anyURI"/>
 *     <attribute name="Type" type="anyURI" use="optional"/>
 *   </complexType>
 * 
* * A RetrievalMethod instance may be created by invoking one of the * {@link KeyInfoFactory#newRetrievalMethod newRetrievalMethod} methods * of the {@link KeyInfoFactory} class, and passing it the URI * identifying the location of the KeyInfo, an optional type URI identifying * the type of KeyInfo, and an optional list of {@link Transform}s; for example: *
 *   KeyInfoFactory factory = KeyInfoFactory.getInstance("DOM");
 *   RetrievalMethod rm = factory.newRetrievalMethod
 *      ("#KeyValue-1", KeyValue.DSA_TYPE, Collections.singletonList(Transform.BASE64));
 * 
* * @author Sean Mullan * @author JSR 105 Expert Group * @see KeyInfoFactory#newRetrievalMethod(String) * @see KeyInfoFactory#newRetrievalMethod(String, String, List) */ public interface RetrievalMethod extends URIReference, XMLStructure { /** * Returns an {@link java.util.Collections#unmodifiableList unmodifiable * list} of {@link Transform}s of this RetrievalMethod. * * @return an unmodifiable list of Transform objects (may be * empty but never null). */ List getTransforms(); /** * Returns the URI of the referenced KeyInfo information. * * @return the URI of the referenced KeyInfo information in * RFC 2396 format (never null) */ String getURI(); /** * Dereferences the KeyInfo information referenced by this * RetrievalMethod and applies the specified * Transforms. * * @param context an XMLCryptoContext that may contain * additional useful information for dereferencing the URI. The * context's baseURI and dereferencer * parameters (if specified) are used to resolve and dereference this * RetrievalMethod * @return a Data object representing the raw contents of the * KeyInfo information referenced by this * RetrievalMethod. It is the caller's responsibility to * convert the returned data to an appropriate * KeyInfo object. * @throws NullPointerException if context is null * @throws URIReferenceException if there is an error while dereferencing */ Data dereference(XMLCryptoContext context) throws URIReferenceException; } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/Transform.java0000644000175000017500000001300111750731244025772 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: Transform.java 1333869 2012-05-04 10:42:44Z coheigea $ */ package javax.xml.crypto.dsig; import java.io.OutputStream; import java.security.spec.AlgorithmParameterSpec; import javax.xml.crypto.AlgorithmMethod; import javax.xml.crypto.Data; import javax.xml.crypto.XMLCryptoContext; import javax.xml.crypto.XMLStructure; import javax.xml.crypto.dsig.spec.TransformParameterSpec; /** * A representation of the XML Transform element as * defined in the * W3C Recommendation for XML-Signature Syntax and Processing. * The XML Schema Definition is defined as: * *
 * <element name="Transform" type="ds:TransformType"/>
 *   <complexType name="TransformType" mixed="true">
 *     <choice minOccurs="0" maxOccurs="unbounded">
 *       <any namespace="##other" processContents="lax"/>
 *       <!-- (1,1) elements from (0,unbounded) namespaces -->
 *       <element name="XPath" type="string"/>
 *     </choice>
 *     <attribute name="Algorithm" type="anyURI" use="required"/>
 *   </complexType>
 * 
* * A Transform instance may be created by invoking the * {@link XMLSignatureFactory#newTransform newTransform} method * of the {@link XMLSignatureFactory} class. * * @author Sean Mullan * @author JSR 105 Expert Group * @see XMLSignatureFactory#newTransform(String, TransformParameterSpec) */ public interface Transform extends XMLStructure, AlgorithmMethod { /** * The Base64 * transform algorithm URI. */ String BASE64 = "http://www.w3.org/2000/09/xmldsig#base64"; /** * The * Enveloped Signature transform algorithm URI. */ String ENVELOPED = "http://www.w3.org/2000/09/xmldsig#enveloped-signature"; /** * The XPath * transform algorithm URI. */ String XPATH = "http://www.w3.org/TR/1999/REC-xpath-19991116"; /** * The * XPath Filter 2 transform algorithm URI. */ String XPATH2 = "http://www.w3.org/2002/06/xmldsig-filter2"; /** * The XSLT * transform algorithm URI. */ String XSLT = "http://www.w3.org/TR/1999/REC-xslt-19991116"; /** * Returns the algorithm-specific input parameters associated with this * Transform. *

* The returned parameters can be typecast to a * {@link TransformParameterSpec} object. * * @return the algorithm-specific input parameters (may be null * if not specified) */ AlgorithmParameterSpec getParameterSpec(); /** * Transforms the specified data using the underlying transform algorithm. * * @param data the data to be transformed * @param context the XMLCryptoContext containing * additional context (may be null if not applicable) * @return the transformed data * @throws NullPointerException if data is null * @throws TransformException if an error occurs while executing the * transform */ public abstract Data transform(Data data, XMLCryptoContext context) throws TransformException; /** * Transforms the specified data using the underlying transform algorithm. * If the output of this transform is an OctetStreamData, then * this method returns null and the bytes are written to the * specified OutputStream. Otherwise, the * OutputStream is ignored and the method behaves as if * {@link #transform(Data, XMLCryptoContext)} were invoked. * * @param data the data to be transformed * @param context the XMLCryptoContext containing * additional context (may be null if not applicable) * @param os the OutputStream that should be used to write * the transformed data to * @return the transformed data (or null if the data was * written to the OutputStream parameter) * @throws NullPointerException if data or os * is null * @throws TransformException if an error occurs while executing the * transform */ public abstract Data transform (Data data, XMLCryptoContext context, OutputStream os) throws TransformException; } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/XMLSignContext.java0000644000175000017500000000457311552016322026654 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: XMLSignContext.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto.dsig; import javax.xml.crypto.XMLCryptoContext; /** * Contains context information for generating XML Signatures. This interface * is primarily intended for type-safety. * *

Note that XMLSignContext instances can contain * information and state specific to the XML signature structure it is * used with. The results are unpredictable if an * XMLSignContext is used with different signature structures * (for example, you should not use the same XMLSignContext * instance to sign two different {@link XMLSignature} objects). *

* Supported Properties *

The following properties can be set using the * {@link #setProperty setProperty} method. *

    *
  • javax.xml.crypto.dsig.cacheReference: value must be a * {@link Boolean}. This property controls whether or not the digested * {@link Reference} objects will cache the dereferenced content and * pre-digested input for subsequent retrieval via the * {@link Reference#getDereferencedData Reference.getDereferencedData} and * {@link Reference#getDigestInputStream Reference.getDigestInputStream} * methods. The default value if not specified is * Boolean.FALSE. *
* * @author Sean Mullan * @author JSR 105 Expert Group * @see XMLSignature#sign(XMLSignContext) */ public interface XMLSignContext extends XMLCryptoContext {} libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/dom/0000755000175000017500000000000012273503733023741 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/dom/package.html0000644000175000017500000000241310372164212026213 0ustar tonytony DOM-specific classes for the {@link javax.xml.crypto.dsig} package. Only users who are using a DOM-based {@link javax.xml.crypto.dsig.XMLSignatureFactory XMLSignatureFactory} or {@link javax.xml.crypto.dsig.keyinfo.KeyInfoFactory} should need to make direct use of this package.

Package Specification

libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/dom/DOMValidateContext.java0000644000175000017500000001050611552016322030234 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMValidateContext.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto.dsig.dom; import javax.xml.crypto.KeySelector; import javax.xml.crypto.dom.DOMCryptoContext; import javax.xml.crypto.dsig.XMLSignature; import javax.xml.crypto.dsig.XMLSignatureFactory; import javax.xml.crypto.dsig.XMLValidateContext; import java.security.Key; import org.w3c.dom.Node; /** * A DOM-specific {@link XMLValidateContext}. This class contains additional * methods to specify the location in a DOM tree where an {@link XMLSignature} * is to be unmarshalled and validated from. * *

Note that the behavior of an unmarshalled XMLSignature * is undefined if the contents of the underlying DOM tree are modified by the * caller after the XMLSignature is created. * *

Also, note that DOMValidateContext instances can contain * information and state specific to the XML signature structure it is * used with. The results are unpredictable if a * DOMValidateContext is used with different signature structures * (for example, you should not use the same DOMValidateContext * instance to validate two different {@link XMLSignature} objects). * * @author Sean Mullan * @author JSR 105 Expert Group * @see XMLSignatureFactory#unmarshalXMLSignature(XMLValidateContext) */ public class DOMValidateContext extends DOMCryptoContext implements XMLValidateContext { private Node node; /** * Creates a DOMValidateContext containing the specified key * selector and node. * * @param ks a key selector for finding a validation key * @param node the node * @throws NullPointerException if ks or node is * null */ public DOMValidateContext(KeySelector ks, Node node) { if (ks == null) { throw new NullPointerException("key selector is null"); } if (node == null) { throw new NullPointerException("node is null"); } setKeySelector(ks); this.node = node; } /** * Creates a DOMValidateContext containing the specified key * and node. The validating key will be stored in a * {@link KeySelector#singletonKeySelector singleton KeySelector} that * is returned when the {@link #getKeySelector getKeySelector} * method is called. * * @param validatingKey the validating key * @param node the node * @throws NullPointerException if validatingKey or * node is null */ public DOMValidateContext(Key validatingKey, Node node) { if (validatingKey == null) { throw new NullPointerException("validatingKey is null"); } if (node == null) { throw new NullPointerException("node is null"); } setKeySelector(KeySelector.singletonKeySelector(validatingKey)); this.node = node; } /** * Sets the node. * * @param node the node * @throws NullPointerException if node is null * @see #getNode */ public void setNode(Node node) { if (node == null) { throw new NullPointerException(); } this.node = node; } /** * Returns the node. * * @return the node (never null) * @see #setNode(Node) */ public Node getNode() { return node; } } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/dom/DOMSignContext.java0000644000175000017500000001715011552016322027405 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMSignContext.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto.dsig.dom; import javax.xml.crypto.KeySelector; import javax.xml.crypto.dom.DOMCryptoContext; import javax.xml.crypto.dsig.XMLSignContext; import javax.xml.crypto.dsig.XMLSignature; import java.security.Key; import org.w3c.dom.Node; /** * A DOM-specific {@link XMLSignContext}. This class contains additional methods * to specify the location in a DOM tree where an {@link XMLSignature} * object is to be marshalled when generating the signature. * *

Note that DOMSignContext instances can contain * information and state specific to the XML signature structure it is * used with. The results are unpredictable if a * DOMSignContext is used with different signature structures * (for example, you should not use the same DOMSignContext * instance to sign two different {@link XMLSignature} objects). * * @author Sean Mullan * @author JSR 105 Expert Group */ public class DOMSignContext extends DOMCryptoContext implements XMLSignContext { private Node parent; private Node nextSibling; /** * Creates a DOMSignContext with the specified signing key * and parent node. The signing key is stored in a * {@link KeySelector#singletonKeySelector singleton KeySelector} that is * returned by the {@link #getKeySelector getKeySelector} method. * The marshalled XMLSignature will be added as the last * child element of the specified parent node unless a next sibling node is * specified by invoking the {@link #setNextSibling setNextSibling} method. * * @param signingKey the signing key * @param parent the parent node * @throws NullPointerException if signingKey or * parent is null */ public DOMSignContext(Key signingKey, Node parent) { if (signingKey == null) { throw new NullPointerException("signingKey cannot be null"); } if (parent == null) { throw new NullPointerException("parent cannot be null"); } setKeySelector(KeySelector.singletonKeySelector(signingKey)); this.parent = parent; } /** * Creates a DOMSignContext with the specified signing key, * parent and next sibling nodes. The signing key is stored in a * {@link KeySelector#singletonKeySelector singleton KeySelector} that is * returned by the {@link #getKeySelector getKeySelector} method. * The marshalled XMLSignature will be inserted as a child * element of the specified parent node and immediately before the * specified next sibling node. * * @param signingKey the signing key * @param parent the parent node * @param nextSibling the next sibling node * @throws NullPointerException if signingKey, * parent or nextSibling is null */ public DOMSignContext(Key signingKey, Node parent, Node nextSibling) { if (signingKey == null) { throw new NullPointerException("signingKey cannot be null"); } if (parent == null) { throw new NullPointerException("parent cannot be null"); } if (nextSibling == null) { throw new NullPointerException("nextSibling cannot be null"); } setKeySelector(KeySelector.singletonKeySelector(signingKey)); this.parent = parent; this.nextSibling = nextSibling; } /** * Creates a DOMSignContext with the specified key selector * and parent node. The marshalled XMLSignature will be added * as the last child element of the specified parent node unless a next * sibling node is specified by invoking the * {@link #setNextSibling setNextSibling} method. * * @param ks the key selector * @param parent the parent node * @throws NullPointerException if ks or parent * is null */ public DOMSignContext(KeySelector ks, Node parent) { if (ks == null) { throw new NullPointerException("key selector cannot be null"); } if (parent == null) { throw new NullPointerException("parent cannot be null"); } setKeySelector(ks); this.parent = parent; } /** * Creates a DOMSignContext with the specified key selector, * parent and next sibling nodes. The marshalled XMLSignature * will be inserted as a child element of the specified parent node and * immediately before the specified next sibling node. * * @param ks the key selector * @param parent the parent node * @param nextSibling the next sibling node * @throws NullPointerException if ks, parent or * nextSibling is null */ public DOMSignContext(KeySelector ks, Node parent, Node nextSibling) { if (ks == null) { throw new NullPointerException("key selector cannot be null"); } if (parent == null) { throw new NullPointerException("parent cannot be null"); } if (nextSibling == null) { throw new NullPointerException("nextSibling cannot be null"); } setKeySelector(ks); this.parent = parent; this.nextSibling = nextSibling; } /** * Sets the parent node. * * @param parent the parent node. The marshalled XMLSignature * will be added as a child element of this node. * @throws NullPointerException if parent is null * @see #getParent */ public void setParent(Node parent) { if (parent == null) { throw new NullPointerException("parent is null"); } this.parent = parent; } /** * Sets the next sibling node. * * @param nextSibling the next sibling node. The marshalled * XMLSignature will be inserted immediately before this * node. Specify null to remove the current setting. * @see #getNextSibling */ public void setNextSibling(Node nextSibling) { this.nextSibling = nextSibling; } /** * Returns the parent node. * * @return the parent node (never null) * @see #setParent(Node) */ public Node getParent() { return parent; } /** * Returns the nextSibling node. * * @return the nextSibling node, or null if not specified. * @see #setNextSibling(Node) */ public Node getNextSibling() { return nextSibling; } } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/XMLValidateContext.java0000644000175000017500000000474011552016322027501 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: XMLValidateContext.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto.dsig; import javax.xml.crypto.XMLCryptoContext; /** * Contains context information for validating XML Signatures. This interface * is primarily intended for type-safety. * *

Note that XMLValidateContext instances can contain * information and state specific to the XML signature structure it is * used with. The results are unpredictable if an * XMLValidateContext is used with different signature structures * (for example, you should not use the same XMLValidateContext * instance to validate two different {@link XMLSignature} objects). *

* Supported Properties *

The following properties can be set by an application using the * {@link #setProperty setProperty} method. *

    *
  • javax.xml.crypto.dsig.cacheReference: value must be a * {@link Boolean}. This property controls whether or not the * {@link Reference#validate Reference.validate} method will cache the * dereferenced content and pre-digested input for subsequent retrieval via * the {@link Reference#getDereferencedData Reference.getDereferencedData} * and {@link Reference#getDigestInputStream * Reference.getDigestInputStream} methods. The default value if not * specified is Boolean.FALSE. *
* * @author Sean Mullan * @author JSR 105 Expert Group * @see XMLSignature#validate(XMLValidateContext) * @see Reference#validate(XMLValidateContext) */ public interface XMLValidateContext extends XMLCryptoContext {} libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/CanonicalizationMethod.java0000644000175000017500000000731211750731244030455 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: CanonicalizationMethod.java 1333869 2012-05-04 10:42:44Z coheigea $ */ package javax.xml.crypto.dsig; import java.security.spec.AlgorithmParameterSpec; import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec; /** * A representation of the XML CanonicalizationMethod * element as defined in the * * W3C Recommendation for XML-Signature Syntax and Processing. The XML * Schema Definition is defined as: *

*

 *   <element name="CanonicalizationMethod" type="ds:CanonicalizationMethodType"/>
 *     <complexType name="CanonicalizationMethodType" mixed="true">
 *       <sequence>
 *         <any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
 *           <!-- (0,unbounded) elements from (1,1) namespace -->
 *       </sequence>
 *       <attribute name="Algorithm" type="anyURI" use="required"/>
 *     </complexType>
 * 
* * A CanonicalizationMethod instance may be created by invoking * the {@link XMLSignatureFactory#newCanonicalizationMethod * newCanonicalizationMethod} method of the {@link XMLSignatureFactory} class. * * @author Sean Mullan * @author JSR 105 Expert Group * @see XMLSignatureFactory#newCanonicalizationMethod(String, C14NMethodParameterSpec) */ public interface CanonicalizationMethod extends Transform { /** * The Canonical * XML (without comments) canonicalization method algorithm URI. */ String INCLUSIVE = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"; /** * The * * Canonical XML with comments canonicalization method algorithm URI. */ String INCLUSIVE_WITH_COMMENTS = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"; /** * The Exclusive * Canonical XML (without comments) canonicalization method algorithm * URI. */ String EXCLUSIVE = "http://www.w3.org/2001/10/xml-exc-c14n#"; /** * The * Exclusive Canonical XML with comments canonicalization method * algorithm URI. */ String EXCLUSIVE_WITH_COMMENTS = "http://www.w3.org/2001/10/xml-exc-c14n#WithComments"; /** * Returns the algorithm-specific input parameters associated with this * CanonicalizationMethod. * *

The returned parameters can be typecast to a * {@link C14NMethodParameterSpec} object. * * @return the algorithm-specific input parameters (may be * null if not specified) */ AlgorithmParameterSpec getParameterSpec(); } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/TransformService.java0000644000175000017500000003514611750472047027334 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: TransformService.java 1333415 2012-05-03 12:03:51Z coheigea $ */ package javax.xml.crypto.dsig; import java.security.InvalidAlgorithmParameterException; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.security.Provider; import java.security.Security; import java.util.*; import javax.xml.crypto.MarshalException; import javax.xml.crypto.XMLStructure; import javax.xml.crypto.XMLCryptoContext; import javax.xml.crypto.dsig.spec.TransformParameterSpec; /** * A Service Provider Interface for transform and canonicalization algorithms. * *

Each instance of TransformService supports a specific * transform or canonicalization algorithm and XML mechanism type. To create a * TransformService, call one of the static * {@link #getInstance getInstance} methods, passing in the algorithm URI and * XML mechanism type desired, for example: * *

* TransformService ts = TransformService.getInstance(Transform.XPATH2, "DOM"); *
* *

TransformService implementations are registered and loaded * using the {@link java.security.Provider} mechanism. Each * TransformService service provider implementation should include * a MechanismType service attribute that identifies the XML * mechanism type that it supports. If the attribute is not specified, * "DOM" is assumed. For example, a service provider that supports the * XPath Filter 2 Transform and DOM mechanism would be specified in the * Provider subclass as: *

 *     put("TransformService." + Transform.XPATH2,
 *         "org.example.XPath2TransformService");
 *     put("TransformService." + Transform.XPATH2 + " MechanismType", "DOM");
 * 
* TransformService implementations that support the DOM * mechanism type must abide by the DOM interoperability requirements defined * in the * DOM * Mechanism Requirements section of the API overview. See the * Service * Providers section of the API overview for a list of standard mechanism * types. *

* Once a TransformService has been created, it can be used * to process Transform or CanonicalizationMethod * objects. If the Transform or CanonicalizationMethod * exists in XML form (for example, when validating an existing * XMLSignature), the {@link #init(XMLStructure, XMLCryptoContext)} * method must be first called to initialize the transform and provide document * context (even if there are no parameters). Alternatively, if the * Transform or CanonicalizationMethod is being * created from scratch, the {@link #init(TransformParameterSpec)} method * is called to initialize the transform with parameters and the * {@link #marshalParams marshalParams} method is called to marshal the * parameters to XML and provide the transform with document context. Finally, * the {@link #transform transform} method is called to perform the * transformation. *

* Concurrent Access *

The static methods of this class are guaranteed to be thread-safe. * Multiple threads may concurrently invoke the static methods defined in this * class with no ill effects. * *

However, this is not true for the non-static methods defined by this * class. Unless otherwise documented by a specific provider, threads that * need to access a single TransformService instance * concurrently should synchronize amongst themselves and provide the * necessary locking. Multiple threads each manipulating a different * TransformService instance need not synchronize. * * @author Sean Mullan * @author JSR 105 Expert Group */ public abstract class TransformService implements Transform { private String algorithm; private String mechanism; private Provider provider; /** * Default constructor, for invocation by subclasses. */ protected TransformService() {} /** * Returns a TransformService that supports the specified * algorithm URI (ex: {@link Transform#XPATH2}) and mechanism type * (ex: DOM). * *

This method uses the standard JCA provider lookup mechanism to * locate and instantiate a TransformService implementation * of the desired algorithm and MechanismType service * attribute. It traverses the list of registered security * Providers, starting with the most preferred * Provider. A new TransformService object * from the first Provider that supports the specified * algorithm and mechanism type is returned. * *

Note that the list of registered providers may be retrieved via * the {@link Security#getProviders() Security.getProviders()} method. * * @param algorithm the URI of the algorithm * @param mechanismType the type of the XML processing mechanism and * representation * @return a new TransformService * @throws NullPointerException if algorithm or * mechanismType is null * @throws NoSuchAlgorithmException if no Provider supports a * TransformService implementation for the specified * algorithm and mechanism type * @see Provider */ public static TransformService getInstance (String algorithm, String mechanismType) throws NoSuchAlgorithmException { if (mechanismType == null || algorithm == null) { throw new NullPointerException(); } return findInstance(algorithm, mechanismType, null); } /** * Returns a TransformService that supports the specified * algorithm URI (ex: {@link Transform#XPATH2}) and mechanism type * (ex: DOM) as supplied by the specified provider. Note that the specified * Provider object does not have to be registered in the * provider list. * * @param algorithm the URI of the algorithm * @param mechanismType the type of the XML processing mechanism and * representation * @param provider the Provider object * @return a new TransformService * @throws NullPointerException if provider, * algorithm, or mechanismType is * null * @throws NoSuchAlgorithmException if a TransformService * implementation for the specified algorithm and mechanism type is not * available from the specified Provider object * @see Provider */ public static TransformService getInstance (String algorithm, String mechanismType, Provider provider) throws NoSuchAlgorithmException { if (mechanismType == null || algorithm == null || provider == null) { throw new NullPointerException(); } return findInstance(algorithm, mechanismType, provider); } /** * Returns a TransformService that supports the specified * algorithm URI (ex: {@link Transform#XPATH2}) and mechanism type * (ex: DOM) as supplied by the specified provider. The specified provider * must be registered in the security provider list. * *

Note that the list of registered providers may be retrieved via * the {@link Security#getProviders() Security.getProviders()} method. * * @param algorithm the URI of the algorithm * @param mechanismType the type of the XML processing mechanism and * representation * @param provider the string name of the provider * @return a new TransformService * @throws NoSuchProviderException if the specified provider is not * registered in the security provider list * @throws NullPointerException if provider, * mechanismType, or algorithm is * null * @throws NoSuchAlgorithmException if a TransformService * implementation for the specified algorithm and mechanism type is not * available from the specified provider * @see Provider */ public static TransformService getInstance (String algorithm, String mechanismType, String provider) throws NoSuchAlgorithmException, NoSuchProviderException { if (mechanismType == null || algorithm == null || provider == null) { throw new NullPointerException(); } Provider prov = Security.getProvider(provider); if (prov == null) { throw new NoSuchProviderException("cannot find provider named " + provider); } return findInstance(algorithm, mechanismType, prov); } private static TransformService findInstance(String algorithm, String mechanismType, Provider provider) throws NoSuchAlgorithmException { if (provider == null) { provider = getProvider("TransformService", algorithm, mechanismType); } Provider.Service ps = provider.getService("TransformService", algorithm); if (ps == null) { throw new NoSuchAlgorithmException("no such algorithm: " + algorithm + " for provider " + provider.getName()); } TransformService ts = (TransformService)ps.newInstance(null); ts.algorithm = algorithm; ts.mechanism = mechanismType; ts.provider = provider; return ts; } private static Provider getProvider(String engine, String alg, String mech) throws NoSuchAlgorithmException { Map map = new HashMap(); map.put(engine + "." + alg, ""); map.put(engine + "." + alg + " " + "MechanismType", mech); Provider[] providers = Security.getProviders(map); if (providers == null) { if (mech.equals("DOM")) { // look for providers without MechanismType specified map.clear(); map.put(engine + "." + alg, ""); providers = Security.getProviders(map); if (providers != null) { return providers[0]; } } throw new NoSuchAlgorithmException("Algorithm type " + alg + " not available"); } return providers[0]; } /** * Returns the mechanism type supported by this TransformService. * * @return the mechanism type */ public final String getMechanismType() { return mechanism; } /** * Returns the URI of the algorithm supported by this * TransformService. * * @return the algorithm URI */ public final String getAlgorithm() { return algorithm; } /** * Returns the provider of this TransformService. * * @return the provider */ public final Provider getProvider() { return provider; } /** * Initializes this TransformService with the specified * parameters. * *

If the parameters exist in XML form, the * {@link #init(XMLStructure, XMLCryptoContext)} method should be used to * initialize the TransformService. * * @param params the algorithm parameters (may be null if * not required or optional) * @throws InvalidAlgorithmParameterException if the specified parameters * are invalid for this algorithm */ public abstract void init(TransformParameterSpec params) throws InvalidAlgorithmParameterException; /** * Marshals the algorithm-specific parameters. If there are no parameters * to be marshalled, this method returns without throwing an exception. * * @param parent a mechanism-specific structure containing the parent * node that the marshalled parameters should be appended to * @param context the XMLCryptoContext containing * additional context (may be null if not applicable) * @throws ClassCastException if the type of parent or * context is not compatible with this * TransformService * @throws NullPointerException if parent is null * @throws MarshalException if the parameters cannot be marshalled */ public abstract void marshalParams (XMLStructure parent, XMLCryptoContext context) throws MarshalException; /** * Initializes this TransformService with the specified * parameters and document context. * * @param parent a mechanism-specific structure containing the parent * structure * @param context the XMLCryptoContext containing * additional context (may be null if not applicable) * @throws ClassCastException if the type of parent or * context is not compatible with this * TransformService * @throws NullPointerException if parent is null * @throws InvalidAlgorithmParameterException if the specified parameters * are invalid for this algorithm */ public abstract void init(XMLStructure parent, XMLCryptoContext context) throws InvalidAlgorithmParameterException; } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/spec/0000755000175000017500000000000012273503733024114 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/spec/package.html0000644000175000017500000000270010372164212026365 0ustar tonytony Parameter classes for XML digital signatures. This package contains interfaces and classes representing input parameters for the digest, signature, transform, or canonicalization algorithms used in the processing of XML signatures.

Package Specification

libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/spec/HMACParameterSpec.java0000644000175000017500000000470211552016322030136 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: HMACParameterSpec.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto.dsig.spec; import javax.xml.crypto.dsig.SignatureMethod; /** * Parameters for the * XML Signature HMAC Algorithm. The parameters include an optional output * length which specifies the MAC truncation length in bits. The resulting * HMAC will be truncated to the specified number of bits. If the parameter is * not specified, then this implies that all the bits of the hash are to be * output. The XML Schema Definition of the HMACOutputLength * element is defined as: *

 * <element name="HMACOutputLength" minOccurs="0" type="ds:HMACOutputLengthType"/>
 * <simpleType name="HMACOutputLengthType">
 *   <restriction base="integer"/>
 * </simpleType>
 * 
* * @author Sean Mullan * @author JSR 105 Expert Group * @see SignatureMethod * @see RFC 2104 */ public final class HMACParameterSpec implements SignatureMethodParameterSpec { private int outputLength; /** * Creates an HMACParameterSpec with the specified truncation * length. * * @param outputLength the truncation length in number of bits */ public HMACParameterSpec(int outputLength) { this.outputLength = outputLength; } /** * Returns the truncation length. * * @return the truncation length in number of bits */ public int getOutputLength() { return outputLength; } } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/spec/XPathFilterParameterSpec.java0000644000175000017500000001045511661503232031624 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: XPathFilterParameterSpec.java 1203720 2011-11-18 16:23:54Z mullan $ */ package javax.xml.crypto.dsig.spec; import javax.xml.crypto.dsig.Transform; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.Map; /** * Parameters for the * XPath Filtering Transform Algorithm. * The parameters include the XPath expression and an optional Map * of additional namespace prefix mappings. The XML Schema Definition of * the XPath Filtering transform parameters is defined as: *

 * <element name="XPath" type="string"/>
 * 
* * @author Sean Mullan * @author JSR 105 Expert Group * @see Transform */ public final class XPathFilterParameterSpec implements TransformParameterSpec { private String xPath; private Map nsMap; /** * Creates an XPathFilterParameterSpec with the specified * XPath expression. * * @param xPath the XPath expression to be evaluated * @throws NullPointerException if xPath is null */ public XPathFilterParameterSpec(String xPath) { if (xPath == null) { throw new NullPointerException(); } this.xPath = xPath; this.nsMap = Collections.EMPTY_MAP; } /** * Creates an XPathFilterParameterSpec with the specified * XPath expression and namespace map. The map is copied to protect against * subsequent modification. * * @param xPath the XPath expression to be evaluated * @param namespaceMap the map of namespace prefixes. Each key is a * namespace prefix String that maps to a corresponding * namespace URI String. * @throws NullPointerException if xPath or * namespaceMap are null * @throws ClassCastException if any of the map's keys or entries are not * of type String */ public XPathFilterParameterSpec(String xPath, Map namespaceMap) { if (xPath == null || namespaceMap == null) { throw new NullPointerException(); } this.xPath = xPath; nsMap = unmodifiableCopyOfMap(namespaceMap); Iterator entries = nsMap.entrySet().iterator(); while (entries.hasNext()) { Map.Entry me = (Map.Entry) entries.next(); if (!(me.getKey() instanceof String) || !(me.getValue() instanceof String)) { throw new ClassCastException("not a String"); } } } @SuppressWarnings("unchecked") private static Map unmodifiableCopyOfMap(Map map) { return Collections.unmodifiableMap(new HashMap(map)); } /** * Returns the XPath expression to be evaluated. * * @return the XPath expression to be evaluated */ public String getXPath() { return xPath; } /** * Returns a map of namespace prefixes. Each key is a namespace prefix * String that maps to a corresponding namespace URI * String. *

* This implementation returns an {@link Collections#unmodifiableMap * unmodifiable map}. * * @return a Map of namespace prefixes to namespace URIs (may * be empty, but never null) */ public Map getNamespaceMap() { return nsMap; } } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/spec/DigestMethodParameterSpec.java0000644000175000017500000000277611552016322032017 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DigestMethodParameterSpec.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto.dsig.spec; import javax.xml.crypto.dsig.DigestMethod; import java.security.spec.AlgorithmParameterSpec; /** * A specification of algorithm parameters for a {@link DigestMethod} * algorithm. The purpose of this interface is to group (and provide type * safety for) all digest method parameter specifications. All digest method * parameter specifications must implement this interface. * * @author Sean Mullan * @author JSR 105 Expert Group * @see DigestMethod */ public interface DigestMethodParameterSpec extends AlgorithmParameterSpec {} libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/spec/ExcC14NParameterSpec.java0000644000175000017500000000775711661503232030552 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: ExcC14NParameterSpec.java 1203720 2011-11-18 16:23:54Z mullan $ */ package javax.xml.crypto.dsig.spec; import javax.xml.crypto.dsig.CanonicalizationMethod; import java.util.ArrayList; import java.util.Collections; import java.util.List; /** * Parameters for the W3C Recommendation: * * Exclusive XML Canonicalization (C14N) algorithm. The * parameters include an optional inclusive namespace prefix list. The XML * Schema Definition of the Exclusive XML Canonicalization parameters is * defined as: *


 * <schema xmlns="http://www.w3.org/2001/XMLSchema"
 *         xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"
 *         targetNamespace="http://www.w3.org/2001/10/xml-exc-c14n#"
 *         version="0.1" elementFormDefault="qualified">
 *
 * <element name="InclusiveNamespaces" type="ec:InclusiveNamespaces"/>
 * <complexType name="InclusiveNamespaces">
 *   <attribute name="PrefixList" type="xsd:string"/>
 * </complexType>
 * </schema>
 * 
* * @author Sean Mullan * @author JSR 105 Expert Group * @see CanonicalizationMethod */ public final class ExcC14NParameterSpec implements C14NMethodParameterSpec { private List preList; /** * Indicates the default namespace ("#default"). */ public static final String DEFAULT = "#default"; /** * Creates a ExcC14NParameterSpec with an empty prefix * list. */ public ExcC14NParameterSpec() { preList = Collections.EMPTY_LIST; } /** * Creates a ExcC14NParameterSpec with the specified list * of prefixes. The list is copied to protect against subsequent * modification. * * @param prefixList the inclusive namespace prefix list. Each entry in * the list is a String that represents a namespace prefix. * @throws NullPointerException if prefixList is * null * @throws ClassCastException if any of the entries in the list are not * of type String */ public ExcC14NParameterSpec(List prefixList) { if (prefixList == null) { throw new NullPointerException("prefixList cannot be null"); } this.preList = unmodifiableCopyOfList(prefixList); for (int i = 0, size = preList.size(); i < size; i++) { if (!(preList.get(i) instanceof String)) { throw new ClassCastException("not a String"); } } } @SuppressWarnings("unchecked") private static List unmodifiableCopyOfList(List list) { return Collections.unmodifiableList(new ArrayList(list)); } /** * Returns the inclusive namespace prefix list. Each entry in the list * is a String that represents a namespace prefix. * *

This implementation returns an {@link * java.util.Collections#unmodifiableList unmodifiable list}. * * @return the inclusive namespace prefix list (may be empty but never * null) */ public List getPrefixList() { return preList; } } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/spec/XPathType.java0000644000175000017500000001471711661503232026651 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: XPathType.java 1203720 2011-11-18 16:23:54Z mullan $ */ package javax.xml.crypto.dsig.spec; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.Map; /** * The XML Schema Definition of the XPath element as defined in the * * W3C Recommendation for XML-Signature XPath Filter 2.0: *


 * <schema xmlns="http://www.w3.org/2001/XMLSchema"
 *         xmlns:xf="http://www.w3.org/2002/06/xmldsig-filter2"
 *         targetNamespace="http://www.w3.org/2002/06/xmldsig-filter2"
 *         version="0.1" elementFormDefault="qualified">
 *
 * <element name="XPath"
 *          type="xf:XPathType"/>
 *
 * <complexType name="XPathType">
 *   <simpleContent>
 *     <extension base="string">
 *       <attribute name="Filter">
 *         <simpleType>
 *           <restriction base="string">
 *             <enumeration value="intersect"/>
 *             <enumeration value="subtract"/>
 *             <enumeration value="union"/>
 *           </restriction>
 *         </simpleType>
 *       </attribute>
 *     </extension>
 *   </simpleContent>
 * </complexType>
 * 
* * @author Sean Mullan * @author JSR 105 Expert Group * @see XPathFilter2ParameterSpec */ public class XPathType { /** * Represents the filter set operation. */ public static class Filter { private final String operation; private Filter(String operation) { this.operation = operation; } /** * Returns the string form of the operation. * * @return the string form of the operation */ public String toString() { return operation; } /** * The intersect filter operation. */ public static final Filter INTERSECT = new Filter("intersect"); /** * The subtract filter operation. */ public static final Filter SUBTRACT = new Filter("subtract"); /** * The union filter operation. */ public static final Filter UNION = new Filter("union"); } private final String expression; private final Filter filter; private Map nsMap; /** * Creates an XPathType instance with the specified XPath * expression and filter. * * @param expression the XPath expression to be evaluated * @param filter the filter operation ({@link Filter#INTERSECT}, * {@link Filter#SUBTRACT}, or {@link Filter#UNION}) * @throws NullPointerException if expression or * filter is null */ public XPathType(String expression, Filter filter) { if (expression == null) { throw new NullPointerException("expression cannot be null"); } if (filter == null) { throw new NullPointerException("filter cannot be null"); } this.expression = expression; this.filter = filter; this.nsMap = Collections.EMPTY_MAP; } /** * Creates an XPathType instance with the specified XPath * expression, filter, and namespace map. The map is copied to protect * against subsequent modification. * * @param expression the XPath expression to be evaluated * @param filter the filter operation ({@link Filter#INTERSECT}, * {@link Filter#SUBTRACT}, or {@link Filter#UNION}) * @param namespaceMap the map of namespace prefixes. Each key is a * namespace prefix String that maps to a corresponding * namespace URI String. * @throws NullPointerException if expression, * filter or namespaceMap are * null * @throws ClassCastException if any of the map's keys or entries are * not of type String */ public XPathType(String expression, Filter filter, Map namespaceMap) { this(expression, filter); if (namespaceMap == null) { throw new NullPointerException("namespaceMap cannot be null"); } nsMap = unmodifiableCopyOfMap(namespaceMap); Iterator entries = nsMap.entrySet().iterator(); while (entries.hasNext()) { Map.Entry me = (Map.Entry) entries.next(); if (!(me.getKey() instanceof String) || !(me.getValue() instanceof String)) { throw new ClassCastException("not a String"); } } } @SuppressWarnings("unchecked") private static Map unmodifiableCopyOfMap(Map map) { return Collections.unmodifiableMap(new HashMap(map)); } /** * Returns the XPath expression to be evaluated. * * @return the XPath expression to be evaluated */ public String getExpression() { return expression; } /** * Returns the filter operation. * * @return the filter operation */ public Filter getFilter() { return filter; } /** * Returns a map of namespace prefixes. Each key is a namespace prefix * String that maps to a corresponding namespace URI * String. *

* This implementation returns an {@link Collections#unmodifiableMap * unmodifiable map}. * * @return a Map of namespace prefixes to namespace URIs * (may be empty, but never null) */ public Map getNamespaceMap() { return nsMap; } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/spec/SignatureMethodParameterSpec.javalibxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/spec/SignatureMethodParameterSpec.jav0000644000175000017500000000303111552016322032361 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: SignatureMethodParameterSpec.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto.dsig.spec; import javax.xml.crypto.dsig.SignatureMethod; import java.security.spec.AlgorithmParameterSpec; /** * A specification of algorithm parameters for an XML {@link SignatureMethod} * algorithm. The purpose of this interface is to group (and provide type * safety for) all signature method parameter specifications. All signature * method parameter specifications must implement this interface. * * @author Sean Mullan * @author JSR 105 Expert Group * @see SignatureMethod */ public interface SignatureMethodParameterSpec extends AlgorithmParameterSpec {} libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/spec/TransformParameterSpec.java0000644000175000017500000000275111552016322031403 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: TransformParameterSpec.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto.dsig.spec; import javax.xml.crypto.dsig.Transform; import java.security.spec.AlgorithmParameterSpec; /** * A specification of algorithm parameters for a {@link Transform} * algorithm. The purpose of this interface is to group (and provide type * safety for) all transform parameter specifications. All transform parameter * specifications must implement this interface. * * @author Sean Mullan * @author JSR 105 Expert Group * @see Transform */ public interface TransformParameterSpec extends AlgorithmParameterSpec {} libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/spec/XPathFilter2ParameterSpec.java0000644000175000017500000000633511661503232031710 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: XPathFilter2ParameterSpec.java 1203720 2011-11-18 16:23:54Z mullan $ */ package javax.xml.crypto.dsig.spec; import java.util.ArrayList; import java.util.Collections; import java.util.List; import javax.xml.crypto.dsig.Transform; /** * Parameters for the W3C Recommendation * * XPath Filter 2.0 Transform Algorithm. * The parameters include a list of one or more {@link XPathType} objects. * * @author Sean Mullan * @author JSR 105 Expert Group * @see Transform * @see XPathFilterParameterSpec */ public final class XPathFilter2ParameterSpec implements TransformParameterSpec { private final List xPathList; /** * Creates an XPathFilter2ParameterSpec. * * @param xPathList a list of one or more {@link XPathType} objects. The * list is defensively copied to protect against subsequent modification. * @throws ClassCastException if xPathList contains any * entries that are not of type {@link XPathType} * @throws IllegalArgumentException if xPathList is empty * @throws NullPointerException if xPathList is * null */ public XPathFilter2ParameterSpec(List xPathList) { if (xPathList == null) { throw new NullPointerException("xPathList cannot be null"); } this.xPathList = unmodifiableCopyOfList(xPathList); if (this.xPathList.isEmpty()) { throw new IllegalArgumentException("xPathList cannot be empty"); } int size = this.xPathList.size(); for (int i = 0; i < size; i++) { if (!(this.xPathList.get(i) instanceof XPathType)) { throw new ClassCastException ("xPathList["+i+"] is not a valid type"); } } } @SuppressWarnings("unchecked") private static List unmodifiableCopyOfList(List list) { return Collections.unmodifiableList(new ArrayList(list)); } /** * Returns a list of one or more {@link XPathType} objects. *

* This implementation returns an {@link Collections#unmodifiableList * unmodifiable list}. * * @return a List of XPathType objects * (never null or empty) */ public List getXPathList() { return xPathList; } } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/spec/XSLTTransformParameterSpec.java0000644000175000017500000000471511552016322032120 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: XSLTTransformParameterSpec.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto.dsig.spec; import javax.xml.crypto.dsig.Transform; import javax.xml.crypto.XMLStructure; /** * Parameters for the * XSLT Transform Algorithm. * The parameters include a namespace-qualified stylesheet element. * *

An XSLTTransformParameterSpec is instantiated with a * mechanism-dependent (ex: DOM) stylesheet element. For example: *

 *   DOMStructure stylesheet = new DOMStructure(element)
 *   XSLTTransformParameterSpec spec = new XSLTransformParameterSpec(stylesheet);
 * 
* where element is an {@link org.w3c.dom.Element} containing * the namespace-qualified stylesheet element. * * @author Sean Mullan * @author JSR 105 Expert Group * @see Transform */ public final class XSLTTransformParameterSpec implements TransformParameterSpec{ private XMLStructure stylesheet; /** * Creates an XSLTTransformParameterSpec with the specified * stylesheet. * * @param stylesheet the XSLT stylesheet to be used * @throws NullPointerException if stylesheet is * null */ public XSLTTransformParameterSpec(XMLStructure stylesheet) { if (stylesheet == null) { throw new NullPointerException(); } this.stylesheet = stylesheet; } /** * Returns the stylesheet. * * @return the stylesheet */ public XMLStructure getStylesheet() { return stylesheet; } } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/spec/C14NMethodParameterSpec.java0000644000175000017500000000276411552016322031242 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: C14NMethodParameterSpec.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto.dsig.spec; import javax.xml.crypto.dsig.CanonicalizationMethod; /** * A specification of algorithm parameters for a {@link CanonicalizationMethod} * Algorithm. The purpose of this interface is to group (and provide type * safety for) all canonicalization (C14N) parameter specifications. All * canonicalization parameter specifications must implement this interface. * * @author Sean Mullan * @author JSR 105 Expert Group * @see CanonicalizationMethod */ public interface C14NMethodParameterSpec extends TransformParameterSpec {} libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/SignatureProperty.java0000644000175000017500000000663711552016322027537 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: SignatureProperty.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto.dsig; import javax.xml.crypto.XMLStructure; import java.util.List; /** * A representation of the XML SignatureProperty element as * defined in the * W3C Recommendation for XML-Signature Syntax and Processing. * The XML Schema Definition is defined as: *

 *<element name="SignatureProperty" type="ds:SignaturePropertyType"/> 
 *   <complexType name="SignaturePropertyType" mixed="true">
 *     <choice maxOccurs="unbounded"> 
 *       <any namespace="##other" processContents="lax"/>
 *       <!-- (1,1) elements from (1, unbounded) namespaces -->
 *     </choice>
 *     <attribute name="Target" type="anyURI" use="required"/> 
 *     <attribute name="Id" type="ID" use="optional"/> 
 *   </complexType>
 * 
* * A SignatureProperty instance may be created by invoking the * {@link XMLSignatureFactory#newSignatureProperty newSignatureProperty} * method of the {@link XMLSignatureFactory} class; for example: * *
 *   XMLSignatureFactory factory = XMLSignatureFactory.getInstance("DOM");
 *   SignatureProperty property = factory.newSignatureProperty
 *	(Collections.singletonList(content), "#Signature-1", "TimeStamp");
 * 
* * @author Sean Mullan * @author JSR 105 Expert Group * @see XMLSignatureFactory#newSignatureProperty(List, String, String) * @see SignatureProperties */ public interface SignatureProperty extends XMLStructure { /** * Returns the target URI of this SignatureProperty. * * @return the target URI of this SignatureProperty (never * null) */ String getTarget(); /** * Returns the Id of this SignatureProperty. * * @return the Id of this SignatureProperty (or * null if not specified) */ String getId(); /** * Returns an {@link java.util.Collections#unmodifiableList unmodifiable * list} of one or more {@link XMLStructure}s that are contained in * this SignatureProperty. These represent additional * information items concerning the generation of the {@link XMLSignature} * (i.e. date/time stamp or serial numbers of cryptographic hardware used * in signature generation). * * @return an unmodifiable list of one or more XMLStructures */ List getContent(); } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/XMLSignatureException.java0000644000175000017500000001140412233525734030227 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: XMLSignatureException.java 1536468 2013-10-28 18:24:28Z mullan $ */ package javax.xml.crypto.dsig; import java.io.PrintStream; import java.io.PrintWriter; /** * Indicates an exceptional condition that occurred during the XML * signature generation or validation process. * *

An XMLSignatureException can contain a cause: another * throwable that caused this XMLSignatureException to get thrown. */ public class XMLSignatureException extends Exception { private static final long serialVersionUID = -3438102491013869995L; /** * The throwable that caused this exception to get thrown, or null if this * exception was not caused by another throwable or if the causative * throwable is unknown. * * @serial */ private Throwable cause; /** * Constructs a new XMLSignatureException with * null as its detail message. */ public XMLSignatureException() { super(); } /** * Constructs a new XMLSignatureException with the specified * detail message. * * @param message the detail message */ public XMLSignatureException(String message) { super(message); } /** * Constructs a new XMLSignatureException with the * specified detail message and cause. *

Note that the detail message associated with * cause is not automatically incorporated in * this exception's detail message. * * @param message the detail message * @param cause the cause (A null value is permitted, and * indicates that the cause is nonexistent or unknown.) */ public XMLSignatureException(String message, Throwable cause) { super(message); this.cause = cause; } /** * Constructs a new XMLSignatureException with the specified * cause and a detail message of * (cause==null ? null : cause.toString()) * (which typically contains the class and detail message of * cause). * * @param cause the cause (A null value is permitted, and * indicates that the cause is nonexistent or unknown.) */ public XMLSignatureException(Throwable cause) { super(cause==null ? null : cause.toString()); this.cause = cause; } /** * Returns the cause of this XMLSignatureException or * null if the cause is nonexistent or unknown. (The * cause is the throwable that caused this * XMLSignatureException to get thrown.) * * @return the cause of this XMLSignatureException or * null if the cause is nonexistent or unknown. */ public Throwable getCause() { return cause; } /** * Prints this XMLSignatureException, its backtrace and * the cause's backtrace to the standard error stream. */ public void printStackTrace() { super.printStackTrace(); if (cause != null) { cause.printStackTrace(); } } /** * Prints this XMLSignatureException, its backtrace and * the cause's backtrace to the specified print stream. * * @param s PrintStream to use for output */ public void printStackTrace(PrintStream s) { super.printStackTrace(s); if (cause != null) { cause.printStackTrace(s); } } /** * Prints this XMLSignatureException, its backtrace and * the cause's backtrace to the specified print writer. * * @param s PrintWriter to use for output */ public void printStackTrace(PrintWriter s) { super.printStackTrace(s); if (cause != null) { cause.printStackTrace(s); } } } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/SignedInfo.java0000644000175000017500000000662411552016322026052 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: SignedInfo.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto.dsig; import javax.xml.crypto.XMLStructure; import java.io.InputStream; import java.util.List; /** * An representation of the XML SignedInfo element as * defined in the * W3C Recommendation for XML-Signature Syntax and Processing. * The XML Schema Definition is defined as: *


 * <element name="SignedInfo" type="ds:SignedInfoType"/> 
 * <complexType name="SignedInfoType">
 *   <sequence> 
 *     <element ref="ds:CanonicalizationMethod"/> 
 *     <element ref="ds:SignatureMethod"/> 
 *     <element ref="ds:Reference" maxOccurs="unbounded"/> 
 *   </sequence>  
 *   <attribute name="Id" type="ID" use="optional"/> 
 * </complexType>
 * 
* * A SignedInfo instance may be created by invoking one of the * {@link XMLSignatureFactory#newSignedInfo newSignedInfo} methods of the * {@link XMLSignatureFactory} class. * * @author Sean Mullan * @author JSR 105 Expert Group * @see XMLSignatureFactory#newSignedInfo(CanonicalizationMethod, SignatureMethod, List) * @see XMLSignatureFactory#newSignedInfo(CanonicalizationMethod, SignatureMethod, List, String) */ public interface SignedInfo extends XMLStructure { /** * Returns the canonicalization method of this SignedInfo. * * @return the canonicalization method */ CanonicalizationMethod getCanonicalizationMethod(); /** * Returns the signature method of this SignedInfo. * * @return the signature method */ SignatureMethod getSignatureMethod(); /** * Returns an {@link java.util.Collections#unmodifiableList * unmodifiable list} of one or more {@link Reference}s. * * @return an unmodifiable list of one or more {@link Reference}s */ List getReferences(); /** * Returns the optional Id attribute of this * SignedInfo. * * @return the id (may be null if not specified) */ String getId(); /** * Returns the canonicalized signed info bytes after a signing or * validation operation. This method is useful for debugging. * * @return an InputStream containing the canonicalized bytes, * or null if this SignedInfo has not been * signed or validated yet */ InputStream getCanonicalizedData(); } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dsig/DigestMethod.java0000644000175000017500000000652211750731244026411 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DigestMethod.java 1333869 2012-05-04 10:42:44Z coheigea $ */ package javax.xml.crypto.dsig; import javax.xml.crypto.AlgorithmMethod; import javax.xml.crypto.XMLStructure; import java.security.spec.AlgorithmParameterSpec; /** * A representation of the XML DigestMethod element as * defined in the * W3C Recommendation for XML-Signature Syntax and Processing. * The XML Schema Definition is defined as: *

*

 *   <element name="DigestMethod" type="ds:DigestMethodType"/>
 *     <complexType name="DigestMethodType" mixed="true">
 *       <sequence>
 *         <any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
 *           <!-- (0,unbounded) elements from (1,1) namespace -->
 *       </sequence>
 *       <attribute name="Algorithm" type="anyURI" use="required"/>
 *     </complexType>
 * 
* * A DigestMethod instance may be created by invoking the * {@link XMLSignatureFactory#newDigestMethod newDigestMethod} method * of the {@link XMLSignatureFactory} class. * * @author Sean Mullan * @author JSR 105 Expert Group * @see XMLSignatureFactory#newDigestMethod(String, DigestMethodParameterSpec) */ public interface DigestMethod extends XMLStructure, AlgorithmMethod { /** * The * SHA1 digest method algorithm URI. */ String SHA1 = "http://www.w3.org/2000/09/xmldsig#sha1"; /** * The * SHA256 digest method algorithm URI. */ String SHA256 = "http://www.w3.org/2001/04/xmlenc#sha256"; /** * The * SHA512 digest method algorithm URI. */ String SHA512 = "http://www.w3.org/2001/04/xmlenc#sha512"; /** * The * RIPEMD-160 digest method algorithm URI. */ String RIPEMD160 = "http://www.w3.org/2001/04/xmlenc#ripemd160"; /** * Returns the algorithm-specific input parameters associated with this * DigestMethod. * *

The returned parameters can be typecast to a {@link * javax.xml.crypto.dsig.spec.DigestMethodParameterSpec} object. * * @return the algorithm-specific parameters (may be null if * not specified) */ AlgorithmParameterSpec getParameterSpec(); } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/URIReference.java0000644000175000017500000000344311552016322025351 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: URIReference.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto; /** * Identifies a data object via a URI-Reference, as specified by * RFC 2396. * *

Note that some subclasses may not have a type attribute * and for objects of those types, the {@link #getType} method always returns * null. * * @author Sean Mullan * @author JSR 105 Expert Group * @see URIDereferencer */ public interface URIReference { /** * Returns the URI of the referenced data object. * * @return the URI of the data object in RFC 2396 format (may be * null if not specified) */ String getURI(); /** * Returns the type of data referenced by this URI. * * @return the type (a URI) of the data object (may be null * if not specified) */ String getType(); } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/NodeSetData.java0000644000175000017500000000355411552016322025231 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: NodeSetData.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto; import java.util.Iterator; /** * An abstract representation of a Data type containing a * node-set. The type (class) and ordering of the nodes contained in the set * are not defined by this class; instead that behavior should be * defined by NodeSetData subclasses. * * @author Sean Mullan * @author JSR 105 Expert Group */ public interface NodeSetData extends Data { /** * Returns a read-only iterator over the nodes contained in this * NodeSetData in * * document order. Attempts to modify the returned iterator * via the remove method throw * UnsupportedOperationException. * * @return an Iterator over the nodes in this * NodeSetData in document order */ Iterator iterator(); } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/KeySelector.java0000644000175000017500000001267012233525734025337 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: KeySelector.java 1536468 2013-10-28 18:24:28Z mullan $ */ package javax.xml.crypto; import java.security.Key; import javax.xml.crypto.dsig.keyinfo.KeyInfo; import javax.xml.crypto.dsig.keyinfo.RetrievalMethod; /** * A selector that finds and returns a key using the data contained in a * {@link KeyInfo} object. An example of an implementation of * this class is one that searches a {@link java.security.KeyStore} for * trusted keys that match information contained in a KeyInfo. * *

Whether or not the returned key is trusted and the mechanisms * used to determine that is implementation-specific. * * @author Sean Mullan * @author JSR 105 Expert Group */ public abstract class KeySelector { /** * The purpose of the key that is to be selected. */ public static class Purpose { private final String name; private Purpose(String name) { this.name = name; } /** * Returns a string representation of this purpose ("sign", * "verify", "encrypt", or "decrypt"). * * @return a string representation of this purpose */ public String toString() { return name; } /** * A key for signing. */ public static final Purpose SIGN = new Purpose("sign"); /** * A key for verifying. */ public static final Purpose VERIFY = new Purpose("verify"); /** * A key for encrypting. */ public static final Purpose ENCRYPT = new Purpose("encrypt"); /** * A key for decrypting. */ public static final Purpose DECRYPT = new Purpose("decrypt"); } /** * Default no-args constructor; intended for invocation by subclasses only. */ protected KeySelector() {} /** * Attempts to find a key that satisfies the specified constraints. * * @param keyInfo a KeyInfo (may be null) * @param purpose the key's purpose ({@link Purpose#SIGN}, * {@link Purpose#VERIFY}, {@link Purpose#ENCRYPT}, or * {@link Purpose#DECRYPT}) * @param method the algorithm method that this key is to be used for. * Only keys that are compatible with the algorithm and meet the * constraints of the specified algorithm should be returned. * @param context an XMLCryptoContext that may contain * useful information for finding an appropriate key. If this key * selector supports resolving {@link RetrievalMethod} types, the * context's baseURI and dereferencer * parameters (if specified) should be used by the selector to * resolve and dereference the URI. * @return the result of the key selector * @throws KeySelectorException if an exceptional condition occurs while * attempting to find a key. Note that an inability to find a key is not * considered an exception (null should be * returned in that case). However, an error condition (ex: network * communications failure) that prevented the KeySelector * from finding a potential key should be considered an exception. * @throws ClassCastException if the data type of method * is not supported by this key selector */ public abstract KeySelectorResult select(KeyInfo keyInfo, Purpose purpose, AlgorithmMethod method, XMLCryptoContext context) throws KeySelectorException; /** * Returns a KeySelector that always selects the specified * key, regardless of the KeyInfo passed to it. * * @param key the sole key to be stored in the key selector * @return a key selector that always selects the specified key * @throws NullPointerException if key is null */ public static KeySelector singletonKeySelector(Key key) { return new SingletonKeySelector(key); } private static class SingletonKeySelector extends KeySelector { private final Key key; SingletonKeySelector(Key key) { if (key == null) { throw new NullPointerException(); } this.key = key; } public KeySelectorResult select(KeyInfo keyInfo, Purpose purpose, AlgorithmMethod method, XMLCryptoContext context) throws KeySelectorException { return new KeySelectorResult() { public Key getKey() { return key; } }; } } } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/MarshalException.java0000644000175000017500000001143612233525734026353 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: MarshalException.java 1536468 2013-10-28 18:24:28Z mullan $ */ package javax.xml.crypto; import java.io.PrintStream; import java.io.PrintWriter; import javax.xml.crypto.dsig.XMLSignature; import javax.xml.crypto.dsig.XMLSignatureFactory; /** * Indicates an exceptional condition that occurred during the XML * marshalling or unmarshalling process. * *

A MarshalException can contain a cause: another * throwable that caused this MarshalException to get thrown. * * @author Sean Mullan * @author JSR 105 Expert Group * @see XMLSignature#sign(XMLSignContext) * @see XMLSignatureFactory#unmarshalXMLSignature(XMLValidateContext) */ public class MarshalException extends Exception { private static final long serialVersionUID = -863185580332643547L; /** * The throwable that caused this exception to get thrown, or null if this * exception was not caused by another throwable or if the causative * throwable is unknown. * * @serial */ private Throwable cause; /** * Constructs a new MarshalException with * null as its detail message. */ public MarshalException() { super(); } /** * Constructs a new MarshalException with the specified * detail message. * * @param message the detail message */ public MarshalException(String message) { super(message); } /** * Constructs a new MarshalException with the * specified detail message and cause. *

Note that the detail message associated with * cause is not automatically incorporated in * this exception's detail message. * * @param message the detail message * @param cause the cause (A null value is permitted, and * indicates that the cause is nonexistent or unknown.) */ public MarshalException(String message, Throwable cause) { super(message); this.cause = cause; } /** * Constructs a new MarshalException with the specified cause * and a detail message of (cause==null ? null : cause.toString()) * (which typically contains the class and detail message of * cause). * * @param cause the cause (A null value is permitted, and * indicates that the cause is nonexistent or unknown.) */ public MarshalException(Throwable cause) { super(cause == null ? null : cause.toString()); this.cause = cause; } /** * Returns the cause of this MarshalException or * null if the cause is nonexistent or unknown. (The * cause is the throwable that caused this * MarshalException to get thrown.) * * @return the cause of this MarshalException or * null if the cause is nonexistent or unknown. */ public Throwable getCause() { return cause; } /** * Prints this MarshalException, its backtrace and * the cause's backtrace to the standard error stream. */ public void printStackTrace() { super.printStackTrace(); cause.printStackTrace(); } /** * Prints this MarshalException, its backtrace and * the cause's backtrace to the specified print stream. * * @param s PrintStream to use for output */ public void printStackTrace(PrintStream s) { super.printStackTrace(s); cause.printStackTrace(s); } /** * Prints this MarshalException, its backtrace and * the cause's backtrace to the specified print writer. * * @param s PrintWriter to use for output */ public void printStackTrace(PrintWriter s) { super.printStackTrace(s); cause.printStackTrace(s); } } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/AlgorithmMethod.java0000644000175000017500000000355411552016322026165 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: AlgorithmMethod.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto; import java.security.spec.AlgorithmParameterSpec; /** * An abstract representation of an algorithm defined in the XML Security * specifications. Subclasses represent specific types of XML security * algorithms, such as a {@link javax.xml.crypto.dsig.Transform}. * * @author Sean Mullan * @author JSR 105 Expert Group */ public interface AlgorithmMethod { /** * Returns the algorithm URI of this AlgorithmMethod. * * @return the algorithm URI of this AlgorithmMethod */ String getAlgorithm(); /** * Returns the algorithm parameters of this AlgorithmMethod. * * @return the algorithm parameters of this AlgorithmMethod. * Returns null if this AlgorithmMethod does * not require parameters and they are not specified. */ AlgorithmParameterSpec getParameterSpec(); } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dom/0000755000175000017500000000000012273503733023013 5ustar tonytonylibxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dom/DOMURIReference.java0000644000175000017500000000302511552016322026464 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMURIReference.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto.dom; import javax.xml.crypto.URIReference; import org.w3c.dom.Node; /** * A DOM-specific {@link URIReference}. The purpose of this class is to * provide additional context necessary for resolving XPointer URIs or * same-document references. * * @author Sean Mullan * @author JSR 105 Expert Group */ public interface DOMURIReference extends URIReference { /** * Returns the here node. * * @return the attribute or processing instruction node or the * parent element of the text node that directly contains the URI */ Node getHere(); } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dom/package.html0000644000175000017500000000245610372164212025274 0ustar tonytony DOM-specific classes for the {@link javax.xml.crypto} package. Only users who are using a DOM-based XML cryptographic implementations (ex: {@link javax.xml.crypto.dsig.XMLSignatureFactory XMLSignatureFactory} or {@link javax.xml.crypto.dsig.keyinfo.KeyInfoFactory}) should need to make direct use of this package.

Package Specification

libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dom/DOMStructure.java0000644000175000017500000000525311552016322026213 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMStructure.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto.dom; import org.w3c.dom.Node; import javax.xml.crypto.XMLStructure; import javax.xml.crypto.dsig.XMLSignature; /** * A DOM-specific {@link XMLStructure}. The purpose of this class is to * allow a DOM node to be used to represent extensible content (any elements * or mixed content) in XML Signature structures. * *

If a sequence of nodes is needed, the node contained in the * DOMStructure is the first node of the sequence and successive * nodes can be accessed by invoking {@link Node#getNextSibling}. * *

If the owner document of the DOMStructure is different than * the target document of an XMLSignature, the * {@link XMLSignature#sign(XMLSignContext)} method imports the node into the * target document before generating the signature. * * @author Sean Mullan * @author JSR 105 Expert Group */ public class DOMStructure implements XMLStructure { private final Node node; /** * Creates a DOMStructure containing the specified node. * * @param node the node * @throws NullPointerException if node is null */ public DOMStructure(Node node) { if (node == null) { throw new NullPointerException("node cannot be null"); } this.node = node; } /** * Returns the node contained in this DOMStructure. * * @return the node */ public Node getNode() { return node; } /** * @throws NullPointerException {@inheritDoc} */ public boolean isFeatureSupported(String feature) { if (feature == null) { throw new NullPointerException(); } else { return false; } } } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/dom/DOMCryptoContext.java0000644000175000017500000001777111661474740027065 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: DOMCryptoContext.java 1203698 2011-11-18 15:29:36Z mullan $ */ package javax.xml.crypto.dom; import javax.xml.crypto.KeySelector; import javax.xml.crypto.URIDereferencer; import javax.xml.crypto.XMLCryptoContext; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import org.w3c.dom.Element; /** * This class provides a DOM-specific implementation of the * {@link XMLCryptoContext} interface. It also includes additional * methods that are specific to a DOM-based implementation for registering * and retrieving elements that contain attributes of type ID. * * @author Sean Mullan * @author JSR 105 Expert Group */ public class DOMCryptoContext implements XMLCryptoContext { private Map nsMap = new HashMap(); private Map idMap = new HashMap(); private Map objMap = new HashMap(); private Map propMap = new HashMap(); private String baseURI; private KeySelector ks; private URIDereferencer dereferencer; private String defaultPrefix; /** * Default constructor. (For invocation by subclass constructors). */ protected DOMCryptoContext() {} /** * This implementation uses an internal {@link HashMap} to get the prefix * that the specified URI maps to. It returns the defaultPrefix * if it maps to null. * * @throws NullPointerException {@inheritDoc} */ public String getNamespacePrefix(String namespaceURI, String defaultPrefix) { if (namespaceURI == null) { throw new NullPointerException("namespaceURI cannot be null"); } String prefix = nsMap.get(namespaceURI); return (prefix != null ? prefix : defaultPrefix); } /** * This implementation uses an internal {@link HashMap} to map the URI * to the specified prefix. * * @throws NullPointerException {@inheritDoc} */ public String putNamespacePrefix(String namespaceURI, String prefix) { if (namespaceURI == null) { throw new NullPointerException("namespaceURI is null"); } return nsMap.put(namespaceURI, prefix); } public String getDefaultNamespacePrefix() { return defaultPrefix; } public void setDefaultNamespacePrefix(String defaultPrefix) { this.defaultPrefix = defaultPrefix; } public String getBaseURI() { return baseURI; } /** * @throws IllegalArgumentException {@inheritDoc} */ public void setBaseURI(String baseURI) { if (baseURI != null) { java.net.URI.create(baseURI); } this.baseURI = baseURI; } public URIDereferencer getURIDereferencer() { return dereferencer; } public void setURIDereferencer(URIDereferencer dereferencer) { this.dereferencer = dereferencer; } /** * This implementation uses an internal {@link HashMap} to get the object * that the specified name maps to. * * @throws NullPointerException {@inheritDoc} */ public Object getProperty(String name) { if (name == null) { throw new NullPointerException("name is null"); } return propMap.get(name); } /** * This implementation uses an internal {@link HashMap} to map the name * to the specified object. * * @throws NullPointerException {@inheritDoc} */ public Object setProperty(String name, Object value) { if (name == null) { throw new NullPointerException("name is null"); } return propMap.put(name, value); } public KeySelector getKeySelector() { return ks; } public void setKeySelector(KeySelector ks) { this.ks = ks; } /** * Returns the Element with the specified ID attribute value. * *

This implementation uses an internal {@link HashMap} to get the * element that the specified attribute value maps to. * * @param idValue the value of the ID * @return the Element with the specified ID attribute value, * or null if none. * @throws NullPointerException if idValue is null * @see #setIdAttributeNS */ public Element getElementById(String idValue) { if (idValue == null) { throw new NullPointerException("idValue is null"); } return idMap.get(idValue); } /** * Registers the element's attribute specified by the namespace URI and * local name to be of type ID. The attribute must have a non-empty value. * *

This implementation uses an internal {@link HashMap} to map the * attribute's value to the specified element. * * @param element the element * @param namespaceURI the namespace URI of the attribute (specify * null if not applicable) * @param localName the local name of the attribute * @throws IllegalArgumentException if localName is not an * attribute of the specified element or it does not contain a specific * value * @throws NullPointerException if element or * localName is null * @see #getElementById */ public void setIdAttributeNS(Element element, String namespaceURI, String localName) { if (element == null) { throw new NullPointerException("element is null"); } if (localName == null) { throw new NullPointerException("localName is null"); } String idValue = element.getAttributeNS(namespaceURI, localName); if (idValue == null || idValue.length() == 0) { throw new IllegalArgumentException(localName + " is not an " + "attribute"); } idMap.put(idValue, element); } /** * Returns a read-only iterator over the set of Id/Element mappings of * this DOMCryptoContext. Attempts to modify the set via the * {@link Iterator#remove} method throw an * UnsupportedOperationException. The mappings are returned * in no particular order. Each element in the iteration is represented as a * {@link java.util.Map.Entry}. If the DOMCryptoContext is * modified while an iteration is in progress, the results of the * iteration are undefined. * * @return a read-only iterator over the set of mappings */ public Iterator iterator() { return Collections.unmodifiableMap(idMap).entrySet().iterator(); } /** * This implementation uses an internal {@link HashMap} to get the object * that the specified key maps to. */ public Object get(Object key) { return objMap.get(key); } /** * This implementation uses an internal {@link HashMap} to map the key * to the specified object. * * @throws IllegalArgumentException {@inheritDoc} */ public Object put(Object key, Object value) { return objMap.put(key, value); } } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/KeySelectorResult.java0000644000175000017500000000321111552016322026514 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: KeySelectorResult.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto; import java.security.Key; /** * The result returned by the {@link KeySelector#select KeySelector.select} * method. *

* At a minimum, a KeySelectorResult contains the Key * selected by the KeySelector. Implementations of this interface * may add methods to return implementation or algorithm specific information, * such as a chain of certificates or debugging information. * * @author Sean Mullan * @author JSR 105 Expert Group * @see KeySelector */ public interface KeySelectorResult { /** * Returns the selected key. * * @return the selected key, or null if none can be found */ Key getKey(); } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/OctetStreamData.java0000644000175000017500000000630211552016322026114 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * * @author Sean Mullan * @author JSR 105 Expert Group */ /* * $Id: OctetStreamData.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto; import java.io.InputStream; /** * A representation of a Data type containing an octet stream. */ public class OctetStreamData implements Data { private InputStream octetStream; private String uri; private String mimeType; /** * Creates a new OctetStreamData. * * @param octetStream the input stream containing the octets * @throws NullPointerException if octetStream is * null */ public OctetStreamData(InputStream octetStream) { if (octetStream == null) { throw new NullPointerException("octetStream is null"); } this.octetStream = octetStream; } /** * Creates a new OctetStreamData. * * @param octetStream the input stream containing the octets * @param uri the URI String identifying the data object (may be * null) * @param mimeType the MIME type associated with the data object (may be * null) * @throws NullPointerException if octetStream is * null */ public OctetStreamData(InputStream octetStream, String uri, String mimeType) { if (octetStream == null) { throw new NullPointerException("octetStream is null"); } this.octetStream = octetStream; this.uri = uri; this.mimeType = mimeType; } /** * Returns the input stream of this OctetStreamData. * * @return the input stream of this OctetStreamData. */ public InputStream getOctetStream() { return octetStream; } /** * Returns the URI String identifying the data object represented by this * OctetStreamData. * * @return the URI String or null if not applicable */ public String getURI() { return uri; } /** * Returns the MIME type associated with the data object represented by this * OctetStreamData. * * @return the MIME type or null if not applicable */ public String getMimeType() { return mimeType; } } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/XMLCryptoContext.java0000644000175000017500000002112411552016322026275 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: XMLCryptoContext.java 1092655 2011-04-15 10:24:18Z coheigea $ */ package javax.xml.crypto; /** * Contains common context information for XML cryptographic operations. * *

This interface contains methods for setting and retrieving properties * that affect the processing of XML signatures or XML encrypted structures. * *

Note that XMLCryptoContext instances can contain information * and state specific to the XML cryptographic structure it is used with. * The results are unpredictable if an XMLCryptoContext is * used with multiple structures (for example, you should not use the same * {@link javax.xml.crypto.dsig.XMLValidateContext} instance to validate two * different {@link javax.xml.crypto.dsig.XMLSignature} objects). * * @author Sean Mullan * @author JSR 105 Expert Group */ public interface XMLCryptoContext { /** * Returns the base URI. * * @return the base URI, or null if not specified * @see #setBaseURI(String) */ String getBaseURI(); /** * Sets the base URI. * * @param baseURI the base URI, or null to remove current * value * @throws IllegalArgumentException if baseURI is not RFC * 2396 compliant * @see #getBaseURI */ void setBaseURI(String baseURI); /** * Returns the key selector for finding a key. * * @return the key selector, or null if not specified * @see #setKeySelector(KeySelector) */ KeySelector getKeySelector(); /** * Sets the key selector for finding a key. * * @param ks the key selector, or null to remove the current * setting * @see #getKeySelector */ void setKeySelector(KeySelector ks); /** * Returns a URIDereferencer that is used to dereference * {@link URIReference}s. * * @return the URIDereferencer, or null if not * specified * @see #setURIDereferencer(URIDereferencer) */ URIDereferencer getURIDereferencer(); /** * Sets a URIDereferencer that is used to dereference * {@link URIReference}s. The specified URIDereferencer * is used in place of an implementation's default * URIDereferencer. * * @param dereferencer the URIDereferencer, or * null to remove any current setting * @see #getURIDereferencer */ void setURIDereferencer(URIDereferencer dereferencer); /** * Returns the namespace prefix that the specified namespace URI is * associated with. Returns the specified default prefix if the specified * namespace URI has not been bound to a prefix. To bind a namespace URI * to a prefix, call the {@link #putNamespacePrefix putNamespacePrefix} * method. * * @param namespaceURI a namespace URI * @param defaultPrefix the prefix to be returned in the event that the * the specified namespace URI has not been bound to a prefix. * @return the prefix that is associated with the specified namespace URI, * or defaultPrefix if the URI is not registered. If * the namespace URI is registered but has no prefix, an empty string * ("") is returned. * @throws NullPointerException if namespaceURI is * null * @see #putNamespacePrefix(String, String) */ String getNamespacePrefix(String namespaceURI, String defaultPrefix); /** * Maps the specified namespace URI to the specified prefix. If there is * already a prefix associated with the specified namespace URI, the old * prefix is replaced by the specified prefix. * * @param namespaceURI a namespace URI * @param prefix a namespace prefix (or null to remove any * existing mapping). Specifying the empty string ("") * binds no prefix to the namespace URI. * @return the previous prefix associated with the specified namespace * URI, or null if there was none * @throws NullPointerException if namespaceURI is * null * @see #getNamespacePrefix(String, String) */ String putNamespacePrefix(String namespaceURI, String prefix); /** * Returns the default namespace prefix. The default namespace prefix * is the prefix for all namespace URIs not explicitly set by the * {@link #putNamespacePrefix putNamespacePrefix} method. * * @return the default namespace prefix, or null if none has * been set. * @see #setDefaultNamespacePrefix(String) */ String getDefaultNamespacePrefix(); /** * Sets the default namespace prefix. This sets the namespace prefix for * all namespace URIs not explicitly set by the {@link #putNamespacePrefix * putNamespacePrefix} method. * * @param defaultPrefix the default namespace prefix, or null * to remove the current setting. Specify the empty string * ("") to bind no prefix. * @see #getDefaultNamespacePrefix */ void setDefaultNamespacePrefix(String defaultPrefix); /** * Sets the specified property. * * @param name the name of the property * @param value the value of the property to be set * @return the previous value of the specified property, or * null if it did not have a value * @throws NullPointerException if name is null * @see #getProperty(String) */ Object setProperty(String name, Object value); /** * Returns the value of the specified property. * * @param name the name of the property * @return the current value of the specified property, or * null if it does not have a value * @throws NullPointerException if name is null * @see #setProperty(String, Object) */ Object getProperty(String name); /** * Returns the value to which this context maps the specified key. * *

More formally, if this context contains a mapping from a key * k to a value v such that * (key==null ? k==null : key.equals(k)), then this method * returns v; otherwise it returns null. (There * can be at most one such mapping.) * *

This method is useful for retrieving arbitrary information that is * specific to the cryptographic operation that this context is used for. * * @param key the key whose associated value is to be returned * @return the value to which this context maps the specified key, or * null if there is no mapping for the key * @see #put(Object, Object) */ Object get(Object key); /** * Associates the specified value with the specified key in this context. * If the context previously contained a mapping for this key, the old * value is replaced by the specified value. * *

This method is useful for storing arbitrary information that is * specific to the cryptographic operation that this context is used for. * * @param key key with which the specified value is to be associated with * @param value value to be associated with the specified key * @return the previous value associated with the key, or null * if there was no mapping for the key * @throws IllegalArgumentException if some aspect of this key or value * prevents it from being stored in this context * @see #get(Object) */ Object put(Object key, Object value); } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/NoSuchMechanismException.java0000644000175000017500000001174411562205550030005 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: NoSuchMechanismException.java 1101389 2011-05-10 09:54:48Z coheigea $ */ package javax.xml.crypto; import java.io.PrintStream; import java.io.PrintWriter; import javax.xml.crypto.dsig.XMLSignatureFactory; import javax.xml.crypto.dsig.keyinfo.KeyInfoFactory; /** * This exception is thrown when a particular XML mechanism is requested but * is not available in the environment. * *

A NoSuchMechanismException can contain a cause: another * throwable that caused this NoSuchMechanismException to get * thrown. * * @author Sean Mullan * @author JSR 105 Expert Group * @see XMLSignatureFactory#getInstance XMLSignatureFactory.getInstance * @see KeyInfoFactory#getInstance KeyInfoFactory.getInstance */ public class NoSuchMechanismException extends RuntimeException { private static final long serialVersionUID = 4189669069570660166L; /** * The throwable that caused this exception to get thrown, or null if this * exception was not caused by another throwable or if the causative * throwable is unknown. * * @serial */ private Throwable cause; /** * Constructs a new NoSuchMechanismException with * null as its detail message. */ public NoSuchMechanismException() { super(); } /** * Constructs a new NoSuchMechanismException with the * specified detail message. * * @param message the detail message */ public NoSuchMechanismException(String message) { super(message); } /** * Constructs a new NoSuchMechanismException with the * specified detail message and cause. *

Note that the detail message associated with * cause is not automatically incorporated in * this exception's detail message. * * @param message the detail message * @param cause the cause (A null value is permitted, and * indicates that the cause is nonexistent or unknown.) */ public NoSuchMechanismException(String message, Throwable cause) { super(message); this.cause = cause; } /** * Constructs a new NoSuchMechanismException with the * specified cause and a detail message of * (cause==null ? null : cause.toString()) (which typically * contains the class and detail message of cause). * * @param cause the cause (A null value is permitted, and * indicates that the cause is nonexistent or unknown.) */ public NoSuchMechanismException(Throwable cause) { super(cause == null ? null : cause.toString()); this.cause = cause; } /** * Returns the cause of this NoSuchMechanismException or * null if the cause is nonexistent or unknown. (The * cause is the throwable that caused this * NoSuchMechanismException to get thrown.) * * @return the cause of this NoSuchMechanismException or * null if the cause is nonexistent or unknown. */ public Throwable getCause() { return cause; } /** * Prints this NoSuchMechanismException, its backtrace and * the cause's backtrace to the standard error stream. */ public void printStackTrace() { super.printStackTrace(); cause.printStackTrace(); } /** * Prints this NoSuchMechanismException, its backtrace and * the cause's backtrace to the specified print stream. * * @param s PrintStream to use for output */ public void printStackTrace(PrintStream s) { super.printStackTrace(s); cause.printStackTrace(s); } /** * Prints this NoSuchMechanismException, its backtrace and * the cause's backtrace to the specified print writer. * * @param s PrintWriter to use for output */ public void printStackTrace(PrintWriter s) { super.printStackTrace(s); cause.printStackTrace(s); } } libxml-security-java-1.5.6/src/main/java/javax/xml/crypto/KeySelectorException.java0000644000175000017500000001141612021120777027204 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id: KeySelectorException.java 1380216 2012-09-03 12:26:39Z coheigea $ */ package javax.xml.crypto; import java.io.PrintStream; import java.io.PrintWriter; /** * Indicates an exceptional condition thrown by a {@link KeySelector}. * *

A KeySelectorException can contain a cause: another * throwable that caused this KeySelectorException to get thrown. * * @author Sean Mullan * @author JSR 105 Expert Group */ public class KeySelectorException extends Exception { private static final long serialVersionUID = -7480033639322531109L; /** * The throwable that caused this exception to get thrown, or * null if this exception was not caused by another throwable * or if the causative throwable is unknown. * * @serial */ private Throwable cause; /** * Constructs a new KeySelectorException with * null as its detail message. */ public KeySelectorException() { super(); } /** * Constructs a new KeySelectorException with the specified * detail message. * * @param message the detail message */ public KeySelectorException(String message) { super(message); } /** * Constructs a new KeySelectorException with the * specified detail message and cause. *

Note that the detail message associated with * cause is not automatically incorporated in * this exception's detail message. * * @param message the detail message * @param cause the cause (A null value is permitted, and * indicates that the cause is nonexistent or unknown.) */ public KeySelectorException(String message, Throwable cause) { super(message); this.cause = cause; } /** * Constructs a new KeySelectorException with the specified * cause and a detail message of * (cause==null ? null : cause.toString()) * (which typically contains the class and detail message of * cause). * * @param cause the cause (A null value is permitted, and * indicates that the cause is nonexistent or unknown.) */ public KeySelectorException(Throwable cause) { super(cause == null ? null : cause.toString()); this.cause = cause; } /** * Returns the cause of this KeySelectorException or * null if the cause is nonexistent or unknown. (The * cause is the throwable that caused this * KeySelectorException to get thrown.) * * @return the cause of this KeySelectorException or * null if the cause is nonexistent or unknown. */ public Throwable getCause() { return cause; } /** * Prints this KeySelectorException, its backtrace and * the cause's backtrace to the standard error stream. */ public void printStackTrace() { super.printStackTrace(); if (cause != null) { cause.printStackTrace(); } } /** * Prints this KeySelectorException, its backtrace and * the cause's backtrace to the specified print stream. * * @param s PrintStream to use for output */ public void printStackTrace(PrintStream s) { super.printStackTrace(s); if (cause != null) { cause.printStackTrace(s); } } /** * Prints this KeySelectorException, its backtrace and * the cause's backtrace to the specified print writer. * * @param s PrintWriter to use for output */ public void printStackTrace(PrintWriter s) { super.printStackTrace(s); if (cause != null) { cause.printStackTrace(s); } } } libxml-security-java-1.5.6/src/test/0000755000175000017500000000000012273503733016115 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/0000755000175000017500000000000012273503733020127 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/test.jceks0000644000175000017500000000742211735302571022133 0ustar tonytonydemoca6_ 00 +*0 4#BSoO'SF2_vBAC OzH !D_[qld* ab[p0g TKv+/Q+ؖL27^ƞ0Ao[W?\[t*Y[k,q Wj4E'ſb8/eT{#?kH\[!L}u KIONS,L3;[³ {dQST4+ߍX4,g=VT&[ WL]uD[$`hlP2g]*x/&c~6P﹋!ኂ$lea\TvW,Ԏ6JPqJ#ýoy7q>o dԫIuϣ>[N{hLǎz'o\4%'"$u|2>Dc7+T v˱NB|3PruxP}-+.5aN@WDD  ,H._78Yg;B̠/_W&/DP7IbvMБ݀sʶ9"Q_ǎ\Э,(N|͓W<]Y (I_6˻^Zp0l}W&X.509>0:0d0  *H 0.1 0 UUS1 0 U Demo10UDemo CA0  120329152058Z21120305152058Z0.1 0 UUS1 0 U Demo10UDemo CA00  *H 0n9 >}GI; {X߸BH|QAXW&Evlh eIk1G;3Jbkb *dq/}KwOEijWSus`Q5;֔M> ǚIUӋ7io_Vs~Wn|]6Iz6d؍ƩtNlJXp6s)W\`Ǟ!5^'_Xvi0X|kOK##t\Z0D?&ca\X.509q0m0֠e0  *H 0.1 0 UUS1 0 U Demo10UDemo CA0  120329152058Z21120305152058Z0.1 0 UUS1 0 U Demo10URSA Key00  *H 0*:ةUݜFY-A.KƧvpM%Wj%r.Z{+ꄮ7x |@F{>5RAu}{aLq.j+ǂ\FX.509>0:0d0  *H 0.1 0 UUS1 0 U Demo10UDemo CA0  120329152058Z21120305152058Z0.1 0 UUS1 0 U Demo10UDemo CA00  *H 0n9 >}GI; {X߸BH|QAXW&Evlh eIk1G;3Jbk6=÷Tp[ encodedParamst[B[encryptedContentq~L paramsAlgtLjava/lang/String;LsealAlgq~xpur[BTxp0 1: uq~ 2q:d} Y43$%hvg] tFdAz0G=R. wՠB{sϯ([Ә./ZX 1n^cj#"ͱ,#}QVig.OnSfJԡnAۉèK-G2B |vs='Q[rZG$2k~w{O-W*j'O֎?ܖrE~:['`'n-TԈn*ynA4 Associating Style Sheets with XML documents

W3C

Associating Style Sheets with XML documents
Version 1.0

W3C Recommendation 29 June 1999

This version:
http://www.w3.org/1999/06/REC-xml-stylesheet-19990629
Latest version:
http://www.w3.org/TR/xml-stylesheet
Previous version:
http://www.w3.org/TR/1999/xml-stylesheet-19990428
Editor:
James Clark <jjc@jclark.com>

Abstract

This document allows a style sheet to be associated with an XML document by including one or more processing instructions with a target of xml-stylesheet in the document's prolog.

Status of this document

This document has been reviewed by W3C Members and other interested parties and has been endorsed by the Director as a W3C Recommendation. It is a stable document and may be used as reference material or cited as a normative reference from other documents. W3C's role in making the Recommendation is to draw attention to the specification and to promote its widespread deployment. This enhances the functionality and interoperability of the Web.

The list of known errors in this specifications is available at http://www.w3.org/TR/1999/xml-stylesheet-19990629/errata.

Comments on this specification may be sent to <www-xml-stylesheet-comments@w3.org>. The archive of public comments is available at http://w3.org/Archives/Public/www-xml-stylesheet-comments.

A list of current W3C Recommendations and other technical documents can be found at http://www.w3.org/TR.

The Working Group expects additional mechanisms for linking style sheets to XML document to be defined in a future specification.

The use of XML processing instructions in this specification should not be taken as a precedent. The W3C does not anticipate recommending the use of processing instructions in any future specification. The Rationale explains why they were used in this specification.

This document was produced as part of the W3C XML Activity.

Table of contents

1 The xml-stylesheet processing instruction

Appendices

A References
B Rationale

1 The xml-stylesheet processing instruction

Style Sheets can be associated with an XML[XML10] document by using a processing instruction whose target is xml-stylesheet. This processing instruction follows the behaviour of the HTML 4.0 <LINK REL="stylesheet">[HTML40].

The xml-stylesheet processing instruction is parsed in the same way as a start-tag, with the exception that entities other than predefined entities must not be referenced.

The following grammar is given using the same notation as the grammar in the XML Recommendation[XML10]. Symbols in the grammar that are not defined here are defined in the XML Recommendation.

xml-stylesheet processing instruction
[1]    StyleSheetPI    ::=    '<?xml-stylesheet' (S PseudoAtt)* S? '?>'
[2]    PseudoAtt    ::=    Name S? '=' S? PseudoAttValue
[3]    PseudoAttValue    ::=    ('"' ([^"<&] | CharRef | PredefEntityRef)* '"'
| "'" ([^'<&] | CharRef | PredefEntityRef)* "'")
- (Char* '?>' Char*)
[4]    PredefEntityRef    ::=    '&amp;' | '&lt;' | '&gt;' | '&quot;' | '&apos;'

In PseudoAttValue, a CharRef or a PredefEntityRef is interpreted in the same manner as in a normal XML attribute value. The actual value of the pseudo-attribute is the value after each reference is replaced by the character it references. This replacement is not performed automatically by an XML processor.

The xml-stylesheet processing instruction is allowed only in the prolog of an XML document. The syntax of XML constrains where processing instructions are allowed in the prolog; the xml-stylesheet processing instruction is allowed anywhere in the prolog that meets these constraints.

NOTE: If the xml-stylesheet processing instruction occurs in the external DTD subset or in a parameter entity, it is possible that it may not be processed by a non-validating XML processor (see [XML10]).

The following pseudo attributes are defined

href CDATA #REQUIRED
type CDATA #REQUIRED
title CDATA #IMPLIED
media CDATA #IMPLIED
charset CDATA #IMPLIED
alternate (yes|no) "no"

The semantics of the pseudo-attributes are exactly as with <LINK REL="stylesheet"> in HTML 4.0, with the exception of the alternate pseudo-attribute. If alternate="yes" is specified, then the processing instruction has the semantics of <LINK REL="alternate stylesheet"> instead of <LINK REL="stylesheet">.

NOTE: Since the value of the href attribute is a URI reference, it may be a relative URI and it may contain a fragment identifier. In particular the URI reference may contain only a fragment identifier. Such a URI reference is a reference to a part of the document containing the xml-stylesheet processing instruction (see [RFC2396]). The consequence is that the xml-stylesheet processing instruction allows style sheets to be embedded in the same document as the xml-stylesheet processing instruction.

In some cases, style sheets may be linked with an XML document by means external to the document. For example, earlier versions of HTTP [RFC2068] (section 19.6.2.4) allowed style sheets to be associated with XML documents by means of the Link header. Any links to style sheets that are specified externally to the document are considered to occur before the links specified by the xml-stylesheet processing instructions. This is the same as in HTML 4.0 (see section 14.6).

Here are some examples from HTML 4.0 with the corresponding processing instruction:

<LINK href="mystyle.css" rel="style sheet" type="text/css">
<?xml-stylesheet href="mystyle.css" type="text/css"?>

<LINK href="mystyle.css" title="Compact" rel="stylesheet"
type="text/css">
<?xml-stylesheet href="mystyle.css" title="Compact" type="text/css"?>

<LINK href="mystyle.css" title="Medium" rel="alternate stylesheet"
type="text/css">
<?xml-stylesheet alternate="yes" href="mystyle.css" title="Medium"
type="text/css"?>

Multiple xml-stylesheet processing instructions are also allowed with exactly the same semantics as with LINK REL="stylesheet". For example,

<LINK rel="alternate stylesheet" title="compact" href="small-base.css"
type="text/css">
<LINK rel="alternate stylesheet" title="compact" href="small-extras.css"
type="text/css">
<LINK rel="alternate stylesheet" title="big print" href="bigprint.css"
type="text/css">
<LINK rel="stylesheet" href="common.css" type="text/css">

would be equivalent to:

<?xml-stylesheet alternate="yes" title="compact" href="small-base.css"
type="text/css"?>
<?xml-stylesheet alternate="yes" title="compact" href="small-extras.css"
type="text/css"?>
<?xml-stylesheet alternate="yes" title="big print" href="bigprint.css"
type="text/css"?>
<?xml-stylesheet href="common.css" type="text/css"?>

A References

HTML40
World Wide Web Consortium. HTML 4.0 Specification. W3C Recommendation. See http://www.w3.org/TR/REC-html40
RFC2068
R. Fielding, J. Gettys, J. Mogul, H. Frystyk Nielsen, and T. Berners-Lee. Hypertext Transfer Protocol -- HTTP/1.1.. IETF RFC 2068. See http://www.ietf.org/rfc/rfc2068.txt.
RFC2396
T. Berners-Lee, R. Fielding, and L. Masinter. Uniform Resource Identifiers (URI): Generic Syntax. IETF RFC 2396. See http://www.ietf.org/rfc/rfc2396.txt.
XML10
World Wide Web Consortium. Extensible Markup Language (XML) 1.0. W3C Recommendation. See http://www.w3.org/TR/1998/REC-xml-19980210

B Rationale

There was an urgent requirement for a specification for style sheet linking that could be completed in time for the next release from major browser vendors. Only by choosing a simple mechanism closely based on a proven existing mechanism could the specification be completed in time to meet this requirement.

Use of a processing instruction avoids polluting the main document structure with application specific processing information.

The mechanism chosen for this version of the specification is not a constraint on the additional mechanisms planned for future versions. There is no expectation that these will use processing instructions; indeed they may not include the linking information in the source document.

libxml-security-java-1.5.6/src/test/resources/org/w3c/www/TR/2000/0000755000175000017500000000000012273503733023144 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/TR/2000/REC-xml-200010060000644000175000017500000057732407402650471025206 0ustar tonytony Extensible Markup Language (XML) 1.0 (Second Edition)

W3C

Extensible Markup Language (XML) 1.0 (Second Edition)

W3C Recommendation 6 October 2000

This version:
http://www.w3.org/TR/2000/REC-xml-20001006 (XHTML, XML, PDF, XHTML review version with color-coded revision indicators)
Latest version:
http://www.w3.org/TR/REC-xml
Previous versions:
http://www.w3.org/TR/2000/WD-xml-2e-20000814
http://www.w3.org/TR/1998/REC-xml-19980210
Editors:
Tim Bray, Textuality and Netscape <tbray@textuality.com>
Jean Paoli, Microsoft <jeanpa@microsoft.com>
C. M. Sperberg-McQueen, University of Illinois at Chicago and Text Encoding Initiative <cmsmcq@uic.edu>
Eve Maler, Sun Microsystems, Inc. <eve.maler@east.sun.com> - Second Edition

Abstract

The Extensible Markup Language (XML) is a subset of SGML that is completely described in this document. Its goal is to enable generic SGML to be served, received, and processed on the Web in the way that is now possible with HTML. XML has been designed for ease of implementation and for interoperability with both SGML and HTML.

Status of this Document

This document has been reviewed by W3C Members and other interested parties and has been endorsed by the Director as a W3C Recommendation. It is a stable document and may be used as reference material or cited as a normative reference from another document. W3C's role in making the Recommendation is to draw attention to the specification and to promote its widespread deployment. This enhances the functionality and interoperability of the Web.

This document specifies a syntax created by subsetting an existing, widely used international text processing standard (Standard Generalized Markup Language, ISO 8879:1986(E) as amended and corrected) for use on the World Wide Web. It is a product of the W3C XML Activity, details of which can be found at http://www.w3.org/XML. The English version of this specification is the only normative version. However, for translations of this document, see http://www.w3.org/XML/#trans. A list of current W3C Recommendations and other technical documents can be found at http://www.w3.org/TR.

This second edition is not a new version of XML (first published 10 February 1998); it merely incorporates the changes dictated by the first-edition errata (available at http://www.w3.org/XML/xml-19980210-errata) as a convenience to readers. The errata list for this second edition is available at http://www.w3.org/XML/xml-V10-2e-errata.

Please report errors in this document to xml-editor@w3.org; archives are available.

Note:

C. M. Sperberg-McQueen's affiliation has changed since the publication of the first edition. He is now at the World Wide Web Consortium, and can be contacted at cmsmcq@w3.org.

Table of Contents

1 Introduction
    1.1 Origin and Goals
    1.2 Terminology
2 Documents
    2.1 Well-Formed XML Documents
    2.2 Characters
    2.3 Common Syntactic Constructs
    2.4 Character Data and Markup
    2.5 Comments
    2.6 Processing Instructions
    2.7 CDATA Sections
    2.8 Prolog and Document Type Declaration
    2.9 Standalone Document Declaration
    2.10 White Space Handling
    2.11 End-of-Line Handling
    2.12 Language Identification
3 Logical Structures
    3.1 Start-Tags, End-Tags, and Empty-Element Tags
    3.2 Element Type Declarations
        3.2.1 Element Content
        3.2.2 Mixed Content
    3.3 Attribute-List Declarations
        3.3.1 Attribute Types
        3.3.2 Attribute Defaults
        3.3.3 Attribute-Value Normalization
    3.4 Conditional Sections
4 Physical Structures
    4.1 Character and Entity References
    4.2 Entity Declarations
        4.2.1 Internal Entities
        4.2.2 External Entities
    4.3 Parsed Entities
        4.3.1 The Text Declaration
        4.3.2 Well-Formed Parsed Entities
        4.3.3 Character Encoding in Entities
    4.4 XML Processor Treatment of Entities and References
        4.4.1 Not Recognized
        4.4.2 Included
        4.4.3 Included If Validating
        4.4.4 Forbidden
        4.4.5 Included in Literal
        4.4.6 Notify
        4.4.7 Bypassed
        4.4.8 Included as PE
    4.5 Construction of Internal Entity Replacement Text
    4.6 Predefined Entities
    4.7 Notation Declarations
    4.8 Document Entity
5 Conformance
    5.1 Validating and Non-Validating Processors
    5.2 Using XML Processors
6 Notation

Appendices

A References
    A.1 Normative References
    A.2 Other References
B Character Classes
C XML and SGML (Non-Normative)
D Expansion of Entity and Character References (Non-Normative)
E Deterministic Content Models (Non-Normative)
F Autodetection of Character Encodings (Non-Normative)
    F.1 Detection Without External Encoding Information
    F.2 Priorities in the Presence of External Encoding Information
G W3C XML Working Group (Non-Normative)
H W3C XML Core Group (Non-Normative)
I Production Notes (Non-Normative)


1 Introduction

Extensible Markup Language, abbreviated XML, describes a class of data objects called XML documents and partially describes the behavior of computer programs which process them. XML is an application profile or restricted form of SGML, the Standard Generalized Markup Language [ISO 8879]. By construction, XML documents are conforming SGML documents.

XML documents are made up of storage units called entities, which contain either parsed or unparsed data. Parsed data is made up of characters, some of which form character data, and some of which form markup. Markup encodes a description of the document's storage layout and logical structure. XML provides a mechanism to impose constraints on the storage layout and logical structure.

[Definition: A software module called an XML processor is used to read XML documents and provide access to their content and structure.] [Definition: It is assumed that an XML processor is doing its work on behalf of another module, called the application.] This specification describes the required behavior of an XML processor in terms of how it must read XML data and the information it must provide to the application.

1.1 Origin and Goals

XML was developed by an XML Working Group (originally known as the SGML Editorial Review Board) formed under the auspices of the World Wide Web Consortium (W3C) in 1996. It was chaired by Jon Bosak of Sun Microsystems with the active participation of an XML Special Interest Group (previously known as the SGML Working Group) also organized by the W3C. The membership of the XML Working Group is given in an appendix. Dan Connolly served as the WG's contact with the W3C.

The design goals for XML are:

  1. XML shall be straightforwardly usable over the Internet.

  2. XML shall support a wide variety of applications.

  3. XML shall be compatible with SGML.

  4. It shall be easy to write programs which process XML documents.

  5. The number of optional features in XML is to be kept to the absolute minimum, ideally zero.

  6. XML documents should be human-legible and reasonably clear.

  7. The XML design should be prepared quickly.

  8. The design of XML shall be formal and concise.

  9. XML documents shall be easy to create.

  10. Terseness in XML markup is of minimal importance.

This specification, together with associated standards (Unicode and ISO/IEC 10646 for characters, Internet RFC 1766 for language identification tags, ISO 639 for language name codes, and ISO 3166 for country name codes), provides all the information necessary to understand XML Version 1.0 and construct computer programs to process it.

This version of the XML specification may be distributed freely, as long as all text and legal notices remain intact.

1.2 Terminology

The terminology used to describe XML documents is defined in the body of this specification. The terms defined in the following list are used in building those definitions and in describing the actions of an XML processor:

may

[Definition: Conforming documents and XML processors are permitted to but need not behave as described.]

must

[Definition: Conforming documents and XML processors are required to behave as described; otherwise they are in error. ]

error

[Definition: A violation of the rules of this specification; results are undefined. Conforming software may detect and report an error and may recover from it.]

fatal error

[Definition: An error which a conforming XML processor must detect and report to the application. After encountering a fatal error, the processor may continue processing the data to search for further errors and may report such errors to the application. In order to support correction of errors, the processor may make unprocessed data from the document (with intermingled character data and markup) available to the application. Once a fatal error is detected, however, the processor must not continue normal processing (i.e., it must not continue to pass character data and information about the document's logical structure to the application in the normal way).]

at user option

[Definition: Conforming software may or must (depending on the modal verb in the sentence) behave as described; if it does, it must provide users a means to enable or disable the behavior described.]

validity constraint

[Definition: A rule which applies to all valid XML documents. Violations of validity constraints are errors; they must, at user option, be reported by validating XML processors.]

well-formedness constraint

[Definition: A rule which applies to all well-formed XML documents. Violations of well-formedness constraints are fatal errors.]

match

[Definition: (Of strings or names:) Two strings or names being compared must be identical. Characters with multiple possible representations in ISO/IEC 10646 (e.g. characters with both precomposed and base+diacritic forms) match only if they have the same representation in both strings. No case folding is performed. (Of strings and rules in the grammar:) A string matches a grammatical production if it belongs to the language generated by that production. (Of content and content models:) An element matches its declaration when it conforms in the fashion described in the constraint [VC: Element Valid].]

for compatibility

[Definition: Marks a sentence describing a feature of XML included solely to ensure that XML remains compatible with SGML.]

for interoperability

[Definition: Marks a sentence describing a non-binding recommendation included to increase the chances that XML documents can be processed by the existing installed base of SGML processors which predate the WebSGML Adaptations Annex to ISO 8879.]

2 Documents

[Definition: A data object is an XML document if it is well-formed, as defined in this specification. A well-formed XML document may in addition be valid if it meets certain further constraints.]

Each XML document has both a logical and a physical structure. Physically, the document is composed of units called entities. An entity may refer to other entities to cause their inclusion in the document. A document begins in a "root" or document entity. Logically, the document is composed of declarations, elements, comments, character references, and processing instructions, all of which are indicated in the document by explicit markup. The logical and physical structures must nest properly, as described in 4.3.2 Well-Formed Parsed Entities.

2.1 Well-Formed XML Documents

[Definition: A textual object is a well-formed XML document if:]

  1. Taken as a whole, it matches the production labeled document.

  2. It meets all the well-formedness constraints given in this specification.

  3. Each of the parsed entities which is referenced directly or indirectly within the document is well-formed.

Document
[1]    document    ::=    prolog element Misc*

Matching the document production implies that:

  1. It contains one or more elements.

  2. [Definition: There is exactly one element, called the root, or document element, no part of which appears in the content of any other element.] For all other elements, if the start-tag is in the content of another element, the end-tag is in the content of the same element. More simply stated, the elements, delimited by start- and end-tags, nest properly within each other.

[Definition: As a consequence of this, for each non-root element C in the document, there is one other element P in the document such that C is in the content of P, but is not in the content of any other element that is in the content of P. P is referred to as the parent of C, and C as a child of P.]

2.2 Characters

[Definition: A parsed entity contains text, a sequence of characters, which may represent markup or character data.] [Definition: A character is an atomic unit of text as specified by ISO/IEC 10646 [ISO/IEC 10646] (see also [ISO/IEC 10646-2000]). Legal characters are tab, carriage return, line feed, and the legal characters of Unicode and ISO/IEC 10646. The versions of these standards cited in A.1 Normative References were current at the time this document was prepared. New characters may be added to these standards by amendments or new editions. Consequently, XML processors must accept any character in the range specified for Char. The use of "compatibility characters", as defined in section 6.8 of [Unicode] (see also D21 in section 3.6 of [Unicode3]), is discouraged.]

Character Range
[2]    Char    ::=    #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] /* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */

The mechanism for encoding character code points into bit patterns may vary from entity to entity. All XML processors must accept the UTF-8 and UTF-16 encodings of 10646; the mechanisms for signaling which of the two is in use, or for bringing other encodings into play, are discussed later, in 4.3.3 Character Encoding in Entities.

2.3 Common Syntactic Constructs

This section defines some symbols used widely in the grammar.

S (white space) consists of one or more space (#x20) characters, carriage returns, line feeds, or tabs.

White Space
[3]    S    ::=    (#x20 | #x9 | #xD | #xA)+

Characters are classified for convenience as letters, digits, or other characters. A letter consists of an alphabetic or syllabic base character or an ideographic character. Full definitions of the specific characters in each class are given in B Character Classes.

[Definition: A Name is a token beginning with a letter or one of a few punctuation characters, and continuing with letters, digits, hyphens, underscores, colons, or full stops, together known as name characters.] Names beginning with the string "xml", or any string which would match (('X'|'x') ('M'|'m') ('L'|'l')), are reserved for standardization in this or future versions of this specification.

Note:

The Namespaces in XML Recommendation [XML Names] assigns a meaning to names containing colon characters. Therefore, authors should not use the colon in XML names except for namespace purposes, but XML processors must accept the colon as a name character.

An Nmtoken (name token) is any mixture of name characters.

Names and Tokens
[4]    NameChar    ::=    Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender
[5]    Name    ::=    (Letter | '_' | ':') (NameChar)*
[6]    Names    ::=    Name (S Name)*
[7]    Nmtoken    ::=    (NameChar)+
[8]    Nmtokens    ::=    Nmtoken (S Nmtoken)*

Literal data is any quoted string not containing the quotation mark used as a delimiter for that string. Literals are used for specifying the content of internal entities (EntityValue), the values of attributes (AttValue), and external identifiers (SystemLiteral). Note that a SystemLiteral can be parsed without scanning for markup.

Literals
[9]    EntityValue    ::=    '"' ([^%&"] | PEReference | Reference)* '"'
|  "'" ([^%&'] | PEReference | Reference)* "'"
[10]    AttValue    ::=    '"' ([^<&"] | Reference)* '"'
|  "'" ([^<&'] | Reference)* "'"
[11]    SystemLiteral    ::=    ('"' [^"]* '"') | ("'" [^']* "'")
[12]    PubidLiteral    ::=    '"' PubidChar* '"' | "'" (PubidChar - "'")* "'"
[13]    PubidChar    ::=    #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]

Note:

Although the EntityValue production allows the definition of an entity consisting of a single explicit < in the literal (e.g., <!ENTITY mylt "<">), it is strongly advised to avoid this practice since any reference to that entity will cause a well-formedness error.

2.4 Character Data and Markup

Text consists of intermingled character data and markup. [Definition: Markup takes the form of start-tags, end-tags, empty-element tags, entity references, character references, comments, CDATA section delimiters, document type declarations, processing instructions, XML declarations, text declarations, and any white space that is at the top level of the document entity (that is, outside the document element and not inside any other markup).]

[Definition: All text that is not markup constitutes the character data of the document.]

The ampersand character (&) and the left angle bracket (<) may appear in their literal form only when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section. If they are needed elsewhere, they must be escaped using either numeric character references or the strings "&amp;" and "&lt;" respectively. The right angle bracket (>) may be represented using the string "&gt;", and must, for compatibility, be escaped using "&gt;" or a character reference when it appears in the string "]]>" in content, when that string is not marking the end of a CDATA section.

In the content of elements, character data is any string of characters which does not contain the start-delimiter of any markup. In a CDATA section, character data is any string of characters not including the CDATA-section-close delimiter, "]]>".

To allow attribute values to contain both single and double quotes, the apostrophe or single-quote character (') may be represented as "&apos;", and the double-quote character (") as "&quot;".

Character Data
[14]    CharData    ::=    [^<&]* - ([^<&]* ']]>' [^<&]*)

2.5 Comments

[Definition: Comments may appear anywhere in a document outside other markup; in addition, they may appear within the document type declaration at places allowed by the grammar. They are not part of the document's character data; an XML processor may, but need not, make it possible for an application to retrieve the text of comments. For compatibility, the string "--" (double-hyphen) must not occur within comments.] Parameter entity references are not recognized within comments.

Comments
[15]    Comment    ::=    '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'

An example of a comment:

<!-- declarations for <head> & <body> -->

Note that the grammar does not allow a comment ending in --->. The following example is not well-formed.

<!-- B+, B, or B--->

2.6 Processing Instructions

[Definition: Processing instructions (PIs) allow documents to contain instructions for applications.]

Processing Instructions
[16]    PI    ::=    '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
[17]    PITarget    ::=    Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))

PIs are not part of the document's character data, but must be passed through to the application. The PI begins with a target (PITarget) used to identify the application to which the instruction is directed. The target names "XML", "xml", and so on are reserved for standardization in this or future versions of this specification. The XML Notation mechanism may be used for formal declaration of PI targets. Parameter entity references are not recognized within processing instructions.

2.7 CDATA Sections

[Definition: CDATA sections may occur anywhere character data may occur; they are used to escape blocks of text containing characters which would otherwise be recognized as markup. CDATA sections begin with the string "<![CDATA[" and end with the string "]]>":]

CDATA Sections
[18]    CDSect    ::=    CDStart CData CDEnd
[19]    CDStart    ::=    '<![CDATA['
[20]    CData    ::=    (Char* - (Char* ']]>' Char*))
[21]    CDEnd    ::=    ']]>'

Within a CDATA section, only the CDEnd string is recognized as markup, so that left angle brackets and ampersands may occur in their literal form; they need not (and cannot) be escaped using "&lt;" and "&amp;". CDATA sections cannot nest.

An example of a CDATA section, in which "<greeting>" and "</greeting>" are recognized as character data, not markup:

<![CDATA[<greeting>Hello, world!</greeting>]]> 

2.8 Prolog and Document Type Declaration

[Definition: XML documents should begin with an XML declaration which specifies the version of XML being used.] For example, the following is a complete XML document, well-formed but not valid:

<?xml version="1.0"?> <greeting>Hello, world!</greeting> 

and so is this:

<greeting>Hello, world!</greeting>

The version number "1.0" should be used to indicate conformance to this version of this specification; it is an error for a document to use the value "1.0" if it does not conform to this version of this specification. It is the intent of the XML working group to give later versions of this specification numbers other than "1.0", but this intent does not indicate a commitment to produce any future versions of XML, nor if any are produced, to use any particular numbering scheme. Since future versions are not ruled out, this construct is provided as a means to allow the possibility of automatic version recognition, should it become necessary. Processors may signal an error if they receive documents labeled with versions they do not support.

The function of the markup in an XML document is to describe its storage and logical structure and to associate attribute-value pairs with its logical structures. XML provides a mechanism, the document type declaration, to define constraints on the logical structure and to support the use of predefined storage units. [Definition: An XML document is valid if it has an associated document type declaration and if the document complies with the constraints expressed in it.]

The document type declaration must appear before the first element in the document.

Prolog
[22]    prolog    ::=    XMLDecl? Misc* (doctypedecl Misc*)?
[23]    XMLDecl    ::=    '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'
[24]    VersionInfo    ::=    S 'version' Eq ("'" VersionNum "'" | '"' VersionNum '"')/* */
[25]    Eq    ::=    S? '=' S?
[26]    VersionNum    ::=    ([a-zA-Z0-9_.:] | '-')+
[27]    Misc    ::=    Comment | PI | S

[Definition: The XML document type declaration contains or points to markup declarations that provide a grammar for a class of documents. This grammar is known as a document type definition, or DTD. The document type declaration can point to an external subset (a special kind of external entity) containing markup declarations, or can contain the markup declarations directly in an internal subset, or can do both. The DTD for a document consists of both subsets taken together.]

[Definition: A markup declaration is an element type declaration, an attribute-list declaration, an entity declaration, or a notation declaration.] These declarations may be contained in whole or in part within parameter entities, as described in the well-formedness and validity constraints below. For further information, see 4 Physical Structures.

Document Type Definition
[28]    doctypedecl    ::=    '<!DOCTYPE' S Name (S ExternalID)? S? ('[' (markupdecl | DeclSep)* ']' S?)? '>' [VC: Root Element Type]
[WFC: External Subset]
/* */
[28a]    DeclSep    ::=    PEReference | S [WFC: PE Between Declarations]
/* */
[29]    markupdecl    ::=    elementdecl | AttlistDecl | EntityDecl | NotationDecl | PI | Comment [VC: Proper Declaration/PE Nesting]
[WFC: PEs in Internal Subset]

Note that it is possible to construct a well-formed document containing a doctypedecl that neither points to an external subset nor contains an internal subset.

The markup declarations may be made up in whole or in part of the replacement text of parameter entities. The productions later in this specification for individual nonterminals (elementdecl, AttlistDecl, and so on) describe the declarations after all the parameter entities have been included.

Parameter entity references are recognized anywhere in the DTD (internal and external subsets and external parameter entities), except in literals, processing instructions, comments, and the contents of ignored conditional sections (see 3.4 Conditional Sections). They are also recognized in entity value literals. The use of parameter entities in the internal subset is restricted as described below.

Validity constraint: Root Element Type

The Name in the document type declaration must match the element type of the root element.

Validity constraint: Proper Declaration/PE Nesting

Parameter-entity replacement text must be properly nested with markup declarations. That is to say, if either the first character or the last character of a markup declaration (markupdecl above) is contained in the replacement text for a parameter-entity reference, both must be contained in the same replacement text.

Well-formedness constraint: PEs in Internal Subset

In the internal DTD subset, parameter-entity references can occur only where markup declarations can occur, not within markup declarations. (This does not apply to references that occur in external parameter entities or to the external subset.)

Well-formedness constraint: External Subset

The external subset, if any, must match the production for extSubset.

Well-formedness constraint: PE Between Declarations

The replacement text of a parameter entity reference in a DeclSep must match the production extSubsetDecl.

Like the internal subset, the external subset and any external parameter entities referenced in a DeclSep must consist of a series of complete markup declarations of the types allowed by the non-terminal symbol markupdecl, interspersed with white space or parameter-entity references. However, portions of the contents of the external subset or of these external parameter entities may conditionally be ignored by using the conditional section construct; this is not allowed in the internal subset.

External Subset
[30]    extSubset    ::=    TextDecl? extSubsetDecl
[31]    extSubsetDecl    ::=    ( markupdecl | conditionalSect | DeclSep)* /* */

The external subset and external parameter entities also differ from the internal subset in that in them, parameter-entity references are permitted within markup declarations, not only between markup declarations.

An example of an XML document with a document type declaration:

<?xml version="1.0"?> <!DOCTYPE greeting SYSTEM "hello.dtd"> <greeting>Hello, world!</greeting> 

The system identifier "hello.dtd" gives the address (a URI reference) of a DTD for the document.

The declarations can also be given locally, as in this example:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE greeting [
  <!ELEMENT greeting (#PCDATA)>
]>
<greeting>Hello, world!</greeting>

If both the external and internal subsets are used, the internal subset is considered to occur before the external subset. This has the effect that entity and attribute-list declarations in the internal subset take precedence over those in the external subset.

2.9 Standalone Document Declaration

Markup declarations can affect the content of the document, as passed from an XML processor to an application; examples are attribute defaults and entity declarations. The standalone document declaration, which may appear as a component of the XML declaration, signals whether or not there are such declarations which appear external to the document entity or in parameter entities. [Definition: An external markup declaration is defined as a markup declaration occurring in the external subset or in a parameter entity (external or internal, the latter being included because non-validating processors are not required to read them).]

Standalone Document Declaration
[32]    SDDecl    ::=    S 'standalone' Eq (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"')) [VC: Standalone Document Declaration]

In a standalone document declaration, the value "yes" indicates that there are no external markup declarations which affect the information passed from the XML processor to the application. The value "no" indicates that there are or may be such external markup declarations. Note that the standalone document declaration only denotes the presence of external declarations; the presence, in a document, of references to external entities, when those entities are internally declared, does not change its standalone status.

If there are no external markup declarations, the standalone document declaration has no meaning. If there are external markup declarations but there is no standalone document declaration, the value "no" is assumed.

Any XML document for which standalone="no" holds can be converted algorithmically to a standalone document, which may be desirable for some network delivery applications.

Validity constraint: Standalone Document Declaration

The standalone document declaration must have the value "no" if any external markup declarations contain declarations of:

  • attributes with default values, if elements to which these attributes apply appear in the document without specifications of values for these attributes, or

  • entities (other than amp, lt, gt, apos, quot), if references to those entities appear in the document, or

  • attributes with values subject to normalization, where the attribute appears in the document with a value which will change as a result of normalization, or

  • element types with element content, if white space occurs directly within any instance of those types.

An example XML declaration with a standalone document declaration:

<?xml version="1.0" standalone='yes'?>

2.10 White Space Handling

In editing XML documents, it is often convenient to use "white space" (spaces, tabs, and blank lines) to set apart the markup for greater readability. Such white space is typically not intended for inclusion in the delivered version of the document. On the other hand, "significant" white space that should be preserved in the delivered version is common, for example in poetry and source code.

An XML processor must always pass all characters in a document that are not markup through to the application. A validating XML processor must also inform the application which of these characters constitute white space appearing in element content.

A special attribute named xml:space may be attached to an element to signal an intention that in that element, white space should be preserved by applications. In valid documents, this attribute, like any other, must be declared if it is used. When declared, it must be given as an enumerated type whose values are one or both of "default" and "preserve". For example:

<!ATTLIST poem  xml:space (default|preserve) 'preserve'>

<!-- -->
<!ATTLIST pre xml:space (preserve) #FIXED 'preserve'>

The value "default" signals that applications' default white-space processing modes are acceptable for this element; the value "preserve" indicates the intent that applications preserve all the white space. This declared intent is considered to apply to all elements within the content of the element where it is specified, unless overriden with another instance of the xml:space attribute.

The root element of any document is considered to have signaled no intentions as regards application space handling, unless it provides a value for this attribute or the attribute is declared with a default value.

2.11 End-of-Line Handling

XML parsed entities are often stored in computer files which, for editing convenience, are organized into lines. These lines are typically separated by some combination of the characters carriage-return (#xD) and line-feed (#xA).

To simplify the tasks of applications, the characters passed to an application by the XML processor must be as if the XML processor normalized all line breaks in external parsed entities (including the document entity) on input, before parsing, by translating both the two-character sequence #xD #xA and any #xD that is not followed by #xA to a single #xA character.

2.12 Language Identification

In document processing, it is often useful to identify the natural or formal language in which the content is written. A special attribute named xml:lang may be inserted in documents to specify the language used in the contents and attribute values of any element in an XML document. In valid documents, this attribute, like any other, must be declared if it is used. The values of the attribute are language identifiers as defined by [IETF RFC 1766], Tags for the Identification of Languages, or its successor on the IETF Standards Track.

Note:

[IETF RFC 1766] tags are constructed from two-letter language codes as defined by [ISO 639], from two-letter country codes as defined by [ISO 3166], or from language identifiers registered with the Internet Assigned Numbers Authority [IANA-LANGCODES]. It is expected that the successor to [IETF RFC 1766] will introduce three-letter language codes for languages not presently covered by [ISO 639].

(Productions 33 through 38 have been removed.)

For example:

<p xml:lang="en">The quick brown fox jumps over the lazy dog.</p>
<p xml:lang="en-GB">What colour is it?</p>
<p xml:lang="en-US">What color is it?</p>
<sp who="Faust" desc='leise' xml:lang="de">
  <l>Habe nun, ach! Philosophie,</l>
  <l>Juristerei, und Medizin</l>
  <l>und leider auch Theologie</l>
  <l>durchaus studiert mit heißem Bemüh'n.</l>
</sp>

The intent declared with xml:lang is considered to apply to all attributes and content of the element where it is specified, unless overridden with an instance of xml:lang on another element within that content.

A simple declaration for xml:lang might take the form

xml:lang NMTOKEN #IMPLIED

but specific default values may also be given, if appropriate. In a collection of French poems for English students, with glosses and notes in English, the xml:lang attribute might be declared this way:

<!ATTLIST poem   xml:lang NMTOKEN 'fr'>
<!ATTLIST gloss  xml:lang NMTOKEN 'en'>
<!ATTLIST note   xml:lang NMTOKEN 'en'>

3 Logical Structures

[Definition: Each XML document contains one or more elements, the boundaries of which are either delimited by start-tags and end-tags, or, for empty elements, by an empty-element tag. Each element has a type, identified by name, sometimes called its "generic identifier" (GI), and may have a set of attribute specifications.] Each attribute specification has a name and a value.

Element
[39]    element    ::=    EmptyElemTag
| STag content ETag [WFC: Element Type Match]
[VC: Element Valid]

This specification does not constrain the semantics, use, or (beyond syntax) names of the element types and attributes, except that names beginning with a match to (('X'|'x')('M'|'m')('L'|'l')) are reserved for standardization in this or future versions of this specification.

Well-formedness constraint: Element Type Match

The Name in an element's end-tag must match the element type in the start-tag.

Validity constraint: Element Valid

An element is valid if there is a declaration matching elementdecl where the Name matches the element type, and one of the following holds:

  1. The declaration matches EMPTY and the element has no content.

  2. The declaration matches children and the sequence of child elements belongs to the language generated by the regular expression in the content model, with optional white space (characters matching the nonterminal S) between the start-tag and the first child element, between child elements, or between the last child element and the end-tag. Note that a CDATA section containing only white space does not match the nonterminal S, and hence cannot appear in these positions.

  3. The declaration matches Mixed and the content consists of character data and child elements whose types match names in the content model.

  4. The declaration matches ANY, and the types of any child elements have been declared.

3.1 Start-Tags, End-Tags, and Empty-Element Tags

[Definition: The beginning of every non-empty XML element is marked by a start-tag.]

Start-tag
[40]    STag    ::=    '<' Name (S Attribute)* S? '>' [WFC: Unique Att Spec]
[41]    Attribute    ::=    Name Eq AttValue [VC: Attribute Value Type]
[WFC: No External Entity References]
[WFC: No < in Attribute Values]

The Name in the start- and end-tags gives the element's type. [Definition: The Name-AttValue pairs are referred to as the attribute specifications of the element], [Definition: with the Name in each pair referred to as the attribute name] and [Definition: the content of the AttValue (the text between the ' or " delimiters) as the attribute value.]Note that the order of attribute specifications in a start-tag or empty-element tag is not significant.

Well-formedness constraint: Unique Att Spec

No attribute name may appear more than once in the same start-tag or empty-element tag.

Validity constraint: Attribute Value Type

The attribute must have been declared; the value must be of the type declared for it. (For attribute types, see 3.3 Attribute-List Declarations.)

Well-formedness constraint: No External Entity References

Attribute values cannot contain direct or indirect entity references to external entities.

Well-formedness constraint: No < in Attribute Values

The replacement text of any entity referred to directly or indirectly in an attribute value must not contain a <.

An example of a start-tag:

<termdef id="dt-dog" term="dog">

[Definition: The end of every element that begins with a start-tag must be marked by an end-tag containing a name that echoes the element's type as given in the start-tag:]

End-tag
[42]    ETag    ::=    '</' Name S? '>'

An example of an end-tag:

</termdef>

[Definition: The text between the start-tag and end-tag is called the element's content:]

Content of Elements
[43]    content    ::=    CharData? ((element | Reference | CDSect | PI | Comment) CharData?)* /* */

[Definition: An element with no content is said to be empty.] The representation of an empty element is either a start-tag immediately followed by an end-tag, or an empty-element tag. [Definition: An empty-element tag takes a special form:]

Tags for Empty Elements
[44]    EmptyElemTag    ::=    '<' Name (S Attribute)* S? '/>' [WFC: Unique Att Spec]

Empty-element tags may be used for any element which has no content, whether or not it is declared using the keyword EMPTY. For interoperability, the empty-element tag should be used, and should only be used, for elements which are declared EMPTY.

Examples of empty elements:

<IMG align="left"
 src="http://www.w3.org/Icons/WWW/w3c_home" />
<br></br>
<br/>

3.2 Element Type Declarations

The element structure of an XML document may, for validation purposes, be constrained using element type and attribute-list declarations. An element type declaration constrains the element's content.

Element type declarations often constrain which element types can appear as children of the element. At user option, an XML processor may issue a warning when a declaration mentions an element type for which no declaration is provided, but this is not an error.

[Definition: An element type declaration takes the form:]

Element Type Declaration
[45]    elementdecl    ::=    '<!ELEMENT' S Name S contentspec S? '>' [VC: Unique Element Type Declaration]
[46]    contentspec    ::=    'EMPTY' | 'ANY' | Mixed | children

where the Name gives the element type being declared.

Validity constraint: Unique Element Type Declaration

No element type may be declared more than once.

Examples of element type declarations:

<!ELEMENT br EMPTY>
<!ELEMENT p (#PCDATA|emph)* >
<!ELEMENT %name.para; %content.para; >
<!ELEMENT container ANY>

3.2.1 Element Content

[Definition: An element type has element content when elements of that type must contain only child elements (no character data), optionally separated by white space (characters matching the nonterminal S).][Definition: In this case, the constraint includes a content model, a simple grammar governing the allowed types of the child elements and the order in which they are allowed to appear.] The grammar is built on content particles (cps), which consist of names, choice lists of content particles, or sequence lists of content particles:

Element-content Models
[47]    children    ::=    (choice | seq) ('?' | '*' | '+')?
[48]    cp    ::=    (Name | choice | seq) ('?' | '*' | '+')?
[49]    choice    ::=    '(' S? cp ( S? '|' S? cp )+ S? ')' /* */
/* */
[VC: Proper Group/PE Nesting]
[50]    seq    ::=    '(' S? cp ( S? ',' S? cp )* S? ')' /* */
[VC: Proper Group/PE Nesting]

where each Name is the type of an element which may appear as a child. Any content particle in a choice list may appear in the element content at the location where the choice list appears in the grammar; content particles occurring in a sequence list must each appear in the element content in the order given in the list. The optional character following a name or list governs whether the element or the content particles in the list may occur one or more (+), zero or more (*), or zero or one times (?). The absence of such an operator means that the element or content particle must appear exactly once. This syntax and meaning are identical to those used in the productions in this specification.

The content of an element matches a content model if and only if it is possible to trace out a path through the content model, obeying the sequence, choice, and repetition operators and matching each element in the content against an element type in the content model. For compatibility, it is an error if an element in the document can match more than one occurrence of an element type in the content model. For more information, see E Deterministic Content Models.

Validity constraint: Proper Group/PE Nesting

Parameter-entity replacement text must be properly nested with parenthesized groups. That is to say, if either of the opening or closing parentheses in a choice, seq, or Mixed construct is contained in the replacement text for a parameter entity, both must be contained in the same replacement text.

For interoperability, if a parameter-entity reference appears in a choice, seq, or Mixed construct, its replacement text should contain at least one non-blank character, and neither the first nor last non-blank character of the replacement text should be a connector (| or ,).

Examples of element-content models:

<!ELEMENT spec (front, body, back?)>
<!ELEMENT div1 (head, (p | list | note)*, div2*)>
<!ELEMENT dictionary-body (%div.mix; | %dict.mix;)*>

3.2.2 Mixed Content

[Definition: An element type has mixed content when elements of that type may contain character data, optionally interspersed with child elements.] In this case, the types of the child elements may be constrained, but not their order or their number of occurrences:

Mixed-content Declaration
[51]    Mixed    ::=    '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*'
| '(' S? '#PCDATA' S? ')' [VC: Proper Group/PE Nesting]
[VC: No Duplicate Types]

where the Names give the types of elements that may appear as children. The keyword #PCDATA derives historically from the term "parsed character data."

Validity constraint: No Duplicate Types

The same name must not appear more than once in a single mixed-content declaration.

Examples of mixed content declarations:

<!ELEMENT p (#PCDATA|a|ul|b|i|em)*>
<!ELEMENT p (#PCDATA | %font; | %phrase; | %special; | %form;)* >
<!ELEMENT b (#PCDATA)>

3.3 Attribute-List Declarations

Attributes are used to associate name-value pairs with elements. Attribute specifications may appear only within start-tags and empty-element tags; thus, the productions used to recognize them appear in 3.1 Start-Tags, End-Tags, and Empty-Element Tags. Attribute-list declarations may be used:

  • To define the set of attributes pertaining to a given element type.

  • To establish type constraints for these attributes.

  • To provide default values for attributes.

[Definition: Attribute-list declarations specify the name, data type, and default value (if any) of each attribute associated with a given element type:]

Attribute-list Declaration
[52]    AttlistDecl    ::=    '<!ATTLIST' S Name AttDef* S? '>'
[53]    AttDef    ::=    S Name S AttType S DefaultDecl

The Name in the AttlistDecl rule is the type of an element. At user option, an XML processor may issue a warning if attributes are declared for an element type not itself declared, but this is not an error. The Name in the AttDef rule is the name of the attribute.

When more than one AttlistDecl is provided for a given element type, the contents of all those provided are merged. When more than one definition is provided for the same attribute of a given element type, the first declaration is binding and later declarations are ignored. For interoperability, writers of DTDs may choose to provide at most one attribute-list declaration for a given element type, at most one attribute definition for a given attribute name in an attribute-list declaration, and at least one attribute definition in each attribute-list declaration. For interoperability, an XML processor may at user option issue a warning when more than one attribute-list declaration is provided for a given element type, or more than one attribute definition is provided for a given attribute, but this is not an error.

3.3.1 Attribute Types

XML attribute types are of three kinds: a string type, a set of tokenized types, and enumerated types. The string type may take any literal string as a value; the tokenized types have varying lexical and semantic constraints. The validity constraints noted in the grammar are applied after the attribute value has been normalized as described in 3.3 Attribute-List Declarations.

Attribute Types
[54]    AttType    ::=    StringType | TokenizedType | EnumeratedType
[55]    StringType    ::=    'CDATA'
[56]    TokenizedType    ::=    'ID' [VC: ID]
[VC: One ID per Element Type]
[VC: ID Attribute Default]
| 'IDREF' [VC: IDREF]
| 'IDREFS' [VC: IDREF]
| 'ENTITY' [VC: Entity Name]
| 'ENTITIES' [VC: Entity Name]
| 'NMTOKEN' [VC: Name Token]
| 'NMTOKENS' [VC: Name Token]

Validity constraint: ID

Values of type ID must match the Name production. A name must not appear more than once in an XML document as a value of this type; i.e., ID values must uniquely identify the elements which bear them.

Validity constraint: One ID per Element Type

No element type may have more than one ID attribute specified.

Validity constraint: ID Attribute Default

An ID attribute must have a declared default of #IMPLIED or #REQUIRED.

Validity constraint: IDREF

Values of type IDREF must match the Name production, and values of type IDREFS must match Names; each Name must match the value of an ID attribute on some element in the XML document; i.e. IDREF values must match the value of some ID attribute.

Validity constraint: Entity Name

Values of type ENTITY must match the Name production, values of type ENTITIES must match Names; each Name must match the name of an unparsed entity declared in the DTD.

Validity constraint: Name Token

Values of type NMTOKEN must match the Nmtoken production; values of type NMTOKENS must match Nmtokens.

[Definition: Enumerated attributes can take one of a list of values provided in the declaration]. There are two kinds of enumerated types:

Enumerated Attribute Types
[57]    EnumeratedType    ::=    NotationType | Enumeration
[58]    NotationType    ::=    'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')' [VC: Notation Attributes]
[VC: One Notation Per Element Type]
[VC: No Notation on Empty Element]
[59]    Enumeration    ::=    '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')' [VC: Enumeration]

A NOTATION attribute identifies a notation, declared in the DTD with associated system and/or public identifiers, to be used in interpreting the element to which the attribute is attached.

Validity constraint: Notation Attributes

Values of this type must match one of the notation names included in the declaration; all notation names in the declaration must be declared.

Validity constraint: One Notation Per Element Type

No element type may have more than one NOTATION attribute specified.

Validity constraint: No Notation on Empty Element

For compatibility, an attribute of type NOTATION must not be declared on an element declared EMPTY.

Validity constraint: Enumeration

Values of this type must match one of the Nmtoken tokens in the declaration.

For interoperability, the same Nmtoken should not occur more than once in the enumerated attribute types of a single element type.

3.3.2 Attribute Defaults

An attribute declaration provides information on whether the attribute's presence is required, and if not, how an XML processor should react if a declared attribute is absent in a document.

Attribute Defaults
[60]    DefaultDecl    ::=    '#REQUIRED' | '#IMPLIED'
| (('#FIXED' S)? AttValue) [VC: Required Attribute]
[VC: Attribute Default Legal]
[WFC: No < in Attribute Values]
[VC: Fixed Attribute Default]

In an attribute declaration, #REQUIRED means that the attribute must always be provided, #IMPLIED that no default value is provided. [Definition: If the declaration is neither #REQUIRED nor #IMPLIED, then the AttValue value contains the declared default value; the #FIXED keyword states that the attribute must always have the default value. If a default value is declared, when an XML processor encounters an omitted attribute, it is to behave as though the attribute were present with the declared default value.]

Validity constraint: Required Attribute

If the default declaration is the keyword #REQUIRED, then the attribute must be specified for all elements of the type in the attribute-list declaration.

Validity constraint: Attribute Default Legal

The declared default value must meet the lexical constraints of the declared attribute type.

Validity constraint: Fixed Attribute Default

If an attribute has a default value declared with the #FIXED keyword, instances of that attribute must match the default value.

Examples of attribute-list declarations:

<!ATTLIST termdef
          id      ID      #REQUIRED
          name    CDATA   #IMPLIED>
<!ATTLIST list
          type    (bullets|ordered|glossary)  "ordered">
<!ATTLIST form
          method  CDATA   #FIXED "POST">

3.3.3 Attribute-Value Normalization

Before the value of an attribute is passed to the application or checked for validity, the XML processor must normalize the attribute value by applying the algorithm below, or by using some other method such that the value passed to the application is the same as that produced by the algorithm.

  1. All line breaks must have been normalized on input to #xA as described in 2.11 End-of-Line Handling, so the rest of this algorithm operates on text normalized in this way.

  2. Begin with a normalized value consisting of the empty string.

  3. For each character, entity reference, or character reference in the unnormalized attribute value, beginning with the first and continuing to the last, do the following:

    • For a character reference, append the referenced character to the normalized value.

    • For an entity reference, recursively apply step 3 of this algorithm to the replacement text of the entity.

    • For a white space character (#x20, #xD, #xA, #x9), append a space character (#x20) to the normalized value.

    • For another character, append the character to the normalized value.

If the attribute type is not CDATA, then the XML processor must further process the normalized attribute value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) characters by a single space (#x20) character.

Note that if the unnormalized attribute value contains a character reference to a white space character other than space (#x20), the normalized value contains the referenced character itself (#xD, #xA or #x9). This contrasts with the case where the unnormalized value contains a white space character (not a reference), which is replaced with a space character (#x20) in the normalized value and also contrasts with the case where the unnormalized value contains an entity reference whose replacement text contains a white space character; being recursively processed, the white space character is replaced with a space character (#x20) in the normalized value.

All attributes for which no declaration has been read should be treated by a non-validating processor as if declared CDATA.

Following are examples of attribute normalization. Given the following declarations:

<!ENTITY d "&#xD;">
<!ENTITY a "&#xA;">
<!ENTITY da "&#xD;&#xA;">

the attribute specifications in the left column below would be normalized to the character sequences of the middle column if the attribute a is declared NMTOKENS and to those of the right columns if a is declared CDATA.

Attribute specification a is NMTOKENS a is CDATA
a="

xyz"
x y z #x20 #x20 x y z
a="&d;&d;A&a;&a;B&da;"
A #x20 B #x20 #x20 A #x20 #x20 B #x20 #x20
a=
"&#xd;&#xd;A&#xa;&#xa;B&#xd;&#xa;"
#xD #xD A #xA #xA B #xD #xA #xD #xD A #xA #xA B #xD #xD

Note that the last example is invalid (but well-formed) if a is declared to be of type NMTOKENS.

3.4 Conditional Sections

[Definition: Conditional sections are portions of the document type declaration external subset which are included in, or excluded from, the logical structure of the DTD based on the keyword which governs them.]

Conditional Section
[61]    conditionalSect    ::=    includeSect | ignoreSect
[62]    includeSect    ::=    '<![' S? 'INCLUDE' S? '[' extSubsetDecl ']]>' /* */
[VC: Proper Conditional Section/PE Nesting]
[63]    ignoreSect    ::=    '<![' S? 'IGNORE' S? '[' ignoreSectContents* ']]>' /* */
[VC: Proper Conditional Section/PE Nesting]
[64]    ignoreSectContents    ::=    Ignore ('<![' ignoreSectContents ']]>' Ignore)*
[65]    Ignore    ::=    Char* - (Char* ('<![' | ']]>') Char*)

Validity constraint: Proper Conditional Section/PE Nesting

If any of the "<![", "[", or "]]>" of a conditional section is contained in the replacement text for a parameter-entity reference, all of them must be contained in the same replacement text.

Like the internal and external DTD subsets, a conditional section may contain one or more complete declarations, comments, processing instructions, or nested conditional sections, intermingled with white space.

If the keyword of the conditional section is INCLUDE, then the contents of the conditional section are part of the DTD. If the keyword of the conditional section is IGNORE, then the contents of the conditional section are not logically part of the DTD. If a conditional section with a keyword of INCLUDE occurs within a larger conditional section with a keyword of IGNORE, both the outer and the inner conditional sections are ignored. The contents of an ignored conditional section are parsed by ignoring all characters after the "[" following the keyword, except conditional section starts "<![" and ends "]]>", until the matching conditional section end is found. Parameter entity references are not recognized in this process.

If the keyword of the conditional section is a parameter-entity reference, the parameter entity must be replaced by its content before the processor decides whether to include or ignore the conditional section.

An example:

<!ENTITY % draft 'INCLUDE' >
<!ENTITY % final 'IGNORE' >

<![%draft;[
<!ELEMENT book (comments*, title, body, supplements?)>
]]>
<![%final;[
<!ELEMENT book (title, body, supplements?)>
]]>

4 Physical Structures

[Definition: An XML document may consist of one or many storage units. These are called entities; they all have content and are all (except for the document entity and the external DTD subset) identified by entity name.] Each XML document has one entity called the document entity, which serves as the starting point for the XML processor and may contain the whole document.

Entities may be either parsed or unparsed. [Definition: A parsed entity's contents are referred to as its replacement text; this text is considered an integral part of the document.]

[Definition: An unparsed entity is a resource whose contents may or may not be text, and if text, may be other than XML. Each unparsed entity has an associated notation, identified by name. Beyond a requirement that an XML processor make the identifiers for the entity and notation available to the application, XML places no constraints on the contents of unparsed entities.]

Parsed entities are invoked by name using entity references; unparsed entities by name, given in the value of ENTITY or ENTITIES attributes.

[Definition: General entities are entities for use within the document content. In this specification, general entities are sometimes referred to with the unqualified term entity when this leads to no ambiguity.] [Definition: Parameter entities are parsed entities for use within the DTD.] These two types of entities use different forms of reference and are recognized in different contexts. Furthermore, they occupy different namespaces; a parameter entity and a general entity with the same name are two distinct entities.

4.1 Character and Entity References

[Definition: A character reference refers to a specific character in the ISO/IEC 10646 character set, for example one not directly accessible from available input devices.]

Character Reference
[66]    CharRef    ::=    '&#' [0-9]+ ';'
| '&#x' [0-9a-fA-F]+ ';' [WFC: Legal Character]

Well-formedness constraint: Legal Character

Characters referred to using character references must match the production for Char.

If the character reference begins with "&#x", the digits and letters up to the terminating ; provide a hexadecimal representation of the character's code point in ISO/IEC 10646. If it begins just with "&#", the digits up to the terminating ; provide a decimal representation of the character's code point.

[Definition: An entity reference refers to the content of a named entity.] [Definition: References to parsed general entities use ampersand (&) and semicolon (;) as delimiters.] [Definition: Parameter-entity references use percent-sign (%) and semicolon (;) as delimiters.]

Entity Reference
[67]    Reference    ::=    EntityRef | CharRef
[68]    EntityRef    ::=    '&' Name ';' [WFC: Entity Declared]
[VC: Entity Declared]
[WFC: Parsed Entity]
[WFC: No Recursion]
[69]    PEReference    ::=    '%' Name ';' [VC: Entity Declared]
[WFC: No Recursion]
[WFC: In DTD]

Well-formedness constraint: Entity Declared

In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with "standalone='yes'", for an entity reference that does not occur within the external subset or a parameter entity, the Name given in the entity reference must match that in an entity declaration that does not occur within the external subset or a parameter entity, except that well-formed documents need not declare any of the following entities: amp, lt, gt, apos, quot. The declaration of a general entity must precede any reference to it which appears in a default value in an attribute-list declaration.

Note that if entities are declared in the external subset or in external parameter entities, a non-validating processor is not obligated to read and process their declarations; for such documents, the rule that an entity must be declared is a well-formedness constraint only if standalone='yes'.

Validity constraint: Entity Declared

In a document with an external subset or external parameter entities with "standalone='no'", the Name given in the entity reference must match that in an entity declaration. For interoperability, valid documents should declare the entities amp, lt, gt, apos, quot, in the form specified in 4.6 Predefined Entities. The declaration of a parameter entity must precede any reference to it. Similarly, the declaration of a general entity must precede any attribute-list declaration containing a default value with a direct or indirect reference to that general entity.

Well-formedness constraint: Parsed Entity

An entity reference must not contain the name of an unparsed entity. Unparsed entities may be referred to only in attribute values declared to be of type ENTITY or ENTITIES.

Well-formedness constraint: No Recursion

A parsed entity must not contain a recursive reference to itself, either directly or indirectly.

Well-formedness constraint: In DTD

Parameter-entity references may only appear in the DTD.

Examples of character and entity references:

Type <key>less-than</key> (&#x3C;) to save options.
This document was prepared on &docdate; and
is classified &security-level;.

Example of a parameter-entity reference:

<!-- declare the parameter entity "ISOLat2"... -->
<!ENTITY % ISOLat2
         SYSTEM "http://www.xml.com/iso/isolat2-xml.entities" >
<!-- ... now reference it. -->
%ISOLat2;

4.2 Entity Declarations

[Definition: Entities are declared thus:]

Entity Declaration
[70]    EntityDecl    ::=    GEDecl | PEDecl
[71]    GEDecl    ::=    '<!ENTITY' S Name S EntityDef S? '>'
[72]    PEDecl    ::=    '<!ENTITY' S '%' S Name S PEDef S? '>'
[73]    EntityDef    ::=    EntityValue | (ExternalID NDataDecl?)
[74]    PEDef    ::=    EntityValue | ExternalID

The Name identifies the entity in an entity reference or, in the case of an unparsed entity, in the value of an ENTITY or ENTITIES attribute. If the same entity is declared more than once, the first declaration encountered is binding; at user option, an XML processor may issue a warning if entities are declared multiple times.

4.2.1 Internal Entities

[Definition: If the entity definition is an EntityValue, the defined entity is called an internal entity. There is no separate physical storage object, and the content of the entity is given in the declaration.] Note that some processing of entity and character references in the literal entity value may be required to produce the correct replacement text: see 4.5 Construction of Internal Entity Replacement Text.

An internal entity is a parsed entity.

Example of an internal entity declaration:

<!ENTITY Pub-Status "This is a pre-release of the
 specification.">

4.2.2 External Entities

[Definition: If the entity is not internal, it is an external entity, declared as follows:]

External Entity Declaration
[75]    ExternalID    ::=    'SYSTEM' S SystemLiteral
| 'PUBLIC' S PubidLiteral S SystemLiteral
[76]    NDataDecl    ::=    S 'NDATA' S Name [VC: Notation Declared]

If the NDataDecl is present, this is a general unparsed entity; otherwise it is a parsed entity.

Validity constraint: Notation Declared

The Name must match the declared name of a notation.

[Definition: The SystemLiteral is called the entity's system identifier. It is a URI reference (as defined in [IETF RFC 2396], updated by [IETF RFC 2732]), meant to be dereferenced to obtain input for the XML processor to construct the entity's replacement text.] It is an error for a fragment identifier (beginning with a # character) to be part of a system identifier. Unless otherwise provided by information outside the scope of this specification (e.g. a special XML element type defined by a particular DTD, or a processing instruction defined by a particular application specification), relative URIs are relative to the location of the resource within which the entity declaration occurs. A URI might thus be relative to the document entity, to the entity containing the external DTD subset, or to some other external parameter entity.

URI references require encoding and escaping of certain characters. The disallowed characters include all non-ASCII characters, plus the excluded characters listed in Section 2.4 of [IETF RFC 2396], except for the number sign (#) and percent sign (%) characters and the square bracket characters re-allowed in [IETF RFC 2732]. Disallowed characters must be escaped as follows:

  1. Each disallowed character is converted to UTF-8 [IETF RFC 2279] as one or more bytes.

  2. Any octets corresponding to a disallowed character are escaped with the URI escaping mechanism (that is, converted to %HH, where HH is the hexadecimal notation of the byte value).

  3. The original character is replaced by the resulting character sequence.

[Definition: In addition to a system identifier, an external identifier may include a public identifier.] An XML processor attempting to retrieve the entity's content may use the public identifier to try to generate an alternative URI reference. If the processor is unable to do so, it must use the URI reference specified in the system literal. Before a match is attempted, all strings of white space in the public identifier must be normalized to single space characters (#x20), and leading and trailing white space must be removed.

Examples of external entity declarations:

<!ENTITY open-hatch
         SYSTEM "http://www.textuality.com/boilerplate/OpenHatch.xml">
<!ENTITY open-hatch
         PUBLIC "-//Textuality//TEXT Standard open-hatch boilerplate//EN"
         "http://www.textuality.com/boilerplate/OpenHatch.xml">
<!ENTITY hatch-pic
         SYSTEM "../grafix/OpenHatch.gif"
         NDATA gif >

4.3 Parsed Entities

4.3.1 The Text Declaration

External parsed entities should each begin with a text declaration.

Text Declaration
[77]    TextDecl    ::=    '<?xml' VersionInfo? EncodingDecl S? '?>'

The text declaration must be provided literally, not by reference to a parsed entity. No text declaration may appear at any position other than the beginning of an external parsed entity. The text declaration in an external parsed entity is not considered part of its replacement text.

4.3.2 Well-Formed Parsed Entities

The document entity is well-formed if it matches the production labeled document. An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. All external parameter entities are well-formed by definition.

Well-Formed External Parsed Entity
[78]    extParsedEnt    ::=    TextDecl? content

An internal general parsed entity is well-formed if its replacement text matches the production labeled content. All internal parameter entities are well-formed by definition.

A consequence of well-formedness in entities is that the logical and physical structures in an XML document are properly nested; no start-tag, end-tag, empty-element tag, element, comment, processing instruction, character reference, or entity reference can begin in one entity and end in another.

4.3.3 Character Encoding in Entities

Each external parsed entity in an XML document may use a different encoding for its characters. All XML processors must be able to read entities in both the UTF-8 and UTF-16 encodings. The terms "UTF-8" and "UTF-16" in this specification do not apply to character encodings with any other labels, even if the encodings or labels are very similar to UTF-8 or UTF-16.

Entities encoded in UTF-16 must begin with the Byte Order Mark described by Annex F of [ISO/IEC 10646], Annex H of [ISO/IEC 10646-2000], section 2.4 of [Unicode], and section 2.7 of [Unicode3] (the ZERO WIDTH NO-BREAK SPACE character, #xFEFF). This is an encoding signature, not part of either the markup or the character data of the XML document. XML processors must be able to use this character to differentiate between UTF-8 and UTF-16 encoded documents.

Although an XML processor is required to read only entities in the UTF-8 and UTF-16 encodings, it is recognized that other encodings are used around the world, and it may be desired for XML processors to read entities that use them. In the absence of external character encoding information (such as MIME headers), parsed entities which are stored in an encoding other than UTF-8 or UTF-16 must begin with a text declaration (see 4.3.1 The Text Declaration) containing an encoding declaration:

Encoding Declaration
[80]    EncodingDecl    ::=    S 'encoding' Eq ('"' EncName '"' | "'" EncName "'" )
[81]    EncName    ::=    [A-Za-z] ([A-Za-z0-9._] | '-')* /* Encoding name contains only Latin characters */

In the document entity, the encoding declaration is part of the XML declaration. The EncName is the name of the encoding used.

In an encoding declaration, the values "UTF-8", "UTF-16", "ISO-10646-UCS-2", and "ISO-10646-UCS-4" should be used for the various encodings and transformations of Unicode / ISO/IEC 10646, the values "ISO-8859-1", "ISO-8859-2", ... "ISO-8859-n" (where n is the part number) should be used for the parts of ISO 8859, and the values "ISO-2022-JP", "Shift_JIS", and "EUC-JP" should be used for the various encoded forms of JIS X-0208-1997. It is recommended that character encodings registered (as charsets) with the Internet Assigned Numbers Authority [IANA-CHARSETS], other than those just listed, be referred to using their registered names; other encodings should use names starting with an "x-" prefix. XML processors should match character encoding names in a case-insensitive way and should either interpret an IANA-registered name as the encoding registered at IANA for that name or treat it as unknown (processors are, of course, not required to support all IANA-registered encodings).

In the absence of information provided by an external transport protocol (e.g. HTTP or MIME), it is an error for an entity including an encoding declaration to be presented to the XML processor in an encoding other than that named in the declaration, or for an entity which begins with neither a Byte Order Mark nor an encoding declaration to use an encoding other than UTF-8. Note that since ASCII is a subset of UTF-8, ordinary ASCII entities do not strictly need an encoding declaration.

It is a fatal error for a TextDecl to occur other than at the beginning of an external entity.

It is a fatal error when an XML processor encounters an entity with an encoding that it is unable to process. It is a fatal error if an XML entity is determined (via default, encoding declaration, or higher-level protocol) to be in a certain encoding but contains octet sequences that are not legal in that encoding. It is also a fatal error if an XML entity contains no encoding declaration and its content is not legal UTF-8 or UTF-16.

Examples of text declarations containing encoding declarations:

<?xml encoding='UTF-8'?>
<?xml encoding='EUC-JP'?>

4.4 XML Processor Treatment of Entities and References

The table below summarizes the contexts in which character references, entity references, and invocations of unparsed entities might appear and the required behavior of an XML processor in each case. The labels in the leftmost column describe the recognition context:

Reference in Content

as a reference anywhere after the start-tag and before the end-tag of an element; corresponds to the nonterminal content.

Reference in Attribute Value

as a reference within either the value of an attribute in a start-tag, or a default value in an attribute declaration; corresponds to the nonterminal AttValue.

Occurs as Attribute Value

as a Name, not a reference, appearing either as the value of an attribute which has been declared as type ENTITY, or as one of the space-separated tokens in the value of an attribute which has been declared as type ENTITIES.

Reference in Entity Value

as a reference within a parameter or internal entity's literal entity value in the entity's declaration; corresponds to the nonterminal EntityValue.

Reference in DTD

as a reference within either the internal or external subsets of the DTD, but outside of an EntityValue, AttValue, PI, Comment, SystemLiteral, PubidLiteral, or the contents of an ignored conditional section (see 3.4 Conditional Sections).

.

Entity Type Character
Parameter Internal General External Parsed General Unparsed
Reference in Content Not recognized Included Included if validating Forbidden Included
Reference in Attribute Value Not recognized Included in literal Forbidden Forbidden Included
Occurs as Attribute Value Not recognized Forbidden Forbidden Notify Not recognized
Reference in EntityValue Included in literal Bypassed Bypassed Forbidden Included
Reference in DTD Included as PE Forbidden Forbidden Forbidden Forbidden

4.4.1 Not Recognized

Outside the DTD, the % character has no special significance; thus, what would be parameter entity references in the DTD are not recognized as markup in content. Similarly, the names of unparsed entities are not recognized except when they appear in the value of an appropriately declared attribute.

4.4.2 Included

[Definition: An entity is included when its replacement text is retrieved and processed, in place of the reference itself, as though it were part of the document at the location the reference was recognized.] The replacement text may contain both character data and (except for parameter entities) markup, which must be recognized in the usual way. (The string "AT&amp;T;" expands to "AT&T;" and the remaining ampersand is not recognized as an entity-reference delimiter.) A character reference is included when the indicated character is processed in place of the reference itself.

4.4.3 Included If Validating

When an XML processor recognizes a reference to a parsed entity, in order to validate the document, the processor must include its replacement text. If the entity is external, and the processor is not attempting to validate the XML document, the processor may, but need not, include the entity's replacement text. If a non-validating processor does not include the replacement text, it must inform the application that it recognized, but did not read, the entity.

This rule is based on the recognition that the automatic inclusion provided by the SGML and XML entity mechanism, primarily designed to support modularity in authoring, is not necessarily appropriate for other applications, in particular document browsing. Browsers, for example, when encountering an external parsed entity reference, might choose to provide a visual indication of the entity's presence and retrieve it for display only on demand.

4.4.4 Forbidden

The following are forbidden, and constitute fatal errors:

  • the appearance of a reference to an unparsed entity.

  • the appearance of any character or general-entity reference in the DTD except within an EntityValue or AttValue.

  • a reference to an external entity in an attribute value.

4.4.5 Included in Literal

When an entity reference appears in an attribute value, or a parameter entity reference appears in a literal entity value, its replacement text is processed in place of the reference itself as though it were part of the document at the location the reference was recognized, except that a single or double quote character in the replacement text is always treated as a normal data character and will not terminate the literal. For example, this is well-formed:

<!--  -->
<!ENTITY % YN '"Yes"' >
<!ENTITY WhatHeSaid "He said %YN;" >

while this is not:

<!ENTITY EndAttr "27'" >
<element attribute='a-&EndAttr;>

4.4.6 Notify

When the name of an unparsed entity appears as a token in the value of an attribute of declared type ENTITY or ENTITIES, a validating processor must inform the application of the system and public (if any) identifiers for both the entity and its associated notation.

4.4.7 Bypassed

When a general entity reference appears in the EntityValue in an entity declaration, it is bypassed and left as is.

4.4.8 Included as PE

Just as with external parsed entities, parameter entities need only be included if validating. When a parameter-entity reference is recognized in the DTD and included, its replacement text is enlarged by the attachment of one leading and one following space (#x20) character; the intent is to constrain the replacement text of parameter entities to contain an integral number of grammatical tokens in the DTD. This behavior does not apply to parameter entity references within entity values; these are described in 4.4.5 Included in Literal.

4.5 Construction of Internal Entity Replacement Text

In discussing the treatment of internal entities, it is useful to distinguish two forms of the entity's value. [Definition: The literal entity value is the quoted string actually present in the entity declaration, corresponding to the non-terminal EntityValue.] [Definition: The replacement text is the content of the entity, after replacement of character references and parameter-entity references.]

The literal entity value as given in an internal entity declaration (EntityValue) may contain character, parameter-entity, and general-entity references. Such references must be contained entirely within the literal entity value. The actual replacement text that is included as described above must contain the replacement text of any parameter entities referred to, and must contain the character referred to, in place of any character references in the literal entity value; however, general-entity references must be left as-is, unexpanded. For example, given the following declarations:

<!ENTITY % pub    "&#xc9;ditions Gallimard" >
<!ENTITY   rights "All rights reserved" >
<!ENTITY   book   "La Peste: Albert Camus,
&#xA9; 1947 %pub;. &rights;" >

then the replacement text for the entity "book" is:

La Peste: Albert Camus,
© 1947 Éditions Gallimard. &rights;

The general-entity reference "&rights;" would be expanded should the reference "&book;" appear in the document's content or an attribute value.

These simple rules may have complex interactions; for a detailed discussion of a difficult example, see D Expansion of Entity and Character References.

4.6 Predefined Entities

[Definition: Entity and character references can both be used to escape the left angle bracket, ampersand, and other delimiters. A set of general entities (amp, lt, gt, apos, quot) is specified for this purpose. Numeric character references may also be used; they are expanded immediately when recognized and must be treated as character data, so the numeric character references "&#60;" and "&#38;" may be used to escape < and & when they occur in character data.]

All XML processors must recognize these entities whether they are declared or not. For interoperability, valid XML documents should declare these entities, like any others, before using them. If the entities lt or amp are declared, they must be declared as internal entities whose replacement text is a character reference to the respective character (less-than sign or ampersand) being escaped; the double escaping is required for these entities so that references to them produce a well-formed result. If the entities gt, apos, or quot are declared, they must be declared as internal entities whose replacement text is the single character being escaped (or a character reference to that character; the double escaping here is unnecessary but harmless). For example:

<!ENTITY lt     "&#38;#60;">
<!ENTITY gt     "&#62;">
<!ENTITY amp    "&#38;#38;">
<!ENTITY apos   "&#39;">
<!ENTITY quot   "&#34;">

4.7 Notation Declarations

[Definition: Notations identify by name the format of unparsed entities, the format of elements which bear a notation attribute, or the application to which a processing instruction is addressed.]

[Definition: Notation declarations provide a name for the notation, for use in entity and attribute-list declarations and in attribute specifications, and an external identifier for the notation which may allow an XML processor or its client application to locate a helper application capable of processing data in the given notation.]

Notation Declarations
[82]    NotationDecl    ::=    '<!NOTATION' S Name S (ExternalID | PublicID) S? '>' [VC: Unique Notation Name]
[83]    PublicID    ::=    'PUBLIC' S PubidLiteral

Validity constraint: Unique Notation Name

Only one notation declaration can declare a given Name.

XML processors must provide applications with the name and external identifier(s) of any notation declared and referred to in an attribute value, attribute definition, or entity declaration. They may additionally resolve the external identifier into the system identifier, file name, or other information needed to allow the application to call a processor for data in the notation described. (It is not an error, however, for XML documents to declare and refer to notations for which notation-specific applications are not available on the system where the XML processor or application is running.)

4.8 Document Entity

[Definition: The document entity serves as the root of the entity tree and a starting-point for an XML processor.] This specification does not specify how the document entity is to be located by an XML processor; unlike other entities, the document entity has no name and might well appear on a processor input stream without any identification at all.

5 Conformance

5.1 Validating and Non-Validating Processors

Conforming XML processors fall into two classes: validating and non-validating.

Validating and non-validating processors alike must report violations of this specification's well-formedness constraints in the content of the document entity and any other parsed entities that they read.

[Definition: Validating processors must, at user option, report violations of the constraints expressed by the declarations in the DTD, and failures to fulfill the validity constraints given in this specification.] To accomplish this, validating XML processors must read and process the entire DTD and all external parsed entities referenced in the document.

Non-validating processors are required to check only the document entity, including the entire internal DTD subset, for well-formedness. [Definition: While they are not required to check the document for validity, they are required to process all the declarations they read in the internal DTD subset and in any parameter entity that they read, up to the first reference to a parameter entity that they do not read; that is to say, they must use the information in those declarations to normalize attribute values, include the replacement text of internal entities, and supply default attribute values.] Except when standalone="yes", they must not process entity declarations or attribute-list declarations encountered after a reference to a parameter entity that is not read, since the entity may have contained overriding declarations.

5.2 Using XML Processors

The behavior of a validating XML processor is highly predictable; it must read every piece of a document and report all well-formedness and validity violations. Less is required of a non-validating processor; it need not read any part of the document other than the document entity. This has two effects that may be important to users of XML processors:

  • Certain well-formedness errors, specifically those that require reading external entities, may not be detected by a non-validating processor. Examples include the constraints entitled Entity Declared, Parsed Entity, and No Recursion, as well as some of the cases described as forbidden in 4.4 XML Processor Treatment of Entities and References.

  • The information passed from the processor to the application may vary, depending on whether the processor reads parameter and external entities. For example, a non-validating processor may not normalize attribute values, include the replacement text of internal entities, or supply default attribute values, where doing so depends on having read declarations in external or parameter entities.

For maximum reliability in interoperating between different XML processors, applications which use non-validating processors should not rely on any behaviors not required of such processors. Applications which require facilities such as the use of default attributes or internal entities which are declared in external entities should use validating XML processors.

6 Notation

The formal grammar of XML is given in this specification using a simple Extended Backus-Naur Form (EBNF) notation. Each rule in the grammar defines one symbol, in the form

symbol ::= expression

Symbols are written with an initial capital letter if they are the start symbol of a regular language, otherwise with an initial lower case letter. Literal strings are quoted.

Within the expression on the right-hand side of a rule, the following expressions are used to match strings of one or more characters:

#xN

where N is a hexadecimal integer, the expression matches the character in ISO/IEC 10646 whose canonical (UCS-4) code value, when interpreted as an unsigned binary number, has the value indicated. The number of leading zeros in the #xN form is insignificant; the number of leading zeros in the corresponding code value is governed by the character encoding in use and is not significant for XML.

[a-zA-Z], [#xN-#xN]

matches any Char with a value in the range(s) indicated (inclusive).

[abc], [#xN#xN#xN]

matches any Char with a value among the characters enumerated. Enumerations and ranges can be mixed in one set of brackets.

[^a-z], [^#xN-#xN]

matches any Char with a value outside the range indicated.

[^abc], [^#xN#xN#xN]

matches any Char with a value not among the characters given. Enumerations and ranges of forbidden values can be mixed in one set of brackets.

"string"

matches a literal string matching that given inside the double quotes.

'string'

matches a literal string matching that given inside the single quotes.

These symbols may be combined to match more complex patterns as follows, where A and B represent simple expressions:

(expression)

expression is treated as a unit and may be combined as described in this list.

A?

matches A or nothing; optional A.

A B

matches A followed by B. This operator has higher precedence than alternation; thus A B | C D is identical to (A B) | (C D).

A | B

matches A or B but not both.

A - B

matches any string that matches A but does not match B.

A+

matches one or more occurrences of A.Concatenation has higher precedence than alternation; thus A+ | B+ is identical to (A+) | (B+).

A*

matches zero or more occurrences of A. Concatenation has higher precedence than alternation; thus A* | B* is identical to (A*) | (B*).

Other notations used in the productions are:

/* ... */

comment.

[ wfc: ... ]

well-formedness constraint; this identifies by name a constraint on well-formed documents associated with a production.

[ vc: ... ]

validity constraint; this identifies by name a constraint on valid documents associated with a production.

A References

A.1 Normative References

IANA-CHARSETS
(Internet Assigned Numbers Authority) Official Names for Character Sets, ed. Keld Simonsen et al. See ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets.
IETF RFC 1766
IETF (Internet Engineering Task Force). RFC 1766: Tags for the Identification of Languages, ed. H. Alvestrand. 1995. (See http://www.ietf.org/rfc/rfc1766.txt.)
ISO/IEC 10646
ISO (International Organization for Standardization). ISO/IEC 10646-1993 (E). Information technology -- Universal Multiple-Octet Coded Character Set (UCS) -- Part 1: Architecture and Basic Multilingual Plane. [Geneva]: International Organization for Standardization, 1993 (plus amendments AM 1 through AM 7).
ISO/IEC 10646-2000
ISO (International Organization for Standardization). ISO/IEC 10646-1:2000. Information technology -- Universal Multiple-Octet Coded Character Set (UCS) -- Part 1: Architecture and Basic Multilingual Plane. [Geneva]: International Organization for Standardization, 2000.
Unicode
The Unicode Consortium. The Unicode Standard, Version 2.0. Reading, Mass.: Addison-Wesley Developers Press, 1996.
Unicode3
The Unicode Consortium. The Unicode Standard, Version 3.0. Reading, Mass.: Addison-Wesley Developers Press, 2000. ISBN 0-201-61633-5.

A.2 Other References

Aho/Ullman
Aho, Alfred V., Ravi Sethi, and Jeffrey D. Ullman. Compilers: Principles, Techniques, and Tools. Reading: Addison-Wesley, 1986, rpt. corr. 1988.
Berners-Lee et al.
Berners-Lee, T., R. Fielding, and L. Masinter. Uniform Resource Identifiers (URI): Generic Syntax and Semantics. 1997. (Work in progress; see updates to RFC1738.)
Brüggemann-Klein
Brüggemann-Klein, Anne. Formal Models in Document Processing. Habilitationsschrift. Faculty of Mathematics at the University of Freiburg, 1993. (See ftp://ftp.informatik.uni-freiburg.de/documents/papers/brueggem/habil.ps.)
Brüggemann-Klein and Wood
Brüggemann-Klein, Anne, and Derick Wood. Deterministic Regular Languages. Universität Freiburg, Institut für Informatik, Bericht 38, Oktober 1991. Extended abstract in A. Finkel, M. Jantzen, Hrsg., STACS 1992, S. 173-184. Springer-Verlag, Berlin 1992. Lecture Notes in Computer Science 577. Full version titled One-Unambiguous Regular Languages in Information and Computation 140 (2): 229-253, February 1998.
Clark
James Clark. Comparison of SGML and XML. See http://www.w3.org/TR/NOTE-sgml-xml-971215.
IANA-LANGCODES
(Internet Assigned Numbers Authority) Registry of Language Tags, ed. Keld Simonsen et al. (See http://www.isi.edu/in-notes/iana/assignments/languages/.)
IETF RFC2141
IETF (Internet Engineering Task Force). RFC 2141: URN Syntax, ed. R. Moats. 1997. (See http://www.ietf.org/rfc/rfc2141.txt.)
IETF RFC 2279
IETF (Internet Engineering Task Force). RFC 2279: UTF-8, a transformation format of ISO 10646, ed. F. Yergeau, 1998. (See http://www.ietf.org/rfc/rfc2279.txt.)
IETF RFC 2376
IETF (Internet Engineering Task Force). RFC 2376: XML Media Types. ed. E. Whitehead, M. Murata. 1998. (See http://www.ietf.org/rfc/rfc2376.txt.)
IETF RFC 2396
IETF (Internet Engineering Task Force). RFC 2396: Uniform Resource Identifiers (URI): Generic Syntax. T. Berners-Lee, R. Fielding, L. Masinter. 1998. (See http://www.ietf.org/rfc/rfc2396.txt.)
IETF RFC 2732
IETF (Internet Engineering Task Force). RFC 2732: Format for Literal IPv6 Addresses in URL's. R. Hinden, B. Carpenter, L. Masinter. 1999. (See http://www.ietf.org/rfc/rfc2732.txt.)
IETF RFC 2781
IETF (Internet Engineering Task Force). RFC 2781: UTF-16, an encoding of ISO 10646, ed. P. Hoffman, F. Yergeau. 2000. (See http://www.ietf.org/rfc/rfc2781.txt.)
ISO 639
(International Organization for Standardization). ISO 639:1988 (E). Code for the representation of names of languages. [Geneva]: International Organization for Standardization, 1988.
ISO 3166
(International Organization for Standardization). ISO 3166-1:1997 (E). Codes for the representation of names of countries and their subdivisions -- Part 1: Country codes [Geneva]: International Organization for Standardization, 1997.
ISO 8879
ISO (International Organization for Standardization). ISO 8879:1986(E). Information processing -- Text and Office Systems -- Standard Generalized Markup Language (SGML). First edition -- 1986-10-15. [Geneva]: International Organization for Standardization, 1986.
ISO/IEC 10744
ISO (International Organization for Standardization). ISO/IEC 10744-1992 (E). Information technology -- Hypermedia/Time-based Structuring Language (HyTime). [Geneva]: International Organization for Standardization, 1992. Extended Facilities Annexe. [Geneva]: International Organization for Standardization, 1996.
WEBSGML
ISO (International Organization for Standardization). ISO 8879:1986 TC2. Information technology -- Document Description and Processing Languages. [Geneva]: International Organization for Standardization, 1998. (See http://www.sgmlsource.com/8879rev/n0029.htm.)
XML Names
Tim Bray, Dave Hollander, and Andrew Layman, editors. Namespaces in XML. Textuality, Hewlett-Packard, and Microsoft. World Wide Web Consortium, 1999. (See http://www.w3.org/TR/REC-xml-names/.)

B Character Classes

Following the characteristics defined in the Unicode standard, characters are classed as base characters (among others, these contain the alphabetic characters of the Latin alphabet), ideographic characters, and combining characters (among others, this class contains most diacritics) Digits and extenders are also distinguished.

Characters
[84]    Letter    ::=    BaseChar | Ideographic
[85]    BaseChar    ::=    [#x0041-#x005A] | [#x0061-#x007A] | [#x00C0-#x00D6] | [#x00D8-#x00F6] | [#x00F8-#x00FF] | [#x0100-#x0131] | [#x0134-#x013E] | [#x0141-#x0148] | [#x014A-#x017E] | [#x0180-#x01C3] | [#x01CD-#x01F0] | [#x01F4-#x01F5] | [#x01FA-#x0217] | [#x0250-#x02A8] | [#x02BB-#x02C1] | #x0386 | [#x0388-#x038A] | #x038C | [#x038E-#x03A1] | [#x03A3-#x03CE] | [#x03D0-#x03D6] | #x03DA | #x03DC | #x03DE | #x03E0 | [#x03E2-#x03F3] | [#x0401-#x040C] | [#x040E-#x044F] | [#x0451-#x045C] | [#x045E-#x0481] | [#x0490-#x04C4] | [#x04C7-#x04C8] | [#x04CB-#x04CC] | [#x04D0-#x04EB] | [#x04EE-#x04F5] | [#x04F8-#x04F9] | [#x0531-#x0556] | #x0559 | [#x0561-#x0586] | [#x05D0-#x05EA] | [#x05F0-#x05F2] | [#x0621-#x063A] | [#x0641-#x064A] | [#x0671-#x06B7] | [#x06BA-#x06BE] | [#x06C0-#x06CE] | [#x06D0-#x06D3] | #x06D5 | [#x06E5-#x06E6] | [#x0905-#x0939] | #x093D | [#x0958-#x0961] | [#x0985-#x098C] | [#x098F-#x0990] | [#x0993-#x09A8] | [#x09AA-#x09B0] | #x09B2 | [#x09B6-#x09B9] | [#x09DC-#x09DD] | [#x09DF-#x09E1] | [#x09F0-#x09F1] | [#x0A05-#x0A0A] | [#x0A0F-#x0A10] | [#x0A13-#x0A28] | [#x0A2A-#x0A30] | [#x0A32-#x0A33] | [#x0A35-#x0A36] | [#x0A38-#x0A39] | [#x0A59-#x0A5C] | #x0A5E | [#x0A72-#x0A74] | [#x0A85-#x0A8B] | #x0A8D | [#x0A8F-#x0A91] | [#x0A93-#x0AA8] | [#x0AAA-#x0AB0] | [#x0AB2-#x0AB3] | [#x0AB5-#x0AB9] | #x0ABD | #x0AE0 | [#x0B05-#x0B0C] | [#x0B0F-#x0B10] | [#x0B13-#x0B28] | [#x0B2A-#x0B30] | [#x0B32-#x0B33] | [#x0B36-#x0B39] | #x0B3D | [#x0B5C-#x0B5D] | [#x0B5F-#x0B61] | [#x0B85-#x0B8A] | [#x0B8E-#x0B90] | [#x0B92-#x0B95] | [#x0B99-#x0B9A] | #x0B9C | [#x0B9E-#x0B9F] | [#x0BA3-#x0BA4] | [#x0BA8-#x0BAA] | [#x0BAE-#x0BB5] | [#x0BB7-#x0BB9] | [#x0C05-#x0C0C] | [#x0C0E-#x0C10] | [#x0C12-#x0C28] | [#x0C2A-#x0C33] | [#x0C35-#x0C39] | [#x0C60-#x0C61] | [#x0C85-#x0C8C] | [#x0C8E-#x0C90] | [#x0C92-#x0CA8] | [#x0CAA-#x0CB3] | [#x0CB5-#x0CB9] | #x0CDE | [#x0CE0-#x0CE1] | [#x0D05-#x0D0C] | [#x0D0E-#x0D10] | [#x0D12-#x0D28] | [#x0D2A-#x0D39] | [#x0D60-#x0D61] | [#x0E01-#x0E2E] | #x0E30 | [#x0E32-#x0E33] | [#x0E40-#x0E45] | [#x0E81-#x0E82] | #x0E84 | [#x0E87-#x0E88] | #x0E8A | #x0E8D | [#x0E94-#x0E97] | [#x0E99-#x0E9F] | [#x0EA1-#x0EA3] | #x0EA5 | #x0EA7 | [#x0EAA-#x0EAB] | [#x0EAD-#x0EAE] | #x0EB0 | [#x0EB2-#x0EB3] | #x0EBD | [#x0EC0-#x0EC4] | [#x0F40-#x0F47] | [#x0F49-#x0F69] | [#x10A0-#x10C5] | [#x10D0-#x10F6] | #x1100 | [#x1102-#x1103] | [#x1105-#x1107] | #x1109 | [#x110B-#x110C] | [#x110E-#x1112] | #x113C | #x113E | #x1140 | #x114C | #x114E | #x1150 | [#x1154-#x1155] | #x1159 | [#x115F-#x1161] | #x1163 | #x1165 | #x1167 | #x1169 | [#x116D-#x116E] | [#x1172-#x1173] | #x1175 | #x119E | #x11A8 | #x11AB | [#x11AE-#x11AF] | [#x11B7-#x11B8] | #x11BA | [#x11BC-#x11C2] | #x11EB | #x11F0 | #x11F9 | [#x1E00-#x1E9B] | [#x1EA0-#x1EF9] | [#x1F00-#x1F15] | [#x1F18-#x1F1D] | [#x1F20-#x1F45] | [#x1F48-#x1F4D] | [#x1F50-#x1F57] | #x1F59 | #x1F5B | #x1F5D | [#x1F5F-#x1F7D] | [#x1F80-#x1FB4] | [#x1FB6-#x1FBC] | #x1FBE | [#x1FC2-#x1FC4] | [#x1FC6-#x1FCC] | [#x1FD0-#x1FD3] | [#x1FD6-#x1FDB] | [#x1FE0-#x1FEC] | [#x1FF2-#x1FF4] | [#x1FF6-#x1FFC] | #x2126 | [#x212A-#x212B] | #x212E | [#x2180-#x2182] | [#x3041-#x3094] | [#x30A1-#x30FA] | [#x3105-#x312C] | [#xAC00-#xD7A3]
[86]    Ideographic    ::=    [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]
[87]    CombiningChar    ::=    [#x0300-#x0345] | [#x0360-#x0361] | [#x0483-#x0486] | [#x0591-#x05A1] | [#x05A3-#x05B9] | [#x05BB-#x05BD] | #x05BF | [#x05C1-#x05C2] | #x05C4 | [#x064B-#x0652] | #x0670 | [#x06D6-#x06DC] | [#x06DD-#x06DF] | [#x06E0-#x06E4] | [#x06E7-#x06E8] | [#x06EA-#x06ED] | [#x0901-#x0903] | #x093C | [#x093E-#x094C] | #x094D | [#x0951-#x0954] | [#x0962-#x0963] | [#x0981-#x0983] | #x09BC | #x09BE | #x09BF | [#x09C0-#x09C4] | [#x09C7-#x09C8] | [#x09CB-#x09CD] | #x09D7 | [#x09E2-#x09E3] | #x0A02 | #x0A3C | #x0A3E | #x0A3F | [#x0A40-#x0A42] | [#x0A47-#x0A48] | [#x0A4B-#x0A4D] | [#x0A70-#x0A71] | [#x0A81-#x0A83] | #x0ABC | [#x0ABE-#x0AC5] | [#x0AC7-#x0AC9] | [#x0ACB-#x0ACD] | [#x0B01-#x0B03] | #x0B3C | [#x0B3E-#x0B43] | [#x0B47-#x0B48] | [#x0B4B-#x0B4D] | [#x0B56-#x0B57] | [#x0B82-#x0B83] | [#x0BBE-#x0BC2] | [#x0BC6-#x0BC8] | [#x0BCA-#x0BCD] | #x0BD7 | [#x0C01-#x0C03] | [#x0C3E-#x0C44] | [#x0C46-#x0C48] | [#x0C4A-#x0C4D] | [#x0C55-#x0C56] | [#x0C82-#x0C83] | [#x0CBE-#x0CC4] | [#x0CC6-#x0CC8] | [#x0CCA-#x0CCD] | [#x0CD5-#x0CD6] | [#x0D02-#x0D03] | [#x0D3E-#x0D43] | [#x0D46-#x0D48] | [#x0D4A-#x0D4D] | #x0D57 | #x0E31 | [#x0E34-#x0E3A] | [#x0E47-#x0E4E] | #x0EB1 | [#x0EB4-#x0EB9] | [#x0EBB-#x0EBC] | [#x0EC8-#x0ECD] | [#x0F18-#x0F19] | #x0F35 | #x0F37 | #x0F39 | #x0F3E | #x0F3F | [#x0F71-#x0F84] | [#x0F86-#x0F8B] | [#x0F90-#x0F95] | #x0F97 | [#x0F99-#x0FAD] | [#x0FB1-#x0FB7] | #x0FB9 | [#x20D0-#x20DC] | #x20E1 | [#x302A-#x302F] | #x3099 | #x309A
[88]    Digit    ::=    [#x0030-#x0039] | [#x0660-#x0669] | [#x06F0-#x06F9] | [#x0966-#x096F] | [#x09E6-#x09EF] | [#x0A66-#x0A6F] | [#x0AE6-#x0AEF] | [#x0B66-#x0B6F] | [#x0BE7-#x0BEF] | [#x0C66-#x0C6F] | [#x0CE6-#x0CEF] | [#x0D66-#x0D6F] | [#x0E50-#x0E59] | [#x0ED0-#x0ED9] | [#x0F20-#x0F29]
[89]    Extender    ::=    #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] | [#x309D-#x309E] | [#x30FC-#x30FE]

The character classes defined here can be derived from the Unicode 2.0 character database as follows:

  • Name start characters must have one of the categories Ll, Lu, Lo, Lt, Nl.

  • Name characters other than Name-start characters must have one of the categories Mc, Me, Mn, Lm, or Nd.

  • Characters in the compatibility area (i.e. with character code greater than #xF900 and less than #xFFFE) are not allowed in XML names.

  • Characters which have a font or compatibility decomposition (i.e. those with a "compatibility formatting tag" in field 5 of the database -- marked by field 5 beginning with a "<") are not allowed.

  • The following characters are treated as name-start characters rather than name characters, because the property file classifies them as Alphabetic: [#x02BB-#x02C1], #x0559, #x06E5, #x06E6.

  • Characters #x20DD-#x20E0 are excluded (in accordance with Unicode 2.0, section 5.14).

  • Character #x00B7 is classified as an extender, because the property list so identifies it.

  • Character #x0387 is added as a name character, because #x00B7 is its canonical equivalent.

  • Characters ':' and '_' are allowed as name-start characters.

  • Characters '-' and '.' are allowed as name characters.

C XML and SGML (Non-Normative)

XML is designed to be a subset of SGML, in that every XML document should also be a conforming SGML document. For a detailed comparison of the additional restrictions that XML places on documents beyond those of SGML, see [Clark].

D Expansion of Entity and Character References (Non-Normative)

This appendix contains some examples illustrating the sequence of entity- and character-reference recognition and expansion, as specified in 4.4 XML Processor Treatment of Entities and References.

If the DTD contains the declaration

<!ENTITY example "<p>An ampersand (&#38;#38;) may be escaped
numerically (&#38;#38;#38;) or with a general entity
(&amp;amp;).</p>" >

then the XML processor will recognize the character references when it parses the entity declaration, and resolve them before storing the following string as the value of the entity "example":

<p>An ampersand (&#38;) may be escaped
numerically (&#38;#38;) or with a general entity
(&amp;amp;).</p>

A reference in the document to "&example;" will cause the text to be reparsed, at which time the start- and end-tags of the p element will be recognized and the three references will be recognized and expanded, resulting in a p element with the following content (all data, no delimiters or markup):

An ampersand (&) may be escaped
numerically (&#38;) or with a general entity
(&amp;).

A more complex example will illustrate the rules and their effects fully. In the following example, the line numbers are solely for reference.

1 <?xml version='1.0'?>
2 <!DOCTYPE test [
3 <!ELEMENT test (#PCDATA) >
4 <!ENTITY % xx '&#37;zz;'>
5 <!ENTITY % zz '&#60;!ENTITY tricky "error-prone" >' >
6 %xx;
7 ]>
8 <test>This sample shows a &tricky; method.</test>

This produces the following:

  • in line 4, the reference to character 37 is expanded immediately, and the parameter entity "xx" is stored in the symbol table with the value "%zz;". Since the replacement text is not rescanned, the reference to parameter entity "zz" is not recognized. (And it would be an error if it were, since "zz" is not yet declared.)

  • in line 5, the character reference "&#60;" is expanded immediately and the parameter entity "zz" is stored with the replacement text "<!ENTITY tricky "error-prone" >", which is a well-formed entity declaration.

  • in line 6, the reference to "xx" is recognized, and the replacement text of "xx" (namely "%zz;") is parsed. The reference to "zz" is recognized in its turn, and its replacement text ("<!ENTITY tricky "error-prone" >") is parsed. The general entity "tricky" has now been declared, with the replacement text "error-prone".

  • in line 8, the reference to the general entity "tricky" is recognized, and it is expanded, so the full content of the test element is the self-describing (and ungrammatical) string This sample shows a error-prone method.

E Deterministic Content Models (Non-Normative)

As noted in 3.2.1 Element Content, it is required that content models in element type declarations be deterministic. This requirement is for compatibility with SGML (which calls deterministic content models "unambiguous"); XML processors built using SGML systems may flag non-deterministic content models as errors.

For example, the content model ((b, c) | (b, d)) is non-deterministic, because given an initial b the XML processor cannot know which b in the model is being matched without looking ahead to see which element follows the b. In this case, the two references to b can be collapsed into a single reference, making the model read (b, (c | d)). An initial b now clearly matches only a single name in the content model. The processor doesn't need to look ahead to see what follows; either c or d would be accepted.

More formally: a finite state automaton may be constructed from the content model using the standard algorithms, e.g. algorithm 3.5 in section 3.9 of Aho, Sethi, and Ullman [Aho/Ullman]. In many such algorithms, a follow set is constructed for each position in the regular expression (i.e., each leaf node in the syntax tree for the regular expression); if any position has a follow set in which more than one following position is labeled with the same element type name, then the content model is in error and may be reported as an error.

Algorithms exist which allow many but not all non-deterministic content models to be reduced automatically to equivalent deterministic models; see Brüggemann-Klein 1991 [Brüggemann-Klein].

F Autodetection of Character Encodings (Non-Normative)

The XML encoding declaration functions as an internal label on each entity, indicating which character encoding is in use. Before an XML processor can read the internal label, however, it apparently has to know what character encoding is in use--which is what the internal label is trying to indicate. In the general case, this is a hopeless situation. It is not entirely hopeless in XML, however, because XML limits the general case in two ways: each implementation is assumed to support only a finite set of character encodings, and the XML encoding declaration is restricted in position and content in order to make it feasible to autodetect the character encoding in use in each entity in normal cases. Also, in many cases other sources of information are available in addition to the XML data stream itself. Two cases may be distinguished, depending on whether the XML entity is presented to the processor without, or with, any accompanying (external) information. We consider the first case first.

F.1 Detection Without External Encoding Information

Because each XML entity not accompanied by external encoding information and not in UTF-8 or UTF-16 encoding must begin with an XML encoding declaration, in which the first characters must be '<?xml', any conforming processor can detect, after two to four octets of input, which of the following cases apply. In reading this list, it may help to know that in UCS-4, '<' is "#x0000003C" and '?' is "#x0000003F", and the Byte Order Mark required of UTF-16 data streams is "#xFEFF". The notation ## is used to denote any byte value except that two consecutive ##s cannot be both 00.

With a Byte Order Mark:

00 00 FE FF UCS-4, big-endian machine (1234 order)
FF FE 00 00 UCS-4, little-endian machine (4321 order)
00 00 FF FE UCS-4, unusual octet order (2143)
FE FF 00 00 UCS-4, unusual octet order (3412)
FE FF ## ## UTF-16, big-endian
FF FE ## ## UTF-16, little-endian
EF BB BF UTF-8

Without a Byte Order Mark:

00 00 00 3C UCS-4 or other encoding with a 32-bit code unit and ASCII characters encoded as ASCII values, in respectively big-endian (1234), little-endian (4321) and two unusual byte orders (2143 and 3412). The encoding declaration must be read to determine which of UCS-4 or other supported 32-bit encodings applies.
3C 00 00 00
00 00 3C 00
00 3C 00 00
00 3C 00 3F UTF-16BE or big-endian ISO-10646-UCS-2 or other encoding with a 16-bit code unit in big-endian order and ASCII characters encoded as ASCII values (the encoding declaration must be read to determine which)
3C 00 3F 00 UTF-16LE or little-endian ISO-10646-UCS-2 or other encoding with a 16-bit code unit in little-endian order and ASCII characters encoded as ASCII values (the encoding declaration must be read to determine which)
3C 3F 78 6D UTF-8, ISO 646, ASCII, some part of ISO 8859, Shift-JIS, EUC, or any other 7-bit, 8-bit, or mixed-width encoding which ensures that the characters of ASCII have their normal positions, width, and values; the actual encoding declaration must be read to detect which of these applies, but since all of these encodings use the same bit patterns for the relevant ASCII characters, the encoding declaration itself may be read reliably
4C 6F A7 94 EBCDIC (in some flavor; the full encoding declaration must be read to tell which code page is in use)
Other UTF-8 without an encoding declaration, or else the data stream is mislabeled (lacking a required encoding declaration), corrupt, fragmentary, or enclosed in a wrapper of some kind

Note:

In cases above which do not require reading the encoding declaration to determine the encoding, section 4.3.3 still requires that the encoding declaration, if present, be read and that the encoding name be checked to match the actual encoding of the entity. Also, it is possible that new character encodings will be invented that will make it necessary to use the encoding declaration to determine the encoding, in cases where this is not required at present.

This level of autodetection is enough to read the XML encoding declaration and parse the character-encoding identifier, which is still necessary to distinguish the individual members of each family of encodings (e.g. to tell UTF-8 from 8859, and the parts of 8859 from each other, or to distinguish the specific EBCDIC code page in use, and so on).

Because the contents of the encoding declaration are restricted to characters from the ASCII repertoire (however encoded), a processor can reliably read the entire encoding declaration as soon as it has detected which family of encodings is in use. Since in practice, all widely used character encodings fall into one of the categories above, the XML encoding declaration allows reasonably reliable in-band labeling of character encodings, even when external sources of information at the operating-system or transport-protocol level are unreliable. Character encodings such as UTF-7 that make overloaded usage of ASCII-valued bytes may fail to be reliably detected.

Once the processor has detected the character encoding in use, it can act appropriately, whether by invoking a separate input routine for each case, or by calling the proper conversion function on each character of input.

Like any self-labeling system, the XML encoding declaration will not work if any software changes the entity's character set or encoding without updating the encoding declaration. Implementors of character-encoding routines should be careful to ensure the accuracy of the internal and external information used to label the entity.

F.2 Priorities in the Presence of External Encoding Information

The second possible case occurs when the XML entity is accompanied by encoding information, as in some file systems and some network protocols. When multiple sources of information are available, their relative priority and the preferred method of handling conflict should be specified as part of the higher-level protocol used to deliver XML. In particular, please refer to [IETF RFC 2376] or its successor, which defines the text/xml and application/xml MIME types and provides some useful guidance. In the interests of interoperability, however, the following rule is recommended.

  • If an XML entity is in a file, the Byte-Order Mark and encoding declaration are used (if present) to determine the character encoding.

G W3C XML Working Group (Non-Normative)

This specification was prepared and approved for publication by the W3C XML Working Group (WG). WG approval of this specification does not necessarily imply that all WG members voted for its approval. The current and former members of the XML WG are:

  • Jon Bosak, Sun (Chair)
  • James Clark (Technical Lead)
  • Tim Bray, Textuality and Netscape (XML Co-editor)
  • Jean Paoli, Microsoft (XML Co-editor)
  • C. M. Sperberg-McQueen, U. of Ill. (XML Co-editor)
  • Dan Connolly, W3C (W3C Liaison)
  • Paula Angerstein, Texcel
  • Steve DeRose, INSO
  • Dave Hollander, HP
  • Eliot Kimber, ISOGEN
  • Eve Maler, ArborText
  • Tom Magliery, NCSA
  • Murray Maloney, SoftQuad, Grif SA, Muzmo and Veo Systems
  • MURATA Makoto (FAMILY Given), Fuji Xerox Information Systems
  • Joel Nava, Adobe
  • Conleth O'Connell, Vignette
  • Peter Sharpe, SoftQuad
  • John Tigue, DataChannel

H W3C XML Core Group (Non-Normative)

The second edition of this specification was prepared by the W3C XML Core Working Group (WG). The members of the WG at the time of publication of this edition were:

  • Paula Angerstein, Vignette
  • Daniel Austin, Ask Jeeves
  • Tim Boland
  • Allen Brown, Microsoft
  • Dan Connolly, W3C (Staff Contact)
  • John Cowan, Reuters Limited
  • John Evdemon, XMLSolutions Corporation
  • Paul Grosso, Arbortext (Co-Chair)
  • Arnaud Le Hors, IBM (Co-Chair)
  • Eve Maler, Sun Microsystems (Second Edition Editor)
  • Jonathan Marsh, Microsoft
  • MURATA Makoto (FAMILY Given), IBM
  • Mark Needleman, Data Research Associates
  • David Orchard, Jamcracker
  • Lew Shannon, NCR
  • Richard Tobin, University of Edinburgh
  • Daniel Veillard, W3C
  • Dan Vint, Lexica
  • Norman Walsh, Sun Microsystems
  • François Yergeau, Alis Technologies (Errata List Editor)
  • Kongyi Zhou, Oracle

I Production Notes (Non-Normative)

This Second Edition was encoded in the XMLspec DTD (which has documentation available). The HTML versions were produced with a combination of the xmlspec.xsl, diffspec.xsl, and REC-xml-2e.xsl XSLT stylesheets. The PDF version was produced with the html2ps facility and a distiller program.

libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/0000755000175000017500000000000012273503733023716 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/0000755000175000017500000000000012273503733024625 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-7-SUN.output0000644000175000017500000000034110760636544031333 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-2-UPC.output0000644000175000017500000000051510760636544031313 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmllang-4-IAIK.output0000644000175000017500000000043310760636544030433 0ustar tonytony ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec2-input.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec2-input.x0000644000175000017500000000047210760636544031461 0ustar tonytony ]> libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-5-SUN.output0000644000175000017500000000020510760636544031330 0ustar tonytony././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec-103-SUN.outputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec-103-SUN.0000644000175000017500000000007010760636544031010 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmllang-3-IAIK.output0000644000175000017500000000021210760636544030425 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-7.xpath0000644000175000017500000000021110760636544030450 0ustar tonytony(//. | //@* | //namespace::*) [ancestor-or-self::ietf:c14n11XmlBaseDoc1 and not(ancestor-or-self::ietf:e1 or ancestor-or-self::ietf:e2)]libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlspace-4-IAIK.output0000644000175000017500000000044110760636544030604 0ustar tonytony ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec3-103-IAIK.outputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec3-103-IAI0000644000175000017500000000007010760636544030752 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-5.xpath0000644000175000017500000000007210760636544030453 0ustar tonytony(//. | //@* | //namespace::*) [ancestor-or-self::ietf:e21]libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-4-UPC.output0000644000175000017500000000021010760636544031305 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-input.xml0000644000175000017500000000103210760636544031117 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlid-2-SUN.output0000644000175000017500000000037710760636544030043 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/appendixa/0000755000175000017500000000000012273503733026576 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/appendixa/inputs.txt0000644000175000017500000000161410760636544030671 0ustar tonytonyno/.././/pseudo-netpath/seg/file.ext no/..//.///pseudo-netpath/seg/file.ext yes/no//..//.///pseudo-netpath/seg/file.ext no/../yes no/../yes/ no/../yes/no/.. ../../no/../.. no/../.. no/.. no/../ /a/b/c/./../../g mid/content=5/../6 ../../.. no/../../ ..yes/..no/..no/..no/../../../..yes ..yes/..no/..no/..no/../../../..yes/ ../.. ../../../ . ./ ./. //no/.. ../../no/.. ../../no/../ yes/no/../ yes/no/no/../.. yes/no/no/no/../../.. yes/no/../yes/no/no/../.. yes/no/no/no/../../../yes yes/no/no/no/../../../yes/ /no/../ /yes/no/../ /yes/no/no/../.. /yes/no/no/no/../../.. ../../..no/.. ../../..no/../ ..yes/..no/../ ..yes/..no/..no/../.. ..yes/...no/..no/..no/../../.. ..yes/..no/../..yes/..no/..no/../.. /..no/../ /..yes/..no/../ /..yes/..no/..no/../.. /..yes/..no/..no/..no/../../.. / /. /./ /./. /././ /.. /../.. /../../.. /../../.. //.. //..//.. //..//..//.. /./.. /./.././.. /./.././.././.. . ./ ./. .. ../ libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/appendixa/outputs.txt0000644000175000017500000000057410760636544031076 0ustar tonytonypseudo-netpath/seg/file.ext pseudo-netpath/seg/file.ext yes/pseudo-netpath/seg/file.ext yes yes/ yes/ ../../../ ../ /a/g mid/6 ../../../ ../ ..yes/..yes ..yes/..yes/ ../../ ../../../ / ../../ ../../ yes/ yes/ yes/ yes/yes/ yes/yes yes/yes/ / /yes/ /yes/ /yes/ ../../ ../../ ..yes/ ..yes/ ..yes/ ..yes/..yes/ / /..yes/ /..yes/ /..yes/ / / / / / / / / / / / / / / / ../ ../ libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlspace-3-IAIK.output0000644000175000017500000000021510760636544030602 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmllang-2.xpath0000644000175000017500000000007010760636544027477 0ustar tonytony(//. | //@* | //namespace::*)[ancestor-or-self::ietf:e2]././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec2-102-SUN.outputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec2-102-SUN0000644000175000017500000000023710760636544031020 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlspace-3.xpath0000644000175000017500000000007210760636544027654 0ustar tonytony(//. | //@* | //namespace::*) [ancestor-or-self::ietf:e11]libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlid-1-IBM.output0000644000175000017500000000037010760636544027775 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlspace-4.xpath0000644000175000017500000000013010760636544027650 0ustar tonytony(//. | //@* | //namespace::*) [ancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e12]libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-2-IAIK.output0000644000175000017500000000051510760636544031401 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlid-2-IAIK.output0000644000175000017500000000037710760636544030113 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-1.xpath0000644000175000017500000000015310760636544030447 0ustar tonytony(//. | //@* | //namespace::*) [ancestor-or-self::ietf:c14n11XmlBaseDoc1 and not(ancestor-or-self::ietf:e2)]libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlid-2-UPC.output0000644000175000017500000000037710760636544030025 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmllang-2.output0000644000175000017500000000016210760636544027715 0ustar tonytony ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec3-103.outputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec3-103.out0000644000175000017500000000007010760636544031160 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-1-IAIK.output0000644000175000017500000000072510760636544031403 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-4-IBM.output0000644000175000017500000000021010760636544031265 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlspace-2.output0000644000175000017500000000016210760636544030067 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-3.xpath0000644000175000017500000000007210760636544030451 0ustar tonytony(//. | //@* | //namespace::*) [ancestor-or-self::ietf:e11]././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec3-input.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec3-input.x0000644000175000017500000000022310760636544031454 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmllang-4-IBM.output0000644000175000017500000000043310760636544030325 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-6.output0000644000175000017500000000024610760636544030673 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmllang-3.xpath0000644000175000017500000000007110760636544027501 0ustar tonytony(//. | //@* | //namespace::*)[ancestor-or-self::ietf:e11]libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-2-IBM.output0000644000175000017500000000051510760636544031273 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlspace-2-UPC.output0000644000175000017500000000016210760636544030514 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmllang-3-UPC.output0000644000175000017500000000021210760636544030337 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/report.sh0000644000175000017500000000070110760636544026500 0ustar tonytony#!/bin/sh -f for o in *.output ; do base=`basename $o .output` testcase=$o for f in ${base}-*.output ; do if test -f "$f" ; then vendor=`echo $f | sed -e 's/^.*-\([A-Za-z]*\).*$/\1/'` if test -s "$testcase" ; then echo "Test case: $testcase" testcase="" fi echo -ne " ${vendor}: \t" if cmp "$o" "$f" ; then echo "pass" else echo "fail" echo '---' diff -u $o $f echo '---' fi fi done done libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-6.xpath0000644000175000017500000000007110760636544030453 0ustar tonytony(//. | //@* | //namespace::*) [ancestor-or-self::ietf:e3]libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlspace-3.output0000644000175000017500000000021510760636544030067 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-4-SUN.output0000644000175000017500000000021010760636544031323 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmllang-4.output0000644000175000017500000000043310760636544027720 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmllang-3-SUN.output0000644000175000017500000000021210760636544030355 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-102-UPC.output0000644000175000017500000000024010760636544031447 0ustar tonytony ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec2-102-IAIK.outputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec2-102-IAI0000644000175000017500000000023710760636544030755 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlspace-2-IAIK.output0000644000175000017500000000016210760636544030602 0ustar tonytony ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec-102-SUN.outputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec-102-SUN.0000644000175000017500000000027110760636544031012 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-4-IAIK.output0000644000175000017500000000021010760636544031373 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmllang-1-IBM.output0000644000175000017500000000036310760636544030324 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlid-1.output0000644000175000017500000000037010760636544027370 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-7.output0000644000175000017500000000034110760636544030670 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-5.output0000644000175000017500000000020510760636544030665 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-4.output0000644000175000017500000000021010760636544030660 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlspace-1-IBM.output0000644000175000017500000000036610760636544030501 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-6-IBM.output0000644000175000017500000000024610760636544031300 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmllang-2-IAIK.output0000644000175000017500000000016210760636544030430 0ustar tonytony ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec2-102.xpathlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec2-102.xpa0000644000175000017500000000026110760636544031141 0ustar tonytony(//. | //@* | //namespace::*)[self::ietf:e1 or (parent::ietf:e1 and not(self::text() or self::e2)) or count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node())]libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmllang-input.xml0000644000175000017500000000054410760636544030157 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlspace-1-IAIK.output0000644000175000017500000000036610760636544030607 0ustar tonytony ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec-103-IBM.outputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec-103-IBM.0000644000175000017500000000007010760636544030752 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlspace-2-SUN.output0000644000175000017500000000016210760636544030532 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlid-1-IAIK.output0000644000175000017500000000037010760636544030103 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-7-UPC.output0000644000175000017500000000034110760636544031315 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmllang-1.xpath0000644000175000017500000000007010760636544027476 0ustar tonytony(//. | //@* | //namespace::*)[ancestor-or-self::ietf:e1]libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-4.xpath0000644000175000017500000000007310760636544030453 0ustar tonytony(//. | //@* | //namespace::*) [ancestor-or-self::ietf:e111]libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-1-SUN.output0000644000175000017500000000072510760636544031333 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlspace-2-IBM.output0000644000175000017500000000016210760636544030474 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-3-IAIK.output0000644000175000017500000000030010760636544031372 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-2.xpath0000644000175000017500000000007110760636544030447 0ustar tonytony(//. | //@* | //namespace::*) [ancestor-or-self::ietf:e1]libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-2-SUN.output0000644000175000017500000000051510760636544031331 0ustar tonytony ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec2-102-IBM.outputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec2-102-IBM0000644000175000017500000000023710760636544030762 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlid-1.xpath0000644000175000017500000000007110760636544027152 0ustar tonytony(//. | //@* | //namespace::*) [ancestor-or-self::ietf:e1]././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec2-102-UPC.outputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec2-102-UPC0000644000175000017500000000156410760636544031006 0ustar tonytony self::ietf:e1 or (parent::ietf:e1 and not(self::text() or self::e2)) or count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node())LBXEYs7t/d8bgcN54PAfey3vjzA=aqkAIl/Sds+oXb6U47i139nlSQM=././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec-input.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec-input.xm0000644000175000017500000000053610760636544031555 0ustar tonytony ]> libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmllang-1-IAIK.output0000644000175000017500000000036310760636544030432 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-3.output0000644000175000017500000000030010760636544030657 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlspace-4-SUN.output0000644000175000017500000000044110760636544030534 0ustar tonytony ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec-102.outputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec-102.outp0000644000175000017500000000027110760636544031257 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-3-SUN.output0000644000175000017500000000030010760636544031322 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlspace-1.output0000644000175000017500000000036610760636544030074 0ustar tonytony ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec-102.xpathlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec-102.xpat0000644000175000017500000000026110760636544031243 0ustar tonytony(//. | //@* | //namespace::*)[self::ietf:e1 or (parent::ietf:e1 and not(self::text() or self::e2)) or count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node())]libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmllang-4-UPC.output0000644000175000017500000000043310760636544030345 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-3-IBM.output0000644000175000017500000000030010760636544031264 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlspace-4-IBM.output0000644000175000017500000000044110760636544030476 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlid-input.xml0000644000175000017500000000055710760636544027636 0ustar tonytony ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec-102-IBM.outputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec-102-IBM.0000644000175000017500000000027110760636544030754 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-5-UPC.output0000644000175000017500000000020510760636544031312 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlid-2.output0000644000175000017500000000037710760636544027400 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmllang-3-IBM.output0000644000175000017500000000021210760636544030317 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmllang-2-SUN.output0000644000175000017500000000016210760636544030360 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-1.output0000644000175000017500000000072510760636544030670 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlspace-3-SUN.output0000644000175000017500000000021510760636544030532 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmllang-4-SUN.output0000644000175000017500000000043310760636544030363 0ustar tonytony ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec-102-IAIK.outputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec-102-IAIK0000644000175000017500000000027110760636544031004 0ustar tonytony././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec3-103-IBM.outputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec3-103-IBM0000644000175000017500000000007010760636544030757 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmllang-4.xpath0000644000175000017500000000012710760636544027504 0ustar tonytony(//. | //@* | //namespace::*)[ancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e12]libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-2.output0000644000175000017500000000051510760636544030666 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-6-UPC.output0000644000175000017500000000024610760636544031320 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-7-IAIK.output0000644000175000017500000000034110760636544031403 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlspace-1-UPC.output0000644000175000017500000000036610760636544030521 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-6-SUN.output0000644000175000017500000000024610760636544031336 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlspace-1.xpath0000644000175000017500000000007110760636544027651 0ustar tonytony(//. | //@* | //namespace::*) [ancestor-or-self::ietf:e1]libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-5-IBM.output0000644000175000017500000000020510760636544031272 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-1-UPC.output0000644000175000017500000000072510760636544031315 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlspace-2.xpath0000644000175000017500000000007110760636544027652 0ustar tonytony(//. | //@* | //namespace::*) [ancestor-or-self::ietf:e2]libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-7-IBM.output0000644000175000017500000000034110760636544031275 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlspace-4.output0000644000175000017500000000044110760636544030071 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlid-1-SUN.output0000644000175000017500000000037010760636544030033 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmllang-2-UPC.output0000644000175000017500000000016210760636544030342 0ustar tonytony ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec2-102.outputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec2-102.out0000644000175000017500000000023710760636544031163 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-3-UPC.output0000644000175000017500000000030010760636544031304 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlid-2-IBM.output0000644000175000017500000000037710760636544030005 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-5-IAIK.output0000644000175000017500000000020510760636544031400 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlspace-4-UPC.output0000644000175000017500000000044110760636544030516 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmllang-1-SUN.output0000644000175000017500000000036310760636544030362 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlid-2.xpath0000644000175000017500000000013010760636544027147 0ustar tonytony(//. | //@* | //namespace::*) [ancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e12]libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-1-IBM.output0000644000175000017500000000072510760636544031275 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-prop-6-IAIK.output0000644000175000017500000000024610760636544031406 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmllang-1-UPC.output0000644000175000017500000000036310760636544030344 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmllang-3.output0000644000175000017500000000021210760636544027712 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmllang-1.output0000644000175000017500000000036310760636544027717 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlspace-3-UPC.output0000644000175000017500000000021510760636544030514 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmllang-2-IBM.output0000644000175000017500000000016210760636544030322 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlspace-3-IBM.output0000644000175000017500000000021510760636544030474 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlid-1-UPC.output0000644000175000017500000000037010760636544030015 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlspace-1-SUN.output0000644000175000017500000000036610760636544030537 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlspace-input.xml0000644000175000017500000000056110760636544030330 0ustar tonytony ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec3-103.xpathlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/c14n11/xmlbase-c14n11spec3-103.xpa0000644000175000017500000000010010760636544031133 0ustar tonytony(//. | //@* | //namespace::*) [self::a or ancestor-or-self::d] libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmlenc-core-11/0000755000175000017500000000000012273503733026351 5ustar tonytony././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmlenc-core-11/cipherText__RSA-2048__aes128-gcm__rsa-oaep-mgf1p.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmlenc-core-11/cipherText__RSA-2040000644000175000017500000000662111703337722031567 0ustar tonytonyMIIDIzCCAgugAwIBAgIINsFEFLHenAUwDQYJKoZIhvcNAQELBQAwNTESMBAGA1UECxMJeG1sZW5jcjExMR8wHQYDVQQDDBZSU0EtMjA0OF9TSEEyNTZXaXRoUlNBMCAXDTExMTExOTAwMzc1M1oYDzMwMTEwMzIxMjMzNzUzWjA1MRIwEAYDVQQLEwl4bWxlbmNyMTExHzAdBgNVBAMMFlJTQS0yMDQ4X1NIQTI1NldpdGhSU0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDX0NwrIqgzFvyeddu3IzzpNp3ugZtJTJ8FfIAzIwoksrGhbu09FglIg7YVETjLdhvy4CFWaY5oLNRnfgstXrIVVoJzBPtr6UGwLIMrd07I6uodvTNMiyaK8y7VSzab6KO2Iprjp9KZdExjlWdUKRoWe5uxPocA5m74ydPTxjJgl5GtLCu22NHJfTnCW6w7whIpDTYOe70LOPhiwOjMXRXznr9Qh88hxiW3LG8P8+awdhZsKk7dWpHuDNECLddB17FkLMDhtg8RlCRmhqcfVgDoq5N3jjNvS6mgnn0w8dEIw3NdVS7tTJNO/+3aqoavkHeE49DDZ7ALvjw269bUxAn3AgMBAAGjNTAzMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFDo0STlAFQQnjYbpwCZ6JSzoYCO6MA0GCSqGSIb3DQEBCwUAA4IBAQCsRLjUSMnPMyHkU5ynesTN3YJPfQWJ/Mmcfr8r/bJs3S63gpCloZ9Q4Gg5PvpTgVlUkBaBAm8M9DBCDNdn/9KHCm0oySBnGPdKYhUukNURoPlp9w+AN5Mp5QjEsNbtgAiKojW2f2U+RR7r54Ew4BXBMFlQIC6xd2vnQlzEUZniperi8HnMI+wy9yPGZ8nwnmS7zpzVd8NmPTQRHZUv+yG4shF2eB68ocLJ8dEN/UejCSkgep4qcQhjcfx2k5MNG/XE/SsVapAV8T8o4xTrA0b+4COm+Nd0zT1pEYaPt900NCuQ4ml0JXcVLDRUsQOpwUo/M87rYJ1y/reRuIvwIj+8CN=RSA-2048_SHA256WithRSA, OU=xmlencr113945509604227456005CN=RSA-2048_SHA256WithRSA, OU=xmlencr11OjRJOUAVBCeNhunAJnolLOhgI7o=zkPlbASpiK8QO9HOQFK3HBwHgI63LE2DvklAzIgGGy/6YAMx//nRE2Wihm6icOFsApHsAlQW/iglNb9ZijCi/Vez2I6O8YtKxWxc1V2ibuBlK1SMw9pC+W6eBG9M4kNswJgBYsdf8wxaE+5uFKA5gfxAsDxghuQ+aGXaNNUki+O6ycGeiR3cg9DEmM6Iv6Cggxr/4xtJ7b6f0sakz+BnU6lW4irCP+w/uxcIysUKPpxmd3RbjmOqSHFavvCCWhME5WgaagSxeXjcqRrOaK1ufd/HLnByLpw5cTf8z3qbbJKunpXXtYo9LqM2NvlPBO2SBNUR/PzVo8iBaZqfIfI6Kg==amntSk0OPlW2gAAB5U+wnuXSfGggPa+Cp4DnodY9qcmicVYhnzCRt0EDYdzDWwRniRFF/LLWr9FaEf2lNjmHJYOJY5fA/eFXNkMPjGioklAIKjoakVT8CPMCafIvXa/2sQ5oC4ee9d1UEMkhgUijQjDuI3GrDDBSL8AwMyJ8guT0bgOss2PCBxEL0PIA2KnxNumfQeahN3nfeXjdlCzASK7QtW/HrDwIi5MRmYjly/pn+5E0UW5gfrE9iF5l6xTCSZcUI1nV+6n/UJnI+pLOL61npIsrLdQu5Mqui3RqHf8EYS5STakws438fq/apl8y40GmnTrJfmI4CiFEC5jWdrnUhX5Czs5lbAbRd3uNgNd5SykOxP6e1y2d6O/QaA4w7SRAnKEoOvZ20irpfkXxqAiNe+DomQ9Cvdus4NjghSiU1HHr/Axj6NQUJt+ApdIhS37YImQ+fVGEl1kRGu0kKEaYPX08xeorefi7+5MDyEh2hoJuhyj++i3LfoGD0yv6YEJp64hD4314OcwBo8H9CpkHT10VDiYTXqASkNiJxqkiAk26Vbd+X+2QhXCGq6LnannpY9EPJfTL0jvmxc2i9zz7iZTbb3PWmIH0CdaGDfqISwuvVGY1KvmdosR9gxGZqB0buqXWOoLrZ/bMi+JZnql2EcxsST08Tx0aeilRKjrJkt9A5/7FfmZ2XPIFGOy0Q4GD95ndZf8FAN/+yzPW+2HvkcoxMee5RVvUo+PHg9TVD/zn+Lf4bs/KtEssx5KyMokV0t9H4OUtNyxDSxDHP8KO0BQwRadRDrTuTLYdTGDmKKQ=././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmlenc-core-11/RSA-3072_SHA256WithRSA.p12libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmlenc-core-11/RSA-3072_SHA256With0000644000175000017500000000602011703337722031074 0ustar tonytony0 0  *H   0 0  *H  0 0  *H 0 *H  0vO pz0jϣtFMU*c080 2CQ+XӋP +/^NX2tY~p! 3jĎP5]HKT!B[ոo2R݀KB #Knu$!봕9e:ObjUB|-2,B~dD]:N[ze`XP Ôpv4Б]=T #>ƌKh~W7wuAtu:=ܓ`e;1`e:OyM;s%)ߓl/0 8Wyu]=V.@mѷ/>r=N6pg s\3mA HuЯT=̔j[:$rV0vQQ;vOA>n~kpͻ ~}\ݤ~WbV?S|zxгޟN1QЙ-rUoWrd7S$Qʥ͈DĎN5͋? [_zgxdR䑲X'ΝeݴQe7)P1bmӲ_׋2p4l>s%7iP'u7텞WIO*?:q^/n/n};ګ[͒.ܰ Nz=_Tgp?cdu̩y,TS͂s[މ/=Ma` ճZ14ZFg rS93JyA>iׄ2s;ko`1͖3q9(/1y01 {&PK{KJ8v10qdR-0D%9fEǁ5JZYovD+H\}gŴt τ ݋>&7p5&%o8=yN;#)!9y)xA?b{~?hRJ1>**(^oBkb0tKY!m!,*i;+AO3Nuc$Q[/%DxCq 0CړtS ŚS<_NZ"t[ziMJ¶AX'D"Z /ʫ!F@>( Gd@*Qr+k\+ Fm>JVYMOV ـy۠ e'0(]vvaE  SPTیz1g-^Fw`)ד| zGFR3{F%pn=wco̴rgNP}WFBخa>(`{-A">N${F;m:%ysvYOOه3|j4!,F O2u0@@}.Kϥ5o ~+2 Id=~bro=5l,6*nFosҘTY:|qluaֺx~7XdoMU9 "47!n1.mcJ5˳gNr6ϛWozNĵp&ذ?ˍD &煿zq {S@mpeWO\?fZC=Nj0m'"FaU\*EyPmF/_3A8:.~yd`T] OTqc\jN91!!mڍ-WYބ 3!l>L`}0!߄XD@\O .'LkCzGv-He$:R OSC6k$MIIEIzCCAougAwIBAgIIbq7SbMmGOkwwDQYJKoZIhvcNAQELBQAwNTESMBAGA1UECxMJeG1sZW5jcjExMR8wHQYDVQQDDBZSU0EtMzA3Ml9TSEEyNTZXaXRoUlNBMCAXDTExMTIxMzE5MzYzMFoYDzMwMTEwNDE1MTgzNjMwWjA1MRIwEAYDVQQLEwl4bWxlbmNyMTExHzAdBgNVBAMMFlJTQS0zMDcyX1NIQTI1NldpdGhSU0EwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQC0qPxdWwaPghF84aAMtb4ubNhGjqr4vhsgbvcqBFTcvI7nMV2DTj9bojdib9sJA1fhKJxfL883+ubEs7u1AyQ7xJuegZVwH6KKTV6N6RHPAQgtpA95s0lWr8euXrwCeZOF2N/Pz/ke4Ve+HHXcBsPxPF2JJX8oDET99RiYamrp9VjtbsUCmDD1P6XEDua4tId5HrKfskZtYFYsyAtog4ecA5kideirygwOk5sP9uo15MkYR2nIkn6RIxPoaPkfSnIXrJQC+Q0a+SL1mmdnEN0Ly8brewgiKZnc2swuinDe6boSCVt8CJGEJVQsjVurTV7dFsbrLdDN9j5fDjv0k8OFjB65Sb04QXts1HiUDUIDkb9K1BSlQA8Cwt2AQIitP/0f6drmlQgvLrgnf4VXTevOrhZ4Cmi1sAHXQKBAmATaUh9PNfI4Qwoh0IjriiBoBLXlvVOypEmbBRrHtlhlQrsWwtY48hceQB9ny18xPyfMEqiiSgCGSbxWjGvwJNfy3xcCAwEAAaM1MDMwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQUJkY4RV69EfMztTxYScLXGEd9s6UwDQYJKoZIhvcNAQELBQADggGBAJKczn1A2Pi90DNZT8i5AEU0m6zPkxH2byNK7GBQ0s2RCR9m/P6k2ei5J74PbXOINT1Q6MDTpYqeKYMUXCrGcAxYIRmmZnywmHzbljwbbFScDi8nHmEX0DnNUa5FU8wS/LbuL4qJ9cT/tZvOAiTLN+cbJICbWdQxU1xOh4jpbfthX4TwwBz/eV9ncQfK8lR6MxpkIfuUaN426ZNFp63ZgCbPWYqTRcIeZWPlpNHkTHX8WT+nZqGnFoE1LSBular0RGpnn4nNmiAuZgGNCpguloeYFIShItZpTDfiQivoMYUI6UzLOJgizvN48oB82m942LKCGk3QBT9gLNHf3Lnw7lEb3u3Tg/8ULCbrHNafUSHdUqbnBwwT7sWKyRWX2dxEy6mGJpTn4mKNy9jYRE0y2QlSRBLYdaKlTNrbw3yvSVvM/ZH/lIVaKv64h7lQYOQ7pOcBNmg4AHXS1NzWPYiGSHqhpP59xBHxN0CIW02LRhd5MU7Jem7zdWTsRl0n5etkwA==CN=RSA-3072_SHA256WithRSA, OU=xmlencr117975543354799045196CN=RSA-3072_SHA256WithRSA, OU=xmlencr11JkY4RV69EfMztTxYScLXGEd9s6U=ELFX9zkwbEwxq2sqmL+ketAuF8kTqCk+rJw2rXI9T3Kbv0d/1cIGtgSBiimVUouICR2yfnt5MaX5aomVDp9v4IRq4BSPbeyK+4VgdrnMe3RIQ0QetZVk+dLk10QXvQnXpxuXaBq2UoN/91Jx3wZxWKeMovLqss5u+NNiJp931JnS7egIqiv8HnEKogq1nKZltx3SHdko9UzxwOOKFaIhWCiLKyFzCLoMdmwVtyZdU+GVz8+F/AqavMT17VWtI4oxrYd6eLojetLp5UwFnWEroW8CTjhssRzLMV4J8bVa1Ll8eFcPfWackromHGJFsOI1HuY6yOQ8A7e3LLk8L1dXnTZi6TVodburUceZw+jy9nSb+SbIAEE7FLhgWi3bynENRVGOj1h+Rh+u1/Hg/ENailDz9lU9x7nP0IPeP5ACdnvQoArVCVDqMzcSh7EtDVd4Nj88BbI7NJZx02k6KG2ybYA5tv3hji2ej+cDDhfgNURFtEp09brLvHG7Kc8eQdVEamntSk0OPlW2gAAC7HOzZznBvo2f0Q4GVZ5Sh+gfFXeauxXHRZoCbdOEzK6zS6MihCUc8f+5IdqE9dzJqgDuecZfo8nTE8k86iLUrCTLkZmE9hDNeR+tD7RbJiBnAo1UAdILvndkj+3ekvc8NYNffqmOsUa+r86vvoNKmzLj6JoBMjesRHncLuepbeW5PknFrQATLnVuiKpLHDps6TggXNVl3m+O/8k1Zf9hXuMpiDyLChbakB+JM5UQ2+pC4iB5bfwO8XObH19MmKh2jdmE6MNqCq33VRZSpTFSeCj8A2qorx1XJnW/bIoZDDpIC6urWTT6LHLmafStdS/kxAnNe3+WM3JYFmiUpsElBvDYkBt7YUcqPhAr4jebsFuUIKhPC7qKCA/JBzEtBLULQ2EFJfmbK+fVLORgHxjFNysT6zEiRRRo0XkUsI1k4ewhI5fxB+/v4rDOwVmpKZ1KxFNG+eveJpClhKcFAWx1KNxkowhj2RHTRWfgzuUlWWc3ATcGbVim4CqPRTNSKeomE+bAyXcWjsZ1O0pEl0pnMaw2ZHw119n1+mORQRDmnmU0kNY+Aw9dhZlL3DAWk8SFSPAFnnCAeKikJffa71kEBmLHRW+uGvK2BX8PR2EY7DckyKxHs4q3PceK0EJw9idz/h6+LRnOQx3dphG7MnU+h0e9qCoEzUOJyGX9X7p1r3IpY0F6FvaoMULTpwAxqA/uOJDxA92MFCfERIEzDrdsIWg3p0yInz7/BpZrljljnO5PVwa4uXauiAJ1hUwzByZZ8itdalJNTh1I9zv37lJoChCCJBOLA74=././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmlenc-core-11/RSA-2048_SHA256WithRSA.p12libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmlenc-core-11/RSA-2048_SHA256With0000644000175000017500000000433011703337722031100 0ustar tonytony00 *H 00 *H p0l0e *H 0 *H  0j-K96N8}G2| (6>JwIw~t/G i‚oy䎼ˆhy mtNå$I:H0_3۞ǒ6`=bǃmxo*Lh!wiz}L9Cqվgy.s*)x".sIx.^Cafy,w82gC۾Tf<^0H/UY^Ze?q3sQxsXJYfO.m1wpdC7Wv v{#r0]\i5,:y@3&yTa^ a {~ߡ8>b@+uboxrVо0P!1yy.E`:y }I;M3ҷE038cԖGI]i& y2:Rh.$ A[\lKz':lh_{?`D7QL\hmW{tY!s.cmewv`J(Mi|;P׎u;}&,(8EDw6_h xuCOhH |<pxqUGL/|Rri~wi7Q3Sodh̳ |*z2]W k_RlFRo'IBy6U~FZn3 +45߸sE= X!p`ְ-D=T^IXv[_ Hқ\,< 隣6U-< sF[(eP3^WR"V#PXO;D4q74zCUϥhK&T8et)Y=X>Tt6/B2-'d':_~z'9~Jie&7@M"bseb&zA5;&[+Yxؽg-bebN~WsVz%s.QأK) oVA mrUY$u~]N=j7: ̸Voر0et.RX#&N=) 3܄ËrKaIN~vz3&nPv.ՙn]ZCGusE.8ͪ\' -#a6ʺm|H\P?jɤo-Epff> ;٨vz8, (czƤaȳ *K@yބ\lm+tvlx!κWUsIjǂg)DN(UwO%THvTYL˕j߯PN,$x{IO%O--WUhfrQ{],6)bC!*"/?&4~NEΔjY+010!0 +,'s 6ytVFADEQ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmlenc-core-11/RSA-4096_SHA256WithRSA.p12libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmlenc-core-11/RSA-4096_SHA256With0000644000175000017500000000753011703337722031112 0ustar tonytony0T0 *H  00 *H 00 *H 0 *H  0PaTL݊uJk߻:(z:\io$ 46r '~8Km]|Yj9mH_Zd3YPT-lf85|N7۸,GmF3rDqi%ϻҽ ]N ;NX ٗىqF+n|?;:qu r¯'&xjX9ss> D)e[j3PՑÊ:K} wl0E͈4~4.(Q%)υe.hCcy|CuƉ~ ^h(rjN*K4 21O]+xՖN1"bJ C@7+5Dreh6!ֻ6+D/D duxJl೤?m[c ![]-CrJewAmI&9'"H[j{2oƜTg=`@{w/0E04qLɗW8tM1u'DZJAmF85djsK/sKp٢ڀkVDŽhLՀ?H0-z^R 'WiA ŸFQ:4?d*s%Z!]bj vXTZ؄hȟ#T!0~]CuCƆ o؃>.+WFpIJCbzOJBRt ڤ~I>'z;< s8%c:K:2%+n\`_NRTc e"pq33T]Ɠ1 F⒔7 #i\_ d壼&ѭj vP^.G+xgRnS|-Q1O:''Y8?d ^-Ďx2TeBg>ђرcFLq)gOҠ dٺBV FJv x~jIoZWtiCOIPŔ;λ;yH,P w$X4\x Kjµܕ[#.BX Q͛[!O79s#U!u%أxu`BN|+fiC5:]T 4%NhF+1Yh$Wr^.m ;tn$ffr-u ;CNsO1Jp#jQ+T`|SneX`5yRv9ƺN/c/7OD 3n=DTMGRi mq ,ήj-,MXn|Su>McB{Wħai$cpz;*;D,ڽN6CI[~-Ȱn}tp?3SPu%fL Ȫ6Əl WCD5LF)d^&9ם1,=KUV0"8᥋о2tnˊIUf*HGU;U7yro`i{86x^5hRuiѐ(?eQAN0*wS_a*T$0x'"ٞ 9YV뜡CѻܑG!Kr[| 9|#c]x*1}z3^e4s]#9@G)V { Z_L5Y# Iy5sE¬AA$x,@0y$y$I%-{> ܂xys5K'ΙiٞfdŸ:vB nU;Sd>BV)nk}ev+[\/ ?_ ?>h⤜̈}R[Y~&w;)*jLaXymM _'2ozm״nL* Kq spade shovel Dig PLC, 1 First Ave, Dublin 1, Ireland Dig PLC, 1 First Ave, Dublin 1, Ireland Foo B Baz 1234 567890 12345 ././@LongLink0000000000000000000000000000022100000000000011560 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmlenc-core-11/cipherText__RSA-3072__aes256-gcm__rsa-oaep__Sha384-MGF_Sha1.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmlenc-core-11/cipherText__RSA-3070000644000175000017500000001000311703337722031560 0ustar tonytonyMIIEIzCCAougAwIBAgIIbq7SbMmGOkwwDQYJKoZIhvcNAQELBQAwNTESMBAGA1UECxMJeG1sZW5jcjExMR8wHQYDVQQDDBZSU0EtMzA3Ml9TSEEyNTZXaXRoUlNBMCAXDTExMTIxMzE5MzYzMFoYDzMwMTEwNDE1MTgzNjMwWjA1MRIwEAYDVQQLEwl4bWxlbmNyMTExHzAdBgNVBAMMFlJTQS0zMDcyX1NIQTI1NldpdGhSU0EwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQC0qPxdWwaPghF84aAMtb4ubNhGjqr4vhsgbvcqBFTcvI7nMV2DTj9bojdib9sJA1fhKJxfL883+ubEs7u1AyQ7xJuegZVwH6KKTV6N6RHPAQgtpA95s0lWr8euXrwCeZOF2N/Pz/ke4Ve+HHXcBsPxPF2JJX8oDET99RiYamrp9VjtbsUCmDD1P6XEDua4tId5HrKfskZtYFYsyAtog4ecA5kideirygwOk5sP9uo15MkYR2nIkn6RIxPoaPkfSnIXrJQC+Q0a+SL1mmdnEN0Ly8brewgiKZnc2swuinDe6boSCVt8CJGEJVQsjVurTV7dFsbrLdDN9j5fDjv0k8OFjB65Sb04QXts1HiUDUIDkb9K1BSlQA8Cwt2AQIitP/0f6drmlQgvLrgnf4VXTevOrhZ4Cmi1sAHXQKBAmATaUh9PNfI4Qwoh0IjriiBoBLXlvVOypEmbBRrHtlhlQrsWwtY48hceQB9ny18xPyfMEqiiSgCGSbxWjGvwJNfy3xcCAwEAAaM1MDMwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQUJkY4RV69EfMztTxYScLXGEd9s6UwDQYJKoZIhvcNAQELBQADggGBAJKczn1A2Pi90DNZT8i5AEU0m6zPkxH2byNK7GBQ0s2RCR9m/P6k2ei5J74PbXOINT1Q6MDTpYqeKYMUXCrGcAxYIRmmZnywmHzbljwbbFScDi8nHmEX0DnNUa5FU8wS/LbuL4qJ9cT/tZvOAiTLN+cbJICbWdQxU1xOh4jpbfthX4TwwBz/eV9ncQfK8lR6MxpkIfuUaN426ZNFp63ZgCbPWYqTRcIeZWPlpNHkTHX8WT+nZqGnFoE1LSBular0RGpnn4nNmiAuZgGNCpguloeYFIShItZpTDfiQivoMYUI6UzLOJgizvN48oB82m942LKCGk3QBT9gLNHf3Lnw7lEb3u3Tg/8ULCbrHNafUSHdUqbnBwwT7sWKyRWX2dxEy6mGJpTn4mKNy9jYRE0y2QlSRBLYdaKlTNrbw3yvSVvM/ZH/lIVaKv64h7lQYOQ7pOcBNmg4AHXS1NzWPYiGSHqhpP59xBHxN0CIW02LRhd5MU7Jem7zdWTsRl0n5etkwA==CN=RSA-3072_SHA256WithRSA, OU=xmlencr117975543354799045196CN=RSA-3072_SHA256WithRSA, OU=xmlencr11JkY4RV69EfMztTxYScLXGEd9s6U=dy5kcPyIkFfTDOTwXmk18TUjIpQePXXFirX+GMSQmx3tKRCWCUcJBDdm5mu+vsKBNJzATTVOk+NujEpngX2c84TZG6zk0ldwTpsCPW+xdQDPcTn6jbdzWsnYvXZYG1HTrzxGLJRo8poxasmCGbEEzL8U0eP0aOt//ZWrqk1vI8i4A7R+rHCBBFp1PfR7WC0wG8Flh+ldTVtS2ThD2/xi4EwEjugEKvEem0BZtkQ9TI3iRir1NX6YRMnWBb4NEpz8V7moFFFfHAkouf6UJJ5nrgyqx0BjeLjGSA9NBqRhZstR0U35AVkMVDhdR47TQxeDwXfJAWOoe580YUxcZk/xxffCj9BWxqa0Bg7Bz/lUepHbP0TN3EcGVBQLPHARYbhbmpvR23aueFMC4I19Rt6y4v9r++Zy4rzbEWILnx6qBW8sOqNbm8t5wHdx88umgYwjm6YO/FSNxMurpiDuIgj3rXrqEobyFjpLLawegiZunLPyQCVSy6cB14MWPxb4buJuamntSk0OPlW2gAAD4s6pjSB1/IUZ/J6Hpr6elth5MzhxE5EdNZ4JeoL+TrJh8U5qEVi7h1jZhW0klbYUZs0eT8k5YDSyNJrSp8k75UEuLTPgZ1Sm5tYtcDANWHjmVwO7zWgU3yoCtycVoMor9mkCuIU7TEbneK6Un9r4ivbqyyg8mqv3TGRLVRmc3UN8r77E4pKGIbq9rOmCgamjlH5zVYJ+kH7lBAGtBYHDsyXnrDhD2gfcfVTZ1hw6CfmDsV0ZukjTCDYsnbNzElM/lrf61t7VLfv2Ya2VXYnnHOjTASaQx+DorZUn4ICDJBW62HeRtHRuj3lRYBblK5hh4drjJps7BItqhMgMpgEWgFA8eXAKRiO64G6IhfXBYUV66pXrUkzTihrQzf7VmV0v+3kOz5VYiDkPQjxNQtnSCLi4VoJlSTcT9P43doES/J0pzmFnED6WCWQwjc7JwdMls+B5AxBSOQXY814Wr76XJoaOx8Od7Dk54K/t9XAonCy37OWYLd6UHfcsj8IQesyu9kjMDm3bGP+qp6RUk9rQQWU3KUPyhxfvbAiLnZ0gy9aGp1rv/gqCWQP3FimdlG6hXRnuXHalgasauBohDYUl1TfchnvRlyaIve1lPq6o4m5zujaWrtPPOrmimwXhwbNM7wf3COMMk9EJmfQqyg8sOzL02//UaC/IeHUsh0LNJi55wyLxOvMYkP7Uh2VEJk0R7iBF8hd50RcY3SpPYz2D3AMCJmNRPRpt/c2z1+nrgNeD3RvFFCy6sdNttVck7lXsWYcqSG5pTSgsSyzTcg/Ymm3zQRsbtro=././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmlenc-core-11/RSA-4096_SHA256WithRSA.jkslibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmlenc-core-11/RSA-4096_SHA256With0000644000175000017500000000736711703337722031122 0ustar tonytony importkey4Yw 0 0 +* nӫM׊l-ΤfPE3Сޥύ3<qn}!Zҷ&iOmk6U/uUVx3 Ƥ!cO5Vj4GF5ʍЃF<07WD[KB&X V*o=NN|r^J9\]*@k!^ < &b V lBQ| E#q>.@f%lBr?'n ʙ@ l;49ۻQK֊r[8EnċM;QQ3ҜEY9-l4*)}`wG ?`? u(+噭NT;i:[u]RW~:9u/GVMs(ʬY94Ԭ=!%,H<ƺhFW{A},2)@*0IAxLnCܻ'h>e}F4p%;=7Z-:ϯz$])%bv/ng/!Ur_XpjG{RK aw_pRG;Kƒ$o~w @@ޝu euͰkʌak2FʼnӨSEl>PEa*;&I68~huH P]>:c5л{g%h,~J4+H;8s&e |ū)1H)?\܃=h(PB(F\ Đky{N ;W2iS ۭTRhh"̜p:U0{nI&` z0Uʘ[ +빱6lSR+LfMwM,/"*w?ʮT:HkO!?Ci/`J{ok?KT&TSATT‹z>Lb=z[%亙0<~rZ|3M -Ƶ H.[j~Hh>RI=Mz(hkɱbb͂gcBID뱩II1RUAg#p2$ [Յv4)B;Vgk L!CfSpHqp|w jt\y 8P:F((2Tp Va7ÎÖ2eskjh6+>?H/&s4m. tSFN")j"S>"YGp 7X4ĺS _ uBĆ߉AOdjRGe]!}`>٭}/ܴUS GbiN\ĥևâ4D{Hf ] XYh pp}8TL2er8}16TJAK[X&i>̷g7Sr\owX.509'0#0 IiPx0  *H  0510U  xmlencr1110U RSA-4096_SHA256WithRSA0  111213193642Z30110415183642Z0510U  xmlencr1110U RSA-4096_SHA256WithRSA0"0  *H 0 >E JN6Ģ?)߫|.4Vv6Gp(;hg.׃lv ۗ}'[ɻ˃aS掝R]c^') ?jV*&$'%\@+ ]v)+|2dbr(&׻! T5 yo4ٝ(f5Cr钺{:eK#-}d=Y! PV"()6U&X p'31B Z-m+ ,N2*d"FF2zp*$AݾƼ eLr\jxYb|:!Cp_={:k>wZ?S DHˍ˳J{MJ5{TA$fy'8(xz6MBG<g; H|b,6m?f 5O%gђ )̤u fV_r쓿 kXxLyu۫5030U00U '1M6:\ 0  *H  E#l2'maWD&Xʅ_+D5(?$=_4{?.rSybs70=5ap[Ӎ+x;;g 1vI,9-Bl4d 9 hyx#Y~(Z#[TGmA NĖCAN haAtgwG}/ª.TH6Evpr`sH #9lOe&uq꧈Xpl(Dgs)8Mt>OW3ZF+i' f͢'ss`ßJJ*^ro3 /}81%KP,cCӢe0Q3lc% !=VAËN@_#8>ƾ u ^w촕$&z`p. T6$`3Vc1?KWAdD)bt4m@lͪ}Ph$3#ɥݲx.uIf- hqUƯ,Xa̓2lEh\_sCc]nq?-iWhD9Fk3)]Y}&`2y *VZL] b.d3bh Q:p3B_LaKB^8=w3 WIwSі hn5B!5o1[VJ"in">uN3w5zAF]۾n|3 cvG`ɬ\oxBU0Ɂ%ӵ| R9Pmdѷfmvj#Ktq2-T5~ #ҀzɁ"h9v5E\s1tK[0KD"%!*R!EB "]Cݵ ÷`f^N;fɯi> ,\^ 7sF2\X3KXKyC(;gn>RQ-F##N]/C8)z2OD+P٘z;kW&L?hk S_@3GﴵX0#o_u5zqڛŽ \J <Dߐ-Ǘf+P2Rdx'UGw[4Ig\Sp X`B$XjڿwFQkImxɯjX́}n)%$ ͸P+W!ƭ9u=+q)幬 tER Ӿsc[oT 59Jڲ<-j L[oK?`M%uGo;UiX iQ\qxү WcQ[ S ($t5tIilQ>iE-1 >sqƹի|"Jzmmf\6n.m >UeZ| hCDlg,*'9O 4:l!<yX.509'0#0 6Dޜ0  *H  0510U  xmlencr1110U RSA-2048_SHA256WithRSA0  111119003753Z30110321233753Z0510U  xmlencr1110U RSA-2048_SHA256WithRSA0"0  *H 0 +"3u۷#<6IL|3# $n= H8v!Vih,g~ -^VskA,+wN3L&.K6裶"ҙtLcgT){>n2`,+}9[;) 6{ 8b]P!%,ovl*NZ -Aױd,$fV諓w3oK}0s]U.LNڪwg <6 5030U00U:4I9@'&z%,`#0  *H  DH3!Sz݂O}ɜ~+l.Ph9>SYTo 0B g҇ m( gJb.i7)İ5e>E00YP .wkB\Qy#2#gdΜwf=4/!vx G ) z*qcqv +j?(F#t=i44+it%w,4TJ?3`r"?/,u5cb$././@LongLink0000000000000000000000000000023100000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmlenc-core-11/cipherText__RSA-4096__aes256-gcm__rsa-oaep__Sha512-MGF_Sha1_PSource.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmlenc-core-11/cipherText__RSA-4090000644000175000017500000001105411703337722031572 0ustar tonytonyZHVtbXkxMjM=MIIFIzCCAwugAwIBAgIISRmDaVDMeMQwDQYJKoZIhvcNAQELBQAwNTESMBAGA1UECxMJeG1sZW5jcjExMR8wHQYDVQQDDBZSU0EtNDA5Nl9TSEEyNTZXaXRoUlNBMCAXDTExMTIxMzE5MzY0MloYDzMwMTEwNDE1MTgzNjQyWjA1MRIwEAYDVQQLEwl4bWxlbmNyMTExHzAdBgNVBAMMFlJTQS00MDk2X1NIQTI1NldpdGhSU0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDdPuDARdPJDOcKv0pONsSipz+gKd+r2NXZyXzdFPHyja4u6NE0Elb0dvUBNqNHg4m20HAolDtoGGcPtPsu14OEmsIQkKYabKl2ILDS25f2fYr+0ycFDvSGo1vaybvLgwFh0sJTHOaOnVJdY47mvV6xJynTDD/FalYqJiT/gSclglzp/UArCwdddikrfL2owzJkYnK16igm17shzwz1VDXZEw2jAnkXb/6bv5k02Z2jKINmNUNyzemSupzBEns6ZRnVz0sjLayYq32a1NVk9bfQPRNZIQlQv1aUpCIo+gCZf8QpNvG1VSbApVjSIK0c3HAPASfBM5YxQgwNWtYtbZXOK5INLE4ygfan3RMq+xpkIvqORv0ZxM9Gm4oHMgGJAaKeenAqFe6/3+2EGiSIz9/ykkGp3b4Dssa8CWWJTIRykhRcanhZH2J8Ot4hg0NwjuSUXxoPPeB7OmvB/j6Rrnd/t/CDWj9T/RgLz8JESAThlfDj5+P8y40SvLzuABuGy7Oh+OaXSol7rU3JSvk1e1RBJNnrFvWXZnncJ/E4KIV4eq8SNu9NQkcC1tYAPJXRGGc70xsMSACMFIarfGLq0iw2g237D8brP2Yg4wqgG4w1TyVnof7RkiDNGge7D5wpzKR1riBmVl8Hcvbsk7+XDWtYH7J4iIgc5kx5oxF1vafbqwIDAQABozUwMzASBgNVHRMBAf8ECDAGAQH/AgEAMB0GA1UdDgQWBBTvlsjJCr66xvzlGie6jjFNNjpcCTANBgkqhkiG9w0BAQsFAAOCAgEArYIcRbgjbDKbJ23J62GkG1edRCb4G1gDyoVfK93lRDUovsCXPyQ9XzQde98/LnL5s1N5YhhzN4AwPQj4NfYFsrVh6RmNcFvlENONK3g7kjuNs5oT7ppnGvDwDTGdpnZJLBnHOS2aAkJsNGQKxjkUCopo9PvthnkUkXgjWR3r+cx++s7gtyi4f/+ZWpcjW/K6VMYHz0fdFW1BvcP0CyBOisSWQ0FOHwyZCuapaGG5QQR0HGcS+Jp3R4N9L93UwqqWBi7LEFRI6P3iNkWD+dXfdg5whHKuYBuuc6VIICMQOWwHiE+pZSaudRiQcZDqp4iOWJBw82y4KERncyk4FoaNTbN0PqvVT+ZXiYnhM/pak7+ARpkraSfYzQ3Z5WbNoifxgKBzh3Ngw58HwEpKKl5y/sVvtTMBCi99gpE4MZzOJUvNUJWYhCxjgEMa06LU+bZlqjDYUTPqbGMl1cPyt9UgIeaKEz28Huf28FbyFr5B6sOLuE5AXxTrI784PO4/ZbmMy7gq5yBSo7a1xyMm1UzM2KhxFE7TkHJ2if8v4G3nR84fpf7Akn7EmcaHoEPZMH3j8DawNKMxiHGn7WCiti8AYdxeAeRQl6dCzqbTvpFf1ITeCbGe823pBd9fYM26kw2aVHBx7W1zq1RfSenbqlVWcGwQ07BkEBz4pGyAiRQen0o=CN=RSA-4096_SHA256WithRSA, OU=xmlencr115267385727536888004CN=RSA-4096_SHA256WithRSA, OU=xmlencr1175bIyQq+usb85Ronuo4xTTY6XAk=qnOYp/1MOCq5eRd40aP/NNwQ/B7BmDlxrdsHtn73T2ydoVjQkmaG8REuTVJxJQ8KKKaIuwe67kdvt5S2rrjRrK9QzgNDF03+dXF7uM6OQt7qLEKTPXfhkilgR2hRvtiyzw83SVQIPe9txT91zP4hvOVqaR99gnvur4NXCVvqvePeDEz10R55TAw55KLjkMLGSb5B2LsX5Cp+FTFtztsgt4lbsFtR749d3UB7EbR4rnkSLqlU1x3MwY4kyu6vlKj53QBCXgLevQN0BwaGw2Ksh7rekdb0kZhmHo7zLGbSg888l62zvWq3Lul6NA4lXZnVaKfQFS9yd7tAfChtq5nqsMzoZZpftcanLv+pAEimGJy3fhR8mZJGh+aGy6nuSXGTKHLd4dWiOqgnT2PU2O19xHiMaOBKS4PNB7Lv5bWToDwlAZn/Cdn08EDfA3SKH8sjK3I3QBbPM/yOeeZNn/8hFDhWxelNu3JFMaa2i1vXTHF+qHJod1E7oJBIdToNogUQcCRP0vLo1F9kQVZ/mVa1VZgEE/YQkwY5nuMsLrbBKN8eO9Pw9VSddCVAFBUNHBSDo+THOb/+YH31dPslCSrE2HQIT8o3zsSmTEQxECALnnYvgPTc2RhbGCKrZNL3T4j8W7zBXMBhKMLC0OvRLDfHxcG3RZj4SD//PkEUR3hqwEw=amntSk0OPlW2gAAEU8mTFewf23Pj34Ap22gbtgjeyMJ4DfIiiaIA5NnabFNmUYDF31vObS0x7JN/wc5ICFGjAbamirOLu++Bo0zr8N2EsN04cVxbfAYDOEfnr4hqGpql0om7629E/Z5k7BniXBWCwxNAACzuoJw643QjMl+K8JO9kZiy/JJfKWghzrtX3ummLY9QHgGVKHW2FMfVTeNmOyy5Izj5cPqeDUT+P4hYJCoqMwDZouE7CyTRXgJ+WI7MOnsG9jYJBEl39YgDSr7nZ5dpV6WqtrKFcmvIaE0RVDyeQcDF2wa0kqQPnRJvdaa8QknAiAj3jT49l+uWEP0glQd7iwsH12Q4LkzEBWZA6aTmmfgQn1Q63GSMqOg8YKYc1dTRnaIATaADf6dXmtt1UYKRV2wPxFKrwmdQ6rxoeRNbT/rdCyoSAsfeT/Ej8SpCNRAcN1za03ciMVd6pWfWeUwjhAl7gIv4UeuOnOp1lqbUwjq81d6Ac/GEfKZxxExxGbQXmCen6jCHIk/k1lh1rQwetwUmyl51tP81Yn8S7l0vD33TdGaP/hIFAwKSmRdvB/amoSQb0ofOtZFbEYl0iENHz+L6fD5MKntd7Tq05FCOXQCDr2hcwAAAApgpMixhyE8AbywIJu5o1ta45TASopCQlyM1zxz9Uz9xawGCtDhuLjDo2StvFLSfvBb9nhFWWe/Mpm2NVUk7BTkdLul4k8vjvhVatGRGvuytwEW8LlhrgHWGvy3nJwE0IITteFhHVVc2C/QmLtCUMdwTmrQMonWAt1jlzIGpd+byi+fARtCgljw=././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmlenc-core-11/RSA-3072_SHA256WithRSA.jkslibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmlenc-core-11/RSA-3072_SHA256With0000644000175000017500000000566211703337722031107 0ustar tonytony importkey4̿XA0=0 +*)Z@U% ~ 1x<e$I\A3'h!b牀p_[YH8)Ԑ[۶5Ш=cAnX:7SLқ &2PՃ%u V4wt侐õ܅{h`@Z>Ei%ɿgU}f6h,?b Ȇnn퐡|3eFK5^j}0_LppV-3,y;bZ#mhgÃAUJ E[(7}s7t8-{Jegί$yuukFUI"}NhcJ QMU溣, (-ݣ[l5t9Yٱ$ц{7G Z*X40 }Ѣ?x'ݥs?!4#FU> jgT ' It j٢خi|z6Vyۚ.@&{H 8?a0{ken0<!`J+Ѻ;jFH|t׻'cP\;Nc.2Kxkʚp'A_ugNڞ $f- `3To&mC=rs"Gs6qr:U!pjjVP1VcS}S+@6@JvS;Mfߙ#!$u{dYtZ0E(C4|q`k (j #^wc"q؂f4|': KFK Oښca -.&ë(HV35iX_11cߺ{^i0 D/_Oy~>qhdI;Ĥ?!Dì o#o7Yn)`[_U_yJ^c lVc/HAszp+R>wl=|_ ?fJg34~Z2wWuT(?Q[lНˬ@j%|nZzK jva)G,KXV ,ovtK jII<Mwf ?CS%YCVEsO{](D-AY.L0nي+xoǀ\/ nD(G,ܷė]k 0R%V(l@e0cҮN)Aϓtlp&ygya6ڦ'&@uÉ˥ny#M #[H_xPuq!WfvN+0.+=gHmC0GXC.{AwHJ9١C疱C^+X.509'0#0nlɆ:L0  *H  0510U  xmlencr1110U RSA-3072_SHA256WithRSA0  111213193630Z30110415183630Z0510U  xmlencr1110U RSA-3072_SHA256WithRSA00  *H 0][| .lF n*Tܼ1]N?[7bo W(_/7ij$;ěpM^-yIVǮ^yWu<]%( DjjXn0?渴yFm`V, h"u 5GiȒ~#hJr "gg {").p [|%T,[M^->_;ÅI8A{lx BJ@݀@?/.'WMήx h@@RO58C !Ј hSIǶXeB8@g_1?'JIVk$5030U00U&F8E^3 test lYm2WdIYViIUpz/LlDMoTUU8PEg=VewlZHE765bKW+Tn0kWu7stZ+8nWQdzyDdihzVRineEAGRIus0aSs7UET+gtIdhI7a/qnZvnum7XqTdSZjxRnDUNvtj9rWlj1/066J8HeePZwvYQTMkhAe8ilLbUh+ebr09VxjWvJlRjp7GuyWzeZpCPfXT0mKhSyRJK1Q718Ez61cAWEZgA71PjxlfwmhGrU13H1elDUHS2vtky4er6RwhfujxSb6tFQzoL9Kzo2KrUfQ0ZAII0doRtnT9gkJ/k0tuT0H+NQw527SwOLxncHRS9wcnBwfxNx3XTnPKfuPgriZ0XVN/IbFTeBaTM4h9Zpw1d8Q7jdCrykrlcpOR96A==uu/6Yl9MkP5WIq1m3drH0s8esR0Ye3Wowfvi3utzSzUFs59K6H0lg4dkbL9Y74pDILpLBcVyD4VjLmvb0xRzAUrhmGiXwwMCwJFFN7qgJu3vMhtA4OimyZlnvXrGnLPA5mRe95pgEdERqwcgZUgkLmElKFC7UCSGdSMmvlelXsxp6ATeC1Ux6BUwkIEZPnh4qrz+7EN5J9O5H7qNqg4Ppn7959RYwMa6llBl/KVpAwTfprqrWp5zAeNg2jHEeGo/eBXltkplAespebAMISi+zpfGW1/9rt8WT4Kp4YlgiJSP5C4g6FXCyL/0vLywSYqh/aKsg869FgUO1hmM1Z6Wfw==AQAB././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p256_sha1_c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p256_sha1_0000644000175000017500000000206611507151375032044 0ustar tonytony test lYm2WdIYViIUpz/LlDMoTUU8PEg=hYN1zwpiWJaiQcr0WSGKzHgA+LBWRxy0a1RRu0UjRQ63HiMGJGnow/oddFCF5sAXh5eHPQliaKfa0wJKEduOUQ==././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p384_sha384_c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p384_sha380000644000175000017500000000232111507151375031773 0ustar tonytony test tWRBoAiiZHBqiSW+U83YvB0I6MQ6nQVXm/MYehSN1hGg9YmfrhewrXPogsBQS6G5U9iodk6t5/0eVOf7I0558Vp/fHeA2Lk2AtF1bbFNcMPbqgfnrRPCdFSvmJsjSsrgYxu79udqWtl4nSuDy+irXxUJBSBVP4yPBiLIwiRe4qo0qQbOyDpWkTl/wNzOd0NV././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p521_sha512_c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p521_sha510000644000175000017500000000254611507151375031770 0ustar tonytony test QlLBkpXWE7HpXTDf6pdEg15zO+R6bt9+iE7y9pHSPaST8hflFt1LM4IzbIzMmgfSs4Hy6y4xEcmjzgiOzTwyJg==ADBmB27Ps/Peye1S90Mol1To52x884+RJuBdMBpsdD90IwV/DmgWSEFLJ5W/D+PWdkLS+myGqkinaHehxDKAE5trAGltkMCOsSEDzoD2jhbyOEymSte7Jo9R1iQ66fmtW7GcYejGhoy71xdHkGp0sqdt2IpH7/hpPBHX/TpcHqioYyAs././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/hmac_sha1_exc-c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/hmac_sha1_exc-0000644000175000017500000000112611507151375032217 0ustar tonytony test lYm2WdIYViIUpz/LlDMoTUU8PEg=92rcv0k9uzjE5+4aI/SvobcIQgg=././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p256_sha256_exc-c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p256_sha250000644000175000017500000000210111507151375031761 0ustar tonytony test eeqPdoccOliD2TNE8OGoEDntw5zOJzpuSdTfU64vEAA=fenKeD96oolcEUyMqv+Z1c1kedbSnPEM/Nyu+13MtAlcfcxkc0XSfc00iP6ka7VJArcOHgElV+wmwzcTUziVSg==././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p384_sha1_exc-c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p384_sha1_0000644000175000017500000000223411507151375032043 0ustar tonytony test lYm2WdIYViIUpz/LlDMoTUU8PEg=acOaEkmTSSsXPmwj1q3cE7fFumUH6i7eIMrdBh2bJyQBKEuz3laoGYe+7FYHKJZzfGVUiFDRUgIm5CuBySDKbpEADYrDXWKWBUX9HAokKSmFNA2gF8u1bVIVcBa2KlLF././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/hmac_sha256_exc-c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/hmac_sha256_ex0000644000175000017500000000115511507151375032155 0ustar tonytony test lYm2WdIYViIUpz/LlDMoTUU8PEg=SRFJGOLrsRwhJumgtiFp2ecZ1V4v/dnPXMHTi6SMT7w=././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/rsa2048_sha512_exc-c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/rsa2048_sha5120000644000175000017500000000263411507151375031652 0ustar tonytony test QlLBkpXWE7HpXTDf6pdEg15zO+R6bt9+iE7y9pHSPaST8hflFt1LM4IzbIzMmgfSs4Hy6y4xEcmjzgiOzTwyJg==hfFg2ssLF7CcMwgWCjaQlM/UwDwQAc9NMwAqX5db8LggfxfLq91GX2wwugW1HRIXu7QEWQQmdhz38Z2Uyyw6aBTFuYzDJfPXm+L+Komij80OgiYXVGv6aO8NCai+HJStcrSlVzD9biPlO1g4Bgnd/Dwm9JlIRWnzVDuvSDxY00o057ZEY+jnam6kwvf5mikyIhExhjT4+rHuAGMz7oe91X19pxhi0KdP563OqVy+jUXMJ/fAUNxNS8wqZhaooO1AzyKBkhE9a0EZI5aCBqU95nDbWbMxRAqiRywBP+lip0X8q3G91ndWtPf/8SNq7PoiRLPEYq9AD80eI7TPWHgCoA==uu/6Yl9MkP5WIq1m3drH0s8esR0Ye3Wowfvi3utzSzUFs59K6H0lg4dkbL9Y74pDILpLBcVyD4VjLmvb0xRzAUrhmGiXwwMCwJFFN7qgJu3vMhtA4OimyZlnvXrGnLPA5mRe95pgEdERqwcgZUgkLmElKFC7UCSGdSMmvlelXsxp6ATeC1Ux6BUwkIEZPnh4qrz+7EN5J9O5H7qNqg4Ppn7959RYwMa6llBl/KVpAwTfprqrWp5zAeNg2jHEeGo/eBXltkplAespebAMISi+zpfGW1/9rt8WT4Kp4YlgiJSP5C4g6FXCyL/0vLywSYqh/aKsg869FgUO1hmM1Z6Wfw==AQAB././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/rsa2048_sha256_c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/rsa2048_sha2560000644000175000017500000000257011507151375031656 0ustar tonytony test eeqPdoccOliD2TNE8OGoEDntw5zOJzpuSdTfU64vEAA=ePMRuEyubVZc3lbGyCeNovcNQWIQ30mK43oe9d7UON9XGxv9IRTdfD39tKtx8KcupHo9sBLQ+AzYsbvH0cBuJI+yvgbjFtYM+w7NKQlhDjQbBHRJHttTybu0FAIQGkIgy6Fpp/jUhq696aMyvw5t2osOvx+DGxzbR3FG9yK/rpRb+OjkWQyu9XgKtQZuz3YhyvAMpn5Dj/YNEWSP8KXErhv52BWHyfDxU7iOkg/gx8jmDMAH/7Fo+pMajJc4fIUukiVIuD9233POvGj4pSTCxv1xRIhBLnPmCPj07pJ1qrYRknjhMbFHikyDJKfFbnb2eql64A+r1/Wo2o8xJ507rg==uu/6Yl9MkP5WIq1m3drH0s8esR0Ye3Wowfvi3utzSzUFs59K6H0lg4dkbL9Y74pDILpLBcVyD4VjLmvb0xRzAUrhmGiXwwMCwJFFN7qgJu3vMhtA4OimyZlnvXrGnLPA5mRe95pgEdERqwcgZUgkLmElKFC7UCSGdSMmvlelXsxp6ATeC1Ux6BUwkIEZPnh4qrz+7EN5J9O5H7qNqg4Ppn7959RYwMa6llBl/KVpAwTfprqrWp5zAeNg2jHEeGo/eBXltkplAespebAMISi+zpfGW1/9rt8WT4Kp4YlgiJSP5C4g6FXCyL/0vLywSYqh/aKsg869FgUO1hmM1Z6Wfw==AQAB././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p384_sha256_c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p384_sha250000644000175000017500000000226711507151375032000 0ustar tonytony test eeqPdoccOliD2TNE8OGoEDntw5zOJzpuSdTfU64vEAA=bKZDcxIB0gONlTAKHrbos/ZErhQdABW+y4SaJV16J/Uqy738kwf5E7gaWVkUcAcqVFJe+bZ+MZsy7yFsFqAAawXvY0MiiX3thIjCgrQ3con7ltQ/zr7GNQuwENkVDxPd././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/rsa2048_sha256_exc-c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/rsa2048_sha2560000644000175000017500000000256011507151375031655 0ustar tonytony test eeqPdoccOliD2TNE8OGoEDntw5zOJzpuSdTfU64vEAA=DQ/1LPapv3n/F/iu/ZA9aXJUhbfwXDcP8nFIfTz7XAuz6T0RbngqxfEnS0OEAkCzTtl7YyDuLY9+YwILXzx5pIvOvvwnwnVfeJUwReVlWoM3x37dROv+mF6DbK6OkSYaQh5JFxF9jJMfsGHwGeH6jcg67ISh8SHn3K5kxcnTJIwHiUKTPZmhfthUzipiUvBCGDN6FLMfmmx6lb4IYrCblR0DRWyJhuT+AZuiEzy18TR1+bd0AZ7GWYUsjiGF+rDZZDLGovyL190l723J3a0WpeFzVukX7+I2KpjxOGFZNEjQrqvo+Cskpy46mnP3iq/lkYHhDwzqipEI9sUUM6oOLA==uu/6Yl9MkP5WIq1m3drH0s8esR0Ye3Wowfvi3utzSzUFs59K6H0lg4dkbL9Y74pDILpLBcVyD4VjLmvb0xRzAUrhmGiXwwMCwJFFN7qgJu3vMhtA4OimyZlnvXrGnLPA5mRe95pgEdERqwcgZUgkLmElKFC7UCSGdSMmvlelXsxp6ATeC1Ux6BUwkIEZPnh4qrz+7EN5J9O5H7qNqg4Ppn7959RYwMa6llBl/KVpAwTfprqrWp5zAeNg2jHEeGo/eBXltkplAespebAMISi+zpfGW1/9rt8WT4Kp4YlgiJSP5C4g6FXCyL/0vLywSYqh/aKsg869FgUO1hmM1Z6Wfw==AQAB././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/secret-sha256.hmaclibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/secret-sha256.0000644000175000017500000000016011507151375032025 0ustar tonytony  !"#$%&'()*+,-./0123456789:;<=>?  !"#$%&'()*+,-./0123456789:;<=>?././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p521_sha256_c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p521_sha250000644000175000017500000000247211507151375031767 0ustar tonytony test eeqPdoccOliD2TNE8OGoEDntw5zOJzpuSdTfU64vEAA=AJZMV27xmEAaY9enVMqsbjQOT117p2tt9g8QO6srIqYKNzZ0Re2OUyeP/KQqs8tPWE0pFc4LAdZOb98+YnYDtEdzAe0UBvv9KcHaopI/gkn3gU1hWOOSdE+h+rX6AjBJ6notRxAJcC5ydwLhYggZPQ9fVsCTeOl4ieAz3p2ioLBE8azL././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/rsa2048_sha1_c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/rsa2048_sha1_c0000644000175000017500000000254011507151375032001 0ustar tonytony test lYm2WdIYViIUpz/LlDMoTUU8PEg=DQ8JAM7VV601SRY/Y34AEl8X08MUF2HHBgqFwfWva/cMVW1MExX4zkxWKgTwu671jFbPLBFyIMKvYdr1kAUC0xfXp1M1G5cDo3fW/IX+uV2l/QuiyEmH35Ua0yx16pgUCdUMcX2OICmUVwttlMmQBMz22JjQufx14H8tZuqiR9SVak8BAXp8gPp01wbHErivJMflJHC4te9Rivda+UG3UU3jYQHWaNcKxvOP4ilKLxNvU2a5RnSNQT6YAk9PdAbGJG5Hcl5rHt7HWQGFKAekNjuwCsVbPAhhiuF1qdqCDBQY6Ti8OB78pdaPCahNDp8y9gUZbOLHlhpzLzqhj8GTpw==uu/6Yl9MkP5WIq1m3drH0s8esR0Ye3Wowfvi3utzSzUFs59K6H0lg4dkbL9Y74pDILpLBcVyD4VjLmvb0xRzAUrhmGiXwwMCwJFFN7qgJu3vMhtA4OimyZlnvXrGnLPA5mRe95pgEdERqwcgZUgkLmElKFC7UCSGdSMmvlelXsxp6ATeC1Ux6BUwkIEZPnh4qrz+7EN5J9O5H7qNqg4Ppn7959RYwMa6llBl/KVpAwTfprqrWp5zAeNg2jHEeGo/eBXltkplAespebAMISi+zpfGW1/9rt8WT4Kp4YlgiJSP5C4g6FXCyL/0vLywSYqh/aKsg869FgUO1hmM1Z6Wfw==AQAB././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p384_sha384_exc-c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p384_sha380000644000175000017500000000231111507151375031772 0ustar tonytony test tWRBoAiiZHBqiSW+U83YvB0I6MQ6nQVXm/MYehSN1hGg9YmfrhewrXPogsBQS6G5BUzTvnrDqoeIAA7hnDdStKcYy3vDLxjnNI9e3Fm6p7GdJSY6jrsBg4b+bbpCrEnTMyM7+CKXRe5W7JNYl/6+q4yVEp8qPKM+7iIGVZHq7uQ7QfyxJBgR04sz51v0AEu8././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p521_sha384_exc-c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p521_sha380000644000175000017500000000251411507151375031770 0ustar tonytony test tWRBoAiiZHBqiSW+U83YvB0I6MQ6nQVXm/MYehSN1hGg9YmfrhewrXPogsBQS6G5AATQkvwEWAbPmvDD6ztxYozXMJKB5UkLOJO/2LV9oWqq5bBavLiGLUJ/hriXWuM2C2zZWuOuj5uczP94qYgxgQVSABr4w5PlUtmovoIvVzqMyKaHkx0J2HqSjyyYpwQcBLo/WH4BdQndDNmY6q9LAZ/GR4G1VSJuNY1ahznxayskU9px././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p384_sha256_exc-c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p384_sha250000644000175000017500000000225711507151375031777 0ustar tonytony test eeqPdoccOliD2TNE8OGoEDntw5zOJzpuSdTfU64vEAA=1gbHZTz3QCUSC9l1NPGgpSXfTNwWXoCRdYLD9sVH7mM/v1eDVxg/Rtr6ONCPxyXpXTon3VKTBQxRORQyshPfxN3Fgt1QITPYuTun17j4wHcBkKrscvQrXcVFVgybZieR././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/secret-sha512.hmaclibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/secret-sha512.0000644000175000017500000000042611507151375032025 0ustar tonytony  !"#$%&'()*+,-./0123456789:;<=>?  !"#$%&'()*+,-./0123456789:;<=>?  !"#$%&'()*+,-./0123456789:;<=>?  !"#$%&'()*+,-./0123456789:;<=>?  !"#$%&'()*+,-./0123456789:;<=>?././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p256_sha384_c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p256_sha380000644000175000017500000000214311507151375031773 0ustar tonytony test tWRBoAiiZHBqiSW+U83YvB0I6MQ6nQVXm/MYehSN1hGg9YmfrhewrXPogsBQS6G5zWeFxj7BWvHyE0JNDh0ZE3QrNrYsssn/32xb4z2117L5e6u8cY+Ru3QhR5gHiS7bmSwU3/wDvmmcCmELx2VCiA==././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/hmac_sha512_exc-c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/hmac_sha512_ex0000644000175000017500000000123111507151375032143 0ustar tonytony test lYm2WdIYViIUpz/LlDMoTUU8PEg=xNlBF/pWzUmi/123Ww33uoX1ThXheowj+07rL54Mj83CpU6elebR7MQlJDZ9I+4K8O6qG864m/oUZdSs34jrdQ==././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/secret-sha1.hmaclibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/secret-sha1.hm0000644000175000017500000000010011507151375032170 0ustar tonytony  !"#$%&'()*+,-./0123456789:;<=>?libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/index.html0000644000175000017500000003640311507151375031537 0ustar tonytony Index of /2008/xmlsec/Group/interop/xmldsig11/microsoft

Index of /2008/xmlsec/Group/interop/xmldsig11/microsoft

[ICO]NameLast modifiedSizeDescription

[DIR]Parent Directory  -  
[   ]dsa_1024_sha1_c14n.xml08-May-2009 16:20 1.2K 
[   ]dsa_1024_sha1_exc-c14n.xml08-May-2009 16:20 1.2K 
[   ]ecc_p256_sha1_c14n.xml08-May-2009 16:20 1.1K 
[   ]ecc_p256_sha1_exc-c14n.xml08-May-2009 16:20 1.0K 
[   ]ecc_p256_sha256_c14n.xml08-May-2009 16:20 1.1K 
[   ]ecc_p256_sha256_exc-c14n.xml08-May-2009 16:20 1.1K 
[   ]ecc_p256_sha384_c14n.xml08-May-2009 16:20 1.1K 
[   ]ecc_p256_sha384_exc-c14n.xml08-May-2009 16:20 1.1K 
[   ]ecc_p256_sha512_c14n.xml08-May-2009 16:20 1.1K 
[   ]ecc_p256_sha512_exc-c14n.xml08-May-2009 16:20 1.1K 
[   ]ecc_p384_sha1_c14n.xml08-May-2009 16:20 1.2K 
[   ]ecc_p384_sha1_exc-c14n.xml08-May-2009 16:20 1.2K 
[   ]ecc_p384_sha256_c14n.xml08-May-2009 16:20 1.2K 
[   ]ecc_p384_sha256_exc-c14n.xml08-May-2009 16:20 1.2K 
[   ]ecc_p384_sha384_c14n.xml08-May-2009 16:20 1.2K 
[   ]ecc_p384_sha384_exc-c14n.xml08-May-2009 16:20 1.2K 
[   ]ecc_p384_sha512_c14n.xml08-May-2009 16:20 1.2K 
[   ]ecc_p384_sha512_exc-c14n.xml08-May-2009 16:20 1.2K 
[   ]ecc_p521_sha1_c14n.xml08-May-2009 16:20 1.3K 
[   ]ecc_p521_sha1_exc-c14n.xml08-May-2009 16:20 1.3K 
[   ]ecc_p521_sha256_c14n.xml08-May-2009 16:20 1.3K 
[   ]ecc_p521_sha256_exc-c14n.xml08-May-2009 16:20 1.3K 
[   ]ecc_p521_sha384_c14n.xml08-May-2009 16:20 1.3K 
[   ]ecc_p521_sha384_exc-c14n.xml08-May-2009 16:20 1.3K 
[   ]ecc_p521_sha512_c14n.xml08-May-2009 16:20 1.3K 
[   ]ecc_p521_sha512_exc-c14n.xml08-May-2009 16:20 1.3K 
[   ]hmac_sha1_exc-c14n.xml09-May-2009 00:13 598  
[   ]hmac_sha256_exc-c14n.xml09-May-2009 00:13 621  
[   ]hmac_sha384_exc-c14n.xml09-May-2009 00:13 641  
[   ]hmac_sha512_exc-c14n.xml09-May-2009 00:13 665  
[   ]rsa2048_sha1_c14n.xml08-May-2009 16:20 1.3K 
[   ]rsa2048_sha1_exc-c14n.xml08-May-2009 16:20 1.3K 
[   ]rsa2048_sha256_c14n.xml08-May-2009 16:20 1.4K 
[   ]rsa2048_sha256_exc-c14n.xml08-May-2009 16:20 1.4K 
[   ]rsa2048_sha384_c14n.xml08-May-2009 16:20 1.4K 
[   ]rsa2048_sha384_exc-c14n.xml08-May-2009 16:20 1.4K 
[   ]rsa2048_sha512_c14n.xml08-May-2009 16:20 1.4K 
[   ]rsa2048_sha512_exc-c14n.xml08-May-2009 16:20 1.4K 
[   ]secret-sha1.hmac09-May-2009 00:13 64  
[   ]secret-sha256.hmac09-May-2009 00:13 112  
[   ]secret-sha384.hmac09-May-2009 00:13 166  
[   ]secret-sha512.hmac09-May-2009 00:13 278  

This directory contains a set of test signatures for XMLDSIG 1.1 interop
testing.  

All signatures are enveloping signatures unless otherwise noted.  Test
vectors are included using both Inclusive-C14N 1.0 and Exclusive-C14N
1.0, and hash algorithms SHA-1, SHA-256, SHA-384 and SHA-512.

FOR DSA-based signatures, the public key value is included in the KeyValue/DSAKeyValue element.

For RSA-based signatures, the public key value is included in the KeyValue/RSAKeyValue element.

For ECC-based signatures, the public key ECC point is included in the
KeyValue/ECDSAKeyValue element using the old RFC 4050 format (see section
4.4.2.3.2) for the PublicKey.

For HMAC-based signatures, the secret key is stored as a binary value in a corresponding .hmac file.  

REQUIRED algorithms

rsa2048_sha256_c14n.xml                 RSAwithSHA256, C14N 1.0
rsa2048_sha256_exc-c14n.xml             RSAwithSHA256, Exc-C14N 1.0

ecc_p256_sha256_c14n.xml                ECDSAwithSHA256, C14N 1.0
ecc_p256_sha256_exc-c14n.xml            ECDSAwithSHA256, Exc-C14N 1.0

dsa_1024_sha1_c14n.xml                  DSAwithSHA1, C14N 1.0
dsa_1024_sha1_exc-c14n.xml              DSAwithSHA1, Exc-C14N 1.0

hmac_sha1_exc-c14n.xml			HMAC-SHA1, Exc-C14N 1.0, secret key in secret-sha1.hmac

RECOMMENDED algorithms:

rsa2048_sha1_c14n.xml                   RSAwithSHA1, C14N 1.0
rsa2048_sha1_exc-c14n.xml               RSAwithSHA1, Exc-C14N 1.0

hmac_sha256_exc-c14n.xml		HMAC-SHA256, Exc-C14N 1.0, secret key in secret-sha256.hmac

OPTIONAL algorithms:

rsa2048_sha384_c14n.xml                 RSAwithSHA384, C14N 1.0
rsa2048_sha384_exc-c14n.xml             RSAwithSHA384, Exc-C14N 1.0

rsa2048_sha512_c14n.xml                 RSAwithSHA512, C14N 1.0
rsa2048_sha512_exc-c14n.xml             RSAwithSHA512, Exc-C14N 1.0

ecc_p256_sha1_c14n.xml                  ECDSAwithSHA1, P-256, C14N 1.0
ecc_p256_sha1_exc-c14n.xml              ECDSAwithSHA1, P-256, Exc-C14N 1.0

ecc_p256_sha384_c14n.xml                ECDSAwithSHA384, p-256, C14N 1.0
ecc_p256_sha384_exc-c14n.xml            ECDSAwithSHA384, P-256, Exc-C14N 1.0

ecc_p256_sha512_c14n.xml                ECDSAwithSHA512, P-256, C14N 1.0
ecc_p256_sha512_exc-c14n.xml            ECDSAwithSHA512, P-256, Exc-C14N 1.0

ecc_p384_sha1_c14n.xml                  ECDSAwithSHA1, P-384, C14N 1.0
ecc_p384_sha1_exc-c14n.xml              ECDSAwithSHA1, P-384, Exc-C14N 1.0
                                                              
ecc_p384_sha256_c14n.xml                ECDSAwithSHA256, P-384, C14N 1.0
ecc_p384_sha256_exc-c14n.xml            ECDSAwithSHA256, P-384, Exc-C14N 1.0
                                        
ecc_p384_sha384_c14n.xml                ECDSAwithSHA384, p-384, C14N 1.0
ecc_p384_sha384_exc-c14n.xml            ECDSAwithSHA384, P-384, Exc-C14N 1.0
                                                                                    
ecc_p384_sha512_c14n.xml                ECDSAwithSHA512, P-384, C14N 1.0
ecc_p384_sha512_exc-c14n.xml            ECDSAwithSHA512, P-384, Exc-C14N 1.0
                                        
ecc_p521_sha1_c14n.xml                  ECDSAwithSHA1, P-521, C14N 1.0
ecc_p521_sha1_exc-c14n.xml              ECDSAwithSHA1, P-521, Exc-C14N 1.0

ecc_p521_sha256_c14n.xml                ECDSAwithSHA256, P-521, C14N 1.0
ecc_p521_sha256_exc-c14n.xml            ECDSAwithSHA256, P-521, Exc-C14N 1.0
                                                              
ecc_p521_sha384_c14n.xml                ECDSAwithSHA384, p-521, C14N 1.0
ecc_p521_sha384_exc-c14n.xml            ECDSAwithSHA384, P-521, Exc-C14N 1.0
                                                              
ecc_p521_sha512_c14n.xml                ECDSAwithSHA512, P-521, C14N 1.0
ecc_p521_sha512_exc-c14n.xml            ECDSAwithSHA512, P-521, Exc-C14N 1.0

hmac_sha384_exc-c14n.xml		HMAC-SHA384, Exc-C14N 1.0, secret key in secret-sha384.hmac

hmac_sha512_exc-c14n.xml		HMAC-SHA512, Exc-C14N 1.0, secret key in secret-sha512.hmac
././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/rsa2048_sha512_c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/rsa2048_sha5120000644000175000017500000000264411507151375031653 0ustar tonytony test QlLBkpXWE7HpXTDf6pdEg15zO+R6bt9+iE7y9pHSPaST8hflFt1LM4IzbIzMmgfSs4Hy6y4xEcmjzgiOzTwyJg==eYjFhc8uw3rTzFMtjvGKW6aMaWmHMDCc7CbClTngcbvUggGj3vPgnhBVVk816zliwAkzgnhdeZyZuzT36pwY4Av7KJAQnArAMxf5Ykv6SCnTHx9N1Js+npw7tVBs/fInPqqCgfzAbYfIziQyfuEESCLnIMFjbFRubbaQlVhbMPlfOm1yueYNxo/0SuvYMOVR5CYveig1MhO9EKjJhOhnUq2dCc9cJWWKBmt+nL+0zKvaZ9FZPt1SRjbVBehUI91+wB/qe6YTo+wo+uYHR7rYy+iO9PmbFPG2u0iOH0j5CoMmRfwgxkBqlztt9WRZLBT765MlztCGy0sg3vN561C7eg==uu/6Yl9MkP5WIq1m3drH0s8esR0Ye3Wowfvi3utzSzUFs59K6H0lg4dkbL9Y74pDILpLBcVyD4VjLmvb0xRzAUrhmGiXwwMCwJFFN7qgJu3vMhtA4OimyZlnvXrGnLPA5mRe95pgEdERqwcgZUgkLmElKFC7UCSGdSMmvlelXsxp6ATeC1Ux6BUwkIEZPnh4qrz+7EN5J9O5H7qNqg4Ppn7959RYwMa6llBl/KVpAwTfprqrWp5zAeNg2jHEeGo/eBXltkplAespebAMISi+zpfGW1/9rt8WT4Kp4YlgiJSP5C4g6FXCyL/0vLywSYqh/aKsg869FgUO1hmM1Z6Wfw==AQAB././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p521_sha1_exc-c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p521_sha1_0000644000175000017500000000243711507151375032041 0ustar tonytony test lYm2WdIYViIUpz/LlDMoTUU8PEg=AYqn6mwlEyNxSnesR6n5duh3ZTKY3na/1xmZkFfycNX7VyyOQu/13OCsho6V4My0tArI3xgxArF1iaJ9zUBWF/v5ACNTzmCFOTNPEF3R7qeRGNJg6D8zWt+0ZCx6j3JsCmQigAMRna9G+iZdbQm1EmVQSyo6i2u4QOrZwtLmuvCSuEDG././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p256_sha1_exc-c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p256_sha1_0000644000175000017500000000205611507151375032043 0ustar tonytony test lYm2WdIYViIUpz/LlDMoTUU8PEg=vULbyLKM2+W3H/3QyhYGbUTbX/jZEMz8lhPzRaI1lcxg09Ac5xKfNibpkYUzmFXgqUoQuBFEnngWMzCNAa9TRw==././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/rsa2048_sha384_c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/rsa2048_sha3840000644000175000017500000000262211507151375031656 0ustar tonytony test tWRBoAiiZHBqiSW+U83YvB0I6MQ6nQVXm/MYehSN1hGg9YmfrhewrXPogsBQS6G5dKV7ihXGiRSCWLhvyjwpnRjjXvjBTiUaWqREoaqcOF7w43TfoyXn4wvdFlkePWqtyF6TOWPk1+Cj2CGc7i5xx2HuQGmMRMyGwGDRcfGdcUW4HYLS7Ob4Ny4ZHEjiDGz0sb7KMEiS2d/5c8E+c+6ZsNbRHuD0QbZPwcEj8o9wo1m4BEy6UjNVYpEDA/iJtezxlBuGNva0KBva17bU8TurC0tAbSXzhkitVsrRE64//oBk0Oq0BWjrxL3dLynVvlgfvxChEs6pANSeYFc+j546SkKOU7fcfPaHbSbmcxUpBZ+Bipg+byiFCU8F6p5OsimmUgMb+XesZJdRdw72+TH6aw==uu/6Yl9MkP5WIq1m3drH0s8esR0Ye3Wowfvi3utzSzUFs59K6H0lg4dkbL9Y74pDILpLBcVyD4VjLmvb0xRzAUrhmGiXwwMCwJFFN7qgJu3vMhtA4OimyZlnvXrGnLPA5mRe95pgEdERqwcgZUgkLmElKFC7UCSGdSMmvlelXsxp6ATeC1Ux6BUwkIEZPnh4qrz+7EN5J9O5H7qNqg4Ppn7959RYwMa6llBl/KVpAwTfprqrWp5zAeNg2jHEeGo/eBXltkplAespebAMISi+zpfGW1/9rt8WT4Kp4YlgiJSP5C4g6FXCyL/0vLywSYqh/aKsg869FgUO1hmM1Z6Wfw==AQAB././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p256_sha256_c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p256_sha250000644000175000017500000000211111507151375031762 0ustar tonytony test eeqPdoccOliD2TNE8OGoEDntw5zOJzpuSdTfU64vEAA=1phAoVMGBMthhXF9X4l0amyTDKkh31kvmA0yeTpO0g+ESK6HnWErtSd/eF9f8irzdI48OClRKFGYSmn7MUg9jA==././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p256_sha384_exc-c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p256_sha380000644000175000017500000000213311507151375031772 0ustar tonytony test tWRBoAiiZHBqiSW+U83YvB0I6MQ6nQVXm/MYehSN1hGg9YmfrhewrXPogsBQS6G5o608dHARSGr8z1OY9jd+VhUzSJ6I1RH6KPA9CdyXYaa6yG7uEuvnkWN/LkrMiQIk/6+atbw6pAp6SdbpZ/ySjw==././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p521_sha1_c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p521_sha1_0000644000175000017500000000244711507151375032042 0ustar tonytony test lYm2WdIYViIUpz/LlDMoTUU8PEg=AM8er1aI630w0MCCc81SlIEUS6+qqSTNUX4v0vVc2EHnmpb7IQJbtrzh1ZRV9ceMmc+4zGD3ulOONEv+wMOpQqpDADG0h59OFwCvlLp3USfQ51cLnjvpjutvHF9wqA1rBhpuZuNOyDzFGy+jYCi5QYuqcODfbYJT90EOivlfHOOyuq6q././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p521_sha256_exc-c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p521_sha250000644000175000017500000000246211507151375031766 0ustar tonytony test eeqPdoccOliD2TNE8OGoEDntw5zOJzpuSdTfU64vEAA=AcK+f0xKUE9quzpxacwuhCydS/xTrxFIOkt0R/UvR8pDiV52PZnUL/mV93NxQVaGpXHXafYFZLieOGtEjCJmdsGHAHU6Z51O9MqJZZmMBUc/JOQnQlZU4wUJT/+222spV1j4aVQF7bfRFFv2i8IuliYwAUgVJYOgoRuPMbT7TbOLhbzG././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p521_sha384_c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p521_sha380000644000175000017500000000252411507151375031771 0ustar tonytony test tWRBoAiiZHBqiSW+U83YvB0I6MQ6nQVXm/MYehSN1hGg9YmfrhewrXPogsBQS6G5AIJwbUE4Cu2lsj1xG2avtp48By1SHXIenbL52Q9Ln0fbgXm++cdRFJcN52V8wptPWHCKUoP/i9eKoA8oJBZf2eqbATBS1Nq/B44KppBXBcPNGP0k2W9GMyzT3mIZvDeV1bPUGOmn/vVC9OHWwb2JWppJwPu5qHrWaovKgPKFxtCKOUxC././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p521_sha512_exc-c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p521_sha510000644000175000017500000000253611507151375031767 0ustar tonytony test QlLBkpXWE7HpXTDf6pdEg15zO+R6bt9+iE7y9pHSPaST8hflFt1LM4IzbIzMmgfSs4Hy6y4xEcmjzgiOzTwyJg==AMibh5EiNolSivQJ5SFnHym9CzxYYs4WoEXbcM2GQvh4WuUX0A6UpSB2ot6rIHlfK5hjDAUvNqd8UfRCDS6JqwzyABtyZnnDf3PeJVA3PZVUM/uowudEW9+u9eihUxZjvBEowRWn9HaVNnmXmQ0N3PrtN3XNR5DaqJggeWEMyagyvLx6././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/secret-sha384.hmaclibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/secret-sha384.0000644000175000017500000000024611507151375032034 0ustar tonytony  !"#$%&'()*+,-./0123456789:;<=>?  !"#$%&'()*+,-./0123456789:;<=>?  !"#$%&'()*+,-./0123456789:;<=>?././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p384_sha1_c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p384_sha1_0000644000175000017500000000224411507151375032044 0ustar tonytony test lYm2WdIYViIUpz/LlDMoTUU8PEg=EA1g7Op0oUGt6JDkF+jhqiYfhdCKAfb2ho3ULLP2sk8np118sE2wXEwxiFg0FbTkJeM/Ru30OyJpsgdSg138OrOle8d2AlruX7XWmg+OVZydN1Ep05vYszhO9f4Y6HVx././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/dsa_1024_sha1_exc-c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/dsa_1024_sha1_0000644000175000017500000000236011507151375031750 0ustar tonytony test lYm2WdIYViIUpz/LlDMoTUU8PEg=SooBb8HO1F5I59uJ7SGqNwac/PMhvVgaHdYsfxSlRoEuUrTOU5q5ZA==

jGzNuBuTfYdPRxnpWYVcX6lp9Tbtx8hwSjw07zjGi5Y8BkxbMIlpk3glAyM8khauw/iSr3I3ehiw+kKSHyMvg3mv9e+8gAhj/OOYDqEsgCXAfCcTst2BUNjScdiFOIfKX9fjmKylStUKoNGXZZnKQGiXTEYwX8mixyJTeg4elDc=

u49fTY02tI/TRkbFgaTtm/QVws0=BOptxAvH75/Y7KOLW50w3WCIbg8m6oZdk7VusNulW7+scwppIX/g5efkX1zL8RfOgfUOW6z50C/b7S6L+1NJHzvOgc34pAhC3kRiz/NyPZkcgTW0dqoE76H/kqWGt2Qt8eCwHqNAH7H6Dv1qDGWOQ8SCQGxCgAY96AKILRg5sAY=LNErnM9GD7fr2ASUopXFMpsngI4HUv5k7J7rFSMR5pWHqUDJC+ISEgU9te4WJHOj6dS0u5bD6ZXUP66IwRivtg8wReylS7de4TtDspierNRM6P26JptpLe9tzLtStw+6QVIgp4IVc7r3c3FYvHKGkEMUqN92sAar7NmNDfR7XoI=
././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p384_sha512_c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p384_sha510000644000175000017500000000234311507151375031772 0ustar tonytony test QlLBkpXWE7HpXTDf6pdEg15zO+R6bt9+iE7y9pHSPaST8hflFt1LM4IzbIzMmgfSs4Hy6y4xEcmjzgiOzTwyJg==iKBxmv64HGnike5Z0fVGOBJMMN7hGe5DY21M4B1+LgmGznTVUf2r3AbmB9h356Jp7CRDi7PH9ZR8DtLmWjMimVlIwICGdy4jhwQt7aKFUfSo6KpovFVDLMbHwN4xyf0I././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/rsa2048_sha384_exc-c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/rsa2048_sha3840000644000175000017500000000261211507151375031655 0ustar tonytony test tWRBoAiiZHBqiSW+U83YvB0I6MQ6nQVXm/MYehSN1hGg9YmfrhewrXPogsBQS6G5orKfjROhTghIVzbB2p2XZS6G8KhwdFgrQhFQhTCvu4exggpp1ksDrekZfGNDdC5K9no7vwH68k0mP/deg/2S9QePyJ6Q7TBkMhcgLIOBvNoaUULcvf74MwNsdgsAYJ1Ub38Ovt3VTadAqYDlVpXLhp1gqPBhQuPdzQQq5atPRdxClygGcQ4dWTAehtcXOEBAdyD0ZVX3GKv2zL64/vZ80mIwdWaN8IVIbVWA84jX/ZXML6dMtVwLnDfzVgKxz4jerIX3ktGZrtU+HjYPQb8AyDVZu176vxVRwLI49chRVscUCnkSqJK1p4Am7zfJkHQh8l4Li5EJmjrNGIbvBwQSZA==uu/6Yl9MkP5WIq1m3drH0s8esR0Ye3Wowfvi3utzSzUFs59K6H0lg4dkbL9Y74pDILpLBcVyD4VjLmvb0xRzAUrhmGiXwwMCwJFFN7qgJu3vMhtA4OimyZlnvXrGnLPA5mRe95pgEdERqwcgZUgkLmElKFC7UCSGdSMmvlelXsxp6ATeC1Ux6BUwkIEZPnh4qrz+7EN5J9O5H7qNqg4Ppn7959RYwMa6llBl/KVpAwTfprqrWp5zAeNg2jHEeGo/eBXltkplAespebAMISi+zpfGW1/9rt8WT4Kp4YlgiJSP5C4g6FXCyL/0vLywSYqh/aKsg869FgUO1hmM1Z6Wfw==AQAB././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p384_sha512_exc-c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p384_sha510000644000175000017500000000233311507151375031771 0ustar tonytony test QlLBkpXWE7HpXTDf6pdEg15zO+R6bt9+iE7y9pHSPaST8hflFt1LM4IzbIzMmgfSs4Hy6y4xEcmjzgiOzTwyJg==NxOqQE8Ys58/wd5p0zAGp0fZ7V8d+qqOlKzyT1uojNhKW0p4mz+zqVP6THm64+uq2eAw3SoKu+eYuGHXmE7fs4ALoXrlJfAWQYQYDXdmkmkI6A00r3aDCZTwLr/2T5q0././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p256_sha512_c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p256_sha510000644000175000017500000000216511507151375031772 0ustar tonytony test QlLBkpXWE7HpXTDf6pdEg15zO+R6bt9+iE7y9pHSPaST8hflFt1LM4IzbIzMmgfSs4Hy6y4xEcmjzgiOzTwyJg==1oDvJUz7mJDrks+mqw5n8RvcPeUJA+H0ASKoyEuNeU0Pf1zP/C9dtd965RWfL8pPYMbfzDZHLNP2CF72CWEs9w==././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/hmac_sha384_exc-c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/hmac_sha384_ex0000644000175000017500000000120111507151375032147 0ustar tonytony test lYm2WdIYViIUpz/LlDMoTUU8PEg=oUs4jcGy7oOoL2m871nCwSAkEgYBWUksp9jYzypVVvYwsEmuFGlvFr+TxGrRPLRV././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p256_sha512_exc-c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/ecc_p256_sha510000644000175000017500000000215511507151375031771 0ustar tonytony test QlLBkpXWE7HpXTDf6pdEg15zO+R6bt9+iE7y9pHSPaST8hflFt1LM4IzbIzMmgfSs4Hy6y4xEcmjzgiOzTwyJg==3ylWDHCLE0qF3IqlFgrZs+QU4tXFM6j5KYIyHtxpPLU8DhojENGyvTBBtMYlh8sd0qcrskiF+6R+Zyr01rctog==././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/dsa_1024_sha1_c14n.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/microsoft/dsa_1024_sha1_0000644000175000017500000000237011507151375031751 0ustar tonytony test lYm2WdIYViIUpz/LlDMoTUU8PEg=LVKJc+bxmI4XjOBRy4htjk8Z49+Ih7iuAAHYASkglHDRmemYIxQg7w==

jGzNuBuTfYdPRxnpWYVcX6lp9Tbtx8hwSjw07zjGi5Y8BkxbMIlpk3glAyM8khauw/iSr3I3ehiw+kKSHyMvg3mv9e+8gAhj/OOYDqEsgCXAfCcTst2BUNjScdiFOIfKX9fjmKylStUKoNGXZZnKQGiXTEYwX8mixyJTeg4elDc=

u49fTY02tI/TRkbFgaTtm/QVws0=BOptxAvH75/Y7KOLW50w3WCIbg8m6oZdk7VusNulW7+scwppIX/g5efkX1zL8RfOgfUOW6z50C/b7S6L+1NJHzvOgc34pAhC3kRiz/NyPZkcgTW0dqoE76H/kqWGt2Qt8eCwHqNAH7H6Dv1qDGWOQ8SCQGxCgAY96AKILRg5sAY=LNErnM9GD7fr2ASUopXFMpsngI4HUv5k7J7rFSMR5pWHqUDJC+ISEgU9te4WJHOj6dS0u5bD6ZXUP66IwRivtg8wReylS7de4TtDspierNRM6P26JptpLe9tzLtStw+6QVIgp4IVc7r3c3FYvHKGkEMUqN92sAar7NmNDfR7XoI=
libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/0000755000175000017500000000000012273503733026334 5ustar tonytony././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/c14n10-signature-enveloping-rsa_sha512.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/c14n10-signature-env0000644000175000017500000000174211507151375031756 0ustar tonytony7/XTsHaBSOnJ/jXD5v0zL6VKYsk=KkJ3w1GXHiYr9zJlALlZdiI7HdMfT7SdsKngg6TVEBPsF5+NuPyzy+UpkpC9D5QeyPVe3NRBPMTc7sXUGD6XzIsP9r51nfxYdtSLZ9e3k2Vu+Z7wtGUllZa1jWBrDhaJkH18UyfznkmPD7u8Votq/ty66ldigKDCAtEHfKtGtks=jMwjbOWqXMsDIrzhD0tA9P7Ukh1P2o9eBBUviZTaYws0Tv8cHMbvvNbvk8uod9KqE1e27FJUNQY7OPkF4UTsAbslU4ML1Lr4bNBwf4Qmg98yqmXKt4s29yeDF3bjL1XyARNW7hAI24SwTp4wsvA98TtBnL1w8KH8FmJqwZW7KWE=AQABsome text././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/c14n10-signature-enveloping-hmac-sha256.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/c14n10-signature-env0000644000175000017500000000111011507151375031743 0ustar tonytony7/XTsHaBSOnJ/jXD5v0zL6VKYsk=S8P1KqE9JKfUChHqGPsB2AM30WnX7HK6LpDR4Qot2XI=some text././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/signature-enveloping-rsa_sha384.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/signature-enveloping0000644000175000017500000000205511507151375032426 0ustar tonytony7/XTsHaBSOnJ/jXD5v0zL6VKYsk=f6X2tJGPRhWSPLzq+0Asxsisc+Gg5qsyBtUDHiHbAeYvcIY014QLrVJzybbe1rsiviyj74xuTNIi4GQ8KVGsVfDeqopdiBPhdH5pUjpbR65FkV0xpxItFb1DomI1Ic5CQuIGY7ft+cMqTwNKPcTtHInR3zoESEsG1yOKHFDgEkQ=jMwjbOWqXMsDIrzhD0tA9P7Ukh1P2o9eBBUviZTaYws0Tv8cHMbvvNbvk8uod9KqE1e27FJUNQY7OPkF4UTsAbslU4ML1Lr4bNBwf4Qmg98yqmXKt4s29yeDF3bjL1XyARNW7hAI24SwTp4wsvA98TtBnL1w8KH8FmJqwZW7KWE=AQABsome text././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/c14n10-signature-enveloping-rsa-sha256.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/c14n10-signature-env0000644000175000017500000000147211507151375031756 0ustar tonytony7/XTsHaBSOnJ/jXD5v0zL6VKYsk=yfN9Xz0Nj1r2PWcjCvCreG1QhKcB+VCdLxPiP/7vRRMoLE69cP9z+r/yN0GI2saK+zTsHq0YHik/J8AdmS812w==zjY0cd2Et5D/NfEWKHqkH7gzUgtRGkYfGF75BdRFNmydyQIF657CX2qhHkXbF46YuXE4wrBQvzxrZ4iR5zOUxw==AQABsome text././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/signature-enveloping-sha384-rsa_sha256.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/signature-enveloping0000644000175000017500000000166011507151375032427 0ustar tonytonyuTx8AeqrTmv+nijRsWW7TOs1pCIuCudsFRVloP6hPin8Q4x9fFX2j/zj53XB37OGJmHicIUBkbwLTTC8DiNIQxM99d8KqFCPji0/Hfz8HJjwX1s4dXxq/ON+JmEN5j4UPnJvGNAP9cVXLfCMRAbe5A==zjY0cd2Et5D/NfEWKHqkH7gzUgtRGkYfGF75BdRFNmydyQIF657CX2qhHkXbF46YuXE4wrBQvzxrZ4iR5zOUxw==AQABsome text././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/signature-enveloping-hmac-sha384.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/signature-enveloping0000644000175000017500000000124711507151375032430 0ustar tonytony7/XTsHaBSOnJ/jXD5v0zL6VKYsk=6OBVyJqlLmz4pXkZKOrfRtj+6N7pPbHz2AgZlAgbRqNi7X2HiMjNbJqNotclA0+rsome text././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/signature-enveloping-hmac-sha256.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/signature-enveloping0000644000175000017500000000122311507151375032422 0ustar tonytony7/XTsHaBSOnJ/jXD5v0zL6VKYsk=iFxSMEeFJa4Gf8or/Gik581aAwiEBM4HnEWf3+cTFd4=some text././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/signature-enveloping-hmac-sha512.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/signature-enveloping0000644000175000017500000000127711507151375032433 0ustar tonytony7/XTsHaBSOnJ/jXD5v0zL6VKYsk=i8nm7Oc+wE6Q9/EWQyaJ/epmYzWg/vkwYdiCrANYLOkb5SoBGrbChCwnlDnioJG1CxncjQfYbD0LcawDWgkEwA==some text././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/c14n10-signature-enveloping-hmac-sha512.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/c14n10-signature-env0000644000175000017500000000116411507151375031754 0ustar tonytony7/XTsHaBSOnJ/jXD5v0zL6VKYsk=5n/q3cHDoQO7XDPE0mjFAFR7s+b3FJ/wPG8HbObH6sI5lTkGPnODx+QGfDZJMIe8cGHJtl7S66gZ+UFmeN8Xmg==some textlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/index.html0000644000175000017500000001372711507151375030343 0ustar tonytony Index of /2008/xmlsec/Group/interop/xmldsig11/sun

Index of /2008/xmlsec/Group/interop/xmldsig11/sun

[ICO]NameLast modifiedSizeDescription

[DIR]Parent Directory  -  
[   ]c14n10-signature-enveloping-hmac-sha256.xml08-May-2009 17:30 584  
[   ]c14n10-signature-enveloping-hmac-sha384.xml08-May-2009 17:30 604  
[   ]c14n10-signature-enveloping-hmac-sha512.xml08-May-2009 17:30 628  
[   ]c14n10-signature-enveloping-rsa-sha256.xml08-May-2009 17:30 826  
[   ]c14n10-signature-enveloping-rsa_sha384.xml08-May-2009 17:30 1.0K 
[   ]c14n10-signature-enveloping-rsa_sha512.xml08-May-2009 17:30 1.0K 
[   ]c14n10-signature-enveloping-sha256-rsa-sha256.xml08-May-2009 17:30 843  
[   ]c14n10-signature-enveloping-sha384-rsa_sha256.xml08-May-2009 17:30 869  
[   ]c14n10-signature-enveloping-sha512-rsa_sha256.xml08-May-2009 17:30 887  
[   ]signature-enveloping-hmac-sha256.xml05-May-2009 19:16 659  
[   ]signature-enveloping-hmac-sha384.xml05-May-2009 19:16 679  
[   ]signature-enveloping-hmac-sha512.xml05-May-2009 19:16 703  
[   ]signature-enveloping-rsa-sha256.xml05-May-2009 19:16 901  
[   ]signature-enveloping-rsa_sha384.xml05-May-2009 19:16 1.0K 
[   ]signature-enveloping-rsa_sha512.xml05-May-2009 19:16 1.0K 
[   ]signature-enveloping-sha256-rsa-sha256.xml05-May-2009 19:16 918  
[   ]signature-enveloping-sha384-rsa_sha256.xml05-May-2009 19:16 944  
[   ]signature-enveloping-sha512-rsa_sha256.xml05-May-2009 19:16 962  

././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/signature-enveloping-rsa_sha512.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/signature-enveloping0000644000175000017500000000205511507151375032426 0ustar tonytony7/XTsHaBSOnJ/jXD5v0zL6VKYsk=XQhk7rr1eejjtywQtxR5C2hcTldHMiDbnRXWrAj8GWio/EhVwGaCrzamfn9nMfcz8MdcD5mIGlTOygWDmnLBUjfqsrVtCFhvSfu/iw/3KJ7KUJ902izFHPAPLyiXts31lNVf/ur0Jyu+Y96fsmQcZNF6682p3WVnU3x4lAHZuoM=jMwjbOWqXMsDIrzhD0tA9P7Ukh1P2o9eBBUviZTaYws0Tv8cHMbvvNbvk8uod9KqE1e27FJUNQY7OPkF4UTsAbslU4ML1Lr4bNBwf4Qmg98yqmXKt4s29yeDF3bjL1XyARNW7hAI24SwTp4wsvA98TtBnL1w8KH8FmJqwZW7KWE=AQABsome text././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/c14n10-signature-enveloping-hmac-sha384.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/c14n10-signature-env0000644000175000017500000000113411507151375031751 0ustar tonytony7/XTsHaBSOnJ/jXD5v0zL6VKYsk=HWI7M9BzrlSD3crBgLdMWJCAfAYmifToZY63OkdeXhEVCJeaJq7Xau0jRhfMapjDsome text././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/signature-enveloping-rsa-sha256.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/signature-enveloping0000644000175000017500000000160511507151375032426 0ustar tonytony7/XTsHaBSOnJ/jXD5v0zL6VKYsk=NpGIZ1DAxBsdShDsHr4BHSWYqQ2/hHd9U0P2LqxgU5m7HMP1OgIVNML4aTgz4hAfiRbQpRpzBZD2Yl7+VcX3QA==zjY0cd2Et5D/NfEWKHqkH7gzUgtRGkYfGF75BdRFNmydyQIF657CX2qhHkXbF46YuXE4wrBQvzxrZ4iR5zOUxw==AQABsome text././@LongLink0000000000000000000000000000020200000000000011557 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/c14n10-signature-enveloping-sha512-rsa_sha256.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/c14n10-signature-env0000644000175000017500000000156711507151375031763 0ustar tonytonyE2Jo801uUCgAIa65niLU7jPSWPWUbsgT+okPgBcw/h72V7bmI0J2faJ+8EbwVwahXDnbRaf22WqerzX1vL0QzA==zbmwrUsPCYREbyYRnw2pb92ZZ7w+80qNy+8CEOjyXkIni78b0LqUybnLYMYlqekiawf+11ktyG6PVlO4mqyo2w==zjY0cd2Et5D/NfEWKHqkH7gzUgtRGkYfGF75BdRFNmydyQIF657CX2qhHkXbF46YuXE4wrBQvzxrZ4iR5zOUxw==AQABsome text././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/signature-enveloping-sha256-rsa-sha256.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/signature-enveloping0000644000175000017500000000162611507151375032431 0ustar tonytonyiDhYt78o294fA6pzQ7k44+eejrQMi+WX3l3UrUdtL1Q=CdrMwAgyL7v2JwU6SxgDgXhKI6QYnRMORIAdIa0HlJEb3ele5i8VBkKIbRed9r4WmlB98WdEN+i/CL/SsPdI5g==zjY0cd2Et5D/NfEWKHqkH7gzUgtRGkYfGF75BdRFNmydyQIF657CX2qhHkXbF46YuXE4wrBQvzxrZ4iR5zOUxw==AQABsome text././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/c14n10-signature-enveloping-rsa_sha384.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/c14n10-signature-env0000644000175000017500000000174211507151375031756 0ustar tonytony7/XTsHaBSOnJ/jXD5v0zL6VKYsk=hhSbyQTi3/9mH7q8zuJ5A9QJzsD0/gUPHVhNheMmM5aajh/qV/HMazDN7o7KHIKQwHa1GrMg25EJbCT6DEzPT9BVGwPhuA8MuQLvKQVPJR8SJDs7yJCiQl7/04qZWIIMWlRUvWTv2OknYvbY2iuv0SWeMbFkAKAWla3/8js4Qxc=jMwjbOWqXMsDIrzhD0tA9P7Ukh1P2o9eBBUviZTaYws0Tv8cHMbvvNbvk8uod9KqE1e27FJUNQY7OPkF4UTsAbslU4ML1Lr4bNBwf4Qmg98yqmXKt4s29yeDF3bjL1XyARNW7hAI24SwTp4wsvA98TtBnL1w8KH8FmJqwZW7KWE=AQABsome text././@LongLink0000000000000000000000000000020200000000000011557 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/c14n10-signature-enveloping-sha256-rsa-sha256.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/c14n10-signature-env0000644000175000017500000000151311507151375031752 0ustar tonytonyiDhYt78o294fA6pzQ7k44+eejrQMi+WX3l3UrUdtL1Q=Aa6HTxWETsZZ+nMdU2od8p1/SG/XJOZkLewx5hAKSnORO2EUo2BYuoH5O8O9bIQnqaO2C0mktY+Rn5hUsXFFJA==zjY0cd2Et5D/NfEWKHqkH7gzUgtRGkYfGF75BdRFNmydyQIF657CX2qhHkXbF46YuXE4wrBQvzxrZ4iR5zOUxw==AQABsome text././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/signature-enveloping-sha512-rsa_sha256.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/signature-enveloping0000644000175000017500000000170211507151375032424 0ustar tonytonyE2Jo801uUCgAIa65niLU7jPSWPWUbsgT+okPgBcw/h72V7bmI0J2faJ+8EbwVwahXDnbRaf22WqerzX1vL0QzA==uASlHL3js+ixced3CF0oEhMKX719KxSug2/e/VVmG72e3lZdTGKn9wsHd+Qwmh10qu4426gc1X4jNBtKHeuSEA==zjY0cd2Et5D/NfEWKHqkH7gzUgtRGkYfGF75BdRFNmydyQIF657CX2qhHkXbF46YuXE4wrBQvzxrZ4iR5zOUxw==AQABsome text././@LongLink0000000000000000000000000000020200000000000011557 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/c14n10-signature-enveloping-sha384-rsa_sha256.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/sun/c14n10-signature-env0000644000175000017500000000154511507151375031757 0ustar tonytonyuTx8AeqrTmv+nijRsWW7TOs1pCIuCudsFRVloP6hPin8Q4x9fFX2j/zj53XB37OGsjH3OJ7iIRAQYQ7tS6IJnaFoC5RT/2Hnzw1zhEzdvxurs8XWJsqUIG/41NJKuxYp2efbTspcbNlwaHfWotfyWg==zjY0cd2Et5D/NfEWKHqkH7gzUgtRGkYfGF75BdRFNmydyQIF657CX2qhHkXbF46YuXE4wrBQvzxrZ4iR5zOUxw==AQABsome textlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/0000755000175000017500000000000012273503733026774 5ustar tonytony././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-p256_sha256.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000203711507151375032370 0ustar tonytonyvIgv7JtPOh3hpedKK0rm8XHtYCSoBX4eEF0YwnB26Es=eYx4ImirtPG/eJLWgJHoMS30voH+tozerMftKbYz27vtYNgsHfAvV4M+oEkNgoibq5qnwsO2Z8nn+ndKxhVqFg==BJ/yaXNlq4FRObyJCBhb5jAz8GVzinK3bBGLjSDfjbJwNfydtgjnlS4EsDmxSRhWyJWq6GIqy5wvnaiARK04uB4=up up and away././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-p384_sha384_4050.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000246411507151375032374 0ustar tonytonyQQzWA5o7Aj0x+LglAnSMqaZlUTGiAiWd+wFQwZQixBTly7WkzpFrU3pyPLLOIlB7RFqgoaS/aCJlRxtGXAZ1cOdqQo6CxKxPNxk1Amu7mF/xXODO00iCPK1S9mXczSIs4OAD44Strq4qg2U7JvGt0N+JdlPXJAxWGPu8GlVYfEjBc7UQQG7cdjTnaArwLgqrup up and away././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-rsa_sha384.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000227611507151375032375 0ustar tonytonyhcAfH5JtPSCaOwja4/o2womH6qo=EcIHpXV53u7b1VJoYu7eniTdsRHA/sckEgmpAEhjI3mgb8Eqg8Sw2XOonMouA+wolKpwOah0RMDF9TU1B4PKSELO9L6FV6pKA3lfUMUmzO9e8UPKDi4b1ewUdE6paaUKOTE/IW4DJQiNERNrKpBnDTlp2tmqbV2QY5tWv0/I/V4=gIb6nAB9oS/AI5jIj6WymvQhRxiMlE07G4abmMliYi5zWzvaFE2tnU+RZIBgtoXcgDEIU/vsLQut7nzCn9mHxC8JEaV4D4U91j64AyZakShqJw7qjJfqUxxPL0yJv2oFiouPDjGuJ9JPi0NrsZq+yfWfM54s4b9SNkcOIVMybZU=AQABup up and away././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-sha384-rsa_sha256.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000235111507151375032367 0ustar tonytonylT2TytUXjzj4sac/0YDKI9hcBIvGnrZ55vX56cNApfvPbwWVNiLF1VnPfSPLG+xUTdMvhdEbkRfHBoXY61TC3LPmm2C/X5fZn+1PFrXo3rQe4FHmAKz/RooiVXMsp82PUKaeUPQLfHCfahlExTcQfWf/FCKPpEVqSsGl1swK1xDtN54P9CUIzvrlf8K7X8q7YVdUqBjD12yXKhFmNg6KtSevaud2xznrRXq5eUanXII=gIb6nAB9oS/AI5jIj6WymvQhRxiMlE07G4abmMliYi5zWzvaFE2tnU+RZIBgtoXcgDEIU/vsLQut7nzCn9mHxC8JEaV4D4U91j64AyZakShqJw7qjJfqUxxPL0yJv2oFiouPDjGuJ9JPi0NrsZq+yfWfM54s4b9SNkcOIVMybZU=AQABup up and away././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-p384_sha512_4050.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000250611507151375032371 0ustar tonytonyJGG2RA2A4srIxInbp9xPuJA+/EaTZM6Sb1nQCQBU4bztsRzi2wYdoRfSYS1sT5RNgZZX8YdPfay628Yw8PKUiQ==uypXBhwNwuBiCZVmEGVg+tzsjt9tW0feinm17my9k6MOL42LsWmEp8JBCzQH8pCvOwUilXJt/M3YiykAti3aG96cn3ejR5t4VL41ODoVEO1dWywKpoYWymE9DUhatM0fup up and away././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-hmac-sha384.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000140611507151375032367 0ustar tonytonyPsNGbqz06zzJcfkBaplANvpyhXI=jYHiMcpr59PrjV8rmngQcxydeV13LMXmt8iMtmbpQUTM+wXO1aHKyfnsH/XTWXW6up up and away././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-p256_sha384.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000207111507151375032366 0ustar tonytonyQQzWA5o7Aj0x+LglAnSMqaZlUTGiAiWd+wFQwZQixBTly7WkzpFrU3pyPLLOIlB7dH3zmZgI4NkH0Lzr/5YImH9sB0j0rEuVueTkCzky1AAjhVku/+fmFZGhT5QaL9b320N3+c6327Bf/Za/+cnNlQ==BJ/yaXNlq4FRObyJCBhb5jAz8GVzinK3bBGLjSDfjbJwNfydtgjnlS4EsDmxSRhWyJWq6GIqy5wvnaiARK04uB4=up up and away././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-p256_sha256_4050.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000225411507151375032371 0ustar tonytonyvIgv7JtPOh3hpedKK0rm8XHtYCSoBX4eEF0YwnB26Es=/WEDokA1mXaMYSGJW8CJEzucxZw+joEsf9mG82B7ihCP7ick3SW3OBPyUNsW4CLulyEp5mNeevqAP74Oh8ZBzw==up up and away././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-p521_sha512_4050.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000271111507151375032367 0ustar tonytonyJGG2RA2A4srIxInbp9xPuJA+/EaTZM6Sb1nQCQBU4bztsRzi2wYdoRfSYS1sT5RNgZZX8YdPfay628Yw8PKUiQ==AcVz5g/MMQbBZRV7C57owDriKCgpZiWWAbV+XhsvqlQQP/Vi6V9s9jyi8wQjRNxp2VKjNzDivLeX/l0vGSB9jC66ARm3CIIK4h22ryRoUxyXYl5WKTa68PKsPJhyTVLTcOoHZz3yEmJHqFw0gP9z1IE1g6d8kMMl608bgvtwjh9C8y5pup up and away././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-p384_sha512.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000223011507151375032363 0ustar tonytonyJGG2RA2A4srIxInbp9xPuJA+/EaTZM6Sb1nQCQBU4bztsRzi2wYdoRfSYS1sT5RNgZZX8YdPfay628Yw8PKUiQ==aoExdXIydoyutAKbGOlddJ5Y5BdgmgTuXvLgmfUC2HLaoNhv4DU/maSn6X76e+79cLzRP0ez8m3LaNXA4g9AVMB5Cxsfi9ivUIOLnTPy31Cy2DF++gOEQ5Hvl4x/EoSsBO/yd/OZzDfjX4qivDY/vsUIuh6KWAxoxW5P4ukvwd+T6pVljWsX2UBJNNy5MdhTwB8e2YwB8kUbJwdsAS/XGi/fz8unFrs+lVlAgIs6s/xBYFbfUoRiAacD2SpVDe6XBA==up up and away././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-hmac-sha256.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000136211507151375032370 0ustar tonytonymyrT5qEfA7Wemy2WONCZG66c5QE=s8ntBS/35iYGZYg16NrU4vwxdUufDXw/YVN5E9AIUK0=up up and away././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-p521_sha256_4050.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000263511507151375032374 0ustar tonytonyvIgv7JtPOh3hpedKK0rm8XHtYCSoBX4eEF0YwnB26Es=ASZoMCM3g5dPFjLpHJe1FZR76dWYKaZUPcxV52ldCxZb/qlk70rtarXihn5XmQ/JRhcz4EP40d7rqAh+SYB2Rzs0AA1E0KAlXMYb8ZiOPvtLVe5za5PHJX6ooaF+6UfIK8MGZZu0UiZ1gX41KmdeTtCbAD5qg4dVsZCsIZY+QG5GOb+Lup up and away././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-hmac-sha512.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000143611507151375032372 0ustar tonytonyfwm9s3Hq9+dRyOf9an94FjEw4Fc=wFoZP3D/9HTS1N5VR/L6Xh2ID47zlJ9oRsa4NnGsHxoCefpSBX9B7pggw13NjpqTgkvd1oUQA2JC6BLNrlCvtQ==up up and away././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-p384_sha256_4050.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000243211507151375032367 0ustar tonytonyvIgv7JtPOh3hpedKK0rm8XHtYCSoBX4eEF0YwnB26Es=TTc0bEn0T6SlpB+dUJykmhG2W/+moUygMBZq/FnWcuuiCBKdGqJLO6nSV4D2NwVhsWNFnSXqGHhOgu5Uwg7YwrD7REW53+fqkZvBumbPWGEMRvVjAOq+QvsYDyhlduodup up and away././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-p521_sha384.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000234611507151375032373 0ustar tonytonyQQzWA5o7Aj0x+LglAnSMqaZlUTGiAiWd+wFQwZQixBTly7WkzpFrU3pyPLLOIlB7ARHFVE3V0AFe+rRUXec+UAzU66RMeln2+p5ybwm4sZL3Jzo+cfJt9GvsfRiTb+JmfxqQdMG7hL7h1dzl4DuQdWNyADpnxYR5zhzDbf/JluxTISomXmFMgt+wGQV81XxIBXd9PW/ViqGwFEHUmUBbTO18lhjROwguxdNxqwNANxG99XawBAHu8dZq4OFrF0fWIymDApJLKL77nwPcZ/uZHkeqx8vOJJ9KkClvuk5Roc4V4EJXjWOC24s8yLWW7MCWgkN6z4MPOQCJpvRhnQw8ENJxCTioY/sBLj9S4Y5YbDAh1gntEW77SAS1Xjkw7LoZ9/BYOblTTl+l45ogeNNA66iRhdAF7vuueA==up up and awaylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/index.html0000644000175000017500000002403411507151375030774 0ustar tonytony Index of /2008/xmlsec/Group/interop/xmldsig11/oracle

Index of /2008/xmlsec/Group/interop/xmldsig11/oracle

[ICO]NameLast modifiedSizeDescription

[DIR]Parent Directory  -  
[   ]signature-enveloping-hmac-sha256.xml08-May-2009 05:56 754  
[   ]signature-enveloping-hmac-sha384.xml08-May-2009 05:56 774  
[   ]signature-enveloping-hmac-sha512.xml08-May-2009 05:56 798  
[   ]signature-enveloping-p256_sha1.xml20-May-2009 04:19 1.0K 
[   ]signature-enveloping-p256_sha1_4050.xml20-May-2009 04:19 1.1K 
[   ]signature-enveloping-p256_sha256.xml20-May-2009 04:19 1.0K 
[   ]signature-enveloping-p256_sha256_4050.xml20-May-2009 04:19 1.2K 
[   ]signature-enveloping-p256_sha384.xml20-May-2009 04:19 1.1K 
[   ]signature-enveloping-p256_sha384_4050.xml20-May-2009 04:19 1.2K 
[   ]signature-enveloping-p256_sha512.xml20-May-2009 04:19 1.1K 
[   ]signature-enveloping-p256_sha512_4050.xml20-May-2009 04:19 1.2K 
[   ]signature-enveloping-p384_sha1.xml20-May-2009 04:19 1.1K 
[   ]signature-enveloping-p384_sha1_4050.xml20-May-2009 04:19 1.3K 
[   ]signature-enveloping-p384_sha256.xml20-May-2009 04:19 1.1K 
[   ]signature-enveloping-p384_sha256_4050.xml20-May-2009 04:19 1.3K 
[   ]signature-enveloping-p384_sha384.xml20-May-2009 04:19 1.1K 
[   ]signature-enveloping-p384_sha384_4050.xml20-May-2009 04:19 1.3K 
[   ]signature-enveloping-p384_sha512.xml20-May-2009 04:19 1.1K 
[   ]signature-enveloping-p384_sha512_4050.xml20-May-2009 04:19 1.3K 
[   ]signature-enveloping-p521_sha1.xml20-May-2009 04:19 1.2K 
[   ]signature-enveloping-p521_sha1_4050.xml20-May-2009 04:19 1.4K 
[   ]signature-enveloping-p521_sha256.xml20-May-2009 04:19 1.2K 
[   ]signature-enveloping-p521_sha256_4050.xml20-May-2009 04:19 1.4K 
[   ]signature-enveloping-p521_sha384.xml20-May-2009 04:19 1.2K 
[   ]signature-enveloping-p521_sha384_4050.xml20-May-2009 04:19 1.4K 
[   ]signature-enveloping-p521_sha512.xml20-May-2009 04:19 1.2K 
[   ]signature-enveloping-p521_sha512_4050.xml20-May-2009 04:19 1.4K 
[   ]signature-enveloping-rsa-sha256.xml08-May-2009 05:56 1.2K 
[   ]signature-enveloping-rsa_sha384.xml08-May-2009 05:56 1.2K 
[   ]signature-enveloping-rsa_sha512.xml08-May-2009 05:56 1.2K 
[   ]signature-enveloping-sha256-rsa-sha256.xml08-May-2009 05:56 1.2K 
[   ]signature-enveloping-sha384-rsa_sha256.xml08-May-2009 05:56 1.2K 
[   ]signature-enveloping-sha512-rsa_sha256.xml08-May-2009 05:56 1.2K 

HMAC key is "testkey"
././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-p384_sha1.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000213111507151375032363 0ustar tonytonyQyX9FBWyHn4T5eTnSMtylMw+tNQ=f384icRqZaSpxvuo3JMKgJ7fsn4KEAA31h+b5bPAef7KfKFc37jL3inAGW6e6KasFD/mBheWvM3iRXhBwAA9zajh8i6k9gvQrh1tLKjsMCVOskK9cE1v/Vevz1T2p0lPBO/yd/OZzDfjX4qivDY/vsUIuh6KWAxoxW5P4ukvwd+T6pVljWsX2UBJNNy5MdhTwB8e2YwB8kUbJwdsAS/XGi/fz8unFrs+lVlAgIs6s/xBYFbfUoRiAacD2SpVDe6XBA==up up and away././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-p384_sha1_4050.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000240711507151375032371 0ustar tonytonyQyX9FBWyHn4T5eTnSMtylMw+tNQ=ZnZk1Sy/bPaDZZkRl+wiapDaOu4LdCBGMalpqcCV9hNv+Vj0Xt8IP0h/y922MKxFSh0o6Va/flsNiCSafN4Eycp40VShuZDFj13xy6eVxMNeap1X9ArnORz5my4MtpzRup up and away././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-p256_sha1_4050.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000223111507151375032364 0ustar tonytonyQyX9FBWyHn4T5eTnSMtylMw+tNQ=c0CFsZcDNGYO49exy+9GoPugglZAbTOOdvkww8Kf11F58uYPKYlK4HboB903xixlKu12KGUgTZNK+PDytMVRbQ==up up and away././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-p256_sha512_4050.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000233011507151375032364 0ustar tonytonyJGG2RA2A4srIxInbp9xPuJA+/EaTZM6Sb1nQCQBU4bztsRzi2wYdoRfSYS1sT5RNgZZX8YdPfay628Yw8PKUiQ==youtu5oqpFkgvBy8/u4eqQ9Kj2j98+S6bb3Ov8FejhQT8PoCVsrl8wK8534k9mN+ZUjKyXE28NUmKEgEQLyqUw==up up and away././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-p521_sha384_4050.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000266711507151375032401 0ustar tonytonyQQzWA5o7Aj0x+LglAnSMqaZlUTGiAiWd+wFQwZQixBTly7WkzpFrU3pyPLLOIlB7ANQiXkRxf/1+sMwoBsGbQVkOinenhErneIxLKLYhP5R1Ilp4mncGVwIiMOefhklFAiRxYIlcX6LL99Mnw1Hphc0zAUBbVi05+MRRHNoxbg6zG/OBfVWpt5jgF0o3Vnz0h4PlFfevC7q9y8lKGhlxIk3yR7gyqvqXYqKZbtTtSHi4zcZLup up and away././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-rsa_sha512.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000227611507151375032375 0ustar tonytonyYQ9GG+n3w6zWdvpUVr51fk6uHPA=UACgE7IESBWhG3gW2BiW87pDxrwlMiyEPCs7/3rB2U4UBUWuSsOCdg+aa7NSGyHTiyGImY7a+WFdnbu3Va+RvZbMphDDM4xeWcRauMeLFZj9rZm8EY3MHK/AvsQHX5sBaJ1t2/5YkYddLaag5j916ijl1c1qLTqGFJwyKTBmv3s=gIb6nAB9oS/AI5jIj6WymvQhRxiMlE07G4abmMliYi5zWzvaFE2tnU+RZIBgtoXcgDEIU/vsLQut7nzCn9mHxC8JEaV4D4U91j64AyZakShqJw7qjJfqUxxPL0yJv2oFiouPDjGuJ9JPi0NrsZq+yfWfM54s4b9SNkcOIVMybZU=AQABup up and away././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-rsa-sha256.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000227611507151375032375 0ustar tonytonya8uS43VzNNwzLOM6wHczXPq906w=a1MU1N6mcju2/bp2sp7017z4fUumuz0cprBLhCL/aZDYnryDAX+ztBQjtPxkyCsS92wgd3ractNxosoU3M0XljZqs1/x9B8bWOYwhh4+B0FOTwHSzLApsPqes8SJie1N71UyQN+QTvsW2SnLhDIF4J0ZQ0bSVsNKDpRLNg0tYCQ=gIb6nAB9oS/AI5jIj6WymvQhRxiMlE07G4abmMliYi5zWzvaFE2tnU+RZIBgtoXcgDEIU/vsLQut7nzCn9mHxC8JEaV4D4U91j64AyZakShqJw7qjJfqUxxPL0yJv2oFiouPDjGuJ9JPi0NrsZq+yfWfM54s4b9SNkcOIVMybZU=AQABup up and away././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-p521_sha1_4050.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000261211507151375032367 0ustar tonytonyQyX9FBWyHn4T5eTnSMtylMw+tNQ=AK2oYc2LUxemU0jIHdjLJxlztOci7vkjEa8nBLfg829z7O4q5uo+7ow5YLayJacoxxKQfNvyEGatYWnxHHE4Q/82ALp3csw3bOQXHtTddlk0JfD9QqcSifNLABmb4DtZzL5GVClWojdfGcIGMzfqe0MFp0MUFe6BUkhl5ZM0qj1z4qsiup up and away././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-p521_sha512.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000237011507151375032370 0ustar tonytonyJGG2RA2A4srIxInbp9xPuJA+/EaTZM6Sb1nQCQBU4bztsRzi2wYdoRfSYS1sT5RNgZZX8YdPfay628Yw8PKUiQ==AU9iFH2+IBawqIMuef3exMnzp5XGXfRTJQuhQklWcc8ZWwnE+bwCpbrlTkYM2RE8qTrpQ4E5K6ZZN2FKH69lZnqAANNE/iIvbQ/rG9etU9ciT42ZhFAVewdAjnXCfWmEf5AesgJFt0bErU1xCqMyicvVD06bHxZTWI7CYRZJrGN98512BAHu8dZq4OFrF0fWIymDApJLKL77nwPcZ/uZHkeqx8vOJJ9KkClvuk5Roc4V4EJXjWOC24s8yLWW7MCWgkN6z4MPOQCJpvRhnQw8ENJxCTioY/sBLj9S4Y5YbDAh1gntEW77SAS1Xjkw7LoZ9/BYOblTTl+l45ogeNNA66iRhdAF7vuueA==up up and away././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-p256_sha384_4050.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000230611507151375032367 0ustar tonytonyQQzWA5o7Aj0x+LglAnSMqaZlUTGiAiWd+wFQwZQixBTly7WkzpFrU3pyPLLOIlB77w73Ils4g3NSw/ngbiyGOC/B79kHVo1fG+SMpUhxc/Ad+dkygEZO8u/erMQaNWt2I7f6o3So2o11TD3y2NriYg==up up and away././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-sha256-rsa-sha256.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000231711507151375032371 0ustar tonytonyixRZSqEH0oHtwACs2B42jl1pL7eAMmwzk2DVu4n4HD8=f9c35givXYsTkq2dpiVOoCn/OvYPdQYIUJbQnnTIazvTnrRGyvwZ9V/qPMwToQHFxB5+d36KGJ1kUBSeGtZqga83+7+lCMM3QnzeNwQZbMmKK/1n19XA8Kz77L1wKZjzacl8b+BazdWy1VkEvdWD67mdmKYWOBWCjkVbZFNI8Bk=gIb6nAB9oS/AI5jIj6WymvQhRxiMlE07G4abmMliYi5zWzvaFE2tnU+RZIBgtoXcgDEIU/vsLQut7nzCn9mHxC8JEaV4D4U91j64AyZakShqJw7qjJfqUxxPL0yJv2oFiouPDjGuJ9JPi0NrsZq+yfWfM54s4b9SNkcOIVMybZU=AQABup up and away././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-p521_sha256.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000231411507151375032366 0ustar tonytonyvIgv7JtPOh3hpedKK0rm8XHtYCSoBX4eEF0YwnB26Es=AdSN/Xx+XH76zK6LehX0Ji+b73ObRQWCvfs+FMlWPohXenoK3wQdYz7xNH2a2LfHdcDePdjNgz2nNMwfPgz+gmopAY73LBsAMbkdbt02Y6UJ3RPxAUmsuQz6vj3FuQlNRMXhi1YnxMnv/e6Tifloc2mZP6ZfnxO7rhggONqRAmy+w6ZpBAHu8dZq4OFrF0fWIymDApJLKL77nwPcZ/uZHkeqx8vOJJ9KkClvuk5Roc4V4EJXjWOC24s8yLWW7MCWgkN6z4MPOQCJpvRhnQw8ENJxCTioY/sBLj9S4Y5YbDAh1gntEW77SAS1Xjkw7LoZ9/BYOblTTl+l45ogeNNA66iRhdAF7vuueA==up up and away././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-p256_sha512.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000211311507151375032363 0ustar tonytonyJGG2RA2A4srIxInbp9xPuJA+/EaTZM6Sb1nQCQBU4bztsRzi2wYdoRfSYS1sT5RNgZZX8YdPfay628Yw8PKUiQ==85E8bMeZmI4/VsgZ2tfWyLy2M/UnmLaGiErGGq3ZctFe8fG+sXEfAuZ+wxJNDuEVXsxIrezuhv40EFXo80UqfA==BJ/yaXNlq4FRObyJCBhb5jAz8GVzinK3bBGLjSDfjbJwNfydtgjnlS4EsDmxSRhWyJWq6GIqy5wvnaiARK04uB4=up up and away././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-p384_sha256.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000215411507151375032370 0ustar tonytonyvIgv7JtPOh3hpedKK0rm8XHtYCSoBX4eEF0YwnB26Es=XJFqW3A3NBeCR0GsuGfjHDjXIqRWAXTcD+OMY+ivFosKvV+12kZ3xdaTXbs5MCu0rTp+Xij8Tvhb8Vhh9k2sA5DuJk1akakhEyrZOKRfxaMiOcUHN9F90YlgqTc5P5MfBO/yd/OZzDfjX4qivDY/vsUIuh6KWAxoxW5P4ukvwd+T6pVljWsX2UBJNNy5MdhTwB8e2YwB8kUbJwdsAS/XGi/fz8unFrs+lVlAgIs6s/xBYFbfUoRiAacD2SpVDe6XBA==up up and away././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-p384_sha384.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000220611507151375032366 0ustar tonytonyQQzWA5o7Aj0x+LglAnSMqaZlUTGiAiWd+wFQwZQixBTly7WkzpFrU3pyPLLOIlB762PoqaZujP1OeuUBaJ4XvBBmMcA1OdZAW+yYP0tllL6oIMcB8Hu11wZtONDDI1XQO0OAFqfVAQ8OEbzUAH15/zydSItqs14IzW9id1dMruVwHzZCSZ0X94e09vLyDrndBO/yd/OZzDfjX4qivDY/vsUIuh6KWAxoxW5P4ukvwd+T6pVljWsX2UBJNNy5MdhTwB8e2YwB8kUbJwdsAS/XGi/fz8unFrs+lVlAgIs6s/xBYFbfUoRiAacD2SpVDe6XBA==up up and away././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-sha512-rsa_sha256.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000237311507151375032373 0ustar tonytonyWz5zBRnq1yQQUwewZmFDPyUJ3diPyl2w7scW/XyFIND0ElZdLhiEbkhHxUU3+cFthDEcZ7KyBfM9Hfpjkiu4LQ==F4NdAhNg6n9oePxGZyYJ+AHOqn1f8tsj64fhPjS0v/nG49jFRMRAXGQk/9YPx/eKTuY9h7/3Tg/p2VyuBaQ9oSD8ukEslDxvHPt7DbPV6BAkiKVBt7RNdzBL7iFX6KfK14kjMrDEqCuheGGiXTA4qj/7J8PAQo5g7GExL+V/yoo=gIb6nAB9oS/AI5jIj6WymvQhRxiMlE07G4abmMliYi5zWzvaFE2tnU+RZIBgtoXcgDEIU/vsLQut7nzCn9mHxC8JEaV4D4U91j64AyZakShqJw7qjJfqUxxPL0yJv2oFiouPDjGuJ9JPi0NrsZq+yfWfM54s4b9SNkcOIVMybZU=AQABup up and away././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-p521_sha1.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000227111507151375032370 0ustar tonytonyQyX9FBWyHn4T5eTnSMtylMw+tNQ=AebKr/SrzgrFtr87nQXxn5seJX8ztyFvS+hKmh1iu1utJcoLjoFEfGsezOM0FQvqysFk3EK4dDF5pB9Rl9aYxSmwAF+It4BspTuccDrl0N6KczUhhGHiTMLxrRgBX3205GiDQSRAzYuXJmz3dptThgNzkg7D/Zr7h5fNrPYHPeJKUie7BAHu8dZq4OFrF0fWIymDApJLKL77nwPcZ/uZHkeqx8vOJJ9KkClvuk5Roc4V4EJXjWOC24s8yLWW7MCWgkN6z4MPOQCJpvRhnQw8ENJxCTioY/sBLj9S4Y5YbDAh1gntEW77SAS1Xjkw7LoZ9/BYOblTTl+l45ogeNNA66iRhdAF7vuueA==up up and away././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-enveloping-p256_sha1.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig11/oracle/signature-envelop0000644000175000017500000000201411507151375032363 0ustar tonytonyQyX9FBWyHn4T5eTnSMtylMw+tNQ=/UIcB0BiRpxs6lTKEsoaCOupt3JeShaV92TZYz6qFC9AunPqVpNWarll890jY4QLumx/1MOHD+Us9bP7QSalrQ==BJ/yaXNlq4FRObyJCBhb5jAz8GVzinK3bBGLjSDfjbJwNfydtgjnlS4EsDmxSRhWyJWq6GIqy5wvnaiARK04uB4=up up and awaylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/testcases.html0000644000175000017500000042147010760636544026620 0ustar tonytony Test Cases for C14N 1.1 and XMLDSig Interoperability

W3C

Test Cases for C14N 1.1 and XMLDSig Interoperability

08 January 2008

This version:
Latest version:
Previous versions:
Authors:
Juan Carlos Cruellas, UPC <cruellas@ac.upc.es>
Konrad Lanz, A-SIT <Konrad.Lanz@iaik.tugraz.at>
Sean Mullan, Sun Microsystems <Sean.Mullan@Sun.COM>
Editors:
Juan Carlos Cruellas, UPC <cruellas@ac.upc.es>
Konrad Lanz, A-SIT <Konrad.Lanz@iaik.tugraz.at>
Sean Mullan, Sun Microsystems <Sean.Mullan@Sun.COM>
Contributors:
Pratik Datta, Oracle <pratik.datta@oracle.com>
Frederick Hirsch, Nokia <frederick.hirsch@nokia.com>
Bruce Rich, IBM <brich@us.ibm.com>
Thomas Roessler, W3C <tlr@w3.org>

Abstract

This document defines interoperability test cases for Canonical XML 1.1 [XML-C14N1.1] and XML Signature Syntax and Processing, Second Edition [XMLDSIG2]. The changes tested include C14N11 handling of attributes in the XML namespace, including xml:id and xml:base, appropriate C14N11 nodeset to octet stream transform processing, modifications to RFC 3986 dot segment processing for C14N11, and RFC 4514 string encoding of Distinguished Names. The tests include standalone C14N11 tests as well as tests integrated with XML signature generation and validation. This document also includes earlier test cases used in XML Signature [XMLDSIG] for regression testing.

Status of this Document

This document is a working document of the World Wide Web Consortium XML Security Specifications Maintenance Working Group. For further details of the activity of this group, please see the XML Security Specifications Maintenance Working Group.


1 Introduction

The test cases include standalone C14N 1.1 tests and test cases involving XML signature generation and validation. XML signatures are generated according to the details specified in this document.

All the test cases are positive (signatures that are valid).

Applications should validate these signatures and check that they are valid.

1.1 Test Case Notation

This section summarizes the notation used for identification of test cases.

A test case identifier matches the following pattern, and the syntax for describing the pattern is borrowed from section 2.0 of [XMLDSIG] (where "?" denotes zero or one occurrence; "+" denotes one or more occurrences; "*" denotes zero or more occurrences) and "|" denotes a choice.

  Rec/(SubRec/)?(SpecificIssue-(SpecificSubIssue-)?)+TestNumber

The Rec part identifies the source recommendation for the test case.

The SubRec part identifies a recommendation that is tested in the context of Rec.

The SpecificIssue part identifies the issue to be tested by the test case. The optional SpecificSubIssue part further refines the issue to be tested.

The TestNumber part numbers the test case. It must be an integer number or an integer number followed by a lowercase letter.

The next section identifies codes used throughout this document.

1.2 Codes for Recommendation References (Rec, SubRec)

The following codes are used for identifying the source recommendations for the test cases:

This structure is reflected in the directories c14n11/, xmldsig/, xmldsig/c14n11/, xmldsig/dname/ and xmldsig/xpointer/.

1.3 Codes for Issues (SpecificIssue) and Sub-Issues (SpecificSubIssue)

The following codes are used for identifying the issues and sub-issues for the test cases:

  • defCan identifies the test cases that test the [XMLDSIG2] implicit and explicit rules managing the final canonicalization that precedes the digest computation..

  • xmllang identifies the test cases that test the C14N11 handling of the xml:lang attribute.

  • xmlspace identifies the test cases that test the C14N11 handling of the xml:space attribute.

  • xmlid identifies the test cases that test the C14N11 handling of the xml:id attribute.

  • xmlbase identifies the test cases that test the C14N11 handling of the xml:base attribute.

    The following sub-issues are associated with this issue:

    • prop identifies the test cases that test the C14N11 propagation of the xml:base attribute through the node tree.

    • annexA identifies the test cases that test the C14N11 Remove Dot Segments examples listed in Appendix A of [XML-C14N1.1].

    • c14n11spec identifies the test cases that test the examples in the [XML-C14N1.1] specification.

  • dnString identifies the test cases that test the string encoding of Distinguished Names.

  • diffRFCs identifies the test cases that test the differences between [RFC-2253] and [RFC-4514].

  • xpointer identifies the test cases that test the handling of XPointer Reference URIs as specified in [XMLDSIG2]

2 Test Cases specification

The following sub-sections describe each of the test cases and are grouped by Recommendation and Issue.

2.1 Legacy XMLDSig Working Group Test Cases

The IETF/W3C XML-DSig Working Group produced an interoperability test matrix that can be found at [XMLDSIG-interop].

2.2 Test Cases for Canonicalization 1.1

The set of test cases in this section are designed to test the C14N11 handling of attributes in the xml namespace. The input for each of these test cases is an XML document and an XPath document subset expression. Two different sets of tests are included based on the test cases in this section.

  • Standalone tests: no XML signature generation or validation is required. The XPath document subset expression is applied to the input document. These tests are used to check that the implementation for [XML-C14N1.1] behaves correctly.

  • Integrated tests with XML signatures: In these set of tests, an XML signature is generated based on the input document and a corresponding XPath Filtering Transform as indicated in the tables. For these set of tests, the following rules apply:

    • The XML Signature is generated using the HMAC-SHA1 SignatureMethod algorithm and a secret key with the value: "secret".getBytes("ASCII").

    • The Transforms element contains a sequence of two transforms:

      • An XPath Filtering Transform that contains an XPath expression that depends on the test case.

      • A Canonical XML 1.1 Transform.

2.2.1 Test Cases for xml:lang attribute

The set of test cases in this section test the C14N11 handling of xml:lang attributes.

Below is the input document for the test cases in this section:

  <?xml version="1.0" encoding="UTF-8"?>
  <ietf:c14n11Xmllang xmlns:ietf="http://www.ietf.org" 
  xmlns:w3c="http://www.w3.org">
     <ietf:e1 xml:lang="EN">
        <ietf:e11>
           <ietf:e111 />
        </ietf:e11>
        <ietf:e12 at="2">
           <ietf:e121 />
        </ietf:e12>
     </ietf:e1>
     <ietf:e2 >
        <ietf:e21 />
     </ietf:e2>
  </ietf:c14n11Xmllang>

Note:

Document subset expressions for document subsets computation are defined as in [XML-C14N1.1].

Test case c14n11/xmllang-1
Input details To-Be-Signed (TBS henceforth) data object with ONLY a xml:lang attribute in a certain element e whose content includes other elements. The ds:Transform contains a XPath expression whose result is a node set that includes element e.
Rationale Check that implementations of [XML-C14N1.1] handle xml:lang attributes as defined in [XML-C14N1.1]
Document subset expression (//. | //@* | //namespace::*)[ancestor-or-self::ietf:e1]
Output
  <ietf:e1 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org" xml:lang="EN">
        <ietf:e11>
           <ietf:e111></ietf:e111>
        </ietf:e11>
        <ietf:e12 at="2">
           <ietf:e121></ietf:e121>
        </ietf:e12>
     </ietf:e1>
Test case c14n11/xmllang-2
Input details TBS data object with ONLY a xml:lang attribute in a certain element e whose content includes other elements. The ds:Transform contains a XPath expression whose result is a node set that DOES NOT include neither element e nor any of its children elements.
Rationale Check that implementations of [XML-C14N1.1] handle xml:lang attributes as defined in [XML-C14N1.1]
Document subset expression (//. | //@* | //namespace::*)[ancestor-or-self::ietf:e2]
Output
  <ietf:e2 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org">
        <ietf:e21></ietf:e21>
     </ietf:e2>
Test case c14n11/xmllang-3
Input details TBS with ONLY a xml:lang attribute in a certain element e whose content includes a sequence of one element. The ds:Transform contains a XPath expression whose result is a node set that DOES NOT include element e but includes one child element.
Rationale Check that implementations of [XML-C14N1.1] handle xml:lang attributes as defined in [XML-C14N1.1]
Document subset expression (//. | //@* | //namespace::*)[ancestor-or-self::ietf:e11]
Output
  <ietf:e11 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org" xml:lang="EN">
           <ietf:e111></ietf:e111>
        </ietf:e11>
Test case c14n11/xmllang-4
Input details TBS with ONLY a xml:lang attribute in a certain element e whose content includes a sequence of more than one element (these children may in turn contain children elements). The ds:Transform contains a XPath expression whose result is a node set that DOES NOT include element e but includes more than one of its children elements.
Rationale Check that implementations of [XML-C14N1.1] handle xml:lang attributes as defined in [XML-C14N1.1]
Document subset expression (//. | //@* | //namespace::*)[ancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e12]
Output
  <ietf:e11 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org" xml:lang="EN">
           <ietf:e111></ietf:e111>
        </ietf:e11>\
+ <ietf:e12 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org" at="2" xml:lang="EN">
           <ietf:e121></ietf:e121>
        </ietf:e12>

2.2.2 Test Cases for xml:space attribute

The set of test cases in this section test the C14N11 handling of xml:space attributes.

Below is the input document for the test cases in this section:

  <?xml version="1.0" encoding="UTF-8"?>
  <ietf:c14n11XmlSpaceDoc1 xmlns:ietf="http://www.ietf.org" 
  xmlns:w3c="http://www.w3.org">
     <ietf:e1 xml:space="true">
        <ietf:e11>
           <ietf:e111 />
        </ietf:e11>
        <ietf:e12 at="2">
           <ietf:e121 />
        </ietf:e12>
     </ietf:e1>
     <ietf:e2 >
        <ietf:e21 />
     </ietf:e2>
  </ietf:c14n11XmlSpaceDoc1>
Test case c14n11/xmlspace-1
Input details TBS data object with ONLY a xml:space attribute in a certain element e whose content includes other elements. The ds:Transform contains a XPath expression whose result is a node set that includes element e.
Rationale Check that implementations of [XML-C14N1.1] handle xml:space attributes as defined in [XML-C14N1.1]
Document subset expression (//. | //@* | //namespace::*) [ancestor-or-self::ietf:e1]
Output
  <ietf:e1 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org" xml:space="true">
        <ietf:e11>
           <ietf:e111></ietf:e111>
        </ietf:e11>
        <ietf:e12 at="2">
           <ietf:e121></ietf:e121>
        </ietf:e12>
     </ietf:e1>
Test case c14n11/xmlspace-2
Input details TBS data object with ONLY a xml:space attribute in a certain element e whose content includes other elements. The ds:Transform contains a XPath expression whose result is a node set that DOES NOT include neither element e nor any of its children elements.
Rationale Check that implementations of [XML-C14N1.1] handle xml:space attributes as defined in [XML-C14N1.1]
Document subset expression (//. | //@* | //namespace::*) [ancestor-or-self::ietf:e2]
Output
  <ietf:e2 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org">
        <ietf:e21></ietf:e21>
     </ietf:e2>
Test case c14n11/xmlspace-3
Input details TBS with ONLY a xml:space attribute in a certain element e whose content includes a sequence of one element. The ds:Transform contains a XPath expression whose result is a node set that DOES NOT include element e but includes its child element.
Rationale Check that implementations of [XML-C14N1.1] handle xml:space attributes as defined in [XML-C14N1.1]
Document subset expression (//. | //@* | //namespace::*) [ancestor-or-self::ietf:e11]
Output
  <ietf:e11 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org" xml:space="true">
           <ietf:e111></ietf:e111>
        </ietf:e11>
Test case c14n11/xmlspace-4
Input details TBS with ONLY a xml:space attribute in a certain element e whose content includes a sequence of more than one element (these children may in turn contain children elements). The ds:Transform contains a XPath expression whose result is a node set that DOES NOT include element e but includes more than one of its children elements.
Rationale Check that implementations of [XML-C14N1.1] handle xml:space attributes as defined in [XML-C14N1.1]
Document subset expression (//. | //@* | //namespace::*) [ancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e12]
Output
  <ietf:e11 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org" xml:space="true">
           <ietf:e111></ietf:e111>
        </ietf:e11>\
+ <ietf:e12 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org" at="2" xml:space="true">
           <ietf:e121></ietf:e121>
        </ietf:e12>

2.2.3 Test Cases for xml:id attribute

The set of test cases in this section test the C14N11 handling of xml:id attributes.

Below is the input document for all the test cases in this section:

  <?xml version="1.0" encoding="UTF-8"?>
  <ietf:c14n11XmlIdDoc1 xmlns:ietf="http://www.ietf.org" 
  xmlns:w3c="http://www.w3.org">
     <ietf:e1 xml:id="IdInterop">
        <ietf:e11>
           <ietf:e111 />
        </ietf:e11>
        <ietf:e12 at="2">
           <ietf:e121 />
        </ietf:e12>
     </ietf:e1>
     <ietf:e2 >
        <ietf:e21 />
     </ietf:e2>  
  </ietf:c14n11XmlIdDoc1>
Test case c14n11/xmlid-1
Input details TBS with ONLY a xml:id attribute in a certain element e whose content includes other elements. The ds:Transform contains a XPath expression whose result is a node set that includes element e.
Rationale Check that implementations of [XML-C14N1.1] handle xml:id attributes as defined in [XML-C14N1.1]
Document subset expression (//. | //@* | //namespace::*) [ancestor-or-self::ietf:e1]
Output
  <ietf:e1 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org" xml:id="IdInterop">
        <ietf:e11>
           <ietf:e111></ietf:e111>
        </ietf:e11>
        <ietf:e12 at="2">
           <ietf:e121></ietf:e121>
        </ietf:e12>
     </ietf:e1>
Test case c14n11/xmlid-2
Input details TBS with ONLY a xml:id attribute in a certain element e whose content includes other elements. The ds:Transform contains a XPath expression whose result is a node set that DOES NOT include the element e but some of the children of the element e.
Rationale Check that implementations of [XML-C14N1.1] handle xml:id attributes as defined in [XML-C14N1.1]
Document subset expression (//. | //@* | //namespace::*) [ancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e12]
Output
  <ietf:e11 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org">
           <ietf:e111></ietf:e111>
        </ietf:e11>\
+ <ietf:e12 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org" at="2">
           <ietf:e121></ietf:e121>
        </ietf:e12>

2.2.4 Test Cases for xml:base attribute

The set of test cases in this section test the C14N11 handling of xml:base attributes.

Three sets of test cases have been defined:

  • Tests that check if the implementation correctly propagates the xml:base attributes through the node tree.

  • Tests that check if the implementation correctly processes the examples involving xml:base propagation in the [XML-C14N1.1] specification.

  • Tests that check if the implementation correctly processes the examples in the Appendix of [XML-C14N1.1]

2.2.4.1 Test Cases for checking xml:base attribute propagation

This section defines test cases that test how implementations propagate xml:base attributes through the tree when the result of the filtering is a document subset.

Below is the input document for the test cases in this section:

  <?xml version="1.0" encoding="UTF-8"?>
  <ietf:c14n11XmlBaseDoc1 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org"\
+  xml:base="http://xmlbase.example.org/xmlbase0/">
    <ietf:e1 xml:base="/xmlbase1/">
      <ietf:e11 xml:base="/xmlbase11/">
        <ietf:e111 xml:base="/xmlbase111/"/>
      </ietf:e11>
      <ietf:e12 at="2">
        <ietf:e121 xml:base="/xmlbase121/"/>
      </ietf:e12>
    </ietf:e1>
    <ietf:e2>
      <ietf:e21 xml:base="/xmlbase21/"/>
    </ietf:e2>
    <ietf:e3>
      <ietf:e31 at="3"/>
    </ietf:e3>
  </ietf:c14n11XmlBaseDoc1>

The document's root element ietf:c14n11XmlBaseDoc1 defines an xml:base attribute. This element contains three children elements.

The first element ietf:e1 has another xml:base attribute. All the ietf:e1's descendant elements have a xml:base attribute. Transforms that select subsets of ietf:e1's descendants will test how each level in the tree of elements incorporates its corresponding part to the value of the final xml:base.

The second element ietf:e2 does not have a xml:base attribute, but its child element, ietf:e21 has a xml:base attribute. Transforms that select ietf:e21 will test how it takes the value of xml:base from an ancestor different than its parent.

As for the third element, neither it nor any of its descendants have a xml:base attribute. Transforms that select ietf:e3 or any of its descendants will test how they inherit the xml:base attribute from the root element without any further processing.

Test case c14n11/xmlbase-prop-1
Input details The document shown above. The ds:Transform contains a XPath expression whose result is a node set that includes element ietf:c14n11XmlBaseDoc1 and the child ietf:e1 and its descendant.
Rationale Check that implementations of [XML-C14N1.1] work properly when the xml:base origin appears in the output document subset and also children with xml:base, which do not require further processing, are also present.
Document subset expression (//. | //@* | //namespace::*) [ancestor-or-self::ietf:c14n11XmlBaseDoc1 and not(ancestor-or-self::ietf:e2)]
Output
  <ietf:c14n11XmlBaseDoc1 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org"\
+  xml:base="http://xmlbase.example.org/xmlbase0/">
    <ietf:e1 xml:base="/xmlbase1/">
      <ietf:e11 xml:base="/xmlbase11/">
        <ietf:e111 xml:base="/xmlbase111/"></ietf:e111>
      </ietf:e11>
      <ietf:e12 at="2">
        <ietf:e121 xml:base="/xmlbase121/"></ietf:e121>
      </ietf:e12>
    </ietf:e1>
    
    <ietf:e3>
      <ietf:e31 at="3"></ietf:e31>
    </ietf:e3>
  </ietf:c14n11XmlBaseDoc1>
Test case c14n11/xmlbase-prop-2
Input details The document shown above. The ds:Transform contains a XPath expression whose result is a node set that includes element ietf:e1 and its descendant but not ietf:c14n11XmlBaseDoc1.
Rationale Check that implementations of [XML-C14N1.1] properly build the xml:base at the first level (ietf:e1).
Document subset expression (//. | //@* | //namespace::*) [ancestor-or-self::ietf:e1]
Output
  <ietf:e1 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org"\
+  xml:base="http://xmlbase.example.org/xmlbase1/">
      <ietf:e11 xml:base="/xmlbase11/">
        <ietf:e111 xml:base="/xmlbase111/"></ietf:e111>
      </ietf:e11>
      <ietf:e12 at="2">
        <ietf:e121 xml:base="/xmlbase121/"></ietf:e121>
      </ietf:e12>
    </ietf:e1>
Test case c14n11/xmlbase-prop-3
Input details The document shown above. The ds:Transform contains a XPath expression whose result is a node set that includes element ietf:e11 and its descendant. Elements ietf:c14n11XmlBaseDoc1 and ietf:e1 do not appear.
Rationale Check that implementations of [XML-C14N1.1] properly build the xml:base if one of intermediate the levels (ietf:e1) are absent from the document subset.
Document subset expression (//. | //@* | //namespace::*) [ancestor-or-self::ietf:e11]
Output
  <ietf:e11 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org"\
+  xml:base="http://xmlbase.example.org/xmlbase11/">
        <ietf:e111 xml:base="/xmlbase111/"></ietf:e111>
      </ietf:e11>
Test case c14n11/xmlbase-prop-4
Input details The document shown above. The ds:Transform contains a XPath expression whose result is a node set that includes element ietf:e111 and its descendant. Elements ietf:c14n11XmlBaseDoc1, ietf:e11 and ietf:e1 do not appear.
Rationale Check that implementations of [XML-C14N1.1] properly build the xml:base if several intermediate levels (ietf:e1 and ietf:e11) are absent from the document subset.
Document subset expression (//. | //@* | //namespace::*) [ancestor-or-self::ietf:e111]
Output
  <ietf:e111 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org"\
+  xml:base="http://xmlbase.example.org/xmlbase111/"></ietf:e111>
Test case c14n11/xmlbase-prop-5
Input details The document shown above. The ds:Transform contains a XPath expression whose result is a node set that includes element ietf:e2 and its descendant. Elements ietf:c14n11XmlBaseDoc1, ietf:e1 and its descendant, and ietf:e3 and its descendant do not appear.
Rationale Check that implementations of [XML-C14N1.1] properly build the xml:base if one intermediate level (ietf:e2) without any xml:base attribute is absent from the document subset.
Document subset expression (//. | //@* | //namespace::*) [ancestor-or-self::ietf:e21]
Output
  <ietf:e21 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org"\
+  xml:base="http://xmlbase.example.org/xmlbase21/"></ietf:e21>
Test case c14n11/xmlbase-prop-6
Input details The document shown above. The ds:Transform contains a XPath expression whose result is a node set that includes element ietf:e3 and its descendant. Elements ietf:c14n11XmlBaseDoc1, ietf:e1 and its descendant, and ietf:e2 and its descendant do not appear.
Rationale Check that implementations of [XML-C14N1.1] properly build the xml:base in one element that originally had no xml:base attribute.
Document subset expression (//. | //@* | //namespace::*) [ancestor-or-self::ietf:e3]
Output
  <ietf:e3 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org"\
+  xml:base="http://xmlbase.example.org/xmlbase0/">
      <ietf:e31 at="3"></ietf:e31>
    </ietf:e3>
Test case c14n11/xmlbase-prop-7
Input details The document shown above. The ds:Transform contains a XPath expression whose result is a node set that includes elements ietf:c14n11XmlBaseDoc1 and ietf:e3 and its descendant. Elements ietf:e1 and its descendant, and ietf:e2 and its descendant do not appear.
Rationale Check that implementations of [XML-C14N1.1] do not pass the xml:base to another element when it is not necessary.
Document subset expression (//. | //@* | //namespace::*) [ancestor-or-self::ietf:c14n11XmlBaseDoc1 and not(ancestor-or-self::ietf:e1 or ancestor-or-self::ietf:e2)]
Output
  <ietf:c14n11XmlBaseDoc1 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org"\
+  xml:base="http://xmlbase.example.org/xmlbase0/">
    
    
    <ietf:e3>
      <ietf:e31 at="3"></ietf:e31>
    </ietf:e3>
  </ietf:c14n11XmlBaseDoc1>
2.2.4.2 Test Cases for checking XML-C14N1.1 specification tests

This section defines test cases that are based on the examples in the C14N11 specification that propagate xml:base attributes through the tree when the result of the filtering is a document subset.

Below is the input document from section 3.8 of [XML-C14N1.1] for the test case c14n11/xmlbase-c14n11spec-102 below:

  <!DOCTYPE doc [
  <!ATTLIST e2 xml:space (default|preserve) 'preserve'>
  <!ATTLIST e3 id ID #IMPLIED>
  ]>
  <doc xmlns="http://www.ietf.org" xmlns:w3c="http://www.w3.org"\
+  xml:base="http://www.example.com/something/else">
     <e1>
        <e2 xmlns="" xml:id="abc" xml:base="../bar/">
           <e3 id="E3" xml:base="foo"/>
        </e2>
     </e1>
  </doc>
                
Test case c14n11/xmlbase-c14n11spec-102
Input details The input document shown above.
Rationale Check that correct xml:base fixup is performed.
Document subset expression (//. | //@* | //namespace::*)[self::ietf:e1 or (parent::ietf:e1 and not(self::text() or self::e2)) or count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node())]
Output
  <e1 xmlns="http://www.ietf.org" xmlns:w3c="http://www.w3.org"\
+  xml:base="http://www.example.com/something/else">\
+ <e3 xmlns="" id="E3" xml:base="../bar/foo" xml:space="preserve">\
+ </e3></e1>

Below is the input document similar to the example from section 3.8 of [XML-C14N1.1] for the test case c14n11/xmlbase-c14n11spec-102 below. The main difference is that the value of the xml:base attribute of the e2 element is "bar/" instead of "../bar".

  <!DOCTYPE doc [
  <!ATTLIST e2 xml:space (default|preserve) 'preserve'>
  <!ATTLIST e3 id ID #IMPLIED>
  ]>
  <doc xmlns="http://www.ietf.org" xmlns:w3c="http://www.w3.org"\
+  xml:base="something/else">
     <e1>
        <e2 xmlns="" xml:id="abc" xml:base="bar/">
           <e3 id="E3" xml:base="foo"/>
        </e2>
     </e1>
  </doc>
                
Test case c14n11/xmlbase-c14n11spec2-102
Input details The input document shown above.
Rationale Check that correct xml:base fixup is performed.
Document subset expression (//. | //@* | //namespace::*)[self::ietf:e1 or (parent::ietf:e1 and not(self::text() or self::e2)) or count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node())]
Output
  <e1 xmlns="http://www.ietf.org" xmlns:w3c="http://www.w3.org"\
+  xml:base="something/else">\
+ <e3 xmlns="" id="E3" xml:base="bar/foo" xml:space="preserve">\
+ </e3></e1>
                        

Below is the input document from section 2.4 of [XML-C14N1.1] for the test case c14n11/xmlbase-c14n11spec-103 below.

  <?xml version="1.0" encoding="UTF-8"?>
  <a xml:base="foo/bar">
   <b xml:base="..">
    <c xml:base="..">
     <d xml:base="x">
     </d>
    </c>
   </b>
  </a>
                
Test case c14n11/xmlbase-c14n11spec3-103
Input details The input document shown above.
Rationale Check that correct xml:base fixup is performed. This test illustrates the modification of the "Remove Dot Segments" algorithm.
Document subset expression (//. | //@* | //namespace::*) [self::a or ancestor-or-self::d]
Output
  <a xml:base="foo/bar"><d xml:base="../../x">
     </d></a>
                        

2.2.5 Test Cases for checking examples in the XML-C14N1.1 Appendix

This section defines test cases for checking if implementations are compliant with [XML-C14N1.1], specifically the normative rules in the Document Subsets section. Informative examples are given in the Appendix of C14N11.

Each test case in this section specifies an input string, representing a URI that must be processed according to the modified Remove Dot Segments algorithm described in Section 2.4 (Document Subsets) of [XML-C14N1.1].

Each test case appears in a row of the table shown below. The first column identifies the input URI that has to be processed. The second column shows the corresponding output.

Test case c14n11/xmlbase-annexa
inputs.txt outputs.txt
  no/.././/pseudo-netpath/seg/file.ext
  no/..//.///pseudo-netpath/seg/file.ext
  yes/no//..//.///pseudo-netpath/seg/file.ext
  no/../yes
  no/../yes/
  no/../yes/no/..
  ../../no/../..
  no/../..
  no/..
  no/../
  /a/b/c/./../../g
  mid/content=5/../6
  ../../..
  no/../../
  ..yes/..no/..no/..no/../../../..yes
  ..yes/..no/..no/..no/../../../..yes/
  ../..
  ../../../
  .
  ./
  ./.
  //no/..
  ../../no/..
  ../../no/../
  yes/no/../
  yes/no/no/../..
  yes/no/no/no/../../..
  yes/no/../yes/no/no/../..
  yes/no/no/no/../../../yes
  yes/no/no/no/../../../yes/
  /no/../
  /yes/no/../
  /yes/no/no/../..
  /yes/no/no/no/../../..
  ../../..no/..
  ../../..no/../
  ..yes/..no/../
  ..yes/..no/..no/../..
  ..yes/...no/..no/..no/../../..
  ..yes/..no/../..yes/..no/..no/../..
  /..no/../
  /..yes/..no/../
  /..yes/..no/..no/../..
  /..yes/..no/..no/..no/../../..
  /
  /.
  /./
  /./.
  /././
  /..
  /../..
  /../../..
  /../../..
  //..
  //..//..
  //..//..//..
  /./..
  /./.././..
  /./.././.././..
  .
  ./
  ./.
  ..
  ../
  pseudo-netpath/seg/file.ext
  pseudo-netpath/seg/file.ext
  yes/pseudo-netpath/seg/file.ext
  yes
  yes/
  yes/
  ../../../
  ../
  /a/g
  mid/6
  ../../../
  ../
  ..yes/..yes
  ..yes/..yes/
  ../../
  ../../../
  /
  ../../
  ../../
  yes/
  yes/
  yes/
  yes/yes/
  yes/yes
  yes/yes/
  /
  /yes/
  /yes/
  /yes/
  ../../
  ../../
  ..yes/
  ..yes/
  ..yes/
  ..yes/..yes/
  /
  /..yes/
  /..yes/
  /..yes/
  /
  /
  /
  /
  /
  /
  /
  /
  /
  /
  /
  /
  /
  /
  /
  ../
  ../

2.3 Test Cases for XMLDSig

2.3.1 Test Cases for C14N 1.1 in XMLDSig

The test cases in section 2.2 Test Cases for Canonicalization 1.1 are performed in the context of XMLDSig as well. Here it should be noted that this is performed in a different location (i.e. xmldsig/c14n11/) and the XPath-Filter expression in the ds:Transform/ds:XPath should be equal to the filter step of the XPath expressions in section 2.2 Test Cases for Canonicalization 1.1 (cf. explanation). The test cases are specified by an "unsigned" ds:Signature (without ds:DigestValue and ds:SignatureValue) in files in xmldsig/c14n11/ having the postfix ...-template.xml.

2.3.2 Test Cases on nodeset to octet-stream conversion by C14n 1.1 explicitly reflected in the chain of transforms

The set of test cases in this section test the Reference Generation steps of [XMLDSIG2] and its rules that manage the contents of the Transforms element when nodeset to octet-stream conversions are to be performed by canonicalization.

General rules for these test cases:

  • Test cases contain a ds:Transforms element with one child, containing a XPath filter that depends on the test case.

Test case xmldsig/defCan-1
Input details The same input document as in section 2.2.4 Test Cases for xml:base attribute.
Rationale Check that implementations and APIs of [XMLDSIG2] honor the recommendation to use [XML-C14N1.1] in section 3.1.1 "Reference Generation" of [XMLDSIG2] and make its use explicit as a ds:Transform.
Template This template can be used to instruct some API to create a signature with a chain of transforms that would require implicit transformations from a node set to an octet stream. It is expected that c14n11 is inserted at the relevant places.
Signature
  <?xml version="1.0" encoding="UTF-8"?>
  <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">\
+ <SignedInfo>\
+ <CanonicalizationMethod\
+  Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>\
+ <SignatureMethod\
+  Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/>\
+ <Reference URI="c14n11/xml-base-input.xml"><Transforms>\
+ <Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">\
+ <XPath xmlns:ietf="http://www.ietf.org">\
+ ancestor-or-self::ietf:c14n11XmlBaseDoc1 and\
+  not(ancestor-or-self::ietf:e2)</XPath></Transform>\
+ <Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>\
+ </Transforms>\
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>\
+ <DigestValue>t7d2cL8Ink8A5i3cS9/bu9MBBU8=</DigestValue>\
+ </Reference></SignedInfo>\
+ <SignatureValue>LR4s+Nxoq3VZO1NiCLoiovfCpK4=</SignatureValue>\
+ </Signature>
Test case xmldsig/defCan-2
Input details The same input document as in section 2.2.4 Test Cases for xml:base attribute.
Rationale Check that implementations and APIs of [XMLDSIG2] honor the recommendation to use [XML-C14N1.1] in section 3.1.1 "Reference Generation" of [XMLDSIG2] and make it's use explicit as a ds:Transform. It is expected that c14n11 is inserted at the relevant places.
Template This template can be used to instruct some API to create a signature with a chain of transforms that would require implicit transformations from a node set to an octet stream. The focus in this test case is to assure that c14n11 is inserted before transforms requiring an octet stream as input and also at the end of the chain of transforms if necessary because the last transform resulted in a node set.
Signature
  <?xml version="1.0" encoding="UTF-8"?>
  <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">\
+ <SignedInfo>\
+ <CanonicalizationMethod\
+  Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>\
+ <SignatureMethod\
+  Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/>\
+ <Reference URI="c14n11/xml-base-input.xml"><Transforms>\
+ <Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">\
+ <XPath xmlns:ietf="http://www.ietf.org">\
+ ancestor-or-self::ietf:e21</XPath></Transform>\
+ <Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>\
+ <Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116">\
+ <xsl:stylesheet version="1.0"\
+  xmlns="http://www.w3.org/1999/XSL/Transform"\
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">\
+ <xsl:template match="@*|node()"><xsl:copy>\
+ <xsl:apply-templates select="@*|node()"/></xsl:copy>\
+ </xsl:template></xsl:stylesheet></Transform>\
+ <Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">\
+ <XPath xmlns:ietf="http://www.ietf.org">1</XPath>\
+ </Transform>\
+ <Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>\
+ </Transforms>\
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>\
+ <DigestValue>fL7Igzs0LL7lKHJzAJIKYCphYBo=</DigestValue>\
+ </Reference></SignedInfo>\
+ <SignatureValue>bKQLywY51VZwjutUX/CUMsVs6RE=</SignatureValue>\
+ </Signature>
Test case xmldsig/defCan-3
Input details The same input document as in section 2.2.4 Test Cases for xml:base attribute.
Rationale Check that implementations and APIs of [XMLDSIG2] honor the recommendation to use [XML-C14N1.1] in section 3.1.1 "Reference Generation" of [XMLDSIG2] and make it's use explicit as a ds:Transform. It is expected that c14n11 is inserted at the relevant places. The focus in this test case is to assure that c14n11 is inserted before transforms requiring an octet stream as input but not inserted at the end of the chain of transforms, which is not necessary because the last transform resulted in an octet stream.
Template This template can be used to instruct some API to create a signature with a chain of transforms that would require implicit transformations from a node set to an octet stream.
Signature
  <?xml version="1.0" encoding="UTF-8"?>
  <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">\
+ <SignedInfo>\
+ <CanonicalizationMethod\
+  Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>\
+ <SignatureMethod\
+  Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/>\
+ <Reference URI="c14n11/xml-base-input.xml"><Transforms>\
+ <Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">\
+ <XPath xmlns:ietf="http://www.ietf.org">\
+ ancestor-or-self::ietf:e21</XPath></Transform>\
+ <Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>\
+ <Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116">\
+ <xsl:stylesheet version="1.0"\
+  xmlns="http://www.w3.org/1999/XSL/Transform"\
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">\
+ <xsl:template match="@*|node()"><xsl:copy>\
+ <xsl:apply-templates select="@*|node()"/></xsl:copy>\
+ </xsl:template></xsl:stylesheet></Transform>\
+ <Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">\
+ <XPath xmlns:ietf="http://www.ietf.org">1</XPath>\
+ </Transform>\
+ <Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>\
+ <Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116">\
+ <xsl:stylesheet version="1.0"\
+  xmlns="http://www.w3.org/1999/XSL/Transform"\
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">\
+ <xsl:template match="@*|node()"><xsl:copy>\
+ <xsl:apply-templates select="@*|node()"/></xsl:copy>\
+ </xsl:template></xsl:stylesheet></Transform>\
+ </Transforms>\
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>\
+ <DigestValue>hqabUu4fEZp7GK5JRyFC26W5JBk=</DigestValue>\
+ </Reference></SignedInfo>\
+ <SignatureValue>9+wp0W9xwL5X3kSttxABZ7p/kU0=</SignatureValue>\
+ </Signature>

2.3.3 Test Cases on schema based XPointers and canonicalization

This section defines test cases that test if implementations behave correctly when processing both schema-based xpointers and short-name xpointers with regards to comments present in the to be signed xml data object.

The following rules apply to the test cases in this section:

  • As the model processing is defined in [XMLDSIG2], the test cases are based on XML signatures. For each test case, an XML signature will be generated and validated. The signatures will be enveloped signatures when the URI attribute is referencing the root element and enveloping when the URI attribute is referencing an element using its Id attribute.

  • The input for the test cases is the to be signed xml data object shown below and the ds:Reference's URI attribute value (a schema-based xpointer or a short-name pointer).

  • The ds:Reference for enveloped signatures will eventually contain two Transform elements, namely; the enveloped signature transform and the conversion from node set data to octet stream (canonical XML 1.1).

Below is the input document for the test cases in this section:

  <?xml version="1.0" encoding="UTF-8"?>
  <ietf:c14n11XmlPointerDoc1 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org"  >
                  \
+ <!-- This is a xml document for checking behaviour of tools with\
+  regards to  comments when using scheme-based xpointers in the\
+  ds:Reference's URI attribute -->
          <ietf:e1 xml:id="e1ID">
                  <!-- This is a comment for ietf:e1 element -->
                  <ietf:e11 >
                  <!-- This is a comment for ietf:e11 element -->
                          <ietf:e111 />
                  </ietf:e11>
                  <ietf:e12 at="2">
                  <!-- This is a comment for ietf:e12 element -->
                          <ietf:e121 />
                  </ietf:e12>
          </ietf:e1>
          <ietf:e2 xml:id="e2ID">
                  <!-- This is a comment for ietf:e2 element -->
                  <ietf:e21 />
          </ietf:e2>
          <ietf:e3 xml:id="e3ID">
                  <ietf:e31 at="3"/>
          </ietf:e3>
  </ietf:c14n11XmlPointerDoc1>
Test case xmldsig/xpointer-1
Input details The signature is an enveloped signature. It appears as the last child of the root element. The document enveloping the signature is the one shown at the beginning of this section. The value of the URI attribute is "#xpointer(/)" (find it here).
Rationale Check that implementations, following the rules stated in the [XMLDSIG2] model, dereference the URI getting the root element and its descendant, and that comments are preserved before proceeding with the computation of digest.
Signature
  <?xml version="1.0" encoding="UTF-8"?>\
+ <ietf:c14n11XmlPointerDoc1 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org">
                  \
+ <!-- This is a xml document for checking behaviour of tools with\
+  regards to  comments when using scheme-based xpointers in the\
+  ds:Reference's URI attribute -->
          <ietf:e1 xml:id="e1ID">
                  <!-- This is a comment for ietf:e1 element -->
                  <ietf:e11>
                  <!-- This is a comment for ietf:e11 element -->
                          <ietf:e111/>
                  </ietf:e11>
                  <ietf:e12 at="2">
                  <!-- This is a comment for ietf:e12 element -->
                          <ietf:e121/>
                  </ietf:e12>
          </ietf:e1>
          <ietf:e2 xml:id="e2ID">
                  <!-- This is a comment for ietf:e2 element -->
                  <ietf:e21/>
          </ietf:e2>
          <ietf:e3 xml:id="e3ID">
                  <ietf:e31 at="3"/>
          </ietf:e3>
  <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">\
+ <SignedInfo>\
+ <CanonicalizationMethod\
+  Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>\
+ <SignatureMethod\
+  Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/>\
+ <Reference URI="#xpointer(/)"><Transforms>\
+ <Transform\
+  Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>\
+ <Transform\
+  Algorithm="http://www.w3.org/2006/12/xml-c14n11#WithComments"/>\
+ </Transforms>\
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>\
+ <DigestValue>/IZyGLL72rXhisXRkB617TxJrL8=</DigestValue>\
+ </Reference></SignedInfo>\
+ <SignatureValue>E4gxKwllVjvvlUQFe9p/ssO7Yxw=</SignatureValue>\
+ </Signature></ietf:c14n11XmlPointerDoc1>
Test case xmldsig/xpointer-2
Input details The signature is an enveloping signature. The enveloped document is the one shown at the beginning of this section. The value of the URI attribute is "#xpointer(id('e1ID'))" (find it here).
Rationale Check that implementations, following the rules stated in the [XMLDSIG2] model, dereference the URI getting an element identified by its id attribute as well as its descendant, and that comments are preserved before proceeding with the computation of digest.
Signature
  <?xml version="1.0" encoding="UTF-8"?>\
+ <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">\
+ <SignedInfo>\
+ <CanonicalizationMethod\
+  Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>\
+ <SignatureMethod\
+  Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/>\
+ <Reference URI="#xpointer(id('e1ID'))"><Transforms>\
+ <Transform\
+  Algorithm="http://www.w3.org/2006/12/xml-c14n11#WithComments"/>\
+ </Transforms>\
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>\
+ <DigestValue>XhSsDpWTt+ti0kcU9XYpleRDHfQ=</DigestValue>\
+ </Reference></SignedInfo>\
+ <SignatureValue>brEpICVA4lg7eQwz7i/rlBmYXiU=</SignatureValue>\
+ <Object>\
+ <ietf:c14n11XmlPointerDoc1 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org">
                  \
+ <!-- This is a xml document for checking behaviour of tools with\
+  regards to  comments when using scheme-based xpointers in the\
+  ds:Reference's URI attribute -->
          <ietf:e1 xml:id="e1ID">
                  <!-- This is a comment for ietf:e1 element -->
                  <ietf:e11>
                  <!-- This is a comment for ietf:e11 element -->
                          <ietf:e111/>
                  </ietf:e11>
                  <ietf:e12 at="2">
                  <!-- This is a comment for ietf:e12 element -->
                          <ietf:e121/>
                  </ietf:e12>
          </ietf:e1>
          <ietf:e2 xml:id="e2ID">
                  <!-- This is a comment for ietf:e2 element -->
                  <ietf:e21/>
          </ietf:e2>
          <ietf:e3 xml:id="e3ID">
                  <ietf:e31 at="3"/>
          </ietf:e3>
  </ietf:c14n11XmlPointerDoc1></Object></Signature>
Test case xmldsig/xpointer-3
Input details The signature is an enveloped signature. It appears as the last child of the root element. The document enveloping the signature is the one shown at the beginning of this section. The value of the URI attribute is "".
Rationale Check that implementations, following the rules stated in the [XMLDSIG2] model, dereference the URI getting the root element and its descendant, and that comments are not preserved before proceeding with the computation of digest.
Signature
  <?xml version="1.0" encoding="UTF-8"?>\
+ <ietf:c14n11XmlPointerDoc1 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org">
                  \
+ <!-- This is a xml document for checking behaviour of tools with\
+  regards to  comments when using scheme-based xpointers in the\
+  ds:Reference's URI attribute -->
          <ietf:e1 xml:id="e1ID">
                  <!-- This is a comment for ietf:e1 element -->
                  <ietf:e11>
                  <!-- This is a comment for ietf:e11 element -->
                          <ietf:e111/>
                  </ietf:e11>
                  <ietf:e12 at="2">
                  <!-- This is a comment for ietf:e12 element -->
                          <ietf:e121/>
                  </ietf:e12>
          </ietf:e1>
          <ietf:e2 xml:id="e2ID">
                  <!-- This is a comment for ietf:e2 element -->
                  <ietf:e21/>
          </ietf:e2>
          <ietf:e3 xml:id="e3ID">
                  <ietf:e31 at="3"/>
          </ietf:e3>
  <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">\
+ <SignedInfo>\
+ <CanonicalizationMethod\
+  Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>\
+ <SignatureMethod\
+  Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/>\
+ <Reference URI=""><Transforms>\
+ <Transform\
+  Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>\
+ <Transform\
+  Algorithm="http://www.w3.org/2006/12/xml-c14n11#WithComments"/>\
+ </Transforms>\
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>\
+ <DigestValue>gaV5r7qC3Ve/t641+d3ykN8JFSc=</DigestValue>\
+ </Reference></SignedInfo>\
+ <SignatureValue>gS1QKSwAH/6eE3OFi/L9O0oKKig=</SignatureValue>\
+ </Signature></ietf:c14n11XmlPointerDoc1>
Test case xmldsig/xpointer-4
Input details The signature is an enveloping signature. The enveloped document is the one shown at the beginning of this section. The value of the URI attribute is "#e1ID" (find it here).
Rationale Check that implementations, following the rules stated in the [XMLDSIG2] model, dereference the URI getting an element identified by its id attribute as well as its descendant, and that comments are not preserved before proceeding with the computation of digest.
Signature
  <?xml version="1.0" encoding="UTF-8"?>\
+ <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">\
+ <SignedInfo>\
+ <CanonicalizationMethod\
+  Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>\
+ <SignatureMethod\
+  Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/>\
+ <Reference URI="#e1ID"><Transforms>\
+ <Transform\
+  Algorithm="http://www.w3.org/2006/12/xml-c14n11#WithComments"/>\
+ </Transforms>\
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>\
+ <DigestValue>3K+K4MbR2EW7l/ry59XockKqt4g=</DigestValue>\
+ </Reference></SignedInfo>\
+ <SignatureValue>dgyjONUs9rBjW7PH25seGqcMNZY=</SignatureValue>\
+ <Object>\
+ <ietf:c14n11XmlPointerDoc1 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org">
                  \
+ <!-- This is a xml document for checking behaviour of tools with\
+  regards to  comments when using scheme-based xpointers in the\
+  ds:Reference's URI attribute -->
          <ietf:e1 xml:id="e1ID">
                  <!-- This is a comment for ietf:e1 element -->
                  <ietf:e11>
                  <!-- This is a comment for ietf:e11 element -->
                          <ietf:e111/>
                  </ietf:e11>
                  <ietf:e12 at="2">
                  <!-- This is a comment for ietf:e12 element -->
                          <ietf:e121/>
                  </ietf:e12>
          </ietf:e1>
          <ietf:e2 xml:id="e2ID">
                  <!-- This is a comment for ietf:e2 element -->
                  <ietf:e21/>
          </ietf:e2>
          <ietf:e3 xml:id="e3ID">
                  <ietf:e31 at="3"/>
          </ietf:e3>
  </ietf:c14n11XmlPointerDoc1></Object></Signature>
Test case xmldsig/xpointer-5
Input details The signature is an enveloping signature and signs three elements from the document. The enveloped document is the one shown at the beginning of this section. There are three ds:Reference elements. For the first one the value of the URI attribute is "#xpointer(id('e1ID'))" (find it here). For the second, it is "#xpointer(id('e2ID'))" (find it here). For the third one, it is "#xpointer(id('e3ID'))" (find it here).
Rationale Check implementation's behaviour when processing several elements (with and without comments) referenced by its Id attribute using a schema-based xpointer.
Signature
  <?xml version="1.0" encoding="UTF-8"?>\
+ <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">\
+ <SignedInfo>\
+ <CanonicalizationMethod\
+  Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>\
+ <SignatureMethod\
+  Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/>\
+ <Reference URI="#xpointer(id('e1ID'))"><Transforms>\
+ <Transform\
+  Algorithm="http://www.w3.org/2006/12/xml-c14n11#WithComments"/>\
+ </Transforms>\
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>\
+ <DigestValue>XhSsDpWTt+ti0kcU9XYpleRDHfQ=</DigestValue>\
+ </Reference><Reference URI="#xpointer(id('e2ID'))">\
+ <Transforms>\
+ <Transform\
+  Algorithm="http://www.w3.org/2006/12/xml-c14n11#WithComments"/>\
+ </Transforms>\
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>\
+ <DigestValue>abyA1j4yzf1IgQLWwDwKuU9l8Ik=</DigestValue>\
+ </Reference><Reference URI="#xpointer(id('e3ID'))">\
+ <Transforms>\
+ <Transform\
+  Algorithm="http://www.w3.org/2006/12/xml-c14n11#WithComments"/>\
+ </Transforms>\
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>\
+ <DigestValue>RUUBiUeFf8uRqTlpCyutkXDqnJ4=</DigestValue>\
+ </Reference></SignedInfo>\
+ <SignatureValue>sG+0pHk9TB6v7jES9RZUIVKMFos=</SignatureValue>\
+ <Object>\
+ <ietf:c14n11XmlPointerDoc1 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org">
                  \
+ <!-- This is a xml document for checking behaviour of tools with\
+  regards to  comments when using scheme-based xpointers in the\
+  ds:Reference's URI attribute -->
          <ietf:e1 xml:id="e1ID">
                  <!-- This is a comment for ietf:e1 element -->
                  <ietf:e11>
                  <!-- This is a comment for ietf:e11 element -->
                          <ietf:e111/>
                  </ietf:e11>
                  <ietf:e12 at="2">
                  <!-- This is a comment for ietf:e12 element -->
                          <ietf:e121/>
                  </ietf:e12>
          </ietf:e1>
          <ietf:e2 xml:id="e2ID">
                  <!-- This is a comment for ietf:e2 element -->
                  <ietf:e21/>
          </ietf:e2>
          <ietf:e3 xml:id="e3ID">
                  <ietf:e31 at="3"/>
          </ietf:e3>
  </ietf:c14n11XmlPointerDoc1></Object></Signature>
Test case xmldsig/xpointer-6
Input details The signature is an enveloping signature and signs two elements from the document. The enveloped document is the one shown at the beginning of this section. There are three ds:Reference elements. For the first one the value of the URI attribute is "#e1ID" (find it here). For the second, it is "#e2ID" (find it here). For the third one, it is "#e3ID" (find it here).
Rationale Check implementation's behaviour when processing several elements (with and without comments) referenced by its Id attribute using a short-name xpointer.
Signature
  <?xml version="1.0" encoding="UTF-8"?>\
+ <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">\
+ <SignedInfo>\
+ <CanonicalizationMethod\
+  Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>\
+ <SignatureMethod\
+  Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/>\
+ <Reference URI="#e1ID"><Transforms>\
+ <Transform\
+  Algorithm="http://www.w3.org/2006/12/xml-c14n11#WithComments"/>\
+ </Transforms>\
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>\
+ <DigestValue>3K+K4MbR2EW7l/ry59XockKqt4g=</DigestValue>\
+ </Reference><Reference URI="#e2ID"><Transforms>\
+ <Transform\
+  Algorithm="http://www.w3.org/2006/12/xml-c14n11#WithComments"/>\
+ </Transforms>\
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>\
+ <DigestValue>hnKFjGFr/jwLCCTckZpaclOwe28=</DigestValue>\
+ </Reference><Reference URI="#e3ID"><Transforms>\
+ <Transform\
+  Algorithm="http://www.w3.org/2006/12/xml-c14n11#WithComments"/>\
+ </Transforms>\
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>\
+ <DigestValue>RUUBiUeFf8uRqTlpCyutkXDqnJ4=</DigestValue>\
+ </Reference></SignedInfo>\
+ <SignatureValue>XzEJQ+whhHUYlqiCEt8XFxC8wpk=</SignatureValue>\
+ <Object>\
+ <ietf:c14n11XmlPointerDoc1 xmlns:ietf="http://www.ietf.org"\
+  xmlns:w3c="http://www.w3.org">
                  \
+ <!-- This is a xml document for checking behaviour of tools with\
+  regards to  comments when using scheme-based xpointers in the\
+  ds:Reference's URI attribute -->
          <ietf:e1 xml:id="e1ID">
                  <!-- This is a comment for ietf:e1 element -->
                  <ietf:e11>
                  <!-- This is a comment for ietf:e11 element -->
                          <ietf:e111/>
                  </ietf:e11>
                  <ietf:e12 at="2">
                  <!-- This is a comment for ietf:e12 element -->
                          <ietf:e121/>
                  </ietf:e12>
          </ietf:e1>
          <ietf:e2 xml:id="e2ID">
                  <!-- This is a comment for ietf:e2 element -->
                  <ietf:e21/>
          </ietf:e2>
          <ietf:e3 xml:id="e3ID">
                  <ietf:e31 at="3"/>
          </ietf:e3>
  </ietf:c14n11XmlPointerDoc1></Object></Signature>

2.3.4 Test Cases on String encoding of Distinguished Names

2.3.4.1 Test Cases on differences identified in RFC 2253 and RFC 4514

This Working group has identified a number of differences between [RFC-4514] and [RFC-2253]. They are described in this e-mail within the XML Security Specifications Maintenance Working Group e-mail list archive. This section contains test cases designed for checking that applications can parse and generate RFC 4514 Distinguished Names with these differences.

The following rules apply for the test cases defined in this section:

  • The input to each test case is an XML Signature. Each signature contains an X509SubjectName or X509IssuerSerial element with an RFC 4514 Distinguished Name.

  • To resolve the key, the application must find a certificate containing a matching issuer/serial or subject DN from the certificates that are contained in the "certs" directory.

  • Signature generation is also required. A PKCS#12 KeyStore containing the private keys used to generate the signatures is in the file "certs/keystore.p12". The keystore password is "secret". The key entry name is the same as the corresponding certificate file name (without the ".crt" part).

Test case xmldsig/dname/diffRFCs-1
Input details The input is an XML Signature containing an X509SubjectName in RFC 4514 format. The DN contains at least one Relative Distinguished Name whose attribute type keyword is encoded with one alphabetic character, and another Relative Distinguished Name whose attribute type keyword is encoded with two characters.
Rationale Check processing of attribute type keywords by tools implementing [RFC-4514].
[RFC-4514] DN CN=John,C=US
Signature
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>\
+ <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">\
+ <SignedInfo>\
+ <CanonicalizationMethod\
+  Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>\
+ <SignatureMethod\
+  Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"/>\
+ <Reference URI="#object">\
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>\
+ <DigestValue>nxGVxTzX3uQVeaZ7vtWMLc+V6CE=</DigestValue>\
+ </Reference></SignedInfo>\
+ <SignatureValue>\
+ DOz4KhJHOvhzPiKjxl0WVsrXPuZ9XQtdDvKN0KuLQGIzXkljfkFEQA==</SignatureValue>\
+ <KeyInfo><X509Data>\
+ <X509SubjectName>CN=John,C=US</X509SubjectName>\
+ </X509Data></KeyInfo>\
+ <Object Id="object">Approved</Object></Signature>
Test case xmldsig/dname/diffRFCs-2
Input details The input is an XML Signature containing an X509SubjectName in RFC 4514 format. The DN contains at least a Relative Distinguished Name containing space characters. [RFC-2253] does not allow escaping, whereas [RFC-4514] requires space characters to be escaped.
Rationale Check escaping of space characters by tools implementing [RFC-4514].
[RFC-4514] DN CN=\ Spacey\ ,C=US
Signature
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>\
+ <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">\
+ <SignedInfo>\
+ <CanonicalizationMethod\
+  Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>\
+ <SignatureMethod\
+  Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"/>\
+ <Reference URI="#object">\
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>\
+ <DigestValue>nxGVxTzX3uQVeaZ7vtWMLc+V6CE=</DigestValue>\
+ </Reference></SignedInfo>\
+ <SignatureValue>\
+ V18nxls1pqn4IyA/GNosGfqLHEE6INnyuV9TmHlYt/sYsaagHCH9Xw==</SignatureValue>\
+ <KeyInfo><X509Data>\
+ <X509SubjectName>CN=\ Spacey\ ,C=US</X509SubjectName>\
+ </X509Data></KeyInfo>\
+ <Object Id="object">Approved</Object></Signature>
Test case xmldsig/dname/diffRFCs-3
Input details The input is an XML Signature containing an X509SubjectName in RFC 4514 format. The DN contains at least a Relative Distinguished Name containing null characters. [RFC-2253] does not allow escaping, whereas [RFC-4514] requires space characters to be escaped.
Rationale Check escaping of null characters by tools implementing [RFC-4514].
[RFC-4514] DN CN=\00,C=US
Signature
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>\
+ <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">\
+ <SignedInfo>\
+ <CanonicalizationMethod\
+  Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>\
+ <SignatureMethod\
+  Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"/>\
+ <Reference URI="#object">\
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>\
+ <DigestValue>nxGVxTzX3uQVeaZ7vtWMLc+V6CE=</DigestValue>\
+ </Reference></SignedInfo>\
+ <SignatureValue>\
+ N6jHpYnYpggrfADJkvZfggCaUq9dzU9M3EQ+27wA8f92nWwmrlyUQQ==</SignatureValue>\
+ <KeyInfo><X509Data>\
+ <X509SubjectName>CN=\00,C=US</X509SubjectName>\
+ </X509Data></KeyInfo>\
+ <Object Id="object">Approved</Object></Signature>
Test case xmldsig/dname/diffRFCs-4
Input details The input is an XML Signature containing an X509SubjectName in RFC 4514 format. The DN contains at least a Relative Distinguished Name containing a non-leading number sign character that is not escaped. [RFC-2253] requires escaping of non-leading number sign characters, whereas [RFC-4514] does not.
Rationale Check processing of non-leading number sign characters that are not escaped by tools implementing [RFC-4514].
[RFC-4514] DN CN=Num#ber,C=US
Signature
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>\
+ <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">\
+ <SignedInfo>\
+ <CanonicalizationMethod\
+  Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>\
+ <SignatureMethod\
+  Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"/>\
+ <Reference URI="#object">\
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>\
+ <DigestValue>nxGVxTzX3uQVeaZ7vtWMLc+V6CE=</DigestValue>\
+ </Reference></SignedInfo>\
+ <SignatureValue>\
+ QN8dVUz4674CG7tnHJ+VSDFKbttZ3Ywa5rizoYS2EGUD8/33RFlZJA==</SignatureValue>\
+ <KeyInfo><X509Data>\
+ <X509SubjectName>CN=Num#ber,C=US</X509SubjectName>\
+ </X509Data></KeyInfo>\
+ <Object Id="object">Approved</Object></Signature>
Test case xmldsig/dname/diffRFCs-5
Input details The input is an XML Signature containing an X509SubjectName in RFC 4514 format. The DN contains at least a Relative Distinguished Name containing an equals sign character that is not escaped. [RFC-2253] requires escaping of equals sign characters, whereas [RFC-4514] does not.
Rationale Check processing of equals sign characters that are not escaped by tools implementing [RFC-4514].
[RFC-4514] DN CN=Eq=uals,C=US
Signature
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>\
+ <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">\
+ <SignedInfo>\
+ <CanonicalizationMethod\
+  Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>\
+ <SignatureMethod\
+  Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"/>\
+ <Reference URI="#object">\
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>\
+ <DigestValue>nxGVxTzX3uQVeaZ7vtWMLc+V6CE=</DigestValue>\
+ </Reference></SignedInfo>\
+ <SignatureValue>\
+ TEFSu5hmr8r5JU78U9MgS0mdZIZOXUjORTRzDFaBWh9DhFjPjxxW4w==</SignatureValue>\
+ <KeyInfo><X509Data>\
+ <X509SubjectName>CN=Eq=uals,C=US</X509SubjectName>\
+ </X509Data></KeyInfo>\
+ <Object Id="object">Approved</Object></Signature>
2.3.4.2 Test Cases for RFC 4514

The set of test cases in this section are designed to test the representation of Distinguished Names as Strings as specified by [RFC-4514].

The same rules defined in section 3.3.4.1 apply to the test cases in this section.

Test case xmldsig/dname/dnString-4
Input details The DistinguishedName has the following restrictions:
  • All the RelativeDistinguishedNames attribute types have a short name (descriptor) tabulated in [RFC-4514].

  • Some RelativeDistinguishedNames attribute value have one or more trailing space characters (U+0020). The escaping mechanism will be '\20'.

Rationale Check that implementations correctly manage escaping of trailing space characters.
[RFC-4514] DN CN=Trailing\20\20,C=US
Signature
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>\
+ <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">\
+ <SignedInfo>\
+ <CanonicalizationMethod\
+  Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>\
+ <SignatureMethod\
+  Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"/>\
+ <Reference URI="#object">\
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>\
+ <DigestValue>nxGVxTzX3uQVeaZ7vtWMLc+V6CE=</DigestValue>\
+ </Reference></SignedInfo>\
+ <SignatureValue>\
+ ONd8OoOnv9OThyiTPkneEcsdgVt65w6AgUAxidekHeKmjyQxnYEdWA==</SignatureValue>\
+ <KeyInfo><X509Data>\
+ <X509SubjectName>CN=Trailing\20\20,C=US</X509SubjectName>\
+ </X509Data></KeyInfo>\
+ <Object Id="object">Approved</Object></Signature>
Test case xmldsig/dname/dnString-6
Input details The DistinguishedName has the following restrictions:
  • All the RelativeDistinguishedNames attribute types have a short name (descriptor) tabulated in [RFC-4514].

  • Some RelativeDistinguishedNames attribute value have one or more escaped ASCII control characters (U+1d). The escaping mechanism will be a backslash followed of a by a two digit hex number showing its Unicode point number.

Rationale Check that implementations correctly manage escaping of an ASCII control character that is neither the first nor the final character of the group.
[RFC-4514] DN CN=Con\09trol,C=US
Signature
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>\
+ <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">\
+ <SignedInfo>\
+ <CanonicalizationMethod\
+  Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>\
+ <SignatureMethod\
+  Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"/>\
+ <Reference URI="#object">\
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>\
+ <DigestValue>nxGVxTzX3uQVeaZ7vtWMLc+V6CE=</DigestValue>\
+ </Reference></SignedInfo>\
+ <SignatureValue>\
+ V34pKGIfKacwJtTEShfSXx4M2dhSOTqZVCIL6nO66lm+JTQ//wCKaA==</SignatureValue>\
+ <KeyInfo><X509Data>\
+ <X509SubjectName>CN=Con\09trol,C=US</X509SubjectName>\
+ </X509Data></KeyInfo>\
+ <Object Id="object">Approved</Object></Signature>
Test case xmldsig/dname/dnString-8
Input details The DistinguishedName has the following restrictions:
  • All the RelativeDistinguishedNames attribute types have a short name (descriptor) tabulated in [RFC-4514].

  • Some RelativeDistinguishedNames attribute value contain one or more special characters in the following group: '+', ',', ';', and '\.'

Rationale Check that implementations correctly manage escaping of all the special characters (except '"', 'lt;' and '>')..
[RFC-4514] DN CN=E\+s\,c\;aped,C=US
Signature
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>\
+ <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">\
+ <SignedInfo>\
+ <CanonicalizationMethod\
+  Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>\
+ <SignatureMethod\
+  Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"/>\
+ <Reference URI="#object">\
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>\
+ <DigestValue>nxGVxTzX3uQVeaZ7vtWMLc+V6CE=</DigestValue>\
+ </Reference></SignedInfo>\
+ <SignatureValue>\
+ L2r+QCiO0qOPgDYybThQEbP7A8Iq8AomDGBXgQqe4mkuLMnroTxnGA==</SignatureValue>\
+ <KeyInfo><X509Data>\
+ <X509SubjectName>CN=E\+s\,c\;aped,C=US</X509SubjectName>\
+ </X509Data></KeyInfo>\
+ <Object Id="object">Approved</Object></Signature>

3 References

RFC 2253
RFC 2253: Lightweight Directory Access Protocol (v3): UTF-8 String Representation of Distinguished Names. M. Wahl, S. Kille, T. Howes. Ed. December 1997. http://www.ietf.org/rfc/rfc2253txt
RFC 4514
RFC 4514: Lightweight Directory Access Protocol (LDAP): String Representation of Distinguished Names. K. Zeilenga, Ed. June 2006. http://www.ietf.org/rfc/rfc4514.txt
XML-C14N1.1
Canonical XML. Version 1.1. W3C Proposed Recommendation. John Boyer, Glenn Marcy. January 2008. http://www.w3.org/TR/2008/PR-xml-c14n11-20080129/
XMLDSIG
XML-Signature Syntax and Processing. W3C Recommendation. Donald Eastlake, Joseph Reagle, David Solo. February 2002. http://www.w3.org/TR/xmldsig-core/
XMLDSIG-interop
XML-Signature Interoperability. Joseph Reagle. April 2001. http://www.w3.org/Signature/2001/04/05-xmldsig-interop.html
XMLDSIG2
XML-Signature Syntax and Processing (Second Edition). Editor's Draft. Donald Eastlake, Joseph Reagle, David Solo, Frederick Hirsch, Thomas Roessler. January 2008. http://www.w3.org/2007/xmlsec/Drafts/xmldsig-core/
XPointer-Element
XPointer element() Scheme. W3C Recommendation. P. Grosso, E. Maler, J. Marsh, N. Walsh. March 2003. http://www.w3.org/TR/2003/REC-xptr-element-20030325
XPointer-Framework
XPointer Framework. W3C Recommendation. P. Grosso, E. Maler, J. Marsh, N. Walsh. March 2003. http://www.w3.org/TR/2003/REC-xptr-framework-20030325/
XPointer-xpointer
XPointer xpointer() Scheme. W3C Working Draft. S. DeRose, E. Maler, R. Daniel. December 2002. http://www.w3.org/TR/2002/WD-xptr-xpointer-20021219/
libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/0000755000175000017500000000000012273503733025365 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/report.html0000644000175000017500000002565510760636544027611 0ustar tonytony Implementation report XML Signature, 2nd Edition W3C Logo

Implementation report for XML Signature, Second Edition

Author
Frederick Hirsch
Thomas Roessler
Last Modified
$Date: 2008/02/15 15:16:22 $ by $Author: fhirsch3 $

Overview

This implementation report is intended to support the transition of the draft XML Signature, 2nd Edition specification to Proposed Edited Recommendation.

The specification was produced by the XML Security Specifications Maintenance Working Group. A Summary of Changes and Change Rationale is available.

Testing was organized and performed by the members of the XML Security Specifications Maintenance Working Group. Five implementations participated in the testing. All five implementations successfully completed the test cases listed in this report; some completed additional optional cases.

Test cases are detailed in the Test Cases for C14N 1.1 and XMLDSig Interoperability document.

Test Cases

The test cases tested by all implementations covered the following:

  • ds:Reference URI attribute processing for schema based XPointers and short-name XPointers. These tests demonstrate support for the XPointer idioms that have been mandatory to implement since XML-Signature 1.0, but were defined only by way of a normative reference to a Candidate Recommendation that had been subsequently withdrawn. @@ add reference @@

    See also: detailed description of schema based XPointers and short-name XPointers test cases.

  • Representation of Distinguished Names as Strings as specified by RFC 4514. These test cases provide evidence that the edge cases related to a change of normative references from RFC 2253 to RFC 4514 do not cause issues in implementations. Since the IBM implementation is known to use an identical code basis for Distinguished Name processing as another implementation, no test results were inclued for this implementation.

    See also: detailed description of RFC-4514 test cases.

Additional optional test cases were created and partially tested, but are not detailed in this report. These included:

  • Test cases to test nodeset to octet-stream conversion by C14n 1.1 explicitly reflected in the chain of transforms (detailed description of defCan test cases)

    The defCan-* test cases were intended to demonstrate that implementations are able to generate signatures using Canonical XML 1.1 as a default. However, all test cases rely on the availability of a templating mechanism, and two of them rely on the (optional) XSLT transform. We therefore do not include detailed results for this test case.

The implementation report for Canonical XML 1.1 demonstrates support in all five implementations for both generating and verifying signatures involving Canonical XML 1.1. All tests covered in that report were performed in the context of generating and verifying digital signatures according to the XML Signature specification.

Participating Implementations

IBM XML Digital Signature Package (IBM)

The XML Digital Signature package is bundled into IBM JREs that ship with IBM products or are downloaded for IBM systems. The XML Digital Signature package bundled into all IBM JREs at the Java 6.0 level or higher, and by special arrangement at earlier levels. It is a separate security provider, so would either need to be in the provider list in jre/lib/security/java.security or added programmatically at runtime. The C14N11 capability is currently (11 January, 2008) a technology preview that is not yet generally available.

Sun Java XML Digital Signature API and Implementation (Sun)

Sun's XML Digital Signature implementation is an implementation of the standard JSR 105 API (Java XML Digital Signature API) and is included in Sun's JDK 6 and Application Server products. The C14N 1.1 implementation is not yet generally available but is targeted for future releases.

Oracle XML Digital Signature package (Oracle)

The XML Digital Signature package is part of Oracle Security Developer Tools which is part of Oracle's Fusion Middleware platform. The upcoming AS11R1 release of Fusion Middleware includes full support for C14N version 1.1 in addition to XML Signature, XML Encryption, XML Key Management, SAML and Web Services Security technologies. The XML Digital Signature functionality can be accessed using the industry standard JSR 105 APIs (by using the Oracle provider) or through the current OSDT XML Security APIs.

upcxslib xml signature package (Universitat Politecnica de Catalunya)

The upcxslib xml signature package runs on Java 1.4.2 or higher. It uses Sun's security provider within the JRE for basic cryptographic tasks. CN14N 1.1 is not generally available at present, but its incorporation is targeted for a near future.

IAIK XML Security Toolkit (XSECT) (Graz University of Technology)

The IAIK XML Security Toolkit (XSECT) is the successor of the IAIK XML Signature Library (IXSIL). XSECT 1.12 or higher is scheduled to ship in Q2/2008 and will contain the C14N 1.1 implementation. C14N 1.1 will be enabled in the default mode for signature creation and may be turned off by a configuration flag allowing for maximum flexibility. XSECT 1.12 will support all Java^(TM) versions since JDK 1.3.1 or higher.

Test results

SUN IAIK IBM ORCL UPC
xpointer-1 PASS PASS PASS PASS PASS
xpointer-2 PASS PASS PASS PASS PASS
xpointer-3 PASS PASS PASS PASS PASS
xpointer-4 PASS PASS PASS PASS PASS
xpointer-5 PASS PASS PASS PASS PASS
xpointer-6 PASS PASS PASS PASS PASS
dnString-4 PASS PASS N/A PASS PASS
dnString-6 PASS PASS N/A PASS PASS
dnString-8 PASS PASS N/A PASS PASS

Differences

None observed.

libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/defCan-3-template.xml0000644000175000017500000000246610760636544031256 0ustar tonytony ancestor-or-self::ietf:e31libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/defCan-3-signature.xml0000644000175000017500000000310310760636544031431 0ustar tonytony ancestor-or-self::ietf:e211hqabUu4fEZp7GK5JRyFC26W5JBk=9+wp0W9xwL5X3kSttxABZ7p/kU0=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/defCan-1-IAIK.xml0000644000175000017500000000144410760636544030151 0ustar tonytony ancestor-or-self::ietf:c14n11XmlBaseDoc1 and not(ancestor-or-self::ietf:e2)t7d2cL8Ink8A5i3cS9/bu9MBBU8=LR4s+Nxoq3VZO1NiCLoiovfCpK4=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/0000755000175000017500000000000012273503733026274 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-1-IAIK.xml0000644000175000017500000000135410760636544031514 0ustar tonytony ancestor-or-self::ietf:e1FuzL1RuUM9w/nR4hKXNzsIpqak8=9exkAx33L9TR3RFR0zC2iZH8Shc=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/report.html0000644000175000017500000004117610760636544030514 0ustar tonytony Interop report C14N 1.1 W3C Logo

Implementation report C14N 1.1

Author
Thomas Roessler <tlr@w3.org>
Last Modified
$Date: 2008/01/22 16:33:45 $ by $Author: roessler $

Overview

This implementation report is intended to demonstrate fulfillment of the Candidate Recommendation Exit Criteria for Canonical XML 1.1:

  • Test documents must have been developed with a range of usages of attributes in the XML namespace, and correct and compatible results shown for these tests by at least two implementations.
  • A minimum of three months of the CR period must have elapsed.

-- Canonical XML 1.1, W3C Candidate Recommendation 21 June 2007

Canonical XML 1.1 differs from Canonical XML 1.0 in the handling of attributes in the xml namespace when document subsets are canonicalized. All tests were performed within the context of implementations of the XML Signature specification (see detailed description of test case setup), using an XPath transform to identify the signed document subset, and Canonical XML 1.1 to canonicalize it.

Testing was organized and performed by the members of the XML Security Specifications Maintenance Working Group. Five implementations participated in the testing. All five implementations submitted identical canonicalization results for all test cases.

Test Cases

The test cases covered the following xml namespace attributes:

  • xml:lang and xml:space are "simple inheritable attributes" in the sense of section 2.4, Canonical XML 1.1. They are covered by the test cases xmllang-1 to xmllang-4 and xmlspace-1 to xmlspace-4. See detailed description of xml:lang test cases; detailed description of xml:space test cases.

  • xml:id is never copied to a different element. This attribute is covered by the test cases xmlid-1 and xmlid-2. See detailed description of xml:id test cases.

  • xml:base requires a relatively complicated fix-up algorithm. While there was general agreement on the desired results of that algorithm, its specification was refined during the Candidate Recommendation phase to improve specification clarity and address edge cases. This refinement process happened in close coordination with the participants in the interoperability testing.

    The relevant test cases are: xmlbase-cc14n11spec-102, xmlbase-c14n11spec2-102, xmlbase-c14n11spec3-103, xmlbase-prop-1 to xmlbase-prop-7. These test cases are specifically intended to exercise those edge cases that were discovered during the Candidate Recommendation phase.

    See detailed description of xml:base test cases.

Participating Implementations

IBM XML Digital Signature Package (IBM)

The XML Digital Signature package is bundled into IBM JREs that ship with IBM products or are downloaded for IBM systems. The XML Digital Signature package bundled into all IBM JREs at the Java 6.0 level or higher, and by special arrangement at earlier levels. It is a separate security provider, so would either need to be in the provider list in jre/lib/security/java.security or added programmatically at runtime. The C14N11 capability is currently (11 January, 2008) a technology preview that is not yet generally available.

Sun Java XML Digital Signature API and Implementation (Sun)

Sun's XML Digital Signature implementation is an implementation of the standard JSR 105 API (Java XML Digital Signature API) and is included in Sun's JDK 6 and Application Server products. The C14N 1.1 implementation is not yet generally available but is targeted for future releases.

Oracle XML Digital Signature package (Oracle)

The XML Digital Signature package is part of Oracle Security Developer Tools which is part of Oracle's Fusion Middleware platform. The upcoming AS11R1 release of Fusion Middleware includes full support for C14N version 1.1 in addition to XML Signature, XML Encryption, XML Key Management, SAML and Web Services Security technologies. The XML Digital Signature functionality can be accessed using the industry standard JSR 105 APIs (by using the Oracle provider) or through the current OSDT XML Security APIs.

upcxslib xml signature package (Universitat Politecnica de Catalunya)

The upcxslib xml signature package runs on Java 1.4.2 or higher. It uses Sun's security provider within the JRE for basic cryptographic tasks. CN14N 1.1 is not generally available at present, but its incorporation is targeted for a near future.

IAIK XML Security Toolkit (XSECT) (Graz University of Technology)

The IAIK XML Security Toolkit (XSECT) is the successor of the IAIK XML Signature Library (IXSIL). XSECT 1.12 or higher is scheduled to ship in Q2/2008 and will contain the C14N 1.1 implementation. C14N 1.1 will be enabled in the default mode for signature creation and may be turned off by a configuration flag allowing for maximum flexibility. XSECT 1.12 will support all Java^(TM) versions since JDK 1.3.1 or higher.

Test results

SUN IAIK IBM ORCL UPC
xmlbase-c14n11spec-102 PASS PASS PASS PASS PASS
xmlbase-c14n11spec2-102 PASS PASS PASS PASS PASS
xmlbase-c14n11spec3-103 PASS PASS PASS PASS PASS
xmlbase-prop-1 PASS PASS PASS PASS PASS
xmlbase-prop-2 PASS PASS PASS PASS PASS
xmlbase-prop-3 PASS PASS PASS PASS PASS
xmlbase-prop-4 PASS PASS PASS PASS PASS
xmlbase-prop-5 PASS PASS PASS PASS PASS
xmlbase-prop-6 PASS PASS PASS PASS PASS
xmlbase-prop-7 PASS PASS PASS PASS PASS
xmlid-1 PASS PASS PASS PASS PASS
xmlid-2 PASS PASS PASS PASS PASS
xmllang-1 PASS PASS PASS PASS PASS
xmllang-2 PASS PASS PASS PASS PASS
xmllang-3 PASS PASS PASS PASS PASS
xmllang-4 PASS PASS PASS PASS PASS
xmlspace-1 PASS PASS PASS PASS PASS
xmlspace-2 PASS PASS PASS PASS PASS
xmlspace-3 PASS PASS PASS PASS PASS
xmlspace-4 PASS PASS PASS PASS PASS

Differences

None observed.

././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-4-IAIK.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-4-IAIK0000644000175000017500000000135510760636544031516 0ustar tonytony ancestor-or-self::ietf:e111CrnlZDA/Sq8/UeToWPRS81b+t9Y=1ZCoZS+Ssf68O1Fcr6HMwfHDTBQ=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlid-1-IAIK.xml0000644000175000017500000000135110760636544031012 0ustar tonytony ancestor-or-self::ietf:e1k6QH2VopUNpPY5psisrsrW/Py/Y=XCRMoUEu20dcgUR0BL3PUMRBy94=././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-2-IAIK.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-2-IAIK0000644000175000017500000000135310760636544031512 0ustar tonytony ancestor-or-self::ietf:e1lj13WH7Jg/+D4SkZ0WQ8Pf/XE44=zkazSweCeqJ+lnCDD6zDmNCxURg=././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlid-2-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlid-2-IAIK-ref0.d0000644000175000017500000000100610760636544031265 0ustar tonytony--------------------------- OctetStreamData ------------------------------ -------------------------------------------------------------------------- ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-4-IBM.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-4-IBM.0000644000175000017500000000153110760636544031462 0ustar tonytonyancestor-or-self::ietf:e111CrnlZDA/Sq8/UeToWPRS81b+t9Y=7c41Bg9Q/8poqImOFmoOwwsWpGs=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlid-2-IBM.xml0000644000175000017500000000156410760636544030713 0ustar tonytonyancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e129ZnHf04bdo+RFTozPen25oLH4zA=HMrCAcDpSKFPgSSlhhLrTu9tFo8=././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-2-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-2-IAIK-ref00000644000175000017500000000016210760636544031372 0ustar tonytony ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec2-102-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec20000644000175000017500000000147110760636544031525 0ustar tonytony self::ietf:e1 or (parent::ietf:e1 and not(self::text() or self::e2)) or count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node())libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-1-UPC.xml0000644000175000017500000000136010760636544031423 0ustar tonytony ancestor-or-self::ietf:e1FuzL1RuUM9w/nR4hKXNzsIpqak8=9exkAx33L9TR3RFR0zC2iZH8Shc=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-4-IAIK.xml0000644000175000017500000000141210760636544031340 0ustar tonytony ancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e12kM9Q/VyNfZUM8rr2o4RkegDYPN0=7IF6bUIOSRBsPHmVehgvL44lPzQ=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-3-IBM.xml0000644000175000017500000000153010760636544031232 0ustar tonytonyancestor-or-self::ietf:e11vTUGGWGOpcGbCYuxMbCQIz4mbAo=HgDcPi4UAYPBkFLNVh9lWYm82S0=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-4-ORCL.xml0000644000175000017500000000150410760636544031536 0ustar tonytonyancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e12Z8PY+XBWvganp/tTcVztz8+6TQw=tYSpTrM7KTeUxabLduMDNm67U2A=././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-4-ORCL.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-4-ORCL0000644000175000017500000000144610760636544031541 0ustar tonytonyancestor-or-self::ietf:e111CrnlZDA/Sq8/UeToWPRS81b+t9Y=1ZCoZS+Ssf68O1Fcr6HMwfHDTBQ=././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-1-SUN.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-1-SUN.0000644000175000017500000000143410760636544031517 0ustar tonytonyancestor-or-self::ietf:c14n11XmlBaseDoc1 and not(ancestor-or-self::ietf:e2)t7d2cL8Ink8A5i3cS9/bu9MBBU8=+tI1dfUtAOO08bJRdQFTqPBqyMc=././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-7-IAIK.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-7-IAIK0000644000175000017500000000147210760636544031521 0ustar tonytony ancestor-or-self::ietf:c14n11XmlBaseDoc1 and not(ancestor-or-self::ietf:e1 or ancestor-or-self::ietf:e2)MsHmUcaxsGqhWdxH8xmweI6bE78=eBpSbv1Gyxyqhi4n8nnSpEAgbd8=././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-3-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-3-IAIK-ref00000644000175000017500000000021210760636544031367 0ustar tonytony ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-3-UPC.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-3-UPC.0000644000175000017500000000136010760636544031501 0ustar tonytony ancestor-or-self::ietf:e117CEteg+fqtPTNLLT0HRgD4NHbMA=ADXU6uDpOOfZKiOPRTCygyrXdcc=././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec2-102-IBM.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec20000644000175000017500000000173410760636544031527 0ustar tonytonyself::ietf:e1 or (parent::ietf:e1 and not(self::text() or self::e2)) or count(id('E3')|ancestor-or-self::node()) = count(ancestor-or-self::node())LBXEYs7t/d8bgcN54PAfey3vjzA=5dnY+72Wm75apzUgI2QqfmSsmK0=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlid-2-IAIK.xml0000644000175000017500000000141010760636544031007 0ustar tonytony ancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e129ZnHf04bdo+RFTozPen25oLH4zA=WySYELZzwKHUWUh071/eZo4jSTA=././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-7-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-7-IAIK0000644000175000017500000000126110760636544031515 0ustar tonytony--------------------------- OctetStreamData ------------------------------ -------------------------------------------------------------------------- ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec3-103-IAIK.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec30000644000175000017500000000137410760636544031530 0ustar tonytony self::a or ancestor-or-self::dzkwYFWagoDX5nvwATyMGu8gcITc=XM0FVjll9XH5qiI0TQNhTAisSN8=././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec-102-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec-0000644000175000017500000000027110760636544031515 0ustar tonytony././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlid-2-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlid-2-IAIK-ref0.d0000644000175000017500000000037710760636544031277 0ustar tonytony ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec2-102-ORCL.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec20000644000175000017500000000165110760636544031525 0ustar tonytonyself::ietf:e1 or (parent::ietf:e1 and not(self::text() or self::e2)) or count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node())LBXEYs7t/d8bgcN54PAfey3vjzA=aqkAIl/Sds+oXb6U47i139nlSQM=././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-7-SUN.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-7-SUN.0000644000175000017500000000147110760636544031526 0ustar tonytonyancestor-or-self::ietf:c14n11XmlBaseDoc1 and not(ancestor-or-self::ietf:e1 or ancestor-or-self::ietf:e2)MsHmUcaxsGqhWdxH8xmweI6bE78=eBpSbv1Gyxyqhi4n8nnSpEAgbd8=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xml-base-input.xml0000644000175000017500000000103210760636544031665 0ustar tonytony ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec3-103-UPC.outputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec30000644000175000017500000000007110760636544031521 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-1-SUN.xml0000644000175000017500000000135210760636544031270 0ustar tonytonyancestor-or-self::ietf:e1g4Ga1O61Qi7COEtUf18jgiJoGBE=y2qnRplU0O3tIH1Kpw3FHWxqmb0=././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-4-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-4-IAIK-ref0000644000175000017500000000044110760636544031466 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlid-1-UPC.xml0000644000175000017500000000135510760636544030730 0ustar tonytony ancestor-or-self::ietf:e1k6QH2VopUNpPY5psisrsrW/Py/Y=XCRMoUEu20dcgUR0BL3PUMRBy94=././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-1-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-1-temp0000644000175000017500000000134510760636544031742 0ustar tonytony ancestor-or-self::ietf:c14n11XmlBaseDoc1 and not(ancestor-or-self::ietf:e2)././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-5-ORCL.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-5-ORCL0000644000175000017500000000144510760636544031541 0ustar tonytonyancestor-or-self::ietf:e21fL7Igzs0LL7lKHJzAJIKYCphYBo=fcCBM4F9rj7utBcH6jPOe/b/4XI=././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xml-base-c14n11spec2-input.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xml-base-c14n11spec0000644000175000017500000000047210760636544031520 0ustar tonytony ]> ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xml-base-c14n11spec3-input.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xml-base-c14n11spec0000644000175000017500000000022310760636544031512 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-1-ORCL.xml0000644000175000017500000000144510760636544031537 0ustar tonytonyancestor-or-self::ietf:e1FuzL1RuUM9w/nR4hKXNzsIpqak8=9exkAx33L9TR3RFR0zC2iZH8Shc=././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-1-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-1-IAIK0000644000175000017500000000072510760636544031513 0ustar tonytony ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-5-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-5-temp0000644000175000017500000000126410760636544031746 0ustar tonytony ancestor-or-self::ietf:e21././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-1-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-1-template0000644000175000017500000000126410760636544032013 0ustar tonytony ancestor-or-self::ietf:e1././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-4-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-4-IAIK-ref00000644000175000017500000000043310760636544031375 0ustar tonytony ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-6-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-6-IAIK0000644000175000017500000000126110760636544031514 0ustar tonytony--------------------------- OctetStreamData ------------------------------ -------------------------------------------------------------------------- libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-4-SUN.xml0000644000175000017500000000141110760636544031267 0ustar tonytonyancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e12kM9Q/VyNfZUM8rr2o4RkegDYPN0=7IF6bUIOSRBsPHmVehgvL44lPzQ=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlid-2-ORCL.xml0000644000175000017500000000150110760636544031032 0ustar tonytonyancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e129ZnHf04bdo+RFTozPen25oLH4zA=WySYELZzwKHUWUh071/eZo4jSTA=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-1-ORCL.xml0000644000175000017500000000144410760636544031364 0ustar tonytonyancestor-or-self::ietf:e1g4Ga1O61Qi7COEtUf18jgiJoGBE=y2qnRplU0O3tIH1Kpw3FHWxqmb0=././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-4-UPC.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-4-UPC.0000644000175000017500000000136110760636544031503 0ustar tonytony ancestor-or-self::ietf:e111CrnlZDA/Sq8/UeToWPRS81b+t9Y=1ZCoZS+Ssf68O1Fcr6HMwfHDTBQ=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-2-UPC.xml0000644000175000017500000000136010760636544031424 0ustar tonytony ancestor-or-self::ietf:e2ligp5LovXiBbuP87VQsuFxHZf9Y=J54ior0v1J+jFxB4VfoNjOhdO7k=././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec-102-IBM.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec-0000644000175000017500000000173310760636544031521 0ustar tonytonyself::ietf:e1 or (parent::ietf:e1 and not(self::text() or self::e2)) or count(id('E3')|ancestor-or-self::node()) = count(ancestor-or-self::node())ikiFWJqYGPEfpO8QMolig+16++M=JkiQuxT/PO7b81VIIhI5WMcfYMo=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/report.sh0000644000175000017500000000405610760636544030156 0ustar tonytony#!/bin/sh vendors="SUN IAIK IBM ORCL UPC" testcases="`cat testcases`" testdoc=../../xmlsig-interop-doc/testcases.html if test -f report.html ; then sed -n -e '/
/,/<\/div>/p' report.html > summary.html fi echo "Interop report C14N 1.1" echo '' echo '' echo '' echo "" echo "" echo 'W3C Logo' echo "

Implementation report C14N 1.1

" echo '
Author
Thomas Roessler <tlr@w3.org>
Last Modified
$Date: 2008/01/08 13:09:18 $ by $Author: roessler $
' echo '

Overview

' cat summary.html echo '

Test results

' echo "" done echo "" for t in $testcases ; do openssl sha1 -binary ../../c14n11/$t.output | openssl base64 -e > ${t}-reference.digest echo '' u=`echo $t | tr -d /` echo '' for v in $vendors ; do if test -f ${t}-${v}.xml ; then xsltproc digest.xsl ${t}-${v}.xml > ${t}-${v}.digest if diff -q ${t}-reference.digest ${t}-${v}.digest > /dev/null ; then echo '' rm -f ${t}-${v}.fail elif test -f ${t}-${v}.xml ; then echo '' diff -u ${t}-SUN.xml ${t}-${v}.xml > ${t}-${v}.fail fi else echo '' fi done echo '' done echo '
" for v in $vendors ; do echo "${v}
' $t '' echo 'PASS' echo 'FAILN/A
' echo '

Differences

' for f in *.fail ; do if test -f "$f" ; then base=`basename $f .fail` echo '

'$base'

' echo '
'
		sed -e 's/'
	else
		echo "

None observed.

" fi done echo '' ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlid-1-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlid-1-IAIK-ref0.d0000644000175000017500000000100610760636544031264 0ustar tonytony--------------------------- OctetStreamData ------------------------------ -------------------------------------------------------------------------- ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-3-IBM.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-3-IBM.0000644000175000017500000000153010760636544031460 0ustar tonytonyancestor-or-self::ietf:e117CEteg+fqtPTNLLT0HRgD4NHbMA=H3ampeFrhkADI6AahLCSoCuICkA=././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-2-UPC.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-2-UPC.0000644000175000017500000000135710760636544031506 0ustar tonytony ancestor-or-self::ietf:e1lj13WH7Jg/+D4SkZ0WQ8Pf/XE44=zkazSweCeqJ+lnCDD6zDmNCxURg=././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec-102-SUN.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec-0000644000175000017500000000155610760636544031524 0ustar tonytonyself::ietf:e1 or (parent::ietf:e1 and not(self::text() or self::e2)) or count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node())ikiFWJqYGPEfpO8QMolig+16++M=8c5Lodw38ksKmCwl/via/To9VM0=././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xml-base-c14n11spec-input.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xml-base-c14n11spec0000644000175000017500000000053610760636544031521 0ustar tonytony ]> ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-2-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-2-IAIK-ref00000644000175000017500000000077310760636544031402 0ustar tonytony--------------------------- OctetStreamData ------------------------------ -------------------------------------------------------------------------- libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-1-IBM.xml0000644000175000017500000000152710760636544031236 0ustar tonytonyancestor-or-self::ietf:e1g4Ga1O61Qi7COEtUf18jgiJoGBE=PvXA52xAPS9xNZMneZt1+CQJPtY=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-3-IBM.xml0000644000175000017500000000153110760636544031405 0ustar tonytonyancestor-or-self::ietf:e11D1bznqPBeYWP3/RsbLsDYGtqN/A=ldjzbJ/3v7B5U7llxlLVkRIfufk=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-1-IBM.xml0000644000175000017500000000153010760636544031402 0ustar tonytonyancestor-or-self::ietf:e1FuzL1RuUM9w/nR4hKXNzsIpqak8=J4mZWVqLDG6krRtFVMN62eHxk7s=././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-5-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-5-IAIK0000644000175000017500000000126110760636544031513 0ustar tonytony--------------------------- OctetStreamData ------------------------------ -------------------------------------------------------------------------- libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlid-2-UPC.xml0000644000175000017500000000141410760636544030725 0ustar tonytony ancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e129ZnHf04bdo+RFTozPen25oLH4zA=WySYELZzwKHUWUh071/eZo4jSTA=././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-3-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-3-template.0000644000175000017500000000126410760636544031721 0ustar tonytony ancestor-or-self::ietf:e11././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-6-ORCL.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-6-ORCL0000644000175000017500000000144410760636544031541 0ustar tonytonyancestor-or-self::ietf:e3V40BxpVrxkGm3Gpe0MyigsMxZ7A=MFSZgXy19c0XMZyKMSXLQIPjFVQ=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-3-SUN.xml0000644000175000017500000000135410760636544031446 0ustar tonytonyancestor-or-self::ietf:e11D1bznqPBeYWP3/RsbLsDYGtqN/A=0cMEswprCD+1gdUvl6RDpN1teKU=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-4-ORCL.xml0000644000175000017500000000150310760636544031363 0ustar tonytonyancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e12kM9Q/VyNfZUM8rr2o4RkegDYPN0=7IF6bUIOSRBsPHmVehgvL44lPzQ=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-2-SUN.xml0000644000175000017500000000135310760636544031444 0ustar tonytonyancestor-or-self::ietf:e2ligp5LovXiBbuP87VQsuFxHZf9Y=J54ior0v1J+jFxB4VfoNjOhdO7k=././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec3-103-UPC.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec30000644000175000017500000000140010760636544031516 0ustar tonytony self::a or ancestor-or-self::dzkwYFWagoDX5nvwATyMGu8gcITc=XM0FVjll9XH5qiI0TQNhTAisSN8=././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-7-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-7-IAIK0000644000175000017500000000034110760636544031513 0ustar tonytony ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-5-IBM.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-5-IBM.0000644000175000017500000000153010760636544031462 0ustar tonytonyancestor-or-self::ietf:e21fL7Igzs0LL7lKHJzAJIKYCphYBo=XgS14SSzn52f2yc/LU5y3616oqc=././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec3-103-SUN.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec30000644000175000017500000000137310760636544031527 0ustar tonytonyself::a or ancestor-or-self::dzkwYFWagoDX5nvwATyMGu8gcITc=XM0FVjll9XH5qiI0TQNhTAisSN8=././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-6-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-6-IAIK0000644000175000017500000000024610760636544031516 0ustar tonytony ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-4-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-4-temp0000644000175000017500000000126510760636544031746 0ustar tonytony ancestor-or-self::ietf:e111././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-3-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-3-IAIK-ref0000644000175000017500000000101010760636544031456 0ustar tonytony--------------------------- OctetStreamData ------------------------------ -------------------------------------------------------------------------- libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlid-1-SUN.xml0000644000175000017500000000135010760636544030741 0ustar tonytonyancestor-or-self::ietf:e1k6QH2VopUNpPY5psisrsrW/Py/Y=XCRMoUEu20dcgUR0BL3PUMRBy94=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-3-IAIK.xml0000644000175000017500000000135410760636544031344 0ustar tonytony ancestor-or-self::ietf:e11vTUGGWGOpcGbCYuxMbCQIz4mbAo=gHb5c6fkjQ2yoap5jdyuwEaJD3I=././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-1-UPC.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-1-UPC.0000644000175000017500000000144110760636544031477 0ustar tonytony ancestor-or-self::ietf:c14n11XmlBaseDoc1 and not(ancestor-or-self::ietf:e2)t7d2cL8Ink8A5i3cS9/bu9MBBU8=+tI1dfUtAOO08bJRdQFTqPBqyMc=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-3-ORCL.xml0000644000175000017500000000144610760636544031542 0ustar tonytonyancestor-or-self::ietf:e11D1bznqPBeYWP3/RsbLsDYGtqN/A=0cMEswprCD+1gdUvl6RDpN1teKU=././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlid-2-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlid-2-template.xm0000644000175000017500000000132010760636544031731 0ustar tonytony ancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e12././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec-102-ORCL.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec-0000644000175000017500000000165010760636544031517 0ustar tonytonyself::ietf:e1 or (parent::ietf:e1 and not(self::text() or self::e2)) or count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node())ikiFWJqYGPEfpO8QMolig+16++M=8c5Lodw38ksKmCwl/via/To9VM0=././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-4-SUN.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-4-SUN.0000644000175000017500000000135410760636544031523 0ustar tonytonyancestor-or-self::ietf:e111CrnlZDA/Sq8/UeToWPRS81b+t9Y=1ZCoZS+Ssf68O1Fcr6HMwfHDTBQ=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-2-ORCL.xml0000644000175000017500000000144510760636544031540 0ustar tonytonyancestor-or-self::ietf:e2ligp5LovXiBbuP87VQsuFxHZf9Y=J54ior0v1J+jFxB4VfoNjOhdO7k=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-4-UPC.xml0000644000175000017500000000141610760636544031256 0ustar tonytony ancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e12kM9Q/VyNfZUM8rr2o4RkegDYPN0=7IF6bUIOSRBsPHmVehgvL44lPzQ=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-2-IAIK.xml0000644000175000017500000000135410760636544031515 0ustar tonytony ancestor-or-self::ietf:e2ligp5LovXiBbuP87VQsuFxHZf9Y=J54ior0v1J+jFxB4VfoNjOhdO7k=././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-5-IAIK.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-5-IAIK0000644000175000017500000000135410760636544031516 0ustar tonytony ancestor-or-self::ietf:e21fL7Igzs0LL7lKHJzAJIKYCphYBo=fcCBM4F9rj7utBcH6jPOe/b/4XI=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-2-UPC.xml0000644000175000017500000000135710760636544031260 0ustar tonytony ancestor-or-self::ietf:e2ligp5LovXiBbuP87VQsuFxHZf9Y=XjKWHoa90Wsl/LP2mgHtqdnkiZo=././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-3-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-3-IAIK-ref00000644000175000017500000000077310760636544031403 0ustar tonytony--------------------------- OctetStreamData ------------------------------ -------------------------------------------------------------------------- ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-1-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-1-IAIK-ref0000644000175000017500000000101010760636544031454 0ustar tonytony--------------------------- OctetStreamData ------------------------------ -------------------------------------------------------------------------- ././@LongLink0000000000000000000000000000017700000000000011572 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec2-102-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec20000644000175000017500000000023710760636544031524 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlid-1-IBM.xml0000644000175000017500000000152510760636544030707 0ustar tonytonyancestor-or-self::ietf:e1k6QH2VopUNpPY5psisrsrW/Py/Y=G7sA9Fj071AHAAD1I+k8vUuq/Dk=././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-3-ORCL.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-3-ORCL0000644000175000017500000000144510760636544031537 0ustar tonytonyancestor-or-self::ietf:e117CEteg+fqtPTNLLT0HRgD4NHbMA=ADXU6uDpOOfZKiOPRTCygyrXdcc=././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-3-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-3-IAIK-ref0000644000175000017500000000021510760636544031464 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-4-IBM.xml0000644000175000017500000000156710760636544031417 0ustar tonytonyancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e12Z8PY+XBWvganp/tTcVztz8+6TQw=bwu8UT0sM44N7pZX5XUXv1lRtGk=././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec2-102-SUN.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec20000644000175000017500000000155710760636544031532 0ustar tonytonyself::ietf:e1 or (parent::ietf:e1 and not(self::text() or self::e2)) or count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node())LBXEYs7t/d8bgcN54PAfey3vjzA=aqkAIl/Sds+oXb6U47i139nlSQM=././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-3-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-3-IAIK0000644000175000017500000000030010760636544031502 0ustar tonytony ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-7-UPC.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-7-UPC.0000644000175000017500000000147610760636544031515 0ustar tonytony ancestor-or-self::ietf:c14n11XmlBaseDoc1 and not(ancestor-or-self::ietf:e1 or ancestor-or-self::ietf:e2)MsHmUcaxsGqhWdxH8xmweI6bE78=eBpSbv1Gyxyqhi4n8nnSpEAgbd8=././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-3-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-3-template0000644000175000017500000000126510760636544032016 0ustar tonytony ancestor-or-self::ietf:e11././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-7-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-7-temp0000644000175000017500000000140210760636544031742 0ustar tonytony ancestor-or-self::ietf:c14n11XmlBaseDoc1 and not(ancestor-or-self::ietf:e1 or ancestor-or-self::ietf:e2)././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec2-102-UPC.outputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec20000644000175000017500000000156510760636544031531 0ustar tonytony self::ietf:e1 or (parent::ietf:e1 and not(self::text() or self::e2)) or count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node())LBXEYs7t/d8bgcN54PAfey3vjzA=aqkAIl/Sds+oXb6U47i139nlSQM=././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-5-SUN.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-5-SUN.0000644000175000017500000000135310760636544031523 0ustar tonytonyancestor-or-self::ietf:e21fL7Igzs0LL7lKHJzAJIKYCphYBo=fcCBM4F9rj7utBcH6jPOe/b/4XI=././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-2-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-2-template0000644000175000017500000000126410760636544032014 0ustar tonytony ancestor-or-self::ietf:e2././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec-102-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec-0000644000175000017500000000076510760636544031525 0ustar tonytony--------------------------- OctetStreamData ------------------------------ ]> -------------------------------------------------------------------------- ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-3-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-3-IAIK0000644000175000017500000000126110760636544031511 0ustar tonytony--------------------------- OctetStreamData ------------------------------ -------------------------------------------------------------------------- libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-1-UPC.xml0000644000175000017500000000135710760636544031257 0ustar tonytony ancestor-or-self::ietf:e1g4Ga1O61Qi7COEtUf18jgiJoGBE=y2qnRplU0O3tIH1Kpw3FHWxqmb0=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/Makefile0000644000175000017500000000023210760636544027737 0ustar tonytonyreport.html: ,report.html mv ,report.html report.html tidy -m -asxhtml -i report.html ,report.html: sh report.sh > ,report.html .PHONY: ,report.html libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-3-UPC.xml0000644000175000017500000000136010760636544031253 0ustar tonytony ancestor-or-self::ietf:e11vTUGGWGOpcGbCYuxMbCQIz4mbAo=gHb5c6fkjQ2yoap5jdyuwEaJD3I=././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec-102-UPC.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec-0000644000175000017500000000156310760636544031522 0ustar tonytony self::ietf:e1 or (parent::ietf:e1 and not(self::text() or self::e2)) or count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node())ikiFWJqYGPEfpO8QMolig+16++M=8c5Lodw38ksKmCwl/via/To9VM0=././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-1-IBM.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-1-IBM.0000644000175000017500000000161110760636544031456 0ustar tonytonyancestor-or-self::ietf:c14n11XmlBaseDoc1 and not(ancestor-or-self::ietf:e2)t7d2cL8Ink8A5i3cS9/bu9MBBU8=iD+PecBuq9H0Ogp/qSXgoXgd9+4=././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-7-ORCL.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-7-ORCL0000644000175000017500000000156310760636544031544 0ustar tonytonyancestor-or-self::ietf:c14n11XmlBaseDoc1 and not(ancestor-or-self::ietf:e1 or ancestor-or-self::ietf:e2)MsHmUcaxsGqhWdxH8xmweI6bE78=eBpSbv1Gyxyqhi4n8nnSpEAgbd8=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-4-SUN.xml0000644000175000017500000000141210760636544031442 0ustar tonytonyancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e12Z8PY+XBWvganp/tTcVztz8+6TQw=tYSpTrM7KTeUxabLduMDNm67U2A=././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec3-103-ORCL.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec30000644000175000017500000000146510760636544031531 0ustar tonytonyself::a or ancestor-or-self::dzkwYFWagoDX5nvwATyMGu8gcITc=XM0FVjll9XH5qiI0TQNhTAisSN8=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-4-UPC.xml0000644000175000017500000000141710760636544031431 0ustar tonytony ancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e12Z8PY+XBWvganp/tTcVztz8+6TQw=tYSpTrM7KTeUxabLduMDNm67U2A=././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-4-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-4-template.0000644000175000017500000000132210760636544031715 0ustar tonytony ancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e12././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec-102-IAIK.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec-0000644000175000017500000000155710760636544031525 0ustar tonytony self::ietf:e1 or (parent::ietf:e1 and not(self::text() or self::e2)) or count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node())ikiFWJqYGPEfpO8QMolig+16++M=8c5Lodw38ksKmCwl/via/To9VM0=././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-3-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-3-temp0000644000175000017500000000126410760636544031744 0ustar tonytony ancestor-or-self::ietf:e11libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlid-2-SUN.xml0000644000175000017500000000140710760636544030745 0ustar tonytonyancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e129ZnHf04bdo+RFTozPen25oLH4zA=WySYELZzwKHUWUh071/eZo4jSTA=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xml-id-input.xml0000644000175000017500000000055710760636544031362 0ustar tonytony ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-3-IAIK.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-3-IAIK0000644000175000017500000000135410760636544031514 0ustar tonytony ancestor-or-self::ietf:e117CEteg+fqtPTNLLT0HRgD4NHbMA=ADXU6uDpOOfZKiOPRTCygyrXdcc=././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-1-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-1-IAIK0000644000175000017500000000126110760636544031507 0ustar tonytony--------------------------- OctetStreamData ------------------------------ -------------------------------------------------------------------------- ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-2-SUN.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-2-SUN.0000644000175000017500000000135210760636544031517 0ustar tonytonyancestor-or-self::ietf:e1lj13WH7Jg/+D4SkZ0WQ8Pf/XE44=zkazSweCeqJ+lnCDD6zDmNCxURg=././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec2-102-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec20000644000175000017500000000073310760636544031525 0ustar tonytony--------------------------- OctetStreamData ------------------------------ ]> -------------------------------------------------------------------------- ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-2-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-2-IAIK-ref0000644000175000017500000000101010760636544031455 0ustar tonytony--------------------------- OctetStreamData ------------------------------ -------------------------------------------------------------------------- libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xml-lang-input.xml0000644000175000017500000000054410760636544031703 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-1-IAIK.xml0000644000175000017500000000135310760636544031341 0ustar tonytony ancestor-or-self::ietf:e1g4Ga1O61Qi7COEtUf18jgiJoGBE=y2qnRplU0O3tIH1Kpw3FHWxqmb0=././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-2-ORCL.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-2-ORCL0000644000175000017500000000144410760636544031535 0ustar tonytonyancestor-or-self::ietf:e1lj13WH7Jg/+D4SkZ0WQ8Pf/XE44=zkazSweCeqJ+lnCDD6zDmNCxURg=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlid-1-ORCL.xml0000644000175000017500000000144210760636544031035 0ustar tonytonyancestor-or-self::ietf:e1k6QH2VopUNpPY5psisrsrW/Py/Y=XCRMoUEu20dcgUR0BL3PUMRBy94=././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-6-UPC.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-6-UPC.0000644000175000017500000000135710760636544031512 0ustar tonytony ancestor-or-self::ietf:e3V40BxpVrxkGm3Gpe0MyigsMxZ7A=MFSZgXy19c0XMZyKMSXLQIPjFVQ=././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-5-UPC.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-5-UPC.0000644000175000017500000000136010760636544031503 0ustar tonytony ancestor-or-self::ietf:e21fL7Igzs0LL7lKHJzAJIKYCphYBo=fcCBM4F9rj7utBcH6jPOe/b/4XI=././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-6-IBM.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-6-IBM.0000644000175000017500000000152710760636544031471 0ustar tonytonyancestor-or-self::ietf:e3V40BxpVrxkGm3Gpe0MyigsMxZ7A=j2KLOhDz2YclY/9jRq/aZbxwTxk=././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-1-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-1-template.0000644000175000017500000000126310760636544031716 0ustar tonytony ancestor-or-self::ietf:e1././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec3-103-IBM.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec30000644000175000017500000000155010760636544031524 0ustar tonytonyself::a or ancestor-or-self::dzkwYFWagoDX5nvwATyMGu8gcITc=5nCJgHNmjd4+xUbY6uY2kOacPCU=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-3-UPC.xml0000644000175000017500000000136110760636544031426 0ustar tonytony ancestor-or-self::ietf:e11D1bznqPBeYWP3/RsbLsDYGtqN/A=0cMEswprCD+1gdUvl6RDpN1teKU=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xml-space-input.xml0000644000175000017500000000056110760636544032054 0ustar tonytony ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-6-SUN.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-6-SUN.0000644000175000017500000000135210760636544031523 0ustar tonytonyancestor-or-self::ietf:e3V40BxpVrxkGm3Gpe0MyigsMxZ7A=MFSZgXy19c0XMZyKMSXLQIPjFVQ=././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-1-IAIK.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-1-IAIK0000644000175000017500000000143510760636544031512 0ustar tonytony ancestor-or-self::ietf:c14n11XmlBaseDoc1 and not(ancestor-or-self::ietf:e2)t7d2cL8Ink8A5i3cS9/bu9MBBU8=+tI1dfUtAOO08bJRdQFTqPBqyMc=././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec2-102-IAIK.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec20000644000175000017500000000156010760636544031524 0ustar tonytony self::ietf:e1 or (parent::ietf:e1 and not(self::text() or self::e2)) or count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node())LBXEYs7t/d8bgcN54PAfey3vjzA=aqkAIl/Sds+oXb6U47i139nlSQM=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-3-ORCL.xml0000644000175000017500000000144510760636544031367 0ustar tonytonyancestor-or-self::ietf:e11vTUGGWGOpcGbCYuxMbCQIz4mbAo=gHb5c6fkjQ2yoap5jdyuwEaJD3I=././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-4-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-4-IAIK0000644000175000017500000000126110760636544031512 0ustar tonytony--------------------------- OctetStreamData ------------------------------ -------------------------------------------------------------------------- ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-2-IBM.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-2-IBM.0000644000175000017500000000152710760636544031465 0ustar tonytonyancestor-or-self::ietf:e1lj13WH7Jg/+D4SkZ0WQ8Pf/XE44=gOyNZs/U9jdTWrksL2K8FtLUPeA=././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-2-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-2-IAIK-ref0000644000175000017500000000016210760636544031464 0ustar tonytony ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-2-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-2-IAIK0000644000175000017500000000051510760636544031511 0ustar tonytony ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-5-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-5-IAIK0000644000175000017500000000020510760636544031510 0ustar tonytony././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-4-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-4-IAIK-ref0000644000175000017500000000101010760636544031457 0ustar tonytony--------------------------- OctetStreamData ------------------------------ -------------------------------------------------------------------------- ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec-102-UPC.OUTPUTlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec-0000644000175000017500000000027210760636544031516 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/testcases0000644000175000017500000000042410760636544030223 0ustar tonytonyxmlbase-c14n11spec-102 xmlbase-c14n11spec2-102 xmlbase-c14n11spec3-103 xmlbase-prop-1 xmlbase-prop-2 xmlbase-prop-3 xmlbase-prop-4 xmlbase-prop-5 xmlbase-prop-6 xmlbase-prop-7 xmlid-1 xmlid-2 xmllang-1 xmllang-2 xmllang-3 xmllang-4 xmlspace-1 xmlspace-2 xmlspace-3 xmlspace-4 ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlid-1-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlid-1-IAIK-ref0.d0000644000175000017500000000037010760636544031267 0ustar tonytony ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-1-positive.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-1-positive.0000644000175000017500000000135710760636544031751 0ustar tonytony ancestor-or-self::ietf:e1././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-2-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-2-temp0000644000175000017500000000126310760636544031742 0ustar tonytony ancestor-or-self::ietf:e1libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-2-IBM.xml0000644000175000017500000000153010760636544031403 0ustar tonytonyancestor-or-self::ietf:e2ligp5LovXiBbuP87VQsuFxHZf9Y=x35JnXjCgmReof243PBDYwVLmec=././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-6-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-6-temp0000644000175000017500000000126310760636544031746 0ustar tonytony ancestor-or-self::ietf:e3././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-1-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-1-IAIK-ref00000644000175000017500000000077310760636544031401 0ustar tonytony--------------------------- OctetStreamData ------------------------------ -------------------------------------------------------------------------- ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-2-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-2-IAIK0000644000175000017500000000126110760636544031510 0ustar tonytony--------------------------- OctetStreamData ------------------------------ -------------------------------------------------------------------------- libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-3-SUN.xml0000644000175000017500000000135310760636544031273 0ustar tonytonyancestor-or-self::ietf:e11vTUGGWGOpcGbCYuxMbCQIz4mbAo=gHb5c6fkjQ2yoap5jdyuwEaJD3I=././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlid-1-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlid-1-template.xm0000644000175000017500000000126110760636544031734 0ustar tonytony ancestor-or-self::ietf:e1././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-1-ORCL.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-1-ORCL0000644000175000017500000000152610760636544031535 0ustar tonytonyancestor-or-self::ietf:c14n11XmlBaseDoc1 and not(ancestor-or-self::ietf:e2)t7d2cL8Ink8A5i3cS9/bu9MBBU8=+tI1dfUtAOO08bJRdQFTqPBqyMc=././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec-102-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec-0000644000175000017500000000147010760636544031517 0ustar tonytony self::ietf:e1 or (parent::ietf:e1 and not(self::text() or self::e2)) or count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node())libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-4-IAIK.xml0000644000175000017500000000141310760636544031513 0ustar tonytony ancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e12Z8PY+XBWvganp/tTcVztz8+6TQw=tYSpTrM7KTeUxabLduMDNm67U2A=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-3-IAIK.xml0000644000175000017500000000135510760636544031517 0ustar tonytony ancestor-or-self::ietf:e11D1bznqPBeYWP3/RsbLsDYGtqN/A=0cMEswprCD+1gdUvl6RDpN1teKU=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-1-SUN.xml0000644000175000017500000000135310760636544031443 0ustar tonytonyancestor-or-self::ietf:e1FuzL1RuUM9w/nR4hKXNzsIpqak8=9exkAx33L9TR3RFR0zC2iZH8Shc=././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-4-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-4-IAIK-ref00000644000175000017500000000077310760636544031404 0ustar tonytony--------------------------- OctetStreamData ------------------------------ -------------------------------------------------------------------------- ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-2-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-2-template.0000644000175000017500000000126310760636544031717 0ustar tonytony ancestor-or-self::ietf:e2././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec3-103-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-c14n11spec30000644000175000017500000000130510760636544031522 0ustar tonytony self::a or ancestor-or-self::d././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-1-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-1-IAIK-ref0000644000175000017500000000036610760636544031471 0ustar tonytony ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-6-IAIK.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-6-IAIK0000644000175000017500000000135310760636544031516 0ustar tonytony ancestor-or-self::ietf:e3V40BxpVrxkGm3Gpe0MyigsMxZ7A=MFSZgXy19c0XMZyKMSXLQIPjFVQ=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-2-IBM.xml0000644000175000017500000000152710760636544031237 0ustar tonytonyancestor-or-self::ietf:e2ligp5LovXiBbuP87VQsuFxHZf9Y=j6Ak7jrvLs/qXJkppCEb3z0tgiA=././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-3-SUN.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-3-SUN.0000644000175000017500000000135310760636544031521 0ustar tonytonyancestor-or-self::ietf:e117CEteg+fqtPTNLLT0HRgD4NHbMA=ADXU6uDpOOfZKiOPRTCygyrXdcc=././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-1-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-1-IAIK-ref00000644000175000017500000000036310760636544031374 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-2-ORCL.xml0000644000175000017500000000144410760636544031365 0ustar tonytonyancestor-or-self::ietf:e2ligp5LovXiBbuP87VQsuFxHZf9Y=XjKWHoa90Wsl/LP2mgHtqdnkiZo=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-2-SUN.xml0000644000175000017500000000135210760636544031271 0ustar tonytonyancestor-or-self::ietf:e2ligp5LovXiBbuP87VQsuFxHZf9Y=XjKWHoa90Wsl/LP2mgHtqdnkiZo=././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-4-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlspace-4-template0000644000175000017500000000132410760636544032013 0ustar tonytony ancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e12libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-4-IBM.xml0000644000175000017500000000156610760636544031244 0ustar tonytonyancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e12kM9Q/VyNfZUM8rr2o4RkegDYPN0=FhSDej017ZfqRleXVjvCSTa16GE=././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-7-IBM.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-7-IBM.0000644000175000017500000000164610760636544031474 0ustar tonytonyancestor-or-self::ietf:c14n11XmlBaseDoc1 and not(ancestor-or-self::ietf:e1 or ancestor-or-self::ietf:e2)MsHmUcaxsGqhWdxH8xmweI6bE78=rANKT8Tca1fT4DspQXBGptTR0MQ=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/digest.xsl0000644000175000017500000000070210760636544030310 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmllang-2-IAIK.xml0000644000175000017500000000135310760636544031342 0ustar tonytony ancestor-or-self::ietf:e2ligp5LovXiBbuP87VQsuFxHZf9Y=XjKWHoa90Wsl/LP2mgHtqdnkiZo=././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-4-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/c14n11/xmlbase-prop-4-IAIK0000644000175000017500000000021010760636544031503 0ustar tonytony././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/defCan-2-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/defCan-2-IAIK-ref0.digesti0000644000175000017500000000020510760636544031626 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/inventory0000644000175000017500000000003310760636544027347 0ustar tonytonydefCan-1 defCan-2 defCan-3 libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/defCan-1-IBM.xml0000644000175000017500000000162010760636544030037 0ustar tonytonyancestor-or-self::ietf:c14n11XmlBaseDoc1 and not(ancestor-or-self::ietf:e2)t7d2cL8Ink8A5i3cS9/bu9MBBU8=1bjkg9lm62hU28x97zn8pO/+G/0=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/defCan-1-signature.xml0000644000175000017500000000144410760636544031435 0ustar tonytony ancestor-or-self::ietf:c14n11XmlBaseDoc1 and not(ancestor-or-self::ietf:e2)t7d2cL8Ink8A5i3cS9/bu9MBBU8=LR4s+Nxoq3VZO1NiCLoiovfCpK4=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/report.sh0000644000175000017500000000662710760636544027255 0ustar tonytony#!/bin/sh # note, run as ./report.sh > report.out; mv report.out report.html # do not direct output directly to report.html as the script attempts to read that file and it may be overwritten prematurely. vendors="SUN IAIK IBM ORCL UPC" # warning - HTML had manual edit to link IBM N/A to reason #vendors="IBM" directories="xpointer dname" #directories="xpointer" testdoc=../xmlsig-interop-doc/testcases.html home=`pwd` if test -f report.html ; then sed -n -e '/
/,/<\/div>/p' report.html > summary.html fi echo '' echo '' echo 'Implementation report XML Signature, 2nd Edition' echo '' echo '' echo '' echo "" echo "" echo 'W3C Logo' echo "

Implementation report for XML Signature, Second Edition

" echo '
Author
Frederick Hirsch
Thomas Roessler
Last Modified
$Date: 2008/02/15 15:16:22 $ by $Author: fhirsch3 $
' echo '

Overview

' cat summary.html echo '

Test results

' echo "" done echo "" for d in $directories; do cd $d testcases=`cat inventory` for t in $testcases ; do echo '' u=`echo $d-$t|sed 's/\.-//'` echo '' sunfile="${t}-SUN.xml" # test by comparing SUN digest value with others. # need to consider cases of both and sundigest=`cat $sunfile|sed -n '//p' |sed 's/.*\//'|sed 's/\<\/DigestValue\>.*//'` for v in $vendors ; do thefile="${t}-${v}.xml" if test -f $thefile ; then # ibm test cases were verified during interop by all participants by verifying the signatures. IBM used namespace prefixes # and had different digest and signature values if [ ${v} = "IBM" ] then echo '' rm -f ${t}-${v}.fail else digest=`cat $thefile |sed -n '//p' |sed 's/.*\//'|sed 's/\<\/DigestValue\>.*//'` if [ "${sundigest}" = "${digest}" ] then echo '' rm -f ${t}-${v}.fail else echo '' echo "Reference digest=${sundigest} Value=${digest}" > ${t}-${v}.fail fi fi else echo '' fi done echo '' done cd $home done echo '
" for v in $vendors ; do echo "${v}
' $t '' echo 'PASS' echo '' echo 'PASS' echo 'FAILN/A
' echo '

Differences

' found=0 for d in $directories; do cd $d for f in *.fail ; do if test -f "$f" ; then base=`basename $f .fail` echo '

'$base'

' echo '
'
		sed -e 's/'
		found=1
	  fi
	done
	cd $home
done

if test "$found" = "0"
then
	echo "

None observed.

" fi echo '' libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/defCan-2-IAIK.xml0000644000175000017500000000237210760636544030153 0ustar tonytony ancestor-or-self::ietf:e211fL7Igzs0LL7lKHJzAJIKYCphYBo=bKQLywY51VZwjutUX/CUMsVs6RE=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/defCan-2-template.xml0000644000175000017500000000203310760636544031243 0ustar tonytony ancestor-or-self::ietf:e211././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/defCan-1-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/defCan-1-IAIK-ref0.derefUR0000644000175000017500000000126110760636544031534 0ustar tonytony--------------------------- OctetStreamData ------------------------------ -------------------------------------------------------------------------- libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/defCan-1-SUN.xml0000644000175000017500000000144310760636544030100 0ustar tonytonyancestor-or-self::ietf:c14n11XmlBaseDoc1 and not(ancestor-or-self::ietf:e2)t7d2cL8Ink8A5i3cS9/bu9MBBU8=LR4s+Nxoq3VZO1NiCLoiovfCpK4=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/0000755000175000017500000000000012273503733027235 5ustar tonytony././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-2-IAIK.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-2-IAIK.x0000644000175000017500000000444610760636544032166 0ustar tonytony XhSsDpWTt+ti0kcU9XYpleRDHfQ=brEpICVA4lg7eQwz7i/rlBmYXiU= ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-IBM.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-IBM.xm0000644000175000017500000000373310760636544032236 0ustar tonytony1RpG+cTWqnX9yGMkF8ipmqvo74s=Xvd+wZASV5ghcEgvWE7UlRsHXrM=S3uolXuC41S7/Qk5E9BYRY1bkos=5fq2c4Q1/mPRfY5iAwNnfZHqSdA= ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-2-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-2-IAIK-r0000644000175000017500000000062510760636544032152 0ustar tonytony ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-3-IAIK.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-3-IAIK.x0000644000175000017500000000255110760636544032162 0ustar tonytony gaV5r7qC3Ve/t641+d3ykN8JFSc=gS1QKSwAH/6eE3OFi/L9O0oKKig=././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-IAIK-ref2.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-IAIK-r0000644000175000017500000000105010760636544032147 0ustar tonytony------------------------------ NodeSetData ------------------------------- Node 1 : [ietf:e3: null] Node 2 : xml:id="e3ID" Node 3 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 4 : xmlns:ietf="http://www.ietf.org" Node 5 : xmlns:w3c="http://www.w3.org" Node 6 : [#text: ] Node 7 : [ietf:e31: null] Node 8 : at="3" Node 9 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 10 : xmlns:ietf="http://www.ietf.org" Node 11 : xmlns:w3c="http://www.w3.org" Node 12 : [#text: ] -------------------------------------------------------------------------- ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-1-IAIK.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-1-IAIK.x0000644000175000017500000000256510760636544032165 0ustar tonytony /IZyGLL72rXhisXRkB617TxJrL8=E4gxKwllVjvvlUQFe9p/ssO7Yxw=././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-4-IBM.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-4-IBM.xm0000644000175000017500000000257510760636544032240 0ustar tonytonyQzSt7/7+s4+cJGNpj8pVU2IbjDw=wwQv+uWye7X+l4/YxK0e6852g6Y= libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/input.xml0000644000175000017500000000137410760636544031131 0ustar tonytony ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-thirduri.pointervaluelibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-thirdu0000644000175000017500000000002610760636544032473 0ustar tonytony#xpointer(id('e3ID')) ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-IAIK.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-IAIK.x0000644000175000017500000000542410760636544032167 0ustar tonytony 3K+K4MbR2EW7l/ry59XockKqt4g=hnKFjGFr/jwLCCTckZpaclOwe28=RUUBiUeFf8uRqTlpCyutkXDqnJ4=XzEJQ+whhHUYlqiCEt8XFxC8wpk= ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-optional-1.pointervaluelibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-optional0000644000175000017500000000000510760636544032654 0ustar tonytony#e3ID././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-4-UPC.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-4-UPC.xm0000644000175000017500000000242210760636544032247 0ustar tonytony3K+K4MbR2EW7l/ry59XockKqt4g=dgyjONUs9rBjW7PH25seGqcMNZY= ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-2-IBM.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-2-IBM.xm0000644000175000017500000000261510760636544032231 0ustar tonytony1RpG+cTWqnX9yGMkF8ipmqvo74s=HHjVMlIkaFz3ksVg2Qk6pFlJBKU= ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-templa0000644000175000017500000000210110760636544032452 0ustar tonytony ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-1.pointervaluelibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-1.pointe0000644000175000017500000000001410760636544032464 0ustar tonytony#xpointer(/)././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-3-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-3-templa0000644000175000017500000000125210760636544032456 0ustar tonytony ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointerscheme-1-IAIK-ref1.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointerscheme-1-0000644000175000017500000000032610760636544032437 0ustar tonytony ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointerscheme-1-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointerscheme-1-0000644000175000017500000000053410760636544032440 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/inventory0000644000175000017500000000010210760636544031214 0ustar tonytonyxpointer-1 xpointer-2 xpointer-3 xpointer-4 xpointer-5 xpointer-6 ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-IAIK-ref1.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-IAIK-r0000644000175000017500000000032610760636544032153 0ustar tonytony ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-IAIK-r0000644000175000017500000000231510760636544032154 0ustar tonytony------------------------------ NodeSetData ------------------------------- Node 1 : [ietf:e1: null] Node 2 : xml:id="e1ID" Node 3 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 4 : xmlns:ietf="http://www.ietf.org" Node 5 : xmlns:w3c="http://www.w3.org" Node 6 : [#text: ] Node 7 : [#text: ] Node 8 : [ietf:e11: null] Node 9 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 10 : xmlns:ietf="http://www.ietf.org" Node 11 : xmlns:w3c="http://www.w3.org" Node 12 : [#text: ] Node 13 : [#text: ] Node 14 : [ietf:e111: null] Node 15 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 16 : xmlns:ietf="http://www.ietf.org" Node 17 : xmlns:w3c="http://www.w3.org" Node 18 : [#text: ] Node 19 : [#text: ] Node 20 : [ietf:e12: null] Node 21 : at="2" Node 22 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 23 : xmlns:ietf="http://www.ietf.org" Node 24 : xmlns:w3c="http://www.w3.org" Node 25 : [#text: ] Node 26 : [#text: ] Node 27 : [ietf:e121: null] Node 28 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 29 : xmlns:ietf="http://www.ietf.org" Node 30 : xmlns:w3c="http://www.w3.org" Node 31 : [#text: ] Node 32 : [#text: ] -------------------------------------------------------------------------- ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-4-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-4-IAIK-r0000644000175000017500000000041110760636544032145 0ustar tonytony ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-ORCL.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-ORCL.x0000644000175000017500000000363010760636544032205 0ustar tonytonyXhSsDpWTt+ti0kcU9XYpleRDHfQ=abyA1j4yzf1IgQLWwDwKuU9l8Ik=RUUBiUeFf8uRqTlpCyutkXDqnJ4=sG+0pHk9TB6v7jES9RZUIVKMFos= ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-4-IAIK.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-4-IAIK.x0000644000175000017500000000442610760636544032166 0ustar tonytony 3K+K4MbR2EW7l/ry59XockKqt4g=dgyjONUs9rBjW7PH25seGqcMNZY= ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointerscheme-1-IAIK-ref1.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointerscheme-1-0000644000175000017500000000115210760636544032435 0ustar tonytony------------------------------ NodeSetData ------------------------------- Node 1 : [ietf:e12: null] Node 2 : at="2" Node 3 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 4 : xmlns:ietf="http://www.ietf.org" Node 5 : xmlns:w3c="http://www.w3.org" Node 6 : [#text: ] Node 7 : [#comment: This is a comment for ietf:e12 element ] Node 8 : [#text: ] Node 9 : [ietf:e121: null] Node 10 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 11 : xmlns:ietf="http://www.ietf.org" Node 12 : xmlns:w3c="http://www.w3.org" Node 13 : [#text: ] -------------------------------------------------------------------------- ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-2-ORCL.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-2-ORCL.x0000644000175000017500000000257210760636544032206 0ustar tonytonyXhSsDpWTt+ti0kcU9XYpleRDHfQ=brEpICVA4lg7eQwz7i/rlBmYXiU= ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-3-SUN.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-3-SUN.xm0000644000175000017500000000255010760636544032266 0ustar tonytony gaV5r7qC3Ve/t641+d3ykN8JFSc=gS1QKSwAH/6eE3OFi/L9O0oKKig=././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-thirduri.pointervaluelibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-thirdu0000644000175000017500000000000510760636544032471 0ustar tonytony#e3ID././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-1-UPC.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-1-UPC.xm0000644000175000017500000000257510760636544032255 0ustar tonytony /IZyGLL72rXhisXRkB617TxJrL8=E4gxKwllVjvvlUQFe9p/ssO7Yxw=././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-IAIK.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-IAIK.x0000644000175000017500000000550410760636544032165 0ustar tonytony XhSsDpWTt+ti0kcU9XYpleRDHfQ=abyA1j4yzf1IgQLWwDwKuU9l8Ik=RUUBiUeFf8uRqTlpCyutkXDqnJ4=sG+0pHk9TB6v7jES9RZUIVKMFos= ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointerscheme-1-IAIK.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointerscheme-1-0000644000175000017500000000516510760636544032445 0ustar tonytony AOuxEKTqVNLNvLkAFFVd1QFYr7s=YWc1VxKiDWAI7HQBCcHSHsP0E5o=4afkf6kC6+FSOrBchj8mRUuCNNo= ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-1-ORCL.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-1-ORCL.x0000644000175000017500000000265610760636544032210 0ustar tonytony /IZyGLL72rXhisXRkB617TxJrL8=E4gxKwllVjvvlUQFe9p/ssO7Yxw=././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-2.pointervaluelibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-2.pointe0000644000175000017500000000002610760636544032470 0ustar tonytony#xpointer(id('e1ID')) ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-templa0000644000175000017500000000202110760636544032454 0ustar tonytony ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-4-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-4-templa0000644000175000017500000000111310760636544032453 0ustar tonytony ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-3-IBM.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-3-IBM.xm0000644000175000017500000000266210760636544032234 0ustar tonytony gaV5r7qC3Ve/t641+d3ykN8JFSc=utBL7hfXI0npARHaUQowok2fZjI=././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-1-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-1-IAIK-r0000644000175000017500000000137010760636544032147 0ustar tonytony ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointerscheme-1-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointerscheme-1-0000644000175000017500000000143610760636544032442 0ustar tonytony------------------------------ NodeSetData ------------------------------- Node 1 : [ietf:e12: null] Node 2 : at="2" Node 3 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 4 : xmlns:ietf="http://www.ietf.org" Node 5 : xmlns:w3c="http://www.w3.org" Node 6 : [#text: ] Node 7 : [#comment: This is a comment for ietf:e12 element ] Node 8 : [#text: ] Node 9 : [ietf:e121: null] Node 10 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 11 : xmlns:ietf="http://www.ietf.org" Node 12 : xmlns:w3c="http://www.w3.org" Node 13 : [#text: ] Node 14 : [ietf:e31: null] Node 15 : at="3" Node 16 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 17 : xmlns:ietf="http://www.ietf.org" Node 18 : xmlns:w3c="http://www.w3.org" -------------------------------------------------------------------------- ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-IAIK-ref1.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-IAIK-r0000644000175000017500000000115410760636544032153 0ustar tonytony------------------------------ NodeSetData ------------------------------- Node 1 : [ietf:e2: null] Node 2 : xml:id="e2ID" Node 3 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 4 : xmlns:ietf="http://www.ietf.org" Node 5 : xmlns:w3c="http://www.w3.org" Node 6 : [#text: ] Node 7 : [#comment: This is a comment for ietf:e2 element ] Node 8 : [#text: ] Node 9 : [ietf:e21: null] Node 10 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 11 : xmlns:ietf="http://www.ietf.org" Node 12 : xmlns:w3c="http://www.w3.org" Node 13 : [#text: ] -------------------------------------------------------------------------- ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-IAIK-ref2.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-IAIK-r0000644000175000017500000000105010760636544032146 0ustar tonytony------------------------------ NodeSetData ------------------------------- Node 1 : [ietf:e3: null] Node 2 : xml:id="e3ID" Node 3 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 4 : xmlns:ietf="http://www.ietf.org" Node 5 : xmlns:w3c="http://www.w3.org" Node 6 : [#text: ] Node 7 : [ietf:e31: null] Node 8 : at="3" Node 9 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 10 : xmlns:ietf="http://www.ietf.org" Node 11 : xmlns:w3c="http://www.w3.org" Node 12 : [#text: ] -------------------------------------------------------------------------- ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-3-ORCL.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-3-ORCL.x0000644000175000017500000000264210760636544032205 0ustar tonytony gaV5r7qC3Ve/t641+d3ykN8JFSc=gS1QKSwAH/6eE3OFi/L9O0oKKig=././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-2-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-2-IAIK-r0000644000175000017500000000261110760636544032147 0ustar tonytony------------------------------ NodeSetData ------------------------------- Node 1 : [ietf:e1: null] Node 2 : xml:id="e1ID" Node 3 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 4 : xmlns:ietf="http://www.ietf.org" Node 5 : xmlns:w3c="http://www.w3.org" Node 6 : [#text: ] Node 7 : [#comment: This is a comment for ietf:e1 element ] Node 8 : [#text: ] Node 9 : [ietf:e11: null] Node 10 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 11 : xmlns:ietf="http://www.ietf.org" Node 12 : xmlns:w3c="http://www.w3.org" Node 13 : [#text: ] Node 14 : [#comment: This is a comment for ietf:e11 element ] Node 15 : [#text: ] Node 16 : [ietf:e111: null] Node 17 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 18 : xmlns:ietf="http://www.ietf.org" Node 19 : xmlns:w3c="http://www.w3.org" Node 20 : [#text: ] Node 21 : [#text: ] Node 22 : [ietf:e12: null] Node 23 : at="2" Node 24 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 25 : xmlns:ietf="http://www.ietf.org" Node 26 : xmlns:w3c="http://www.w3.org" Node 27 : [#text: ] Node 28 : [#comment: This is a comment for ietf:e12 element ] Node 29 : [#text: ] Node 30 : [ietf:e121: null] Node 31 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 32 : xmlns:ietf="http://www.ietf.org" Node 33 : xmlns:w3c="http://www.w3.org" Node 34 : [#text: ] Node 35 : [#text: ] -------------------------------------------------------------------------- ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-4-ORCL.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-4-ORCL.x0000644000175000017500000000255210760636544032206 0ustar tonytony3K+K4MbR2EW7l/ry59XockKqt4g=dgyjONUs9rBjW7PH25seGqcMNZY= ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-UPC.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-UPC.xm0000644000175000017500000000342410760636544032254 0ustar tonytony3K+K4MbR2EW7l/ry59XockKqt4g=hnKFjGFr/jwLCCTckZpaclOwe28=RUUBiUeFf8uRqTlpCyutkXDqnJ4=XzEJQ+whhHUYlqiCEt8XFxC8wpk= ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-2-UPC.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-2-UPC.xm0000644000175000017500000000244210760636544032247 0ustar tonytonyXhSsDpWTt+ti0kcU9XYpleRDHfQ=brEpICVA4lg7eQwz7i/rlBmYXiU= ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-IAIK-r0000644000175000017500000000062510760636544032155 0ustar tonytony ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-1-IBM.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-1-IBM.xm0000644000175000017500000000267610760636544032237 0ustar tonytony /IZyGLL72rXhisXRkB617TxJrL8=AbB+OKJsozzIJ2JCNIabxqmMSCQ=././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-IAIK-ref2.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-IAIK-r0000644000175000017500000000025410760636544032153 0ustar tonytony ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-firsturi.pointervaluelibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-firstu0000644000175000017500000000000510760636544032506 0ustar tonytony#e1ID././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-3-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-3-IAIK-r0000644000175000017500000000772310760636544032161 0ustar tonytony------------------------------ NodeSetData ------------------------------- Node 1 : [ietf:c14n11XmlPointerDoc1: null] Node 2 : xmlns:ietf="http://www.ietf.org" Node 3 : xmlns:w3c="http://www.w3.org" Node 4 : [#text: ] Node 5 : [#text: ] Node 6 : [ietf:e1: null] Node 7 : xml:id="e1ID" Node 8 : xmlns:ietf="http://www.ietf.org" Node 9 : xmlns:w3c="http://www.w3.org" Node 10 : [#text: ] Node 11 : [#text: ] Node 12 : [ietf:e11: null] Node 13 : xmlns:ietf="http://www.ietf.org" Node 14 : xmlns:w3c="http://www.w3.org" Node 15 : [#text: ] Node 16 : [#text: ] Node 17 : [ietf:e111: null] Node 18 : xmlns:ietf="http://www.ietf.org" Node 19 : xmlns:w3c="http://www.w3.org" Node 20 : [#text: ] Node 21 : [#text: ] Node 22 : [ietf:e12: null] Node 23 : at="2" Node 24 : xmlns:ietf="http://www.ietf.org" Node 25 : xmlns:w3c="http://www.w3.org" Node 26 : [#text: ] Node 27 : [#text: ] Node 28 : [ietf:e121: null] Node 29 : xmlns:ietf="http://www.ietf.org" Node 30 : xmlns:w3c="http://www.w3.org" Node 31 : [#text: ] Node 32 : [#text: ] Node 33 : [#text: ] Node 34 : [ietf:e2: null] Node 35 : xml:id="e2ID" Node 36 : xmlns:ietf="http://www.ietf.org" Node 37 : xmlns:w3c="http://www.w3.org" Node 38 : [#text: ] Node 39 : [#text: ] Node 40 : [ietf:e21: null] Node 41 : xmlns:ietf="http://www.ietf.org" Node 42 : xmlns:w3c="http://www.w3.org" Node 43 : [#text: ] Node 44 : [#text: ] Node 45 : [ietf:e3: null] Node 46 : xml:id="e3ID" Node 47 : xmlns:ietf="http://www.ietf.org" Node 48 : xmlns:w3c="http://www.w3.org" Node 49 : [#text: ] Node 50 : [ietf:e31: null] Node 51 : at="3" Node 52 : xmlns:ietf="http://www.ietf.org" Node 53 : xmlns:w3c="http://www.w3.org" Node 54 : [#text: ] Node 55 : [#text: ] Node 56 : [Signature: null] Node 57 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 58 : xmlns:ietf="http://www.ietf.org" Node 59 : xmlns:w3c="http://www.w3.org" Node 60 : [SignedInfo: null] Node 61 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 62 : xmlns:ietf="http://www.ietf.org" Node 63 : xmlns:w3c="http://www.w3.org" Node 64 : [CanonicalizationMethod: null] Node 65 : Algorithm="http://www.w3.org/2006/12/xml-c14n11" Node 66 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 67 : xmlns:ietf="http://www.ietf.org" Node 68 : xmlns:w3c="http://www.w3.org" Node 69 : [SignatureMethod: null] Node 70 : Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1" Node 71 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 72 : xmlns:ietf="http://www.ietf.org" Node 73 : xmlns:w3c="http://www.w3.org" Node 74 : [Reference: null] Node 75 : URI="" Node 76 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 77 : xmlns:ietf="http://www.ietf.org" Node 78 : xmlns:w3c="http://www.w3.org" Node 79 : [Transforms: null] Node 80 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 81 : xmlns:ietf="http://www.ietf.org" Node 82 : xmlns:w3c="http://www.w3.org" Node 83 : [Transform: null] Node 84 : Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" Node 85 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 86 : xmlns:ietf="http://www.ietf.org" Node 87 : xmlns:w3c="http://www.w3.org" Node 88 : [Transform: null] Node 89 : Algorithm="http://www.w3.org/2006/12/xml-c14n11#WithComments" Node 90 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 91 : xmlns:ietf="http://www.ietf.org" Node 92 : xmlns:w3c="http://www.w3.org" Node 93 : [DigestMethod: null] Node 94 : Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" Node 95 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 96 : xmlns:ietf="http://www.ietf.org" Node 97 : xmlns:w3c="http://www.w3.org" Node 98 : [DigestValue: null] Node 99 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 100 : xmlns:ietf="http://www.ietf.org" Node 101 : xmlns:w3c="http://www.w3.org" Node 102 : [#text: ] Node 103 : [SignatureValue: null] Node 104 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 105 : xmlns:ietf="http://www.ietf.org" Node 106 : xmlns:w3c="http://www.w3.org" Node 107 : [#text: ] -------------------------------------------------------------------------- ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-1-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-1-templa0000644000175000017500000000126610760636544032461 0ustar tonytony ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-ORCL.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-ORCL.x0000644000175000017500000000355010760636544032207 0ustar tonytony3K+K4MbR2EW7l/ry59XockKqt4g=hnKFjGFr/jwLCCTckZpaclOwe28=RUUBiUeFf8uRqTlpCyutkXDqnJ4=XzEJQ+whhHUYlqiCEt8XFxC8wpk= ././@LongLink0000000000000000000000000000021200000000000011560 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointerscheme-Readme-RFC2396_RFC2732-diff-RFC3986.txtlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointerscheme-Re0000644000175000017500000001327710760636544032601 0ustar tonytonyDiscussion on RFC 2396 + RFC 2732 vs. RFC 3986. ====================================================================== XMLDSIG 2002 4.3.3.1 ====================================================================== > The URI attribute identifies a data object using a URI-Reference, as > specified by RFC2396 [URI]. The set of allowed characters for URI > attributes is the same as for XML, namely [Unicode]. However, some > Unicode characters are disallowed from URI references including all > non-ASCII characters and the excluded characters listed in RFC2396 > [URI, section 2.4]. However, the number sign (#), percent sign (%), > and square bracket characters re-allowed in RFC 2732 [URI-Literal] > are permitted. RFC 2396 ======== fragment = *uric uric = reserved | unreserved | escaped reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | "," unreserved = alphanum | mark mark = "-" | "_" | "." | "!" | "~" | "*" | "'" | "(" | ")" --> fragment = *( ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | "," alphanum | "-" | "_" | "." | "!" | "~" | "*" | "'" | "(" | ")" ) --> a..zA..Z0..9-._~!$&'()*+,;=/?:@ XMLDSIG 2002 allowed square brackets([]) as in RFC 2732. RFC 2732 ======== > This document incudes an update to the generic syntax for Uniform > Resource Identifiers defined in RFC 2396 [URL]. It defines a syntax > for IPv6 addresses and allows the use of "[" and "]" within a URI > explicitly for this reserved purpose. reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | "," | "[" | "]" --> fragment = *( ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | "," | "[" | "]" alphanum | "-" | "_" | "." | "!" | "~" | "*" | "'" | "(" | ")" ) --> a..zA..Z0..9-._~!$&'()*+,;=/?:@[] Although the grammar was changed in RFC 2732 in a way that allowed "[" | "]" in the fragment the prose in RFC 2732 is saying: > It defines a syntax > for IPv6 addresses and allows the use of "[" and "]" within a URI > explicitly for this reserved purpose. That indicates that this overrules the grammar wich is also consistent with the current RFC 3986 grammar. XMLDSIG 2002 allowed (#), percent sign (%) =========================================== Here the only valid interpretation is is that (#), percent sign (%) are allowed (in their non-percent encoded form) to sperate the fragment and to initiate a percent encoding respectively because RFC 2396 says the following: > The character "#" is excluded > because it is used to delimit a URI from a fragment identifier in URI > references (Section 4). The percent character "%" is excluded because > it is used for the encoding of escaped characters. Wich is also consistent with RFC 3986 and the latest draft XMLDSIG 2007. +========+ The interpretation above makes the mention of number sign (#) | | and percent sign (%) in 4.3.3.1 redundant. | BEWARE | Some implementations may have wrongly interpreted 4.3.3.1 | | to allow number sign (#) and percent sign (%) in in their | | non-percent encoded form in the fragment, wich however | | contradicts the grammar in RFC 2396 and the prose in +========+ RFC 2732 and is inconsistent with RFC 3986. If such a misinterpretation caused the production of signatures containing an xpointer like the following #xpointer(//*[@authenticate='true']) (cf. EBICS-Standard in Germany) it does not comply to the grammar in RFC 3986 and the interpretation of RFC 2732 above does not allow square brackets in the fragment. Correct would be the following #xpointer(//*%5B@authenticate='true'%5D) As however square brackets wrongly appear to be allowed in fragments according to RFC 2732 grammar, but prohibited to the prose in RFC 2732 we may want to allow implementations to verify such signatures and advocate against the creation of new signatures that fail to escape the gen-delims characters in RFC 3986 (unless they really delimit the components of the URI). The text in the current draft correctly follows RFC 3986, but maybe we would like to add a note pointing to this mail. ====================================================================== XMLDSIG 2007 4.3.3.1 ====================================================================== RFC 3986 fragment = *( pchar / "/" / "?" ) pchar = unreserved / pct-encoded / sub-delims / ":" / "@" unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" --> fragment = *( pct-encoded / ALPHA / DIGIT / "-" / "." / "_" / "~" / "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" / "/" / "?" ) --> a..zA..Z0..9-._~!$&'()*+,;=/?:@ ==> The allowed characters are equal usinf the interpretation in this mail. RFC 2396 fragment chars are : a..zA..Z0..9-._~!$&'()*+,;=/?:@ RFC 3986 fragment chars are : a..zA..Z0..9-._~!$&'()*+,;=/?:@ regards Konrad Lanz P.S: Non percent encoded unicode caracters that can live in URI references inside XML are disjoint from the set of characters in RFC 2396 and RFC 3986 grammar and hence do not need to be discussed here further. -- Konrad Lanz, IAIK/SIC - Graz University of Technology Inffeldgasse 16a, 8010 Graz, Austria Tel: +43 316 873 5547 Fax: +43 316 873 5520 https://www.iaik.tugraz.at/aboutus/people/lanz http://jce.iaik.tugraz.at Certificate chain (including the EuroPKI root certificate): https://europki.iaik.at/ca/europki-at/cert_download.htm ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-UPC.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-UPC.xm0000644000175000017500000000350410760636544032252 0ustar tonytonyXhSsDpWTt+ti0kcU9XYpleRDHfQ=abyA1j4yzf1IgQLWwDwKuU9l8Ik=RUUBiUeFf8uRqTlpCyutkXDqnJ4=sG+0pHk9TB6v7jES9RZUIVKMFos= ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-3-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-3-IAIK-r0000644000175000017500000000063710760636544032156 0ustar tonytony ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-1-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-1-IAIK-r0000644000175000017500000001061510760636544032151 0ustar tonytony------------------------------ NodeSetData ------------------------------- Node 1 : [ietf:c14n11XmlPointerDoc1: null] Node 2 : xmlns:ietf="http://www.ietf.org" Node 3 : xmlns:w3c="http://www.w3.org" Node 4 : [#text: ] Node 5 : [#comment: This is a xml document for checking behaviour of tools with regards to comments when using scheme-based xpointers in the ds:Reference's URI attribute ] Node 6 : [#text: ] Node 7 : [ietf:e1: null] Node 8 : xml:id="e1ID" Node 9 : xmlns:ietf="http://www.ietf.org" Node 10 : xmlns:w3c="http://www.w3.org" Node 11 : [#text: ] Node 12 : [#comment: This is a comment for ietf:e1 element ] Node 13 : [#text: ] Node 14 : [ietf:e11: null] Node 15 : xmlns:ietf="http://www.ietf.org" Node 16 : xmlns:w3c="http://www.w3.org" Node 17 : [#text: ] Node 18 : [#comment: This is a comment for ietf:e11 element ] Node 19 : [#text: ] Node 20 : [ietf:e111: null] Node 21 : xmlns:ietf="http://www.ietf.org" Node 22 : xmlns:w3c="http://www.w3.org" Node 23 : [#text: ] Node 24 : [#text: ] Node 25 : [ietf:e12: null] Node 26 : at="2" Node 27 : xmlns:ietf="http://www.ietf.org" Node 28 : xmlns:w3c="http://www.w3.org" Node 29 : [#text: ] Node 30 : [#comment: This is a comment for ietf:e12 element ] Node 31 : [#text: ] Node 32 : [ietf:e121: null] Node 33 : xmlns:ietf="http://www.ietf.org" Node 34 : xmlns:w3c="http://www.w3.org" Node 35 : [#text: ] Node 36 : [#text: ] Node 37 : [#text: ] Node 38 : [ietf:e2: null] Node 39 : xml:id="e2ID" Node 40 : xmlns:ietf="http://www.ietf.org" Node 41 : xmlns:w3c="http://www.w3.org" Node 42 : [#text: ] Node 43 : [#comment: This is a comment for ietf:e2 element ] Node 44 : [#text: ] Node 45 : [ietf:e21: null] Node 46 : xmlns:ietf="http://www.ietf.org" Node 47 : xmlns:w3c="http://www.w3.org" Node 48 : [#text: ] Node 49 : [#text: ] Node 50 : [ietf:e3: null] Node 51 : xml:id="e3ID" Node 52 : xmlns:ietf="http://www.ietf.org" Node 53 : xmlns:w3c="http://www.w3.org" Node 54 : [#text: ] Node 55 : [ietf:e31: null] Node 56 : at="3" Node 57 : xmlns:ietf="http://www.ietf.org" Node 58 : xmlns:w3c="http://www.w3.org" Node 59 : [#text: ] Node 60 : [#text: ] Node 61 : [Signature: null] Node 62 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 63 : xmlns:ietf="http://www.ietf.org" Node 64 : xmlns:w3c="http://www.w3.org" Node 65 : [SignedInfo: null] Node 66 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 67 : xmlns:ietf="http://www.ietf.org" Node 68 : xmlns:w3c="http://www.w3.org" Node 69 : [CanonicalizationMethod: null] Node 70 : Algorithm="http://www.w3.org/2006/12/xml-c14n11" Node 71 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 72 : xmlns:ietf="http://www.ietf.org" Node 73 : xmlns:w3c="http://www.w3.org" Node 74 : [SignatureMethod: null] Node 75 : Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1" Node 76 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 77 : xmlns:ietf="http://www.ietf.org" Node 78 : xmlns:w3c="http://www.w3.org" Node 79 : [Reference: null] Node 80 : URI="#xpointer(/)" Node 81 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 82 : xmlns:ietf="http://www.ietf.org" Node 83 : xmlns:w3c="http://www.w3.org" Node 84 : [Transforms: null] Node 85 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 86 : xmlns:ietf="http://www.ietf.org" Node 87 : xmlns:w3c="http://www.w3.org" Node 88 : [Transform: null] Node 89 : Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" Node 90 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 91 : xmlns:ietf="http://www.ietf.org" Node 92 : xmlns:w3c="http://www.w3.org" Node 93 : [Transform: null] Node 94 : Algorithm="http://www.w3.org/2006/12/xml-c14n11#WithComments" Node 95 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 96 : xmlns:ietf="http://www.ietf.org" Node 97 : xmlns:w3c="http://www.w3.org" Node 98 : [DigestMethod: null] Node 99 : Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" Node 100 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 101 : xmlns:ietf="http://www.ietf.org" Node 102 : xmlns:w3c="http://www.w3.org" Node 103 : [DigestValue: null] Node 104 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 105 : xmlns:ietf="http://www.ietf.org" Node 106 : xmlns:w3c="http://www.w3.org" Node 107 : [#text: ] Node 108 : [SignatureValue: null] Node 109 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 110 : xmlns:ietf="http://www.ietf.org" Node 111 : xmlns:w3c="http://www.w3.org" Node 112 : [#text: ] -------------------------------------------------------------------------- ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-3-UPC.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-3-UPC.xm0000644000175000017500000000256110760636544032252 0ustar tonytony gaV5r7qC3Ve/t641+d3ykN8JFSc=gS1QKSwAH/6eE3OFi/L9O0oKKig=././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-IAIK-r0000644000175000017500000000041110760636544032147 0ustar tonytony ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-4-SUN.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-4-SUN.xm0000644000175000017500000000246010760636544032267 0ustar tonytony3K+K4MbR2EW7l/ry59XockKqt4g=dgyjONUs9rBjW7PH25seGqcMNZY= ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-IBM.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-IBM.xm0000644000175000017500000000365310760636544032240 0ustar tonytonyQzSt7/7+s4+cJGNpj8pVU2IbjDw=ILMqiWwMD4Z+UoK9eHzHySUV2J0=S3uolXuC41S7/Qk5E9BYRY1bkos=AYsqS/3gJ3jlrfa9PGJFZ387Dkg= ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-firsturi.pointervaluelibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-firstu0000644000175000017500000000002610760636544032510 0ustar tonytony#xpointer(id('e1ID')) ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointerscheme-1-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointerscheme-1-0000644000175000017500000000161610760636544032442 0ustar tonytony ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointerscheme-2-negative-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointerscheme-2-0000644000175000017500000000216710760636544032445 0ustar tonytony ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-1-SUN.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-1-SUN.xm0000644000175000017500000000256410760636544032271 0ustar tonytony /IZyGLL72rXhisXRkB617TxJrL8=E4gxKwllVjvvlUQFe9p/ssO7Yxw=././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-IAIK-ref1.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-IAIK-r0000644000175000017500000000105610760636544032155 0ustar tonytony------------------------------ NodeSetData ------------------------------- Node 1 : [ietf:e2: null] Node 2 : xml:id="e2ID" Node 3 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 4 : xmlns:ietf="http://www.ietf.org" Node 5 : xmlns:w3c="http://www.w3.org" Node 6 : [#text: ] Node 7 : [#text: ] Node 8 : [ietf:e21: null] Node 9 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 10 : xmlns:ietf="http://www.ietf.org" Node 11 : xmlns:w3c="http://www.w3.org" Node 12 : [#text: ] -------------------------------------------------------------------------- ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-SUN.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-SUN.xm0000644000175000017500000000345610760636544032277 0ustar tonytony3K+K4MbR2EW7l/ry59XockKqt4g=hnKFjGFr/jwLCCTckZpaclOwe28=RUUBiUeFf8uRqTlpCyutkXDqnJ4=XzEJQ+whhHUYlqiCEt8XFxC8wpk= ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-IAIK-ref2.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-IAIK-r0000644000175000017500000000025410760636544032154 0ustar tonytony ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-4-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-4-IAIK-r0000644000175000017500000000231510760636544032152 0ustar tonytony------------------------------ NodeSetData ------------------------------- Node 1 : [ietf:e1: null] Node 2 : xml:id="e1ID" Node 3 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 4 : xmlns:ietf="http://www.ietf.org" Node 5 : xmlns:w3c="http://www.w3.org" Node 6 : [#text: ] Node 7 : [#text: ] Node 8 : [ietf:e11: null] Node 9 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 10 : xmlns:ietf="http://www.ietf.org" Node 11 : xmlns:w3c="http://www.w3.org" Node 12 : [#text: ] Node 13 : [#text: ] Node 14 : [ietf:e111: null] Node 15 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 16 : xmlns:ietf="http://www.ietf.org" Node 17 : xmlns:w3c="http://www.w3.org" Node 18 : [#text: ] Node 19 : [#text: ] Node 20 : [ietf:e12: null] Node 21 : at="2" Node 22 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 23 : xmlns:ietf="http://www.ietf.org" Node 24 : xmlns:w3c="http://www.w3.org" Node 25 : [#text: ] Node 26 : [#text: ] Node 27 : [ietf:e121: null] Node 28 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 29 : xmlns:ietf="http://www.ietf.org" Node 30 : xmlns:w3c="http://www.w3.org" Node 31 : [#text: ] Node 32 : [#text: ] -------------------------------------------------------------------------- ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-seconduri.pointervaluelibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-second0000644000175000017500000000002610760636544032447 0ustar tonytony#xpointer(id('e2ID')) ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-IAIK-r0000644000175000017500000000261110760636544032152 0ustar tonytony------------------------------ NodeSetData ------------------------------- Node 1 : [ietf:e1: null] Node 2 : xml:id="e1ID" Node 3 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 4 : xmlns:ietf="http://www.ietf.org" Node 5 : xmlns:w3c="http://www.w3.org" Node 6 : [#text: ] Node 7 : [#comment: This is a comment for ietf:e1 element ] Node 8 : [#text: ] Node 9 : [ietf:e11: null] Node 10 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 11 : xmlns:ietf="http://www.ietf.org" Node 12 : xmlns:w3c="http://www.w3.org" Node 13 : [#text: ] Node 14 : [#comment: This is a comment for ietf:e11 element ] Node 15 : [#text: ] Node 16 : [ietf:e111: null] Node 17 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 18 : xmlns:ietf="http://www.ietf.org" Node 19 : xmlns:w3c="http://www.w3.org" Node 20 : [#text: ] Node 21 : [#text: ] Node 22 : [ietf:e12: null] Node 23 : at="2" Node 24 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 25 : xmlns:ietf="http://www.ietf.org" Node 26 : xmlns:w3c="http://www.w3.org" Node 27 : [#text: ] Node 28 : [#comment: This is a comment for ietf:e12 element ] Node 29 : [#text: ] Node 30 : [ietf:e121: null] Node 31 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 32 : xmlns:ietf="http://www.ietf.org" Node 33 : xmlns:w3c="http://www.w3.org" Node 34 : [#text: ] Node 35 : [#text: ] -------------------------------------------------------------------------- ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-SUN.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-5-SUN.xm0000644000175000017500000000353610760636544032275 0ustar tonytonyXhSsDpWTt+ti0kcU9XYpleRDHfQ=abyA1j4yzf1IgQLWwDwKuU9l8Ik=RUUBiUeFf8uRqTlpCyutkXDqnJ4=sG+0pHk9TB6v7jES9RZUIVKMFos= ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-seconduri.pointervaluelibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-second0000644000175000017500000000000510760636544032445 0ustar tonytony#e2ID././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-2-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-2-templa0000644000175000017500000000113310760636544032453 0ustar tonytony ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-2-SUN.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-2-SUN.xm0000644000175000017500000000250010760636544032260 0ustar tonytonyXhSsDpWTt+ti0kcU9XYpleRDHfQ=brEpICVA4lg7eQwz7i/rlBmYXiU= ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-4.pointervaluelibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-4.pointe0000644000175000017500000000000510760636544032467 0ustar tonytony#e1ID././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-IAIK-ref1.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointer-6-IAIK-r0000644000175000017500000000025010760636544032150 0ustar tonytony ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/defCan-3-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/defCan-3-IAIK-ref0.derefUR0000644000175000017500000000126110760636544031536 0ustar tonytony--------------------------- OctetStreamData ------------------------------ -------------------------------------------------------------------------- libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/defCan-3-IAIK.xml0000644000175000017500000000310210760636544030144 0ustar tonytony ancestor-or-self::ietf:e31zxiJZmccKh7eR8g3VYqGrhZQL6Y=wXip037Y1Wo8iFzRJlE/mBuNUqM=libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/defCan-2-signature.xml0000644000175000017500000000237210760636544031437 0ustar tonytony ancestor-or-self::ietf:e211fL7Igzs0LL7lKHJzAJIKYCphYBo=bKQLywY51VZwjutUX/CUMsVs6RE=././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/defCan-2-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/defCan-2-IAIK-ref0.derefUR0000644000175000017500000000126110760636544031535 0ustar tonytony--------------------------- OctetStreamData ------------------------------ -------------------------------------------------------------------------- libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/0000755000175000017500000000000012273503733026451 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-4-ORCL.xml0000644000175000017500000000131610760636544031670 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=CQKrY5zBbCiw6DYm+cWEok4HYgsrCEe1kaaTKMoX+rkoytCpYNR8eA==CN=Trailing\20\20,C=USApprovedlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-4-SUN.xml0000644000175000017500000000123510760636544031434 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=QN8dVUz4674CG7tnHJ+VSDFKbttZ3Ywa5rizoYS2EGUD8/33RFlZJA==CN=Num#ber,C=USApproved././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-4-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-4-IAIK-ref00000644000175000017500000000042210760636544031534 0ustar tonytony------------------------------ NodeSetData ------------------------------- Node 1 : [Object: null] Node 2 : Id="object" Node 3 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 4 : [#text: Approved] -------------------------------------------------------------------------- libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-5-ORCL.xml0000644000175000017500000000130710760636544031527 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=fDIU7UWCHqeWuNzxG/bQvU/Nj1ZTRucTYRG9n6xLmjkOfXyCmwMZIQ==CN=Eq=uals,C=USApprovedlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-3-SUN.xml0000644000175000017500000000123110760636544031427 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=N6jHpYnYpggrfADJkvZfggCaUq9dzU9M3EQ+27wA8f92nWwmrlyUQQ==CN=\00,C=USApprovedlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-2-UPC.xml0000644000175000017500000000115510760636544031415 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=FQxsTRimPqi8tOIkSOj2UtpmcawDWJ/hnK83Tz4DobdOZkBr1024VQ==CN=\ Spacey\ ,C=USApproved././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-2-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-2-template.0000644000175000017500000000112510760636544032055 0ustar tonytony CN=\ Spacey\ ,C=US././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-3-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-3-IAIK-ref00000644000175000017500000000042210760636544031533 0ustar tonytony------------------------------ NodeSetData ------------------------------- Node 1 : [Object: null] Node 2 : Id="object" Node 3 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 4 : [#text: Approved] -------------------------------------------------------------------------- libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-5-SUN.xml0000644000175000017500000000123510760636544031435 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=TEFSu5hmr8r5JU78U9MgS0mdZIZOXUjORTRzDFaBWh9DhFjPjxxW4w==CN=Eq=uals,C=USApprovedlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/certs/0000755000175000017500000000000012273503733027571 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/certs/Equals.crt0000644000175000017500000000117610760636544031550 0ustar tonytony0z08FA0 *H801 0 UUS10UEq=uals0  070913135706Z21070820135706Z01 0 UUS10UEq=uals00,*H80Su)RJ.RsܝK<|eC !)׊0.\>f68 6ax4\yTQ peQR|EP>Sw{v2ﶡA |[A[Ѝ 3;U0 *H8/0,\ ̇W%{'yQs)!tD%QY7aJlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/certs/keystore.jks0000644000175000017500000002067510760636544032167 0ustar tonytonynullwb}-.ZP{"nNVkUI !GP3g\wR&v/p;n`.'lj2Lqu+U;)he޵jۨe^53jN'"h{Et%'dus04e+?8 $>ڻ9 ȭ S\RҙD@0Scޔ`>>*/( m mҋ" =upHټ!Csyo^uu%}A]ǓffnZ mY+-5mro%X.509s0o0,F@0 *H801 0 UUS1 0U 0  070912193955Z21070819193955Z01 0 UUS1 0U 00,*H80Su)RJ.RH=WƩh-d6G<7 ,xu> BXDF#5*O '5}L wmu Eʵ}7=){[Ƭ&LHn뢒ݹ,.̐peQ$2QF6p)u1iE t(M YP:3Ky`fN#˄+K)?`jͱ&6.͡JG*̜~X}Qf Te)hQu"4KH+$ERϳX.5090{08FA-0 *H801 0 UUS10U Num#ber0  070913135453Z21070820135453Z01 0 UUS10U Num#ber00,*H80Su)RJ.RSk#ڄ0^U (r#P\5f0CNPԃBԭ46!_l;VGMsL3>)y~5a;ӆ2>BH-RZsܝK<|eC !)׊0.\>f68 6ax4\yTQ peQR|EP>Sw{v2ﶡA |[A[Ѝ 3;U0 *H8/0,\ ̇W%{'yQs)!tD%QY7aJequals(#00 +*wxr9R!D,(?rSdoHaͲq?iYh,4ݙт~6Ux5h(-Coң%}-ZפH+Fp,BT}bQEK?YSYvl2 8E &ήa(@(zu5x4Yi_[XBb.BsE?\Nad/aB22GSЛA(Zd&° ͱETT紟;!e2#7"DG0zX@Qp4+l74Ƥފ"ݕ's|Zn&>2t[Rt}]7+R'Nk{Ξz (^Y^~pHX.509~0z08FA0 *H801 0 UUS10UEq=uals0  070913135706Z21070820135706Z01 0 UUS10UEq=uals00,*H80Su)RJ.R  h+nq-aY'?it;zӵWkĝO!g"%uX #;nWMw pˆL؊R u76> pFR:neB 8z'`eX枉0?:7%^oےR*;t> R'G-cy.pQw%*(q .:_ J׌X:,C( qzq$$҇ahɪq.3ϰH3T~.bo? T6RVsX.5090{09F;0 *H80 1 0 UUS10U Spacey 0  070912191823Z21070819191823Z0 1 0 UUS10U Spacey 00,*H80Su)RJ.R I<+6T'a.escapedF+00 +*wdB5vW:ajL?oxiǪz5ǹ#M7J/@ jP!Y(]qˌ-Ɣ{DU.mlUia&x׺SP g-zb+[uy]:X.50900=F0 *H80"1 0 UUS10U E+s,c;aped0  070914134728Z21070821134728Z0"1 0 UUS10U E+s,c;aped00,*H80Su)RJ.RfCOYN5◉˗xC00h/LBSA@0 *H8/0,5oz\Kk.Je"(x}:tH5XRepHJ=Mcontrol:00 +*wZx}Tg=λe??w"2WaB*EK}5~A +WгtXj;@HqpFyB]8WoVl% oۦ×> kQqI.%Wy 4 8ؓnYlj),ܿAޛ@N\!' _iՑEsLΉw!ETsPC\'D䁣Hb*FMKnOU)f ^&9j8q~Dc?>G'ʽ62e죿e& 0CYn5'Wܟeꞈ_c PuAx8?Ap]{ fKJ)FnW$Jr o/aR,&X *G , )S|^փ`rⲈ2(~91z}kO.hj=,PNv^ =qs>]xLjKʓHNa8 •tbBEړԨ[,nN54tAZ?cb~,6U֥)D,6=;;&(UQrJӋ8nP~΁ i! W2Q))4.3Va&+kkIa~F/PS1C1@0 *H  1 number0! *H  1Time 11897890506180 *H  0~0( *H  0H!U*e^ēP<ߔkC Sl{> ZíM&I=#2=qZ6-=1%*mp:;GDyo2kXHPG"1lT)Hwp^%tQO!U: o"OfwnwK:l _#gLA(pyNIzG7~ -qzR`\1ԽS5}@+|` {U^F" wEm8'z':5GY=c2,a Qv9+v( BY !-yKYu `5 IΫnj$D6i)gj@)t7ƜV\u>[Zn%TJUš64G55>S~YQm{eQI]Sџ'$ !?D1 N;˵3o2=,q\>(bd$A̶1@0 *H  1 equals0! *H  1Time 11897890505930 *H  0~0( *H  0[@G'RRtUP._Z]#`D7ϒ8 ewJ9.6*y3]H5h rͩ#/4 ENQJL鉭P$jD V9oWPndžQ,zx^hŽW0oTq0dzZ5F K1ki{4u̚;_o/7Vb,"sC$M {7K5 s&vNGQ_Ad,XՊ5cZ6}`B/兴ӦF3 V_e33J gpVΜv)Ypa3B& ևTeLC3/?'s!EA#{RyH1@0 *H  1 spacey0! *H  1Time 11897890506290 *H  0~0( *H  0{Xo"H' 8̙P^F OாXuƐ]9Ԕ`>ÿyJ2 ,~$WŴ^瘒uߚ"ý|Y}b:2}[ߕ=YlPelPF qHpW݋À4zvY) =Nye{$«8a0v+KMxQ4)nN$-2s_33LcauxbZQešiF+!/7k}T7 $*mȻ\VX $17Hd#(LPTVd]m}8Z.u!zx b3Մ:81B0 *H  1escaped0! *H  1Time 11897890506420 *H  0~0( *H  0ADzo*Tg8P آ&X C}1AlrEq И͋L[+)@x 0 ϑonУ,U?psߛ:.^ $)M,jPQޙW3+vTUU^Üs*&>uʆ"5Zr)ܮ}Dh\`"M(^MZ`)҆ Ѹrʷ~`jn{btxU -yP!疓vaQhn)@&l s0Ei%JZ H&家RNjImO~5ۋ^01B0 *H  1control0! *H  1Time 11897890506350 *H  0~0( *H  0}hX( Pi4/ 4USF[nÑ p{Kpr=!7hngod|oI/DBTr7 WmK_q1UIwkE. l}^r+Τ^,?Y;d!z.T hx{c'?HOw?V2Nܱe39BlB{{1J'qKCK d7+j+Xd,g"bn:#*uHگ I)#"z^:$j#/(drtG8>-.F}eQD/֊m{|bU1D0 *H  1trailing0! *H  1Time 11897890506480c *H T0P0I *H 0( *H  0B;A[:*hܣIߣI=~-?+U%i*VPr*-=NM=TilkVUM(p= >DA餰;ӟz)8jfו{S('U %ucxϰO@@OB5j)Q%z{y?wWkCt "\ µJ:}RBʧ']-MR&E8jJ`?v [NyШ!C!cfp>a+6I15٤Қ;}AbR؛uNT+_owz fXP7'QL5 ANeLZrgll%`t*~]l'⡌ 0B7]1E<X\ʪA?*nUCN bgj$ 1h~a[ĽSLșYU`y2 G9pRfKͻIW˼um#>mX- rzdŊ*X$NɏYyA9Djmx! =J:c*/a\/DAHW|y4}1{(7Bn$%}4 ;u5L#o|w2$&Vc'dD/a(#62ndK{\F+Y/ϜlU((x|:v/ V\Qsg9L ?ʿiN 7fnIDʦ̕ &EG(ݿv> e}RYF nh{^,5A`iLvӄ㊗|P[EXG\L(ۖP52 LjCnv~} I;*yn) BB7\Ni6(i@vEѲp}̵z#q k>d^ !VQ)'14u*If)kB*K!Nv m8 91Z)GW 0q6}LsFh Ϣ9ÿ%%4D56@AR I@:[W7C`砤\cVcY buU)o'Ko eԹҋu+YϫGNAWoZ },bFz+Tp=5DZ3.<n+*EH߰ߞA +>i^D0SziAE - "\=I.ۚt|ğ hS&w^׆%-Wx""g">LfJ{c(6j(Ix-4hpH&я<3SL\w5-PˊZ4 NYﲿe|H3- ;զbqGFH1prlcPor?{HÐT^B%Z"u9LB܌&偦an:5$س cGXc;O> 8Fܼ5K%YmUeH+o''MVAAg%A`xhп m#h -n 8gRؾz;;aOGVIKfwRB9^]doj>ýE7;o4¤9aC7*O⠶UG^ ]>ek[l>;rk$$$Um>ނarxɘ$1b jE2Aw˔>7F"E'*Ofjòyh!n6RZR,i$c<4 E`>Q2ڸN 4j4gÑ,&i}>5ӬUs-+̂2 eIŨPO˄kj~{(b4 3m?:&#1-6>S- x|oR,*;!bo䦮z1m83*{#$y_SU3)1[xMNDLaUqר23aFLLfJefYr3>`_ۂw A7M)rp͐\\WБzi܏0EZj\lS;&fjٰt넴ං8*\垪BgNƂMWY0߻?'~2a.iʦ'TX6 E \!x rYб} E(:uɚth=)өi4eY"Yܭ&յFQY5_WkC7+kW9 q1VkSU}G,:Xm>)Z;ω \xLpI? $U7pr5&VRIu91@SX60ۉ\#{dxȖM~6|"`F>VX k8sXA(A:ɖ--OW{(KO[G81ShlAcC<;%.;{#9r; u_6"nOXKn"5.54P1+֭ղUOشSb!œ`?8e_6LpAbKDXHK4O$&@EL k1УL |2ڐM. N"vNgV2g5p L搲@C'I!5BjWZ:'w5J"G@C:'+O ȩ|7($tEni|nA 9 qPh:@q\xl w>ESmoGf"7<F[q]RrH̷wr4hɝCImFqs.$*ȧzlcɨ΍T?O0 sHz5LzWe'f,O&^F 1JeA" գSܽՁ= qvdxoS'A?:><>LaSzJ 8=BhS ^3GşV9S)\62gJf^Zg ^h?zEh/F?ni}6g۬3?&RmNu2y̿l;!~LQw_spKtB{ٰFw$5&}l ֔k̹pμG$aߺE 1o>^!?L՝W,IRÕ fke03uF+Ie/y-YQT#ikS2O# L$R{qJ@D!i:#U N 3 T?X\d\?n\8N^&k?t\~(`0r\pҬ P^

fCOYN5◉˗xC00h/LBSA@0 *H8/0,5oz\Kk.Je"(x}:tH5XRepHJ=Mlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/certs/Spacey.crt0000644000175000017500000000117710760636544031543 0ustar tonytony0{09F;0 *H80 1 0 UUS10U Spacey 0  070912191823Z21070819191823Z0 1 0 UUS10U Spacey 00,*H80Su)RJ.R I<+6T'a.libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/certs/Trailing.crt0000644000175000017500000000120410760636544032057 0ustar tonytony00=F0 *H80"1 0 UUS10U Trailing 0  070914125947Z21070821125947Z0"1 0 UUS10U Trailing 00,*H80Su)RJ.RnxGVxTzX3uQVeaZ7vtWMLc+V6CE=X/tk/sMpRaZ1kbBIckRIOW4ra0hnOqivkqDOAzwC6z4rhDGbIiDajw==CN=Trailing\ \ ,C=USApprovedlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-5-UPC.xml0000644000175000017500000000115310760636544031416 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=Djw7rN+8TE375ZuOpkJe0Pxm7oCTIf7UEDorEwNl+gZcjAiSpC0+gQ==CN=Eq\=uals,C=USApprovedlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-3-UPC.xml0000644000175000017500000000114610760636544031416 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=hV4Vpb4JBuqN+UKoy5PhhOEe4asFffDw/MlY09I7FSeLEEfJ35fGHw==CN=\00,C=USApproved././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-8-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-8-IAIK-ref00000644000175000017500000000042210760636544031702 0ustar tonytony------------------------------ NodeSetData ------------------------------- Node 1 : [Object: null] Node 2 : Id="object" Node 3 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 4 : [#text: Approved] -------------------------------------------------------------------------- ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-5-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-5-IAIK-ref00000644000175000017500000000042210760636544031535 0ustar tonytony------------------------------ NodeSetData ------------------------------- Node 1 : [Object: null] Node 2 : Id="object" Node 3 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 4 : [#text: Approved] -------------------------------------------------------------------------- libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-4-IAIK.xml0000644000175000017500000000122210760636544031642 0ustar tonytony nxGVxTzX3uQVeaZ7vtWMLc+V6CE=M7vI8E/SsrUfxqT2+cXdgtbctqKP8r1WTRDSYZknX04EHpX9c23thw==CN=Trailing \ ,C=USApprovedlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-6-SUN.xml0000644000175000017500000000124010760636544031574 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=V34pKGIfKacwJtTEShfSXx4M2dhSOTqZVCIL6nO66lm+JTQ//wCKaA==CN=Con\09trol,C=USApprovedlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-3-IAIK.xml0000644000175000017500000000121210760636544031476 0ustar tonytony nxGVxTzX3uQVeaZ7vtWMLc+V6CE=NfwEwfLFKQ87bCySrcJ+xelko5d/QsRh8UzsCpsK8GB27Mo21r4/Rg==CN=\00,C=USApprovedlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-4-SUN.xml0000644000175000017500000000124410760636544031576 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=ONd8OoOnv9OThyiTPkneEcsdgVt65w6AgUAxidekHeKmjyQxnYEdWA==CN=Trailing\20\20,C=USApproved././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-3-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-3-IAIK-ref00000644000175000017500000000012010760636544031526 0ustar tonytonyApprovedlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/input.txt0000644000175000017500000000001010760636544030346 0ustar tonytonyApprovedlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/inventory0000644000175000017500000000004110760636544030432 0ustar tonytonydnString-4 dnString-6 dnString-8 libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-2-ORCL.xml0000644000175000017500000000131210760636544031520 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=RP5Y5ENi15YZYCspdEXaw7EdJ3YnHsXdMLflg2wQKXFfg24P/AWzbA==CN=\ Spacey\ ,C=USApproved././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-6-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-6-template.0000644000175000017500000000112510760636544032223 0ustar tonytony CN=Con\09trol,C=USlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-4-IAIK.xml0000644000175000017500000000121610760636544031503 0ustar tonytony nxGVxTzX3uQVeaZ7vtWMLc+V6CE=VkIdVHhcj217cIB8v9R7TCVx2303ljz6dZwedFNxfy2tJ2NxfWjn2Q==CN=Num#ber,C=USApproved././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-2-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-2-IAIK-ref00000644000175000017500000000012010760636544031525 0ustar tonytonyApproved././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-8-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-8-IAIK-ref00000644000175000017500000000012010760636544031675 0ustar tonytonyApproved././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-3-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-3-template.0000644000175000017500000000111610760636544032056 0ustar tonytony CN=\00,C=US././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-6-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-6-IAIK-ref00000644000175000017500000000012010760636544031673 0ustar tonytonyApprovedlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-7-UPC.xml0000644000175000017500000000115310760636544031420 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=AcMlv04SFBUdSi74LJn3xxJeV1tT8eqiVrdqgysjRTdShDSEuGXK3Q==CN=Con trol,C=USApproved././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-1-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-1-IAIK-ref00000644000175000017500000000042210760636544031531 0ustar tonytony------------------------------ NodeSetData ------------------------------- Node 1 : [Object: null] Node 2 : Id="object" Node 3 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 4 : [#text: Approved] -------------------------------------------------------------------------- libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-4-UPC.xml0000644000175000017500000000115710760636544031563 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=X/tk/sMpRaZ1kbBIckRIOW4ra0hnOqivkqDOAzwC6z4rhDGbIiDajw==CN=Trailing\ \ ,C=USApprovedlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-1-UPC.xml0000644000175000017500000000114710760636544031415 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=R5HSizySCzsF1pnh2zN3UNURrgoB0i4GJNKbHKkaSDblG07mkVj4Pg==CN=John,C=USApprovedlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-1-IAIK.xml0000644000175000017500000000121310760636544031475 0ustar tonytony nxGVxTzX3uQVeaZ7vtWMLc+V6CE=Ac7I1i3MqoCW7rV4KgxmtIj4sXhIS+Dku1Fq87UQ4/5FINQvGRaQEQ==CN=John,C=USApprovedlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-6-ORCL.xml0000644000175000017500000000131210760636544031666 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=RcNEgHCXdM1YkaCtRstFsXG4O3saotAtGyJPUBl1VGPtS8aPp8hnJw==CN=Con\09trol,C=USApprovedlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-4-ORCL.xml0000644000175000017500000000130710760636544031526 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=VkAUf6EHoTFoPmID31iS7a1TQ95RUhrE+Ypu9pj14ObE17qG/eE3dw==CN=Num#ber,C=USApproved././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-5-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-5-template.0000644000175000017500000000112210760636544032055 0ustar tonytony CN=Eq=uals,C=US././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-2-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-2-IAIK-ref00000644000175000017500000000042210760636544031532 0ustar tonytony------------------------------ NodeSetData ------------------------------- Node 1 : [Object: null] Node 2 : Id="object" Node 3 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 4 : [#text: Approved] -------------------------------------------------------------------------- libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-4-UPC.xml0000644000175000017500000000115310760636544031415 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=K2H8onLBHcnaFBj5M/Sw3XujxbCWkGrvwOJpc4h3g9U2uH4miXd+lg==CN=Num\#ber,C=USApprovedlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-3-ORCL.xml0000644000175000017500000000130310760636544031521 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=fr3H3aFONUYCDnW1cTAZk4cw0qM0NGo7bzxdgSdDeG+Jz0MDl3CVRg==CN=\00,C=USApprovedlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-6-IAIK.xml0000644000175000017500000000122110760636544031643 0ustar tonytony nxGVxTzX3uQVeaZ7vtWMLc+V6CE=icm25FEXpnQgz3e2lPjQXHK/NOgPvBxSzphyRTAI7yciKlj4jxLdvA==CN=Con\09trol,C=USApproved././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-8-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-8-template.0000644000175000017500000000113010760636544032221 0ustar tonytony CN=E\+s\,c\;aped,C=US././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-4-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-4-template.0000644000175000017500000000112210760636544032054 0ustar tonytony CN=Num#ber,C=USlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-2-IAIK.xml0000644000175000017500000000122110760636544031475 0ustar tonytony nxGVxTzX3uQVeaZ7vtWMLc+V6CE=S3gdd/xhDMS7ZN1fGzycHwT4j/kEqtkfdbB4rHUnnFbRccFI1UQGvQ==CN=\ Spacey\ ,C=USApproved././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-1-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-1-IAIK-ref00000644000175000017500000000012010760636544031524 0ustar tonytonyApproved././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-1a-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-1a-template0000644000175000017500000000111510760636544032136 0ustar tonytony C=US,CN=Johnlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-8-SUN.xml0000644000175000017500000000124310760636544031601 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=L2r+QCiO0qOPgDYybThQEbP7A8Iq8AomDGBXgQqe4mkuLMnroTxnGA==CN=E\+s\,c\;aped,C=USApprovedlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-8-UPC.xml0000644000175000017500000000116010760636544031561 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=K4SrVi0U3G/Ruq0qg0bQCzqvjWdzXV5HPe9f2zArd9IPkjiTw+OXyg==CN=E\+s\,c\;aped,C=USApprovedlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-5-IAIK.xml0000644000175000017500000000121610760636544031504 0ustar tonytony nxGVxTzX3uQVeaZ7vtWMLc+V6CE=gHXSDI1HDrPZbLYQmPhVL2NvEDJIPmfbi2YOe5e6ELCgDWQDMI9YAQ==CN=Eq=uals,C=USApproved././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-4-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-4-IAIK-ref00000644000175000017500000000012010760636544031527 0ustar tonytonyApprovedlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-8-IAIK.xml0000644000175000017500000000122410760636544031650 0ustar tonytony nxGVxTzX3uQVeaZ7vtWMLc+V6CE=JK/MBab1g2BeQ6p2QHtas/ecrvB1mP6XPcJpxmOKk6q+Cvj7o+dZyw==CN=E\+s\,c\;aped,C=USApproved././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-5-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-5-IAIK-ref00000644000175000017500000000012010760636544031530 0ustar tonytonyApproved././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-4-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-4-template.0000644000175000017500000000113110760636544032216 0ustar tonytony CN=Trailing\20\20,C=US././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-1-template.xmllibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-1-template.0000644000175000017500000000111710760636544032055 0ustar tonytony CN=John,C=USlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-8-UPC.xml0000644000175000017500000000116010760636544031417 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=K4SrVi0U3G/Ruq0qg0bQCzqvjWdzXV5HPe9f2zArd9IPkjiTw+OXyg==CN=E\+s\,c\;aped,C=USApprovedlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-1-SUN.xml0000644000175000017500000000123210760636544031426 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=DOz4KhJHOvhzPiKjxl0WVsrXPuZ9XQtdDvKN0KuLQGIzXkljfkFEQA==CN=John,C=USApprovedlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-6-UPC.xml0000644000175000017500000000115310760636544031561 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=AcMlv04SFBUdSi74LJn3xxJeV1tT8eqiVrdqgysjRTdShDSEuGXK3Q==CN=Con trol,C=USApprovedlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-8-ORCL.xml0000644000175000017500000000131510760636544031673 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=k+GS3eR4ULcUrqNAW7v9pYNJp31lPP166bGDD5voj9xKWjqzAk6ioQ==CN=E\+s\,c\;aped,C=USApproved././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-4-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-4-IAIK-ref00000644000175000017500000000042210760636544031676 0ustar tonytony------------------------------ NodeSetData ------------------------------- Node 1 : [Object: null] Node 2 : Id="object" Node 3 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 4 : [#text: Approved] -------------------------------------------------------------------------- libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-1-ORCL.xml0000644000175000017500000000130410760636544031520 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=KJ5F0Z89XLlVGQ3q3Y4KD9JYd7xke9IodQQqqxsWJQjGaA1Ysu/qJA==CN=John,C=USApproved././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-4-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-4-IAIK-ref00000644000175000017500000000012010760636544031671 0ustar tonytonyApprovedlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/diffRFCs-2-SUN.xml0000644000175000017500000000124010760636544031426 0ustar tonytonynxGVxTzX3uQVeaZ7vtWMLc+V6CE=V18nxls1pqn4IyA/GNosGfqLHEE6INnyuV9TmHlYt/sYsaagHCH9Xw==CN=\ Spacey\ ,C=USApproved././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-6-IAIK-ref0.derefURIlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/dname/dnString-6-IAIK-ref00000644000175000017500000000042210760636544031700 0ustar tonytony------------------------------ NodeSetData ------------------------------- Node 1 : [Object: null] Node 2 : Id="object" Node 3 : xmlns="http://www.w3.org/2000/09/xmldsig#" Node 4 : [#text: Approved] -------------------------------------------------------------------------- libxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/defCan-1-template.xml0000644000175000017500000000125710760636544031251 0ustar tonytony ancestor-or-self::ietf:c14n11XmlBaseDoc1 and not(ancestor-or-self::ietf:e2)././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/defCan-1-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/defCan-1-IAIK-ref0.digesti0000644000175000017500000000072510760636544031634 0ustar tonytony ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/defCan-3-IAIK-ref0.digestinputlibxml-security-java-1.5.6/src/test/resources/org/w3c/www/interop/xmldsig/defCan-3-IAIK-ref0.digesti0000644000175000017500000000030410760636544031627 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/apache/0000755000175000017500000000000012273503733022137 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/apache/xml/0000755000175000017500000000000012273503733022737 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/0000755000175000017500000000000012273503733024606 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/temp/0000755000175000017500000000000012273503733025553 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/temp/id2.xml0000644000175000017500000000034007356025645026757 0ustar tonytony ]> Das N3 Element Das id2 Element libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/temp/id.xml0000644000175000017500000000021607356025645026677 0ustar tonytony ]> libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/temp/key/0000755000175000017500000000000012273503733026343 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/temp/key/dsavalue.xml0000644000175000017500000000136507356025645030705 0ustar tonytony

rFto8uPQM6y34FLPmDh40BLJ1rVrC8VeRquuhPZ6jYNFkQuwxnu/wCvIAMhukPBL FET8bJf/b2ef+oqxZajEb+88zlZoyG8g/wMfDBHTxz+CnowLahnCCTYBp5kt7G8q UobJuvjylwj1st7V9Lsu03iXMXtbiriUjFa5gURasN8=

kEjAFpCe4lcUOdwphpzf+tBaUds= oe14R2OtyKx+s+60O5BRNMOYpIg2TU/f15N3bsDErKOWtKXeNK9FS7dWStreDxo2 SSgOonqAd4FuJ/4uva7GgNL4ULIqY7E+mW5iwJ7n/WTELh98mEocsLXkNh24HcH4 BZfSCTruuzmCyjdV1KSqX/Eux04HfCWYmdxN3SQ/qqw= pA5NnZvcd574WRXuOA7ZfC/7Lqt4cB0MRLWtHubtJoVOao9ib5ry4rTk0r6ddnOv AIGKktutzK3ymvKleS3DOrwZQgJ+/BDWDW8kO9R66o6rdjiSobBi/0c2V1+dkqOg jFmKz395mvCOZGhC7fqAVhHat2EjGPMfgSZyABa7+1k= ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/temp/key/signature-retrievalmethod-dsavalue.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/temp/key/signature-retrievalme0000644000175000017500000000134407356025645032615 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= Fj9OwSxpJppDnihohduxEUqu9/p6TR9PpgNGapaiBHGcY2QUDBaOEw== libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/temp/key/x509data.xml0000644000175000017500000000232107356025645030431 0ustar tonytony MIICwzCCAiygAwIBAgIGAOZ75QhHMA0GCSqGSIb3DQEBBQUAMG4xCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9yZSBUZWNobm9s b2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMRQwEgYDVQQDEwtYL1NlY3Vy ZSBDQTAeFw0wMTA1MTUxMDA0NDVaFw0wMjA1MTUxMDA0MzdaMGkxCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9yZSBUZWNobm9s b2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMQ8wDQYDVQQDEwZNb3JpZ3Uw gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALT4FJkxu+bB5lOwYa+irIb7sJU7 9sRQbYYnfw35D7NQkig+Lvi2LXXoA6ABull2bF+gu+sgRzezzOs6VsTL8z57TIz2 48HaMInFjOiqSANmzQKlXv1PjXSxSyHRi/3xc8gMfmCxeSPCZ5VpUiQoJ5ZpWcDz /LKvb0l9X0YBzMZlAgMBAAGjcTBvMA4GA1UdDwEB/wQEAwIHgDARBgNVHQ4ECgQI hbis35lIcu8wNQYDVR0SBC4wLIYqaHR0cDovL3d3dy5iYWx0aW1vcmUuY29tL3By b2R1Y3RzL3hzZWN1cmUvMBMGA1UdIwQMMAqACIXsHwqPfxrRMA0GCSqGSIb3DQEB BQUAA4GBAGSBdPou5CWAiyS5/f46m00mIIqO3xl6ZXOc/DRblF4gWnesd2F5v/s6 lAbqK8+wJM6GxvpOkSp6O1q6hZRyzF86QPlXCfhKAXkgzHXtb6PfT2m9t0iawnjy P+oyYofnFU5FFVOCujSrmFx3FCU+Wg6RT3v1jRoM3YfMYZYEzfTT ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/temp/key/signature-retrievalmethod-x509data.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/temp/key/signature-retrievalme0000644000175000017500000000401307356025645032611 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= ZrROxIcOSBvt5z2krEhQGSVIo4oAwTJwGAoFiWucvvEtY9k0L2R5RVHBnHCzk5GT kHGaT8SUqtnDeiH6W/2FNfciiV/w1pxURvNcyW8cYCn1B5XF68vILXUaptWf0DKw DvCFS+uLh0ACuEUfpe1Dx1fwB85lpK2iQcpx9dPaC4M= ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/temp/key/retrieval-from-same-doc-key.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/temp/key/retrieval-from-same-d0000644000175000017500000000014307356025645032375 0ustar tonytony././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/temp/key/retrieval-from-same-doc.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/temp/key/retrieval-from-same-d0000644000175000017500000000605507356025645032405 0ustar tonytony MIICwzCCAiygAwIBAgIGAOZ75QhHMA0GCSqGSIb3DQEBBQUAMG4xCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9yZSBUZWNobm9s b2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMRQwEgYDVQQDEwtYL1NlY3Vy ZSBDQTAeFw0wMTA1MTUxMDA0NDVaFw0wMjA1MTUxMDA0MzdaMGkxCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9yZSBUZWNobm9s b2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMQ8wDQYDVQQDEwZNb3JpZ3Uw gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALT4FJkxu+bB5lOwYa+irIb7sJU7 9sRQbYYnfw35D7NQkig+Lvi2LXXoA6ABull2bF+gu+sgRzezzOs6VsTL8z57TIz2 48HaMInFjOiqSANmzQKlXv1PjXSxSyHRi/3xc8gMfmCxeSPCZ5VpUiQoJ5ZpWcDz /LKvb0l9X0YBzMZlAgMBAAGjcTBvMA4GA1UdDwEB/wQEAwIHgDARBgNVHQ4ECgQI hbis35lIcu8wNQYDVR0SBC4wLIYqaHR0cDovL3d3dy5iYWx0aW1vcmUuY29tL3By b2R1Y3RzL3hzZWN1cmUvMBMGA1UdIwQMMAqACIXsHwqPfxrRMA0GCSqGSIb3DQEB BQUAA4GBAGSBdPou5CWAiyS5/f46m00mIIqO3xl6ZXOc/DRblF4gWnesd2F5v/s6 lAbqK8+wJM6GxvpOkSp6O1q6hZRyzF86QPlXCfhKAXkgzHXtb6PfT2m9t0iawnjy P+oyYofnFU5FFVOCujSrmFx3FCU+Wg6RT3v1jRoM3YfMYZYEzfTT This is no valid base64 encoded X509 Certificate so if the XPath ancestor::my:KeyMaterials[@Id="hjdsbadcret"] would have been used this wouldn't resolve to a valid key 60NvZvtdTB+7UnlLp/H24p7h4bs= FnwsSCWT6REW/8QnOjv0BK+r3Ly/4aB++pNnZp9pnz8f7+j33eKSj1soyQLq5zmN FwyeeQhnlTbR1kfve014ub9uHVC9A1cfmGZxQF1DC+enHt+AAPJaa278/ocgpMb5 Gibl4w7e3HAdBn/RJCrFJH77wY2oU5Ob0zIQtECVNJk= ancestor::my:KeyMaterials[@Id="thecert"] libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/temp/signature/0000755000175000017500000000000012273503733027554 5ustar tonytony././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/temp/signature/signature-good.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/temp/signature/signature-good.0000644000175000017500000000513210237440355032503 0ustar tonytony ipbs0UyafkdRIcfIo9zyZLce+CE= W1C5ZT2nQwXd+zIeZ1NUFjx5qn0ERyiLnSeYSS+FDG9yOpK1FK8AVA== MIIC9jCCArQCBDruqiowCwYHKoZIzjgEAwUAMGExCzAJBgNVBAYTAkRFMR0wGwYDVQQKExRVbml2 ZXJzaXR5IG9mIFNpZWdlbjEQMA4GA1UECxMHRkIxMk5VRTEhMB8GA1UEAxMYQ2hyaXN0aWFuIEdl dWVyLVBvbGxtYW5uMB4XDTAxMDUwMTEyMjA1OFoXDTA2MTAyMjEyMjA1OFowYTELMAkGA1UEBhMC REUxHTAbBgNVBAoTFFVuaXZlcnNpdHkgb2YgU2llZ2VuMRAwDgYDVQQLEwdGQjEyTlVFMSEwHwYD VQQDExhDaHJpc3RpYW4gR2V1ZXItUG9sbG1hbm4wggG3MIIBLAYHKoZIzjgEATCCAR8CgYEA/X9T gR11EilS30qcLuzk5/YRt1I870QAwx4/gLZRJmlFXUAiUftZPY1Y+r/F9bow9subVWzXgTuAHTRv 8mZgt2uZUKWkn5/oBHsQIsJPu6nX/rfGG/g7V+fGqKYVDwT7g/bTxR7DAjVUE1oWkTL2dfOuK2HX Ku/yIgMZndFIAccCFQCXYFCPFSMLzLKSuYKi64QL8Fgc9QKBgQD34aCF1ps93su8q1w2uFe5eZSv u/o66oL5V0wLPQeCZ1FZV4661FlP5nEHEIGAtEkWcSPoTCgWE7fPCTKMyKbhPBZ6i1R8jSjgo64e K7OmdZFuo38L+iE1YvH7YnoBJDvMpPG+qFGQiaiD3+Fa5Z8GkotmXoB7VSVkAUw7/s9JKgOBhAAC gYASWfn+G1k/nWntj9jX7Nk5JKaiLZ9BLR16eJJxqff33THLfdGs98Xmh2oRWZVh9PMV8oTP3hpR cRipjZUZVEIqsBlOGTVLCg4H5TJ81JWOiprh+mkhClNqUr8l5Hu7FBSvQB6inryeva7j0aKNiIvK 8vfHTiUZpnyNRhkveBlM0jALBgcqhkjOOAQDBQADLwAwLAIUPDd/UmB9GeHqvGjny30Bvjt0AkUC FA9ab72kKuB5geYGeckbBrcgPnZk /X9TgR11EilS30qcLuzk5/YRt1I870QAwx4/gLZRJmlFXUAiUftZPY1Y+r/F9bow9subVWzXgTuA HTRv8mZgt2uZUKWkn5/oBHsQIsJPu6nX/rfGG/g7V+fGqKYVDwT7g/bTxR7DAjVUE1oWkTL2dfOu K2HXKu/yIgMZndFIAcc= l2BQjxUjC8yykrmCouuEC/BYHPU= 9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJFnEj6EwoFhO3 zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImog9/hWuWfBpKL Zl6Ae1UlZAFMO/7PSSo= Eln5/htZP51p7Y/Y1+zZOSSmoi2fQS0deniScan3990xy33RrPfF5odqEVmVYfTzFfKEz94aUXEY qY2VGVRCKrAZThk1SwoOB+UyfNSVjoqa4fppIQpTalK/JeR7uxQUr0Aeop68nr2u49GijYiLyvL3 x04lGaZ8jUYZL3gZTNI= A text in a box ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/temp/signature/signature-bad-transform-algo.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/temp/signature/signature-bad-t0000644000175000017500000000510610237440355032465 0ustar tonytony ipbs0UyafkdRIcfIo9zyZLce+CE= W1C5ZT2nQwXd+zIeZ1NUFjx5qn0ERyiLnSeYSS+FDG9yOpK1FK8AVA== MIIC9jCCArQCBDruqiowCwYHKoZIzjgEAwUAMGExCzAJBgNVBAYTAkRFMR0wGwYDVQQKExRVbml2 ZXJzaXR5IG9mIFNpZWdlbjEQMA4GA1UECxMHRkIxMk5VRTEhMB8GA1UEAxMYQ2hyaXN0aWFuIEdl dWVyLVBvbGxtYW5uMB4XDTAxMDUwMTEyMjA1OFoXDTA2MTAyMjEyMjA1OFowYTELMAkGA1UEBhMC REUxHTAbBgNVBAoTFFVuaXZlcnNpdHkgb2YgU2llZ2VuMRAwDgYDVQQLEwdGQjEyTlVFMSEwHwYD VQQDExhDaHJpc3RpYW4gR2V1ZXItUG9sbG1hbm4wggG3MIIBLAYHKoZIzjgEATCCAR8CgYEA/X9T gR11EilS30qcLuzk5/YRt1I870QAwx4/gLZRJmlFXUAiUftZPY1Y+r/F9bow9subVWzXgTuAHTRv 8mZgt2uZUKWkn5/oBHsQIsJPu6nX/rfGG/g7V+fGqKYVDwT7g/bTxR7DAjVUE1oWkTL2dfOuK2HX Ku/yIgMZndFIAccCFQCXYFCPFSMLzLKSuYKi64QL8Fgc9QKBgQD34aCF1ps93su8q1w2uFe5eZSv u/o66oL5V0wLPQeCZ1FZV4661FlP5nEHEIGAtEkWcSPoTCgWE7fPCTKMyKbhPBZ6i1R8jSjgo64e K7OmdZFuo38L+iE1YvH7YnoBJDvMpPG+qFGQiaiD3+Fa5Z8GkotmXoB7VSVkAUw7/s9JKgOBhAAC gYASWfn+G1k/nWntj9jX7Nk5JKaiLZ9BLR16eJJxqff33THLfdGs98Xmh2oRWZVh9PMV8oTP3hpR cRipjZUZVEIqsBlOGTVLCg4H5TJ81JWOiprh+mkhClNqUr8l5Hu7FBSvQB6inryeva7j0aKNiIvK 8vfHTiUZpnyNRhkveBlM0jALBgcqhkjOOAQDBQADLwAwLAIUPDd/UmB9GeHqvGjny30Bvjt0AkUC FA9ab72kKuB5geYGeckbBrcgPnZk /X9TgR11EilS30qcLuzk5/YRt1I870QAwx4/gLZRJmlFXUAiUftZPY1Y+r/F9bow9subVWzXgTuA HTRv8mZgt2uZUKWkn5/oBHsQIsJPu6nX/rfGG/g7V+fGqKYVDwT7g/bTxR7DAjVUE1oWkTL2dfOu K2HXKu/yIgMZndFIAcc= l2BQjxUjC8yykrmCouuEC/BYHPU= 9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJFnEj6EwoFhO3 zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImog9/hWuWfBpKL Zl6Ae1UlZAFMO/7PSSo= Eln5/htZP51p7Y/Y1+zZOSSmoi2fQS0deniScan3990xy33RrPfF5odqEVmVYfTzFfKEz94aUXEY qY2VGVRCKrAZThk1SwoOB+UyfNSVjoqa4fppIQpTalK/JeR7uxQUr0Aeop68nr2u49GijYiLyvL3 x04lGaZ8jUYZL3gZTNI= A text in a box ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/temp/signature/signature-bad-sig-algo.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/temp/signature/signature-bad-s0000644000175000017500000000512210237440355032462 0ustar tonytony ipbs0UyafkdRIcfIo9zyZLce+CE= W1C5ZT2nQwXd+zIeZ1NUFjx5qn0ERyiLnSeYSS+FDG9yOpK1FK8AVA== MIIC9jCCArQCBDruqiowCwYHKoZIzjgEAwUAMGExCzAJBgNVBAYTAkRFMR0wGwYDVQQKExRVbml2 ZXJzaXR5IG9mIFNpZWdlbjEQMA4GA1UECxMHRkIxMk5VRTEhMB8GA1UEAxMYQ2hyaXN0aWFuIEdl dWVyLVBvbGxtYW5uMB4XDTAxMDUwMTEyMjA1OFoXDTA2MTAyMjEyMjA1OFowYTELMAkGA1UEBhMC REUxHTAbBgNVBAoTFFVuaXZlcnNpdHkgb2YgU2llZ2VuMRAwDgYDVQQLEwdGQjEyTlVFMSEwHwYD VQQDExhDaHJpc3RpYW4gR2V1ZXItUG9sbG1hbm4wggG3MIIBLAYHKoZIzjgEATCCAR8CgYEA/X9T gR11EilS30qcLuzk5/YRt1I870QAwx4/gLZRJmlFXUAiUftZPY1Y+r/F9bow9subVWzXgTuAHTRv 8mZgt2uZUKWkn5/oBHsQIsJPu6nX/rfGG/g7V+fGqKYVDwT7g/bTxR7DAjVUE1oWkTL2dfOuK2HX Ku/yIgMZndFIAccCFQCXYFCPFSMLzLKSuYKi64QL8Fgc9QKBgQD34aCF1ps93su8q1w2uFe5eZSv u/o66oL5V0wLPQeCZ1FZV4661FlP5nEHEIGAtEkWcSPoTCgWE7fPCTKMyKbhPBZ6i1R8jSjgo64e K7OmdZFuo38L+iE1YvH7YnoBJDvMpPG+qFGQiaiD3+Fa5Z8GkotmXoB7VSVkAUw7/s9JKgOBhAAC gYASWfn+G1k/nWntj9jX7Nk5JKaiLZ9BLR16eJJxqff33THLfdGs98Xmh2oRWZVh9PMV8oTP3hpR cRipjZUZVEIqsBlOGTVLCg4H5TJ81JWOiprh+mkhClNqUr8l5Hu7FBSvQB6inryeva7j0aKNiIvK 8vfHTiUZpnyNRhkveBlM0jALBgcqhkjOOAQDBQADLwAwLAIUPDd/UmB9GeHqvGjny30Bvjt0AkUC FA9ab72kKuB5geYGeckbBrcgPnZk /X9TgR11EilS30qcLuzk5/YRt1I870QAwx4/gLZRJmlFXUAiUftZPY1Y+r/F9bow9subVWzXgTuA HTRv8mZgt2uZUKWkn5/oBHsQIsJPu6nX/rfGG/g7V+fGqKYVDwT7g/bTxR7DAjVUE1oWkTL2dfOu K2HXKu/yIgMZndFIAcc= l2BQjxUjC8yykrmCouuEC/BYHPU= 9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJFnEj6EwoFhO3 zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImog9/hWuWfBpKL Zl6Ae1UlZAFMO/7PSSo= Eln5/htZP51p7Y/Y1+zZOSSmoi2fQS0deniScan3990xy33RrPfF5odqEVmVYfTzFfKEz94aUXEY qY2VGVRCKrAZThk1SwoOB+UyfNSVjoqa4fppIQpTalK/JeR7uxQUr0Aeop68nr2u49GijYiLyvL3 x04lGaZ8jUYZL3gZTNI= A text in a box ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/temp/signature/signature-bad-c14n-algo.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/temp/signature/signature-bad-c0000644000175000017500000000511610237440355032445 0ustar tonytony ipbs0UyafkdRIcfIo9zyZLce+CE= W1C5ZT2nQwXd+zIeZ1NUFjx5qn0ERyiLnSeYSS+FDG9yOpK1FK8AVA== MIIC9jCCArQCBDruqiowCwYHKoZIzjgEAwUAMGExCzAJBgNVBAYTAkRFMR0wGwYDVQQKExRVbml2 ZXJzaXR5IG9mIFNpZWdlbjEQMA4GA1UECxMHRkIxMk5VRTEhMB8GA1UEAxMYQ2hyaXN0aWFuIEdl dWVyLVBvbGxtYW5uMB4XDTAxMDUwMTEyMjA1OFoXDTA2MTAyMjEyMjA1OFowYTELMAkGA1UEBhMC REUxHTAbBgNVBAoTFFVuaXZlcnNpdHkgb2YgU2llZ2VuMRAwDgYDVQQLEwdGQjEyTlVFMSEwHwYD VQQDExhDaHJpc3RpYW4gR2V1ZXItUG9sbG1hbm4wggG3MIIBLAYHKoZIzjgEATCCAR8CgYEA/X9T gR11EilS30qcLuzk5/YRt1I870QAwx4/gLZRJmlFXUAiUftZPY1Y+r/F9bow9subVWzXgTuAHTRv 8mZgt2uZUKWkn5/oBHsQIsJPu6nX/rfGG/g7V+fGqKYVDwT7g/bTxR7DAjVUE1oWkTL2dfOuK2HX Ku/yIgMZndFIAccCFQCXYFCPFSMLzLKSuYKi64QL8Fgc9QKBgQD34aCF1ps93su8q1w2uFe5eZSv u/o66oL5V0wLPQeCZ1FZV4661FlP5nEHEIGAtEkWcSPoTCgWE7fPCTKMyKbhPBZ6i1R8jSjgo64e K7OmdZFuo38L+iE1YvH7YnoBJDvMpPG+qFGQiaiD3+Fa5Z8GkotmXoB7VSVkAUw7/s9JKgOBhAAC gYASWfn+G1k/nWntj9jX7Nk5JKaiLZ9BLR16eJJxqff33THLfdGs98Xmh2oRWZVh9PMV8oTP3hpR cRipjZUZVEIqsBlOGTVLCg4H5TJ81JWOiprh+mkhClNqUr8l5Hu7FBSvQB6inryeva7j0aKNiIvK 8vfHTiUZpnyNRhkveBlM0jALBgcqhkjOOAQDBQADLwAwLAIUPDd/UmB9GeHqvGjny30Bvjt0AkUC FA9ab72kKuB5geYGeckbBrcgPnZk /X9TgR11EilS30qcLuzk5/YRt1I870QAwx4/gLZRJmlFXUAiUftZPY1Y+r/F9bow9subVWzXgTuA HTRv8mZgt2uZUKWkn5/oBHsQIsJPu6nX/rfGG/g7V+fGqKYVDwT7g/bTxR7DAjVUE1oWkTL2dfOu K2HXKu/yIgMZndFIAcc= l2BQjxUjC8yykrmCouuEC/BYHPU= 9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJFnEj6EwoFhO3 zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImog9/hWuWfBpKL Zl6Ae1UlZAFMO/7PSSo= Eln5/htZP51p7Y/Y1+zZOSSmoi2fQS0deniScan3990xy33RrPfF5odqEVmVYfTzFfKEz94aUXEY qY2VGVRCKrAZThk1SwoOB+UyfNSVjoqa4fppIQpTalK/JeR7uxQUr0Aeop68nr2u49GijYiLyvL3 x04lGaZ8jUYZL3gZTNI= A text in a box libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/temp/nuehomepage0000644000175000017500000000244307356025645030005 0ustar tonytony Home-Page des Instituts fuer Nachrichtenuebermittlung libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/temp/extension.xsl0000644000175000017500000000062407356025645030330 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keys/0000755000175000017500000000000012273503733025561 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keys/content/0000755000175000017500000000000012273503733027233 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keys/content/rsa.key0000644000175000017500000000061512025634644030535 0ustar tonytonyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmDnHagSzfia3N7jOaMSp4VIZjK2lxZgN X/2z98YLp1XE3cvpP+mOvX3gENWQuX3uoix+2qroZ0BFHzhzf4E7is5Q9+42ZFi5naFk3c/B0Q8A jtHtWUEZ8VPPBZggz6uJ1ttJS7YDP6XVjaw6SN1bJSD4/lWNIVsh95kuhunbOef6x/kyIbBz9wF4 S0//G6zPD4GG7/jJ+sDXe+bAgPB1qwhLhrK3N1jGuDZkGGcY/c4b7aba0B0rognwKlygv16GoA/n zWehxih7clhmMTzP2VWa3Q2GcN8ETe00dz68KtS7GF6W15qftjUvRXEKSoPz86ZsP30jIH1tvIrs qSh/kwIDAQABlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keys/content/ec.key0000644000175000017500000000017512025634644030340 0ustar tonytonyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEsDcofqxWaJiuO++U5iLbj9efN0UpNSB6onKO+eSO I+9ImUy1HoVXf4ARkJ8nQpp8UC1yExYLXGBWiAJY0DKApQ==././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keys/content/DEREncodedKeyValue-RSA.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keys/content/DEREncodedKeyValu0000644000175000017500000000111712025634644032354 0ustar tonytony MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmDnHagSzfia3N7jOaMSp4VIZjK2lxZgN X/2z98YLp1XE3cvpP+mOvX3gENWQuX3uoix+2qroZ0BFHzhzf4E7is5Q9+42ZFi5naFk3c/B0Q8A jtHtWUEZ8VPPBZggz6uJ1ttJS7YDP6XVjaw6SN1bJSD4/lWNIVsh95kuhunbOef6x/kyIbBz9wF4 S0//G6zPD4GG7/jJ+sDXe+bAgPB1qwhLhrK3N1jGuDZkGGcY/c4b7aba0B0rognwKlygv16GoA/n zWehxih7clhmMTzP2VWa3Q2GcN8ETe00dz68KtS7GF6W15qftjUvRXEKSoPz86ZsP30jIH1tvIrs qSh/kwIDAQAB ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keys/content/DEREncodedKeyValue-DSA.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keys/content/DEREncodedKeyValu0000644000175000017500000000143112025634644032353 0ustar tonytony MIIBuDCCASwGByqGSM44BAEwggEfAoGBAP1/U4EddRIpUt9KnC7s5Of2EbdSPO9EAMMeP4C2USZp RV1AIlH7WT2NWPq/xfW6MPbLm1Vs14E7gB00b/JmYLdrmVClpJ+f6AR7ECLCT7up1/63xhv4O1fn xqimFQ8E+4P208UewwI1VBNaFpEy9nXzrith1yrv8iIDGZ3RSAHHAhUAl2BQjxUjC8yykrmCouuE C/BYHPUCgYEA9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJ FnEj6EwoFhO3zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImo g9/hWuWfBpKLZl6Ae1UlZAFMO/7PSSoDgYUAAoGBANJ+apDNYYL9P6dz7w622+/L6YhFQMyaWlSx 5GyRo+BbE1J89xfsNUja+gxhIOZ9OAZOd69gFtuNW1UVkbJU1iS0IUhyg2j5wXqHSlULnpIX2sG0 aAacVrUwtjkvMyQ9Bwbq5M0odRrJT509EPfV2IVcZt4/ho4E1+9gmUwFVjRt libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keys/content/x509/0000755000175000017500000000000012273503733027740 5ustar tonytony././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keys/content/x509/X509Digest.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keys/content/x509/X509Digest.x0000644000175000017500000000054412025634644031742 0ustar tonytony jToLQ/K7aaLHy/aXLFnjEfCwSQd9z0MrBOH6Ru/aJyY= ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keys/content/x509/cert-X509Digest.crtlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keys/content/x509/cert-X509Dig0000644000175000017500000000222012025634644031704 0ustar tonytony-----BEGIN CERTIFICATE----- MIIDMjCCAhqgAwIBAgIJANMtZaoBDP2dMA0GCSqGSIb3DQEBBQUAMBoxGDAWBgNV BAMTD3d3dy5leGFtcGxlLm9yZzAeFw0xMjA5MDcwMTU1MzZaFw00MjEwMjAwMTU1 MzZaMBoxGDAWBgNVBAMTD3d3dy5leGFtcGxlLm9yZzCCASIwDQYJKoZIhvcNAQEB BQADggEPADCCAQoCggEBAMLE68jUfv64M/Hy/SBcM8h1WMV8/4zUj/0hwOvfzRkR kXgY7oMO1z0ltwccEVP340kCk6uv3e+EGECng/jdU1GQWkJVieHvWLw295sUICha DAlLBQinGekfQn0dYU5bZ66QXZ56NDytmKKAkDfe65TH4Kmg7XhebXYGkb7GMThG 8eD8QsBnL4yRYscY8ZZAu7APWHyIB+xXokZVnGwBKkN1M5LOlcRRUzpOW3bEO5nz vhvUKuSwIMJeHxqOwCio8Ue5YY+LK3fc9qNmktuV/KVSXSmVBTsD+a7G7u7lu0cb WLhNYxrzhrKy0ctmJDCy1U5bmb7UoAsm8PRbARa0WpcCAwEAAaN7MHkwHQYDVR0O BBYEFPH9Xc38vVMOjrHikUVYuJkuQto1MEoGA1UdIwRDMEGAFPH9Xc38vVMOjrHi kUVYuJkuQto1oR6kHDAaMRgwFgYDVQQDEw93d3cuZXhhbXBsZS5vcmeCCQDTLWWq AQz9nTAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQA4/0BxiAB+NLS3 gbc04dkoe3tKk1UlGav748JnioUX2uXoQ8KLPYqelHnSYzGpwfRm4dN/mUqN2d1t cRIH4nyrYPxXz9vO0rAPZ2ZEfCVuL4jpK92CJjvOKRdIJZIHDu8foXVkca55r5+s txnGRJnDhwXK+e/+BkojvOtyqZ5jyZTMEq9ez8E0XgBNDFmu3sDNLDxxF0fAMFyQ +Fs0FHeqZSEZs8SMrcrqpbX4OygDOun0GeHRRlIbXScKxOLofhjuXTGj+oomIxbf t/gyBha1Gfd25+TpRxVxx5XNosWAezdz7sGSJwWuPApQH19bN/2iunwtfEZ1CB7g LUyOfR/g -----END CERTIFICATE----- ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keys/content/KeyInfoReference.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keys/content/KeyInfoReference.0000644000175000017500000000031512025634644032417 0ustar tonytony ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keys/content/DEREncodedKeyValue-EC.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keys/content/DEREncodedKeyValu0000644000175000017500000000047712025634644032364 0ustar tonytony MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEsDcofqxWaJiuO++U5iLbj9efN0UpNSB6onKO+eSO I+9ImUy1HoVXf4ARkJ8nQpp8UC1yExYLXGBWiAJY0DKApQ== libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keys/content/dsa.key0000644000175000017500000000112712025634644030516 0ustar tonytonyMIIBuDCCASwGByqGSM44BAEwggEfAoGBAP1/U4EddRIpUt9KnC7s5Of2EbdSPO9EAMMeP4C2USZp RV1AIlH7WT2NWPq/xfW6MPbLm1Vs14E7gB00b/JmYLdrmVClpJ+f6AR7ECLCT7up1/63xhv4O1fn xqimFQ8E+4P208UewwI1VBNaFpEy9nXzrith1yrv8iIDGZ3RSAHHAhUAl2BQjxUjC8yykrmCouuE C/BYHPUCgYEA9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJ FnEj6EwoFhO3zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImo g9/hWuWfBpKLZl6Ae1UlZAFMO/7PSSoDgYUAAoGBANJ+apDNYYL9P6dz7w622+/L6YhFQMyaWlSx 5GyRo+BbE1J89xfsNUja+gxhIOZ9OAZOd69gFtuNW1UVkbJU1iS0IUhyg2j5wXqHSlULnpIX2sG0 aAacVrUwtjkvMyQ9Bwbq5M0odRrJT509EPfV2IVcZt4/ho4E1+9gmUwFVjRtlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/0000755000175000017500000000000012273503733025353 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/inExcl/0000755000175000017500000000000012273503733026575 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/inExcl/example2_2_3.xml0000644000175000017500000000052307757647745031526 0ustar tonytony

def jkl

././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/inExcl/example2_2_2_c14nized.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/inExcl/example2_2_2_c14ni0000644000175000017500000000024607473421502031676 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/inExcl/example2_4.xml0000644000175000017500000000026111553026071031251 0ustar tonytony././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/inExcl/example2_2_3_c14nized_exclusive.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/inExcl/example2_2_3_c14ni0000644000175000017500000000033507757647745031726 0ustar tonytony

def jkl

libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/inExcl/example2_2_2.xml0000644000175000017500000000034107473421502031473 0ustar tonytony ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/inExcl/example2_4_c14nized.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/inExcl/example2_4_c14nize0000644000175000017500000000014711553026071032012 0ustar tonytony././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/inExcl/example2_2_c14nized_exclusive.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/inExcl/example2_2_c14nize0000644000175000017500000000016507473421502032014 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/inExcl/example2_2_1.xml0000644000175000017500000000026607473421502031500 0ustar tonytony ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/inExcl/example2_2_1_c14nized.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/inExcl/example2_2_1_c14ni0000644000175000017500000000021007473421502031664 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/0000755000175000017500000000000012273503733025761 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/35_c14n.xml0000644000175000017500000000006107356024141027551 0ustar tonytony Hello, world! libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/31_input.xml0000644000175000017500000000035607356024141030146 0ustar tonytony Hello, world! libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/38_input.xml0000644000175000017500000000050611556507410030154 0ustar tonytony ]> libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/foo.xml0000644000175000017500000000015107356024141027260 0ustar tonytony Hello, world! libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/33_c14n.xml0000644000175000017500000000073007356024141027552 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/36_c14n.xml0000644000175000017500000000001507356024141027551 0ustar tonytony©././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/34_input_validatingParser.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/34_input_validatingPar0000644000175000017500000000073407356024141032217 0ustar tonytony ]> First line Second line 2 "0" && value<"10" ?"valid":"error"]]> valid libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/world.txt0000644000175000017500000000000507356024141027641 0ustar tonytonyworldlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/33_input.xml0000644000175000017500000000113707356024141030146 0ustar tonytony]> libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/md5sum.txt0000644000175000017500000000064507356024141027736 0ustar tonytony6970546b01f0c23cd72d3f129f2ec0f2 *31_c14n-comments.xml e57988b5e57b06858913472b56dc5af4 *31_c14n.xml 58a1a346351e7b01a29f547fd17985f1 *32_c14n.xml a2d57aa4441bee658bb44cdc4f1a1f0e *33_c14n.xml 99c99c9a4d8d03843d1326a62d2b106c *34_c14n.xml 62b232d0bae09b6973266fa0bc14bffd *35_c14n.xml 28485db5b2f33ab50cb63e14586f3b76 *36_c14n.xml 9e9968d430274be0b054bf7d2b13512f *37_c14n.xml 7d793037a0760186574b0282f2f435e7 *world.txt ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/testTranslationFromUTF16toUTF8.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/testTranslationFromUTF0000644000175000017500000000011007356024141032272 0ustar tonytonyThe german &auml (which is Unicode &#xE4;): "ä"libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/31_c14n-comments.xml0000644000175000017500000000023407356024141031372 0ustar tonytony Hello, world! libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/38_c14n.xml0000644000175000017500000000023711556515005027562 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/32_input.xml0000644000175000017500000000026507356024141030146 0ustar tonytony A B A B A B C libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/doc.dtd0000644000175000017500000000003007356024141027211 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/31_c14n.xml0000644000175000017500000000014407356024141027547 0ustar tonytony Hello, world! libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/36_input.xml0000644000175000017500000000010007356024141030136 0ustar tonytony © libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/37_input.xml0000644000175000017500000000040007356024141030142 0ustar tonytony ]> libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/32_c14n.xml0000644000175000017500000000025107356024141027547 0ustar tonytony A B A B A B C ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/34_c14n_validatingParser.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/34_c14n_validatingPars0000644000175000017500000000060107356024141032001 0ustar tonytony First line Second line 2 value>"0" && value<"10" ?"valid":"error" valid libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/35_input.xml0000644000175000017500000000051007356024141030142 0ustar tonytony ]> &ent1;, &ent2;! libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/37_subset.xpath0000644000175000017500000000041307356024141030640 0ustar tonytony (//. | //@* | //namespace::*) [ self::ietf:e1 or (parent::ietf:e1 and not(self::text() or self::e2)) or count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node()) ] ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/34_validatingParser.txtlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/34_validatingParser.tx0000644000175000017500000000062307356024141032141 0ustar tonytonyhttp://www.w3.org/TR/2001/PR-xml-c14n-20010119 states that: Note: The last element, normId, is well-formed but violates a validity constraint for attributes of type ID. For testing canonical XML implementations based on validating processors, remove the line containing this element from the input and canonical form. In general, XML consumers should be discouraged from using this feature of XML.libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/34_input.xml0000644000175000017500000000103007356024141030137 0ustar tonytony ]> First line Second line 2 "0" && value<"10" ?"valid":"error"]]> valid libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/34_c14n.xml0000644000175000017500000000065707356024141027563 0ustar tonytony First line Second line 2 value>"0" && value<"10" ?"valid":"error" valid libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/c14n/in/37_c14n.xml0000644000175000017500000000016207356024141027555 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/encryption/0000755000175000017500000000000012273503733027000 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/encryption/encryptedKey.xml0000644000175000017500000000363410732536500032172 0ustar tonytony demo a+CJUHCF1q4bSFa5dL6oxpcHzsi2Y00dIAPB3c+BIGvVLVueWgAS77sAseSfmsbX4irNCUkSIU+h BYc3WHyLzPQkfv//VQe8BaU6tZFn5zOkIUB5v3SQiGS4sFVZb9cMAoEbCG7moFtUpOOC4P/xdfjU qApAO6xJ2zUtxDCz7Ks= datakey datakey UCmOEtPl5W+GsjW+Sxsgq7d3TIVR4VO5irpgjStXfyea6SujwKPcwPquj+d1Fsh5T8LRx0rzQfFe gEqhZc8jtvYE2ZsjTGeTH4eQoqZI6MXSpOvrlmsj88bvRrQw81CjaCu4eYtI+hvSVWXUATxSmkm8 /hJze1AqzuJECHlRcHrqPgrLGoyWcr/hgqOQJAqPLfJUPR00U6JPxOoz0YVf+lENcovekYB6SWPK KoEWmUQn9ICK4Mie1oyhd1BOM6dWMUf2TWAWwCSHFqMqANSsJiaGDJBOTUXmOeoyk5Nnt1GhWFnd 61ByWUc0mW/5FtQRt+KQTJ0qGIFsLSdzP5cF06BrEwACCYv/4ovVCMtcNVOjhA6wMlH5CwN+ytDn GZy+wiujRPvmfFUY7ETgNYjG1toei05ltphFm3YIXbnYpWX5Y8f7K6WxL51jAyvF4jU0omX5kFSB ELKC1c6Lb1VaHPcAp3afM0FuxRUXwg5G7hcOguJpHSg9jxyGVCQ4wmA4JKX8BM9IoTa5WvJ2bY5v DPf155R1ljMXAwfPZZcC2iF/YcTGhtbQfgUFofxVEwHjAArepx28SDCW5+X1ib2R4hU8SL3O8GQQ WUFiFpINuLInTPDBs8hJqZoBaGdH6SNZlPgVj9g6OLENp0R8fZmKO+QJ+LqaPA1wtwJ+1WV//M8= libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/samples/0000755000175000017500000000000012273503733026252 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/samples/input/0000755000175000017500000000000012273503733027411 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/samples/input/truststore.jks0000755000175000017500000000645310712703260032364 0ustar tonytonya70-garaio-frontend-uoX.50900l |(FG$'q0 +010U Root Agency0 070504111422Z 391231235959Z0!10UA70-Garaio-Frontends-U00  *H 0_/A,[?좔~Ntaշs<d#VZfPsDS**5ʻG+۾AsZ;?Y/Y.5V>Yڜ]e퓹-Ȝ)BSkAK0I0GU@0> -Oa!dc010U Root Agency7ldϸԪ\50 +A*yIߪbV @VOAg FGٵMv׼YҺ,k( test-issuerЖX.50900FmZ0 *H80r1 0 UCH1 0 UBE1 0 UBern10U Bedag Informatik AG1 0 U STE10UMario Siegenthaler0 070611142332Z 070909142332Z0r1 0 UCH1 0 UBE1 0 UBern10U Bedag Informatik AG1 0 U STE10UMario Siegenthaler00,*H80Su)RJ.RFAZL@ad.bedag.churn:oasis:names:tc:SAML:1.0:cm:sender-vouchesIr8/6BBeSwOy2GBXsjZ5asQPnWU=LjKmibUac6leaVXDcJ/rkZavv58tRSn08tSE29lER2m69fKQXsHRI47UhbRxWaqJwAQsxx/Y+u40Ah2/xDzF/NsugQKI5Vy0SqxdK6xx+EmAprsrEoVAekWxEnrgfs6ksSa4uFlklDjCy1VLdoN7bs9pwQPqEz+31KqquNWU3jg=MIIBvjCCAWygAwIBAgIQlwx8KKbC47BGRyQc8poncTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTA3MDUwNDExMTQyMloXDTM5MTIzMTIzNTk1OVowITEfMB0GA1UEAxMWQTcwLUdhcmFpby1Gcm9udGVuZHMtVTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAr/xf6i9B8R/hlMjl6bYsW6ef+T8EnOyilNt+jE50kGGUgIiQFtW3sHM8/dAbZCNWpQRamfpmUHOiRFMqyyo1yrvpm0cr275BinNarDschD9ZL/0TmvlZ/4mULjVWDhYWPlkF2pz7XWW6ho3tk7ktyJwDKRf/k6mYQrrHGlNrA0ECAwEAAaNLMEkwRwYDVR0BBEAwPoAQEuQJLQYdHU8AjWEh3BZkY6EYMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5ghAGN2wAqgBkihHPuNSqXDX0MAkGBSsOAwIdBQADQQAqsIWclK3rixHwHnm3Sd+qYshWhAzrQP3jVk9BFGev6QpGR7yYBgSCBfnX2bWhTXbXvKf2CLtZyuTBstK6LGsolibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/samples/input/file_cert0000644000175000017500000000131207356024141031262 0ustar tonytony0090 *H80I1 0 UDE10U  Uni Siegen10 U WebSig10U Anli Shundi0 001012182403Z 010410182403Z0I1 0 UDE10U  Uni Siegen10 U WebSig10U Anli Shundi00,*H80Su)RJ.R Some simple text LKyUpNaZJ2joznVzwEup5JDwtS0= Qma5I5AZiSzQ6J4UZwjpteD2qvQclABKATPQ5MZ7mmOFYfj8xAlpXWu2u+Oa/4mpP9jK9OUUcTU9 Psfucz+qPA== MIICEjCCAbegAwIBAgIGARJQ/UmbMAsGByqGSM49BAEFADBQMSEwHwYDVQQDExhYTUwgRUNEU0Eg U2lnbmF0dXJlIFRlc3QxFjAUBgoJkiaJk/IsZAEZEwZhcGFjaGUxEzARBgoJkiaJk/IsZAEZEwNv cmcwHhcNMDcwNTAzMDgxMDE1WhcNMTEwNTAzMDgxMDE1WjBQMSEwHwYDVQQDExhYTUwgRUNEU0Eg U2lnbmF0dXJlIFRlc3QxFjAUBgoJkiaJk/IsZAEZEwZhcGFjaGUxEzARBgoJkiaJk/IsZAEZEwNv cmcwgbQwgY0GByqGSM49AgEwgYECAQEwLAYHKoZIzj0BAQIhAP////////////////////////// //////////////2XMCcEIQD////////////////////////////////////////9lAQCAKYEAgMB AiEA/////////////////////2xhEHCZWtEARYQbCbdhuJMDIgADZubz40WiQ+v/nrjhfizYmEIl tKIr/n7hwGwpG3CDEk2jIDAeMAwGA1UdEwEB/wQCMAAwDgYDVR0PAQH/BAQDAgGmMAsGByqGSM49 BAEFAANIADBFAiEA63Pq7/YfDDrnbCxXVX20T3dn77iL8dvC1Cb24Al9VFkCIHUeymf/N+H60OQL v9Wg/X8Cbp2am42qjQvaKtb4+BFk libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/samples/input/UniLogoA.gif0000644000175000017500000000052407356024141031553 0ustar tonytonyGIF89ag f3f!Made with GIMP!,g H0I8ͻ`bir@l-t7^,JCq@&h39^,UhMx u^38F{+vq\]}^}'sf h{~qp!kl%wn;erRŞ.T" GlЮ |ҍ1簴éR林屇JRׯ+^@ <ֲ`k<.jGǏ #$;libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/samples/input/keystore.jks0000644000175000017500000000231607356024141031766 0ustar tonytonytest4H00 +*w0jԉ.Nu@b<㼲?mVČd߾}}ꃟ-F/XX:_7?J@V 0K"ӳQl ?2qeƓ?mJC/GOpK:[.(:9zj#Qmf+*/>wLP3f4ڽPyBwAtU=?ыy^!VuUK>#ĭA351u=~,uCahJV;ڕb/S}[mI΀ùOܽ"= +_}vwL׌ 5Zb=[& L{Md\8b} 3 Jz=s8cWkuoX.50900:*0 *H80a1 0 UDE10U University of Siegen10U FB12NUE1!0UChristian Geuer-Pollmann0 010501122058Z 061022122058Z0a1 0 UDE10U University of Siegen10U FB12NUE1!0UChristian Geuer-Pollmann00,*H80Su)RJ.Rvd0x OŬNlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/samples/input/keystore2.jks0000644000175000017500000001061411406420742032046 0ustar tonytony3deskey)A=sr3com.sun.crypto.provider.SealedObjectForKeyProtectorWY0Sxrjavax.crypto.SealedObject>6=÷Tp[ encodedParamst[B[encryptedContentq~L paramsAlgtLjava/lang/String;LsealAlgq~xpur[BTxp0 Yuq~ zU'(֮|>)O^&DNn,+i{)fj΀C+o6' q$*<܋a3,ʭÃoŐSO} ZE@7;˓9mi↓npT"ȷc-Zi:OcܵMB'ګ+N8a)7Q!Uc]Pb⯐է [۬8w`GsqjuZ\NxЕ'ɕ?: 9`.#8S-d߾.αfW7a-r/b9QfC sF C}Đ Zt]cH;ki-հ /U~%s\䙛mҜ#QLp͕H+q6e7cl E9Ɇ~<,d\:NfQ_Ps]Es/w hƉ?;ժ(7'  љc:$hLko*(gHqX.509y0u0ޠ0  *H 001 0 UUS10 U Apache10UTest CA0  100616145008Z21100523145008Z021 0 UUS10 U Apache10U Test Cert00  *H 0v"rN$^ 4U}-YdM8qWT٣RMR>W X\;a?7+iX8[CTG;%H%1R~KZV߫ϔ+MMM jG2Ga-00XU#Q0OWTP?B嚓JtŨ^42001 0 UUS10 U Apache10UTest CA0U70w@O`>40 U00U0  *H |핍BvޚW#õia#$:I~֘]&^Fgč/6U Ҡ6O Yg':{jE_K|X bN 1nCBuTvX.509B0>00  *H 001 0 UUS10 U Apache10UTest CA0  100616145008Z21100523145008Z001 0 UUS10 U Apache10UTest CA00  *H 0.3ќlHbXQ8sn]`$HP7FJ\Ǒ/L>5,W)ݠYFdeF9P; F6+9ץq(Ih?~φeNn8;,44t(8)$aaC5тuY)9G":=X.|IK9tq5TRVܤ8P{,2T&lvv(^d~Q#}zCoj㾛o)n $YxOGy}|)HXM:Ƙ;,}+zUCӈ2J0{h NM*g~]9ۋ}HL]nP&Ft$cHX-=tkKG 03:.O@,`{<6TSZ`)Kc/'J̜:hzΏ Tʲu,)lߦ/#NM= dyKx',"fM)W%wmgvgp18#e|sr}{s`%j՛&xF mřA`#&M_ˈH_x]9;RX.509B0>00  *H 001 0 UUS10 U Apache10UTest CA0  100616145008Z21100523145008Z001 0 UUS10 U Apache10UTest CA00  *H 0.3ќlHbXQ8sn]`$HP7FJ\Ǒ/00  *H 001 0 UUS10 U Apache10UTest CA0  100616145008Z21100523145008Z001 0 UUS10 U Apache10UTest CA00  *H 0.3ќlHbXQ8sn]`$HP7FJ\Ǒ/z ! |UgJ(QBSV^c A]]=%;IaMTGo<[F֡y&<Mb #8DZY&!N(2 Kv%"VšƖ/k ?{1=EάF sgh_zl)Ǐ \,A(j!l@羅[$ֲ̯̋ ̅igZk Oyh+WY8X.5090090 *H80I1 0 UDE10U  Uni Siegen10 U WebSig10U Anli Shundi0 001012181939Z 010410181939Z0I1 0 UDE10U  Uni Siegen10 U WebSig10U Anli Shundi00,*H80Su)RJ.R\ XW3T]O gX libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/samples/input/ecdsa.jks0000644000175000017500000000152211674103326031177 0ustar tonytonyecdsa4[n 00 +*  ;)jmm@Y^"z1~H{zEv\XI rhK&8"^6\224۟KĈdp`Ҵ95J\Ң$L#uZT!Wʰ0hlٕ@I|{WPօ^V\D#!"xf+ }$,dcJ3k,ţ 00 U00U0 *H=m0j3$=2c\5NPxGVaR$'蓳WQ;eR)t}C3b/;ũ0O ;wi ]ˇO9y9KƪSU)4Y-libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/samples/input/genkey.bat0000755000175000017500000000031107356024141031356 0ustar tonytonykeytool -genkey -alias test -keyalg DSA -dname "CN=Christian Geuer-Pollmann, OU=FB12NUE, O=University of Siegen, C=DE" -keypass xmlsecurity -storepass xmlsecurity -keystore keystore.jks -validity 2000 libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keyresolver/0000755000175000017500000000000012273503733027160 5ustar tonytony././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keyresolver/rsa-KeyInfoReference.keylibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keyresolver/rsa-KeyInfoReferen0000644000175000017500000000061512025634644032544 0ustar tonytonyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmDnHagSzfia3N7jOaMSp4VIZjK2lxZgN X/2z98YLp1XE3cvpP+mOvX3gENWQuX3uoix+2qroZ0BFHzhzf4E7is5Q9+42ZFi5naFk3c/B0Q8A jtHtWUEZ8VPPBZggz6uJ1ttJS7YDP6XVjaw6SN1bJSD4/lWNIVsh95kuhunbOef6x/kyIbBz9wF4 S0//G6zPD4GG7/jJ+sDXe+bAgPB1qwhLhrK3N1jGuDZkGGcY/c4b7aba0B0rognwKlygv16GoA/n zWehxih7clhmMTzP2VWa3Q2GcN8ETe00dz68KtS7GF6W15qftjUvRXEKSoPz86ZsP30jIH1tvIrs qSh/kwIDAQAB././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keyresolver/KeyInfoReference-ReferenceChain.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keyresolver/KeyInfoReference-R0000644000175000017500000000212312025634644032464 0ustar tonytony MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmDnHagSzfia3N7jOaMSp4VIZjK2lxZgN X/2z98YLp1XE3cvpP+mOvX3gENWQuX3uoix+2qroZ0BFHzhzf4E7is5Q9+42ZFi5naFk3c/B0Q8A jtHtWUEZ8VPPBZggz6uJ1ttJS7YDP6XVjaw6SN1bJSD4/lWNIVsh95kuhunbOef6x/kyIbBz9wF4 S0//G6zPD4GG7/jJ+sDXe+bAgPB1qwhLhrK3N1jGuDZkGGcY/c4b7aba0B0rognwKlygv16GoA/n zWehxih7clhmMTzP2VWa3Q2GcN8ETe00dz68KtS7GF6W15qftjUvRXEKSoPz86ZsP30jIH1tvIrs qSh/kwIDAQAB ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keyresolver/retrievalmethod1.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keyresolver/retrievalmethod1.x0000644000175000017500000000020011663701505032617 0ustar tonytony ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keyresolver/KeyInfoReference-RSA.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keyresolver/KeyInfoReference-R0000644000175000017500000000161212025634644032466 0ustar tonytony MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmDnHagSzfia3N7jOaMSp4VIZjK2lxZgN X/2z98YLp1XE3cvpP+mOvX3gENWQuX3uoix+2qroZ0BFHzhzf4E7is5Q9+42ZFi5naFk3c/B0Q8A jtHtWUEZ8VPPBZggz6uJ1ttJS7YDP6XVjaw6SN1bJSD4/lWNIVsh95kuhunbOef6x/kyIbBz9wF4 S0//G6zPD4GG7/jJ+sDXe+bAgPB1qwhLhrK3N1jGuDZkGGcY/c4b7aba0B0rognwKlygv16GoA/n zWehxih7clhmMTzP2VWa3Q2GcN8ETe00dz68KtS7GF6W15qftjUvRXEKSoPz86ZsP30jIH1tvIrs qSh/kwIDAQAB ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keyresolver/KeyInfoReference-X509Certificate.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keyresolver/KeyInfoReference-X0000644000175000017500000000317412025634644032501 0ustar tonytony MIIDMjCCAhqgAwIBAgIJANMtZaoBDP2dMA0GCSqGSIb3DQEBBQUAMBoxGDAWBgNV BAMTD3d3dy5leGFtcGxlLm9yZzAeFw0xMjA5MDcwMTU1MzZaFw00MjEwMjAwMTU1 MzZaMBoxGDAWBgNVBAMTD3d3dy5leGFtcGxlLm9yZzCCASIwDQYJKoZIhvcNAQEB BQADggEPADCCAQoCggEBAMLE68jUfv64M/Hy/SBcM8h1WMV8/4zUj/0hwOvfzRkR kXgY7oMO1z0ltwccEVP340kCk6uv3e+EGECng/jdU1GQWkJVieHvWLw295sUICha DAlLBQinGekfQn0dYU5bZ66QXZ56NDytmKKAkDfe65TH4Kmg7XhebXYGkb7GMThG 8eD8QsBnL4yRYscY8ZZAu7APWHyIB+xXokZVnGwBKkN1M5LOlcRRUzpOW3bEO5nz vhvUKuSwIMJeHxqOwCio8Ue5YY+LK3fc9qNmktuV/KVSXSmVBTsD+a7G7u7lu0cb WLhNYxrzhrKy0ctmJDCy1U5bmb7UoAsm8PRbARa0WpcCAwEAAaN7MHkwHQYDVR0O BBYEFPH9Xc38vVMOjrHikUVYuJkuQto1MEoGA1UdIwRDMEGAFPH9Xc38vVMOjrHi kUVYuJkuQto1oR6kHDAaMRgwFgYDVQQDEw93d3cuZXhhbXBsZS5vcmeCCQDTLWWq AQz9nTAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQA4/0BxiAB+NLS3 gbc04dkoe3tKk1UlGav748JnioUX2uXoQ8KLPYqelHnSYzGpwfRm4dN/mUqN2d1t cRIH4nyrYPxXz9vO0rAPZ2ZEfCVuL4jpK92CJjvOKRdIJZIHDu8foXVkca55r5+s txnGRJnDhwXK+e/+BkojvOtyqZ5jyZTMEq9ez8E0XgBNDFmu3sDNLDxxF0fAMFyQ +Fs0FHeqZSEZs8SMrcrqpbX4OygDOun0GeHRRlIbXScKxOLofhjuXTGj+oomIxbf t/gyBha1Gfd25+TpRxVxx5XNosWAezdz7sGSJwWuPApQH19bN/2iunwtfEZ1CB7g LUyOfR/g ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keyresolver/retrievalmethod3.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keyresolver/retrievalmethod3.x0000644000175000017500000000034111670122756032632 0ustar tonytony ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keyresolver/cert-KeyInfoReference.crtlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keyresolver/cert-KeyInfoRefere0000644000175000017500000000222012025634644032530 0ustar tonytony-----BEGIN CERTIFICATE----- MIIDMjCCAhqgAwIBAgIJANMtZaoBDP2dMA0GCSqGSIb3DQEBBQUAMBoxGDAWBgNV BAMTD3d3dy5leGFtcGxlLm9yZzAeFw0xMjA5MDcwMTU1MzZaFw00MjEwMjAwMTU1 MzZaMBoxGDAWBgNVBAMTD3d3dy5leGFtcGxlLm9yZzCCASIwDQYJKoZIhvcNAQEB BQADggEPADCCAQoCggEBAMLE68jUfv64M/Hy/SBcM8h1WMV8/4zUj/0hwOvfzRkR kXgY7oMO1z0ltwccEVP340kCk6uv3e+EGECng/jdU1GQWkJVieHvWLw295sUICha DAlLBQinGekfQn0dYU5bZ66QXZ56NDytmKKAkDfe65TH4Kmg7XhebXYGkb7GMThG 8eD8QsBnL4yRYscY8ZZAu7APWHyIB+xXokZVnGwBKkN1M5LOlcRRUzpOW3bEO5nz vhvUKuSwIMJeHxqOwCio8Ue5YY+LK3fc9qNmktuV/KVSXSmVBTsD+a7G7u7lu0cb WLhNYxrzhrKy0ctmJDCy1U5bmb7UoAsm8PRbARa0WpcCAwEAAaN7MHkwHQYDVR0O BBYEFPH9Xc38vVMOjrHikUVYuJkuQto1MEoGA1UdIwRDMEGAFPH9Xc38vVMOjrHi kUVYuJkuQto1oR6kHDAaMRgwFgYDVQQDEw93d3cuZXhhbXBsZS5vcmeCCQDTLWWq AQz9nTAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQA4/0BxiAB+NLS3 gbc04dkoe3tKk1UlGav748JnioUX2uXoQ8KLPYqelHnSYzGpwfRm4dN/mUqN2d1t cRIH4nyrYPxXz9vO0rAPZ2ZEfCVuL4jpK92CJjvOKRdIJZIHDu8foXVkca55r5+s txnGRJnDhwXK+e/+BkojvOtyqZ5jyZTMEq9ez8E0XgBNDFmu3sDNLDxxF0fAMFyQ +Fs0FHeqZSEZs8SMrcrqpbX4OygDOun0GeHRRlIbXScKxOLofhjuXTGj+oomIxbf t/gyBha1Gfd25+TpRxVxx5XNosWAezdz7sGSJwWuPApQH19bN/2iunwtfEZ1CB7g LUyOfR/g -----END CERTIFICATE----- ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keyresolver/retrievalmethod2.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keyresolver/retrievalmethod2.x0000644000175000017500000000026011663701505032626 0ustar tonytony ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keyresolver/KeyInfoReference-WrongReferentType.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/keyresolver/KeyInfoReference-W0000644000175000017500000000161212025634644032473 0ustar tonytony MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmDnHagSzfia3N7jOaMSp4VIZjK2lxZgN X/2z98YLp1XE3cvpP+mOvX3gENWQuX3uoix+2qroZ0BFHzhzf4E7is5Q9+42ZFi5naFk3c/B0Q8A jtHtWUEZ8VPPBZggz6uJ1ttJS7YDP6XVjaw6SN1bJSD4/lWNIVsh95kuhunbOef6x/kyIbBz9wF4 S0//G6zPD4GG7/jJ+sDXe+bAgPB1qwhLhrK3N1jGuDZkGGcY/c4b7aba0B0rognwKlygv16GoA/n zWehxih7clhmMTzP2VWa3Q2GcN8ETe00dz68KtS7GF6W15qftjUvRXEKSoPz86ZsP30jIH1tvIrs qSh/kwIDAQAB libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/testcases/0000755000175000017500000000000012273503733026604 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/testcases/upp_sign.xml0000644000175000017500000001117111225641263031150 0ustar tonytony not(ancestor-or-self::ds:Signature)tfIuivo9Uaub4wVmA54FPh5Ssm4=not(ancestor-or-self::*[@Id="pid-8ae3bccf-e44c-4707-bc4d-76e46fbe1aae" and ancestor-or-self::xades:UnsignedProperties] or ancestor-or-self::*[@Id="sid-04d124a5-6181-4a9c-adb2-b67d674fd6b3" and ancestor-or-self::xades:UnsignedProperties] or ancestor-or-self::*[@Id="aid-5b31dc87-875c-4c7f-918e-af0d8cf852b5" and ancestor-or-self::xades:UnsignedProperties] or ancestor-or-self::*[@Id="cid-9e173524-6b12-4412-9b85-3c9eca45ef9e" and ancestor-or-self::xades:UnsignedProperties] or ancestor-or-self::*[@Id="rid-e8b28a37-7262-4b18-baa9-5cc107373eeb" and ancestor-or-self::xades:UnsignedProperties])23QjhyDHzlG1Pj0Ym7qHwu9+tsg=C0rv5vLRlnfO/JoWcNb+W7WrD3Y=dZZ94uBAyM1RzpQoY2ftSbczjRS6B6ozfLzmC89GJtfDKj2Uqxci8FKhKr0jvY3eSts1MizUNU65b4S73SjhesAYrypeqm7Kgt/AbF8b1IMA9eH56HRvqax3UHsO2PRLvvBr5zUxioH9VX69mmeQu2YnKJwyul81Ttn4e3sJriQ= MIIChzCCAW+gAwIBAgICAUQwDQYJKoZIhvcNAQEFBQAwOzELMAkGA1UEBhMCUEwx EDAOBgNVBAoTB0NPTUFSQ0gxGjAYBgNVBAMTEVRlc3QgQ0EgZm9yIGVQVUFQMB4X DTA4MDQxODIwMzA0NVoXDTE1MDQxNzIwMzA0NVowOjELMAkGA1UEBhMCUEwxDjAM BgNVBAoTBU1TV2lBMRswGQYDVQQDExJDb21hcmNoRVNQIFRlc3Rvd3kwgZ8wDQYJ KoZIhvcNAQEBBQADgY0AMIGJAoGBAMbN8U7GobHWsLeOkVFXwzwiXdoinj9QYPg0 HPmzIn8a12S3oIWXwvmGqiQkJKCRUQb/Ue8wP2oGoWB/BzRQHhg+Oy2CYZ1ej7nx qF3Nr6P/0r/3hW4+r9suR+Rs05yLpPebxqTqu/Q/5ZIFbD9ycESkr1VrzDI7kWH/ zR0fjlelAgMBAAGjGjAYMAkGA1UdEwQCMAAwCwYDVR0PBAQDAgbAMA0GCSqGSIb3 DQEBBQUAA4IBAQBJhyZlmGl4POY7Rw0lNsldAO04DeoYA6ePOv2B2bShtOsj93pj 47VNw+4VqgAjkp/ehiLbJX0OQMhQFG4JYaVf7njnhjS8fF9DOyoML20aLELxtY7i rkSUGEN2DYTQw4r6GIlc8URYKbuO4JFZ/J079LS75W8i1yAwtGAMif/g+5ZeH+0j muOHbp9T+N/aA1qMKAX5hL7cyV0ZON8xJ5NqGB8nGjTi9PNaM6vnmLw9fY9C0vOM O/PBOFQ0F8tt7lZeM9mjq+lCNK/Ex5Rjmy3nDZY4atyZJERC6RWk4F+wyekvWgI/ JcdkS4BFhZGAeKo3a1Ygo0nORXrXbMTjKZm5 2008-09-04T14:02:54ZvmdGB4dDJVznxnnBb/LWJEtii1g=CN=Test CA for ePUAP, O=COMARCH, C=PL324 libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/testcases/README0000644000175000017500000000054210514300450027450 0ustar tonytonyThese are test cases that have been discovered to test particular types of transforms or interactions that can cause problems. In general they are provided via bug reports from end users. SAMP2ArtifactResponse.xml - Provided by Scott Cantor. Tests enveloped transforms that make use of namespaces from parent nodes that are not in the input nodeset. ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/testcases/SAML2ArtifactResponse.xmllibxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/testcases/SAML2ArtifactRespons0000755000175000017500000000545110514303415032374 0ustar tonytonyhttps://idp.example.org/ U562AIbwQ8i5kQcxOjTfYAsqbOs= n5AGrOWy1WkZWaIVrXlr1iBeZ8YsGJLHsS+n472wmFxHn/GT8PsCDS78UjpIFVxY qK4G3O5p7rQwe8IGYeWeG3pjclvXcP6KH1CwjlJL3ndaZqu1tVdYqx3fbTAK5QRV gDUlyje2TRAgF1YSyyunRmJgOEXJ+JTe8brCmTrkr0E= MIICjzCCAfigAwIBAgIJAKk8t1hYcMkhMA0GCSqGSIb3DQEBBAUAMDoxCzAJBgNV BAYTAlVTMRIwEAYDVQQKEwlJbnRlcm5ldDIxFzAVBgNVBAMTDnNwLmV4YW1wbGUu b3JnMB4XDTA1MDYyMDE1NDgzNFoXDTMyMTEwNTE1NDgzNFowOjELMAkGA1UEBhMC VVMxEjAQBgNVBAoTCUludGVybmV0MjEXMBUGA1UEAxMOc3AuZXhhbXBsZS5vcmcw gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANlZ1L1mKzYbUVKiMQLhZlfGDyYa /jjCiaXP0WhLNgvJpOTeajvsrApYNnFX5MLNzuC3NeQIjXUNLN2Yo2MCSthBIOL5 qE5dka4z9W9zytoflW1LmJ8vXpx8Ay/meG4z//J5iCpYVEquA0xl28HUIlownZUF 7w7bx0cF/02qrR23AgMBAAGjgZwwgZkwHQYDVR0OBBYEFJZiO1qsyAyc3HwMlL9p JpN6fbGwMGoGA1UdIwRjMGGAFJZiO1qsyAyc3HwMlL9pJpN6fbGwoT6kPDA6MQsw CQYDVQQGEwJVUzESMBAGA1UEChMJSW50ZXJuZXQyMRcwFQYDVQQDEw5zcC5leGFt cGxlLm9yZ4IJAKk8t1hYcMkhMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQAD gYEAMFq/UeSQyngE0GpZueyD2UW0M358uhseYOgGEIfm+qXIFQF6MYwNoX7WFzhC LJZ2E6mEvZZFHCHUtl7mGDvsRwgZ85YCtRbvleEpqfgNQToto9pLYe+X6vvH9Z6p gmYsTmak+kxO93JprrOd9xp8aZPMEprL7VCdrhbZEfyYER0=https://idp.example.org/John Doefoo libxml-security-java-1.5.6/src/test/resources/org/apache/xml/security/testcases/out.xml0000644000175000017500000000014311225641263030130 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/at/0000755000175000017500000000000012273503733020533 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/at/buergerkarte/0000755000175000017500000000000012273503733023215 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/at/buergerkarte/testresp.xml0000644000175000017500000001363711227063613025616 0ustar tonytony//*[@Id='signed-data-object-0-20070418142710935-6555091641353629364']/node() Objektliste
W3C

Associating Style Sheets with XML documents
Version 1.0

W3C Recommendation 29 June 1999

This version:
http://www.w3.org/1999/06/REC-xml-stylesheet-19990629
Latest version:
http://www.w3.org/TR/xml-stylesheet
Previous version:
http://www.w3.org/TR/1999/xml-stylesheet-19990428
Editor:
James Clark <jjc@jclark.com>

Abstract

This document allows a style sheet to be associated with an XML document by including one or more processing instructions with a target of xml-stylesheet in the document's prolog.

Status of this document

This document has been reviewed by W3C Members and other interested parties and has been endorsed by the Director as a W3C Recommendation. It is a stable document and may be used as reference material or cited as a normative reference from other documents. W3C's role in making the Recommendation is to draw attention to the specification and to promote its widespread deployment. This enhances the functionality and interoperability of the Web.

The list of known errors in this specifications is available at http://www.w3.org/TR/1999/xml-stylesheet-19990629/errata.

Comments on this specification may be sent to <www-xml-stylesheet-comments@w3.org>. The archive of public comments is available at http://w3.org/Archives/Public/www-xml-stylesheet-comments.

A list of current W3C Recommendations and other technical documents can be found at http://www.w3.org/TR.

The Working Group expects additional mechanisms for linking style sheets to XML document to be defined in a future specification.

The use of XML processing instructions in this specification should not be taken as a precedent. The W3C does not anticipate recommending the use of processing instructions in any future specification. The Rationale explains why they were used in this specification.

This document was produced as part of the W3C XML Activity.

Table of contents

1 The xml-stylesheet processing instruction

Appendices

A References
B Rationale

1 The xml-stylesheet processing instruction

Style Sheets can be associated with an XML[XML10] document by using a processing instruction whose target is xml-stylesheet. This processing instruction follows the behaviour of the HTML 4.0 <LINK REL="stylesheet">[HTML40].

The xml-stylesheet processing instruction is parsed in the same way as a start-tag, with the exception that entities other than predefined entities must not be referenced.

The following grammar is given using the same notation as the grammar in the XML Recommendation[XML10]. Symbols in the grammar that are not defined here are defined in the XML Recommendation.

xml-stylesheet processing instruction
[1]    StyleSheetPI    ::=    '<?xml-stylesheet' (S PseudoAtt)* S? '?>'
[2]    PseudoAtt    ::=    Name S? '=' S? PseudoAttValue
[3]    PseudoAttValue    ::=    ('"' ([^"<&] | CharRef | PredefEntityRef)* '"'
| "'" ([^'<&] | CharRef | PredefEntityRef)* "'")
- (Char* '?>' Char*)
[4]    PredefEntityRef    ::=    '&amp;' | '&lt;' | '&gt;' | '&quot;' | '&apos;'

In PseudoAttValue, a CharRef or a PredefEntityRef is interpreted in the same manner as in a normal XML attribute value. The actual value of the pseudo-attribute is the value after each reference is replaced by the character it references. This replacement is not performed automatically by an XML processor.

The xml-stylesheet processing instruction is allowed only in the prolog of an XML document. The syntax of XML constrains where processing instructions are allowed in the prolog; the xml-stylesheet processing instruction is allowed anywhere in the prolog that meets these constraints.

NOTE: If the xml-stylesheet processing instruction occurs in the external DTD subset or in a parameter entity, it is possible that it may not be processed by a non-validating XML processor (see [XML10]).

The following pseudo attributes are defined

href CDATA #REQUIRED
type CDATA #REQUIRED
title CDATA #IMPLIED
media CDATA #IMPLIED
charset CDATA #IMPLIED
alternate (yes|no) "no"

The semantics of the pseudo-attributes are exactly as with <LINK REL="stylesheet"> in HTML 4.0, with the exception of the alternate pseudo-attribute. If alternate="yes" is specified, then the processing instruction has the semantics of <LINK REL="alternate stylesheet"> instead of <LINK REL="stylesheet">.

NOTE: Since the value of the href attribute is a URI reference, it may be a relative URI and it may contain a fragment identifier. In particular the URI reference may contain only a fragment identifier. Such a URI reference is a reference to a part of the document containing the xml-stylesheet processing instruction (see [RFC2396]). The consequence is that the xml-stylesheet processing instruction allows style sheets to be embedded in the same document as the xml-stylesheet processing instruction.

In some cases, style sheets may be linked with an XML document by means external to the document. For example, earlier versions of HTTP [RFC2068] (section 19.6.2.4) allowed style sheets to be associated with XML documents by means of the Link header. Any links to style sheets that are specified externally to the document are considered to occur before the links specified by the xml-stylesheet processing instructions. This is the same as in HTML 4.0 (see section 14.6).

Here are some examples from HTML 4.0 with the corresponding processing instruction:

<LINK href="mystyle.css" rel="style sheet" type="text/css">
<?xml-stylesheet href="mystyle.css" type="text/css"?>

<LINK href="mystyle.css" title="Compact" rel="stylesheet"
type="text/css">
<?xml-stylesheet href="mystyle.css" title="Compact" type="text/css"?>

<LINK href="mystyle.css" title="Medium" rel="alternate stylesheet"
type="text/css">
<?xml-stylesheet alternate="yes" href="mystyle.css" title="Medium"
type="text/css"?>

Multiple xml-stylesheet processing instructions are also allowed with exactly the same semantics as with LINK REL="stylesheet". For example,

<LINK rel="alternate stylesheet" title="compact" href="small-base.css"
type="text/css">
<LINK rel="alternate stylesheet" title="compact" href="small-extras.css"
type="text/css">
<LINK rel="alternate stylesheet" title="big print" href="bigprint.css"
type="text/css">
<LINK rel="stylesheet" href="common.css" type="text/css">

would be equivalent to:

<?xml-stylesheet alternate="yes" title="compact" href="small-base.css"
type="text/css"?>
<?xml-stylesheet alternate="yes" title="compact" href="small-extras.css"
type="text/css"?>
<?xml-stylesheet alternate="yes" title="big print" href="bigprint.css"
type="text/css"?>
<?xml-stylesheet href="common.css" type="text/css"?>

A References

HTML40
World Wide Web Consortium. HTML 4.0 Specification. W3C Recommendation. See http://www.w3.org/TR/REC-html40
RFC2068
R. Fielding, J. Gettys, J. Mogul, H. Frystyk Nielsen, and T. Berners-Lee. Hypertext Transfer Protocol -- HTTP/1.1.. IETF RFC 2068. See http://www.ietf.org/rfc/rfc2068.txt.
RFC2396
T. Berners-Lee, R. Fielding, and L. Masinter. Uniform Resource Identifiers (URI): Generic Syntax. IETF RFC 2396. See http://www.ietf.org/rfc/rfc2396.txt.
XML10
World Wide Web Consortium. Extensible Markup Language (XML) 1.0. W3C Recommendation. See http://www.w3.org/TR/1998/REC-xml-19980210

B Rationale

There was an urgent requirement for a specification for style sheet linking that could be completed in time for the next release from major browser vendors. Only by choosing a simple mechanism closely based on a proven existing mechanism could the specification be completed in time to meet this requirement.

Use of a processing instruction avoids polluting the main document structure with application specific processing information.

The mechanism chosen for this version of the specification is not a constraint on the additional mechanisms planned for future versions. There is no expectation that these will use processing instructions; indeed they may not include the linking information in the source document.

././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/transforms/digestInputs/c14NSignature.firstReference.txtlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/transforms/digestInputs/c14NSignature.fi0000644000175000017500000000014707400451635032370 0ustar tonytony Hello, world! libxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/transforms/signatures/0000755000175000017500000000000012273503733027162 5ustar tonytony././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/transforms/signatures/xPathSignature.xml.3.inputlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/transforms/signatures/xPathSignature.xml0000644000175000017500000000013307400451635032646 0ustar tonytonyA text from IAIK././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/transforms/signatures/base64DecodeSignature.xmllibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/transforms/signatures/base64DecodeSignat0000644000175000017500000000225207400451635032443 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs=CFDfVk22iawglDdrEIygmWhpPrj0DyWnxLhPBSgHXp6i31oVbicHAOvThv7TyVKd eE6K2b5AKOErBwVncngMBmpwtJIoKOgUhgNe4DskfeSdk44OJkT63h0EJxJhUHqz NtBe7QrmynpbFnOedDDZwMA9/I8RU0Eq/jikz9nqNdU=sDa5yzUv4IJmBY60GZCnkQSAhpG7tgxepi6sj3DlCzxjTtO5MNrjI9sK3WhimpNi NDmagzNEjxP3+x1huxL19GoIxZgr5O7E/F2IInSASVZTQsvWZlNauhRs0KZAszIS FchvrihILLoUf4tzaOSe6jgMEq6IkO0dWVpcFpAjXTc=Aw==libxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/transforms/signatures/xPathSignature.xml0000644000175000017500000000353207400451635032654 0ustar tonytony Xg7huUaHvGjhk11T6cBa5jKiCAM=a1YkQDH/XGdccOaiyxOrP6AQBeM=ancestor-or-self::dsig:ObjectXg7huUaHvGjhk11T6cBa5jKiCAM=dRM9axVQYPMd0vfzkbstaG8taNTtJA9sF9ze3/xW6AeW9KCguIjHpmG2kAuDJheZ RXRO9et+whWzrX8daHchUu6RDbkkL5tOBcMnyKJiPD03NRxut7AWtkFKLhhxzRds +EA7X0uNf59UIanLlMiGh3+ROzctwyO0z8vbKqjGxYU=sDa5yzUv4IJmBY60GZCnkQSAhpG7tgxepi6sj3DlCzxjTtO5MNrjI9sK3WhimpNi NDmagzNEjxP3+x1huxL19GoIxZgr5O7E/F2IInSASVZTQsvWZlNauhRs0KZAszIS FchvrihILLoUf4tzaOSe6jgMEq6IkO0dWVpcFpAjXTc=Aw==A text from IAIK././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/transforms/signatures/xPathSignature.xml.1.inputlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/transforms/signatures/xPathSignature.xml0000644000175000017500000000020307400451635032644 0ustar tonytonyA text from IAIKlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/transforms/signatures/c14nSignature.xml0000644000175000017500000000276007400451635032337 0ustar tonytony R8S/QfGgzSmfIg0qpQthdjJQGuk=IGE++R3JwgZ17hxfT3VoGmvNBjU=cmn28RkAxN5587v+EPof2okKiUkJivh0wKNHK9FuhbA+xUBWsucUFXrNCrug57s4 xQFsQtXjVKPn+LGehnhvxZqd0MEK0GLndRk2dKogbtX/tc55BsyT1jRDGpeIxqNR OnwTleWlp9tMenLPPsa3vMrzXXUqup2A/J7/mZaNnUY=sDa5yzUv4IJmBY60GZCnkQSAhpG7tgxepi6sj3DlCzxjTtO5MNrjI9sK3WhimpNi NDmagzNEjxP3+x1huxL19GoIxZgr5O7E/F2IInSASVZTQsvWZlNauhRs0KZAszIS FchvrihILLoUf4tzaOSe6jgMEq6IkO0dWVpcFpAjXTc=Aw==././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/transforms/signatures/envelopedSignatureSignature.xmllibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/transforms/signatures/envelopedSignature0000644000175000017500000000237207400451635032753 0ustar tonytony cWFVogsTJUrmoCbGrFoP2mE+F5U=l82qilvUhkstzFG8tjTY/DAlWmhMTPz6fhnaIM6qetH9/qagjtrceEwGnc8Q7G20 laxPg+tjXa9qSHB9wUmOgu5axN3oNsncZxukCi7pmmujflMsXfJKl7jTXweYyKU5 5tJgeJM3Mnjm4QiAE1X9Ftne4UKFFg4348RUWnlZWBE=sDa5yzUv4IJmBY60GZCnkQSAhpG7tgxepi6sj3DlCzxjTtO5MNrjI9sK3WhimpNi NDmagzNEjxP3+x1huxL19GoIxZgr5O7E/F2IInSASVZTQsvWZlNauhRs0KZAszIS FchvrihILLoUf4tzaOSe6jgMEq6IkO0dWVpcFpAjXTc=Aw== Some Data from IAIK ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/transforms/signatures/xPathSignature.xml.0.inputlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/transforms/signatures/xPathSignature.xml0000644000175000017500000000015107400451635032646 0ustar tonytonyA text from IAIK././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/transforms/signatures/xPathSignature.xml.2.inputlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/transforms/signatures/xPathSignature.xml0000644000175000017500000000015107400451635032646 0ustar tonytonyA text from IAIKlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/readme.txt0000644000175000017500000001675307400451635024611 0ustar tonytony************************************************************** This file contains a description of sample sigantures produced with the IAIK Signature Library (IXSIL). Author: Gregor Karlinger Date: 15. 11. 2001 IXSIL Build: 1010 ************************************************************** signatureAlgorithms/dSASignature.xml ------------------------------------ Simple signature using DSA as signature algorithm. DSA public key is encoded as KeyValue. The input used for the digest computation can be found in file "../digestInputs/dSASignature.firstReference.txt". signatureAlgorithms/rSASignature.xml ------------------------------------ Simple signature using RSA as signature algorithm. RSA public key is encoded as KeyValue. The input used for the digest computation can be found in file "../digestInputs/rSASignature.firstReference.txt". signatureAlgorithms/hMACSignature.xml ------------------------------------- Simple signature using HMAC as authentication algorithm. The secret key is "secret".getBytes("ASCII"). The input used for the digest computation can be found in file "../digestInputs/hMACSignature.firstReference.txt". signatureAlgorithms/hMACShortSignature.xml ------------------------------------------ Simple signature using HMAC as authentication algorithm. HMAC output length is limited to 40 bits. The secret key is "secret".getBytes("ASCII"). The input used for the digest computation can be found in file "../digestInputs/hMACShortSignature.firstReference.txt". coreFeatures/signatureTypesSignature.xml ---------------------------------------- Signature containing several References to demonstrate IXSIL's ability to work with enveloping, enveloped and detached signatures. * The first Reference refers to an external source (http) - detached signature. * The second Reference refers to an external source (file system) - detached signature. The external file is "../samples/sampleTextData.txt" * The third Reference refers to XML data that is a sibling of the XML Signature, but within the same document - detached signature The input used for the digest computation can be found in file "../digestInputs/signatureTypesSignature.thirdReference.txt". * The fourth Reference refers to an external XML file and uses an XPath transform to select parts of the document for signing - detached signature. The external file is "../samples/sampleXMLData.xml" The input used for the digest computation can be found in file "../digestInputs/signatureTypesSignature.fourthReference.txt". * The fifth Reference refers to data in an Object of the signature via an ID reference - enveloping signature. The input used for the digest computation can be found in file "../digestInputs/signatureTypesSignature.fifthReference.txt". * The sixth Reference refers to data in an Object of the signature via an empty URI (URI="") and using an XPath transform to select the data for signing - enveloping signature. The input used for the digest computation can be found in file "../digestInputs/signatureTypesSignature.sixthReference.txt". * The seventh Reference refers to the signature document itself (URI="") and uses an enveloped signature transform - enveloped signature The input used for the digest computation can be found in file "../digestInputs/signatureTypesSignature.seventhReference.txt". coreFeatures/manifestSignature.xml ---------------------------------- Signature containing a Reference to a Manifest element that is stored in an Object container within the Signature. The input used for the digest computation can be found in file "../digestInputs/manifestSignature.firstReference.txt". * The first Reference in the Manifest refers to the whole signature document and uses an enveloped signature trans- form to cut out the Signature element. The input used for the digest computation can be found in file "../digestInputs/manifestSignature.manifest.firstReference.txt". * The second Reference in the Manifest refers an external resource (file system). The external file is "../samples/sampleXMLData.xml". The input used for the digest computation can be found in file "../digestInputs/manifestSignature.manifest.secondReference.txt". coreFeatures/anonymousReferenceSignature.xml -------------------------------------------- Signature containing an anonymous Reference, i.e. the URI attribute of the Reference is missing. In such a case, the application must provide the hint where to find the corres- ponding data. In this case, the data can be found in file "../samples/anonymousReferenceContent.xml". The input used for the digest computation can be found in file "../digestInputs/anonymousReferenceSignature.firstReference.txt". transforms/base64DecodeSignature.xml ------------------------------------ Signature containing a Reference to a base64 encoded file. The Reference contains a Base64 transform, i.e. the file will be decoded prior to digest computation. The encoded file is "../samples/sampleBase64EncodedData.txt". The input used for the digest computation can be found in file "../digestInputs/base64Signature.firstReference.txt". transforms/c14nSignature.xml ---------------------------- Signature containing two References to an XML file. The XML file is "../samples/sampleXMLData.xml". * The first Reference contains a canonical XML transform, that is, comments in the XML file will be removed at transformation. The input used for the digest computation can be found in file "../digestInputs/c14nSignature.firstReference.txt". * The second Reference contains a canonical XML transform with comments, that is, comments in the XML file will be preserved at transformation. The input used for the digest computation can be found in file "../digestInputs/c14nSignature.secondReference.txt". transforms/envelopedSignatureSignature.xml ------------------------------------------ Signature containing a single Reference to the signature file itself (URI=""). The Reference contains an enveloped signature transform to cut out the Signature structure from the XML. The input used for the digest computation can be found in file "../digestInputs/envelopedSignatureSignature.firstReference.txt". transforms/xPathSignature.xml ----------------------------- Signature containing three internal References to demonstrate document subset selection. * The first Reference contains a reference-only URI ("#objectId"). This means that the XML element with its ID attribute set to the value "objectId" is selected; comments will be suppressed. Finally a canonical XML transfrom will be performed prior to digest computation. The input used for the digest computation can be found in file "../digestInputs/xPathSignature.firstReference.txt". * The second Reference also contains a reference-only URI ("#xpointer(id('objectId'))"). This also means that the XML element with its ID attribute set to the value "objectId" is selected; but contrary to the first Reference, this time comments are preserved. Finally a canonical XML transfrom (preserving comments option chosen) will be performed prior to digest computation. The input used for the digest computation can be found in file "../digestInputs/xPathSignature.secondReference.txt". libxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/0000755000175000017500000000000012273503733025227 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/samples/0000755000175000017500000000000012273503733026673 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/samples/sampleXMLData.xml0000644000175000017500000000046107400451635032051 0ustar tonytony ] > Some Data from IAIK ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/samples/anonymousReferenceContent.xmllibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/samples/anonymousReferenceC0000644000175000017500000000026007400451635032565 0ustar tonytony This XML file is referenced via an anonymous Reference in the XML signature. libxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/samples/sampleTextData.txt0000644000175000017500000000003607400451635032352 0ustar tonytonySome text from IAIK in a file.libxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/digestInputs/0000755000175000017500000000000012273503733027711 5ustar tonytony././@LongLink0000000000000000000000000000020500000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/digestInputs/anonymousReferenceSignature.firstReference.txtlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/digestInputs/anonymousRefer0000644000175000017500000000020607400451635032645 0ustar tonytony This XML file is referenced via an anonymous Reference in the XML signature. ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/digestInputs/manifestReference.firstReference.txtlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/digestInputs/manifestRefere0000644000175000017500000000144507400451635032576 0ustar tonytonyKQuoZseibY3bIurUFbyYhLCm9nY=oUqpQ+ekAvoeCRjlMc1EXzrFJJA=././@LongLink0000000000000000000000000000020500000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/digestInputs/manifestReference.manifest.secondReference.txtlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/digestInputs/manifestRefere0000644000175000017500000000015707400451635032575 0ustar tonytony Some Data from IAIK ././@LongLink0000000000000000000000000000020400000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/digestInputs/manifestReference.manifest.firstReference.txtlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/digestInputs/manifestRefere0000644000175000017500000000017307400451635032573 0ustar tonytony Some Data from IAIK ././@LongLink0000000000000000000000000000020300000000000011560 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/digestInputs/signatureTypesSignature.seventhReference.txtlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/digestInputs/signatureTypes0000644000175000017500000000017307400451635032662 0ustar tonytony Some Data from IAIK ././@LongLink0000000000000000000000000000020100000000000011556 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/digestInputs/signatureTypesSignature.thirdReference.txtlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/digestInputs/signatureTypes0000644000175000017500000000014007400451635032654 0ustar tonytony Some Data from IAIK ././@LongLink0000000000000000000000000000020100000000000011556 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/digestInputs/signatureTypesSignature.sixthReference.txtlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/digestInputs/signatureTypes0000644000175000017500000000021107400451635032653 0ustar tonytonyA text from IAIK././@LongLink0000000000000000000000000000020200000000000011557 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/digestInputs/signatureTypesSignature.fourthReference.txtlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/digestInputs/signatureTypes0000644000175000017500000000013607400451635032661 0ustar tonytony Some Data from IAIK ././@LongLink0000000000000000000000000000020100000000000011556 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/digestInputs/signatureTypesSignature.fifthReference.txtlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/digestInputs/signatureTypes0000644000175000017500000000021107400451635032653 0ustar tonytonyA text from IAIKlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/signatures/0000755000175000017500000000000012273503733027413 5ustar tonytony././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/signatures/anonymousReferenceSignature.xmllibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/signatures/anonymousReferen0000644000175000017500000000220407400451635032672 0ustar tonytony 7Hfp3yTdKKBv0d7M0ozNxCu7V98=mU+8/j7vFJGXG6Xw/VgVRIcRQNl5LtoHV6lHNPqrHXF6SZNQxze6lXvIv/MINnAk oZvVWz4sMYoddP6wXaeQJwDPjzO1EQNe2Un73J/njmzZDfIJqSah1SG+zSteMR6m J68nKznbRTdxnOknBo+rZirXiAsPgudRR6NUyXn+D8A=sDa5yzUv4IJmBY60GZCnkQSAhpG7tgxepi6sj3DlCzxjTtO5MNrjI9sK3WhimpNi NDmagzNEjxP3+x1huxL19GoIxZgr5O7E/F2IInSASVZTQsvWZlNauhRs0KZAszIS FchvrihILLoUf4tzaOSe6jgMEq6IkO0dWVpcFpAjXTc=Aw==././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/signatures/manifestSignatureWrapping.xmllibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/signatures/manifestSignatur0000644000175000017500000000330311704017634032656 0ustar tonytony ]> 1kF5aUeRTi9Jul2Qz3DmbZ0Od7I=M2bF8w1IQvdEedQ6SB9w8zaWc+KDNigoysBviNpifB6htymPhoW+1NBboygfkmAy 8GSsOhmQ7gbpHoljjm2QPmZmo8BIt7ZGy7izhww1WZiIQxmqczIEaiPeBcsgsxDW SfOh7Ev9YXFfLF4UxJ59dfTR3ZTb9CVzGf6CSG4xXJk=sDa5yzUv4IJmBY60GZCnkQSAhpG7tgxepi6sj3DlCzxjTtO5MNrjI9sK3WhimpNi NDmagzNEjxP3+x1huxL19GoIxZgr5O7E/F2IInSASVZTQsvWZlNauhRs0KZAszIS FchvrihILLoUf4tzaOSe6jgMEq6IkO0dWVpcFpAjXTc=Aw==UXcq2OOH+aMla4fb5UOnYuaY9uQ= Some Data from IAIK BadManifest ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/signatures/manifestSignature.xmllibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/signatures/manifestSignatur0000644000175000017500000000322207405060203032647 0ustar tonytony ]> 1kF5aUeRTi9Jul2Qz3DmbZ0Od7I=M2bF8w1IQvdEedQ6SB9w8zaWc+KDNigoysBviNpifB6htymPhoW+1NBboygfkmAy 8GSsOhmQ7gbpHoljjm2QPmZmo8BIt7ZGy7izhww1WZiIQxmqczIEaiPeBcsgsxDW SfOh7Ev9YXFfLF4UxJ59dfTR3ZTb9CVzGf6CSG4xXJk=sDa5yzUv4IJmBY60GZCnkQSAhpG7tgxepi6sj3DlCzxjTtO5MNrjI9sK3WhimpNi NDmagzNEjxP3+x1huxL19GoIxZgr5O7E/F2IInSASVZTQsvWZlNauhRs0KZAszIS FchvrihILLoUf4tzaOSe6jgMEq6IkO0dWVpcFpAjXTc=Aw==UXcq2OOH+aMla4fb5UOnYuaY9uQ= Some Data from IAIK ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/signatures/signatureTypesSignature.xmllibxml-security-java-1.5.6/src/test/resources/at/iaik/ixsil/coreFeatures/signatures/signatureTypesSi0000644000175000017500000000624307400451635032664 0ustar tonytony ]> N2sjZsKr2W1kw6UP7mcWwrz7T5I=VyGBEakUjlOuKT4WBI+tDm0tYe0=ancestor-or-self::iaik:DataItem9yMFLtkwiTVLvQaCOzE6+o4HrQE=ancestor-or-self::iaik:DataItemRdeNc+MfZeY8uqSLq8AtQ6DBygs=3x8tHtIyVobZMQ7ZoBIHyiFU7Fk=ancestor-or-self::dsig:Object3x8tHtIyVobZMQ7ZoBIHyiFU7Fk=KQuoZseibY3bIurUFbyYhLCm9nY=gCAp0wt+ZIG3+GmZA7KKXfCA5d5Qbi7GY5BhMpxVA2BxmVe9M4vmC2h+hcBzCRmH wjAuaIkPYxPCaiD/SSa4i27ufMNJbbxMi8AGWPRRtgfOG+/KQZrrvUQtpnxS3c16 81ClcivlTA1wKVM7xKJOn8li/8IldJNm1ZgN8JQS8sk=sDa5yzUv4IJmBY60GZCnkQSAhpG7tgxepi6sj3DlCzxjTtO5MNrjI9sK3WhimpNi NDmagzNEjxP3+x1huxL19GoIxZgr5O7E/F2IInSASVZTQsvWZlNauhRs0KZAszIS FchvrihILLoUf4tzaOSe6jgMEq6IkO0dWVpcFpAjXTc=Aw==A text from IAIK Some Data from IAIK libxml-security-java-1.5.6/src/test/resources/javax/0000755000175000017500000000000012273503733021240 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/javax/xml/0000755000175000017500000000000012273503733022040 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/javax/xml/crypto/0000755000175000017500000000000012273503733023360 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/javax/xml/crypto/dsig/0000755000175000017500000000000012273503733024306 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/javax/xml/crypto/dsig/signature1.xml0000644000175000017500000000320510661101437027104 0ustar tonytony This ends up in the file 'doc.xml' 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= ov3HOoPN0w71N3DdGNhN+dSzQm6NJFUB5qGKRp9Q986nVzMb8wCIVxCQu+x3vMtq p4/R3KEcPtEJSaoR+thGq++GPIh2mZXyWJs3xHy9P4xmoTVwli7/l7s8ebDSmnbZ 7xZU4Iy1BSMZSxGKnRG+Z/0GJIfTz8jhH6wCe3l03L4= q07hpxA5DGFfvJFZueFl/LI85XxQxrvqgVugL25V090A9MrlLBg5PmAsxFTe+G6a xvWJQwYOVHj/nuiCnNLa9a7uAtPFiTtW+v5H3wlLaY3ws4atRBNOQlYkIBp38sTf QBkk4i8PEU1GQ2M0CLIJq4/2Akfv1wxzSQ9+8oWkArc= AQAB some text ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/javax/xml/crypto/dsig/signature-enveloping-hmac-sha1-trunclen-8-attack.xmllibxml-security-java-1.5.6/src/test/resources/javax/xml/crypto/dsig/signature-enveloping-hmac-sha1-t0000644000175000017500000000121511227151702032367 0ustar tonytony 8 nz4GS0NbH2SrWlD/4fX313CoTzc= Qw== some other text libxml-security-java-1.5.6/src/test/resources/javax/xml/crypto/dsig/xml-stylesheet.b640000644000175000017500000004257211536510127027620 0ustar tonytonyPCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFu c2l0aW9uYWwvL0VOIj4KPGh0bWw+CjxoZWFkPgo8dGl0bGU+QXNzb2NpYXRpbmcg U3R5bGUgU2hlZXRzIHdpdGggWE1MIGRvY3VtZW50czwvdGl0bGU+CjxsaW5rIHJl bD0ic3R5bGVzaGVldCIgdHlwZT0idGV4dC9jc3MiIGhyZWY9Imh0dHA6Ly93d3cu dzMub3JnL1N0eWxlU2hlZXRzL1RSL1czQy1SRUMiPgo8c3R5bGUgdHlwZT0idGV4 dC9jc3MiPmNvZGUgeyBmb250LWZhbWlseTogbW9ub3NwYWNlIH08L3N0eWxlPgo8 L2hlYWQ+Cjxib2R5Pgo8ZGl2IGNsYXNzPSJoZWFkIj4KPGEgaHJlZj0iaHR0cDov L3d3dy53My5vcmcvIj48aW1nIHNyYz0iaHR0cDovL3d3dy53My5vcmcvSWNvbnMv V1dXL3czY19ob21lIiBhbHQ9IlczQyIgaGVpZ2h0PSI0OCIgd2lkdGg9IjcyIj48 L2E+CjxoMT5Bc3NvY2lhdGluZyBTdHlsZSBTaGVldHMgd2l0aCBYTUwgZG9jdW1l bnRzPGJyPlZlcnNpb24gMS4wPC9oMT4KPGgyPlczQyBSZWNvbW1lbmRhdGlvbiAy OSBKdW5lIDE5OTk8L2gyPgo8ZGw+CjxkdD5UaGlzIHZlcnNpb246PC9kdD4KPGRk Pgo8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzA2L1JFQy14bWwtc3R5 bGVzaGVldC0xOTk5MDYyOSI+aHR0cDovL3d3dy53My5vcmcvMTk5OS8wNi9SRUMt eG1sLXN0eWxlc2hlZXQtMTk5OTA2Mjk8L2E+Cjxicj4KPC9kZD4KPGR0PkxhdGVz dCB2ZXJzaW9uOjwvZHQ+CjxkZD4KPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcv VFIveG1sLXN0eWxlc2hlZXQiPmh0dHA6Ly93d3cudzMub3JnL1RSL3htbC1zdHls ZXNoZWV0PC9hPgo8YnI+CjwvZGQ+CjxkdD5QcmV2aW91cyB2ZXJzaW9uOjwvZHQ+ CjxkZD4KPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcvVFIvMTk5OS94bWwtc3R5 bGVzaGVldC0xOTk5MDQyOCI+aHR0cDovL3d3dy53My5vcmcvVFIvMTk5OS94bWwt c3R5bGVzaGVldC0xOTk5MDQyODwvYT4KPGJyPgo8L2RkPgo8ZHQ+RWRpdG9yOjwv ZHQ+CjxkZD4KCkphbWVzIENsYXJrCjxhIGhyZWY9Im1haWx0bzpqamNAamNsYXJr LmNvbSI+Jmx0O2pqY0BqY2xhcmsuY29tJmd0OzwvYT4KPGJyPgo8L2RkPgo8L2Rs Pgo8cCBjbGFzcz0iY29weXJpZ2h0Ij4KPGEgaHJlZj0iaHR0cDovL3d3dy53My5v cmcvQ29uc29ydGl1bS9MZWdhbC9pcHItbm90aWNlLmh0bWwjQ29weXJpZ2h0Ij4K CQlDb3B5cmlnaHQ8L2E+ICZuYnNwOyZjb3B5OyZuYnNwOyAxOTk5IDxhIGhyZWY9 Imh0dHA6Ly93d3cudzMub3JnIj5XM0M8L2E+CgkJKDxhIGhyZWY9Imh0dHA6Ly93 d3cubGNzLm1pdC5lZHUiPk1JVDwvYT4sCgkJPGEgaHJlZj0iaHR0cDovL3d3dy5p bnJpYS5mci8iPklOUklBPC9hPiwKCQk8YSBocmVmPSJodHRwOi8vd3d3LmtlaW8u YWMuanAvIj5LZWlvPC9hPiApLCBBbGwgUmlnaHRzIFJlc2VydmVkLiBXM0MKCQk8 YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9Db25zb3J0aXVtL0xlZ2FsL2lwci1u b3RpY2UuaHRtbCNMZWdhbCBEaXNjbGFpbWVyIj5saWFiaWxpdHksPC9hPjxhIGhy ZWY9Imh0dHA6Ly93d3cudzMub3JnL0NvbnNvcnRpdW0vTGVnYWwvaXByLW5vdGlj ZS5odG1sI1czQyBUcmFkZW1hcmtzIj50cmFkZW1hcms8L2E+LAoJCTxhIGhyZWY9 Imh0dHA6Ly93d3cudzMub3JnL0NvbnNvcnRpdW0vTGVnYWwvY29weXJpZ2h0LWRv Y3VtZW50cy5odG1sIj5kb2N1bWVudCB1c2UgPC9hPmFuZAoJCTxhIGhyZWY9Imh0 dHA6Ly93d3cudzMub3JnL0NvbnNvcnRpdW0vTGVnYWwvY29weXJpZ2h0LXNvZnR3 YXJlLmh0bWwiPnNvZnR3YXJlIGxpY2Vuc2luZyA8L2E+cnVsZXMgYXBwbHkuCgk8 L3A+CjxociB0aXRsZT0iU2VwYXJhdG9yIGZvciBoZWFkZXIiPgo8L2Rpdj4KPGgy Pgo8YSBuYW1lPSJhYnN0cmFjdCI+QWJzdHJhY3Q8L2E+CjwvaDI+Cgo8cD5UaGlz IGRvY3VtZW50IGFsbG93cyBhIHN0eWxlIHNoZWV0IHRvIGJlIGFzc29jaWF0ZWQg d2l0aCBhbiBYTUwKZG9jdW1lbnQgYnkgaW5jbHVkaW5nIG9uZSBvciBtb3JlIHBy b2Nlc3NpbmcgaW5zdHJ1Y3Rpb25zIHdpdGggYQp0YXJnZXQgb2YgPGNvZGU+eG1s LXN0eWxlc2hlZXQ8L2NvZGU+IGluIHRoZSBkb2N1bWVudCdzIHByb2xvZy48L3A+ Cgo8aDI+CjxhIG5hbWU9InN0YXR1cyI+U3RhdHVzIG9mIHRoaXMgZG9jdW1lbnQ8 L2E+CjwvaDI+Cgo8cD5UaGlzIGRvY3VtZW50IGhhcyBiZWVuIHJldmlld2VkIGJ5 IFczQyBNZW1iZXJzIGFuZCBvdGhlciBpbnRlcmVzdGVkCnBhcnRpZXMgYW5kIGhh cyBiZWVuIGVuZG9yc2VkIGJ5IHRoZSBEaXJlY3RvciBhcyBhIFczQyA8YSBocmVm PSJodHRwOi8vd3d3LnczLm9yZy9Db25zb3J0aXVtL1Byb2Nlc3MvI1JlY3NXM0Mi PlJlY29tbWVuZGF0aW9uPC9hPi4gSXQKaXMgYSBzdGFibGUgZG9jdW1lbnQgYW5k IG1heSBiZSB1c2VkIGFzIHJlZmVyZW5jZSBtYXRlcmlhbCBvciBjaXRlZCBhcwph IG5vcm1hdGl2ZSByZWZlcmVuY2UgZnJvbSBvdGhlciBkb2N1bWVudHMuIFczQydz IHJvbGUgaW4gbWFraW5nIHRoZQpSZWNvbW1lbmRhdGlvbiBpcyB0byBkcmF3IGF0 dGVudGlvbiB0byB0aGUgc3BlY2lmaWNhdGlvbiBhbmQgdG8KcHJvbW90ZSBpdHMg d2lkZXNwcmVhZCBkZXBsb3ltZW50LiBUaGlzIGVuaGFuY2VzIHRoZSBmdW5jdGlv bmFsaXR5IGFuZAppbnRlcm9wZXJhYmlsaXR5IG9mIHRoZSBXZWIuPC9wPgoKPHA+ VGhlIGxpc3Qgb2Yga25vd24gZXJyb3JzIGluIHRoaXMgc3BlY2lmaWNhdGlvbnMg aXMgYXZhaWxhYmxlIGF0CjxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkv MDYvUkVDLXhtbC1zdHlsZXNoZWV0LTE5OTkwNjI5L2VycmF0YSI+aHR0cDovL3d3 dy53My5vcmcvVFIvMTk5OS94bWwtc3R5bGVzaGVldC0xOTk5MDYyOS9lcnJhdGE8 L2E+LjwvcD4KCjxwPkNvbW1lbnRzIG9uIHRoaXMgc3BlY2lmaWNhdGlvbiBtYXkg YmUgc2VudCB0byAmbHQ7PGEgaHJlZj0ibWFpbHRvOnd3dy14bWwtc3R5bGVzaGVl dC1jb21tZW50c0B3My5vcmciPnd3dy14bWwtc3R5bGVzaGVldC1jb21tZW50c0B3 My5vcmc8L2E+Jmd0Oy4gVGhlIGFyY2hpdmUgb2YgcHVibGljCmNvbW1lbnRzIGlz IGF2YWlsYWJsZSBhdCA8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9BcmNoaXZl cy9QdWJsaWMvd3d3LXhtbC1zdHlsZXNoZWV0LWNvbW1lbnRzIj5odHRwOi8vdzMu b3JnL0FyY2hpdmVzL1B1YmxpYy93d3cteG1sLXN0eWxlc2hlZXQtY29tbWVudHM8 L2E+LjwvcD4KCjxwPkEgbGlzdCBvZiBjdXJyZW50IFczQyBSZWNvbW1lbmRhdGlv bnMgYW5kIG90aGVyIHRlY2huaWNhbCBkb2N1bWVudHMKY2FuIGJlIGZvdW5kIGF0 IDxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3JnL1RSIj5odHRwOi8vd3d3LnczLm9y Zy9UUjwvYT4uPC9wPgoKPHA+VGhlIFdvcmtpbmcgR3JvdXAgZXhwZWN0cyBhZGRp dGlvbmFsIG1lY2hhbmlzbXMgZm9yIGxpbmtpbmcgc3R5bGUKc2hlZXRzIHRvIFhN TCBkb2N1bWVudCB0byBiZSBkZWZpbmVkIGluIGEgZnV0dXJlIHNwZWNpZmljYXRp b24uPC9wPgoKPHA+VGhlIHVzZSBvZiBYTUwgcHJvY2Vzc2luZyBpbnN0cnVjdGlv bnMgaW4gdGhpcyBzcGVjaWZpY2F0aW9uIHNob3VsZApub3QgYmUgdGFrZW4gYXMg YSBwcmVjZWRlbnQuICBUaGUgVzNDIGRvZXMgbm90IGFudGljaXBhdGUgcmVjb21t ZW5kaW5nCnRoZSB1c2Ugb2YgcHJvY2Vzc2luZyBpbnN0cnVjdGlvbnMgaW4gYW55 IGZ1dHVyZSBzcGVjaWZpY2F0aW9uLiAgVGhlCjxhIGhyZWY9IiNyYXRpb25hbGUi PlJhdGlvbmFsZTwvYT4gZXhwbGFpbnMgd2h5IHRoZXkgd2VyZSB1c2VkIGluCnRo aXMgc3BlY2lmaWNhdGlvbi48L3A+Cgo8cD5UaGlzIGRvY3VtZW50IHdhcyBwcm9k dWNlZCBhcyBwYXJ0IG9mIHRoZSA8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9Y TUwvQWN0aXZpdHkiPlczQyBYTUwgQWN0aXZpdHk8L2E+LjwvcD4KCgo8aDI+Cjxh IG5hbWU9ImNvbnRlbnRzIj5UYWJsZSBvZiBjb250ZW50czwvYT4KPC9oMj4xIDxh IGhyZWY9IiNUaGUgeG1sLXN0eWxlc2hlZXQgcHJvY2Vzc2luZyBpbnN0cnVjdGlv biI+VGhlIHhtbC1zdHlsZXNoZWV0IHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb248L2E+ Cjxicj4KPGgzPkFwcGVuZGljZXM8L2gzPkEgPGEgaHJlZj0iI1JlZmVyZW5jZXMi PlJlZmVyZW5jZXM8L2E+Cjxicj5CIDxhIGhyZWY9IiNyYXRpb25hbGUiPlJhdGlv bmFsZTwvYT4KPGJyPgo8aHI+Cgo8aDI+CjxhIG5hbWU9IlRoZSB4bWwtc3R5bGVz aGVldCBwcm9jZXNzaW5nIGluc3RydWN0aW9uIj48L2E+MSBUaGUgPGNvZGU+eG1s LXN0eWxlc2hlZXQ8L2NvZGU+IHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb248L2gyPgoK PHA+U3R5bGUgU2hlZXRzIGNhbiBiZSBhc3NvY2lhdGVkIHdpdGggYW4gWE1MPGEg aHJlZj0iI1hNTCI+W1hNTDEwXTwvYT4KZG9jdW1lbnQgYnkgdXNpbmcgYSBwcm9j ZXNzaW5nIGluc3RydWN0aW9uIHdob3NlIHRhcmdldCBpcwo8Y29kZT54bWwtc3R5 bGVzaGVldDwvY29kZT4uICBUaGlzIHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb24gZm9s bG93cyB0aGUKYmVoYXZpb3VyIG9mIHRoZSBIVE1MIDQuMCA8Y29kZT4mbHQ7TElO SwpSRUw9InN0eWxlc2hlZXQiJmd0OzwvY29kZT48YSBocmVmPSIjSFRNTCI+W0hU TUw0MF08L2E+LjwvcD4KCjxwPlRoZSA8Y29kZT54bWwtc3R5bGVzaGVldDwvY29k ZT4gcHJvY2Vzc2luZyBpbnN0cnVjdGlvbiBpcyBwYXJzZWQgaW4KdGhlIHNhbWUg d2F5IGFzIGEgc3RhcnQtdGFnLCB3aXRoIHRoZSBleGNlcHRpb24gdGhhdCBlbnRp dGllcyBvdGhlcgp0aGFuIHByZWRlZmluZWQgZW50aXRpZXMgbXVzdCBub3QgYmUg cmVmZXJlbmNlZC48L3A+Cgo8cD5UaGUgZm9sbG93aW5nIGdyYW1tYXIgaXMgZ2l2 ZW4gdXNpbmcgdGhlIHNhbWUgbm90YXRpb24gYXMgdGhlCmdyYW1tYXIgaW4gdGhl IFhNTCBSZWNvbW1lbmRhdGlvbjxhIGhyZWY9IiNYTUwiPltYTUwxMF08L2E+LiAg U3ltYm9scyBpbiB0aGUKZ3JhbW1hciB0aGF0IGFyZSBub3QgZGVmaW5lZCBoZXJl IGFyZSBkZWZpbmVkIGluIHRoZSBYTUwKUmVjb21tZW5kYXRpb24uPC9wPgoKPGg1 PnhtbC1zdHlsZXNoZWV0IHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb248L2g1Pgo8dGFi bGUgY2xhc3M9InNjcmFwIj4KPHRib2R5Pgo8dHIgdmFsaWduPSJiYXNlbGluZSI+ Cjx0ZD4KPGEgbmFtZT0iTlQtU3R5bGVTaGVldFBJIj48L2E+WzFdJm5ic3A7Jm5i c3A7Jm5ic3A7PC90ZD4KPHRkPlN0eWxlU2hlZXRQSTwvdGQ+Cjx0ZD4mbmJzcDsm bmJzcDsmbmJzcDs6Oj0mbmJzcDsmbmJzcDsmbmJzcDs8L3RkPgo8dGQ+JyZsdDs/ eG1sLXN0eWxlc2hlZXQnICg8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9UUi9S RUMteG1sI05ULVMiPlM8L2E+IDxhIGhyZWY9IiNOVC1Qc2V1ZG9BdHQiPlBzZXVk b0F0dDwvYT4pKiA8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9UUi9SRUMteG1s I05ULVMiPlM8L2E+PyAnPyZndDsnPC90ZD4KPHRkPgo8L3RkPgo8L3RyPgo8dHIg dmFsaWduPSJiYXNlbGluZSI+Cjx0ZD4KPGEgbmFtZT0iTlQtUHNldWRvQXR0Ij48 L2E+WzJdJm5ic3A7Jm5ic3A7Jm5ic3A7PC90ZD4KPHRkPlBzZXVkb0F0dDwvdGQ+ Cjx0ZD4mbmJzcDsmbmJzcDsmbmJzcDs6Oj0mbmJzcDsmbmJzcDsmbmJzcDs8L3Rk Pgo8dGQ+CjxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3JnL1RSL1JFQy14bWwjTlQt TmFtZSI+TmFtZTwvYT4gPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcvVFIvUkVD LXhtbCNOVC1TIj5TPC9hPj8gJz0nIDxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3Jn L1RSL1JFQy14bWwjTlQtUyI+UzwvYT4/IDxhIGhyZWY9IiNOVC1Qc2V1ZG9BdHRW YWx1ZSI+UHNldWRvQXR0VmFsdWU8L2E+CjwvdGQ+Cjx0ZD4KPC90ZD4KPC90cj4K PHRyIHZhbGlnbj0iYmFzZWxpbmUiPgo8dGQ+CjxhIG5hbWU9Ik5ULVBzZXVkb0F0 dFZhbHVlIj48L2E+WzNdJm5ic3A7Jm5ic3A7Jm5ic3A7PC90ZD4KPHRkPlBzZXVk b0F0dFZhbHVlPC90ZD4KPHRkPiZuYnNwOyZuYnNwOyZuYnNwOzo6PSZuYnNwOyZu YnNwOyZuYnNwOzwvdGQ+Cjx0ZD4oJyInIChbXiImbHQ7JmFtcDtdIHwgPGEgaHJl Zj0iaHR0cDovL3d3dy53My5vcmcvVFIvUkVDLXhtbCNOVC1DaGFyUmVmIj5DaGFy UmVmPC9hPiB8IDxhIGhyZWY9IiNOVC1QcmVkZWZFbnRpdHlSZWYiPlByZWRlZkVu dGl0eVJlZjwvYT4pKiAnIic8L3RkPgo8dGQ+CjwvdGQ+CjwvdHI+Cjx0ciB2YWxp Z249ImJhc2VsaW5lIj4KPHRkPgo8L3RkPgo8dGQ+CjwvdGQ+Cjx0ZD4KPC90ZD4K PHRkPnwgIiciIChbXicmbHQ7JmFtcDtdIHwgPGEgaHJlZj0iaHR0cDovL3d3dy53 My5vcmcvVFIvUkVDLXhtbCNOVC1DaGFyUmVmIj5DaGFyUmVmPC9hPiB8IDxhIGhy ZWY9IiNOVC1QcmVkZWZFbnRpdHlSZWYiPlByZWRlZkVudGl0eVJlZjwvYT4pKiAi JyIpPC90ZD4KPHRkPgo8L3RkPgo8L3RyPgo8dHIgdmFsaWduPSJiYXNlbGluZSI+ Cjx0ZD4KPC90ZD4KPHRkPgo8L3RkPgo8dGQ+CjwvdGQ+Cjx0ZD4tICg8YSBocmVm PSJodHRwOi8vd3d3LnczLm9yZy9UUi9SRUMteG1sI05ULUNoYXIiPkNoYXI8L2E+ KiAnPyZndDsnIDxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3JnL1RSL1JFQy14bWwj TlQtQ2hhciI+Q2hhcjwvYT4qKTwvdGQ+Cjx0ZD4KPC90ZD4KPC90cj4KPHRyIHZh bGlnbj0iYmFzZWxpbmUiPgo8dGQ+CjxhIG5hbWU9Ik5ULVByZWRlZkVudGl0eVJl ZiI+PC9hPls0XSZuYnNwOyZuYnNwOyZuYnNwOzwvdGQ+Cjx0ZD5QcmVkZWZFbnRp dHlSZWY8L3RkPgo8dGQ+Jm5ic3A7Jm5ic3A7Jm5ic3A7Ojo9Jm5ic3A7Jm5ic3A7 Jm5ic3A7PC90ZD4KPHRkPicmYW1wO2FtcDsnIHwgJyZhbXA7bHQ7JyB8ICcmYW1w O2d0OycgfCAnJmFtcDtxdW90OycgfCAnJmFtcDthcG9zOyc8L3RkPgo8dGQ+Cjwv dGQ+CjwvdHI+CjwvdGJvZHk+CjwvdGFibGU+Cgo8cD5JbiA8YSBocmVmPSIjTlQt UHNldWRvQXR0VmFsdWUiPlBzZXVkb0F0dFZhbHVlPC9hPiwgYSA8YSBocmVmPSJo dHRwOi8vd3d3LnczLm9yZy9UUi9SRUMteG1sI05ULUNoYXJSZWYiPkNoYXJSZWY8 L2E+IG9yIGEgPGEgaHJlZj0iI05ULVByZWRlZkVudGl0eVJlZiI+UHJlZGVmRW50 aXR5UmVmPC9hPiBpcyBpbnRlcnByZXRlZCBpbiB0aGUKc2FtZSBtYW5uZXIgYXMg aW4gYSBub3JtYWwgWE1MIGF0dHJpYnV0ZSB2YWx1ZS4gIFRoZSBhY3R1YWwgdmFs dWUgb2YKdGhlIHBzZXVkby1hdHRyaWJ1dGUgaXMgdGhlIHZhbHVlIGFmdGVyIGVh Y2ggcmVmZXJlbmNlIGlzIHJlcGxhY2VkIGJ5CnRoZSBjaGFyYWN0ZXIgaXQgcmVm ZXJlbmNlcy4gIFRoaXMgcmVwbGFjZW1lbnQgaXMgbm90IHBlcmZvcm1lZAphdXRv bWF0aWNhbGx5IGJ5IGFuIFhNTCBwcm9jZXNzb3IuPC9wPgoKPHA+VGhlIDxjb2Rl PnhtbC1zdHlsZXNoZWV0PC9jb2RlPiBwcm9jZXNzaW5nIGluc3RydWN0aW9uIGlz IGFsbG93ZWQKb25seSBpbiB0aGUgcHJvbG9nIG9mIGFuIFhNTCBkb2N1bWVudC4g VGhlIHN5bnRheCBvZiBYTUwgY29uc3RyYWlucwp3aGVyZSBwcm9jZXNzaW5nIGlu c3RydWN0aW9ucyBhcmUgYWxsb3dlZCBpbiB0aGUgcHJvbG9nOyB0aGUKPGNvZGU+ eG1sLXN0eWxlc2hlZXQ8L2NvZGU+IHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb24gaXMg YWxsb3dlZCBhbnl3aGVyZQppbiB0aGUgcHJvbG9nIHRoYXQgbWVldHMgdGhlc2Ug Y29uc3RyYWludHMuPC9wPgoKPGJsb2NrcXVvdGU+CjxiPk5PVEU6IDwvYj5JZiB0 aGUgPGNvZGU+eG1sLXN0eWxlc2hlZXQ8L2NvZGU+IHByb2Nlc3NpbmcgaW5zdHJ1 Y3Rpb24Kb2NjdXJzIGluIHRoZSBleHRlcm5hbCBEVEQgc3Vic2V0IG9yIGluIGEg cGFyYW1ldGVyIGVudGl0eSwgaXQgaXMKcG9zc2libGUgdGhhdCBpdCBtYXkgbm90 IGJlIHByb2Nlc3NlZCBieSBhIG5vbi12YWxpZGF0aW5nIFhNTApwcm9jZXNzb3Ig KHNlZSA8YSBocmVmPSIjWE1MIj5bWE1MMTBdPC9hPikuPC9ibG9ja3F1b3RlPgoK PHA+VGhlIGZvbGxvd2luZyBwc2V1ZG8gYXR0cmlidXRlcyBhcmUgZGVmaW5lZDwv cD4KCjxwcmU+aHJlZiBDREFUQSAjUkVRVUlSRUQKdHlwZSBDREFUQSAjUkVRVUlS RUQKdGl0bGUgQ0RBVEEgI0lNUExJRUQKbWVkaWEgQ0RBVEEgI0lNUExJRUQKY2hh cnNldCBDREFUQSAjSU1QTElFRAphbHRlcm5hdGUgKHllc3xubykgIm5vIjwvcHJl PgoKPHA+VGhlIHNlbWFudGljcyBvZiB0aGUgcHNldWRvLWF0dHJpYnV0ZXMgYXJl IGV4YWN0bHkgYXMgd2l0aAo8Y29kZT4mbHQ7TElOSyBSRUw9InN0eWxlc2hlZXQi Jmd0OzwvY29kZT4gaW4gSFRNTCA0LjAsIHdpdGggdGhlCmV4Y2VwdGlvbiBvZiB0 aGUgPGNvZGU+YWx0ZXJuYXRlPC9jb2RlPiBwc2V1ZG8tYXR0cmlidXRlLiAgSWYK PGNvZGU+YWx0ZXJuYXRlPSJ5ZXMiPC9jb2RlPiBpcyBzcGVjaWZpZWQsIHRoZW4g dGhlIHByb2Nlc3NpbmcKaW5zdHJ1Y3Rpb24gaGFzIHRoZSBzZW1hbnRpY3Mgb2Yg PGNvZGU+Jmx0O0xJTksgUkVMPSJhbHRlcm5hdGUKc3R5bGVzaGVldCImZ3Q7PC9j b2RlPiBpbnN0ZWFkIG9mIDxjb2RlPiZsdDtMSU5LClJFTD0ic3R5bGVzaGVldCIm Z3Q7PC9jb2RlPi48L3A+Cgo8YmxvY2txdW90ZT4KPGI+Tk9URTogPC9iPlNpbmNl IHRoZSB2YWx1ZSBvZiB0aGUgPGNvZGU+aHJlZjwvY29kZT4gYXR0cmlidXRlIGlz IGEgVVJJCnJlZmVyZW5jZSwgaXQgbWF5IGJlIGEgcmVsYXRpdmUgVVJJIGFuZCBp dCBtYXkgY29udGFpbiBhIGZyYWdtZW50CmlkZW50aWZpZXIuIEluIHBhcnRpY3Vs YXIgdGhlIFVSSSByZWZlcmVuY2UgbWF5IGNvbnRhaW4gb25seSBhCmZyYWdtZW50 IGlkZW50aWZpZXIuICBTdWNoIGEgVVJJIHJlZmVyZW5jZSBpcyBhIHJlZmVyZW5j ZSB0byBhIHBhcnQgb2YKdGhlIGRvY3VtZW50IGNvbnRhaW5pbmcgdGhlIDxjb2Rl PnhtbC1zdHlsZXNoZWV0PC9jb2RlPiBwcm9jZXNzaW5nCmluc3RydWN0aW9uIChz ZWUgPGEgaHJlZj0iI1JGQzIzOTYiPltSRkMyMzk2XTwvYT4pLiBUaGUgY29uc2Vx dWVuY2UgaXMgdGhhdCB0aGUKPGNvZGU+eG1sLXN0eWxlc2hlZXQ8L2NvZGU+IHBy b2Nlc3NpbmcgaW5zdHJ1Y3Rpb24gYWxsb3dzIHN0eWxlIHNoZWV0cwp0byBiZSBl bWJlZGRlZCBpbiB0aGUgc2FtZSBkb2N1bWVudCBhcyB0aGUgPGNvZGU+eG1sLXN0 eWxlc2hlZXQ8L2NvZGU+CnByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb24uPC9ibG9ja3F1 b3RlPgoKPHA+SW4gc29tZSBjYXNlcywgc3R5bGUgc2hlZXRzIG1heSBiZSBsaW5r ZWQgd2l0aCBhbiBYTUwgZG9jdW1lbnQgYnkKbWVhbnMgZXh0ZXJuYWwgdG8gdGhl IGRvY3VtZW50LiBGb3IgZXhhbXBsZSwgZWFybGllciB2ZXJzaW9ucyBvZiBIVFRQ CjxhIGhyZWY9IiNSRkMyMDY4Ij5bUkZDMjA2OF08L2E+IChzZWN0aW9uIDE5LjYu Mi40KSBhbGxvd2VkIHN0eWxlIHNoZWV0cyB0byBiZQphc3NvY2lhdGVkIHdpdGgg WE1MIGRvY3VtZW50cyBieSBtZWFucyBvZiB0aGUgPGNvZGU+TGluazwvY29kZT4K aGVhZGVyLiAgQW55IGxpbmtzIHRvIHN0eWxlIHNoZWV0cyB0aGF0IGFyZSBzcGVj aWZpZWQgZXh0ZXJuYWxseSB0byB0aGUKZG9jdW1lbnQgYXJlIGNvbnNpZGVyZWQg dG8gb2NjdXIgYmVmb3JlIHRoZSBsaW5rcyBzcGVjaWZpZWQgYnkgdGhlCjxjb2Rl PnhtbC1zdHlsZXNoZWV0PC9jb2RlPiBwcm9jZXNzaW5nIGluc3RydWN0aW9ucy4g IFRoaXMgaXMgdGhlIHNhbWUKYXMgaW4gSFRNTCA0LjAgKHNlZSA8YSBocmVmPSJo dHRwOi8vd3d3LnczLm9yZy9UUi9SRUMtaHRtbDQwL3ByZXNlbnQvc3R5bGVzLmh0 bWwjaC0xNC42Ij5zZWN0aW9uCjE0LjY8L2E+KS48L3A+Cgo8cD5IZXJlIGFyZSBz b21lIGV4YW1wbGVzIGZyb20gSFRNTCA0LjAgd2l0aCB0aGUgY29ycmVzcG9uZGlu Zwpwcm9jZXNzaW5nIGluc3RydWN0aW9uOjwvcD4KCjxwcmU+Jmx0O0xJTksgaHJl Zj0ibXlzdHlsZS5jc3MiIHJlbD0ic3R5bGUgc2hlZXQiIHR5cGU9InRleHQvY3Nz IiZndDsKJmx0Oz94bWwtc3R5bGVzaGVldCBocmVmPSJteXN0eWxlLmNzcyIgdHlw ZT0idGV4dC9jc3MiPyZndDsKCiZsdDtMSU5LIGhyZWY9Im15c3R5bGUuY3NzIiB0 aXRsZT0iQ29tcGFjdCIgcmVsPSJzdHlsZXNoZWV0Igp0eXBlPSJ0ZXh0L2NzcyIm Z3Q7CiZsdDs/eG1sLXN0eWxlc2hlZXQgaHJlZj0ibXlzdHlsZS5jc3MiIHRpdGxl PSJDb21wYWN0IiB0eXBlPSJ0ZXh0L2NzcyI/Jmd0OwoKJmx0O0xJTksgaHJlZj0i bXlzdHlsZS5jc3MiIHRpdGxlPSJNZWRpdW0iIHJlbD0iYWx0ZXJuYXRlIHN0eWxl c2hlZXQiCnR5cGU9InRleHQvY3NzIiZndDsKJmx0Oz94bWwtc3R5bGVzaGVldCBh bHRlcm5hdGU9InllcyIgaHJlZj0ibXlzdHlsZS5jc3MiIHRpdGxlPSJNZWRpdW0i CnR5cGU9InRleHQvY3NzIj8mZ3Q7PC9wcmU+Cgo8cD5NdWx0aXBsZSA8Y29kZT54 bWwtc3R5bGVzaGVldDwvY29kZT4gcHJvY2Vzc2luZyBpbnN0cnVjdGlvbnMgYXJl CmFsc28gYWxsb3dlZCB3aXRoIGV4YWN0bHkgdGhlIHNhbWUgc2VtYW50aWNzIGFz IHdpdGggPGNvZGU+TElOSwpSRUw9InN0eWxlc2hlZXQiPC9jb2RlPi4gRm9yIGV4 YW1wbGUsPC9wPgoKPHByZT4mbHQ7TElOSyByZWw9ImFsdGVybmF0ZSBzdHlsZXNo ZWV0IiB0aXRsZT0iY29tcGFjdCIgaHJlZj0ic21hbGwtYmFzZS5jc3MiCnR5cGU9 InRleHQvY3NzIiZndDsKJmx0O0xJTksgcmVsPSJhbHRlcm5hdGUgc3R5bGVzaGVl dCIgdGl0bGU9ImNvbXBhY3QiIGhyZWY9InNtYWxsLWV4dHJhcy5jc3MiCnR5cGU9 InRleHQvY3NzIiZndDsKJmx0O0xJTksgcmVsPSJhbHRlcm5hdGUgc3R5bGVzaGVl dCIgdGl0bGU9ImJpZyBwcmludCIgaHJlZj0iYmlncHJpbnQuY3NzIgp0eXBlPSJ0 ZXh0L2NzcyImZ3Q7CiZsdDtMSU5LIHJlbD0ic3R5bGVzaGVldCIgaHJlZj0iY29t bW9uLmNzcyIgdHlwZT0idGV4dC9jc3MiJmd0OzwvcHJlPgoKPHA+d291bGQgYmUg ZXF1aXZhbGVudCB0bzo8L3A+Cgo8cHJlPiZsdDs/eG1sLXN0eWxlc2hlZXQgYWx0 ZXJuYXRlPSJ5ZXMiIHRpdGxlPSJjb21wYWN0IiBocmVmPSJzbWFsbC1iYXNlLmNz cyIKdHlwZT0idGV4dC9jc3MiPyZndDsKJmx0Oz94bWwtc3R5bGVzaGVldCBhbHRl cm5hdGU9InllcyIgdGl0bGU9ImNvbXBhY3QiIGhyZWY9InNtYWxsLWV4dHJhcy5j c3MiCnR5cGU9InRleHQvY3NzIj8mZ3Q7CiZsdDs/eG1sLXN0eWxlc2hlZXQgYWx0 ZXJuYXRlPSJ5ZXMiIHRpdGxlPSJiaWcgcHJpbnQiIGhyZWY9ImJpZ3ByaW50LmNz cyIKdHlwZT0idGV4dC9jc3MiPyZndDsKJmx0Oz94bWwtc3R5bGVzaGVldCBocmVm PSJjb21tb24uY3NzIiB0eXBlPSJ0ZXh0L2NzcyI/Jmd0OzwvcHJlPgoKCgo8aHIg dGl0bGU9IlNlcGFyYXRvciBmcm9tIGZvb3RlciI+Cgo8aDI+CjxhIG5hbWU9IlJl ZmVyZW5jZXMiPjwvYT5BIFJlZmVyZW5jZXM8L2gyPgoKPGRsPgoKPGR0Pgo8YSBu YW1lPSJIVE1MIj5IVE1MNDA8L2E+CjwvZHQ+CjxkZD5Xb3JsZCBXaWRlIFdlYgpD b25zb3J0aXVtLiA8aT5IVE1MIDQuMCBTcGVjaWZpY2F0aW9uLjwvaT4gVzNDIFJl Y29tbWVuZGF0aW9uLiBTZWUKPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcvVFIv UkVDLWh0bWw0MCI+aHR0cDovL3d3dy53My5vcmcvVFIvUkVDLWh0bWw0MDwvYT4K PC9kZD4KCjxkdD4KPGEgbmFtZT0iUkZDMjA2OCI+UkZDMjA2ODwvYT4KPC9kdD4K PGRkPlIuIEZpZWxkaW5nLCBKLiBHZXR0eXMsIEouIE1vZ3VsLApILiBGcnlzdHlr IE5pZWxzZW4sIGFuZCBULiBCZXJuZXJzLUxlZS4gIDxpPkh5cGVydGV4dCBUcmFu c2ZlcgpQcm90b2NvbCAtLSBIVFRQLzEuMS48L2k+LiBJRVRGIFJGQyAyMDY4LiBT ZWUgPGEgaHJlZj0iaHR0cDovL3d3dy5pZXRmLm9yZy9yZmMvcmZjMjA2OC50eHQi Pmh0dHA6Ly93d3cuaWV0Zi5vcmcvcmZjL3JmYzIwNjgudHh0PC9hPi48L2RkPgoK PGR0Pgo8YSBuYW1lPSJSRkMyMzk2Ij5SRkMyMzk2PC9hPgo8L2R0Pgo8ZGQ+VC4g QmVybmVycy1MZWUsIFIuIEZpZWxkaW5nLCBhbmQKTC4gTWFzaW50ZXIuICA8aT5V bmlmb3JtIFJlc291cmNlIElkZW50aWZpZXJzIChVUkkpOiBHZW5lcmljClN5bnRh eDwvaT4uIElFVEYgUkZDIDIzOTYuIFNlZSA8YSBocmVmPSJodHRwOi8vd3d3Lmll dGYub3JnL3JmYy9yZmMyMzk2LnR4dCI+aHR0cDovL3d3dy5pZXRmLm9yZy9yZmMv cmZjMjM5Ni50eHQ8L2E+LjwvZGQ+Cgo8ZHQ+CjxhIG5hbWU9IlhNTCI+WE1MMTA8 L2E+CjwvZHQ+CjxkZD5Xb3JsZCBXaWRlIFdlYiBDb25zb3J0aXVtLiA8aT5FeHRl bnNpYmxlCk1hcmt1cCBMYW5ndWFnZSAoWE1MKSAxLjAuPC9pPiBXM0MgUmVjb21t ZW5kYXRpb24uIFNlZSA8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9UUi8xOTk4 L1JFQy14bWwtMTk5ODAyMTAiPmh0dHA6Ly93d3cudzMub3JnL1RSLzE5OTgvUkVD LXhtbC0xOTk4MDIxMDwvYT4KPC9kZD4KCjwvZGw+CgoKCgo8aDI+CjxhIG5hbWU9 InJhdGlvbmFsZSI+PC9hPkIgUmF0aW9uYWxlPC9oMj4KCjxwPlRoZXJlIHdhcyBh biB1cmdlbnQgcmVxdWlyZW1lbnQgZm9yIGEgc3BlY2lmaWNhdGlvbiBmb3Igc3R5 bGUgc2hlZXQKbGlua2luZyB0aGF0IGNvdWxkIGJlIGNvbXBsZXRlZCBpbiB0aW1l IGZvciB0aGUgbmV4dCByZWxlYXNlIGZyb20KbWFqb3IgYnJvd3NlciB2ZW5kb3Jz LiAgT25seSBieSBjaG9vc2luZyBhIHNpbXBsZSBtZWNoYW5pc20gY2xvc2VseQpi YXNlZCBvbiBhIHByb3ZlbiBleGlzdGluZyBtZWNoYW5pc20gY291bGQgdGhlIHNw ZWNpZmljYXRpb24gYmUKY29tcGxldGVkIGluIHRpbWUgdG8gbWVldCB0aGlzIHJl cXVpcmVtZW50LjwvcD4KCjxwPlVzZSBvZiBhIHByb2Nlc3NpbmcgaW5zdHJ1Y3Rp b24gYXZvaWRzIHBvbGx1dGluZyB0aGUgbWFpbiBkb2N1bWVudApzdHJ1Y3R1cmUg d2l0aCBhcHBsaWNhdGlvbiBzcGVjaWZpYyBwcm9jZXNzaW5nIGluZm9ybWF0aW9u LjwvcD4KCjxwPlRoZSBtZWNoYW5pc20gY2hvc2VuIGZvciB0aGlzIHZlcnNpb24g b2YgdGhlIHNwZWNpZmljYXRpb24gaXMgbm90IGEKY29uc3RyYWludCBvbiB0aGUg YWRkaXRpb25hbCBtZWNoYW5pc21zIHBsYW5uZWQgZm9yIGZ1dHVyZSB2ZXJzaW9u cy4KVGhlcmUgaXMgbm8gZXhwZWN0YXRpb24gdGhhdCB0aGVzZSB3aWxsIHVzZSBw cm9jZXNzaW5nIGluc3RydWN0aW9uczsKaW5kZWVkIHRoZXkgbWF5IG5vdCBpbmNs dWRlIHRoZSBsaW5raW5nIGluZm9ybWF0aW9uIGluIHRoZSBzb3VyY2UKZG9jdW1l bnQuPC9wPgoKCgoKPC9ib2R5Pgo8L2h0bWw+Cg== libxml-security-java-1.5.6/src/test/resources/javax/xml/crypto/dsig/input.xml0000644000175000017500000000053110665061266026171 0ustar tonytony ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/javax/xml/crypto/dsig/signature-enveloping-rsa-template.xmllibxml-security-java-1.5.6/src/test/resources/javax/xml/crypto/dsig/signature-enveloping-rsa-templat0000644000175000017500000000115411606613576032634 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/javax/xml/crypto/dsig/xmldsig-xfilter2.xml0000644000175000017500000000431111706027662030235 0ustar tonytony //FooBar //NotToBeSigned //ReallyToBeSigned 6S7pEM13ZCDvVUbP9XB8iRWFbAI= / 2jmj7l5rSw0yVb/vlWAYkK/YBwk=cJBwfPGWSI9CiuFinTvWJLbF8bGVK5SRB/N/NjCM5IMxakBjra+KSg==

/X9TgR11EilS30qcLuzk5/YRt1I870QAwx4/gLZRJmlFXUAiUftZPY1Y+r/F9bow9subVWzXgTuA HTRv8mZgt2uZUKWkn5/oBHsQIsJPu6nX/rfGG/g7V+fGqKYVDwT7g/bTxR7DAjVUE1oWkTL2dfOu K2HXKu/yIgMZndFIAcc=

l2BQjxUjC8yykrmCouuEC/BYHPU=9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJFnEj6EwoFhO3 zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImog9/hWuWfBpKL Zl6Ae1UlZAFMO/7PSSo=5LRac3QkDCDOPaeNF5dJQ2r0hgIWZomZV7Z9pHrRqMoepJD5xnJpJY7aA4eUSS+AHS1qOm5I6VTZ 68hsOdPZCDFF/DiR38BzTxi4ZD0PhtmOjBh32lSNG1nhEq6e9RsyzhUw5FVYHAPnCx2bX4/8Rz8i EMuG0IcCiAbbzsCfGBw=
libxml-security-java-1.5.6/src/test/resources/javax/xml/crypto/dsig/demo.signed.xml0000644000175000017500000002133511261215276027226 0ustar tonytony c+pz2qmMzCAsjhymWYT8kD8TSVI= u5Vehsz4VRNX+0DifiWlB2Eh5ZsPb4CRksNTLhOifIH4oFOaAriCdlJVDG+cDq2P q83LhgmDutzYXUxqVwB/XNSYLVQSkwFUgu2NYo/0hsF2TI4vsM5Az4JSDUKF+0ad qXxj+Jz04zj4p902pE43KpigoJ1WvqBaD2jLAX0HZOjVcJGRZJeQDI/BsYZ0lf6e qk1SLB0XQ6rZA1O1uhSad77vdC4P0CY0w7DMf6HZbpj5SvxK7iu9ePIcYQwflSGg dmunfZ75Ue2xv9VhuuJMffcwqr+Kh0gdCMsDnKzD3pK7ZQfh5K3+6PhlMdhBh63j l7epO9AitUCgRvM44uccKA== signing.example.orgCN=signing.example.orgMIIDADCCAeigAwIBAgIJAO01RvCjIOi+MA0GCSqGSIb3DQEBBQUAMB4xHDAaBgNV BAMTE3NpZ25pbmcuZXhhbXBsZS5vcmcwHhcNMDkwODI4MTYzMTEyWhcNMTkwODI2 MTYzMTEyWjAeMRwwGgYDVQQDExNzaWduaW5nLmV4YW1wbGUub3JnMIIBIjANBgkq hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu6vsEoTbNJoi75fA3WwE5XkDMVA7cQgs aD3em3dfYoGUMRHJbftThhiUo1fhmjVGDVvG/Yb/De9e0ncQ1q/qa7/EJGkQqbuY 34VmsrLKbjAaPMSDbyjMVnNjC16fbyfVFRLHERqHsfZVf47I/N9WF7+RvTCp8nhO b1iKm3/XuAdxfofnNqyPujgYKGlF0ABQRE/UXSaspoR7GU20Mf2j3aQ0HLhFXK+j Fq/Q9qKL3x+2tesPFCVdYxtYxFnLQMCq3nSIUKfni3J/fm4TsjcwAs/ogr+zbQeH 72uSMZZcUMCoHcM4VcKyvqi9xzxRf/NlrHTLN3PRUT+7wTm3ucn+5wIDAQABo0Ew PzAeBgNVHREEFzAVghNzaWduaW5nLmV4YW1wbGUub3JnMB0GA1UdDgQWBBR4Nt/W PutiGteCwcKvMDDbXGZoAjANBgkqhkiG9w0BAQUFAAOCAQEAACOpFL5P6XnqiiOQ 9jibQ07dbOjVRaMoQpERs8X30JennVOiuEDAMMYv6rnx/tsc3ecNDiImdFMF/pgH nzrU3E+ErgyGoiGOpyE+LrqFw6DRyzxloHqp8YqILA2p7Mdhsad7tMuJZViVpxG+ UK+sLRkfnPc5nAqUW4mZy9xnNcxdt5qqE7EoJVJYKGDm5DmxtEgDmU9sTb4jcGtr NAEg1aEQKCGgPm0eJ2HxklXC1s+04Vo5H/ARchSBxHq+yLVJrQvfEMNyke0Za1Jo I7wO/7g5YyoH2QzsMQA/6Q3WCcZj54si0m1ZHDXqzRr9knrxA8quDECWZ0+MS7RL IrVtRQ== example.org MIIC6DCCAdCgAwIBAgIJANA7/GSykN0DMA0GCSqGSIb3DQEBBQUAMBYxFDASBgNV BAMTC2V4YW1wbGUub3JnMB4XDTA5MDgyODE2Mjc1NFoXDTE5MDgyNjE2Mjc1NFow FjEUMBIGA1UEAxMLZXhhbXBsZS5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw ggEKAoIBAQC33b4heR6ZO/ig8k+4ein0ql2hs8cPX0iC8GcwM5ewRKc7cWLrmhng QKjXZ7qUSPq2kzi3rlHMk0NnFZixhQrhjgEw2rMSfln8Bq2o06xJCUuxidLqypIn sAIQIyQGDTHZseT6aElqDlBB9vauvJ3bdCDaL3Eu9qByCclYWaLjjRzv1tv3PMNe +xlYvoAcVIAxYzSPBtsKlfx5nn9hH/lFXP/LMz7yiBnfl+jvd/swEySZxATAJwb5 4o0cG76FMJrN2dWH/ad/A0VoAePYNvKY7s4mOfKG/E+2e1h+aYmDwxZedsUXTGex KnhpK3fngNGOFEWEzULh+OORMQ0PbDFFAgMBAAGjOTA3MBYGA1UdEQQPMA2CC2V4 YW1wbGUub3JnMB0GA1UdDgQWBBSaK2Coq3Gpp2cC4QcpsGrLuq4qKzANBgkqhkiG 9w0BAQUFAAOCAQEAgZjD8nlcnb3sG9FquesN1tSKdN3tI/b9Rs84JUEqlxnX0KHo HyxpFcAB6cdFfnAmc6c0wSgZnXYW+jiQdmXHQGHh6GERmZa38swLM8Q/fnrxq6hQ Jzxx1pNWZgUDLyM5DeXbIYdcyHYzjaiyMYX7ayrj7WM9dujEZHHwQZ8X/NVDmOl9 kYV14gpCrlu8jaQHa/mTlqr7Cbz6II49YM5XlNTbgdphx2ONz+P84NI21kf+BAJG nHBGqysSXQ9UrKJ1UHhYbVQgY/SJMgG+FIG8zMjQwBigETCKyL58aSANeGFcdCg4 1q247ZautYYNb6z8bSmREK6GiWHMxePVXWykYQ== urn:mace:shibboleth:1.0:nameIdentifier urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified urn:oasis:names:tc:SAML:2.0:nameid-format:transient example.org MIIC6DCCAdCgAwIBAgIJANA7/GSykN0DMA0GCSqGSIb3DQEBBQUAMBYxFDASBgNV BAMTC2V4YW1wbGUub3JnMB4XDTA5MDgyODE2Mjc1NFoXDTE5MDgyNjE2Mjc1NFow FjEUMBIGA1UEAxMLZXhhbXBsZS5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw ggEKAoIBAQC33b4heR6ZO/ig8k+4ein0ql2hs8cPX0iC8GcwM5ewRKc7cWLrmhng QKjXZ7qUSPq2kzi3rlHMk0NnFZixhQrhjgEw2rMSfln8Bq2o06xJCUuxidLqypIn sAIQIyQGDTHZseT6aElqDlBB9vauvJ3bdCDaL3Eu9qByCclYWaLjjRzv1tv3PMNe +xlYvoAcVIAxYzSPBtsKlfx5nn9hH/lFXP/LMz7yiBnfl+jvd/swEySZxATAJwb5 4o0cG76FMJrN2dWH/ad/A0VoAePYNvKY7s4mOfKG/E+2e1h+aYmDwxZedsUXTGex KnhpK3fngNGOFEWEzULh+OORMQ0PbDFFAgMBAAGjOTA3MBYGA1UdEQQPMA2CC2V4 YW1wbGUub3JnMB0GA1UdDgQWBBSaK2Coq3Gpp2cC4QcpsGrLuq4qKzANBgkqhkiG 9w0BAQUFAAOCAQEAgZjD8nlcnb3sG9FquesN1tSKdN3tI/b9Rs84JUEqlxnX0KHo HyxpFcAB6cdFfnAmc6c0wSgZnXYW+jiQdmXHQGHh6GERmZa38swLM8Q/fnrxq6hQ Jzxx1pNWZgUDLyM5DeXbIYdcyHYzjaiyMYX7ayrj7WM9dujEZHHwQZ8X/NVDmOl9 kYV14gpCrlu8jaQHa/mTlqr7Cbz6II49YM5XlNTbgdphx2ONz+P84NI21kf+BAJG nHBGqysSXQ9UrKJ1UHhYbVQgY/SJMgG+FIG8zMjQwBigETCKyL58aSANeGFcdCg4 1q247ZautYYNb6z8bSmREK6GiWHMxePVXWykYQ== urn:mace:shibboleth:1.0:nameIdentifier urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified urn:oasis:names:tc:SAML:2.0:nameid-format:transient Example University Foo Example University http://www.example.org/ Webmaster webmaster@example.org ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/javax/xml/crypto/dsig/signature-enveloping-hmac-sha1-trunclen-0-attack.xmllibxml-security-java-1.5.6/src/test/resources/javax/xml/crypto/dsig/signature-enveloping-hmac-sha1-t0000644000175000017500000000120411227151702032365 0ustar tonytony 0 nz4GS0NbH2SrWlD/4fX313CoTzc= some other text ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/javax/xml/crypto/dsig/signature-external-c14n-xmlatrs.xmllibxml-security-java-1.5.6/src/test/resources/javax/xml/crypto/dsig/signature-external-c14n-xmlatrs.0000644000175000017500000000136710665061266032375 0ustar tonytonyancestor-or-self::ietf:e1g4Ga1O61Qi7COEtUf18jgiJoGBE=nOAJfnYWrPNrxt0oog39AGwa2+M=libxml-security-java-1.5.6/src/test/resources/javax/xml/crypto/dsig/xml-stylesheet0000644000175000017500000003151411466001731027216 0ustar tonytony Associating Style Sheets with XML documents
W3C

Associating Style Sheets with XML documents
Version 1.0

W3C Recommendation 29 June 1999

This version:
http://www.w3.org/1999/06/REC-xml-stylesheet-19990629
Latest version:
http://www.w3.org/TR/xml-stylesheet
Previous version:
http://www.w3.org/TR/1999/xml-stylesheet-19990428
Editor:
James Clark <jjc@jclark.com>

Abstract

This document allows a style sheet to be associated with an XML document by including one or more processing instructions with a target of xml-stylesheet in the document's prolog.

Status of this document

This document has been reviewed by W3C Members and other interested parties and has been endorsed by the Director as a W3C Recommendation. It is a stable document and may be used as reference material or cited as a normative reference from other documents. W3C's role in making the Recommendation is to draw attention to the specification and to promote its widespread deployment. This enhances the functionality and interoperability of the Web.

The list of known errors in this specifications is available at http://www.w3.org/TR/1999/xml-stylesheet-19990629/errata.

Comments on this specification may be sent to <www-xml-stylesheet-comments@w3.org>. The archive of public comments is available at http://w3.org/Archives/Public/www-xml-stylesheet-comments.

A list of current W3C Recommendations and other technical documents can be found at http://www.w3.org/TR.

The Working Group expects additional mechanisms for linking style sheets to XML document to be defined in a future specification.

The use of XML processing instructions in this specification should not be taken as a precedent. The W3C does not anticipate recommending the use of processing instructions in any future specification. The Rationale explains why they were used in this specification.

This document was produced as part of the W3C XML Activity.

Table of contents

1 The xml-stylesheet processing instruction

Appendices

A References
B Rationale

1 The xml-stylesheet processing instruction

Style Sheets can be associated with an XML[XML10] document by using a processing instruction whose target is xml-stylesheet. This processing instruction follows the behaviour of the HTML 4.0 <LINK REL="stylesheet">[HTML40].

The xml-stylesheet processing instruction is parsed in the same way as a start-tag, with the exception that entities other than predefined entities must not be referenced.

The following grammar is given using the same notation as the grammar in the XML Recommendation[XML10]. Symbols in the grammar that are not defined here are defined in the XML Recommendation.

xml-stylesheet processing instruction
[1]    StyleSheetPI    ::=    '<?xml-stylesheet' (S PseudoAtt)* S? '?>'
[2]    PseudoAtt    ::=    Name S? '=' S? PseudoAttValue
[3]    PseudoAttValue    ::=    ('"' ([^"<&] | CharRef | PredefEntityRef)* '"'
| "'" ([^'<&] | CharRef | PredefEntityRef)* "'")
- (Char* '?>' Char*)
[4]    PredefEntityRef    ::=    '&amp;' | '&lt;' | '&gt;' | '&quot;' | '&apos;'

In PseudoAttValue, a CharRef or a PredefEntityRef is interpreted in the same manner as in a normal XML attribute value. The actual value of the pseudo-attribute is the value after each reference is replaced by the character it references. This replacement is not performed automatically by an XML processor.

The xml-stylesheet processing instruction is allowed only in the prolog of an XML document. The syntax of XML constrains where processing instructions are allowed in the prolog; the xml-stylesheet processing instruction is allowed anywhere in the prolog that meets these constraints.

NOTE: If the xml-stylesheet processing instruction occurs in the external DTD subset or in a parameter entity, it is possible that it may not be processed by a non-validating XML processor (see [XML10]).

The following pseudo attributes are defined

href CDATA #REQUIRED
type CDATA #REQUIRED
title CDATA #IMPLIED
media CDATA #IMPLIED
charset CDATA #IMPLIED
alternate (yes|no) "no"

The semantics of the pseudo-attributes are exactly as with <LINK REL="stylesheet"> in HTML 4.0, with the exception of the alternate pseudo-attribute. If alternate="yes" is specified, then the processing instruction has the semantics of <LINK REL="alternate stylesheet"> instead of <LINK REL="stylesheet">.

NOTE: Since the value of the href attribute is a URI reference, it may be a relative URI and it may contain a fragment identifier. In particular the URI reference may contain only a fragment identifier. Such a URI reference is a reference to a part of the document containing the xml-stylesheet processing instruction (see [RFC2396]). The consequence is that the xml-stylesheet processing instruction allows style sheets to be embedded in the same document as the xml-stylesheet processing instruction.

In some cases, style sheets may be linked with an XML document by means external to the document. For example, earlier versions of HTTP [RFC2068] (section 19.6.2.4) allowed style sheets to be associated with XML documents by means of the Link header. Any links to style sheets that are specified externally to the document are considered to occur before the links specified by the xml-stylesheet processing instructions. This is the same as in HTML 4.0 (see section 14.6).

Here are some examples from HTML 4.0 with the corresponding processing instruction:

<LINK href="mystyle.css" rel="style sheet" type="text/css">
<?xml-stylesheet href="mystyle.css" type="text/css"?>

<LINK href="mystyle.css" title="Compact" rel="stylesheet"
type="text/css">
<?xml-stylesheet href="mystyle.css" title="Compact" type="text/css"?>

<LINK href="mystyle.css" title="Medium" rel="alternate stylesheet"
type="text/css">
<?xml-stylesheet alternate="yes" href="mystyle.css" title="Medium"
type="text/css"?>

Multiple xml-stylesheet processing instructions are also allowed with exactly the same semantics as with LINK REL="stylesheet". For example,

<LINK rel="alternate stylesheet" title="compact" href="small-base.css"
type="text/css">
<LINK rel="alternate stylesheet" title="compact" href="small-extras.css"
type="text/css">
<LINK rel="alternate stylesheet" title="big print" href="bigprint.css"
type="text/css">
<LINK rel="stylesheet" href="common.css" type="text/css">

would be equivalent to:

<?xml-stylesheet alternate="yes" title="compact" href="small-base.css"
type="text/css"?>
<?xml-stylesheet alternate="yes" title="compact" href="small-extras.css"
type="text/css"?>
<?xml-stylesheet alternate="yes" title="big print" href="bigprint.css"
type="text/css"?>
<?xml-stylesheet href="common.css" type="text/css"?>

A References

HTML40
World Wide Web Consortium. HTML 4.0 Specification. W3C Recommendation. See http://www.w3.org/TR/REC-html40
RFC2068
R. Fielding, J. Gettys, J. Mogul, H. Frystyk Nielsen, and T. Berners-Lee. Hypertext Transfer Protocol -- HTTP/1.1.. IETF RFC 2068. See http://www.ietf.org/rfc/rfc2068.txt.
RFC2396
T. Berners-Lee, R. Fielding, and L. Masinter. Uniform Resource Identifiers (URI): Generic Syntax. IETF RFC 2396. See http://www.ietf.org/rfc/rfc2396.txt.
XML10
World Wide Web Consortium. Extensible Markup Language (XML) 1.0. W3C Recommendation. See http://www.w3.org/TR/1998/REC-xml-19980210

B Rationale

There was an urgent requirement for a specification for style sheet linking that could be completed in time for the next release from major browser vendors. Only by choosing a simple mechanism closely based on a proven existing mechanism could the specification be completed in time to meet this requirement.

Use of a processing instruction avoids polluting the main document structure with application specific processing information.

The mechanism chosen for this version of the specification is not a constraint on the additional mechanisms planned for future versions. There is no expectation that these will use processing instructions; indeed they may not include the linking information in the source document.

libxml-security-java-1.5.6/src/test/resources/javax/xml/crypto/dsig/envelopingSignature.xml0000644000175000017500000000174110416770031031055 0ustar tonytonyeImkedpSvmerkw8Br/VtVZfGOUI=SQRVncscKt6oLvnsof+sUlHZ3hAJZdB7Xgvgm+7yhVi1ZXcgumUMaw==

/KaCzo4Syrom78z3EQ5SbbB4sF7ey80etKII864WF64B81uRpH5t9jQTxeEu0ImbzRMqzVDZkVG9 xD7nN1kuFw==

li7dzDacuo67Jg7mtqEm2TRuOMU=Z4Rxsnqc9E7pGknFFH2xqaryRPBaQ01khpMdLRQnG541Awtx/XPaF5Bpsy4pNWMOHCBiNU0Nogps QW5QvnlMpA==nlH99tB6jVAcVx6Ka+DACy4qEhw6CNka8/DyUzpYz4QhU2bGCSHd/Koc02rUUT4b3eF7Fwf1FFd1 vk8qNwUfcg==
libxml-security-java-1.5.6/src/test/resources/javax/xml/crypto/dsig/signature3.xml0000644000175000017500000000334510661101437027113 0ustar tonytony Result: 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= ov3HOoPN0w71N3DdGNhN+dSzQm6NJFUB5qGKRp9Q986nVzMb8wCIVxCQu+x3vMtq p4/R3KEcPtEJSaoR+thGq++GPIh2mZXyWJs3xHy9P4xmoTVwli7/l7s8ebDSmnbZ 7xZU4Iy1BSMZSxGKnRG+Z/0GJIfTz8jhH6wCe3l03L4= q07hpxA5DGFfvJFZueFl/LI85XxQxrvqgVugL25V090A9MrlLBg5PmAsxFTe+G6a xvWJQwYOVHj/nuiCnNLa9a7uAtPFiTtW+v5H3wlLaY3ws4atRBNOQlYkIBp38sTf QBkk4i8PEU1GQ2M0CLIJq4/2Akfv1wxzSQ9+8oWkArc= AQAB some text libxml-security-java-1.5.6/src/test/resources/javax/xml/crypto/dsig/signature2.xml0000644000175000017500000000322610661101437027110 0ustar tonytony This ends up in the file 'doc.xml' 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= ov3HOoPN0w71N3DdGNhN+dSzQm6NJFUB5qGKRp9Q986nVzMb8wCIVxCQu+x3vMtq p4/R3KEcPtEJSaoR+thGq++GPIh2mZXyWJs3xHy9P4xmoTVwli7/l7s8ebDSmnbZ 7xZU4Iy1BSMZSxGKnRG+Z/0GJIfTz8jhH6wCe3l03L4= q07hpxA5DGFfvJFZueFl/LI85XxQxrvqgVugL25V090A9MrlLBg5PmAsxFTe+G6a xvWJQwYOVHj/nuiCnNLa9a7uAtPFiTtW+v5H3wlLaY3ws4atRBNOQlYkIBp38sTf QBkk4i8PEU1GQ2M0CLIJq4/2Akfv1wxzSQ9+8oWkArc= AQAB some text libxml-security-java-1.5.6/src/test/resources/javax/xml/crypto/dsig/invalid-signature.xml0000644000175000017500000000217710767776156030505 0ustar tonytony 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= INVALIDN0w71N3DdGNhN+dSzQm6NJFUB5qGKRp9Q986nVzMb8wCIVxCQu+x3vMtq p4/R3KEcPtEJSaoR+thGq++GPIh2mZXyWJs3xHy9P4xmoTVwli7/l7s8ebDSmnbZ 7xZU4Iy1BSMZSxGKnRG+Z/0GJIfTz8jhH6wCe3l03L4= q07hpxA5DGFfvJFZueFl/LI85XxQxrvqgVugL25V090A9MrlLBg5PmAsxFTe+G6a xvWJQwYOVHj/nuiCnNLa9a7uAtPFiTtW+v5H3wlLaY3ws4atRBNOQlYkIBp38sTf QBkk4i8PEU1GQ2M0CLIJq4/2Akfv1wxzSQ9+8oWkArc= AQAB some text libxml-security-java-1.5.6/src/test/resources/javax/xml/crypto/dsig/rfc3161.txt0000644000175000017500000015247111536510127026142 0ustar tonytony Network Working Group C. Adams Request for Comments: 3161 Entrust Category: Standards Track P. Cain BBN D. Pinkas Integris R. Zuccherato Entrust August 2001 Internet X.509 Public Key Infrastructure Time-Stamp Protocol (TSP) Status of this Memo This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited. Copyright Notice Copyright (C) The Internet Society (2001). All Rights Reserved. Abstract This document describes the format of a request sent to a Time Stamping Authority (TSA) and of the response that is returned. It also establishes several security-relevant requirements for TSA operation, with regards to processing requests to generate responses. 1. Introduction A time-stamping service supports assertions of proof that a datum existed before a particular time. A TSA may be operated as a Trusted Third Party (TTP) service, though other operational models may be appropriate, e.g., an organization might require a TSA for internal time-stamping purposes. Non-repudiation services [ISONR] require the ability to establish the existence of data before specified times. This protocol may be used as a building block to support such services. An example of how to prove that a digital signature was generated during the validity period of a public key certificate is given in an annex. Adams, et al. Standards Track [Page 1] RFC 3161 Time-Stamp Protocol (TSP) August 2001 The key words "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD NOT", "SHALL", "RECOMMENDED", "MAY", and "OPTIONAL" in this document (in uppercase, as shown) are to be interpreted as described in [RFC2119]. In order to associate a datum with a particular point in time, a Time Stamp Authority (TSA) may need to be used. This Trusted Third Party provides a "proof-of-existence" for this particular datum at an instant in time. The TSA's role is to time-stamp a datum to establish evidence indicating that a datum existed before a particular time. This can then be used, for example, to verify that a digital signature was applied to a message before the corresponding certificate was revoked thus allowing a revoked public key certificate to be used for verifying signatures created prior to the time of revocation. This is an important public key infrastructure operation. The TSA can also be used to indicate the time of submission when a deadline is critical, or to indicate the time of transaction for entries in a log. An exhaustive list of possible uses of a TSA is beyond the scope of this document. This standard does not establish overall security requirements for TSA operation, just like other PKIX standards do not establish such requirements for CA operation. Rather, it is anticipated that a TSA will make known to prospective clients the policies it implements to ensure accurate time-stamp generation, and clients will make use of the services of a TSA only if they are satisfied that these policies meet their needs. 2. The TSA The TSA is a TTP that creates time-stamp tokens in order to indicate that a datum existed at a particular point in time. For the remainder of this document a "valid request" shall mean one that can be decoded correctly, is of the form specified in Section 2.4, and is from a supported TSA subscriber. 2.1. Requirements of the TSA The TSA is REQUIRED: 1. to use a trustworthy source of time. 2. to include a trustworthy time value for each time-stamp token. 3. to include a unique integer for each newly generated time-stamp token. Adams, et al. Standards Track [Page 2] RFC 3161 Time-Stamp Protocol (TSP) August 2001 4. to produce a time-stamp token upon receiving a valid request from the requester, when it is possible. 5. to include within each time-stamp token an identifier to uniquely indicate the security policy under which the token was created. 6. to only time-stamp a hash representation of the datum, i.e., a data imprint associated with a one-way collision resistant hash-function uniquely identified by an OID. 7. to examine the OID of the one-way collision resistant hash- function and to verify that the hash value length is consistent with the hash algorithm. 8. not to examine the imprint being time-stamped in any way (other than to check its length, as specified in the previous bullet). 9. not to include any identification of the requesting entity in the time-stamp tokens. 10. to sign each time-stamp token using a key generated exclusively for this purpose and have this property of the key indicated on the corresponding certificate. 11. to include additional information in the time-stamp token, if asked by the requester using the extensions field, only for the extensions that are supported by the TSA. If this is not possible, the TSA SHALL respond with an error message. 2.2. TSA Transactions As the first message of this mechanism, the requesting entity requests a time-stamp token by sending a request (which is or includes a TimeStampReq, as defined below) to the Time Stamping Authority. As the second message, the Time Stamping Authority responds by sending a response (which is or includes a TimeStampResp, as defined below) to the requesting entity. Upon receiving the response (which is or includes a TimeStampResp that normally contains a TimeStampToken (TST), as defined below), the requesting entity SHALL verify the status error returned in the response and if no error is present it SHALL verify the various fields contained in the TimeStampToken and the validity of the digital signature of the TimeStampToken. In particular, it SHALL verify that what was time-stamped corresponds to what was requested to be time-stamped. The requester SHALL verify that the TimeStampToken contains the correct certificate identifier of the Adams, et al. Standards Track [Page 3] RFC 3161 Time-Stamp Protocol (TSP) August 2001 TSA, the correct data imprint and the correct hash algorithm OID. It SHALL then verify the timeliness of the response by verifying either the time included in the response against a local trusted time reference, if one is available, or the value of the nonce (large random number with a high probability that it is generated by the client only once) included in the response against the value included in the request. For more details about replay attack detection, see the security considerations section (item 6). If any of the verifications above fails, the TimeStampToken SHALL be rejected. Then, since the TSA's certificate may have been revoked, the status of the certificate SHOULD be checked (e.g., by checking the appropriate CRL) to verify that the certificate is still valid. Then, the client application SHOULD check the policy field to determine whether or not the policy under which the token was issued is acceptable for the application. 2.3. Identification of the TSA The TSA MUST sign each time-stamp message with a key reserved specifically for that purpose. A TSA MAY have distinct private keys, e.g., to accommodate different policies, different algorithms, different private key sizes or to increase the performance. The corresponding certificate MUST contain only one instance of the extended key usage field extension as defined in [RFC2459] Section 4.2.1.13 with KeyPurposeID having value: id-kp-timeStamping. This extension MUST be critical. The following object identifier identifies the KeyPurposeID having value id-kp-timeStamping. id-kp-timeStamping OBJECT IDENTIFIER ::= {iso(1) identified-organization(3) dod(6) internet(1) security(5) mechanisms(5) pkix(7) kp (3) timestamping (8)} 2.4. Request and Response Formats 2.4.1. Request Format A time-stamping request is as follows: TimeStampReq ::= SEQUENCE { version INTEGER { v1(1) }, messageImprint MessageImprint, --a hash algorithm OID and the hash value of the data to be Adams, et al. Standards Track [Page 4] RFC 3161 Time-Stamp Protocol (TSP) August 2001 --time-stamped reqPolicy TSAPolicyId OPTIONAL, nonce INTEGER OPTIONAL, certReq BOOLEAN DEFAULT FALSE, extensions [0] IMPLICIT Extensions OPTIONAL } The version field (currently v1) describes the version of the Time- Stamp request. The messageImprint field SHOULD contain the hash of the datum to be time-stamped. The hash is represented as an OCTET STRING. Its length MUST match the length of the hash value for that algorithm (e.g., 20 bytes for SHA-1 or 16 bytes for MD5). MessageImprint ::= SEQUENCE { hashAlgorithm AlgorithmIdentifier, hashedMessage OCTET STRING } The hash algorithm indicated in the hashAlgorithm field SHOULD be a known hash algorithm (one-way and collision resistant). That means that it SHOULD be one-way and collision resistant. The Time Stamp Authority SHOULD check whether or not the given hash algorithm is known to be "sufficient" (based on the current state of knowledge in cryptanalysis and the current state of the art in computational resources, for example). If the TSA does not recognize the hash algorithm or knows that the hash algorithm is weak (a decision left to the discretion of each individual TSA), then the TSA SHOULD refuse to provide the time-stamp token by returning a pkiStatusInfo of 'bad_alg'. The reqPolicy field, if included, indicates the TSA policy under which the TimeStampToken SHOULD be provided. TSAPolicyId is defined as follows: TSAPolicyId ::= OBJECT IDENTIFIER The nonce, if included, allows the client to verify the timeliness of the response when no local clock is available. The nonce is a large random number with a high probability that the client generates it only once (e.g., a 64 bit integer). In such a case the same nonce value MUST be included in the response, otherwise the response shall be rejected. If the certReq field is present and set to true, the TSA's public key certificate that is referenced by the ESSCertID identifier inside a SigningCertificate attribute in the response MUST be provided by the TSA in the certificates field from the SignedData structure in that response. That field may also contain other certificates. Adams, et al. Standards Track [Page 5] RFC 3161 Time-Stamp Protocol (TSP) August 2001 If the certReq field is missing or if the certReq field is present and set to false then the certificates field from the SignedData structure MUST not be present in the response. The extensions field is a generic way to add additional information to the request in the future. Extensions is defined in [RFC 2459]. If an extension, whether it is marked critical or not critical, is used by a requester but is not recognized by a time-stamping server, the server SHALL not issue a token and SHALL return a failure (unacceptedExtension). The time-stamp request does not identify the requester, as this information is not validated by the TSA (See Section 2.1). In situations where the TSA requires the identity of the requesting entity, alternate identification /authentication means have to be used (e.g., CMS encapsulation [CMS] or TLS authentication [RFC2246]). 2.4.2. Response Format A time-stamping response is as follows: TimeStampResp ::= SEQUENCE { status PKIStatusInfo, timeStampToken TimeStampToken OPTIONAL } The status is based on the definition of status in section 3.2.3 of [RFC2510] as follows: PKIStatusInfo ::= SEQUENCE { status PKIStatus, statusString PKIFreeText OPTIONAL, failInfo PKIFailureInfo OPTIONAL } When the status contains the value zero or one, a TimeStampToken MUST be present. When status contains a value other than zero or one, a TimeStampToken MUST NOT be present. One of the following values MUST be contained in status: PKIStatus ::= INTEGER { granted (0), -- when the PKIStatus contains the value zero a TimeStampToken, as requested, is present. grantedWithMods (1), -- when the PKIStatus contains the value one a TimeStampToken, with modifications, is present. rejection (2), waiting (3), revocationWarning (4), Adams, et al. Standards Track [Page 6] RFC 3161 Time-Stamp Protocol (TSP) August 2001 -- this message contains a warning that a revocation is -- imminent revocationNotification (5) -- notification that a revocation has occurred } Compliant servers SHOULD NOT produce any other values. Compliant clients MUST generate an error if values it does not understand are present. When the TimeStampToken is not present, the failInfo indicates the reason why the time-stamp request was rejected and may be one of the following values. PKIFailureInfo ::= BIT STRING { badAlg (0), -- unrecognized or unsupported Algorithm Identifier badRequest (2), -- transaction not permitted or supported badDataFormat (5), -- the data submitted has the wrong format timeNotAvailable (14), -- the TSA's time source is not available unacceptedPolicy (15), -- the requested TSA policy is not supported by the TSA unacceptedExtension (16), -- the requested extension is not supported by the TSA addInfoNotAvailable (17) -- the additional information requested could not be understood -- or is not available systemFailure (25) -- the request cannot be handled due to system failure } These are the only values of PKIFailureInfo that SHALL be supported. Compliant servers SHOULD NOT produce any other values. Compliant clients MUST generate an error if values it does not understand are present. The statusString field of PKIStatusInfo MAY be used to include reason text such as "messageImprint field is not correctly formatted". A TimeStampToken is as follows. It is defined as a ContentInfo ([CMS]) and SHALL encapsulate a signed data content type. TimeStampToken ::= ContentInfo -- contentType is id-signedData ([CMS]) -- content is SignedData ([CMS]) Adams, et al. Standards Track [Page 7] RFC 3161 Time-Stamp Protocol (TSP) August 2001 The fields of type EncapsulatedContentInfo of the SignedData construct have the following meanings: eContentType is an object identifier that uniquely specifies the content type. For a time-stamp token it is defined as: id-ct-TSTInfo OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) ct(1) 4} eContent is the content itself, carried as an octet string. The eContent SHALL be the DER-encoded value of TSTInfo. The time-stamp token MUST NOT contain any signatures other than the signature of the TSA. The certificate identifier (ESSCertID) of the TSA certificate MUST be included as a signerInfo attribute inside a SigningCertificate attribute. TSTInfo ::= SEQUENCE { version INTEGER { v1(1) }, policy TSAPolicyId, messageImprint MessageImprint, -- MUST have the same value as the similar field in -- TimeStampReq serialNumber INTEGER, -- Time-Stamping users MUST be ready to accommodate integers -- up to 160 bits. genTime GeneralizedTime, accuracy Accuracy OPTIONAL, ordering BOOLEAN DEFAULT FALSE, nonce INTEGER OPTIONAL, -- MUST be present if the similar field was present -- in TimeStampReq. In that case it MUST have the same value. tsa [0] GeneralName OPTIONAL, extensions [1] IMPLICIT Extensions OPTIONAL } The version field (currently v1) describes the version of the time- stamp token. Conforming time-stamping servers MUST be able to provide version 1 time-stamp tokens. Among the optional fields, only the nonce field MUST be supported. Conforming time-stamping requesters MUST be able to recognize version 1 time-stamp tokens with all the optional fields present, but are not mandated to understand the semantics of any extension, if present. Adams, et al. Standards Track [Page 8] RFC 3161 Time-Stamp Protocol (TSP) August 2001 The policy field MUST indicate the TSA's policy under which the response was produced. If a similar field was present in the TimeStampReq, then it MUST have the same value, otherwise an error (unacceptedPolicy) MUST be returned. This policy MAY include the following types of information (although this list is certainly not exhaustive): * The conditions under which the time-stamp token may be used. * The availability of a time-stamp token log, to allow later verification that a time-stamp token is authentic. The messageImprint MUST have the same value as the similar field in TimeStampReq, provided that the size of the hash value matches the expected size of the hash algorithm identified in hashAlgorithm. The serialNumber field is an integer assigned by the TSA to each TimeStampToken. It MUST be unique for each TimeStampToken issued by a given TSA (i.e., the TSA name and serial number identify a unique TimeStampToken). It should be noticed that the property MUST be preserved even after a possible interruption (e.g., crash) of the service. genTime is the time at which the time-stamp token has been created by the TSA. It is expressed as UTC time (Coordinated Universal Time) to reduce confusion with the local time zone use. UTC is a time scale, based on the second (SI), as defined and recommended by the CCIR, and maintained by the Bureau International des Poids et Mesures (BIPM). A synonym is "Zulu" time which is used by the civil aviation and represented by the letter "Z" (phonetically "Zulu"). The ASN.1 GeneralizedTime syntax can include fraction-of-second details. Such syntax, without the restrictions from [RFC 2459] Section 4.1.2.5.2, where GeneralizedTime is limited to represent the time with a granularity of one second, may be used here. GeneralizedTime values MUST include seconds. However, when there is no need to have a precision better than the second, then GeneralizedTime with a precision limited to one second SHOULD be used (as in [RFC 2459]). The syntax is: YYYYMMDDhhmmss[.s...]Z Example: 19990609001326.34352Z X.690 | ISO/IEC 8825-1 provides the following restrictions for a DER-encoding. Adams, et al. Standards Track [Page 9] RFC 3161 Time-Stamp Protocol (TSP) August 2001 The encoding MUST terminate with a "Z" (which means "Zulu" time). The decimal point element, if present, MUST be the point option ".". The fractional-seconds elements, if present, MUST omit all trailing 0's; if the elements correspond to 0, they MUST be wholly omitted, and the decimal point element also MUST be omitted. Midnight (GMT) shall be represented in the form: "YYYYMMDD000000Z" where "YYYYMMDD" represents the day following the midnight in question. Here are a few examples of valid representations: "19920521000000Z" "19920622123421Z" "19920722132100.3Z" accuracy represents the time deviation around the UTC time contained in GeneralizedTime. Accuracy ::= SEQUENCE { seconds INTEGER OPTIONAL, millis [0] INTEGER (1..999) OPTIONAL, micros [1] INTEGER (1..999) OPTIONAL } If either seconds, millis or micros is missing, then a value of zero MUST be taken for the missing field. By adding the accuracy value to the GeneralizedTime, an upper limit of the time at which the time-stamp token has been created by the TSA can be obtained. In the same way, by subtracting the accuracy to the GeneralizedTime, a lower limit of the time at which the time-stamp token has been created by the TSA can be obtained. accuracy can be decomposed in seconds, milliseconds (between 1-999) and microseconds (1-999), all expressed as integer. When the accuracy optional field is not present, then the accuracy may be available through other means, e.g., the TSAPolicyId. If the ordering field is missing, or if the ordering field is present and set to false, then the genTime field only indicates the time at which the time-stamp token has been created by the TSA. In such a case, the ordering of time-stamp tokens issued by the same TSA or different TSAs is only possible when the difference between the genTime of the first time-stamp token and the genTime of the second time-stamp token is greater than the sum of the accuracies of the genTime for each time-stamp token. Adams, et al. Standards Track [Page 10] RFC 3161 Time-Stamp Protocol (TSP) August 2001 If the ordering field is present and set to true, every time-stamp token from the same TSA can always be ordered based on the genTime field, regardless of the genTime accuracy. The nonce field MUST be present if it was present in the TimeStampReq. In such a case it MUST equal the value provided in the TimeStampReq structure. The purpose of the tsa field is to give a hint in identifying the name of the TSA. If present, it MUST correspond to one of the subject names included in the certificate that is to be used to verify the token. However, the actual identification of the entity that signed the response will always occur through the use of the certificate identifier (ESSCertID Attribute) inside a SigningCertificate attribute which is part of the signerInfo (See Section 5 of [ESS]). extensions is a generic way to add additional information in the future. Extensions is defined in [RFC 2459]. Particular extension field types may be specified in standards or may be defined and registered by any organization or community. 3. Transports There is no mandatory transport mechanism for TSA messages in this document. The mechanisms described below are optional; additional optional mechanisms may be defined in the future. 3.1. Time-Stamp Protocol Using E-mail This section specifies a means for conveying ASN.1-encoded messages for the protocol exchanges described in Section 2 and Appendix D via Internet mail. Two MIME objects are specified as follows: Content-Type: application/timestamp-query Content-Transfer-Encoding: base64 <> Content-Type: application/timestamp-reply Content-Transfer-Encoding: base64 <> These MIME objects can be respectively sent and received using common MIME processing engines and provides a simple Internet mail transport for Time-Stamp messages. Adams, et al. Standards Track [Page 11] RFC 3161 Time-Stamp Protocol (TSP) August 2001 For the application/timestamp-query and application/timestamp-reply MIME types, implementations SHOULD include the optional "name" and "filename" parameters. Including a file name helps preserve type information when time-stamp queries and replies are saved as files. When these parameters are included, a file name with the appropriate extension SHOULD be selected: MIME Type File Extension application/timestamp-query .TSQ application/timestamp-reply .TSR In addition, the file name SHOULD be limited to eight characters followed by a three letter extension. The eight character filename base can be any distinct name. 3.2. File Based Protocol A file containing a time-stamp message MUST contain only the DER encoding of one TSA message, i.e., there MUST be no extraneous header or trailer information in the file. Such files can be used to transport time stamp messages using for example, FTP. A Time-Stamp Request SHOULD be contained in a file with file extension .tsq (like Time-Stamp Query). A Time-Stamp Response SHOULD be contained in a file with file extension .tsr (like Time-Stamp Reply). 3.3. Socket Based Protocol The following simple TCP-based protocol is to be used for transport of TSA messages. This protocol is suitable for cases where an entity initiates a transaction and can poll to pick up the results. The protocol basically assumes a listener process on a TSA that can accept TSA messages on a well-defined port (IP port number 318). Typically an initiator binds to this port and submits the initial TSA message. The responder replies with a TSA message and/or with a reference number to be used later when polling for the actual TSA message response. If a number of TSA response messages are to be produced for a given request (say if a receipt must be sent before the actual token can be produced) then a new polling reference is also returned. When the final TSA response message has been picked up by the initiator then no new polling reference is supplied. Adams, et al. Standards Track [Page 12] RFC 3161 Time-Stamp Protocol (TSP) August 2001 The initiator of a transaction sends a "direct TCP-based TSA message" to the recipient. The recipient responds with a similar message. A "direct TCP-based TSA message" consists of: length (32-bits), flag (8-bits), value (defined below) The length field contains the number of octets of the remainder of the message (i.e., number of octets of "value" plus one). All 32-bit values in this protocol are specified to be in network byte order. Message name flag value tsaMsg '00'H DER-encoded TSA message -- TSA message pollRep '01'H polling reference (32 bits), time-to-check-back (32 bits) -- poll response where no TSA message response ready; use polling -- reference value (and estimated time value) for later polling pollReq '02'H polling reference (32 bits) -- request for a TSA message response to initial message negPollRep '03'H '00'H -- no further polling responses (i.e., transaction complete) partialMsgRep '04'H next polling reference (32 bits), time-to-check-back (32 bits), DER-encoded TSA message -- partial response (receipt) to initial message plus new polling -- reference (and estimated time value) to use to get next part of -- response finalMsgRep '05'H DER-encoded TSA message -- final (and possibly sole) response to initial message errorMsgRep '06'H human readable error message -- produced when an error is detected (e.g., a polling reference -- is received which doesn't exist or is finished with) The sequence of messages that can occur is: a) entity sends tsaMsg and receives one of pollRep, negPollRep, partialMsgRep, or finalMsgRep in response. b) end entity sends pollReq message and receives one of negPollRep, partialMsgRep, finalMsgRep, or errorMsgRep in response. The "time-to-check-back" parameter is an unsigned 32-bit integer. It is the time in seconds indicating the minimum interval after which the client SHOULD check the status again. It provides an estimate of the time that the end entity should send its next pollReq. Adams, et al. Standards Track [Page 13] RFC 3161 Time-Stamp Protocol (TSP) August 2001 3.4. Time-Stamp Protocol via HTTP This subsection specifies a means for conveying ASN.1-encoded messages for the protocol exchanges described in Section 2 and Appendix D via the HyperText Transfer Protocol. Two MIME objects are specified as follows. Content-Type: application/timestamp-query <> Content-Type: application/timestamp-reply <> These MIME objects can be sent and received using common HTTP processing engines over WWW links and provides a simple browser- server transport for Time-Stamp messages. Upon receiving a valid request, the server MUST respond with either a valid response with content type application/timestamp-response or with an HTTP error. 4. Security Considerations This entire document concerns security considerations. When designing a TSA service, the following considerations have been identified that have an impact upon the validity or "trust" in the time-stamp token. 1. When a TSA shall not be used anymore, but the TSA private key has not been compromised, the authority's certificate SHALL be revoked. When the reasonCode extension relative to the revoked certificate from the TSA is present in the CRL entry extensions, it SHALL be set either to unspecified (0), affiliationChanged (3), superseded (4) or cessationOfOperation (5). In that case, at any future time, the tokens signed with the corresponding key will be considered as invalid, but tokens generated before the revocation time will remain valid. When the reasonCode extension relative to the revoked certificate from the TSA is not present in the CRL entry extensions, then all the tokens that have been signed with the corresponding key SHALL be considered as invalid. For that reason, it is recommended to use the reasonCode extension. Adams, et al. Standards Track [Page 14] RFC 3161 Time-Stamp Protocol (TSP) August 2001 2. When the TSA private key has been compromised, then the corresponding certificate SHALL be revoked. In that case, the reasonCode extension relative to the revoked certificate from the TSA may or may not be present in the CRL entry extensions. When it is present then it SHALL be set to keyCompromise (1). Any token signed by the TSA using that private key cannot be trusted anymore. For this reason, it is imperative that the TSA's private key be guarded with proper security and controls in order to minimize the possibility of compromise. In case the private key does become compromised, an audit trail of all tokens generated by the TSA MAY provide a means to discriminate between genuine and false backdated tokens. Two time-stamp tokens from two different TSAs is another way to address this issue. 3. The TSA signing key MUST be of a sufficient length to allow for a sufficiently long lifetime. Even if this is done, the key will have a finite lifetime. Thus, any token signed by the TSA SHOULD be time-stamped again (if authentic copies of old CRLs are available) or notarized (if they aren't) at a later date to renew the trust that exists in the TSA's signature. time-stamp tokens could also be kept with an Evidence Recording Authority to maintain this trust. 4. A client application using only a nonce and no local clock SHOULD be concerned about the amount of time it is willing to wait for a response. A `man-in-the-middle' attack can introduce delays. Thus, any TimeStampResp that takes more than an acceptable period of time SHOULD be considered suspect. Since each transport method specified in this document has different delay characteristics, the period of time that is considered acceptable will depend upon the particular transport method used, as well as other environment factors. 5. If different entities obtain time-stamp tokens on the same data object using the same hash algorithm, or a single entity obtains multiple time-stamp tokens on the same object, the generated time-stamp tokens will include identical message imprints; as a result, an observer with access to those time-stamp tokens could infer that the time-stamps may refer to the same underlying data. Adams, et al. Standards Track [Page 15] RFC 3161 Time-Stamp Protocol (TSP) August 2001 6. Inadvertent or deliberate replays for requests incorporating the same hash algorithm and value may happen. Inadvertent replays occur when more than one copy of the same request message gets sent to the TSA because of problems in the intervening network elements. Deliberate replays occur when a middleman is replaying legitimate TS responses. In order to detect these situations, several techniques may be used. Using a nonce always allows to detect replays, and hence its use is RECOMMENDED. Another possibility is to use both a local clock and a moving time window during which the requester remembers all the hashes sent during that time window. When receiving a response, the requester ensures both that the time of the response is within the time window and that there is only one occurrence of the hash value in that time window. If the same hash value is present more than once within a time window, the requester may either use a nonce, or wait until the time window has moved to come back to the case where the same hash value appears only once during that time window. 5. Intellectual Property Rights The IETF takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to per- tain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on the IETF's procedures with respect to rights in standards-track and standards- related documentation can be found in BCP-11. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification can be obtained from the IETF Secretariat. The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to practice this standard. Please address the information to the IETF Executive Director. The following eight (8) United States Patents related to time stamping, listed in chronological order, are known by the authors to exist at this time. This may not be an exhaustive list. Other patents MAY exist or be issued at any time. This list is provided for informational purposes; to date, the IETF has not been notified of intellectual property rights claimed in regard to any of the Adams, et al. Standards Track [Page 16] RFC 3161 Time-Stamp Protocol (TSP) August 2001 specification contained in this document. Should this situation change, the current status may be found at the online list of claimed rights (IETF Page of Intellectual Property Rights Notices). Implementers of this protocol SHOULD perform their own patent search and determine whether or not any encumbrances exist on their implementation. Users of this protocol SHOULD perform their own patent search and determine whether or not any encumbrances exist on the use of this standard. # 5,001,752 Public/Key Date-Time Notary Facility Filing date: October 13, 1989 Issued: March 19, 1991 Inventor: Addison M. Fischer # 5,022,080 Electronic Notary Filing date: April 16, 1989 Issued: June 4, 1991 Inventors: Robert T. Durst, Kevin D. Hunter # 5,136,643 Public/Key Date-Time Notary Facility Filing date: December 20, 1990 Issued: August 4, 1992 Inventor: Addison M. Fischer Note: This is a continuation of patent # 5,001,752.) # 5,136,646 Digital Document Time-Stamping with Catenate Certificate Filing date: August 2, 1990 Issued: August 4, 1992 Inventors: Stuart A. Haber, Wakefield S. Stornetta Jr. (assignee) Bell Communications Research, Inc., # 5,136,647 Method for Secure Time-Stamping of Digital Documents Filing date: August 2, 1990 Issued: August 4, 1992 Inventors: Stuart A. Haber, Wakefield S. Stornetta Jr. (assignee) Bell Communications Research, Inc., # 5,373,561 Method of Extending the Validity of a Cryptographic Certificate Filing date: December 21, 1992 Issued: December 13, 1994 Inventors: Stuart A. Haber, Wakefield S. Stornetta Jr. (assignee) Bell Communications Research, Inc., Adams, et al. Standards Track [Page 17] RFC 3161 Time-Stamp Protocol (TSP) August 2001 # 5,422,953 Personal Date/Time Notary Device Filing date: May 5, 1993 Issued: June 6, 1995 Inventor: Addison M. Fischer # 5,781,629 Digital Document Authentication System Filing date: February 21, 1997 Issued: July 14, 1998 Inventor: Stuart A. Haber, Wakefield S. Stornetta Jr. (assignee) Surety Technologies, Inc., 6. References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol, Version 1.0", RFC 2246, January 1999. [RFC2510] Adams, C. and S. Farrell, "Internet X.509 Public Key Infrastructure, Certificate Management Protocols", RFC 2510, March 1999. [RFC2459] Housley, R., Ford, W., Polk, W. and D. Solo, "Internet X.509 Public Key Infrastructure, Certificate and CRL Profile", RFC 2459, January 1999. [CMS] Housley, R., "Cryptographic Message Syntax", RFC 2630, June 1999. [DSS] Digital Signature Standard. FIPS Pub 186. National Institute of Standards and Technology. 19 May 1994. [ESS] Hoffman, P., "Enhanced Security Services for S/MIME", RFC 2634, June 1999. [ISONR] ISO/IEC 10181-5: Security Frameworks in Open Systems. Non-Repudiation Framework. April 1997. [MD5] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, April 1992. [SHA1] Secure Hash Standard. FIPS Pub 180-1. National Institute of Standards and Technology. 17 April 1995. Adams, et al. Standards Track [Page 18] RFC 3161 Time-Stamp Protocol (TSP) August 2001 7. Authors' Addresses Carlisle Adams Entrust, Inc. 1000 Innovation Drive Ottawa, Ontario K2K 3E7 CANADA EMail: cadams@entrust.com Pat Cain BBN 70 Fawcett Street Cambridge, MA 02138 U.S.A. EMail: pcain@bbn.com Denis Pinkas Integris 68 route de Versailles B.P. 434 78430 Louveciennes FRANCE EMail: Denis.Pinkas@bull.net Robert Zuccherato Entrust, Inc. 1000 Innovation Drive Ottawa, Ontario K2K 3E7 CANADA EMail: robert.zuccherato@entrust.com Adams, et al. Standards Track [Page 19] RFC 3161 Time-Stamp Protocol (TSP) August 2001 APPENDIX A - Signature Time-stamp attribute using CMS One of the major uses of time-stamping is to time-stamp a digital signature to prove that the digital signature was created before a given time. Should the corresponding public key certificate be revoked this allows a verifier to know whether the signature was created before or after the revocation date. A sensible place to store a time-stamp is in a [CMS] structure as an unsigned attribute. This appendix defines a Signature Time-stamp attribute that may be used to time-stamp a digital signature. The following object identifier identifies the Signature Time-stamp attribute: id-aa-timeStampToken OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) aa(2) 14 } The Signature time-stamp attribute value has ASN.1 type SignatureTimeStampToken: SignatureTimeStampToken ::= TimeStampToken The value of messageImprint field within TimeStampToken shall be a hash of the value of signature field within SignerInfo for the signedData being time-stamped. APPENDIX B - Placing a Signature At a Particular Point in Time We present an example of a possible use of this general time-stamping service. It places a signature at a particular point in time, from which the appropriate certificate status information (e.g., CRLs) MUST be checked. This application is intended to be used in conjunction with evidence generated using a digital signature mechanism. Signatures can only be verified according to a non-repudiation policy. This policy MAY be implicit or explicit (i.e., indicated in the evidence provided by the signer). The non-repudiation policy can specify, among other things, the time period allowed by a signer to declare the compromise of a signature key used for the generation of digital signatures. Thus a signature may not be guaranteed to be valid until the termination of this time period. To verify a digital signature, the following basic technique may be used: Adams, et al. Standards Track [Page 20] RFC 3161 Time-Stamp Protocol (TSP) August 2001 A) Time-stamping information needs to be obtained soon after the signature has been produced (e.g., within a few minutes or hours). 1) The signature is presented to the Time Stamping Authority (TSA). The TSA then returns a TimeStampToken (TST) upon that signature. 2) The invoker of the service MUST then verify that the TimeStampToken is correct. B) The validity of the digital signature may then be verified in the following way: 1) The time-stamp token itself MUST be verified and it MUST be verified that it applies to the signature of the signer. 2) The date/time indicated by the TSA in the TimeStampToken MUST be retrieved. 3) The certificate used by the signer MUST be identified and retrieved. 4) The date/time indicated by the TSA MUST be within the validity period of the signer's certificate. 5) The revocation information about that certificate, at the date/time of the Time-Stamping operation, MUST be retrieved. 6) Should the certificate be revoked, then the date/time of revocation shall be later than the date/time indicated by the TSA. If all these conditions are successful, then the digital signature shall be declared as valid. APPENDIX C: ASN.1 Module using 1988 Syntax PKIXTSP {iso(1) identified-organization(3) dod(6) internet(1) security(5) mechanisms(5) pkix(7) id-mod(0) id-mod-tsp(13)} DEFINITIONS IMPLICIT TAGS ::= BEGIN -- EXPORTS ALL -- IMPORTS Adams, et al. Standards Track [Page 21] RFC 3161 Time-Stamp Protocol (TSP) August 2001 Extensions, AlgorithmIdentifier FROM PKIX1Explicit88 {iso(1) identified-organization(3) dod(6) internet(1) security(5) mechanisms(5) pkix(7) id-mod(0) id-pkix1-explicit-88(1)} GeneralName FROM PKIX1Implicit88 {iso(1) identified-organization(3) dod(6) internet(1) security(5) mechanisms(5) pkix(7) id-mod(0) id-pkix1-implicit-88(2)} ContentInfo FROM CryptographicMessageSyntax {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) modules(0) cms(1)} PKIFreeText FROM PKIXCMP {iso(1) identified-organization(3) dod(6) internet(1) security(5) mechanisms(5) pkix(7) id-mod(0) id-mod-cmp(9)} ; -- Locally defined OIDs -- -- eContentType for a time-stamp token id-ct-TSTInfo OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) ct(1) 4} -- 2.4.1 TimeStampReq ::= SEQUENCE { version INTEGER { v1(1) }, messageImprint MessageImprint, --a hash algorithm OID and the hash value of the data to be --time-stamped reqPolicy TSAPolicyId OPTIONAL, nonce INTEGER OPTIONAL, certReq BOOLEAN DEFAULT FALSE, extensions [0] IMPLICIT Extensions OPTIONAL } MessageImprint ::= SEQUENCE { hashAlgorithm AlgorithmIdentifier, hashedMessage OCTET STRING } TSAPolicyId ::= OBJECT IDENTIFIER -- 2.4.2 TimeStampResp ::= SEQUENCE { status PKIStatusInfo, timeStampToken TimeStampToken OPTIONAL } Adams, et al. Standards Track [Page 22] RFC 3161 Time-Stamp Protocol (TSP) August 2001 -- The status is based on the definition of status -- in section 3.2.3 of [RFC2510] PKIStatusInfo ::= SEQUENCE { status PKIStatus, statusString PKIFreeText OPTIONAL, failInfo PKIFailureInfo OPTIONAL } PKIStatus ::= INTEGER { granted (0), -- when the PKIStatus contains the value zero a TimeStampToken, as requested, is present. grantedWithMods (1), -- when the PKIStatus contains the value one a TimeStampToken, with modifications, is present. rejection (2), waiting (3), revocationWarning (4), -- this message contains a warning that a revocation is -- imminent revocationNotification (5) -- notification that a revocation has occurred } -- When the TimeStampToken is not present -- failInfo indicates the reason why the -- time-stamp request was rejected and -- may be one of the following values. PKIFailureInfo ::= BIT STRING { badAlg (0), -- unrecognized or unsupported Algorithm Identifier badRequest (2), -- transaction not permitted or supported badDataFormat (5), -- the data submitted has the wrong format timeNotAvailable (14), -- the TSA's time source is not available unacceptedPolicy (15), -- the requested TSA policy is not supported by the TSA. unacceptedExtension (16), -- the requested extension is not supported by the TSA. addInfoNotAvailable (17) -- the additional information requested could not be understood -- or is not available systemFailure (25) -- the request cannot be handled due to system failure } TimeStampToken ::= ContentInfo Adams, et al. Standards Track [Page 23] RFC 3161 Time-Stamp Protocol (TSP) August 2001 -- contentType is id-signedData as defined in [CMS] -- content is SignedData as defined in([CMS]) -- eContentType within SignedData is id-ct-TSTInfo -- eContent within SignedData is TSTInfo TSTInfo ::= SEQUENCE { version INTEGER { v1(1) }, policy TSAPolicyId, messageImprint MessageImprint, -- MUST have the same value as the similar field in -- TimeStampReq serialNumber INTEGER, -- Time-Stamping users MUST be ready to accommodate integers -- up to 160 bits. genTime GeneralizedTime, accuracy Accuracy OPTIONAL, ordering BOOLEAN DEFAULT FALSE, nonce INTEGER OPTIONAL, -- MUST be present if the similar field was present -- in TimeStampReq. In that case it MUST have the same value. tsa [0] GeneralName OPTIONAL, extensions [1] IMPLICIT Extensions OPTIONAL } Accuracy ::= SEQUENCE { seconds INTEGER OPTIONAL, millis [0] INTEGER (1..999) OPTIONAL, micros [1] INTEGER (1..999) OPTIONAL } END APPENDIX D: Access descriptors for Time-Stamping. [This annex describes an extension based on the SIA extension that will be defined in the "son-of-RFC2459". Since at the time of publication of this document, "son-of-RFC2459" is not yet available, its description is placed in an informative annex. The contents of this annex will eventually become incorporated into the son-of- RFC2459 document, at which time this annex will no longer be needed. A future version of this document will likely omit this annex and refer to son-of-RFC2459 directly.] A TSA's certificate MAY contain a Subject Information Access (SIA) extension (son of RFC2459) in order to convey the method of contacting the TSA. The accessMethod field in this extension MUST contain the OID id-ad-timestamping: The following object identifier identifies the access descriptors for time-Stamping. Adams, et al. Standards Track [Page 24] RFC 3161 Time-Stamp Protocol (TSP) August 2001 id-ad-timeStamping OBJECT IDENTIFIER ::= {iso(1) identified-organization(3) dod(6) internet(1) security(5) mechanisms(5) pkix(7) ad (48) timestamping (3)} The value of the accessLocation field defines the transport (e.g., HTTP) used to access the TSA and may contain other transport dependent information (e.g., a URL). Adams, et al. Standards Track [Page 25] RFC 3161 Time-Stamp Protocol (TSP) August 2001 Full Copyright Statement Copyright (C) The Internet Society (2001). All Rights Reserved. This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English. The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns. This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Acknowledgement Funding for the RFC Editor function is currently provided by the Internet Society. Adams, et al. Standards Track [Page 26] libxml-security-java-1.5.6/src/test/resources/log4j.properties0000644000175000017500000000164711523756371023301 0ustar tonytony# ------------------------------------------------------------------------ # # Logging Configuration # # ------------------------------------------------------------------------ # log4j.rootCategory=ERROR, LOGTXT #log4j.rootCategory=DEBUG, LOGTXT # # Logfile definitions # ######################################################################## #Console Log log4j.appender.Console=org.apache.log4j.ConsoleAppender log4j.appender.Console.Threshold=DEBUG log4j.appender.Console.layout=org.apache.log4j.PatternLayout log4j.appender.Console.layout.ConversionPattern=%-5p %C{1}:%L - %m\n log4j.appender.Console.Target=System.err #LOGTXT Log log4j.appender.LOGTXT=org.apache.log4j.FileAppender log4j.appender.LOGTXT.File=target/log.txt log4j.appender.LOGTXT.Append=true log4j.appender.LOGTXT.Threshold=DEBUG log4j.appender.LOGTXT.layout=org.apache.log4j.PatternLayout log4j.appender.LOGTXT.layout.ConversionPattern=%-5p %C{1}:%L - %m\n libxml-security-java-1.5.6/src/test/resources/com/0000755000175000017500000000000012273503733020705 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/com/pothole/0000755000175000017500000000000012273503733022357 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/com/pothole/xmldsig/0000755000175000017500000000000012273503733024026 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/com/pothole/xmldsig/xml-stylesheet.txt0000644000175000017500000004257207357332275027600 0ustar tonytonyPCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFu c2l0aW9uYWwvL0VOIj4KPGh0bWw+CjxoZWFkPgo8dGl0bGU+QXNzb2NpYXRpbmcg U3R5bGUgU2hlZXRzIHdpdGggWE1MIGRvY3VtZW50czwvdGl0bGU+CjxsaW5rIHJl bD0ic3R5bGVzaGVldCIgdHlwZT0idGV4dC9jc3MiIGhyZWY9Imh0dHA6Ly93d3cu dzMub3JnL1N0eWxlU2hlZXRzL1RSL1czQy1SRUMiPgo8c3R5bGUgdHlwZT0idGV4 dC9jc3MiPmNvZGUgeyBmb250LWZhbWlseTogbW9ub3NwYWNlIH08L3N0eWxlPgo8 L2hlYWQ+Cjxib2R5Pgo8ZGl2IGNsYXNzPSJoZWFkIj4KPGEgaHJlZj0iaHR0cDov L3d3dy53My5vcmcvIj48aW1nIHNyYz0iaHR0cDovL3d3dy53My5vcmcvSWNvbnMv V1dXL3czY19ob21lIiBhbHQ9IlczQyIgaGVpZ2h0PSI0OCIgd2lkdGg9IjcyIj48 L2E+CjxoMT5Bc3NvY2lhdGluZyBTdHlsZSBTaGVldHMgd2l0aCBYTUwgZG9jdW1l bnRzPGJyPlZlcnNpb24gMS4wPC9oMT4KPGgyPlczQyBSZWNvbW1lbmRhdGlvbiAy OSBKdW5lIDE5OTk8L2gyPgo8ZGw+CjxkdD5UaGlzIHZlcnNpb246PC9kdD4KPGRk Pgo8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzA2L1JFQy14bWwtc3R5 bGVzaGVldC0xOTk5MDYyOSI+aHR0cDovL3d3dy53My5vcmcvMTk5OS8wNi9SRUMt eG1sLXN0eWxlc2hlZXQtMTk5OTA2Mjk8L2E+Cjxicj4KPC9kZD4KPGR0PkxhdGVz dCB2ZXJzaW9uOjwvZHQ+CjxkZD4KPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcv VFIveG1sLXN0eWxlc2hlZXQiPmh0dHA6Ly93d3cudzMub3JnL1RSL3htbC1zdHls ZXNoZWV0PC9hPgo8YnI+CjwvZGQ+CjxkdD5QcmV2aW91cyB2ZXJzaW9uOjwvZHQ+ CjxkZD4KPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcvVFIvMTk5OS94bWwtc3R5 bGVzaGVldC0xOTk5MDQyOCI+aHR0cDovL3d3dy53My5vcmcvVFIvMTk5OS94bWwt c3R5bGVzaGVldC0xOTk5MDQyODwvYT4KPGJyPgo8L2RkPgo8ZHQ+RWRpdG9yOjwv ZHQ+CjxkZD4KCkphbWVzIENsYXJrCjxhIGhyZWY9Im1haWx0bzpqamNAamNsYXJr LmNvbSI+Jmx0O2pqY0BqY2xhcmsuY29tJmd0OzwvYT4KPGJyPgo8L2RkPgo8L2Rs Pgo8cCBjbGFzcz0iY29weXJpZ2h0Ij4KPGEgaHJlZj0iaHR0cDovL3d3dy53My5v cmcvQ29uc29ydGl1bS9MZWdhbC9pcHItbm90aWNlLmh0bWwjQ29weXJpZ2h0Ij4K CQlDb3B5cmlnaHQ8L2E+ICZuYnNwOyZjb3B5OyZuYnNwOyAxOTk5IDxhIGhyZWY9 Imh0dHA6Ly93d3cudzMub3JnIj5XM0M8L2E+CgkJKDxhIGhyZWY9Imh0dHA6Ly93 d3cubGNzLm1pdC5lZHUiPk1JVDwvYT4sCgkJPGEgaHJlZj0iaHR0cDovL3d3dy5p bnJpYS5mci8iPklOUklBPC9hPiwKCQk8YSBocmVmPSJodHRwOi8vd3d3LmtlaW8u YWMuanAvIj5LZWlvPC9hPiApLCBBbGwgUmlnaHRzIFJlc2VydmVkLiBXM0MKCQk8 YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9Db25zb3J0aXVtL0xlZ2FsL2lwci1u b3RpY2UuaHRtbCNMZWdhbCBEaXNjbGFpbWVyIj5saWFiaWxpdHksPC9hPjxhIGhy ZWY9Imh0dHA6Ly93d3cudzMub3JnL0NvbnNvcnRpdW0vTGVnYWwvaXByLW5vdGlj ZS5odG1sI1czQyBUcmFkZW1hcmtzIj50cmFkZW1hcms8L2E+LAoJCTxhIGhyZWY9 Imh0dHA6Ly93d3cudzMub3JnL0NvbnNvcnRpdW0vTGVnYWwvY29weXJpZ2h0LWRv Y3VtZW50cy5odG1sIj5kb2N1bWVudCB1c2UgPC9hPmFuZAoJCTxhIGhyZWY9Imh0 dHA6Ly93d3cudzMub3JnL0NvbnNvcnRpdW0vTGVnYWwvY29weXJpZ2h0LXNvZnR3 YXJlLmh0bWwiPnNvZnR3YXJlIGxpY2Vuc2luZyA8L2E+cnVsZXMgYXBwbHkuCgk8 L3A+CjxociB0aXRsZT0iU2VwYXJhdG9yIGZvciBoZWFkZXIiPgo8L2Rpdj4KPGgy Pgo8YSBuYW1lPSJhYnN0cmFjdCI+QWJzdHJhY3Q8L2E+CjwvaDI+Cgo8cD5UaGlz IGRvY3VtZW50IGFsbG93cyBhIHN0eWxlIHNoZWV0IHRvIGJlIGFzc29jaWF0ZWQg d2l0aCBhbiBYTUwKZG9jdW1lbnQgYnkgaW5jbHVkaW5nIG9uZSBvciBtb3JlIHBy b2Nlc3NpbmcgaW5zdHJ1Y3Rpb25zIHdpdGggYQp0YXJnZXQgb2YgPGNvZGU+eG1s LXN0eWxlc2hlZXQ8L2NvZGU+IGluIHRoZSBkb2N1bWVudCdzIHByb2xvZy48L3A+ Cgo8aDI+CjxhIG5hbWU9InN0YXR1cyI+U3RhdHVzIG9mIHRoaXMgZG9jdW1lbnQ8 L2E+CjwvaDI+Cgo8cD5UaGlzIGRvY3VtZW50IGhhcyBiZWVuIHJldmlld2VkIGJ5 IFczQyBNZW1iZXJzIGFuZCBvdGhlciBpbnRlcmVzdGVkCnBhcnRpZXMgYW5kIGhh cyBiZWVuIGVuZG9yc2VkIGJ5IHRoZSBEaXJlY3RvciBhcyBhIFczQyA8YSBocmVm PSJodHRwOi8vd3d3LnczLm9yZy9Db25zb3J0aXVtL1Byb2Nlc3MvI1JlY3NXM0Mi PlJlY29tbWVuZGF0aW9uPC9hPi4gSXQKaXMgYSBzdGFibGUgZG9jdW1lbnQgYW5k IG1heSBiZSB1c2VkIGFzIHJlZmVyZW5jZSBtYXRlcmlhbCBvciBjaXRlZCBhcwph IG5vcm1hdGl2ZSByZWZlcmVuY2UgZnJvbSBvdGhlciBkb2N1bWVudHMuIFczQydz IHJvbGUgaW4gbWFraW5nIHRoZQpSZWNvbW1lbmRhdGlvbiBpcyB0byBkcmF3IGF0 dGVudGlvbiB0byB0aGUgc3BlY2lmaWNhdGlvbiBhbmQgdG8KcHJvbW90ZSBpdHMg d2lkZXNwcmVhZCBkZXBsb3ltZW50LiBUaGlzIGVuaGFuY2VzIHRoZSBmdW5jdGlv bmFsaXR5IGFuZAppbnRlcm9wZXJhYmlsaXR5IG9mIHRoZSBXZWIuPC9wPgoKPHA+ VGhlIGxpc3Qgb2Yga25vd24gZXJyb3JzIGluIHRoaXMgc3BlY2lmaWNhdGlvbnMg aXMgYXZhaWxhYmxlIGF0CjxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkv MDYvUkVDLXhtbC1zdHlsZXNoZWV0LTE5OTkwNjI5L2VycmF0YSI+aHR0cDovL3d3 dy53My5vcmcvVFIvMTk5OS94bWwtc3R5bGVzaGVldC0xOTk5MDYyOS9lcnJhdGE8 L2E+LjwvcD4KCjxwPkNvbW1lbnRzIG9uIHRoaXMgc3BlY2lmaWNhdGlvbiBtYXkg YmUgc2VudCB0byAmbHQ7PGEgaHJlZj0ibWFpbHRvOnd3dy14bWwtc3R5bGVzaGVl dC1jb21tZW50c0B3My5vcmciPnd3dy14bWwtc3R5bGVzaGVldC1jb21tZW50c0B3 My5vcmc8L2E+Jmd0Oy4gVGhlIGFyY2hpdmUgb2YgcHVibGljCmNvbW1lbnRzIGlz IGF2YWlsYWJsZSBhdCA8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9BcmNoaXZl cy9QdWJsaWMvd3d3LXhtbC1zdHlsZXNoZWV0LWNvbW1lbnRzIj5odHRwOi8vdzMu b3JnL0FyY2hpdmVzL1B1YmxpYy93d3cteG1sLXN0eWxlc2hlZXQtY29tbWVudHM8 L2E+LjwvcD4KCjxwPkEgbGlzdCBvZiBjdXJyZW50IFczQyBSZWNvbW1lbmRhdGlv bnMgYW5kIG90aGVyIHRlY2huaWNhbCBkb2N1bWVudHMKY2FuIGJlIGZvdW5kIGF0 IDxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3JnL1RSIj5odHRwOi8vd3d3LnczLm9y Zy9UUjwvYT4uPC9wPgoKPHA+VGhlIFdvcmtpbmcgR3JvdXAgZXhwZWN0cyBhZGRp dGlvbmFsIG1lY2hhbmlzbXMgZm9yIGxpbmtpbmcgc3R5bGUKc2hlZXRzIHRvIFhN TCBkb2N1bWVudCB0byBiZSBkZWZpbmVkIGluIGEgZnV0dXJlIHNwZWNpZmljYXRp b24uPC9wPgoKPHA+VGhlIHVzZSBvZiBYTUwgcHJvY2Vzc2luZyBpbnN0cnVjdGlv bnMgaW4gdGhpcyBzcGVjaWZpY2F0aW9uIHNob3VsZApub3QgYmUgdGFrZW4gYXMg YSBwcmVjZWRlbnQuICBUaGUgVzNDIGRvZXMgbm90IGFudGljaXBhdGUgcmVjb21t ZW5kaW5nCnRoZSB1c2Ugb2YgcHJvY2Vzc2luZyBpbnN0cnVjdGlvbnMgaW4gYW55 IGZ1dHVyZSBzcGVjaWZpY2F0aW9uLiAgVGhlCjxhIGhyZWY9IiNyYXRpb25hbGUi PlJhdGlvbmFsZTwvYT4gZXhwbGFpbnMgd2h5IHRoZXkgd2VyZSB1c2VkIGluCnRo aXMgc3BlY2lmaWNhdGlvbi48L3A+Cgo8cD5UaGlzIGRvY3VtZW50IHdhcyBwcm9k dWNlZCBhcyBwYXJ0IG9mIHRoZSA8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9Y TUwvQWN0aXZpdHkiPlczQyBYTUwgQWN0aXZpdHk8L2E+LjwvcD4KCgo8aDI+Cjxh IG5hbWU9ImNvbnRlbnRzIj5UYWJsZSBvZiBjb250ZW50czwvYT4KPC9oMj4xIDxh IGhyZWY9IiNUaGUgeG1sLXN0eWxlc2hlZXQgcHJvY2Vzc2luZyBpbnN0cnVjdGlv biI+VGhlIHhtbC1zdHlsZXNoZWV0IHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb248L2E+ Cjxicj4KPGgzPkFwcGVuZGljZXM8L2gzPkEgPGEgaHJlZj0iI1JlZmVyZW5jZXMi PlJlZmVyZW5jZXM8L2E+Cjxicj5CIDxhIGhyZWY9IiNyYXRpb25hbGUiPlJhdGlv bmFsZTwvYT4KPGJyPgo8aHI+Cgo8aDI+CjxhIG5hbWU9IlRoZSB4bWwtc3R5bGVz aGVldCBwcm9jZXNzaW5nIGluc3RydWN0aW9uIj48L2E+MSBUaGUgPGNvZGU+eG1s LXN0eWxlc2hlZXQ8L2NvZGU+IHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb248L2gyPgoK PHA+U3R5bGUgU2hlZXRzIGNhbiBiZSBhc3NvY2lhdGVkIHdpdGggYW4gWE1MPGEg aHJlZj0iI1hNTCI+W1hNTDEwXTwvYT4KZG9jdW1lbnQgYnkgdXNpbmcgYSBwcm9j ZXNzaW5nIGluc3RydWN0aW9uIHdob3NlIHRhcmdldCBpcwo8Y29kZT54bWwtc3R5 bGVzaGVldDwvY29kZT4uICBUaGlzIHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb24gZm9s bG93cyB0aGUKYmVoYXZpb3VyIG9mIHRoZSBIVE1MIDQuMCA8Y29kZT4mbHQ7TElO SwpSRUw9InN0eWxlc2hlZXQiJmd0OzwvY29kZT48YSBocmVmPSIjSFRNTCI+W0hU TUw0MF08L2E+LjwvcD4KCjxwPlRoZSA8Y29kZT54bWwtc3R5bGVzaGVldDwvY29k ZT4gcHJvY2Vzc2luZyBpbnN0cnVjdGlvbiBpcyBwYXJzZWQgaW4KdGhlIHNhbWUg d2F5IGFzIGEgc3RhcnQtdGFnLCB3aXRoIHRoZSBleGNlcHRpb24gdGhhdCBlbnRp dGllcyBvdGhlcgp0aGFuIHByZWRlZmluZWQgZW50aXRpZXMgbXVzdCBub3QgYmUg cmVmZXJlbmNlZC48L3A+Cgo8cD5UaGUgZm9sbG93aW5nIGdyYW1tYXIgaXMgZ2l2 ZW4gdXNpbmcgdGhlIHNhbWUgbm90YXRpb24gYXMgdGhlCmdyYW1tYXIgaW4gdGhl IFhNTCBSZWNvbW1lbmRhdGlvbjxhIGhyZWY9IiNYTUwiPltYTUwxMF08L2E+LiAg U3ltYm9scyBpbiB0aGUKZ3JhbW1hciB0aGF0IGFyZSBub3QgZGVmaW5lZCBoZXJl IGFyZSBkZWZpbmVkIGluIHRoZSBYTUwKUmVjb21tZW5kYXRpb24uPC9wPgoKPGg1 PnhtbC1zdHlsZXNoZWV0IHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb248L2g1Pgo8dGFi bGUgY2xhc3M9InNjcmFwIj4KPHRib2R5Pgo8dHIgdmFsaWduPSJiYXNlbGluZSI+ Cjx0ZD4KPGEgbmFtZT0iTlQtU3R5bGVTaGVldFBJIj48L2E+WzFdJm5ic3A7Jm5i c3A7Jm5ic3A7PC90ZD4KPHRkPlN0eWxlU2hlZXRQSTwvdGQ+Cjx0ZD4mbmJzcDsm bmJzcDsmbmJzcDs6Oj0mbmJzcDsmbmJzcDsmbmJzcDs8L3RkPgo8dGQ+JyZsdDs/ eG1sLXN0eWxlc2hlZXQnICg8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9UUi9S RUMteG1sI05ULVMiPlM8L2E+IDxhIGhyZWY9IiNOVC1Qc2V1ZG9BdHQiPlBzZXVk b0F0dDwvYT4pKiA8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9UUi9SRUMteG1s I05ULVMiPlM8L2E+PyAnPyZndDsnPC90ZD4KPHRkPgo8L3RkPgo8L3RyPgo8dHIg dmFsaWduPSJiYXNlbGluZSI+Cjx0ZD4KPGEgbmFtZT0iTlQtUHNldWRvQXR0Ij48 L2E+WzJdJm5ic3A7Jm5ic3A7Jm5ic3A7PC90ZD4KPHRkPlBzZXVkb0F0dDwvdGQ+ Cjx0ZD4mbmJzcDsmbmJzcDsmbmJzcDs6Oj0mbmJzcDsmbmJzcDsmbmJzcDs8L3Rk Pgo8dGQ+CjxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3JnL1RSL1JFQy14bWwjTlQt TmFtZSI+TmFtZTwvYT4gPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcvVFIvUkVD LXhtbCNOVC1TIj5TPC9hPj8gJz0nIDxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3Jn L1RSL1JFQy14bWwjTlQtUyI+UzwvYT4/IDxhIGhyZWY9IiNOVC1Qc2V1ZG9BdHRW YWx1ZSI+UHNldWRvQXR0VmFsdWU8L2E+CjwvdGQ+Cjx0ZD4KPC90ZD4KPC90cj4K PHRyIHZhbGlnbj0iYmFzZWxpbmUiPgo8dGQ+CjxhIG5hbWU9Ik5ULVBzZXVkb0F0 dFZhbHVlIj48L2E+WzNdJm5ic3A7Jm5ic3A7Jm5ic3A7PC90ZD4KPHRkPlBzZXVk b0F0dFZhbHVlPC90ZD4KPHRkPiZuYnNwOyZuYnNwOyZuYnNwOzo6PSZuYnNwOyZu YnNwOyZuYnNwOzwvdGQ+Cjx0ZD4oJyInIChbXiImbHQ7JmFtcDtdIHwgPGEgaHJl Zj0iaHR0cDovL3d3dy53My5vcmcvVFIvUkVDLXhtbCNOVC1DaGFyUmVmIj5DaGFy UmVmPC9hPiB8IDxhIGhyZWY9IiNOVC1QcmVkZWZFbnRpdHlSZWYiPlByZWRlZkVu dGl0eVJlZjwvYT4pKiAnIic8L3RkPgo8dGQ+CjwvdGQ+CjwvdHI+Cjx0ciB2YWxp Z249ImJhc2VsaW5lIj4KPHRkPgo8L3RkPgo8dGQ+CjwvdGQ+Cjx0ZD4KPC90ZD4K PHRkPnwgIiciIChbXicmbHQ7JmFtcDtdIHwgPGEgaHJlZj0iaHR0cDovL3d3dy53 My5vcmcvVFIvUkVDLXhtbCNOVC1DaGFyUmVmIj5DaGFyUmVmPC9hPiB8IDxhIGhy ZWY9IiNOVC1QcmVkZWZFbnRpdHlSZWYiPlByZWRlZkVudGl0eVJlZjwvYT4pKiAi JyIpPC90ZD4KPHRkPgo8L3RkPgo8L3RyPgo8dHIgdmFsaWduPSJiYXNlbGluZSI+ Cjx0ZD4KPC90ZD4KPHRkPgo8L3RkPgo8dGQ+CjwvdGQ+Cjx0ZD4tICg8YSBocmVm PSJodHRwOi8vd3d3LnczLm9yZy9UUi9SRUMteG1sI05ULUNoYXIiPkNoYXI8L2E+ KiAnPyZndDsnIDxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3JnL1RSL1JFQy14bWwj TlQtQ2hhciI+Q2hhcjwvYT4qKTwvdGQ+Cjx0ZD4KPC90ZD4KPC90cj4KPHRyIHZh bGlnbj0iYmFzZWxpbmUiPgo8dGQ+CjxhIG5hbWU9Ik5ULVByZWRlZkVudGl0eVJl ZiI+PC9hPls0XSZuYnNwOyZuYnNwOyZuYnNwOzwvdGQ+Cjx0ZD5QcmVkZWZFbnRp dHlSZWY8L3RkPgo8dGQ+Jm5ic3A7Jm5ic3A7Jm5ic3A7Ojo9Jm5ic3A7Jm5ic3A7 Jm5ic3A7PC90ZD4KPHRkPicmYW1wO2FtcDsnIHwgJyZhbXA7bHQ7JyB8ICcmYW1w O2d0OycgfCAnJmFtcDtxdW90OycgfCAnJmFtcDthcG9zOyc8L3RkPgo8dGQ+Cjwv dGQ+CjwvdHI+CjwvdGJvZHk+CjwvdGFibGU+Cgo8cD5JbiA8YSBocmVmPSIjTlQt UHNldWRvQXR0VmFsdWUiPlBzZXVkb0F0dFZhbHVlPC9hPiwgYSA8YSBocmVmPSJo dHRwOi8vd3d3LnczLm9yZy9UUi9SRUMteG1sI05ULUNoYXJSZWYiPkNoYXJSZWY8 L2E+IG9yIGEgPGEgaHJlZj0iI05ULVByZWRlZkVudGl0eVJlZiI+UHJlZGVmRW50 aXR5UmVmPC9hPiBpcyBpbnRlcnByZXRlZCBpbiB0aGUKc2FtZSBtYW5uZXIgYXMg aW4gYSBub3JtYWwgWE1MIGF0dHJpYnV0ZSB2YWx1ZS4gIFRoZSBhY3R1YWwgdmFs dWUgb2YKdGhlIHBzZXVkby1hdHRyaWJ1dGUgaXMgdGhlIHZhbHVlIGFmdGVyIGVh Y2ggcmVmZXJlbmNlIGlzIHJlcGxhY2VkIGJ5CnRoZSBjaGFyYWN0ZXIgaXQgcmVm ZXJlbmNlcy4gIFRoaXMgcmVwbGFjZW1lbnQgaXMgbm90IHBlcmZvcm1lZAphdXRv bWF0aWNhbGx5IGJ5IGFuIFhNTCBwcm9jZXNzb3IuPC9wPgoKPHA+VGhlIDxjb2Rl PnhtbC1zdHlsZXNoZWV0PC9jb2RlPiBwcm9jZXNzaW5nIGluc3RydWN0aW9uIGlz IGFsbG93ZWQKb25seSBpbiB0aGUgcHJvbG9nIG9mIGFuIFhNTCBkb2N1bWVudC4g VGhlIHN5bnRheCBvZiBYTUwgY29uc3RyYWlucwp3aGVyZSBwcm9jZXNzaW5nIGlu c3RydWN0aW9ucyBhcmUgYWxsb3dlZCBpbiB0aGUgcHJvbG9nOyB0aGUKPGNvZGU+ eG1sLXN0eWxlc2hlZXQ8L2NvZGU+IHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb24gaXMg YWxsb3dlZCBhbnl3aGVyZQppbiB0aGUgcHJvbG9nIHRoYXQgbWVldHMgdGhlc2Ug Y29uc3RyYWludHMuPC9wPgoKPGJsb2NrcXVvdGU+CjxiPk5PVEU6IDwvYj5JZiB0 aGUgPGNvZGU+eG1sLXN0eWxlc2hlZXQ8L2NvZGU+IHByb2Nlc3NpbmcgaW5zdHJ1 Y3Rpb24Kb2NjdXJzIGluIHRoZSBleHRlcm5hbCBEVEQgc3Vic2V0IG9yIGluIGEg cGFyYW1ldGVyIGVudGl0eSwgaXQgaXMKcG9zc2libGUgdGhhdCBpdCBtYXkgbm90 IGJlIHByb2Nlc3NlZCBieSBhIG5vbi12YWxpZGF0aW5nIFhNTApwcm9jZXNzb3Ig KHNlZSA8YSBocmVmPSIjWE1MIj5bWE1MMTBdPC9hPikuPC9ibG9ja3F1b3RlPgoK PHA+VGhlIGZvbGxvd2luZyBwc2V1ZG8gYXR0cmlidXRlcyBhcmUgZGVmaW5lZDwv cD4KCjxwcmU+aHJlZiBDREFUQSAjUkVRVUlSRUQKdHlwZSBDREFUQSAjUkVRVUlS RUQKdGl0bGUgQ0RBVEEgI0lNUExJRUQKbWVkaWEgQ0RBVEEgI0lNUExJRUQKY2hh cnNldCBDREFUQSAjSU1QTElFRAphbHRlcm5hdGUgKHllc3xubykgIm5vIjwvcHJl PgoKPHA+VGhlIHNlbWFudGljcyBvZiB0aGUgcHNldWRvLWF0dHJpYnV0ZXMgYXJl IGV4YWN0bHkgYXMgd2l0aAo8Y29kZT4mbHQ7TElOSyBSRUw9InN0eWxlc2hlZXQi Jmd0OzwvY29kZT4gaW4gSFRNTCA0LjAsIHdpdGggdGhlCmV4Y2VwdGlvbiBvZiB0 aGUgPGNvZGU+YWx0ZXJuYXRlPC9jb2RlPiBwc2V1ZG8tYXR0cmlidXRlLiAgSWYK PGNvZGU+YWx0ZXJuYXRlPSJ5ZXMiPC9jb2RlPiBpcyBzcGVjaWZpZWQsIHRoZW4g dGhlIHByb2Nlc3NpbmcKaW5zdHJ1Y3Rpb24gaGFzIHRoZSBzZW1hbnRpY3Mgb2Yg PGNvZGU+Jmx0O0xJTksgUkVMPSJhbHRlcm5hdGUKc3R5bGVzaGVldCImZ3Q7PC9j b2RlPiBpbnN0ZWFkIG9mIDxjb2RlPiZsdDtMSU5LClJFTD0ic3R5bGVzaGVldCIm Z3Q7PC9jb2RlPi48L3A+Cgo8YmxvY2txdW90ZT4KPGI+Tk9URTogPC9iPlNpbmNl IHRoZSB2YWx1ZSBvZiB0aGUgPGNvZGU+aHJlZjwvY29kZT4gYXR0cmlidXRlIGlz IGEgVVJJCnJlZmVyZW5jZSwgaXQgbWF5IGJlIGEgcmVsYXRpdmUgVVJJIGFuZCBp dCBtYXkgY29udGFpbiBhIGZyYWdtZW50CmlkZW50aWZpZXIuIEluIHBhcnRpY3Vs YXIgdGhlIFVSSSByZWZlcmVuY2UgbWF5IGNvbnRhaW4gb25seSBhCmZyYWdtZW50 IGlkZW50aWZpZXIuICBTdWNoIGEgVVJJIHJlZmVyZW5jZSBpcyBhIHJlZmVyZW5j ZSB0byBhIHBhcnQgb2YKdGhlIGRvY3VtZW50IGNvbnRhaW5pbmcgdGhlIDxjb2Rl PnhtbC1zdHlsZXNoZWV0PC9jb2RlPiBwcm9jZXNzaW5nCmluc3RydWN0aW9uIChz ZWUgPGEgaHJlZj0iI1JGQzIzOTYiPltSRkMyMzk2XTwvYT4pLiBUaGUgY29uc2Vx dWVuY2UgaXMgdGhhdCB0aGUKPGNvZGU+eG1sLXN0eWxlc2hlZXQ8L2NvZGU+IHBy b2Nlc3NpbmcgaW5zdHJ1Y3Rpb24gYWxsb3dzIHN0eWxlIHNoZWV0cwp0byBiZSBl bWJlZGRlZCBpbiB0aGUgc2FtZSBkb2N1bWVudCBhcyB0aGUgPGNvZGU+eG1sLXN0 eWxlc2hlZXQ8L2NvZGU+CnByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb24uPC9ibG9ja3F1 b3RlPgoKPHA+SW4gc29tZSBjYXNlcywgc3R5bGUgc2hlZXRzIG1heSBiZSBsaW5r ZWQgd2l0aCBhbiBYTUwgZG9jdW1lbnQgYnkKbWVhbnMgZXh0ZXJuYWwgdG8gdGhl IGRvY3VtZW50LiBGb3IgZXhhbXBsZSwgZWFybGllciB2ZXJzaW9ucyBvZiBIVFRQ CjxhIGhyZWY9IiNSRkMyMDY4Ij5bUkZDMjA2OF08L2E+IChzZWN0aW9uIDE5LjYu Mi40KSBhbGxvd2VkIHN0eWxlIHNoZWV0cyB0byBiZQphc3NvY2lhdGVkIHdpdGgg WE1MIGRvY3VtZW50cyBieSBtZWFucyBvZiB0aGUgPGNvZGU+TGluazwvY29kZT4K aGVhZGVyLiAgQW55IGxpbmtzIHRvIHN0eWxlIHNoZWV0cyB0aGF0IGFyZSBzcGVj aWZpZWQgZXh0ZXJuYWxseSB0byB0aGUKZG9jdW1lbnQgYXJlIGNvbnNpZGVyZWQg dG8gb2NjdXIgYmVmb3JlIHRoZSBsaW5rcyBzcGVjaWZpZWQgYnkgdGhlCjxjb2Rl PnhtbC1zdHlsZXNoZWV0PC9jb2RlPiBwcm9jZXNzaW5nIGluc3RydWN0aW9ucy4g IFRoaXMgaXMgdGhlIHNhbWUKYXMgaW4gSFRNTCA0LjAgKHNlZSA8YSBocmVmPSJo dHRwOi8vd3d3LnczLm9yZy9UUi9SRUMtaHRtbDQwL3ByZXNlbnQvc3R5bGVzLmh0 bWwjaC0xNC42Ij5zZWN0aW9uCjE0LjY8L2E+KS48L3A+Cgo8cD5IZXJlIGFyZSBz b21lIGV4YW1wbGVzIGZyb20gSFRNTCA0LjAgd2l0aCB0aGUgY29ycmVzcG9uZGlu Zwpwcm9jZXNzaW5nIGluc3RydWN0aW9uOjwvcD4KCjxwcmU+Jmx0O0xJTksgaHJl Zj0ibXlzdHlsZS5jc3MiIHJlbD0ic3R5bGUgc2hlZXQiIHR5cGU9InRleHQvY3Nz IiZndDsKJmx0Oz94bWwtc3R5bGVzaGVldCBocmVmPSJteXN0eWxlLmNzcyIgdHlw ZT0idGV4dC9jc3MiPyZndDsKCiZsdDtMSU5LIGhyZWY9Im15c3R5bGUuY3NzIiB0 aXRsZT0iQ29tcGFjdCIgcmVsPSJzdHlsZXNoZWV0Igp0eXBlPSJ0ZXh0L2NzcyIm Z3Q7CiZsdDs/eG1sLXN0eWxlc2hlZXQgaHJlZj0ibXlzdHlsZS5jc3MiIHRpdGxl PSJDb21wYWN0IiB0eXBlPSJ0ZXh0L2NzcyI/Jmd0OwoKJmx0O0xJTksgaHJlZj0i bXlzdHlsZS5jc3MiIHRpdGxlPSJNZWRpdW0iIHJlbD0iYWx0ZXJuYXRlIHN0eWxl c2hlZXQiCnR5cGU9InRleHQvY3NzIiZndDsKJmx0Oz94bWwtc3R5bGVzaGVldCBh bHRlcm5hdGU9InllcyIgaHJlZj0ibXlzdHlsZS5jc3MiIHRpdGxlPSJNZWRpdW0i CnR5cGU9InRleHQvY3NzIj8mZ3Q7PC9wcmU+Cgo8cD5NdWx0aXBsZSA8Y29kZT54 bWwtc3R5bGVzaGVldDwvY29kZT4gcHJvY2Vzc2luZyBpbnN0cnVjdGlvbnMgYXJl CmFsc28gYWxsb3dlZCB3aXRoIGV4YWN0bHkgdGhlIHNhbWUgc2VtYW50aWNzIGFz IHdpdGggPGNvZGU+TElOSwpSRUw9InN0eWxlc2hlZXQiPC9jb2RlPi4gRm9yIGV4 YW1wbGUsPC9wPgoKPHByZT4mbHQ7TElOSyByZWw9ImFsdGVybmF0ZSBzdHlsZXNo ZWV0IiB0aXRsZT0iY29tcGFjdCIgaHJlZj0ic21hbGwtYmFzZS5jc3MiCnR5cGU9 InRleHQvY3NzIiZndDsKJmx0O0xJTksgcmVsPSJhbHRlcm5hdGUgc3R5bGVzaGVl dCIgdGl0bGU9ImNvbXBhY3QiIGhyZWY9InNtYWxsLWV4dHJhcy5jc3MiCnR5cGU9 InRleHQvY3NzIiZndDsKJmx0O0xJTksgcmVsPSJhbHRlcm5hdGUgc3R5bGVzaGVl dCIgdGl0bGU9ImJpZyBwcmludCIgaHJlZj0iYmlncHJpbnQuY3NzIgp0eXBlPSJ0 ZXh0L2NzcyImZ3Q7CiZsdDtMSU5LIHJlbD0ic3R5bGVzaGVldCIgaHJlZj0iY29t bW9uLmNzcyIgdHlwZT0idGV4dC9jc3MiJmd0OzwvcHJlPgoKPHA+d291bGQgYmUg ZXF1aXZhbGVudCB0bzo8L3A+Cgo8cHJlPiZsdDs/eG1sLXN0eWxlc2hlZXQgYWx0 ZXJuYXRlPSJ5ZXMiIHRpdGxlPSJjb21wYWN0IiBocmVmPSJzbWFsbC1iYXNlLmNz cyIKdHlwZT0idGV4dC9jc3MiPyZndDsKJmx0Oz94bWwtc3R5bGVzaGVldCBhbHRl cm5hdGU9InllcyIgdGl0bGU9ImNvbXBhY3QiIGhyZWY9InNtYWxsLWV4dHJhcy5j c3MiCnR5cGU9InRleHQvY3NzIj8mZ3Q7CiZsdDs/eG1sLXN0eWxlc2hlZXQgYWx0 ZXJuYXRlPSJ5ZXMiIHRpdGxlPSJiaWcgcHJpbnQiIGhyZWY9ImJpZ3ByaW50LmNz cyIKdHlwZT0idGV4dC9jc3MiPyZndDsKJmx0Oz94bWwtc3R5bGVzaGVldCBocmVm PSJjb21tb24uY3NzIiB0eXBlPSJ0ZXh0L2NzcyI/Jmd0OzwvcHJlPgoKCgo8aHIg dGl0bGU9IlNlcGFyYXRvciBmcm9tIGZvb3RlciI+Cgo8aDI+CjxhIG5hbWU9IlJl ZmVyZW5jZXMiPjwvYT5BIFJlZmVyZW5jZXM8L2gyPgoKPGRsPgoKPGR0Pgo8YSBu YW1lPSJIVE1MIj5IVE1MNDA8L2E+CjwvZHQ+CjxkZD5Xb3JsZCBXaWRlIFdlYgpD b25zb3J0aXVtLiA8aT5IVE1MIDQuMCBTcGVjaWZpY2F0aW9uLjwvaT4gVzNDIFJl Y29tbWVuZGF0aW9uLiBTZWUKPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcvVFIv UkVDLWh0bWw0MCI+aHR0cDovL3d3dy53My5vcmcvVFIvUkVDLWh0bWw0MDwvYT4K PC9kZD4KCjxkdD4KPGEgbmFtZT0iUkZDMjA2OCI+UkZDMjA2ODwvYT4KPC9kdD4K PGRkPlIuIEZpZWxkaW5nLCBKLiBHZXR0eXMsIEouIE1vZ3VsLApILiBGcnlzdHlr IE5pZWxzZW4sIGFuZCBULiBCZXJuZXJzLUxlZS4gIDxpPkh5cGVydGV4dCBUcmFu c2ZlcgpQcm90b2NvbCAtLSBIVFRQLzEuMS48L2k+LiBJRVRGIFJGQyAyMDY4LiBT ZWUgPGEgaHJlZj0iaHR0cDovL3d3dy5pZXRmLm9yZy9yZmMvcmZjMjA2OC50eHQi Pmh0dHA6Ly93d3cuaWV0Zi5vcmcvcmZjL3JmYzIwNjgudHh0PC9hPi48L2RkPgoK PGR0Pgo8YSBuYW1lPSJSRkMyMzk2Ij5SRkMyMzk2PC9hPgo8L2R0Pgo8ZGQ+VC4g QmVybmVycy1MZWUsIFIuIEZpZWxkaW5nLCBhbmQKTC4gTWFzaW50ZXIuICA8aT5V bmlmb3JtIFJlc291cmNlIElkZW50aWZpZXJzIChVUkkpOiBHZW5lcmljClN5bnRh eDwvaT4uIElFVEYgUkZDIDIzOTYuIFNlZSA8YSBocmVmPSJodHRwOi8vd3d3Lmll dGYub3JnL3JmYy9yZmMyMzk2LnR4dCI+aHR0cDovL3d3dy5pZXRmLm9yZy9yZmMv cmZjMjM5Ni50eHQ8L2E+LjwvZGQ+Cgo8ZHQ+CjxhIG5hbWU9IlhNTCI+WE1MMTA8 L2E+CjwvZHQ+CjxkZD5Xb3JsZCBXaWRlIFdlYiBDb25zb3J0aXVtLiA8aT5FeHRl bnNpYmxlCk1hcmt1cCBMYW5ndWFnZSAoWE1MKSAxLjAuPC9pPiBXM0MgUmVjb21t ZW5kYXRpb24uIFNlZSA8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9UUi8xOTk4 L1JFQy14bWwtMTk5ODAyMTAiPmh0dHA6Ly93d3cudzMub3JnL1RSLzE5OTgvUkVD LXhtbC0xOTk4MDIxMDwvYT4KPC9kZD4KCjwvZGw+CgoKCgo8aDI+CjxhIG5hbWU9 InJhdGlvbmFsZSI+PC9hPkIgUmF0aW9uYWxlPC9oMj4KCjxwPlRoZXJlIHdhcyBh biB1cmdlbnQgcmVxdWlyZW1lbnQgZm9yIGEgc3BlY2lmaWNhdGlvbiBmb3Igc3R5 bGUgc2hlZXQKbGlua2luZyB0aGF0IGNvdWxkIGJlIGNvbXBsZXRlZCBpbiB0aW1l IGZvciB0aGUgbmV4dCByZWxlYXNlIGZyb20KbWFqb3IgYnJvd3NlciB2ZW5kb3Jz LiAgT25seSBieSBjaG9vc2luZyBhIHNpbXBsZSBtZWNoYW5pc20gY2xvc2VseQpi YXNlZCBvbiBhIHByb3ZlbiBleGlzdGluZyBtZWNoYW5pc20gY291bGQgdGhlIHNw ZWNpZmljYXRpb24gYmUKY29tcGxldGVkIGluIHRpbWUgdG8gbWVldCB0aGlzIHJl cXVpcmVtZW50LjwvcD4KCjxwPlVzZSBvZiBhIHByb2Nlc3NpbmcgaW5zdHJ1Y3Rp b24gYXZvaWRzIHBvbGx1dGluZyB0aGUgbWFpbiBkb2N1bWVudApzdHJ1Y3R1cmUg d2l0aCBhcHBsaWNhdGlvbiBzcGVjaWZpYyBwcm9jZXNzaW5nIGluZm9ybWF0aW9u LjwvcD4KCjxwPlRoZSBtZWNoYW5pc20gY2hvc2VuIGZvciB0aGlzIHZlcnNpb24g b2YgdGhlIHNwZWNpZmljYXRpb24gaXMgbm90IGEKY29uc3RyYWludCBvbiB0aGUg YWRkaXRpb25hbCBtZWNoYW5pc21zIHBsYW5uZWQgZm9yIGZ1dHVyZSB2ZXJzaW9u cy4KVGhlcmUgaXMgbm8gZXhwZWN0YXRpb24gdGhhdCB0aGVzZSB3aWxsIHVzZSBw cm9jZXNzaW5nIGluc3RydWN0aW9uczsKaW5kZWVkIHRoZXkgbWF5IG5vdCBpbmNs dWRlIHRoZSBsaW5raW5nIGluZm9ybWF0aW9uIGluIHRoZSBzb3VyY2UKZG9jdW1l bnQuPC9wPgoKCgoKPC9ib2R5Pgo8L2h0bWw+Cg== libxml-security-java-1.5.6/src/test/resources/com/rsasecurity/0000755000175000017500000000000012273503733023262 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/com/rsasecurity/bdournaee/0000755000175000017500000000000012273503733025226 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/com/rsasecurity/bdournaee/certj201_enveloping.xml0000644000175000017500000000214507434426003031527 0ustar tonytony ikRJTZzM7uWpaXtmIcJyTwmt8Qw= dDA7vm8Kss5sLocYMg/lWdUDYVsfTQJ8QfmALKDFr3BrARmBZBqAOVffS2Xw/dlYeQBfUWPINv7/ ciYjUz0xCg== uHlPl0BIKYNLN6c22IYwxJYYFV6g8Oxk7ZlyiqFi/DRbDW3e5b5QBNxUof0QMaCfgYGYQshtTtQH 2Ft5PAFZ0Q== EQ== foo libxml-security-java-1.5.6/src/test/resources/com/rsasecurity/bdournaee/certj201_enveloped.xml0000644000175000017500000000210707434426003031340 0ustar tonytony foo 1wFIlW0si1FB2G8Ak7LdC9YWZuE= oAhBlLby9ysCpZZ3A+APjRX6Pf763RwgBxv5MBUfPrBgO9w9ZUCmaVNm8s3VmcoBxCzA+yaHMw0X wi8YdLtfvQ== 19GikKwZG8NFt6TRwnD1zUbj7dIp5WYj8gqk4KUIio7pd9//vVnPzF2QLBUjb2PK6DJf0kZkUpHv 7RwklU9snQ== EQ== libxml-security-java-1.5.6/src/test/resources/com/phaos/0000755000175000017500000000000012273503733022017 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/0000755000175000017500000000000012273503733025703 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/document.xml0000755000175000017500000000025210372164212030236 0ustar tonytony Alfonso Soriano 2B New York Yankees libxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/certs/0000755000175000017500000000000012273503733027023 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/certs/dsa-cert.der0000755000175000017500000000162310372164212031217 0ustar tonytony00M0 *H80|1 0 UUS10UNew York10UNew York10U Phaos Technology10U  Engineering10U Test CA (DSA)0 020429191752Z 120426191752Z01 0 UUS10UNew York10UNew York10U Phaos Technology10U  Engineering10UTest Client (DSA)00+*H80Yjz6X:ԟO\zlƤ{_u?FF;wq?`; 9U j.kΉEVJJS.w~b%wG@VB&8ef+D|g Y@j)In L#a47f.^0\0U00U0U0tech@phaos.com0U3 QpZ8gނ00  *H cEAMOB5!y2>a.|usrꖽC{<%IS{PPg}2*w̜pow@ AI-kRQFaQw[Y,Iƪklibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/certs/rsa-cert.der0000755000175000017500000000132410372164212031233 0ustar tonytony009BA0  *H 0|1 0 UUS10UNew York10UNew York10U Phaos Technology10U  Engineering10U Test CA (RSA)0 020429191640Z 120426191640Z01 0 UUS10UNew York10UNew York10U Phaos Technology10U  Engineering10UTest Client (RSA)00  *H 0}/#ȏ!GM;bb.s[;MOd`܀1S- |Ÿه/ x=>&Z(j'ꌗSO/Lj1'OCk3,R6G!S2m[0Y0 U00U0U0tech@phaos.com0U TiTN Eo0  *H l*/$߫QPr }m6q!󋉭A3C_QE_{QQl, B}t:p!1`ˡ z[#*&/yɰaDWa/MMlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/certs/enc-rsa-key.der0000755000175000017500000000124610372164212031634 0ustar tonytony00 *H  0{"*RxWrů}ZD> A4~HC/J:Չj羐HRmz^*{MIdR!]QeB_vđ}ă?HF\HqҷD)1ĀHOᗋrg^=H`e >q);4Q\sapYOXZlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/certs/crl.der0000755000175000017500000000064210372164212030275 0ustar tonytony000  *H 0|1 0 UUS10UNew York10UNew York10U Phaos Technology10U  Engineering10U Test CA (RSA) 020429191928Z 120426191928Z0$0"BA 020429191928Z0 0 U 10/0 U-0U#03 QpZ8gނ00  *H @h^ECƷS:q [a}^X|4LpQm ?yzM w81Pr1A6%L*qrqX#STB-WKy=ilglibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/certs/enc-dsa-key.der0000755000175000017500000000056610372164212031622 0ustar tonytony0r0 *H  0P6ƑԳ2q"IWI  d.:rFr?1;UC.4nzŮ]^4ˋ ;FU././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-hmac-sha1-exclusive-c14n-enveloped.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-hmac-sha1-excl0000755000175000017500000000152610372164212032320 0ustar tonytony Alfonso Soriano 2B New York Yankees nDF2V/bzRd0VE3EwShWtsBzTEDc=KOKmDJ7emm1ESMBujg88B8g/Rd8=././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-manifest-x509-data.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-manifest-x0000755000175000017500000001043710372164212032464 0ustar tonytonyNIYWGr1CiWC02cfck47Xf/UM9AA=E3tz123wD0lO8VwhVEBfFTsD5gc0Bplx6YtVuDM0cUJDHb5F+DiuxGugGqIt+CKUklSO2kSD7YmDeTnT+bXbbX+wokGQhKib+GhHQbYW8rckvF9KJ7Z+U1uKKGW3NyKN281Q301XDQYKrSwBK+ns4+PmVpNMB8Rfqp6jWJkX1aE=CN=Test Client (RSA),OU=Engineering,O=Phaos Technology,L=New York,ST=New York,C=USCN=Test CA (RSA),OU=Engineering,O=Phaos Technology,L=New York,ST=New York,C=US1000001E+fKwQsT5lS3mWmBkalUTp0JRW8=MIIC0DCCAjmgAwIBAgIDD0JBMA0GCSqGSIb3DQEBBAUAMHwxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhOZXcgWW9yazERMA8GA1UEBxMITmV3IFlvcmsxGTAXBgNVBAoTEFBoYW9zIFRlY2hub2xvZ3kxFDASBgNVBAsTC0VuZ2luZWVyaW5nMRYwFAYDVQQDEw1UZXN0IENBIChSU0EpMB4XDTAyMDQyOTE5MTY0MFoXDTEyMDQyNjE5MTY0MFowgYAxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhOZXcgWW9yazERMA8GA1UEBxMITmV3IFlvcmsxGTAXBgNVBAoTEFBoYW9zIFRlY2hub2xvZ3kxFDASBgNVBAsTC0VuZ2luZWVyaW5nMRowGAYDVQQDExFUZXN0IENsaWVudCAoUlNBKTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAgIb6nAB9oS/AI5jIj6WymvQhRxiMlE07G4abmMliYi5zWzvaFE2tnU+RZIBgtoXcgDEIU/vsLQut7nzCn9mHxC8JEaV4D4U91j64AyZakShqJw7qjJfqUxxPL0yJv2oFiouPDjGuJ9JPi0NrsZq+yfWfM54s4b9SNkcOIVMybZUCAwEAAaNbMFkwDAYDVR0TAQH/BAIwADAPBgNVHQ8BAf8EBQMDB9gAMBkGA1UdEQQSMBCBDnRlY2hAcGhhb3MuY29tMB0GA1UdDgQWBBQT58rBCxPmVLeZaYGRqVROnQlFbzANBgkqhkiG9w0BAQQFAAOBgQCxbCovFST25t+ryN1RipqozxJQcguKfeCwbfgBNobzcRvoW0kSIf7zi4mtQajDM0NfslFF51/dex5Rn64HmFFshSwSvQQMyf5Cfaqv2XQ60OXq6nAFG6WbHoge6RqfIez2MWDLoSB6plsjKtMmL3mcybBhROtX5GGuLx1NtfhNFQ==MIICzjCCAjegAwIBAgIDAYagMA0GCSqGSIb3DQEBBAUAMHwxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhOZXcgWW9yazERMA8GA1UEBxMITmV3IFlvcmsxGTAXBgNVBAoTEFBoYW9zIFRlY2hub2xvZ3kxFDASBgNVBAsTC0VuZ2luZWVyaW5nMRYwFAYDVQQDEw1UZXN0IENBIChSU0EpMB4XDTAyMDQyOTE5MDUyNFoXDTEwMTIzMTA1MDAwMFowfDELMAkGA1UEBhMCVVMxETAPBgNVBAgTCE5ldyBZb3JrMREwDwYDVQQHEwhOZXcgWW9yazEZMBcGA1UEChMQUGhhb3MgVGVjaG5vbG9neTEUMBIGA1UECxMLRW5naW5lZXJpbmcxFjAUBgNVBAMTDVRlc3QgQ0EgKFJTQSkwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALO5BLdMI/8/geNgk2SgbklQImTtQDwhkcutAlw35rS/84Y+Ct1qBi5r8c6JRVb/oEqQSs9TBczpLnd+D7xiqJ6/JcB3R9MDg/pAVoJCrCY4oZNlkJSasYWKZo77zSuUphNEfJEVZ4SMtwxZQLHFailJHm4L30zjI2E0N2YHyi7/AgMBAAGjXjBcMA8GA1UdEwEB/wQFMAMBAf8wDwYDVR0PAQH/BAUDAwfGADAZBgNVHREEEjAQgQ50ZWNoQHBoYW9zLmNvbTAdBgNVHQ4EFgQUMwlR0HC1hlo487v3Z47eghoDMMwwDQYJKoZIhvcNAQEEBQADgYEAY+elRel/6kG/o7xNmU9CrZM1EJMh3cHoedPOHt4yHP6crj6OYZMA+C7ifHX/wvGpcwZymMPqlr3cQ7B7/h88yCVJuANTe1BQtA6nZ4Cz6Bh9Mip3n8ycuXCDbxkUd0ALQYD6SS2+awVSHVGYRmFRd9vyW1nkg9EsScaqa7XG+6A=MIIBnjCCAQcCAQEwDQYJKoZIhvcNAQEEBQAwfDELMAkGA1UEBhMCVVMxETAPBgNVBAgTCE5ldyBZb3JrMREwDwYDVQQHEwhOZXcgWW9yazEZMBcGA1UEChMQUGhhb3MgVGVjaG5vbG9neTEUMBIGA1UECxMLRW5naW5lZXJpbmcxFjAUBgNVBAMTDVRlc3QgQ0EgKFJTQSkXDTAyMDQyOTE5MTkyOFoXDTEyMDQyNjE5MTkyOFowJDAiAgMPQkEXDTAyMDQyOTE5MTkyOFowDDAKBgNVHRUEAwoBAaAxMC8wDAYDVR0UBAUCAy3GwDAfBgNVHSMEGDAWgBQzCVHQcLWGWjjzu/dnjt6CGgMwzDANBgkqhkiG9w0BAQQFAAOBgQBAp2he5UWtQxjGt1M6cQnBtNFbG2EYfQOtXt0bWOl8vjRMcFFtCc0/eXr9TQ13F7E4E6mF6geHzjFQ/qYF5r5ytZCBusCD2DGem0HWNiWIj9FMKvhxcqCYE3FY1d79EMjbI9Du81NUFZgdQub0LbhXkEt53j1p7ff8bI1ng+vtFw==5KcCsBlhsIP4iMmHcaU2dXJPU8k=eT5ZU9fkIwQ9b9XAYq+iIYnj0DQ=././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-manifest.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-manifest.x0000755000175000017500000000314710372164212032465 0ustar tonytonyNIYWGr1CiWC02cfck47Xf/UM9AA=E3tz123wD0lO8VwhVEBfFTsD5gc0Bplx6YtVuDM0cUJDHb5F+DiuxGugGqIt+CKUklSO2kSD7YmDeTnT+bXbbX+wokGQhKib+GhHQbYW8rckvF9KJ7Z+U1uKKGW3NyKN281Q301XDQYKrSwBK+ns4+PmVpNMB8Rfqp6jWJkX1aE=gIb6nAB9oS/AI5jIj6WymvQhRxiMlE07G4abmMliYi5zWzvaFE2tnU+RZIBgtoXcgDEIU/vsLQut7nzCn9mHxC8JEaV4D4U91j64AyZakShqJw7qjJfqUxxPL0yJv2oFiouPDjGuJ9JPi0NrsZq+yfWfM54s4b9SNkcOIVMybZU=AQAB5KcCsBlhsIP4iMmHcaU2dXJPU8k=eT5ZU9fkIwQ9b9XAYq+iIYnj0DQ=libxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/document-stylesheet.xml0000755000175000017500000000034110372164212032424 0ustar tonytony Alfonso Soriano 2B New York Yankees ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-enveloped.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-enveloped.0000755000175000017500000000466410372164212032455 0ustar tonytony Alfonso Soriano 2B New York Yankees nDF2V/bzRd0VE3EwShWtsBzTEDc=fbye4Xm//RPUTsLd1dwJPo0gPZYX6gVYCEB/gz2348EARNk/nCCch1fFfpuqAGMKg4ayVC0yWkUyE5V4QB33jaGlh9wuNQSjxs6TIvFwSsT+0ioDgVgFv0gVeasbyNL4rFEHuAWL8QKwDT9L6b2wUvJC90DmpBs9GMR2jTZIWlM=MIIC0DCCAjmgAwIBAgIDD0JBMA0GCSqGSIb3DQEBBAUAMHwxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhOZXcgWW9yazERMA8GA1UEBxMITmV3IFlvcmsxGTAXBgNVBAoTEFBoYW9zIFRlY2hub2xvZ3kxFDASBgNVBAsTC0VuZ2luZWVyaW5nMRYwFAYDVQQDEw1UZXN0IENBIChSU0EpMB4XDTAyMDQyOTE5MTY0MFoXDTEyMDQyNjE5MTY0MFowgYAxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhOZXcgWW9yazERMA8GA1UEBxMITmV3IFlvcmsxGTAXBgNVBAoTEFBoYW9zIFRlY2hub2xvZ3kxFDASBgNVBAsTC0VuZ2luZWVyaW5nMRowGAYDVQQDExFUZXN0IENsaWVudCAoUlNBKTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAgIb6nAB9oS/AI5jIj6WymvQhRxiMlE07G4abmMliYi5zWzvaFE2tnU+RZIBgtoXcgDEIU/vsLQut7nzCn9mHxC8JEaV4D4U91j64AyZakShqJw7qjJfqUxxPL0yJv2oFiouPDjGuJ9JPi0NrsZq+yfWfM54s4b9SNkcOIVMybZUCAwEAAaNbMFkwDAYDVR0TAQH/BAIwADAPBgNVHQ8BAf8EBQMDB9gAMBkGA1UdEQQSMBCBDnRlY2hAcGhhb3MuY29tMB0GA1UdDgQWBBQT58rBCxPmVLeZaYGRqVROnQlFbzANBgkqhkiG9w0BAQQFAAOBgQCxbCovFST25t+ryN1RipqozxJQcguKfeCwbfgBNobzcRvoW0kSIf7zi4mtQajDM0NfslFF51/dex5Rn64HmFFshSwSvQQMyf5Cfaqv2XQ60OXq6nAFG6WbHoge6RqfIez2MWDLoSB6plsjKtMmL3mcybBhROtX5GGuLx1NtfhNFQ==CN=Test CA (RSA),OU=Engineering,O=Phaos Technology,L=New York,ST=New York,C=US1000001CN=Test Client (RSA),OU=Engineering,O=Phaos Technology,L=New York,ST=New York,C=USE+fKwQsT5lS3mWmBkalUTp0JRW8=././@LongLink0000000000000000000000000000017700000000000011572 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-manifest-x509-data-issuer-serial.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-manifest-x0000755000175000017500000000306410372164212032462 0ustar tonytonyNIYWGr1CiWC02cfck47Xf/UM9AA=E3tz123wD0lO8VwhVEBfFTsD5gc0Bplx6YtVuDM0cUJDHb5F+DiuxGugGqIt+CKUklSO2kSD7YmDeTnT+bXbbX+wokGQhKib+GhHQbYW8rckvF9KJ7Z+U1uKKGW3NyKN281Q301XDQYKrSwBK+ns4+PmVpNMB8Rfqp6jWJkX1aE=CN=Test CA (RSA),OU=Engineering,O=Phaos Technology,L=New York,ST=New York,C=US10000015KcCsBlhsIP4iMmHcaU2dXJPU8k=eT5ZU9fkIwQ9b9XAYq+iIYnj0DQ=././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-detached.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-detached.x0000755000175000017500000000427010372164212032416 0ustar tonytonyeT5ZU9fkIwQ9b9XAYq+iIYnj0DQ=clDfKMq12I9JQp01RSzDcBro/+H8rTgaD9kgUCgvA8dEF55EessFUP6RC+KHZoNSJVGcnSKJa6Rtdi3mwS7b3zBo4pExiMLHgyi1UMViklX+MC75oU6tSDs3PP8r6BKmZqj0FNcjOh7wgJzey8nyv8UrTnQniSvZK62JYKz73sY=MIIC0DCCAjmgAwIBAgIDD0JBMA0GCSqGSIb3DQEBBAUAMHwxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhOZXcgWW9yazERMA8GA1UEBxMITmV3IFlvcmsxGTAXBgNVBAoTEFBoYW9zIFRlY2hub2xvZ3kxFDASBgNVBAsTC0VuZ2luZWVyaW5nMRYwFAYDVQQDEw1UZXN0IENBIChSU0EpMB4XDTAyMDQyOTE5MTY0MFoXDTEyMDQyNjE5MTY0MFowgYAxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhOZXcgWW9yazERMA8GA1UEBxMITmV3IFlvcmsxGTAXBgNVBAoTEFBoYW9zIFRlY2hub2xvZ3kxFDASBgNVBAsTC0VuZ2luZWVyaW5nMRowGAYDVQQDExFUZXN0IENsaWVudCAoUlNBKTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAgIb6nAB9oS/AI5jIj6WymvQhRxiMlE07G4abmMliYi5zWzvaFE2tnU+RZIBgtoXcgDEIU/vsLQut7nzCn9mHxC8JEaV4D4U91j64AyZakShqJw7qjJfqUxxPL0yJv2oFiouPDjGuJ9JPi0NrsZq+yfWfM54s4b9SNkcOIVMybZUCAwEAAaNbMFkwDAYDVR0TAQH/BAIwADAPBgNVHQ8BAf8EBQMDB9gAMBkGA1UdEQQSMBCBDnRlY2hAcGhhb3MuY29tMB0GA1UdDgQWBBQT58rBCxPmVLeZaYGRqVROnQlFbzANBgkqhkiG9w0BAQQFAAOBgQCxbCovFST25t+ryN1RipqozxJQcguKfeCwbfgBNobzcRvoW0kSIf7zi4mtQajDM0NfslFF51/dex5Rn64HmFFshSwSvQQMyf5Cfaqv2XQ60OXq6nAFG6WbHoge6RqfIez2MWDLoSB6plsjKtMmL3mcybBhROtX5GGuLx1NtfhNFQ==CN=Test CA (RSA),OU=Engineering,O=Phaos Technology,L=New York,ST=New York,C=US1000001CN=Test Client (RSA),OU=Engineering,O=Phaos Technology,L=New York,ST=New York,C=USE+fKwQsT5lS3mWmBkalUTp0JRW8=././@LongLink0000000000000000000000000000021000000000000011556 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-hmac-sha1-40-exclusive-c14n-comments-detached.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-hmac-sha1-40-e0000755000175000017500000000123110372164212032023 0ustar tonytony40eT5ZU9fkIwQ9b9XAYq+iIYnj0DQ=awZmh2c=././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-dsa-manifest.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-dsa-manifest.x0000755000175000017500000000402010372164212032436 0ustar tonytonyNIYWGr1CiWC02cfck47Xf/UM9AA=k0jMfEzvBG2Uh9H0MCqLn3OqkFVUwKIyl6VWlQbk91JzDgzMhtEyrg==5llqtXo2G1g61J8WFsP00U9cl5z7emzkxqTre4C8pV/qdT8YRkbxrvHK7Bc7BXdx7abcP46842DcEZ07u7esCzlV9jziQTWsij9d6l8Nra9RRMqz37wDx0hUPRfmWHeEVFHpQkgUlL1lai/Ujs36fbiInXWoR3fWQn6+vjqP5S8=vSPQz7ak24nBo5gwSMfEXkvEblc=CUyqAoEkRHpKrbmVnA8t3vkSEM8Gk3qHmTNunxVdmBVaitqPnf6D7SXxLRQNvuJ8+BAI70U/+iu5EUknE+QzvH2bPP9B9pXl9lNBV88wzjCC+M3kQD2+Bjps+NdJkTjhrJMygi8KPGCDbmfSqf+F1+nBIpDIgKzWxbhUMHd9VfI=JLZHChtL9OjhYpD2tVpN4+Urp9P0R/1jmkQA3vYycSf6GDtGDyESjCuWl2sH4EwIt3yJkhN4CPwGgrrkq8H1S+U7X76nTEaobAmElnBrBeF6uatRwwmCvVm4DCKs1XJNeN1QlsbLikf9aJguzjj8unzyYZRdjMcgjhLtVjeYAC0=ATfG1k4XSpDlWczkblMTpUkvazbCh6NH0ImOzLyjXlhRpihqtb/HBaCGWs3JzAiafW75tk57/9+vj6drV/vl44l14K5piP7VnDSADNCkBq9gCN/wM3u8w7cb8gpgTqC68I2yHzVVh4umjOrrgg==5KcCsBlhsIP4iMmHcaU2dXJPU8k=eT5ZU9fkIwQ9b9XAYq+iIYnj0DQ=libxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-big.xml0000755000175000017500000001207310372164212031164 0ustar tonytony5KcCsBlhsIP4iMmHcaU2dXJPU8k=5KcCsBlhsIP4iMmHcaU2dXJPU8k= <xsl:value-of select="name"/>

2HiTcKdfZ9O83wthUFP8ISRdRXQ=
@*TReY52bmpNnv+3gET3YhgJXTImk=Zk5dsGelTgg61hMSPfKYRRYZvr8=BGhr3V/fMiTscUgZVMEMmeQvQpI=k08/9AdPEuZyBRJhHKyjH1px3IQ=ancestor-or-self::ds:KeyName4ehoLl+KxYvqlwPGRaPcpxprLeA=CBCjDfHcpu7cWHr6zD0y/Y62fso=RwemIyLY5WSPgXA3OZiZLhGCyTo=
EUqZ5jMNvD/dHHi90X//yL7r7t6WpyY0fChIAaUPPXsbDHeNgzfsDe8AZYYD6klroeYJRuHXHtY1PdB5b9+XfwO3oduznLYVN3bmeLMvdYMWlw4SGYtbvyNZtovgA8qcEAQ29sQ+aA9pvCQgSKpTJF8DuYv6fKlktZtPyYh7HRk=CN=Test Client (RSA),OU=Engineering,O=Phaos Technology,L=New York,ST=New York,C=USRtIlTB3BmyCRFTr7sRtOyPni0Ig=eT5ZU9fkIwQ9b9XAYq+iIYnj0DQ=
././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-enveloped-bad-digest-val.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-enveloped-0000755000175000017500000000466410372164212032454 0ustar tonytony Alfonso Soriano 2B New York Yankees nM52V/bzRd0VE3EwShWtsBzTEDc=fbye4Xm//RPUTsLd1dwJPo0gPZYX6gVYCEB/gz2348EARNk/nCCch1fFfpuqAGMKg4ayVC0yWkUyE5V4QB33jaGlh9wuNQSjxs6TIvFwSsT+0ioDgVgFv0gVeasbyNL4rFEHuAWL8QKwDT9L6b2wUvJC90DmpBs9GMR2jTZIWlM=MIIC0DCCAjmgAwIBAgIDD0JBMA0GCSqGSIb3DQEBBAUAMHwxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhOZXcgWW9yazERMA8GA1UEBxMITmV3IFlvcmsxGTAXBgNVBAoTEFBoYW9zIFRlY2hub2xvZ3kxFDASBgNVBAsTC0VuZ2luZWVyaW5nMRYwFAYDVQQDEw1UZXN0IENBIChSU0EpMB4XDTAyMDQyOTE5MTY0MFoXDTEyMDQyNjE5MTY0MFowgYAxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhOZXcgWW9yazERMA8GA1UEBxMITmV3IFlvcmsxGTAXBgNVBAoTEFBoYW9zIFRlY2hub2xvZ3kxFDASBgNVBAsTC0VuZ2luZWVyaW5nMRowGAYDVQQDExFUZXN0IENsaWVudCAoUlNBKTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAgIb6nAB9oS/AI5jIj6WymvQhRxiMlE07G4abmMliYi5zWzvaFE2tnU+RZIBgtoXcgDEIU/vsLQut7nzCn9mHxC8JEaV4D4U91j64AyZakShqJw7qjJfqUxxPL0yJv2oFiouPDjGuJ9JPi0NrsZq+yfWfM54s4b9SNkcOIVMybZUCAwEAAaNbMFkwDAYDVR0TAQH/BAIwADAPBgNVHQ8BAf8EBQMDB9gAMBkGA1UdEQQSMBCBDnRlY2hAcGhhb3MuY29tMB0GA1UdDgQWBBQT58rBCxPmVLeZaYGRqVROnQlFbzANBgkqhkiG9w0BAQQFAAOBgQCxbCovFST25t+ryN1RipqozxJQcguKfeCwbfgBNobzcRvoW0kSIf7zi4mtQajDM0NfslFF51/dex5Rn64HmFFshSwSvQQMyf5Cfaqv2XQ60OXq6nAFG6WbHoge6RqfIez2MWDLoSB6plsjKtMmL3mcybBhROtX5GGuLx1NtfhNFQ==CN=Test CA (RSA),OU=Engineering,O=Phaos Technology,L=New York,ST=New York,C=US1000001CN=Test Client (RSA),OU=Engineering,O=Phaos Technology,L=New York,ST=New York,C=USE+fKwQsT5lS3mWmBkalUTp0JRW8=libxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/document.b640000755000175000017500000000036010372164212030031 0ustar tonytonyPHBsYXllciBpZD0iMTAwMTIiIGJhdHM9ImxlZnQiIHRocm93cz0icmlnaHQiPg0K CTwhLS0gSGVyZSdzIGEgY29tbWVudCAtLT4NCgk8bmFtZT5BbGZvbnNvIFNvcmlh bm88L25hbWU+DQoJPHBvc2l0aW9uPjJCPC9wb3NpdGlvbj4NCgk8dGVhbT5OZXcg WW9yayBZYW5rZWVzPC90ZWFtPg0KPC9wbGF5ZXI+DQo= ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-detached-b64-transform.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-detached-b0000755000175000017500000000275410372164212032374 0ustar tonytony9BGp06kfYkpbY8LXwb6YS+UJz5A=GbZsFzJ3pu+nmV22+gvH3DjUjw7uLQdCxr83GjtrNuBpnV3y6nqp1S5Tu7TQeRQjc7YUAXBwcq74ur4BBzqKVF3waB0zP99HH6u165g811s05lKLdw4WY3WdfA67mvDSbDCYvb6ENot7uQcEnDTyIrrsfekZTvqCX/bHwb7di34=gIb6nAB9oS/AI5jIj6WymvQhRxiMlE07G4abmMliYi5zWzvaFE2tnU+RZIBgtoXcgDEIU/vsLQut7nzCn9mHxC8JEaV4D4U91j64AyZakShqJw7qjJfqUxxPL0yJv2oFiouPDjGuJ9JPi0NrsZq+yfWfM54s4b9SNkcOIVMybZU=AQAB5KcCsBlhsIP4iMmHcaU2dXJPU8k=././@LongLink0000000000000000000000000000021300000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-detached-xslt-transform-bad-retrieval-method.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-detached-x0000755000175000017500000000217110372164212032413 0ustar tonytony Alfonso Soriano 2B New York Yankees nDF2V/bzRd0VE3EwShWtsBzTEDc=fbye4Xm//RPUTsLd1dwJPo0gPZYX6gVYCEB/gz2348EARNk/nCCch1fFfpuqAGMKg4ayVC0yWkUyE5V4QB33jaGlh9wuNQSjxs6TIvFwSsT+0ioDgVgFv0gVeasbyNL4rFEHuAWL8QKwDT9L6b2wUvJC90DmpBs9GMR2jTZIWlM=././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-hmac-md5-c14n-enveloping.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-hmac-md5-c14n-0000755000175000017500000000161410372164212032036 0ustar tonytonytQ7wVagV/v8GTSZnYYYw3g==BsR9wW+N76Dg+QYMpwN5kA== Alfonso Soriano 2B New York Yankees libxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/README.txt0000755000175000017500000001614710372164212027406 0ustar tonytonySample XML Signatures Produced Using the Phaos XML Toolkit November 26, 2002 Contents of phaos-xmldsig-three =============================== signature-rsa-enveloped.xml --------------------------- Contains an RSA enveloped signature. signature-rsa-enveloping.xml ---------------------------- Contains an RSA enveloping signature. signature-rsa-detached.xml -------------------------- Contains an RSA detached signature. signature-dsa-enveloped.xml --------------------------- Contains a DSA enveloped signature. signature-dsa-enveloping.xml ---------------------------- Contains a DSA enveloping signature. signature-dsa-detached.xml -------------------------- Contains a DSA detached signature. signature-hmac-md5-c14n-enveloping.xml -------------------------------------- Contains an enveloping MD5 HMAC signature and uses XML Canonicalization as the canonicalization method. The HMAC secret is the ASCII encoding of the word "test". signature-hmac-sha1-exclusive-c14n-enveloped.xml ------------------------------------------------ Contains an enveloped SHA-1 HMAC signature and uses the Exclusive XML Canonicalization canonicalization method. The HMAC secret is the ASCII encoding of the word "test". signature-hmac-sha1-exclusive-c14n-comments-detached.xml -------------------------------------------------------- Contains a detached SHA-1 HMAC signature and uses the Exclusive XML Canonicalization With Comments canonicalization method. The HMAC secret is the ASCII encoding of the word "test". signature-hmac-sha1-40-c14n-comments-detached.xml ------------------------------------------------- Contains a detached 40-byte SHA-1 HMAC signature and uses the XML Canonicalization With Comments canonicalization method. The HMAC secret is the ASCII encoding of the word "test". signature-hmac-sha1-40-exclusive-c14n-comments-detached.xml ----------------------------------------------------------- Contains a detached 40 byte SHA-1 HMAC signature and uses the Exclusive XML Canonicalization With Comments canonicalization method. The HMAC secret is the ASCII encoding of the word "test". signature-dsa-detached-manifest.xml ----------------------------------- Contains a detached DSA signature with a manifest. signature-rsa-detached-manifest.xml ---------------------------------- Contains a detached RSA signature with a manifest. signature-rsa-detached-b64-transform.xml ---------------------------------------- Contains a detached RSA signature with a Base64 decode transform. signature-rsa-detached-xpath-transform.xml ------------------------------------------ Contains a detached RSA signature with an XPath transform. signature-rsa-xpath-transform-enveloped.xml ------------------------------------------ Contains an RSA signature with an XPath transform that produces the same result as the enveloped signature algorithm. signature-rsa-detached-xslt-transform.xml ------------------------------------------ Contains a detached RSA signature with an XSLT transformation. signature-rsa-detached-x509-data.xml ------------------------------------ Contains a detached RSA signature with several X509Data subelements. signature-rsa-detached-x509-data-subject-name.xml ------------------------------------ Contains a detached RSA signature with an X509SubjectName that references the subject name of the certificate stored in certs/rsa-client-cert.der. signature-rsa-detached-x509-data-issuer-serial.xml ------------------------------------ Contains a detached RSA signature with an X509IssuerSerial that references the issuer and serial number of the certificate stored in certs/rsa-client-cert.der. signature-rsa-detached-x509-data-ski.xml ------------------------------------ Contains a detached RSA signature with an X509SKI that references the Subject Key Identifier of the certificate stored in certs/rsa-client-cert.der. signature-rsa-detached-x509-data-client-cert.xml ------------------------------------ Contains a detached RSA signature with an X509Certificate that represents the certificate stored in certs/rsa-client-cert.der. signature-rsa-detached-x509-data-cert-chain.xml ------------------------------------ Contains a detached RSA signature with two X509Certificate elements that represent the certificates stored in certs/rsa-client-cert.der and certs/rsa-ca-cert.der. signature-rsa-detached-xslt-transform-retrieval-method.xml ------------------------------------ Contains a detached RSA signature with an XSLT transform and a KeyInfo element that refers to an external X.509 certificate. The certificate is located in certs/rsa-client-cert.der. signature-big.xml ----------------- Contains a larger detached RSA signature that contains a manifest and many references that test various transformation algorithms, URI reference syntax formats, etc. The KeyInfo contains a KeyName whose value is the subject name of the certificate stored in certs/rsa-client-cert.der. signature-rsa-detached-xslt-transform-bad-retrieval-method.xml --------------------------------------------------------------- Contains a detached RSA signature with an XSLT transform and a KeyInfo element that refers to an INCORRECT external X.509 certificate. (The correct X.509 certificate is located in certs/rsa-client-cert.der.) Verification should FAIL. signature-rsa-enveloped-bad-digest-val.xml ------------------------------------------ Contains an enveloped RSA signature that contains a reference with an INCORRECT digest value. Verification should FAIL. signature-rsa-enveloped-bad-sig.xml ----------------------------------- Contains an enveloped RSA signature that contains a reference that was added after the signature value was computed. Verification should FAIL. document.xml ------------ An XML document that is referenced by some of the signature examples. document-stylesheet.xml ----------------------- The same as document.xml with the addition of an xsl-stylesheet processing instruction. document.xsl ------------ An XSL stylesheet referenced by several of the signature examples and document-stylesheet.xml. document.b64 ------------ A Base64 encoded XML document. README.txt ---------- This file. Contents of phaos-xmldsig-three/certs ===================================== rsa-cert.der ------------ An RSA end entity certificate issued by the CA certificate contained in rsa-ca-cert.der. enc-rsa-key.der --------------- The RSA private key that matches rsa-cert.der, password-encrypted using the PKCS#8 format. The password is "test". dsa-cert.der ------------ An DSA end entity certificate issued by the CA certificate contained in dsa-ca-cert.der. enc-dsa-key.der --------------- The DSA private key that matches dsa-cert.der, password-encrypted using the PKCS#8 format. The password is "test". rsa-ca-cert.der --------------- An RSA self-signed CA certificate. dsa-ca-cert.der --------------- A DSA self-signed CA certificate. crl.der ------- A sample CRL that revokes rsa-cert.der. Joe Morgan Software Engineer Phaos Technology jmorgan@phaos.com http://www.phaos.com/ ././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-manifest-x509-data-subject-name.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-manifest-x0000755000175000017500000000272510372164212032465 0ustar tonytonyNIYWGr1CiWC02cfck47Xf/UM9AA=E3tz123wD0lO8VwhVEBfFTsD5gc0Bplx6YtVuDM0cUJDHb5F+DiuxGugGqIt+CKUklSO2kSD7YmDeTnT+bXbbX+wokGQhKib+GhHQbYW8rckvF9KJ7Z+U1uKKGW3NyKN281Q301XDQYKrSwBK+ns4+PmVpNMB8Rfqp6jWJkX1aE=CN=Test Client (RSA),OU=Engineering,O=Phaos Technology,L=New York,ST=New York,C=US5KcCsBlhsIP4iMmHcaU2dXJPU8k=eT5ZU9fkIwQ9b9XAYq+iIYnj0DQ=././@LongLink0000000000000000000000000000020700000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-detached-xslt-transform-retrieval-method.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-detached-x0000755000175000017500000000417410372164212032420 0ustar tonytonyafPdOzRB6PgYpVX2GECgTBf8P30=ffXjlLiu+EuGKfMLhvhZb6m3ULwd1zJ7BBe48oHrGxGsEdQWLt18AyOYMFHlhRi0i2DPurR6jPJGKWhwD6uRM1c6Rb/eDlZ7FNeqI0Bzv8xA0QEZ1nLAVJBC4LAKZp3Ha+7hs+l9rKuCk9ZiSO1UDMppEd8zoTucqCiAKTOWMd8= <xsl:value-of select="name"/>

2HiTcKdfZ9O83wthUFP8ISRdRXQ=
././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-manifest-x509-data-ski.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-manifest-x0000755000175000017500000000261710372164212032465 0ustar tonytonyNIYWGr1CiWC02cfck47Xf/UM9AA=E3tz123wD0lO8VwhVEBfFTsD5gc0Bplx6YtVuDM0cUJDHb5F+DiuxGugGqIt+CKUklSO2kSD7YmDeTnT+bXbbX+wokGQhKib+GhHQbYW8rckvF9KJ7Z+U1uKKGW3NyKN281Q301XDQYKrSwBK+ns4+PmVpNMB8Rfqp6jWJkX1aE=E+fKwQsT5lS3mWmBkalUTp0JRW8=5KcCsBlhsIP4iMmHcaU2dXJPU8k=eT5ZU9fkIwQ9b9XAYq+iIYnj0DQ=././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-enveloped-bad-sig.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-enveloped-0000755000175000017500000000511110372164212032440 0ustar tonytony Alfonso Soriano 2B New York Yankees nDF2V/bzRd0VE3EwShWtsBzTEDc=fbye4Xm//RPUTsLd1dwJPo0gPZYX6gVYCEB/gz2348EARNk/nCCch1fFfpuqAGMKg4ayVC0yWkUyE5V4QB33jaGlh9wuNQSjxs6TIvFwSsT+0ioDgVgFv0gVeasbyNL4rFEHuAWL8QKwDT9L6b2wUvJC90DmpBs9GMR2jTZIWlM=MIIC0DCCAjmgAwIBAgIDD0JBMA0GCSqGSIb3DQEBBAUAMHwxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhOZXcgWW9yazERMA8GA1UEBxMITmV3IFlvcmsxGTAXBgNVBAoTEFBoYW9zIFRlY2hub2xvZ3kxFDASBgNVBAsTC0VuZ2luZWVyaW5nMRYwFAYDVQQDEw1UZXN0IENBIChSU0EpMB4XDTAyMDQyOTE5MTY0MFoXDTEyMDQyNjE5MTY0MFowgYAxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhOZXcgWW9yazERMA8GA1UEBxMITmV3IFlvcmsxGTAXBgNVBAoTEFBoYW9zIFRlY2hub2xvZ3kxFDASBgNVBAsTC0VuZ2luZWVyaW5nMRowGAYDVQQDExFUZXN0IENsaWVudCAoUlNBKTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAgIb6nAB9oS/AI5jIj6WymvQhRxiMlE07G4abmMliYi5zWzvaFE2tnU+RZIBgtoXcgDEIU/vsLQut7nzCn9mHxC8JEaV4D4U91j64AyZakShqJw7qjJfqUxxPL0yJv2oFiouPDjGuJ9JPi0NrsZq+yfWfM54s4b9SNkcOIVMybZUCAwEAAaNbMFkwDAYDVR0TAQH/BAIwADAPBgNVHQ8BAf8EBQMDB9gAMBkGA1UdEQQSMBCBDnRlY2hAcGhhb3MuY29tMB0GA1UdDgQWBBQT58rBCxPmVLeZaYGRqVROnQlFbzANBgkqhkiG9w0BAQQFAAOBgQCxbCovFST25t+ryN1RipqozxJQcguKfeCwbfgBNobzcRvoW0kSIf7zi4mtQajDM0NfslFF51/dex5Rn64HmFFshSwSvQQMyf5Cfaqv2XQ60OXq6nAFG6WbHoge6RqfIez2MWDLoSB6plsjKtMmL3mcybBhROtX5GGuLx1NtfhNFQ==CN=Test CA (RSA),OU=Engineering,O=Phaos Technology,L=New York,ST=New York,C=US1000001CN=Test Client (RSA),OU=Engineering,O=Phaos Technology,L=New York,ST=New York,C=USE+fKwQsT5lS3mWmBkalUTp0JRW8=././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-detached-xslt-transform.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-detached-x0000755000175000017500000000450010372164212032411 0ustar tonytonyafPdOzRB6PgYpVX2GECgTBf8P30=ffXjlLiu+EuGKfMLhvhZb6m3ULwd1zJ7BBe48oHrGxGsEdQWLt18AyOYMFHlhRi0i2DPurR6jPJGKWhwD6uRM1c6Rb/eDlZ7FNeqI0Bzv8xA0QEZ1nLAVJBC4LAKZp3Ha+7hs+l9rKuCk9ZiSO1UDMppEd8zoTucqCiAKTOWMd8=gIb6nAB9oS/AI5jIj6WymvQhRxiMlE07G4abmMliYi5zWzvaFE2tnU+RZIBgtoXcgDEIU/vsLQut7nzCn9mHxC8JEaV4D4U91j64AyZakShqJw7qjJfqUxxPL0yJv2oFiouPDjGuJ9JPi0NrsZq+yfWfM54s4b9SNkcOIVMybZU=AQAB <xsl:value-of select="name"/>

2HiTcKdfZ9O83wthUFP8ISRdRXQ=
././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-dsa-enveloping.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-dsa-enveloping0000755000175000017500000000516410372164212032542 0ustar tonytonyrXdK89trp685VfNWmSyYrLGP+5Y=iqsxSGtOON/M37ZczTO5EZXQrNQSO0pIPQlLysCmfOLqAoHi2MBwvA==MIIDjzCCA02gAwIBAgIDHoSBMAkGByqGSM44BAMwfDELMAkGA1UEBhMCVVMxETAPBgNVBAgTCE5ldyBZb3JrMREwDwYDVQQHEwhOZXcgWW9yazEZMBcGA1UEChMQUGhhb3MgVGVjaG5vbG9neTEUMBIGA1UECxMLRW5naW5lZXJpbmcxFjAUBgNVBAMTDVRlc3QgQ0EgKERTQSkwHhcNMDIwNDI5MTkxNzUyWhcNMTIwNDI2MTkxNzUyWjCBgDELMAkGA1UEBhMCVVMxETAPBgNVBAgTCE5ldyBZb3JrMREwDwYDVQQHEwhOZXcgWW9yazEZMBcGA1UEChMQUGhhb3MgVGVjaG5vbG9neTEUMBIGA1UECxMLRW5naW5lZXJpbmcxGjAYBgNVBAMTEVRlc3QgQ2xpZW50IChEU0EpMIIBtjCCASsGByqGSM44BAEwggEeAoGBAOZZarV6NhtYOtSfFhbD9NFPXJec+3ps5Mak63uAvKVf6nU/GEZG8a7xyuwXOwV3ce2m3D+OvONg3BGdO7u3rAs5VfY84kE1rIo/XepfDa2vUUTKs9+8A8dIVD0X5lh3hFRR6UJIFJS9ZWov1I7N+n24iJ11qEd31kJ+vr46j+UvAhUAvSPQz7ak24nBo5gwSMfEXkvEblcCgYAJTKoCgSREekqtuZWcDy3e+RIQzwaTeoeZM26fFV2YFVqK2o+d/oPtJfEtFA2+4nz4EAjvRT/6K7kRSScT5DO8fZs8/0H2leX2U0FXzzDOMIL4zeRAPb4GOmz410mROOGskzKCLwo8YINuZ9Kp/4XX6cEikMiArNbFuFQwd31V8gOBhAACgYAktkcKG0v06OFikPa1Wk3j5Sun0/RH/WOaRADe9jJxJ/oYO0YPIRKMK5aXawfgTAi3fImSE3gI/AaCuuSrwfVL5TtfvqdMRqhsCYSWcGsF4Xq5q1HDCYK9WbgMIqzVck143VCWxsuKR/1omC7OOPy6fPJhlF2MxyCOEu1WN5gALaNbMFkwDAYDVR0TAQH/BAIwADAPBgNVHQ8BAf8EBQMDB9gAMBkGA1UdEQQSMBCBDnRlY2hAcGhhb3MuY29tMB0GA1UdDgQWBBRsW9jwXGyEQfGGTp1+6fy5Alr2qDAJBgcqhkjOOAQDAzEAMC4CFQCLHnvOkvMdxjw3sSYgdljtiEGPTAIVALEZRsqT2ldGoOE3dUgY3LEWenhNCN=Test CA (DSA),OU=Engineering,O=Phaos Technology,L=New York,ST=New York,C=US2000001CN=Test Client (DSA),OU=Engineering,O=Phaos Technology,L=New York,ST=New York,C=USbFvY8FxshEHxhk6dfun8uQJa9qg= Alfonso Soriano 2B New York Yankees ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-manifest-x509-data-cert-chain.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-manifest-x0000755000175000017500000000647410372164212032472 0ustar tonytonyNIYWGr1CiWC02cfck47Xf/UM9AA=E3tz123wD0lO8VwhVEBfFTsD5gc0Bplx6YtVuDM0cUJDHb5F+DiuxGugGqIt+CKUklSO2kSD7YmDeTnT+bXbbX+wokGQhKib+GhHQbYW8rckvF9KJ7Z+U1uKKGW3NyKN281Q301XDQYKrSwBK+ns4+PmVpNMB8Rfqp6jWJkX1aE=MIIC0DCCAjmgAwIBAgIDD0JBMA0GCSqGSIb3DQEBBAUAMHwxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhOZXcgWW9yazERMA8GA1UEBxMITmV3IFlvcmsxGTAXBgNVBAoTEFBoYW9zIFRlY2hub2xvZ3kxFDASBgNVBAsTC0VuZ2luZWVyaW5nMRYwFAYDVQQDEw1UZXN0IENBIChSU0EpMB4XDTAyMDQyOTE5MTY0MFoXDTEyMDQyNjE5MTY0MFowgYAxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhOZXcgWW9yazERMA8GA1UEBxMITmV3IFlvcmsxGTAXBgNVBAoTEFBoYW9zIFRlY2hub2xvZ3kxFDASBgNVBAsTC0VuZ2luZWVyaW5nMRowGAYDVQQDExFUZXN0IENsaWVudCAoUlNBKTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAgIb6nAB9oS/AI5jIj6WymvQhRxiMlE07G4abmMliYi5zWzvaFE2tnU+RZIBgtoXcgDEIU/vsLQut7nzCn9mHxC8JEaV4D4U91j64AyZakShqJw7qjJfqUxxPL0yJv2oFiouPDjGuJ9JPi0NrsZq+yfWfM54s4b9SNkcOIVMybZUCAwEAAaNbMFkwDAYDVR0TAQH/BAIwADAPBgNVHQ8BAf8EBQMDB9gAMBkGA1UdEQQSMBCBDnRlY2hAcGhhb3MuY29tMB0GA1UdDgQWBBQT58rBCxPmVLeZaYGRqVROnQlFbzANBgkqhkiG9w0BAQQFAAOBgQCxbCovFST25t+ryN1RipqozxJQcguKfeCwbfgBNobzcRvoW0kSIf7zi4mtQajDM0NfslFF51/dex5Rn64HmFFshSwSvQQMyf5Cfaqv2XQ60OXq6nAFG6WbHoge6RqfIez2MWDLoSB6plsjKtMmL3mcybBhROtX5GGuLx1NtfhNFQ==MIICzjCCAjegAwIBAgIDAYagMA0GCSqGSIb3DQEBBAUAMHwxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhOZXcgWW9yazERMA8GA1UEBxMITmV3IFlvcmsxGTAXBgNVBAoTEFBoYW9zIFRlY2hub2xvZ3kxFDASBgNVBAsTC0VuZ2luZWVyaW5nMRYwFAYDVQQDEw1UZXN0IENBIChSU0EpMB4XDTAyMDQyOTE5MDUyNFoXDTEwMTIzMTA1MDAwMFowfDELMAkGA1UEBhMCVVMxETAPBgNVBAgTCE5ldyBZb3JrMREwDwYDVQQHEwhOZXcgWW9yazEZMBcGA1UEChMQUGhhb3MgVGVjaG5vbG9neTEUMBIGA1UECxMLRW5naW5lZXJpbmcxFjAUBgNVBAMTDVRlc3QgQ0EgKFJTQSkwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALO5BLdMI/8/geNgk2SgbklQImTtQDwhkcutAlw35rS/84Y+Ct1qBi5r8c6JRVb/oEqQSs9TBczpLnd+D7xiqJ6/JcB3R9MDg/pAVoJCrCY4oZNlkJSasYWKZo77zSuUphNEfJEVZ4SMtwxZQLHFailJHm4L30zjI2E0N2YHyi7/AgMBAAGjXjBcMA8GA1UdEwEB/wQFMAMBAf8wDwYDVR0PAQH/BAUDAwfGADAZBgNVHREEEjAQgQ50ZWNoQHBoYW9zLmNvbTAdBgNVHQ4EFgQUMwlR0HC1hlo487v3Z47eghoDMMwwDQYJKoZIhvcNAQEEBQADgYEAY+elRel/6kG/o7xNmU9CrZM1EJMh3cHoedPOHt4yHP6crj6OYZMA+C7ifHX/wvGpcwZymMPqlr3cQ7B7/h88yCVJuANTe1BQtA6nZ4Cz6Bh9Mip3n8ycuXCDbxkUd0ALQYD6SS2+awVSHVGYRmFRd9vyW1nkg9EsScaqa7XG+6A=5KcCsBlhsIP4iMmHcaU2dXJPU8k=eT5ZU9fkIwQ9b9XAYq+iIYnj0DQ=././@LongLink0000000000000000000000000000020500000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-hmac-sha1-exclusive-c14n-comments-detached.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-hmac-sha1-excl0000755000175000017500000000114610372164212032316 0ustar tonytonyeT5ZU9fkIwQ9b9XAYq+iIYnj0DQ=kF7hLqyaxP0KeS7N3VereUYo3XE=././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-hmac-sha1-40-c14n-comments-detached.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-hmac-sha1-40-c0000755000175000017500000000124210372164212032023 0ustar tonytony40eT5ZU9fkIwQ9b9XAYq+iIYnj0DQ=D8A3AYM=././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-detached-xpath-transform.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-detached-x0000755000175000017500000000324510372164212032416 0ustar tonytony8EQLOiDYEmJDGDVTgNAcWNxr2Hg=dVvxMcQMshKcCJuEaqPf4gK2yQdZrEEflYIWKZ5vZ5Hxm2q98sifPFdbEH4+juo0wTbu2fqbY4U9pOGWbkZRerOh/iCtDU+pNqwrzXvmPhRIb9Ncwo7sRuy70j4jewNFhyku0PKbKuVmikZugWr+u3nS2f6CTsEp1/JzF4bwLA4=gIb6nAB9oS/AI5jIj6WymvQhRxiMlE07G4abmMliYi5zWzvaFE2tnU+RZIBgtoXcgDEIU/vsLQut7nzCn9mHxC8JEaV4D4U91j64AyZakShqJw7qjJfqUxxPL0yJv2oFiouPDjGuJ9JPi0NrsZq+yfWfM54s4b9SNkcOIVMybZU=AQAB@*TReY52bmpNnv+3gET3YhgJXTImk=././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-enveloping.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-enveloping0000755000175000017500000000475410372164212032564 0ustar tonytonyOLdgv4vWS4DAsiZUr41BZgppB2Q=eiuD94jyedzuHvhICyQ8vkeHjyhiFf1dWQEikAaf+q2edJumgz2wECVA4g8v/97Sp8f5A/97ktVAknsRxmC7JHuwTzgaz9gKvqIbCpHZLAPxovI1wA8o+YzuH1lv4RtkMv3WYqwuGm3eisnEv464H9Sa2V6L0VUHNPk8MEwDUyo=MIIC0DCCAjmgAwIBAgIDD0JBMA0GCSqGSIb3DQEBBAUAMHwxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhOZXcgWW9yazERMA8GA1UEBxMITmV3IFlvcmsxGTAXBgNVBAoTEFBoYW9zIFRlY2hub2xvZ3kxFDASBgNVBAsTC0VuZ2luZWVyaW5nMRYwFAYDVQQDEw1UZXN0IENBIChSU0EpMB4XDTAyMDQyOTE5MTY0MFoXDTEyMDQyNjE5MTY0MFowgYAxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhOZXcgWW9yazERMA8GA1UEBxMITmV3IFlvcmsxGTAXBgNVBAoTEFBoYW9zIFRlY2hub2xvZ3kxFDASBgNVBAsTC0VuZ2luZWVyaW5nMRowGAYDVQQDExFUZXN0IENsaWVudCAoUlNBKTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAgIb6nAB9oS/AI5jIj6WymvQhRxiMlE07G4abmMliYi5zWzvaFE2tnU+RZIBgtoXcgDEIU/vsLQut7nzCn9mHxC8JEaV4D4U91j64AyZakShqJw7qjJfqUxxPL0yJv2oFiouPDjGuJ9JPi0NrsZq+yfWfM54s4b9SNkcOIVMybZUCAwEAAaNbMFkwDAYDVR0TAQH/BAIwADAPBgNVHQ8BAf8EBQMDB9gAMBkGA1UdEQQSMBCBDnRlY2hAcGhhb3MuY29tMB0GA1UdDgQWBBQT58rBCxPmVLeZaYGRqVROnQlFbzANBgkqhkiG9w0BAQQFAAOBgQCxbCovFST25t+ryN1RipqozxJQcguKfeCwbfgBNobzcRvoW0kSIf7zi4mtQajDM0NfslFF51/dex5Rn64HmFFshSwSvQQMyf5Cfaqv2XQ60OXq6nAFG6WbHoge6RqfIez2MWDLoSB6plsjKtMmL3mcybBhROtX5GGuLx1NtfhNFQ==CN=Test CA (RSA),OU=Engineering,O=Phaos Technology,L=New York,ST=New York,C=US1000001CN=Test Client (RSA),OU=Engineering,O=Phaos Technology,L=New York,ST=New York,C=USE+fKwQsT5lS3mWmBkalUTp0JRW8= Alfonso Soriano 2B New York Yankees ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-manifest-x509-data-cert.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-manifest-x0000755000175000017500000000451310372164212032462 0ustar tonytonyNIYWGr1CiWC02cfck47Xf/UM9AA=E3tz123wD0lO8VwhVEBfFTsD5gc0Bplx6YtVuDM0cUJDHb5F+DiuxGugGqIt+CKUklSO2kSD7YmDeTnT+bXbbX+wokGQhKib+GhHQbYW8rckvF9KJ7Z+U1uKKGW3NyKN281Q301XDQYKrSwBK+ns4+PmVpNMB8Rfqp6jWJkX1aE=MIIC0DCCAjmgAwIBAgIDD0JBMA0GCSqGSIb3DQEBBAUAMHwxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhOZXcgWW9yazERMA8GA1UEBxMITmV3IFlvcmsxGTAXBgNVBAoTEFBoYW9zIFRlY2hub2xvZ3kxFDASBgNVBAsTC0VuZ2luZWVyaW5nMRYwFAYDVQQDEw1UZXN0IENBIChSU0EpMB4XDTAyMDQyOTE5MTY0MFoXDTEyMDQyNjE5MTY0MFowgYAxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhOZXcgWW9yazERMA8GA1UEBxMITmV3IFlvcmsxGTAXBgNVBAoTEFBoYW9zIFRlY2hub2xvZ3kxFDASBgNVBAsTC0VuZ2luZWVyaW5nMRowGAYDVQQDExFUZXN0IENsaWVudCAoUlNBKTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAgIb6nAB9oS/AI5jIj6WymvQhRxiMlE07G4abmMliYi5zWzvaFE2tnU+RZIBgtoXcgDEIU/vsLQut7nzCn9mHxC8JEaV4D4U91j64AyZakShqJw7qjJfqUxxPL0yJv2oFiouPDjGuJ9JPi0NrsZq+yfWfM54s4b9SNkcOIVMybZUCAwEAAaNbMFkwDAYDVR0TAQH/BAIwADAPBgNVHQ8BAf8EBQMDB9gAMBkGA1UdEQQSMBCBDnRlY2hAcGhhb3MuY29tMB0GA1UdDgQWBBQT58rBCxPmVLeZaYGRqVROnQlFbzANBgkqhkiG9w0BAQQFAAOBgQCxbCovFST25t+ryN1RipqozxJQcguKfeCwbfgBNobzcRvoW0kSIf7zi4mtQajDM0NfslFF51/dex5Rn64HmFFshSwSvQQMyf5Cfaqv2XQ60OXq6nAFG6WbHoge6RqfIez2MWDLoSB6plsjKtMmL3mcybBhROtX5GGuLx1NtfhNFQ==5KcCsBlhsIP4iMmHcaU2dXJPU8k=eT5ZU9fkIwQ9b9XAYq+iIYnj0DQ=././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-dsa-enveloped.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-dsa-enveloped.0000755000175000017500000000507410372164212032433 0ustar tonytony Alfonso Soriano 2B New York Yankees nDF2V/bzRd0VE3EwShWtsBzTEDc=Hmt1KjwoXdyyroB+KfcoUEaM5NcXhwB2CbIblJHwTxek1bF1ZMqvig==MIIDjzCCA02gAwIBAgIDHoSBMAkGByqGSM44BAMwfDELMAkGA1UEBhMCVVMxETAPBgNVBAgTCE5ldyBZb3JrMREwDwYDVQQHEwhOZXcgWW9yazEZMBcGA1UEChMQUGhhb3MgVGVjaG5vbG9neTEUMBIGA1UECxMLRW5naW5lZXJpbmcxFjAUBgNVBAMTDVRlc3QgQ0EgKERTQSkwHhcNMDIwNDI5MTkxNzUyWhcNMTIwNDI2MTkxNzUyWjCBgDELMAkGA1UEBhMCVVMxETAPBgNVBAgTCE5ldyBZb3JrMREwDwYDVQQHEwhOZXcgWW9yazEZMBcGA1UEChMQUGhhb3MgVGVjaG5vbG9neTEUMBIGA1UECxMLRW5naW5lZXJpbmcxGjAYBgNVBAMTEVRlc3QgQ2xpZW50IChEU0EpMIIBtjCCASsGByqGSM44BAEwggEeAoGBAOZZarV6NhtYOtSfFhbD9NFPXJec+3ps5Mak63uAvKVf6nU/GEZG8a7xyuwXOwV3ce2m3D+OvONg3BGdO7u3rAs5VfY84kE1rIo/XepfDa2vUUTKs9+8A8dIVD0X5lh3hFRR6UJIFJS9ZWov1I7N+n24iJ11qEd31kJ+vr46j+UvAhUAvSPQz7ak24nBo5gwSMfEXkvEblcCgYAJTKoCgSREekqtuZWcDy3e+RIQzwaTeoeZM26fFV2YFVqK2o+d/oPtJfEtFA2+4nz4EAjvRT/6K7kRSScT5DO8fZs8/0H2leX2U0FXzzDOMIL4zeRAPb4GOmz410mROOGskzKCLwo8YINuZ9Kp/4XX6cEikMiArNbFuFQwd31V8gOBhAACgYAktkcKG0v06OFikPa1Wk3j5Sun0/RH/WOaRADe9jJxJ/oYO0YPIRKMK5aXawfgTAi3fImSE3gI/AaCuuSrwfVL5TtfvqdMRqhsCYSWcGsF4Xq5q1HDCYK9WbgMIqzVck143VCWxsuKR/1omC7OOPy6fPJhlF2MxyCOEu1WN5gALaNbMFkwDAYDVR0TAQH/BAIwADAPBgNVHQ8BAf8EBQMDB9gAMBkGA1UdEQQSMBCBDnRlY2hAcGhhb3MuY29tMB0GA1UdDgQWBBRsW9jwXGyEQfGGTp1+6fy5Alr2qDAJBgcqhkjOOAQDAzEAMC4CFQCLHnvOkvMdxjw3sSYgdljtiEGPTAIVALEZRsqT2ldGoOE3dUgY3LEWenhNCN=Test CA (DSA),OU=Engineering,O=Phaos Technology,L=New York,ST=New York,C=US2000001CN=Test Client (DSA),OU=Engineering,O=Phaos Technology,L=New York,ST=New York,C=USbFvY8FxshEHxhk6dfun8uQJa9qg=libxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/document.xsl0000755000175000017500000000140610372164212030246 0ustar tonytony <xsl:value-of select="name"/>

././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-xpath-transform-enveloped.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-rsa-xpath-tran0000755000175000017500000000517710372164212032504 0ustar tonytony Alfonso Soriano 2B New York Yankees count(ancestor-or-self::dsig:Signature | here()/ancestor::dsig:Signature[1]) > count(ancestor-or-self::dsig:Signature)nDF2V/bzRd0VE3EwShWtsBzTEDc=eMfbu79eYzYilIOVlOw4r/PgJAJm4wdFhBnqxPf2OYtwtv/zHzbwvhfVQG90cYlWAdW7zaki1Om1LdPxgAb+urxb8e5gma3nxK+u/jPJ9ykQimqiOpBIpbGYOv/xFDS1XDu4LY4BITe+ZyyvUpYSFGv5X//eJ9rUyC8TJy8SNEk=MIIC0DCCAjmgAwIBAgIDD0JBMA0GCSqGSIb3DQEBBAUAMHwxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhOZXcgWW9yazERMA8GA1UEBxMITmV3IFlvcmsxGTAXBgNVBAoTEFBoYW9zIFRlY2hub2xvZ3kxFDASBgNVBAsTC0VuZ2luZWVyaW5nMRYwFAYDVQQDEw1UZXN0IENBIChSU0EpMB4XDTAyMDQyOTE5MTY0MFoXDTEyMDQyNjE5MTY0MFowgYAxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhOZXcgWW9yazERMA8GA1UEBxMITmV3IFlvcmsxGTAXBgNVBAoTEFBoYW9zIFRlY2hub2xvZ3kxFDASBgNVBAsTC0VuZ2luZWVyaW5nMRowGAYDVQQDExFUZXN0IENsaWVudCAoUlNBKTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAgIb6nAB9oS/AI5jIj6WymvQhRxiMlE07G4abmMliYi5zWzvaFE2tnU+RZIBgtoXcgDEIU/vsLQut7nzCn9mHxC8JEaV4D4U91j64AyZakShqJw7qjJfqUxxPL0yJv2oFiouPDjGuJ9JPi0NrsZq+yfWfM54s4b9SNkcOIVMybZUCAwEAAaNbMFkwDAYDVR0TAQH/BAIwADAPBgNVHQ8BAf8EBQMDB9gAMBkGA1UdEQQSMBCBDnRlY2hAcGhhb3MuY29tMB0GA1UdDgQWBBQT58rBCxPmVLeZaYGRqVROnQlFbzANBgkqhkiG9w0BAQQFAAOBgQCxbCovFST25t+ryN1RipqozxJQcguKfeCwbfgBNobzcRvoW0kSIf7zi4mtQajDM0NfslFF51/dex5Rn64HmFFshSwSvQQMyf5Cfaqv2XQ60OXq6nAFG6WbHoge6RqfIez2MWDLoSB6plsjKtMmL3mcybBhROtX5GGuLx1NtfhNFQ==CN=Test CA (RSA),OU=Engineering,O=Phaos Technology,L=New York,ST=New York,C=US1000001CN=Test Client (RSA),OU=Engineering,O=Phaos Technology,L=New York,ST=New York,C=USE+fKwQsT5lS3mWmBkalUTp0JRW8=././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-dsa-detached.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmldsig-three/signature-dsa-detached.x0000755000175000017500000000450010372164212032374 0ustar tonytonyeT5ZU9fkIwQ9b9XAYq+iIYnj0DQ=IEYfZwI0+/wn9rTbJdXaIVAvjJN1vvmDDbw4X4GY1Row9OMyiI7VqA==MIIDjzCCA02gAwIBAgIDHoSBMAkGByqGSM44BAMwfDELMAkGA1UEBhMCVVMxETAPBgNVBAgTCE5ldyBZb3JrMREwDwYDVQQHEwhOZXcgWW9yazEZMBcGA1UEChMQUGhhb3MgVGVjaG5vbG9neTEUMBIGA1UECxMLRW5naW5lZXJpbmcxFjAUBgNVBAMTDVRlc3QgQ0EgKERTQSkwHhcNMDIwNDI5MTkxNzUyWhcNMTIwNDI2MTkxNzUyWjCBgDELMAkGA1UEBhMCVVMxETAPBgNVBAgTCE5ldyBZb3JrMREwDwYDVQQHEwhOZXcgWW9yazEZMBcGA1UEChMQUGhhb3MgVGVjaG5vbG9neTEUMBIGA1UECxMLRW5naW5lZXJpbmcxGjAYBgNVBAMTEVRlc3QgQ2xpZW50IChEU0EpMIIBtjCCASsGByqGSM44BAEwggEeAoGBAOZZarV6NhtYOtSfFhbD9NFPXJec+3ps5Mak63uAvKVf6nU/GEZG8a7xyuwXOwV3ce2m3D+OvONg3BGdO7u3rAs5VfY84kE1rIo/XepfDa2vUUTKs9+8A8dIVD0X5lh3hFRR6UJIFJS9ZWov1I7N+n24iJ11qEd31kJ+vr46j+UvAhUAvSPQz7ak24nBo5gwSMfEXkvEblcCgYAJTKoCgSREekqtuZWcDy3e+RIQzwaTeoeZM26fFV2YFVqK2o+d/oPtJfEtFA2+4nz4EAjvRT/6K7kRSScT5DO8fZs8/0H2leX2U0FXzzDOMIL4zeRAPb4GOmz410mROOGskzKCLwo8YINuZ9Kp/4XX6cEikMiArNbFuFQwd31V8gOBhAACgYAktkcKG0v06OFikPa1Wk3j5Sun0/RH/WOaRADe9jJxJ/oYO0YPIRKMK5aXawfgTAi3fImSE3gI/AaCuuSrwfVL5TtfvqdMRqhsCYSWcGsF4Xq5q1HDCYK9WbgMIqzVck143VCWxsuKR/1omC7OOPy6fPJhlF2MxyCOEu1WN5gALaNbMFkwDAYDVR0TAQH/BAIwADAPBgNVHQ8BAf8EBQMDB9gAMBkGA1UdEQQSMBCBDnRlY2hAcGhhb3MuY29tMB0GA1UdDgQWBBRsW9jwXGyEQfGGTp1+6fy5Alr2qDAJBgcqhkjOOAQDAzEAMC4CFQCLHnvOkvMdxjw3sSYgdljtiEGPTAIVALEZRsqT2ldGoOE3dUgY3LEWenhNCN=Test CA (DSA),OU=Engineering,O=Phaos Technology,L=New York,ST=New York,C=US2000001CN=Test Client (DSA),OU=Engineering,O=Phaos Technology,L=New York,ST=New York,C=USbFvY8FxshEHxhk6dfun8uQJa9qg=libxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/0000755000175000017500000000000012273503733024555 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-text-aes192-kt-rsa1_5.xml0000644000175000017500000000755607754361403031555 0ustar tonytony John Smith my-rsa-key MIIDzTCCArWgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBljELMAkGA1UEBhMCVVMx CzAJBgNVBAgTAk5ZMRIwEAYDVQQHEwlNYW5oYXR0YW4xFTATBgNVBAoTDExhdmEg U3VwcmVtZTEUMBIGA1UECxMLSGVhZCBPZmZpY2UxFDASBgNVBAMTC1JTQSBUZXN0 IENBMSMwIQYJKoZIhvcNAQkBFhR0ZWNoQGxhdmFzdXByZW1lLm9yZzAeFw0wMjAx MzExNjI5NDNaFw00MzAyMjUxNjI5NDNaMIGWMQswCQYDVQQGEwJVUzELMAkGA1UE CBMCTlkxEjAQBgNVBAcTCU1hbmhhdHRhbjEVMBMGA1UEChMMTGF2YSBTdXByZW1l MRQwEgYDVQQLEwtIZWFkIE9mZmljZTEUMBIGA1UEAxMLUlNBIFRlc3QgQ0ExIzAh BgkqhkiG9w0BCQEWFHRlY2hAbGF2YXN1cHJlbWUub3JnMIIBIjANBgkqhkiG9w0B AQEFAAOCAQ8AMIIBCgKCAQEAgj3TOyUtgg99oEfsm8h9JTZBxUkzYkXVUOHxIwnk Fwp4y9ZnrGja/j+kpRyKvYP5CkNdq0e58/r7GLXj45iqd03XjsFNTdjy4OIOgf7J xMG7z+hEB1LT2swTs10GILFWPByRl3/BEsnekLZdoqNoJrvnttVkxgu3x80Ji3/A ZD8Ub/kBGOSPyu6pn3OdnMTc5q4r1qUe985lQzCZvCMw6AoGeCyJodNu2MbveNeH +YPjRgLCQfzvOFRq+9qMtE8XfUJZdNhPZhgdsOGf8uJauTcIHbAyw7BhxPy6RikW W5yiWUmBya+7t4y1TQJzham/0y0zU3TAA7b/rDrU7xmNPwIDAQABoyQwIjAPBgNV HRMBAf8EBTADAQH/MA8GA1UdDwEB/wQFAwMHBgAwDQYJKoZIhvcNAQEEBQADggEB ADELWZjFLPjSjGeOaeUwH/mEOP+l/nTtxe07IWAQL4kvb4wsiUsM1EkPptcBQsym OYgFhf3Elqma84bbOyp85y/iQnjpqWWJ73TFXSWZamSIhYb4Gk+dQuwFI+zD3B2y WwqghaAHDzxtzROLUBjo+97Y6ng6V5zjmtdGOFwNXwWhf3Y+MjnErtBIKYao8NJO p6di80w82+s6Ot+CLVvVobLhxS/y8yWplATRiQnI5ij/WTLML+tiU5aes0c9abaf O7i9j1iTuZsDT3f96ia0RSLsXSGij737QKc3ZM8lSxBWfepWYO+G+IRgr1q9IUDa kKO/vB9Ay64Rt88XbLnnGns= fiDteajx7IJTorLOQoMiXyblOh3zNix23qAy0hcKKP1/7OeLDT1hEnrXkKVvG83h No3WF89VPuZGuGeEIJl4xcMklHItcI370NmGjCgKI5GQS/6yxMr4mEbiUL2X8Ycy wVa2GUV9qFlkv6C8OnFpCUqBgJOjbUAu9pQ3OWa35Nv8tKqyaphPUaQtPc8ZMehS cLHtkYKeByWqz5Djp11rklDp4v1QSeDWEn9zCKkaFiD0DZRtqpnTzwjj1tZsDNp8 mbps2mAlqnU0L+EsR+8KTRh5vzmxueM+lsLkGH2Rusy2qi/GqmF/NiwyTBdokWoM Vd9qzUAODGnwGzf7ymyVKg== hg1h2JBeLhLq1QxPKsOQUE/ThbnjAdFCfQYKeqO1ipbi6lTZr5XPP3XsIybze0nX Bank of the Internet libxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/rsa-priv-key.der0000644000175000017500000000230007754361403027601 0ustar tonytony00  *H 0=;%-}G}%6AI3bEP#  xgh? C]G㘪wM׎MMDR] V<ސ]h&d d?os+֥eC0#0 x,nxׇFA8TjڌO}BYtOfZ72ðaF)[YIɯMs-3St:?R<XZiK\y|J4rS{ڨ.?ƧY%ӏ fM`shE1͵2roEh.{ y*ۄ;vp&|=a.5a4I~zvpI%oT4{z)  2Ah gn}?g r;N0l'z_s `9ſ Y4M AD`!%P$xLXFdFJ_׶'ߐV bHa42 u7v0s:\ m;5//*aC?tVc4QE R#6jO {}omJ7f ~$[b!-yїp7#jE#xmXkxNLcfr6`nC%2n$yKx׆C[!uQM9!]xnv}OQ|O>Ax3x);ᖸvxO7 (:2B8zV)xMNc$6KB@&À2ڼsɄf 6{f+GҚRo<* ?RW[4 Iߍ$d Z:9RBGrᡗb䨰Ux6RnԗhHX׻ lg]&|#vU,xvr!왝 '_ww2L7_O3lXr~l>$ìqu^\RCgyTQ΁b2azFvJ3+؞Fp!1IM-g=,,w:t0*Z John Smith YWJjZGU= MIIEjDCCA/WgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBljELMAkGA1UEBhMCVVMx CzAJBgNVBAgTAk5ZMRIwEAYDVQQHEwlNYW5oYXR0YW4xFTATBgNVBAoTDExhdmEg U3VwcmVtZTEUMBIGA1UECxMLSGVhZCBPZmZpY2UxFDASBgNVBAMTC1JTQSBUZXN0 IENBMSMwIQYJKoZIhvcNAQkBFhR0ZWNoQGxhdmFzdXByZW1lLm9yZzAeFw0wMjAx MzAyMjUwNDBaFw0xMDAxMDEwNTAwMDBaMIGMMQswCQYDVQQGEwJVUzELMAkGA1UE CBMCTlkxEjAQBgNVBAcTCU1hbmhhdHRhbjEOMAwGA1UEChMFUGhhb3MxFDASBgNV BAsTC0hlYWQgT2ZmaWNlMRcwFQYDVQQDEw5ESCBUZXN0IENsaWVudDEdMBsGCSqG SIb3DQEJARYOdGVjaEBwaGFvcy5vcmcwggJDMIIBuAYHKoZIzj4CATCCAasCgYEA uavat7i6NOpnRObdx7Gz38h8xkgmv20XUaj1JjfvMAQfQFMHeshGhY2Q0mwvJ1Of X/kZ4cMbSYUywh3WAY6zQs8W2uxg8GeduCLebNQGTaHVFVmrJMQawlV1bIMQ+kDi IQNR/FPqSNHKD2Q9/uoGD5d2l4KP3qH8dv5HOT8fCwUCgYBxunqmUuKZFTNKJhH9 G6UINlI/Xr9jPesj5/I8fpWgxZxsgkzksqisDCslZ09uZTATrGFTF3fk6kNhx25s UCtYHHK1HzQmsLMu2BWNBQrkLC+Mkd3d39UdNduPW4kCMpcdoHAh+zTqAH2QkKJm yxc/x0LevkSUk8rX8DFa3y152QIVAL+Eo4gPL339dk7inq87PnR1PWuHAm0A+C9E GPDSphFaPWO5LQTNflJ0l9IGjcNFGrJX0imWrjM2q6bGYz0ZK4cJhcX12YZOjR52 TZh3cy6yAJG470i65nlz5/3ESWFHsMO0COrDi/Ca5RfMrYGcc8hrydzFlT1zqMFa 1yuqQKVsGwXcMBwDFgCZ/hqLAtBi6dyv6Ky+OfXfXgJBPhQCAgNPA4GEAAKBgFWw LyYO4IPxJsbaQQsJ4K1xTjPSjTMmvG4fpKA+S1BGz8FI1SPACb2/YYCrmjoWNvkQ V6NTQ+eji6TGA7ET85c4AcRZtxOi3gSP5Kq2A3E9dUouikhrKSHFb+Nx420CXmtp jxBu+qUTb7AMrRCus8maHwU9PdKQbZxoDFOLArJHo00wSzAPBgNVHQ8BAf8EBQMD BwgAMBkGA1UdEQQSMBCBDnRlY2hAcGhhb3Mub3JnMB0GA1UdDgQWBBTfky/d+/wI 6zicN4uDl0PSAyRNnTANBgkqhkiG9w0BAQQFAAOBgQA+2cWsAZ9a44ttBX1Z3eMI e0GgduXErBt9xsv2Sy6fS/6CyyJm3tpthuT2WMZmu6E+ceBLkFU+TnxnEf/NrSj8 wtQt/wVHacaSZMcwUDv/uTUxrtIZUJ7A7VxcAvbnLE5fQqKhF6QT5irtbE2Ryvd7 oMfGG8PmU+sbN9sNXtIzOA== MIIEjTCCA/agAwIBAgIBAjANBgkqhkiG9w0BAQQFADCBljELMAkGA1UEBhMCVVMx CzAJBgNVBAgTAk5ZMRIwEAYDVQQHEwlNYW5oYXR0YW4xFTATBgNVBAoTDExhdmEg U3VwcmVtZTEUMBIGA1UECxMLSGVhZCBPZmZpY2UxFDASBgNVBAMTC1JTQSBUZXN0 IENBMSMwIQYJKoZIhvcNAQkBFhR0ZWNoQGxhdmFzdXByZW1lLm9yZzAeFw0wMjAx MzAyMjUyNTNaFw0xMDAxMDEwNTAwMDBaMIGMMQswCQYDVQQGEwJVUzELMAkGA1UE CBMCTlkxEjAQBgNVBAcTCU1hbmhhdHRhbjEOMAwGA1UEChMFUGhhb3MxFDASBgNV BAsTC0hlYWQgT2ZmaWNlMRcwFQYDVQQDEw5ESCBUZXN0IENsaWVudDEdMBsGCSqG SIb3DQEJARYOdGVjaEBwaGFvcy5vcmcwggJEMIIBuAYHKoZIzj4CATCCAasCgYEA uavat7i6NOpnRObdx7Gz38h8xkgmv20XUaj1JjfvMAQfQFMHeshGhY2Q0mwvJ1Of X/kZ4cMbSYUywh3WAY6zQs8W2uxg8GeduCLebNQGTaHVFVmrJMQawlV1bIMQ+kDi IQNR/FPqSNHKD2Q9/uoGD5d2l4KP3qH8dv5HOT8fCwUCgYBxunqmUuKZFTNKJhH9 G6UINlI/Xr9jPesj5/I8fpWgxZxsgkzksqisDCslZ09uZTATrGFTF3fk6kNhx25s UCtYHHK1HzQmsLMu2BWNBQrkLC+Mkd3d39UdNduPW4kCMpcdoHAh+zTqAH2QkKJm yxc/x0LevkSUk8rX8DFa3y152QIVAL+Eo4gPL339dk7inq87PnR1PWuHAm0A+C9E GPDSphFaPWO5LQTNflJ0l9IGjcNFGrJX0imWrjM2q6bGYz0ZK4cJhcX12YZOjR52 TZh3cy6yAJG470i65nlz5/3ESWFHsMO0COrDi/Ca5RfMrYGcc8hrydzFlT1zqMFa 1yuqQKVsGwXcMBwDFgCZ/hqLAtBi6dyv6Ky+OfXfXgJBPhQCAgNPA4GFAAKBgQCM KtnMyjT9G1LKTZoN7rHwIO08D5j1YYIscsQDc+q4ny5WEFo+wEmOqxGcE9JrRdeb it6cT8F7TWWzeDJUyaXFEi4E1panCBCL1crqS/HbY8VH/zzhT+5L232LchsoYa1p dqxxLHW8RrOax4RLVrcIOPcW4x3Ggk0ANYQhR6kNmqNNMEswDwYDVR0PAQH/BAUD AwcIADAZBgNVHREEEjAQgQ50ZWNoQHBoYW9zLm9yZzAdBgNVHQ4EFgQUHddBJmfV 6MD3FTbVmHcLFN6QFAcwDQYJKoZIhvcNAQEEBQADgYEAKZl9P/ZmIrwHp3BTfBHl eFBk9CbhK14FObMGWSkfjqipb5snXBPE3uPBrvP1StisPRsK/y1OZfcjjkA6ht0j YWp9lohNDTlc/NOKGOQSCpntqr+wQhc6l16jezqR7sKv2eHBFGs0V7HCrEe2mTP4 rDa/YKrmL5K6S9GSF27rx40= BsIAtHyqE+foVEU2B8EoSAErEMjuunlXygmu+BC6SN+mYGFEsQ/frVzgiKBo2yRe bbnuUqAwDx03wS4zqmW5lD1C6bm/9tUSSv8HcNr7vRqrx3tRQ51y6y5xRbhjK6Zi vKHDXwZpxY4CnhfUwbtTSZisjNn/eV6UYxZdz2zmTxAJXAPI1dVFiPdqhljXhlDE tVAt/1f+//u1D782NMCuPVUt09Mtbf0pcFJhtoCmx84NVT3XwK+2Tg== libxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes192-ka-dh.xml0000644000175000017500000001146407754361403031471 0ustar tonytony John Smith YWJjZGU= MIIEjDCCA/WgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBljELMAkGA1UEBhMCVVMx CzAJBgNVBAgTAk5ZMRIwEAYDVQQHEwlNYW5oYXR0YW4xFTATBgNVBAoTDExhdmEg U3VwcmVtZTEUMBIGA1UECxMLSGVhZCBPZmZpY2UxFDASBgNVBAMTC1JTQSBUZXN0 IENBMSMwIQYJKoZIhvcNAQkBFhR0ZWNoQGxhdmFzdXByZW1lLm9yZzAeFw0wMjAx MzAyMjUwNDBaFw0xMDAxMDEwNTAwMDBaMIGMMQswCQYDVQQGEwJVUzELMAkGA1UE CBMCTlkxEjAQBgNVBAcTCU1hbmhhdHRhbjEOMAwGA1UEChMFUGhhb3MxFDASBgNV BAsTC0hlYWQgT2ZmaWNlMRcwFQYDVQQDEw5ESCBUZXN0IENsaWVudDEdMBsGCSqG SIb3DQEJARYOdGVjaEBwaGFvcy5vcmcwggJDMIIBuAYHKoZIzj4CATCCAasCgYEA uavat7i6NOpnRObdx7Gz38h8xkgmv20XUaj1JjfvMAQfQFMHeshGhY2Q0mwvJ1Of X/kZ4cMbSYUywh3WAY6zQs8W2uxg8GeduCLebNQGTaHVFVmrJMQawlV1bIMQ+kDi IQNR/FPqSNHKD2Q9/uoGD5d2l4KP3qH8dv5HOT8fCwUCgYBxunqmUuKZFTNKJhH9 G6UINlI/Xr9jPesj5/I8fpWgxZxsgkzksqisDCslZ09uZTATrGFTF3fk6kNhx25s UCtYHHK1HzQmsLMu2BWNBQrkLC+Mkd3d39UdNduPW4kCMpcdoHAh+zTqAH2QkKJm yxc/x0LevkSUk8rX8DFa3y152QIVAL+Eo4gPL339dk7inq87PnR1PWuHAm0A+C9E GPDSphFaPWO5LQTNflJ0l9IGjcNFGrJX0imWrjM2q6bGYz0ZK4cJhcX12YZOjR52 TZh3cy6yAJG470i65nlz5/3ESWFHsMO0COrDi/Ca5RfMrYGcc8hrydzFlT1zqMFa 1yuqQKVsGwXcMBwDFgCZ/hqLAtBi6dyv6Ky+OfXfXgJBPhQCAgNPA4GEAAKBgFWw LyYO4IPxJsbaQQsJ4K1xTjPSjTMmvG4fpKA+S1BGz8FI1SPACb2/YYCrmjoWNvkQ V6NTQ+eji6TGA7ET85c4AcRZtxOi3gSP5Kq2A3E9dUouikhrKSHFb+Nx420CXmtp jxBu+qUTb7AMrRCus8maHwU9PdKQbZxoDFOLArJHo00wSzAPBgNVHQ8BAf8EBQMD BwgAMBkGA1UdEQQSMBCBDnRlY2hAcGhhb3Mub3JnMB0GA1UdDgQWBBTfky/d+/wI 6zicN4uDl0PSAyRNnTANBgkqhkiG9w0BAQQFAAOBgQA+2cWsAZ9a44ttBX1Z3eMI e0GgduXErBt9xsv2Sy6fS/6CyyJm3tpthuT2WMZmu6E+ceBLkFU+TnxnEf/NrSj8 wtQt/wVHacaSZMcwUDv/uTUxrtIZUJ7A7VxcAvbnLE5fQqKhF6QT5irtbE2Ryvd7 oMfGG8PmU+sbN9sNXtIzOA== MIIEjTCCA/agAwIBAgIBAjANBgkqhkiG9w0BAQQFADCBljELMAkGA1UEBhMCVVMx CzAJBgNVBAgTAk5ZMRIwEAYDVQQHEwlNYW5oYXR0YW4xFTATBgNVBAoTDExhdmEg U3VwcmVtZTEUMBIGA1UECxMLSGVhZCBPZmZpY2UxFDASBgNVBAMTC1JTQSBUZXN0 IENBMSMwIQYJKoZIhvcNAQkBFhR0ZWNoQGxhdmFzdXByZW1lLm9yZzAeFw0wMjAx MzAyMjUyNTNaFw0xMDAxMDEwNTAwMDBaMIGMMQswCQYDVQQGEwJVUzELMAkGA1UE CBMCTlkxEjAQBgNVBAcTCU1hbmhhdHRhbjEOMAwGA1UEChMFUGhhb3MxFDASBgNV BAsTC0hlYWQgT2ZmaWNlMRcwFQYDVQQDEw5ESCBUZXN0IENsaWVudDEdMBsGCSqG SIb3DQEJARYOdGVjaEBwaGFvcy5vcmcwggJEMIIBuAYHKoZIzj4CATCCAasCgYEA uavat7i6NOpnRObdx7Gz38h8xkgmv20XUaj1JjfvMAQfQFMHeshGhY2Q0mwvJ1Of X/kZ4cMbSYUywh3WAY6zQs8W2uxg8GeduCLebNQGTaHVFVmrJMQawlV1bIMQ+kDi IQNR/FPqSNHKD2Q9/uoGD5d2l4KP3qH8dv5HOT8fCwUCgYBxunqmUuKZFTNKJhH9 G6UINlI/Xr9jPesj5/I8fpWgxZxsgkzksqisDCslZ09uZTATrGFTF3fk6kNhx25s UCtYHHK1HzQmsLMu2BWNBQrkLC+Mkd3d39UdNduPW4kCMpcdoHAh+zTqAH2QkKJm yxc/x0LevkSUk8rX8DFa3y152QIVAL+Eo4gPL339dk7inq87PnR1PWuHAm0A+C9E GPDSphFaPWO5LQTNflJ0l9IGjcNFGrJX0imWrjM2q6bGYz0ZK4cJhcX12YZOjR52 TZh3cy6yAJG470i65nlz5/3ESWFHsMO0COrDi/Ca5RfMrYGcc8hrydzFlT1zqMFa 1yuqQKVsGwXcMBwDFgCZ/hqLAtBi6dyv6Ky+OfXfXgJBPhQCAgNPA4GFAAKBgQCM KtnMyjT9G1LKTZoN7rHwIO08D5j1YYIscsQDc+q4ny5WEFo+wEmOqxGcE9JrRdeb it6cT8F7TWWzeDJUyaXFEi4E1panCBCL1crqS/HbY8VH/zzhT+5L232LchsoYa1p dqxxLHW8RrOax4RLVrcIOPcW4x3Ggk0ANYQhR6kNmqNNMEswDwYDVR0PAQH/BAUD AwcIADAZBgNVHREEEjAQgQ50ZWNoQHBoYW9zLm9yZzAdBgNVHQ4EFgQUHddBJmfV 6MD3FTbVmHcLFN6QFAcwDQYJKoZIhvcNAQEEBQADgYEAKZl9P/ZmIrwHp3BTfBHl eFBk9CbhK14FObMGWSkfjqipb5snXBPE3uPBrvP1StisPRsK/y1OZfcjjkA6ht0j YWp9lohNDTlc/NOKGOQSCpntqr+wQhc6l16jezqR7sKv2eHBFGs0V7HCrEe2mTP4 rDa/YKrmL5K6S9GSF27rx40= jg5SecwV6R7dluAMEUsPwWmrTc236XCF8xEVEV7cyEJDfTmdk6BNX4w5BKfFDfOP ph4t428f9HI3WIg48BVY8DDaYOReo0a3BKcIoiDjo80V5eZdAQdlWLOecKmD339+ gqxeBIdJkmQyIpKqDM2NAlqcKM0p+utAn5M8fUosBBO7boJ8i/lnOvDrkqiELHQy ZZZKgWsYoIZNKPq1Fd6AUVBAIod3ruMfZYVfXL5G2S1jYa8JNcwp2MU32SIuSIxL ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-content-aes256-kt-rsa1_5.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-content-aes256-kt-rsa1_5.0000644000175000017500000000707507754361403031517 0ustar tonytony John Smith my-rsa-key MIIDzTCCArWgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBljELMAkGA1UEBhMCVVMx CzAJBgNVBAgTAk5ZMRIwEAYDVQQHEwlNYW5oYXR0YW4xFTATBgNVBAoTDExhdmEg U3VwcmVtZTEUMBIGA1UECxMLSGVhZCBPZmZpY2UxFDASBgNVBAMTC1JTQSBUZXN0 IENBMSMwIQYJKoZIhvcNAQkBFhR0ZWNoQGxhdmFzdXByZW1lLm9yZzAeFw0wMjAx MzExNjI5NDNaFw00MzAyMjUxNjI5NDNaMIGWMQswCQYDVQQGEwJVUzELMAkGA1UE CBMCTlkxEjAQBgNVBAcTCU1hbmhhdHRhbjEVMBMGA1UEChMMTGF2YSBTdXByZW1l MRQwEgYDVQQLEwtIZWFkIE9mZmljZTEUMBIGA1UEAxMLUlNBIFRlc3QgQ0ExIzAh BgkqhkiG9w0BCQEWFHRlY2hAbGF2YXN1cHJlbWUub3JnMIIBIjANBgkqhkiG9w0B AQEFAAOCAQ8AMIIBCgKCAQEAgj3TOyUtgg99oEfsm8h9JTZBxUkzYkXVUOHxIwnk Fwp4y9ZnrGja/j+kpRyKvYP5CkNdq0e58/r7GLXj45iqd03XjsFNTdjy4OIOgf7J xMG7z+hEB1LT2swTs10GILFWPByRl3/BEsnekLZdoqNoJrvnttVkxgu3x80Ji3/A ZD8Ub/kBGOSPyu6pn3OdnMTc5q4r1qUe985lQzCZvCMw6AoGeCyJodNu2MbveNeH +YPjRgLCQfzvOFRq+9qMtE8XfUJZdNhPZhgdsOGf8uJauTcIHbAyw7BhxPy6RikW W5yiWUmBya+7t4y1TQJzham/0y0zU3TAA7b/rDrU7xmNPwIDAQABoyQwIjAPBgNV HRMBAf8EBTADAQH/MA8GA1UdDwEB/wQFAwMHBgAwDQYJKoZIhvcNAQEEBQADggEB ADELWZjFLPjSjGeOaeUwH/mEOP+l/nTtxe07IWAQL4kvb4wsiUsM1EkPptcBQsym OYgFhf3Elqma84bbOyp85y/iQnjpqWWJ73TFXSWZamSIhYb4Gk+dQuwFI+zD3B2y WwqghaAHDzxtzROLUBjo+97Y6ng6V5zjmtdGOFwNXwWhf3Y+MjnErtBIKYao8NJO p6di80w82+s6Ot+CLVvVobLhxS/y8yWplATRiQnI5ij/WTLML+tiU5aes0c9abaf O7i9j1iTuZsDT3f96ia0RSLsXSGij737QKc3ZM8lSxBWfepWYO+G+IRgr1q9IUDa kKO/vB9Ay64Rt88XbLnnGns= Vc7VOXgJDlw/oQ0hOvIaBKsGiOwyvIArzkhd2W7mZBQyeFlkJlxZQdnPGGg4kJE9 EGWeMWQZ0XavJy+xA9Z+PlIFqkpPHUXyos9jZZNniRxEtl6tLce2ReSVah+y8Lb3 3xSNSm+O9k2B42yP3Osrj175KNMSMLLM2ZuA0iq28aP7v7DmtDY7VNp0n+O4nJUM Eyy4RO0jmtXctt3jUfpCmGkqy42/LG6F5h1kluyfszjHvi/9lD5LEkCl2Y/3az+j 2vLuuXM45z6ef14Dlgsh7eJtqp3bRT0Tpp4JvBWMiuDZaV1zUcZq7q80lNMvXucb mSrSmlXn2lWPttfTrcjXrw== p5MMs6F765jIUqOj5rH1vAro0Rx4/PLIoEOXCOWaEGbEdCHh0m86zifozutcmoBA xy1SuxmJjtFDO32f/bpuDhdzFDgLrlVIcXrNeHGgken6NryC2n1NdGS9CiYsyaPF B5CWEkx3Prtbak6S20z3XZTJltOdoqzeNOn8/IDavLA= ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes192-kt-rsa_oaep_sha1.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes192-kt-rsa_oae0000644000175000017500000000677207754361403031741 0ustar tonytony John Smith my-rsa-key MIIDzTCCArWgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBljELMAkGA1UEBhMCVVMx CzAJBgNVBAgTAk5ZMRIwEAYDVQQHEwlNYW5oYXR0YW4xFTATBgNVBAoTDExhdmEg U3VwcmVtZTEUMBIGA1UECxMLSGVhZCBPZmZpY2UxFDASBgNVBAMTC1JTQSBUZXN0 IENBMSMwIQYJKoZIhvcNAQkBFhR0ZWNoQGxhdmFzdXByZW1lLm9yZzAeFw0wMjAx MzExNjI5NDNaFw00MzAyMjUxNjI5NDNaMIGWMQswCQYDVQQGEwJVUzELMAkGA1UE CBMCTlkxEjAQBgNVBAcTCU1hbmhhdHRhbjEVMBMGA1UEChMMTGF2YSBTdXByZW1l MRQwEgYDVQQLEwtIZWFkIE9mZmljZTEUMBIGA1UEAxMLUlNBIFRlc3QgQ0ExIzAh BgkqhkiG9w0BCQEWFHRlY2hAbGF2YXN1cHJlbWUub3JnMIIBIjANBgkqhkiG9w0B AQEFAAOCAQ8AMIIBCgKCAQEAgj3TOyUtgg99oEfsm8h9JTZBxUkzYkXVUOHxIwnk Fwp4y9ZnrGja/j+kpRyKvYP5CkNdq0e58/r7GLXj45iqd03XjsFNTdjy4OIOgf7J xMG7z+hEB1LT2swTs10GILFWPByRl3/BEsnekLZdoqNoJrvnttVkxgu3x80Ji3/A ZD8Ub/kBGOSPyu6pn3OdnMTc5q4r1qUe985lQzCZvCMw6AoGeCyJodNu2MbveNeH +YPjRgLCQfzvOFRq+9qMtE8XfUJZdNhPZhgdsOGf8uJauTcIHbAyw7BhxPy6RikW W5yiWUmBya+7t4y1TQJzham/0y0zU3TAA7b/rDrU7xmNPwIDAQABoyQwIjAPBgNV HRMBAf8EBTADAQH/MA8GA1UdDwEB/wQFAwMHBgAwDQYJKoZIhvcNAQEEBQADggEB ADELWZjFLPjSjGeOaeUwH/mEOP+l/nTtxe07IWAQL4kvb4wsiUsM1EkPptcBQsym OYgFhf3Elqma84bbOyp85y/iQnjpqWWJ73TFXSWZamSIhYb4Gk+dQuwFI+zD3B2y WwqghaAHDzxtzROLUBjo+97Y6ng6V5zjmtdGOFwNXwWhf3Y+MjnErtBIKYao8NJO p6di80w82+s6Ot+CLVvVobLhxS/y8yWplATRiQnI5ij/WTLML+tiU5aes0c9abaf O7i9j1iTuZsDT3f96ia0RSLsXSGij737QKc3ZM8lSxBWfepWYO+G+IRgr1q9IUDa kKO/vB9Ay64Rt88XbLnnGns= ELSmG8oo52p2ANjbCRJDV0K6M/3W+1b+3A1c07oNWdxeUerdUBarYe5BQingndIv y4qfD9hGif8AmY0IXuLWptmZYx8TlHLSYw7TUfLxYMVLzUVtDgrPAqXStNcpJK/l 0INMurXU+xnvDXpQEcCthh6C8AWxvXDVKW+8Ud8vLYkGGNVgtEPtdAybx2WptfzJ TSYvkRr0VEjDJSg9ZPSJLCeOwQZ9+YvP9F9E556EHK5A476fAgeNL3uefsZ4Yo4Q 1UANOvSBtY2ro8xOj6PyBI/5RiW9AVUQd+5UiPq1/jWSoKTFaWib4xr5WhI4dQlc nkYU3EYhmST4pokqevZplw== WeFDc5EMzI4i77yhGpY2Ae+5VvbPSdnrmXvlRrntz5v6snRmVxtSAXJQgJiouER8 BNVTiMdB/YcpzOeWLAEfEZG1PswYFsmkYd9QCvGpv1oXisv9Cv8uR9BBmz/ylOmX pBCfU38i0fR90JOkGMjwtlkNTwPwOsG5EFRch8jx/wk6qaj6qojJOA21IlFsTKFA ugZ3uZeDFPNBJMSVnLudyMFrQYWT14ji/aFETqhQxwlHkgrx1WDN26tBN/9Q6aTZ libxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/key.txt0000644000175000017500000001347707754361403026126 0ustar tonytonyThis file contains keys to decrypt the sample xml documents: enc-*-*-*-*.xml. All the keys are expressed in hex string. The symmetric keys (Triple DES Key, AES-128 Key, AES-192 Key, AES-256 Key) are key wrap keys. They can be used to decrypt the EncryptedKey element in the files: enc-*-*-kw-*.xml. The RSA Private Key is for decrypting the EncryptedKey element in the files: enc-*-*-kt-*.xml. The Diffie-Hellman Private Key is the Recipient's private key which can be used to derive the data decryption key for the EncryptedData element in the files: enc-*-*-ka-dh.xml. #Triple DES Key (identified by the key name = my-3des-key): #---------------------------------------------------------- c8 8f 89 d5 fd e9 b9 80 04 46 32 1c 4f ab df 83 a4 62 b6 62 97 f2 70 f4 #AES-128 Key (identified by the key name = my-aes128-key): #--------------------------------------------------------- d3 5f b2 b9 0d a1 b8 f4 b5 f9 0b f4 2c 7f b3 69 #AES-192 Key (identified by the key name = my-aes192-key): #--------------------------------------------------------- 22 57 ee 4b 8d 0b bd 2b 55 53 43 23 f1 e3 eb ac 61 d5 84 06 f8 f3 2f be #AES-256 Key (identified by the key name = my-aes256-key): #--------------------------------------------------------- 66 16 78 bf 74 65 c1 39 42 10 ea 48 ac 77 cb 29 5c 89 38 10 ed 10 93 8e 40 36 ad ff 8c 51 d5 b0 #RSA Private Key: #---------------- #Modulus: 82 3d d3 3b 25 2d 82 0f 7d a0 47 ec 9b c8 7d 25 36 41 c5 49 33 62 45 d5 50 e1 f1 23 09 e4 17 0a 78 cb d6 67 ac 68 da fe 3f a4 a5 1c 8a bd 83 f9 0a 43 5d ab 47 b9 f3 fa fb 18 b5 e3 e3 98 aa 77 4d d7 8e c1 4d 4d d8 f2 e0 e2 0e 81 fe c9 c4 c1 bb cf e8 44 07 52 d3 da cc 13 b3 5d 06 20 b1 56 3c 1c 91 97 7f c1 12 c9 de 90 b6 5d a2 a3 68 26 bb e7 b6 d5 64 c6 0b b7 c7 cd 09 8b 7f c0 64 3f 14 6f f9 01 18 e4 8f ca ee a9 9f 73 9d 9c c4 dc e6 ae 2b d6 a5 1e f7 ce 65 43 30 99 bc 23 30 e8 0a 06 78 2c 89 a1 d3 6e d8 c6 ef 78 d7 87 f9 83 e3 46 02 c2 41 fc ef 38 54 6a fb da 8c b4 4f 17 7d 42 59 74 d8 4f 66 18 1d b0 e1 9f f2 e2 5a b9 37 08 1d b0 32 c3 b0 61 c4 fc ba 46 29 16 5b 9c a2 59 49 81 c9 af bb b7 8c b5 4d 02 73 85 a9 bf d3 2d 33 53 74 c0 03 b6 ff ac 3a d4 ef 19 8d 3f #Public Expotent 01 00 01 #Exponent 52 be 3c 88 82 e2 1a 93 04 d8 e3 58 ea cf c0 d1 f7 5a 69 a0 4b c8 cf 5c ea 79 e0 dc c5 d7 e6 db 7c 4a e3 f8 11 8c bc 34 72 f2 83 03 53 11 7b da a8 2e 8c 3f d8 dd c6 a7 59 07 25 e7 96 1c d3 8f e0 20 66 4d 60 73 68 b5 45 31 d8 cd b5 b5 32 0f 72 e6 6f 45 68 f1 b2 2e 7b 20 b8 ff 0c 79 90 b0 9c 97 f9 d7 2a 0e db 84 ec a5 3b 76 d9 70 bf 26 7c 92 85 91 a4 e8 3d 61 90 ca 2e 9a 35 9b 61 13 d1 18 f2 34 49 bd 7e fb 7a 9b 76 70 49 ac 00 f5 8b b4 c5 25 6f 54 8b a4 34 89 7b 7a 29 90 cc 16 1e 19 0c 06 c2 13 20 32 8c 9b 41 68 f0 20 ea 67 6e f7 11 7d 3f e2 02 1f 67 fc 0c 97 72 3b 4e 30 6c 16 86 27 e3 7a 5f 94 d5 73 0c 86 b7 0b de 60 39 c5 bf a0 19 0a 59 ed 34 e8 4d f9 8e 10 97 95 0a 1f 41 44 aa 60 9e 21 f8 25 50 a5 86 24 ce 78 de 15 4c b6 58 83 f0 46 98 64 e3 ac 46 4a 5f 81 #Prime 1 8a 00 d7 b6 c1 27 b3 df 90 56 c4 0a 62 89 48 fc 61 34 11 d9 1d d4 e9 32 1b 0d 75 37 76 08 30 d3 73 3a 8b 5c 0c aa 14 d3 f2 6d d6 12 3b 35 a5 91 82 2f 7f 2f 2a 61 98 43 3f 74 16 8d 9e b3 56 e8 63 c8 11 34 a3 51 0f 45 b8 ad 8b cb 09 0d 52 23 36 0f e5 05 b0 b9 6a 10 9e 12 e7 4f fb 91 d5 ce 0b 7b 7d ae 6f 6d 88 83 f2 ab 02 4a 37 14 66 c8 00 0a 7e 24 5b 62 21 2d aa a4 79 cd d1 97 70 11 #Prime 2 f1 9a 06 c5 37 17 23 ba 6a 9a 45 9c 23 ce ec 88 78 6d 87 58 c5 08 6b f7 10 cc 00 78 8c b8 b6 4e 07 06 4c 63 66 80 72 fe 15 36 9b 1b e2 60 f8 6e 14 43 e3 25 32 84 6e 24 11 79 b5 4b c1 a4 c9 c6 ce 78 dd d7 86 43 5b 21 75 51 d3 d7 4d 39 c3 21 b2 86 e2 15 5d 80 b9 e9 78 6e fb c0 76 cb 7d ba e7 4f d7 c1 14 d2 51 7c 4f fd e4 3e 41 bd 8c 78 33 d9 d1 78 29 1e 15 3b e1 96 b8 17 cd 76 78 4f #Prime exponent 1 01 37 0a af 28 3a 32 42 38 a2 1a ed c0 7a 56 f3 29 e3 ec 78 4d e3 ee fd aa f1 4e 63 e3 9d 24 d8 e7 bd cf 36 4b 42 40 16 b1 9e b7 f0 c7 26 ac c3 80 32 ec da bc 73 c9 84 66 0d 9e 99 36 99 7b 9d 66 2b 7f c3 47 e0 d1 d2 9a 52 a4 d5 6f c9 f7 3c 2a 20 af b2 82 20 cf c7 3f ad 08 ee 52 57 b1 5b 34 0c ad 49 98 df 8d 01 24 64 cf 0b 5a 3a ca c0 de 07 39 9f 16 52 e1 d9 e6 13 b6 a2 d2 42 94 11 #Prime exponent 2 47 c0 ff 11 c3 72 d3 e1 a1 97 7f e5 07 9d 85 12 62 f1 e4 a8 b0 9b f7 b4 c1 00 55 83 78 07 c3 dd 18 a8 fe 36 e7 52 6e d4 97 68 48 58 d7 bb 05 0d 6c 67 5d 26 c7 02 1d 40 7c 52 82 77 55 d2 78 67 21 f0 08 8e 99 d0 fe 27 5f 77 f5 f0 77 32 bf ec 4c c9 e8 37 5f e8 4f 82 33 6c 58 a3 de 72 e5 00 bc de f4 be 81 95 1e 7e 07 ca f6 6c ff ca 3e a6 99 24 c3 ac f9 ea 71 #CrtCoffieient: 75 5e b2 85 d4 5c 52 b4 81 83 a7 bc 43 67 f5 a2 be cb 79 8c e2 eb 15 a3 7f 54 51 8e a3 ce 81 fe 95 07 fc 62 32 61 7a 46 76 4a b9 15 33 2b d8 9e 46 70 21 b4 31 49 4d 2d 67 3d b7 d5 2c f4 ac 01 2c f1 01 a1 90 19 d6 77 02 c1 c3 e2 3a 74 de 30 b2 2a d0 5a 3c a7 43 cd e5 6b ae b2 18 3d cc 99 e0 e0 5e a0 55 94 bf 39 43 12 d1 1c a8 97 37 38 dc 29 35 66 a5 ee 78 4a 11 b6 ff 02 3a 85 9a 98 #Diffie-Hellman Private Key: #--------------------------- #Prime P b9 ab da b7 b8 ba 34 ea 67 44 e6 dd c7 b1 b3 df c8 7c c6 48 26 bf 6d 17 51 a8 f5 26 37 ef 30 04 1f 40 53 07 7a c8 46 85 8d 90 d2 6c 2f 27 53 9f 5f f9 19 e1 c3 1b 49 85 32 c2 1d d6 01 8e b3 42 cf 16 da ec 60 f0 67 9d b8 22 de 6c d4 06 4d a1 d5 15 59 ab 24 c4 1a c2 55 75 6c 83 10 fa 40 e2 21 03 51 fc 53 ea 48 d1 ca 0f 64 3d fe ea 06 0f 97 76 97 82 8f de a1 fc 76 fe 47 39 3f 1f 0b 05 #Generator G 71 ba 7a a6 52 e2 99 15 33 4a 26 11 fd 1b a5 08 36 52 3f 5e bf 63 3d eb 23 e7 f2 3c 7e 95 a0 c5 9c 6c 82 4c e4 b2 a8 ac 0c 2b 25 67 4f 6e 65 30 13 ac 61 53 17 77 e4 ea 43 61 c7 6e 6c 50 2b 58 1c 72 b5 1f 34 26 b0 b3 2e d8 15 8d 05 0a e4 2c 2f 8c 91 dd dd df d5 1d 35 db 8f 5b 89 02 32 97 1d a0 70 21 fb 34 ea 00 7d 90 90 a2 66 cb 17 3f c7 42 de be 44 94 93 ca d7 f0 31 5a df 2d 79 d9 #Prime Q bf 84 a3 88 0f 2f 7d fd 76 4e e2 9e af 3b 3e 74 75 3d 6b 87 #Private Key Value 6d 27 17 0e c9 ff b3 29 8e 12 2c 1f a7 a8 48 64 42 f2 12 b3 ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-content-aes128-kw-3des.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-content-aes128-kw-3des.xm0000644000175000017500000000247307754361403031626 0ustar tonytony John Smith my-3des-key /PZvvn42E9dmMUZ8KCY6B5XtLaaIaG4X5YNDwgV5Vlo= rINpr0HonGcKnnf/vYx8N3gnd+1rb+zwH1vnfjyt+bOoSU72w/QqniT71/GxtFFx gwE0/arABVa1r8/PMRerWqyParMnpwIRq6dzQHKb5SqiqFEYPRZhytTGZFXN39oG YZkSINOli5paMwTWrq6hDSPRozKvfEqhuI0VgZU4OLM= libxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-text-3des-kw-aes256.xml0000644000175000017500000000272607754361403031317 0ustar tonytony John Smith my-aes256-key jOvQe4SxDqEMvAHcmb3Z+/Uedj23pvL6BRQsl2sjJlQ= tY3V4h8kopDTZXb80BoqEWH7/nWryHZhU504S1ZRPLw= Bank of the Internet libxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/Readme.txt0000644000175000017500000000310607754361403026517 0ustar tonytonyThis directory contains the following files: Readme.txt -- This file. payment.xml -- A sample XML file. key.txt -- Keys for decrypting the encrypted XML files enc-*-*-*-*.xml. dh-priv-key.der -- Diffie-Hellman private key encoded in PKCS#8 PrivateKeyInfo formate. This key can be used to decrypt the files enc-*-*-ka-dh.xml. rsa-priv-key.der -- RSA private key encoded in PKCS#8 PrivateKeyInfo formate. This key can be used to decrypt the files enc-*-*-kt-*.xml. enc-*-*-*-*.xml -- XML document obtained by encrypting and replacing part of the sample payment.xml. The data encryption key is in turn encrypted. Each file has the form: enc-A-B-C-D.xml, where: A indicates the type of the data encrypted. This includes: element = The CreditCard element. content = The content of the CreditCard element (multiple elements). text = The content of the Number element (text node). B indicates the data encryption algorithm. C indicates the key encryption protocols: kt = key transport kw = key wrap ka = key agreement D indicates the key encryption algorithm. bad-*-enc-*-*-*-*.xml -- some "screw-up" samples The sample encrypted XML files are produced from Phaos XML toolkit. Jiandong Guo Phaos Technology http://www.phaos.com jguo@phaos.com libxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-text-aes128-kw-aes192.xml0000644000175000017500000000260707754361403031461 0ustar tonytony John Smith my-aes192-key PeDwjnCsg6xWzs3SmzUtc2nyUz28nGu7 6hfMgI39JG5aIId4ZxZkXLGSGVcC7Wu4yOSdkC4H3NJ50pMdcZI2c38YoFHpFZFS Bank of the Internet libxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-3des-kw-3des.xml0000644000175000017500000000244007754361403031606 0ustar tonytony John Smith my-tripledes-key HgVuHoXxBQWD9fvi0gt9TanywZ5lJokM/12fcMG6gRoMjsCPulH+4A== yUMIHkj5EETckjZ59fpda4+m4YLCrkJsnuRz+Q3e5sP+VvHKRH1kdeGkXw3kYURV JM3nQjGl2egW80oUxSykQD2F9iDoIjNhLSgIbyuse64oo/5/v9IiaUpSvrAocwLP AzFIUmOrxmIagAkRGDOeMR8tdHLD6g84dQj4O/aGfwhL/2wUo/l+7onrbmsd6pVI fjNyvXm+eITuyUnkDTHrCR+dfb2sHaQ3g3McgyfP6ZjI/L50SPJZ/w== libxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes256-ka-dh.xml0000644000175000017500000001147407754361403031473 0ustar tonytony John Smith YWJjZGU= MIIEjDCCA/WgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBljELMAkGA1UEBhMCVVMx CzAJBgNVBAgTAk5ZMRIwEAYDVQQHEwlNYW5oYXR0YW4xFTATBgNVBAoTDExhdmEg U3VwcmVtZTEUMBIGA1UECxMLSGVhZCBPZmZpY2UxFDASBgNVBAMTC1JTQSBUZXN0 IENBMSMwIQYJKoZIhvcNAQkBFhR0ZWNoQGxhdmFzdXByZW1lLm9yZzAeFw0wMjAx MzAyMjUwNDBaFw0xMDAxMDEwNTAwMDBaMIGMMQswCQYDVQQGEwJVUzELMAkGA1UE CBMCTlkxEjAQBgNVBAcTCU1hbmhhdHRhbjEOMAwGA1UEChMFUGhhb3MxFDASBgNV BAsTC0hlYWQgT2ZmaWNlMRcwFQYDVQQDEw5ESCBUZXN0IENsaWVudDEdMBsGCSqG SIb3DQEJARYOdGVjaEBwaGFvcy5vcmcwggJDMIIBuAYHKoZIzj4CATCCAasCgYEA uavat7i6NOpnRObdx7Gz38h8xkgmv20XUaj1JjfvMAQfQFMHeshGhY2Q0mwvJ1Of X/kZ4cMbSYUywh3WAY6zQs8W2uxg8GeduCLebNQGTaHVFVmrJMQawlV1bIMQ+kDi IQNR/FPqSNHKD2Q9/uoGD5d2l4KP3qH8dv5HOT8fCwUCgYBxunqmUuKZFTNKJhH9 G6UINlI/Xr9jPesj5/I8fpWgxZxsgkzksqisDCslZ09uZTATrGFTF3fk6kNhx25s UCtYHHK1HzQmsLMu2BWNBQrkLC+Mkd3d39UdNduPW4kCMpcdoHAh+zTqAH2QkKJm yxc/x0LevkSUk8rX8DFa3y152QIVAL+Eo4gPL339dk7inq87PnR1PWuHAm0A+C9E GPDSphFaPWO5LQTNflJ0l9IGjcNFGrJX0imWrjM2q6bGYz0ZK4cJhcX12YZOjR52 TZh3cy6yAJG470i65nlz5/3ESWFHsMO0COrDi/Ca5RfMrYGcc8hrydzFlT1zqMFa 1yuqQKVsGwXcMBwDFgCZ/hqLAtBi6dyv6Ky+OfXfXgJBPhQCAgNPA4GEAAKBgFWw LyYO4IPxJsbaQQsJ4K1xTjPSjTMmvG4fpKA+S1BGz8FI1SPACb2/YYCrmjoWNvkQ V6NTQ+eji6TGA7ET85c4AcRZtxOi3gSP5Kq2A3E9dUouikhrKSHFb+Nx420CXmtp jxBu+qUTb7AMrRCus8maHwU9PdKQbZxoDFOLArJHo00wSzAPBgNVHQ8BAf8EBQMD BwgAMBkGA1UdEQQSMBCBDnRlY2hAcGhhb3Mub3JnMB0GA1UdDgQWBBTfky/d+/wI 6zicN4uDl0PSAyRNnTANBgkqhkiG9w0BAQQFAAOBgQA+2cWsAZ9a44ttBX1Z3eMI e0GgduXErBt9xsv2Sy6fS/6CyyJm3tpthuT2WMZmu6E+ceBLkFU+TnxnEf/NrSj8 wtQt/wVHacaSZMcwUDv/uTUxrtIZUJ7A7VxcAvbnLE5fQqKhF6QT5irtbE2Ryvd7 oMfGG8PmU+sbN9sNXtIzOA== MIIEjTCCA/agAwIBAgIBAjANBgkqhkiG9w0BAQQFADCBljELMAkGA1UEBhMCVVMx CzAJBgNVBAgTAk5ZMRIwEAYDVQQHEwlNYW5oYXR0YW4xFTATBgNVBAoTDExhdmEg U3VwcmVtZTEUMBIGA1UECxMLSGVhZCBPZmZpY2UxFDASBgNVBAMTC1JTQSBUZXN0 IENBMSMwIQYJKoZIhvcNAQkBFhR0ZWNoQGxhdmFzdXByZW1lLm9yZzAeFw0wMjAx MzAyMjUyNTNaFw0xMDAxMDEwNTAwMDBaMIGMMQswCQYDVQQGEwJVUzELMAkGA1UE CBMCTlkxEjAQBgNVBAcTCU1hbmhhdHRhbjEOMAwGA1UEChMFUGhhb3MxFDASBgNV BAsTC0hlYWQgT2ZmaWNlMRcwFQYDVQQDEw5ESCBUZXN0IENsaWVudDEdMBsGCSqG SIb3DQEJARYOdGVjaEBwaGFvcy5vcmcwggJEMIIBuAYHKoZIzj4CATCCAasCgYEA uavat7i6NOpnRObdx7Gz38h8xkgmv20XUaj1JjfvMAQfQFMHeshGhY2Q0mwvJ1Of X/kZ4cMbSYUywh3WAY6zQs8W2uxg8GeduCLebNQGTaHVFVmrJMQawlV1bIMQ+kDi IQNR/FPqSNHKD2Q9/uoGD5d2l4KP3qH8dv5HOT8fCwUCgYBxunqmUuKZFTNKJhH9 G6UINlI/Xr9jPesj5/I8fpWgxZxsgkzksqisDCslZ09uZTATrGFTF3fk6kNhx25s UCtYHHK1HzQmsLMu2BWNBQrkLC+Mkd3d39UdNduPW4kCMpcdoHAh+zTqAH2QkKJm yxc/x0LevkSUk8rX8DFa3y152QIVAL+Eo4gPL339dk7inq87PnR1PWuHAm0A+C9E GPDSphFaPWO5LQTNflJ0l9IGjcNFGrJX0imWrjM2q6bGYz0ZK4cJhcX12YZOjR52 TZh3cy6yAJG470i65nlz5/3ESWFHsMO0COrDi/Ca5RfMrYGcc8hrydzFlT1zqMFa 1yuqQKVsGwXcMBwDFgCZ/hqLAtBi6dyv6Ky+OfXfXgJBPhQCAgNPA4GFAAKBgQCM KtnMyjT9G1LKTZoN7rHwIO08D5j1YYIscsQDc+q4ny5WEFo+wEmOqxGcE9JrRdeb it6cT8F7TWWzeDJUyaXFEi4E1panCBCL1crqS/HbY8VH/zzhT+5L232LchsoYa1p dqxxLHW8RrOax4RLVrcIOPcW4x3Ggk0ANYQhR6kNmqNNMEswDwYDVR0PAQH/BAUD AwcIADAZBgNVHREEEjAQgQ50ZWNoQHBoYW9zLm9yZzAdBgNVHQ4EFgQUHddBJmfV 6MD3FTbVmHcLFN6QFAcwDQYJKoZIhvcNAQEEBQADgYEAKZl9P/ZmIrwHp3BTfBHl eFBk9CbhK14FObMGWSkfjqipb5snXBPE3uPBrvP1StisPRsK/y1OZfcjjkA6ht0j YWp9lohNDTlc/NOKGOQSCpntqr+wQhc6l16jezqR7sKv2eHBFGs0V7HCrEe2mTP4 rDa/YKrmL5K6S9GSF27rx40= aXXD/Yz+ENFF/uop7z9RwfeVfdFteZwcxMILahK/NKF58LMsUKcr0C9jk5IkMZqJ m+bszCs5O61zLI/iJcKFUU2VrokeTuYUP2BZMoxL7q0zqUs7bIwm61IEmU0ghtAT 5jSGCbZLPfz3SRe3de023098UbTg+xC/zLslLxBvEtuZh/rNIoNlCA1WwUNV7oRG tFoqxzDDh/hyBJzSMAw/S/efNORn4Bbfqu4WjO5bN8wxCi1ATFtAmhSVh3c6t1/U ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes128-kw-aes128.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes128-kw-aes128.0000644000175000017500000000243607754361403031404 0ustar tonytony John Smith my-aes128-key GPl6bneL1jKl0/lGnf9gejlYHRI6XxFz AbJmB4dsNP5svH3n260KeHFFqRoXaBoDYIqtrhXHE0t1TvJaGtvwjJt2pgM8Yffc xKyOLWJljv+FraXUZFnW+VJloMTAXQ8DyeR8ds1sj6X7hT62RFIKm0DvggdBAh9d tpeF6fwtOeUUCmidna7im7SLh9a9/CKTBb9RqDzKXQ+Sai6knJPZHtX/yF6ZedgX GOUFLX3EdzwVgJ3jnKcB/LZjapsPrRs+6lMdck26aRizWJBHYpY86gWWnu+Ob+/k libxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/dh-priv-key.der0000644000175000017500000000073307754361403027417 0ustar tonytony00*H>0ڷ4gDDZ|H&mQ&70@SzFl/'S_I2B`g"lMY$Uul@!QSHd=vޡvG9? qzR3J&6R?^c=#<~ŜlL䲨 +%gOne0aSwCanlP+Xr4&. ,/5ۏ[2p!4}f?B޾D1Z-y/}vN➯;>tu=km/DҦZ=c-~RtEW)36c=+ نNvMws.HysIaGôḘ̈skŕ=sZ+@l0bܯ謾9^A>Om'),HdB././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-3des-kt-rsa_oaep_sha256.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-3des-kt-rsa_oaep_0000644000175000017500000000701507754361403032101 0ustar tonytony John Smith my-rsa-key MIIDzTCCArWgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBljELMAkGA1UEBhMCVVMx CzAJBgNVBAgTAk5ZMRIwEAYDVQQHEwlNYW5oYXR0YW4xFTATBgNVBAoTDExhdmEg U3VwcmVtZTEUMBIGA1UECxMLSGVhZCBPZmZpY2UxFDASBgNVBAMTC1JTQSBUZXN0 IENBMSMwIQYJKoZIhvcNAQkBFhR0ZWNoQGxhdmFzdXByZW1lLm9yZzAeFw0wMjAx MzExNjI5NDNaFw00MzAyMjUxNjI5NDNaMIGWMQswCQYDVQQGEwJVUzELMAkGA1UE CBMCTlkxEjAQBgNVBAcTCU1hbmhhdHRhbjEVMBMGA1UEChMMTGF2YSBTdXByZW1l MRQwEgYDVQQLEwtIZWFkIE9mZmljZTEUMBIGA1UEAxMLUlNBIFRlc3QgQ0ExIzAh BgkqhkiG9w0BCQEWFHRlY2hAbGF2YXN1cHJlbWUub3JnMIIBIjANBgkqhkiG9w0B AQEFAAOCAQ8AMIIBCgKCAQEAgj3TOyUtgg99oEfsm8h9JTZBxUkzYkXVUOHxIwnk Fwp4y9ZnrGja/j+kpRyKvYP5CkNdq0e58/r7GLXj45iqd03XjsFNTdjy4OIOgf7J xMG7z+hEB1LT2swTs10GILFWPByRl3/BEsnekLZdoqNoJrvnttVkxgu3x80Ji3/A ZD8Ub/kBGOSPyu6pn3OdnMTc5q4r1qUe985lQzCZvCMw6AoGeCyJodNu2MbveNeH +YPjRgLCQfzvOFRq+9qMtE8XfUJZdNhPZhgdsOGf8uJauTcIHbAyw7BhxPy6RikW W5yiWUmBya+7t4y1TQJzham/0y0zU3TAA7b/rDrU7xmNPwIDAQABoyQwIjAPBgNV HRMBAf8EBTADAQH/MA8GA1UdDwEB/wQFAwMHBgAwDQYJKoZIhvcNAQEEBQADggEB ADELWZjFLPjSjGeOaeUwH/mEOP+l/nTtxe07IWAQL4kvb4wsiUsM1EkPptcBQsym OYgFhf3Elqma84bbOyp85y/iQnjpqWWJ73TFXSWZamSIhYb4Gk+dQuwFI+zD3B2y WwqghaAHDzxtzROLUBjo+97Y6ng6V5zjmtdGOFwNXwWhf3Y+MjnErtBIKYao8NJO p6di80w82+s6Ot+CLVvVobLhxS/y8yWplATRiQnI5ij/WTLML+tiU5aes0c9abaf O7i9j1iTuZsDT3f96ia0RSLsXSGij737QKc3ZM8lSxBWfepWYO+G+IRgr1q9IUDa kKO/vB9Ay64Rt88XbLnnGns= Y97gGuJRx1Vt31KHkKJfJCh/7XSSQxMH8rF+GAlnEMd4fq8+sL92XBMtLiLiNeWC VNaiBorxZrqIW9xPAcOdvN1v1QIxlhf8LtiFyBMWKQm9i61t64cJC2ZRCdT8nPxy Qt+fvUXGpLn0LA4cHyMukeLPO4EUQY8whunVXkuSgTKjJICxYKF8HNYsHUr1/fyy QL2PW1/UfyEpSBJAZMg+TQFuBSCbAuWbFK2AgSupV5NIppBNU/eRhArReeuAgzSu nY9dX1ofdZs8GzvuV8tfcBHzT/h59MPYMxl4sZrl/0NeMQ0ewZhX3yygebgyzZNP 4TB4QzQZHRoXNIPUs0vkfA== 3Bg5VZK+B/FETt4rT4baIJ4jFKBraqxPnltaSNC672NTcMxBlWG5omCGsbL31gAe BDNelmi+3OmqhPLYYsbNOSl6O7YKoP6JvbXVcUcwWwsjEt9Fm6PTrTMy+vp+bgFM J8L0WCwyPXnCl/DJS99eaGSG518ynfM/cEmDUINFatT8PX55B4Pd+o1BWkmVxg+E jOgiai7L35HCOTpiBwLUUErvvulujk9iFW5ZvqkgIDLOlDLfx4/V9A== ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes192-kw-aes192.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes192-kw-aes192.0000644000175000017500000000242407754361403031403 0ustar tonytony John Smith my-aes192-key iuZvvGBWScikHld9TtNIOz0Sm7Srg5AcxOBMA8qIvQY= /zILD8Eq5vvZK7A+XJaHzoXVqPkk91sOunyhqj+yFA6ZJquaFSUz3A/aQ8AkTrVS /rGiNCXDOfmpIab6DRH5deOG0RNxDQvtSiAmM+Beb+Aas5WJ9UNKk1ff8sBdgznl 9u8ApmELFPj5u2ucOdCOGS+Re708aSI6SGmqUEJusoXLWJSSD0gE1xW1hmukrTaR p8kkchaNNTM+x4gLbq3sSsfncnCo9E/MpeQqQfBPL7r92UwvUMY/DEVz0BbKLomG ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-3des-kt-rsa1_5.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-3des-kt-rsa1_5.xm0000644000175000017500000000652507754361403031673 0ustar tonytony John Smith my-rsa-key MIIDzTCCArWgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBljELMAkGA1UEBhMCVVMx CzAJBgNVBAgTAk5ZMRIwEAYDVQQHEwlNYW5oYXR0YW4xFTATBgNVBAoTDExhdmEg U3VwcmVtZTEUMBIGA1UECxMLSGVhZCBPZmZpY2UxFDASBgNVBAMTC1JTQSBUZXN0 IENBMSMwIQYJKoZIhvcNAQkBFhR0ZWNoQGxhdmFzdXByZW1lLm9yZzAeFw0wMjAx MzExNjI5NDNaFw00MzAyMjUxNjI5NDNaMIGWMQswCQYDVQQGEwJVUzELMAkGA1UE CBMCTlkxEjAQBgNVBAcTCU1hbmhhdHRhbjEVMBMGA1UEChMMTGF2YSBTdXByZW1l MRQwEgYDVQQLEwtIZWFkIE9mZmljZTEUMBIGA1UEAxMLUlNBIFRlc3QgQ0ExIzAh BgkqhkiG9w0BCQEWFHRlY2hAbGF2YXN1cHJlbWUub3JnMIIBIjANBgkqhkiG9w0B AQEFAAOCAQ8AMIIBCgKCAQEAgj3TOyUtgg99oEfsm8h9JTZBxUkzYkXVUOHxIwnk Fwp4y9ZnrGja/j+kpRyKvYP5CkNdq0e58/r7GLXj45iqd03XjsFNTdjy4OIOgf7J xMG7z+hEB1LT2swTs10GILFWPByRl3/BEsnekLZdoqNoJrvnttVkxgu3x80Ji3/A ZD8Ub/kBGOSPyu6pn3OdnMTc5q4r1qUe985lQzCZvCMw6AoGeCyJodNu2MbveNeH +YPjRgLCQfzvOFRq+9qMtE8XfUJZdNhPZhgdsOGf8uJauTcIHbAyw7BhxPy6RikW W5yiWUmBya+7t4y1TQJzham/0y0zU3TAA7b/rDrU7xmNPwIDAQABoyQwIjAPBgNV HRMBAf8EBTADAQH/MA8GA1UdDwEB/wQFAwMHBgAwDQYJKoZIhvcNAQEEBQADggEB ADELWZjFLPjSjGeOaeUwH/mEOP+l/nTtxe07IWAQL4kvb4wsiUsM1EkPptcBQsym OYgFhf3Elqma84bbOyp85y/iQnjpqWWJ73TFXSWZamSIhYb4Gk+dQuwFI+zD3B2y WwqghaAHDzxtzROLUBjo+97Y6ng6V5zjmtdGOFwNXwWhf3Y+MjnErtBIKYao8NJO p6di80w82+s6Ot+CLVvVobLhxS/y8yWplATRiQnI5ij/WTLML+tiU5aes0c9abaf O7i9j1iTuZsDT3f96ia0RSLsXSGij737QKc3ZM8lSxBWfepWYO+G+IRgr1q9IUDa kKO/vB9Ay64Rt88XbLnnGns= bYDE3XSjELiEW/rX08ZQUcG1dK1l1uSw14EKhIHbwrM8DFZKF4fBaPXxG/91mkOA cs3q0LZESrqHGVrm9UvqL48utkNrR56ud60FhIgSBgdKE/9qTMjrSCX1Vw7xfhJH Fc4tD3vjhALLaO3SUT8esPQKPK4gEWYMNzdpyNQuD0mrLiQ/SnHuHKzBmSjjgKkk xFcFVdiPT/XAhEZcuvkOyLMYgPN55slcnRzckOEq6zOcu8Ww6/2dG0a0TRioFeHW ecqmW8jawxxOVnVVSdDNlqwYWpM+2XxgYuSifsDwkwaNwVAM/xXgj05ZPr49powT 1nZJ5cARCmW5zLh6aNpQng== LBisCaY4C+s7h8LjVpi8++dCzxxM2P7jR+rw+W0bVZz/YNfG9Q4Id/GkTlcYP/aT WNJfNVhip8KD6QiQqjsRkaF81w8Uam1lVXz8X2Gc6Rsx5L7j+1OblmB6VLPuIwBJ wImjNiEX4RhrS4TfxF/zIq0sLT2DCHdHI752VCnZ8ulVKDnamCZUvT95YqlcCYnc VWAOV5fYH3YvtZ6S/zpTEKW79dnGQZL8od5aJsRrid5fq49X/5KtMw== libxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes128-ka-dh.xml0000644000175000017500000001147007754361403031465 0ustar tonytony John Smith YWJjZGU= MIIEjDCCA/WgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBljELMAkGA1UEBhMCVVMx CzAJBgNVBAgTAk5ZMRIwEAYDVQQHEwlNYW5oYXR0YW4xFTATBgNVBAoTDExhdmEg U3VwcmVtZTEUMBIGA1UECxMLSGVhZCBPZmZpY2UxFDASBgNVBAMTC1JTQSBUZXN0 IENBMSMwIQYJKoZIhvcNAQkBFhR0ZWNoQGxhdmFzdXByZW1lLm9yZzAeFw0wMjAx MzAyMjUwNDBaFw0xMDAxMDEwNTAwMDBaMIGMMQswCQYDVQQGEwJVUzELMAkGA1UE CBMCTlkxEjAQBgNVBAcTCU1hbmhhdHRhbjEOMAwGA1UEChMFUGhhb3MxFDASBgNV BAsTC0hlYWQgT2ZmaWNlMRcwFQYDVQQDEw5ESCBUZXN0IENsaWVudDEdMBsGCSqG SIb3DQEJARYOdGVjaEBwaGFvcy5vcmcwggJDMIIBuAYHKoZIzj4CATCCAasCgYEA uavat7i6NOpnRObdx7Gz38h8xkgmv20XUaj1JjfvMAQfQFMHeshGhY2Q0mwvJ1Of X/kZ4cMbSYUywh3WAY6zQs8W2uxg8GeduCLebNQGTaHVFVmrJMQawlV1bIMQ+kDi IQNR/FPqSNHKD2Q9/uoGD5d2l4KP3qH8dv5HOT8fCwUCgYBxunqmUuKZFTNKJhH9 G6UINlI/Xr9jPesj5/I8fpWgxZxsgkzksqisDCslZ09uZTATrGFTF3fk6kNhx25s UCtYHHK1HzQmsLMu2BWNBQrkLC+Mkd3d39UdNduPW4kCMpcdoHAh+zTqAH2QkKJm yxc/x0LevkSUk8rX8DFa3y152QIVAL+Eo4gPL339dk7inq87PnR1PWuHAm0A+C9E GPDSphFaPWO5LQTNflJ0l9IGjcNFGrJX0imWrjM2q6bGYz0ZK4cJhcX12YZOjR52 TZh3cy6yAJG470i65nlz5/3ESWFHsMO0COrDi/Ca5RfMrYGcc8hrydzFlT1zqMFa 1yuqQKVsGwXcMBwDFgCZ/hqLAtBi6dyv6Ky+OfXfXgJBPhQCAgNPA4GEAAKBgFWw LyYO4IPxJsbaQQsJ4K1xTjPSjTMmvG4fpKA+S1BGz8FI1SPACb2/YYCrmjoWNvkQ V6NTQ+eji6TGA7ET85c4AcRZtxOi3gSP5Kq2A3E9dUouikhrKSHFb+Nx420CXmtp jxBu+qUTb7AMrRCus8maHwU9PdKQbZxoDFOLArJHo00wSzAPBgNVHQ8BAf8EBQMD BwgAMBkGA1UdEQQSMBCBDnRlY2hAcGhhb3Mub3JnMB0GA1UdDgQWBBTfky/d+/wI 6zicN4uDl0PSAyRNnTANBgkqhkiG9w0BAQQFAAOBgQA+2cWsAZ9a44ttBX1Z3eMI e0GgduXErBt9xsv2Sy6fS/6CyyJm3tpthuT2WMZmu6E+ceBLkFU+TnxnEf/NrSj8 wtQt/wVHacaSZMcwUDv/uTUxrtIZUJ7A7VxcAvbnLE5fQqKhF6QT5irtbE2Ryvd7 oMfGG8PmU+sbN9sNXtIzOA== MIIEjTCCA/agAwIBAgIBAjANBgkqhkiG9w0BAQQFADCBljELMAkGA1UEBhMCVVMx CzAJBgNVBAgTAk5ZMRIwEAYDVQQHEwlNYW5oYXR0YW4xFTATBgNVBAoTDExhdmEg U3VwcmVtZTEUMBIGA1UECxMLSGVhZCBPZmZpY2UxFDASBgNVBAMTC1JTQSBUZXN0 IENBMSMwIQYJKoZIhvcNAQkBFhR0ZWNoQGxhdmFzdXByZW1lLm9yZzAeFw0wMjAx MzAyMjUyNTNaFw0xMDAxMDEwNTAwMDBaMIGMMQswCQYDVQQGEwJVUzELMAkGA1UE CBMCTlkxEjAQBgNVBAcTCU1hbmhhdHRhbjEOMAwGA1UEChMFUGhhb3MxFDASBgNV BAsTC0hlYWQgT2ZmaWNlMRcwFQYDVQQDEw5ESCBUZXN0IENsaWVudDEdMBsGCSqG SIb3DQEJARYOdGVjaEBwaGFvcy5vcmcwggJEMIIBuAYHKoZIzj4CATCCAasCgYEA uavat7i6NOpnRObdx7Gz38h8xkgmv20XUaj1JjfvMAQfQFMHeshGhY2Q0mwvJ1Of X/kZ4cMbSYUywh3WAY6zQs8W2uxg8GeduCLebNQGTaHVFVmrJMQawlV1bIMQ+kDi IQNR/FPqSNHKD2Q9/uoGD5d2l4KP3qH8dv5HOT8fCwUCgYBxunqmUuKZFTNKJhH9 G6UINlI/Xr9jPesj5/I8fpWgxZxsgkzksqisDCslZ09uZTATrGFTF3fk6kNhx25s UCtYHHK1HzQmsLMu2BWNBQrkLC+Mkd3d39UdNduPW4kCMpcdoHAh+zTqAH2QkKJm yxc/x0LevkSUk8rX8DFa3y152QIVAL+Eo4gPL339dk7inq87PnR1PWuHAm0A+C9E GPDSphFaPWO5LQTNflJ0l9IGjcNFGrJX0imWrjM2q6bGYz0ZK4cJhcX12YZOjR52 TZh3cy6yAJG470i65nlz5/3ESWFHsMO0COrDi/Ca5RfMrYGcc8hrydzFlT1zqMFa 1yuqQKVsGwXcMBwDFgCZ/hqLAtBi6dyv6Ky+OfXfXgJBPhQCAgNPA4GFAAKBgQCM KtnMyjT9G1LKTZoN7rHwIO08D5j1YYIscsQDc+q4ny5WEFo+wEmOqxGcE9JrRdeb it6cT8F7TWWzeDJUyaXFEi4E1panCBCL1crqS/HbY8VH/zzhT+5L232LchsoYa1p dqxxLHW8RrOax4RLVrcIOPcW4x3Ggk0ANYQhR6kNmqNNMEswDwYDVR0PAQH/BAUD AwcIADAZBgNVHREEEjAQgQ50ZWNoQHBoYW9zLm9yZzAdBgNVHQ4EFgQUHddBJmfV 6MD3FTbVmHcLFN6QFAcwDQYJKoZIhvcNAQEEBQADgYEAKZl9P/ZmIrwHp3BTfBHl eFBk9CbhK14FObMGWSkfjqipb5snXBPE3uPBrvP1StisPRsK/y1OZfcjjkA6ht0j YWp9lohNDTlc/NOKGOQSCpntqr+wQhc6l16jezqR7sKv2eHBFGs0V7HCrEe2mTP4 rDa/YKrmL5K6S9GSF27rx40= 2+4oM3TFfOQ5JMIvRbTk3SbeWqbSVAhMb9zT+3BatcUJuhxzzXtLKEzkfPT09iTP NmwEoUysB5uETmQ49Fd/0l21QjUmctAaCBIbWSrP4f3K2SUGxjKNZE4Pes+8DwiT H1cak+3qT0zbqFa6rXcdLxS/ucxJOPMJV9ZCE4SkvFt2ZME8uRevFEYIqp/HInFZ OjY9Lf8+hHOXVOVqrMObx7/CFzm0AS2aL4WmyfGM3zyUN1BF3nS4zzVOHNfIFopX ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes128-kt-rsa_oaep_sha1.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes128-kt-rsa_oae0000644000175000017500000000676307754361403031740 0ustar tonytony John Smith my-rsa-key MIIDzTCCArWgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBljELMAkGA1UEBhMCVVMx CzAJBgNVBAgTAk5ZMRIwEAYDVQQHEwlNYW5oYXR0YW4xFTATBgNVBAoTDExhdmEg U3VwcmVtZTEUMBIGA1UECxMLSGVhZCBPZmZpY2UxFDASBgNVBAMTC1JTQSBUZXN0 IENBMSMwIQYJKoZIhvcNAQkBFhR0ZWNoQGxhdmFzdXByZW1lLm9yZzAeFw0wMjAx MzExNjI5NDNaFw00MzAyMjUxNjI5NDNaMIGWMQswCQYDVQQGEwJVUzELMAkGA1UE CBMCTlkxEjAQBgNVBAcTCU1hbmhhdHRhbjEVMBMGA1UEChMMTGF2YSBTdXByZW1l MRQwEgYDVQQLEwtIZWFkIE9mZmljZTEUMBIGA1UEAxMLUlNBIFRlc3QgQ0ExIzAh BgkqhkiG9w0BCQEWFHRlY2hAbGF2YXN1cHJlbWUub3JnMIIBIjANBgkqhkiG9w0B AQEFAAOCAQ8AMIIBCgKCAQEAgj3TOyUtgg99oEfsm8h9JTZBxUkzYkXVUOHxIwnk Fwp4y9ZnrGja/j+kpRyKvYP5CkNdq0e58/r7GLXj45iqd03XjsFNTdjy4OIOgf7J xMG7z+hEB1LT2swTs10GILFWPByRl3/BEsnekLZdoqNoJrvnttVkxgu3x80Ji3/A ZD8Ub/kBGOSPyu6pn3OdnMTc5q4r1qUe985lQzCZvCMw6AoGeCyJodNu2MbveNeH +YPjRgLCQfzvOFRq+9qMtE8XfUJZdNhPZhgdsOGf8uJauTcIHbAyw7BhxPy6RikW W5yiWUmBya+7t4y1TQJzham/0y0zU3TAA7b/rDrU7xmNPwIDAQABoyQwIjAPBgNV HRMBAf8EBTADAQH/MA8GA1UdDwEB/wQFAwMHBgAwDQYJKoZIhvcNAQEEBQADggEB ADELWZjFLPjSjGeOaeUwH/mEOP+l/nTtxe07IWAQL4kvb4wsiUsM1EkPptcBQsym OYgFhf3Elqma84bbOyp85y/iQnjpqWWJ73TFXSWZamSIhYb4Gk+dQuwFI+zD3B2y WwqghaAHDzxtzROLUBjo+97Y6ng6V5zjmtdGOFwNXwWhf3Y+MjnErtBIKYao8NJO p6di80w82+s6Ot+CLVvVobLhxS/y8yWplATRiQnI5ij/WTLML+tiU5aes0c9abaf O7i9j1iTuZsDT3f96ia0RSLsXSGij737QKc3ZM8lSxBWfepWYO+G+IRgr1q9IUDa kKO/vB9Ay64Rt88XbLnnGns= W6N0IhRF2AdgfzzkZSp/u1kH5KmH8L4W8k4mdNMboLsYgnBUV3lsRvoFrVTXluMV DtXY1ju7aAEUJP9eMRU676kvRR5nSVuAbWCAejgkHMtGShJHU1s/JMzbu3iaxsuy PosT7/iafinNIXumvqLM/WQl9KbsmcWoAmJISbK1+WJ2kahrXNav4+7vMJq90BOP l8bXIzeKIsps7OGwEvrFaJ5RzVjZXi9SDXXD1vd6tJBcCfcZ347Mat1tZkR3cYrC MhDdte3gYGUQLzUlMYucvWz1slzTX3rYea/vhgA+OLOpdZxwM4igx1d8j5jjmo8F R1rxwd0G4NHA1bZ6TOy/IA== YjIkLPqklVVN1faEsX1t5EXXxdlW3B0rKoZsT5DtaS+pChdcceQV605clJ8YEhOj EhM0oCGf855bQVWp7J3TJqUFlxahREEWCfEvsIUzy/wNMHV6Z/mTFkQUWnrO3C3D SC6rTglijkPp592Sh1Cb6HTD60Nc/Myn3QLnwlSj+30x3uTUiAVEL+xduAnppCR1 vhRsB3yw32TjRfZt1b+UURRzCts5oLrVAu9SSrmgJI+vUX9gsRgvwkmsi4AAq38a ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-3des-kt-rsa_oaep_sha512.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-3des-kt-rsa_oaep_0000644000175000017500000000701307754361403032077 0ustar tonytony John Smith my-rsa-key MIIDzTCCArWgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBljELMAkGA1UEBhMCVVMx CzAJBgNVBAgTAk5ZMRIwEAYDVQQHEwlNYW5oYXR0YW4xFTATBgNVBAoTDExhdmEg U3VwcmVtZTEUMBIGA1UECxMLSGVhZCBPZmZpY2UxFDASBgNVBAMTC1JTQSBUZXN0 IENBMSMwIQYJKoZIhvcNAQkBFhR0ZWNoQGxhdmFzdXByZW1lLm9yZzAeFw0wMjAx MzExNjI5NDNaFw00MzAyMjUxNjI5NDNaMIGWMQswCQYDVQQGEwJVUzELMAkGA1UE CBMCTlkxEjAQBgNVBAcTCU1hbmhhdHRhbjEVMBMGA1UEChMMTGF2YSBTdXByZW1l MRQwEgYDVQQLEwtIZWFkIE9mZmljZTEUMBIGA1UEAxMLUlNBIFRlc3QgQ0ExIzAh BgkqhkiG9w0BCQEWFHRlY2hAbGF2YXN1cHJlbWUub3JnMIIBIjANBgkqhkiG9w0B AQEFAAOCAQ8AMIIBCgKCAQEAgj3TOyUtgg99oEfsm8h9JTZBxUkzYkXVUOHxIwnk Fwp4y9ZnrGja/j+kpRyKvYP5CkNdq0e58/r7GLXj45iqd03XjsFNTdjy4OIOgf7J xMG7z+hEB1LT2swTs10GILFWPByRl3/BEsnekLZdoqNoJrvnttVkxgu3x80Ji3/A ZD8Ub/kBGOSPyu6pn3OdnMTc5q4r1qUe985lQzCZvCMw6AoGeCyJodNu2MbveNeH +YPjRgLCQfzvOFRq+9qMtE8XfUJZdNhPZhgdsOGf8uJauTcIHbAyw7BhxPy6RikW W5yiWUmBya+7t4y1TQJzham/0y0zU3TAA7b/rDrU7xmNPwIDAQABoyQwIjAPBgNV HRMBAf8EBTADAQH/MA8GA1UdDwEB/wQFAwMHBgAwDQYJKoZIhvcNAQEEBQADggEB ADELWZjFLPjSjGeOaeUwH/mEOP+l/nTtxe07IWAQL4kvb4wsiUsM1EkPptcBQsym OYgFhf3Elqma84bbOyp85y/iQnjpqWWJ73TFXSWZamSIhYb4Gk+dQuwFI+zD3B2y WwqghaAHDzxtzROLUBjo+97Y6ng6V5zjmtdGOFwNXwWhf3Y+MjnErtBIKYao8NJO p6di80w82+s6Ot+CLVvVobLhxS/y8yWplATRiQnI5ij/WTLML+tiU5aes0c9abaf O7i9j1iTuZsDT3f96ia0RSLsXSGij737QKc3ZM8lSxBWfepWYO+G+IRgr1q9IUDa kKO/vB9Ay64Rt88XbLnnGns= bJVDvrtv578zcv3L/pK2YCCJtvMTDupUJB5+ZNlr6QjWolttow3QRrYHXj/W00SX lGMdqRuJOkn575Xq3PHO1smO5cxWl5j7sTzVSAkzx/Z5xqiMhrFV+lBWOA/vp437 mEyGUxDrlE3E2NwvKCn8ovP3OrLIz3TVzy3U16hm0yriWcIZAQEpCQsSLxtPWVXt +MMVvn/9y1CLAZh6dHBVHipp/mpf2X2ki4XuHvCRvaAB0fynB3mVbOUAi/NYR65o u5BOfeS7HgTkWpo/XTa7e/XpkGsShodOm4ixJ+wKSNsMgNXivYmtghQR79x8H0+J lMeTf3dYtV3RUJvi5n1CRA== HkxiYRptVjgbv1UjUpyAYp/ty8vBgGgQY/Zr+0tz5Z8W16gp7kvHxAIcyL3E81yO 7G54qhvQS4Ie1Et+j9/XEgBL8RdF8TdBnQ5PlPaoW0ckIV/f8gIxxGU0akjciUSG iXHKL059fdr46aDFLYtwniNiJYG16eG/FFhlDdplWIK+FkaTEMMADEG78Dryle+A DTl1V63WGBpS73k21hag/Mwv2xw5HUasmP1RFuLX4JCxcZAwJrPzoA== ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-text-aes256-kt-rsa_oaep_sha1.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-text-aes256-kt-rsa_oaep_s0000644000175000017500000000773307754361403031775 0ustar tonytony John Smith my-rsa-key MIIDzTCCArWgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBljELMAkGA1UEBhMCVVMx CzAJBgNVBAgTAk5ZMRIwEAYDVQQHEwlNYW5oYXR0YW4xFTATBgNVBAoTDExhdmEg U3VwcmVtZTEUMBIGA1UECxMLSGVhZCBPZmZpY2UxFDASBgNVBAMTC1JTQSBUZXN0 IENBMSMwIQYJKoZIhvcNAQkBFhR0ZWNoQGxhdmFzdXByZW1lLm9yZzAeFw0wMjAx MzExNjI5NDNaFw00MzAyMjUxNjI5NDNaMIGWMQswCQYDVQQGEwJVUzELMAkGA1UE CBMCTlkxEjAQBgNVBAcTCU1hbmhhdHRhbjEVMBMGA1UEChMMTGF2YSBTdXByZW1l MRQwEgYDVQQLEwtIZWFkIE9mZmljZTEUMBIGA1UEAxMLUlNBIFRlc3QgQ0ExIzAh BgkqhkiG9w0BCQEWFHRlY2hAbGF2YXN1cHJlbWUub3JnMIIBIjANBgkqhkiG9w0B AQEFAAOCAQ8AMIIBCgKCAQEAgj3TOyUtgg99oEfsm8h9JTZBxUkzYkXVUOHxIwnk Fwp4y9ZnrGja/j+kpRyKvYP5CkNdq0e58/r7GLXj45iqd03XjsFNTdjy4OIOgf7J xMG7z+hEB1LT2swTs10GILFWPByRl3/BEsnekLZdoqNoJrvnttVkxgu3x80Ji3/A ZD8Ub/kBGOSPyu6pn3OdnMTc5q4r1qUe985lQzCZvCMw6AoGeCyJodNu2MbveNeH +YPjRgLCQfzvOFRq+9qMtE8XfUJZdNhPZhgdsOGf8uJauTcIHbAyw7BhxPy6RikW W5yiWUmBya+7t4y1TQJzham/0y0zU3TAA7b/rDrU7xmNPwIDAQABoyQwIjAPBgNV HRMBAf8EBTADAQH/MA8GA1UdDwEB/wQFAwMHBgAwDQYJKoZIhvcNAQEEBQADggEB ADELWZjFLPjSjGeOaeUwH/mEOP+l/nTtxe07IWAQL4kvb4wsiUsM1EkPptcBQsym OYgFhf3Elqma84bbOyp85y/iQnjpqWWJ73TFXSWZamSIhYb4Gk+dQuwFI+zD3B2y WwqghaAHDzxtzROLUBjo+97Y6ng6V5zjmtdGOFwNXwWhf3Y+MjnErtBIKYao8NJO p6di80w82+s6Ot+CLVvVobLhxS/y8yWplATRiQnI5ij/WTLML+tiU5aes0c9abaf O7i9j1iTuZsDT3f96ia0RSLsXSGij737QKc3ZM8lSxBWfepWYO+G+IRgr1q9IUDa kKO/vB9Ay64Rt88XbLnnGns= FCMw2HiQoGdINvvQYoMdRH0fE5oM9i3E9D4IRx9nwvnZLbA/Oi5snoKYEjYQ8ALK QxYkGKhHtvwsUpVyxA9wGxbNP19Qt1yJIthG6mHUrGTcN9iYvY85FacG3NQWmdMh HjqmylWZAqY4b+qDHczciqzT9i/M3AVct8RrgfVL/MgYyo1WLM0n+svRtc+GFYu6 QupE5bV1UFb/x3FaQtlzm6fIin+BSThCPKfnanj5Z1rAZsi7Wo9TiK610DKh9zXx ONfiLcv9fpoHxpsEzCvAp+RUzLTuqxsLR1rdOveQLy/lTx9eClK8YepzlQIaXiOY y0UqwPAQnEjuVzOmT3CsrQ== DpNYC0Np5hHaQAUyHWpM3MQ99wkDFtGRc7TywqxmhI4sJKDXM5SRjVlKf6st5wOz Bank of the Internet ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-3des-kt-rsa_oaep_sha1.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-3des-kt-rsa_oaep_0000644000175000017500000000677507754361403032115 0ustar tonytony John Smith my-rsa-key MIIDzTCCArWgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBljELMAkGA1UEBhMCVVMx CzAJBgNVBAgTAk5ZMRIwEAYDVQQHEwlNYW5oYXR0YW4xFTATBgNVBAoTDExhdmEg U3VwcmVtZTEUMBIGA1UECxMLSGVhZCBPZmZpY2UxFDASBgNVBAMTC1JTQSBUZXN0 IENBMSMwIQYJKoZIhvcNAQkBFhR0ZWNoQGxhdmFzdXByZW1lLm9yZzAeFw0wMjAx MzExNjI5NDNaFw00MzAyMjUxNjI5NDNaMIGWMQswCQYDVQQGEwJVUzELMAkGA1UE CBMCTlkxEjAQBgNVBAcTCU1hbmhhdHRhbjEVMBMGA1UEChMMTGF2YSBTdXByZW1l MRQwEgYDVQQLEwtIZWFkIE9mZmljZTEUMBIGA1UEAxMLUlNBIFRlc3QgQ0ExIzAh BgkqhkiG9w0BCQEWFHRlY2hAbGF2YXN1cHJlbWUub3JnMIIBIjANBgkqhkiG9w0B AQEFAAOCAQ8AMIIBCgKCAQEAgj3TOyUtgg99oEfsm8h9JTZBxUkzYkXVUOHxIwnk Fwp4y9ZnrGja/j+kpRyKvYP5CkNdq0e58/r7GLXj45iqd03XjsFNTdjy4OIOgf7J xMG7z+hEB1LT2swTs10GILFWPByRl3/BEsnekLZdoqNoJrvnttVkxgu3x80Ji3/A ZD8Ub/kBGOSPyu6pn3OdnMTc5q4r1qUe985lQzCZvCMw6AoGeCyJodNu2MbveNeH +YPjRgLCQfzvOFRq+9qMtE8XfUJZdNhPZhgdsOGf8uJauTcIHbAyw7BhxPy6RikW W5yiWUmBya+7t4y1TQJzham/0y0zU3TAA7b/rDrU7xmNPwIDAQABoyQwIjAPBgNV HRMBAf8EBTADAQH/MA8GA1UdDwEB/wQFAwMHBgAwDQYJKoZIhvcNAQEEBQADggEB ADELWZjFLPjSjGeOaeUwH/mEOP+l/nTtxe07IWAQL4kvb4wsiUsM1EkPptcBQsym OYgFhf3Elqma84bbOyp85y/iQnjpqWWJ73TFXSWZamSIhYb4Gk+dQuwFI+zD3B2y WwqghaAHDzxtzROLUBjo+97Y6ng6V5zjmtdGOFwNXwWhf3Y+MjnErtBIKYao8NJO p6di80w82+s6Ot+CLVvVobLhxS/y8yWplATRiQnI5ij/WTLML+tiU5aes0c9abaf O7i9j1iTuZsDT3f96ia0RSLsXSGij737QKc3ZM8lSxBWfepWYO+G+IRgr1q9IUDa kKO/vB9Ay64Rt88XbLnnGns= ZF0JPSfv75/8M+O2O/xi+8N1b9KT94a4l1D1Q65hnX6F00t+wAWZSkcDUoD/y2/E RKGUyuQwsG6l58e4MwYpmDI4RhHrUYLCQBacAehqVZhwNxv99L7ANsqrZJoT7N0k ER9MbmuIZGb4qisLDfZtzIGKKUUiA3ARfQny4MUxFovSmVUF2OjqSBXUVV/PjMLi fVTVyqCMv08YwmM4abj33tKOEMtiZqAa09lUIpnCUzq2IAShSRNBzWIHe+ndoB6G 2p6ufk0TuRidwdQZkZwTW/2PjK1x7KejaqADWaOIImKhSBMpGzkVfDuv8aAFXOtf +LV67Ov6hJAt7FB65tE9Hg== kY6scZxpyRXQbaDZp+LbuvSFYgmI3pQrfsrCVt3/9sZzpeUTPXJEatQ5KPOXYpJC Gid01h/T8PIezic0Ooz/jU+r3kYMKesMYiXin4CXTZYcGhd0TjmOd4kg1vlhE8kt WLC7JDzFLPAqXbOug3ghmWunFiUETbGJaF5V4AHIoZrYP+RS3DTLgJcATuDeWyOd ueqnLefXiCDNqgSTsK4OyNlX0fpUJgKbL+Mhf5vsqxyIqDsS/p6cRA== libxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/payment.xml0000644000175000017500000000046007754361403026760 0ustar tonytony John Smith 4019 2445 0277 5567 Bank of the Internet ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-content-aes192-kw-aes256.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-content-aes192-kw-aes256.0000644000175000017500000000246707754361403031434 0ustar tonytony John Smith my-aes256-key IbnoS1cvuIFIGB46jj1V1FGftc92irrCwcC7BoBvxwQ= /RDTbL2ce9Ca+2GS0FLJbFMXcpEvDLlW5RnpeKLe+pIO1lNpxsi40/tsqCVauD66 FOCaXkKPcQYaeHVtD4jnE/OHZYFVJ8zS8z4I7nDg44R1e9ZJ9xN3kAEub1T2MdeK SVxPrhksHOWTwxFbPul9YRaNsrmi9a0XN4ggudJu+Rw= ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes128-kw-aes256.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes128-kw-aes256.0000644000175000017500000000240707754361403031404 0ustar tonytony John Smith my-aes256-key ic+Om6/3ZKcThVN3iv9lUEankNkDv3Et T+1ay9FMWTWWnoPYUhVHMA2SNV2w9OirluWOrMSZvRUC8mQHmYfKcuD9WshrgtVd dnsiPobRS+Q0DJgfX8CtfjJ3wtQ2DXX9GFgV8662G0hZEjQ4SGgWhxtQEusjVFSl Uw4/pxmECD5O6K7N9PwnlYwMm9teksvfWcG5xir+w4k24cc9njLj5Yd0uX2o5Nj1 sjjNFzbw5cQ4Fx3KSG2HGwnnC/+5/xyoX1eJgdOxdKQvR8uSMmyIcTPGVtRAzH3l ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes256-kw-aes256.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes256-kw-aes256.0000644000175000017500000000243707754361403031411 0ustar tonytony John Smith my-aes256-key IMwdsyg89IZ4Txf1SYYZNKUOKuYdDoIi/zEKXCjj4j9PM6BdkZligA== sKcjsnw0spmr+iFPf2FWILKQz32+8DvSGm6WTtmMd9syqY/+BIubjH3PS7ROuGY6 xaotStXfOXm5fE4R3Haqw/04gfV4jJU3vIZZHYj9blDIn602YtqI+xti2zZOhGZ4 9gssg7m8ZOJ28yfbQfNw97RdwQiSnIU/Bh87xQJRDK0/M3fOHylMUTH7xMMbQu5m rhYj49kNpnVK7XyP7jCek0lT2ei7KYdKaxD/Jm/xWPxaxyS2C8q9bku5HMsEKJOn ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-content-3des-kw-aes192.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-content-3des-kw-aes192.xm0000644000175000017500000000244007754361403031621 0ustar tonytony John Smith my-aes192-key 5+GpVUQNTAT3uY8pPedEg/PpftiX+fJsTCun+fgmIz0= QBWlf/iYDXKbBWf0Pu3Bgzt5oLBwIs4NKPb/I0SxDYVnDc34i7tZG5UzHlztsWlX udfbIW9l7k5WVdy9bfXZWrp6sXamBedUQTrr+z4v4u2jWaUyqEioLe7h36QeoU23 QvkOzRO9AiWm/QCCzePZ3Frp4LM9lXOE ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/bad-alg-enc-element-aes128-kw-3des.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/bad-alg-enc-element-aes128-kw0000644000175000017500000000243507754361403031611 0ustar tonytony John Smith my-tripledes-key HgVuHoXxBQWD9fvi0gt9TanywZ5lJokM/12fcMG6gRoMjsCPulH+4A== yUMIHkj5EETckjZ59fpda4+m4YLCrkJsnuRz+Q3e5sP+VvHKRH1kdeGkXw3kYURV JM3nQjGl2egW80oUxSykQD2F9iDoIjNhLSgIbyuse64oo/5/v9IiaUpSvrAocwLP AzFIUmOrxmIagAkRGDOeMR8tdHLD6g84dQj4O/aGfwhL/2wUo/l+7onrbmsd6pVI fjNyvXm+eITuyUnkDTHrCR+dfb2sHaQ3g3McgyfP6ZjI/L50SPJZ/w== ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes128-kt-rsa1_5.xmllibxml-security-java-1.5.6/src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes128-kt-rsa1_5.0000644000175000017500000000655007754361403031471 0ustar tonytony John Smith my-rsa-key MIIDzTCCArWgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBljELMAkGA1UEBhMCVVMx CzAJBgNVBAgTAk5ZMRIwEAYDVQQHEwlNYW5oYXR0YW4xFTATBgNVBAoTDExhdmEg U3VwcmVtZTEUMBIGA1UECxMLSGVhZCBPZmZpY2UxFDASBgNVBAMTC1JTQSBUZXN0 IENBMSMwIQYJKoZIhvcNAQkBFhR0ZWNoQGxhdmFzdXByZW1lLm9yZzAeFw0wMjAx MzExNjI5NDNaFw00MzAyMjUxNjI5NDNaMIGWMQswCQYDVQQGEwJVUzELMAkGA1UE CBMCTlkxEjAQBgNVBAcTCU1hbmhhdHRhbjEVMBMGA1UEChMMTGF2YSBTdXByZW1l MRQwEgYDVQQLEwtIZWFkIE9mZmljZTEUMBIGA1UEAxMLUlNBIFRlc3QgQ0ExIzAh BgkqhkiG9w0BCQEWFHRlY2hAbGF2YXN1cHJlbWUub3JnMIIBIjANBgkqhkiG9w0B AQEFAAOCAQ8AMIIBCgKCAQEAgj3TOyUtgg99oEfsm8h9JTZBxUkzYkXVUOHxIwnk Fwp4y9ZnrGja/j+kpRyKvYP5CkNdq0e58/r7GLXj45iqd03XjsFNTdjy4OIOgf7J xMG7z+hEB1LT2swTs10GILFWPByRl3/BEsnekLZdoqNoJrvnttVkxgu3x80Ji3/A ZD8Ub/kBGOSPyu6pn3OdnMTc5q4r1qUe985lQzCZvCMw6AoGeCyJodNu2MbveNeH +YPjRgLCQfzvOFRq+9qMtE8XfUJZdNhPZhgdsOGf8uJauTcIHbAyw7BhxPy6RikW W5yiWUmBya+7t4y1TQJzham/0y0zU3TAA7b/rDrU7xmNPwIDAQABoyQwIjAPBgNV HRMBAf8EBTADAQH/MA8GA1UdDwEB/wQFAwMHBgAwDQYJKoZIhvcNAQEEBQADggEB ADELWZjFLPjSjGeOaeUwH/mEOP+l/nTtxe07IWAQL4kvb4wsiUsM1EkPptcBQsym OYgFhf3Elqma84bbOyp85y/iQnjpqWWJ73TFXSWZamSIhYb4Gk+dQuwFI+zD3B2y WwqghaAHDzxtzROLUBjo+97Y6ng6V5zjmtdGOFwNXwWhf3Y+MjnErtBIKYao8NJO p6di80w82+s6Ot+CLVvVobLhxS/y8yWplATRiQnI5ij/WTLML+tiU5aes0c9abaf O7i9j1iTuZsDT3f96ia0RSLsXSGij737QKc3ZM8lSxBWfepWYO+G+IRgr1q9IUDa kKO/vB9Ay64Rt88XbLnnGns= cCxxYh3xGBTqlXbhmKxWzNMlHeE28E7vPrMyM5V4T+t1Iy2csj1BoQ7cqBjEhqEy Eot4WNRYsY7P44mWBKurj2mdWQWgoxHvtITP9AR3JTMxUo3TF5ltW76DLDsEvWlE uZKam0PYj6lYPKd4npUULeZyR/rDRrth/wFIBD8vbQlUsBHapNT9MbQfSKZemOuT UJL9PNgsosySpKrX564oQw398XsxfTFxi4hqbdqzA/CLL418X01hUjIHdyv6XnA2 98Bmfv9WMPpX05udR4raDv5X8NWxjH00hAhasM3qumxoyCT6mAGfqvE23I+OXtrN lUvE9mMjANw4zweCHsOcfw== u2vogkwlvFqeknJ0lYTBZkWS/eX8LR1fDPFMfyK1/UY0EyZfHvbONfDHcC/HLv/f aAOOO2Y0GqsknP0LYT1OznkiJrzx134cmJCgbyrYXd3Mp21Pq3rs66JJ34Qt3/+I EyJBUSMT8TdT3fBD44BtOqH2op/hy2g3hQPFZul4GiHBEnNJL/4nU1yad3bMvtAB mzhx80lJvPGLcruj5V77WMvkvZfoeEqMq4qPWK02ZURsJsq0iZcJDi39NB7OCiON libxml-security-java-1.5.6/src/test/resources/xmlsecurity.jin0000644000175000017500000004147207546031511023226 0ustar tonytony### ### Jindent 3.5 property file -- http://www.jindent.com ### ### Jindent property format version = "3.5" conventionString = "EEE, MMM d, ''yy" paddingParenthesis = false spaceBeforeConditionBang = false ### General -- Convention date = "EEE, MMM d, ''yy" conventionName = "XMLSecurity Style" conventionNote = "Formatted in $conventionName$ Style on $date$" conventionNotePosition = "none" blankLinesToSeparateConventionNote = 2 ### General -- Jindent Note jindentNotePosition = "none" blankLinesToSeparateJindentNote = 2 ### Header/Footer -- Header Template headerSmartMode = infinite headerIdentifyKey = "Redistribution and use" blankLinesBeforeHeader = 1 header[00] = "/*" header[01] = " * The Apache Software License, Version 1.1" header[02] = " *" header[03] = " *" header[04] = " * Copyright (c) 1999 The Apache Software Foundation. All rights " header[05] = " * reserved." header[06] = " *" header[07] = " * Redistribution and use in source and binary forms, with or without" header[08] = " * modification, are permitted provided that the following conditions" header[09] = " * are met:" header[10] = " *" header[11] = " * 1. Redistributions of source code must retain the above copyright" header[12] = " * notice, this list of conditions and the following disclaimer. " header[13] = " *" header[14] = " * 2. Redistributions in binary form must reproduce the above copyright" header[15] = " * notice, this list of conditions and the following disclaimer in" header[16] = " * the documentation and/or other materials provided with the" header[17] = " * distribution." header[18] = " *" header[19] = " * 3. The end-user documentation included with the redistribution," header[20] = " * if any, must include the following acknowledgment: " header[21] = " * "This product includes software developed by the" header[22] = " * Apache Software Foundation (http://www.apache.org/)."" header[23] = " * Alternately, this acknowledgment may appear in the software itself," header[24] = " * if and wherever such third-party acknowledgments normally appear." header[25] = " *" header[26] = " * 4. The names "" and "Apache Software Foundation" must" header[27] = " * not be used to endorse or promote products derived from this" header[28] = " * software without prior written permission. For written " header[29] = " * permission, please contact apache@apache.org." header[30] = " *" header[31] = " * 5. Products derived from this software may not be called "Apache"," header[32] = " * nor may "Apache" appear in their name, without prior written" header[33] = " * permission of the Apache Software Foundation." header[34] = " *" header[35] = " * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED" header[36] = " * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES" header[37] = " * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE" header[38] = " * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR" header[39] = " * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL," header[40] = " * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT" header[41] = " * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF" header[42] = " * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND" header[43] = " * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY," header[44] = " * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT" header[45] = " * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF" header[46] = " * SUCH DAMAGE." header[47] = " * ====================================================================" header[48] = " *" header[49] = " * This software consists of voluntary contributions made by many" header[50] = " * individuals on behalf of the Apache Software Foundation and was" header[51] = " * originally based on software copyright (c) 2001, Institute for" header[52] = " * Data Communications Systems, ." header[53] = " * The development of this software was partly funded by the European " header[54] = " * Commission in the project in the ISIS Programme. " header[55] = " * For more information on the Apache Software Foundation, please see" header[56] = " * ." header[57] = " */" blankLinesAfterHeader = 0 ### Header/Footer -- Footer Template footerSmartMode = infinite footerIdentifyKey = "" blankLinesBeforeFooter = 0 footer[00] = "" blankLinesAfterFooter = 0 ### Indentation -- Misc tabulatorSize = 3 indentSize = 3 firstLevelIndent = 0 indentCaseFromSwitch = 0 labelNewLine = false indentLabels = true minimumCommentIndent = 4 indentLeadingsByTabs = false indentCommentsByTabs = false indentDeclarationsByTabs = false indentAssignmentsByTabs = false ### Indentation -- Alignment alignComments = false alignDeclarations = false alignAssignments = false alignTernaryConditions = true alignTernaryExpressions = true alignTooLongComments = false alignTooLongDeclarations = false alignTooLongAssignments = false ### Braces -- Style leftBraceNewLineGeneral = false rightBraceNewLineGeneral = false indentLeftBraceGeneral = 1 indentRightBraceGeneral = 0 indentAfterRightBraceGeneral = 1 cuddleEmptyBracesGeneral = false indentCuddledBracesGeneral = 1 noBlankLinesAfterLeftBraceGeneral = false leftBraceNewLineClassInterface = false rightBraceNewLineClassInterface = false indentLeftBraceClassInterface = 1 indentRightBraceClassInterface = 0 indentAfterRightBraceClassInterface = 1 cuddleEmptyBracesClassInterface = false indentCuddledBracesClassInterface = 1 noBlankLinesAfterLeftBraceClassInterface = false leftBraceNewLineMethod = false rightBraceNewLineMethod = false indentLeftBraceMethod = 1 indentRightBraceMethod = 0 indentAfterRightBraceMethod = 1 cuddleEmptyBracesMethod = true indentCuddledBracesMethod = 1 noBlankLinesAfterLeftBraceMethod = false leftBraceNewLineTryCatch = false rightBraceNewLineTryCatch = false indentLeftBraceTryCatch = 1 indentRightBraceTryCatch = 0 indentAfterRightBraceTryCatch = 1 cuddleEmptyBracesTryCatch = true indentCuddledBracesTryCatch = 1 noBlankLinesAfterLeftBraceTryCatch = false ### Braces -- Insert At insertBracesAtIfElse = true insertBracesAtFor = true insertBracesAtWhile = true insertBracesAtDoWhile = true insertParenthesisAtConditions = true ### Braces -- If-Else singleIfStatementInOneLine = false singleElseStatementInOneLine = false specialElseIfTreatment = true ### JavaDoc -- Misc deleteJavaDocComments = false formatJavaDocComments = true insertMissingJavaDocTags = false deleteObsoleteJavaDocTags = true createPublicClassInterfaceJavaDocs = true createFriendlyClassInterfaceJavaDocs = true createPrivateClassInterfaceJavaDocs = true createProtectedClassInterfaceJavaDocs = true createPublicMethodJavaDocs = true createFriendlyMethodJavaDocs = true createPrivateMethodJavaDocs = false createProtectedMethodJavaDocs = true createPublicFieldJavaDocs = true createFriendlyFieldJavaDocs = true createPrivateFieldJavaDocs = false createProtectedFieldJavaDocs = true ### JavaDoc -- Templates sortExceptionsInTemplates = true javaDocMethodTop[00] = "/**" javaDocMethodTop[01] = " * Method $objectName$" javaDocMethodTop[02] = " *" javaDocMethodParamSeparator[00] = "" javaDocMethodParam[00] = " * @param $paramName$" javaDocMethodReturn[00] = "" javaDocMethodExceptionSeparator[00] = "" javaDocMethodException[00] = " * @throws $exceptionName$" javaDocMethodBottom[00] = " */" javaDocConstructorTop[00] = "/**" javaDocConstructorTop[01] = " * Constructor $objectName$" javaDocConstructorTop[02] = " *" javaDocConstructorParamSeparator[00] = "" javaDocConstructorParam[00] = " * @param $paramName$" javaDocConstructorExceptionSeparator[00] = "" javaDocConstructorException[00] = " * @throws $exceptionName$" javaDocConstructorBottom[00] = " */" javaDocClass[00] = "/**" javaDocClass[01] = " * Class $objectName$" javaDocClass[02] = " *" javaDocClass[03] = " * @author $Author: geuerp $" javaDocClass[04] = " * @version $Revision: 350595 $" javaDocClass[05] = " */" javaDocInterface[00] = "/**" javaDocInterface[01] = " * Interface $objectName$" javaDocInterface[02] = " *" javaDocInterface[03] = " * @author $Author: geuerp $" javaDocInterface[04] = " * @version $Revision: 350595 $" javaDocInterface[05] = " */" javaDocField[00] = "/** Field $objectName$ */" ### Comments -- Format/Delete deleteBlockComments = false deleteSingleLineComments = false deleteTrailingComments = false deleteEndOfLineComments = false formatBlockComments = false formatSingleLineComments = false formatTrailingComments = false formatEndOfLineComments = false ### Comments -- Exceptions neverIndentFirstColumnComments = false neverFormatFirstColumnComments = false neverFormatHeader = false neverFormatFooter = false ### Separation -- Misc keepBlankLines = 0 minLinesToInsertBlankLineInClasses = 3 minLinesToInsertBlankLineInMethods = 3 ### Separation -- Separate separateChunksByComments = true separateChunksByTooLongLines = true allowBreakSeparatedFromCaseBlock = false blankLinesBetweenCaseBlocks = 1 blankLinesBetweenChunks = 1 comparableImportDepth = 2 blankLinesToSeparateImports = 0 blankLinesBetweenClassInterface = 2 ### Separation -- Insert Blank Lines blankLinesAfterDeclarations = 1 blankLinesAfterMethods = 1 blankLinesAfterClasses = 1 blankLinesAfterInterfaces = 1 blankLinesBeforeJavaDocComments = 1 blankLinesAfterJavaDocComments = 0 blankLinesBeforeBlockComments = 1 blankLinesAfterBlockComments = 0 blankLinesBeforeSingleLineComments = 1 blankLinesAfterSingleLineComments = 0 blankLinesBeforeEndOfLineComments = 1 blankLinesAfterEndOfLineComments = 0 blankLinesAfterSwitch = 1 blankLinesAfterPackage = 3 blankLinesAfterLastImport = 2 blankLinesBeforeFilteredCode = 1 blankLinesAfterFilteredCode = 0 ### Whitespaces -- Padding separateAssignmentOperators = true separateConditionalOperators = true separateComparisonOperators = true separateNumericalOperators = true paddingCastParenthesis = false paddingStatementParenthesis = false paddingMethodDeclarationParenthesis = false paddingMethodCallParenthesis = false paddingBrackets = false paddingBraces = true ### Whitespaces -- Space Before spaceBeforeMethodDeclarationParenthesis = false spaceBeforeMethodCallParenthesis = false spaceBeforeBrackets = false spaceBeforeBracketsInTypes = false spaceBeforeStatementParenthesis = true spaceBeforeBang = false spaceAfterBang = false spaceBeforeBangAfterAndOr = false spaceAfterBangAfterAndOr = false spaceBeforeTilde = false spaceAfterTilde = false spaceBeforeCaseColon = true spaceBeforeAssertColon = true spaceAfterAssertColon = true ### Whitespaces -- Space After spaceAfterComma = true spaceAfterSemicolon = true spaceAfterCasting = true ### Whitespaces -- No Spaces noSpacesInEmptyForExpressions = true ### Line Wrapping -- Misc maxFieldElementsPerLine = infinite wrapLines = true wrapBecauseOfComments = true wrapLongMethodNames = true maxLineLength = 80 deepIndent = 45 forceIndent = 8 forceIndentTolerance = 4 deepIndentForMultipleDeclarations = 45 allowWrappingAfterAssignments = true wrapDeclarationAssignmentsToRightSide = false allowWrappingAfterParenthesis = true preferWrappingAfterThrows = true wrapAfterConditionalOperators = false wrapAfterComparisonOperators = false wrapAfterNumericalOperators = false alwaysWrapThrows = false alwaysWrapExtends = false alwaysWrapImplements = false indentWrappedThrows = 0 indentWrappedExtends = 0 indentWrappedImplements = 0 libxml-security-java-1.5.6/src/test/resources/ie/0000755000175000017500000000000012273503733020524 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/ie/baltimore/0000755000175000017500000000000012273503733022502 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/0000755000175000017500000000000012273503733025604 5ustar tonytony././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-filter2-one/libxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-filter2-on0000755000175000017500000000000012273503733032437 5ustar tonytony././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-filter2-one/Readme.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-filter2-on0000644000175000017500000000104607473420111032434 0ustar tonytonySample XML Signatures[1] using the XPath Filter 2.0[2] [1] http://www.w3.org/TR/xmldsig-core/ [2] http://www.w3.org/TR/xmldsig-filter2/ First, the last example from the spec: signature.tmpl - A basic signature template signature.xml - The signature signature-c14n-*.txt - C14n output Next, John Boyer's example (for performance testing): sign-xfdl.tmpl - The signature template sign-xfdl.xml - The signature sign-xfdl-c14n-*.txt - C14n output Merlin Hughes Baltimore Technologies, Ltd. Wednesday, May 8, 2002 ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-filter2-one/sign-xfdl.tmpllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-filter2-on0000644000175000017500000026707607473420111032455 0ustar tonytony SF71 Thomas Mohr 4/6/98 4/6/98 application/x-xfdl application/x-xfdl 1.0.0 letter 120 8.0;10.5 235 235 235 Courier 9 plain absolute 17 32 extent 876 1 absolute 17 82 extent 876 1 absolute 17 133 extent 876 1 absolute 17 179 extent 876 1 absolute 268 218 extent 406 1 absolute 268 263 extent 406 1 absolute 17 311 extent 657 1 absolute 268 354 extent 406 1 absolute 268 398 extent 406 1 absolute 17 484 extent 657 1 absolute 17 530 extent 657 1 absolute 17 578 extent 657 1 absolute 17 626 extent 876 1 absolute 17 743 extent 876 1 absolute 17 867 extent 876 1 absolute 17 967 extent 876 1 absolute 17 1164 extent 876 1 absolute 17 32 extent 1 1133 absolute 510 32 extent 1 51 absolute 892 32 extent 1 1133 absolute 268 133 extent 1 266 absolute 349 179 extent 1 220 absolute 430 133 extent 1 266 absolute 510 179 extent 1 220 absolute 592 133 extent 1 265 absolute 673 133 extent 1 494 absolute 268 484 extent 1 143 absolute 349 484 extent 1 143 absolute 431 484 extent 1 143 absolute 510 484 extent 1 143 absolute 591 484 extent 1 143 absolute 20 58 extent 489 23 string mandatory wordwrap fixed 0 John Q. Public absolute 537 58 extent 123 23 string mandatory wordwrap fixed 0 123456789 absolute 19 109 extent 872 23 string mandatory wordwrap fixed 0 PureEdge Solutions Inc. absolute 28 191 extent 22 23 Helvetica 18 plain absolute 269 188 extent 80 23 wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 188 extent 80 23 wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 188 extent 80 23 center wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" time short optional optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 absolute 511 188 extent 81 23 center wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" time short optional optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 absolute 593 188 extent 80 23 wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 absolute 28 231 extent 22 23 Helvetica 18 plain absolute 269 231 extent 80 23 wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 231 extent 80 23 wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 231 extent 80 23 center wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" time short optional optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 absolute 511 231 extent 81 23 center wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" time short optional optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 absolute 593 231 extent 80 23 wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 absolute 28 277 extent 22 23 Helvetica 18 plain absolute 269 276 extent 80 23 wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 276 extent 80 23 wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 276 extent 80 23 center wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" time short optional optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 absolute 511 276 extent 81 23 center wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" time short optional optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 absolute 593 276 extent 80 23 wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 absolute 28 322 extent 22 23 Helvetica 18 plain absolute 269 321 extent 80 23 wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 321 extent 80 23 wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 321 extent 79 23 center wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" time short optional optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 absolute 511 321 extent 81 23 center wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" time short optional optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 absolute 593 321 extent 80 23 wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 absolute 28 367 extent 22 23 Helvetica 18 plain absolute 269 366 extent 80 23 wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 366 extent 80 23 wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 366 extent 80 23 center wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" time short optional optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 absolute 511 366 extent 81 23 center wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" time short optional optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 absolute 593 366 extent 80 23 wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 absolute 121 412 extent 15 14 Helvetica 10 plain off off (CHECK5.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK8.value == "on") || (CHECK7.value == "on")) ? set("value", "off") : "" absolute 121 438 extent 15 14 Helvetica 10 plain off off (CHECK5.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK8.value == "on") || (CHECK6.value == "on")) ? set("value", "off") : "" absolute 519 412 extent 15 14 Helvetica 10 plain off off (CHECK5.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK6.value == "on") || (CHECK7.value == "on")) ? set("value", "off") : "" absolute 28 495 extent 22 23 Helvetica 18 plain absolute 269 498 extent 80 23 wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 498 extent 81 23 wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 432 498 extent 78 23 center wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" time short optional optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 absolute 511 498 extent 80 23 center wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" time short optional optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 absolute 592 498 extent 81 23 wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 absolute 28 543 extent 22 23 Helvetica 18 plain absolute 269 543 extent 80 23 wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 543 extent 81 23 wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 432 543 extent 78 23 center wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" time short optional optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 absolute 511 543 extent 80 23 center wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" time short optional optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 absolute 592 543 extent 81 23 wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 absolute 28 591 extent 22 23 Helvetica 18 plain absolute 269 590 extent 80 23 wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 590 extent 81 23 wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 432 590 extent 78 23 center wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" time short optional optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 absolute 511 590 extent 80 23 center wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" time short optional optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 absolute 592 590 extent 81 23 wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 absolute 680 326 extent 15 14 Helvetica 10 plain absolute 689 404 extent 15 14 Helvetica 10 plain off (CHECK12.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK14.value == "on") || (CHECK15.value == "on")) ? set("value", "off") : "" absolute 689 428 extent 15 14 Helvetica 10 plain off (CHECK12.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK15.value == "on") || (CHECK13.value == "on")) ? set("value", "off") : "" absolute 689 485 extent 15 14 Helvetica 10 plain off (CHECK12.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK14.value == "on") || (CHECK13.value == "on")) ? set("value", "off") : "" absolute 42 657 extent 846 57 wordwrap fixed 0 string optional (CHECK10.value == "on") ? "mandatory" : "optional" absolute 42 712 extent 846 31 0 string optional (CHECK8.value == "on") ? "mandatory" : "optional" readonly (CHECK8.value == "on") ? "readwrite" : "readonly" /XFDL/page[@sid="PAGE1"]/*[@sid="CHECK16" or @sid="CHECK17" or @sid="FIELD47" or @sid="BUTTON2" or @sid="FIELD48"] | /XFDL/page/*/triggeritem absolute 655 840 extent 155 27 0 readonly 05-08-02 (BUTTON1.value != "") ? "*" : "" date optional MM-DD-YY absolute 362 873 extent 22 23 Helvetica 18 plain (CHECK17.value == "on") ? set("value", "off") : "" absolute 604 873 extent 22 23 Helvetica 18 plain (CHECK16.value == "on") ? set("value", "off") : "" absolute 41 917 extent 770 23 string optional (CHECK17.value == "on") ? "mandatory" : "optional" readonly (CHECK17.value == "on") ? "readwrite" : "readonly" 0 wordwrap fixed absolute 656 940 extent 155 27 0 readonly (BUTTON2.value != "") ? "*" : "" date optional MM-DD-YY absolute 960 1260 extent 1 1 ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-filter2-one/signature.tmpllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-filter2-on0000644000175000017500000000455207473420111032441 0ustar tonytony //ToBeSigned //NotToBeSigned //ReallyToBeSigned //ToBeSigned //NotToBeSigned //ReallyToBeSigned ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-filter2-one/sign-xfdl-c14n-0.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-filter2-on0000644000175000017500000025642407473420111032450 0ustar tonytony SF71 Thomas Mohr 4/6/98 4/6/98 application/x-xfdl application/x-xfdl 1.0.0 letter 120 8.0;10.5 235 235 235 Courier 9 plain absolute 17 32 extent 876 1 absolute 17 82 extent 876 1 absolute 17 133 extent 876 1 absolute 17 179 extent 876 1 absolute 268 218 extent 406 1 absolute 268 263 extent 406 1 absolute 17 311 extent 657 1 absolute 268 354 extent 406 1 absolute 268 398 extent 406 1 absolute 17 484 extent 657 1 absolute 17 530 extent 657 1 absolute 17 578 extent 657 1 absolute 17 626 extent 876 1 absolute 17 743 extent 876 1 absolute 17 867 extent 876 1 absolute 17 967 extent 876 1 absolute 17 1164 extent 876 1 absolute 17 32 extent 1 1133 absolute 510 32 extent 1 51 absolute 892 32 extent 1 1133 absolute 268 133 extent 1 266 absolute 349 179 extent 1 220 absolute 430 133 extent 1 266 absolute 510 179 extent 1 220 absolute 592 133 extent 1 265 absolute 673 133 extent 1 494 absolute 268 484 extent 1 143 absolute 349 484 extent 1 143 absolute 431 484 extent 1 143 absolute 510 484 extent 1 143 absolute 591 484 extent 1 143 absolute 20 58 extent 489 23 string mandatory wordwrap fixed 0 John Q. Public absolute 537 58 extent 123 23 string mandatory wordwrap fixed 0 123456789 absolute 19 109 extent 872 23 string mandatory wordwrap fixed 0 PureEdge Solutions Inc. absolute 28 191 extent 22 23 Helvetica 18 plain absolute 269 188 extent 80 23 wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 188 extent 80 23 wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 188 extent 80 23 center wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" time short optional optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 absolute 511 188 extent 81 23 center wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" time short optional optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 absolute 593 188 extent 80 23 wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 absolute 28 231 extent 22 23 Helvetica 18 plain absolute 269 231 extent 80 23 wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 231 extent 80 23 wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 231 extent 80 23 center wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" time short optional optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 absolute 511 231 extent 81 23 center wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" time short optional optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 absolute 593 231 extent 80 23 wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 absolute 28 277 extent 22 23 Helvetica 18 plain absolute 269 276 extent 80 23 wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 276 extent 80 23 wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 276 extent 80 23 center wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" time short optional optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 absolute 511 276 extent 81 23 center wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" time short optional optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 absolute 593 276 extent 80 23 wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 absolute 28 322 extent 22 23 Helvetica 18 plain absolute 269 321 extent 80 23 wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 321 extent 80 23 wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 321 extent 79 23 center wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" time short optional optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 absolute 511 321 extent 81 23 center wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" time short optional optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 absolute 593 321 extent 80 23 wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 absolute 28 367 extent 22 23 Helvetica 18 plain absolute 269 366 extent 80 23 wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 366 extent 80 23 wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 366 extent 80 23 center wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" time short optional optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 absolute 511 366 extent 81 23 center wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" time short optional optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 absolute 593 366 extent 80 23 wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 absolute 121 412 extent 15 14 Helvetica 10 plain off off (CHECK5.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK8.value == "on") || (CHECK7.value == "on")) ? set("value", "off") : "" absolute 121 438 extent 15 14 Helvetica 10 plain off off (CHECK5.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK8.value == "on") || (CHECK6.value == "on")) ? set("value", "off") : "" absolute 519 412 extent 15 14 Helvetica 10 plain off off (CHECK5.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK6.value == "on") || (CHECK7.value == "on")) ? set("value", "off") : "" absolute 28 495 extent 22 23 Helvetica 18 plain absolute 269 498 extent 80 23 wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 498 extent 81 23 wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 432 498 extent 78 23 center wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" time short optional optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 absolute 511 498 extent 80 23 center wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" time short optional optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 absolute 592 498 extent 81 23 wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 absolute 28 543 extent 22 23 Helvetica 18 plain absolute 269 543 extent 80 23 wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 543 extent 81 23 wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 432 543 extent 78 23 center wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" time short optional optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 absolute 511 543 extent 80 23 center wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" time short optional optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 absolute 592 543 extent 81 23 wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 absolute 28 591 extent 22 23 Helvetica 18 plain absolute 269 590 extent 80 23 wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 590 extent 81 23 wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 432 590 extent 78 23 center wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" time short optional optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 absolute 511 590 extent 80 23 center wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" time short optional optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 absolute 592 590 extent 81 23 wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 absolute 680 326 extent 15 14 Helvetica 10 plain absolute 689 404 extent 15 14 Helvetica 10 plain off (CHECK12.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK14.value == "on") || (CHECK15.value == "on")) ? set("value", "off") : "" absolute 689 428 extent 15 14 Helvetica 10 plain off (CHECK12.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK15.value == "on") || (CHECK13.value == "on")) ? set("value", "off") : "" absolute 689 485 extent 15 14 Helvetica 10 plain off (CHECK12.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK14.value == "on") || (CHECK13.value == "on")) ? set("value", "off") : "" absolute 42 657 extent 846 57 wordwrap fixed 0 string optional (CHECK10.value == "on") ? "mandatory" : "optional" absolute 42 712 extent 846 31 0 string optional (CHECK8.value == "on") ? "mandatory" : "optional" readonly (CHECK8.value == "on") ? "readwrite" : "readonly" absolute 655 840 extent 155 27 0 readonly 05-08-02 (BUTTON1.value != "") ? "*" : "" date optional MM-DD-YY absolute 960 1260 extent 1 1 ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-filter2-one/signature.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-filter2-on0000644000175000017500000001526007473420111032437 0ustar tonytony //ToBeSigned //NotToBeSigned //ReallyToBeSigned p6/HaYIdxbEdYX8/8zNfjED4H5Y= //ToBeSigned //NotToBeSigned //ReallyToBeSigned 0NrSQ4ldmHPqAt4xeiv1LW+VgIA= Trdgh0rotnT1pRLA69YjMmJUfoCAUnb9gj5HmKTNA4D69LKMOojHfg==

3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi 89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=

hDLcFK0GO/Hz1arxOOvsgM/VLyU= nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM 8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA= cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv +OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=
CN=Merlin Hughes,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE CN=Transient CA,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE 1017788370348 MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS 8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1 MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU 2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q 4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch 3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx 0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D 451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7 PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5 NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25 4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==
././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-filter2-one/signature-c14n-0.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-filter2-on0000644000175000017500000000026607473420111032437 0ustar tonytony ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-filter2-one/signature-c14n-1.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-filter2-on0000644000175000017500000000032607473420111032434 0ustar tonytony ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-filter2-one/sign-xfdl.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-filter2-on0000644000175000017500000030040607473420111032436 0ustar tonytony SF71 Thomas Mohr 4/6/98 4/6/98 application/x-xfdl application/x-xfdl 1.0.0 letter 120 8.0;10.5 235 235 235 Courier 9 plain absolute 17 32 extent 876 1 absolute 17 82 extent 876 1 absolute 17 133 extent 876 1 absolute 17 179 extent 876 1 absolute 268 218 extent 406 1 absolute 268 263 extent 406 1 absolute 17 311 extent 657 1 absolute 268 354 extent 406 1 absolute 268 398 extent 406 1 absolute 17 484 extent 657 1 absolute 17 530 extent 657 1 absolute 17 578 extent 657 1 absolute 17 626 extent 876 1 absolute 17 743 extent 876 1 absolute 17 867 extent 876 1 absolute 17 967 extent 876 1 absolute 17 1164 extent 876 1 absolute 17 32 extent 1 1133 absolute 510 32 extent 1 51 absolute 892 32 extent 1 1133 absolute 268 133 extent 1 266 absolute 349 179 extent 1 220 absolute 430 133 extent 1 266 absolute 510 179 extent 1 220 absolute 592 133 extent 1 265 absolute 673 133 extent 1 494 absolute 268 484 extent 1 143 absolute 349 484 extent 1 143 absolute 431 484 extent 1 143 absolute 510 484 extent 1 143 absolute 591 484 extent 1 143 absolute 20 58 extent 489 23 string mandatory wordwrap fixed 0 John Q. Public absolute 537 58 extent 123 23 string mandatory wordwrap fixed 0 123456789 absolute 19 109 extent 872 23 string mandatory wordwrap fixed 0 PureEdge Solutions Inc. absolute 28 191 extent 22 23 Helvetica 18 plain absolute 269 188 extent 80 23 wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 188 extent 80 23 wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 188 extent 80 23 center wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" time short optional optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 absolute 511 188 extent 81 23 center wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" time short optional optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 absolute 593 188 extent 80 23 wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 absolute 28 231 extent 22 23 Helvetica 18 plain absolute 269 231 extent 80 23 wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 231 extent 80 23 wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 231 extent 80 23 center wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" time short optional optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 absolute 511 231 extent 81 23 center wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" time short optional optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 absolute 593 231 extent 80 23 wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 absolute 28 277 extent 22 23 Helvetica 18 plain absolute 269 276 extent 80 23 wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 276 extent 80 23 wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 276 extent 80 23 center wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" time short optional optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 absolute 511 276 extent 81 23 center wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" time short optional optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 absolute 593 276 extent 80 23 wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 absolute 28 322 extent 22 23 Helvetica 18 plain absolute 269 321 extent 80 23 wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 321 extent 80 23 wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 321 extent 79 23 center wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" time short optional optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 absolute 511 321 extent 81 23 center wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" time short optional optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 absolute 593 321 extent 80 23 wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 absolute 28 367 extent 22 23 Helvetica 18 plain absolute 269 366 extent 80 23 wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 366 extent 80 23 wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 366 extent 80 23 center wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" time short optional optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 absolute 511 366 extent 81 23 center wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" time short optional optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 absolute 593 366 extent 80 23 wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 absolute 121 412 extent 15 14 Helvetica 10 plain off off (CHECK5.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK8.value == "on") || (CHECK7.value == "on")) ? set("value", "off") : "" absolute 121 438 extent 15 14 Helvetica 10 plain off off (CHECK5.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK8.value == "on") || (CHECK6.value == "on")) ? set("value", "off") : "" absolute 519 412 extent 15 14 Helvetica 10 plain off off (CHECK5.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK6.value == "on") || (CHECK7.value == "on")) ? set("value", "off") : "" absolute 28 495 extent 22 23 Helvetica 18 plain absolute 269 498 extent 80 23 wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 498 extent 81 23 wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 432 498 extent 78 23 center wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" time short optional optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 absolute 511 498 extent 80 23 center wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" time short optional optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 absolute 592 498 extent 81 23 wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 absolute 28 543 extent 22 23 Helvetica 18 plain absolute 269 543 extent 80 23 wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 543 extent 81 23 wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 432 543 extent 78 23 center wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" time short optional optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 absolute 511 543 extent 80 23 center wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" time short optional optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 absolute 592 543 extent 81 23 wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 absolute 28 591 extent 22 23 Helvetica 18 plain absolute 269 590 extent 80 23 wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 590 extent 81 23 wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 432 590 extent 78 23 center wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" time short optional optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 absolute 511 590 extent 80 23 center wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" time short optional optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 absolute 592 590 extent 81 23 wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 absolute 680 326 extent 15 14 Helvetica 10 plain absolute 689 404 extent 15 14 Helvetica 10 plain off (CHECK12.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK14.value == "on") || (CHECK15.value == "on")) ? set("value", "off") : "" absolute 689 428 extent 15 14 Helvetica 10 plain off (CHECK12.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK15.value == "on") || (CHECK13.value == "on")) ? set("value", "off") : "" absolute 689 485 extent 15 14 Helvetica 10 plain off (CHECK12.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK14.value == "on") || (CHECK13.value == "on")) ? set("value", "off") : "" absolute 42 657 extent 846 57 wordwrap fixed 0 string optional (CHECK10.value == "on") ? "mandatory" : "optional" absolute 42 712 extent 846 31 0 string optional (CHECK8.value == "on") ? "mandatory" : "optional" readonly (CHECK8.value == "on") ? "readwrite" : "readonly" /XFDL/page[@sid="PAGE1"]/*[@sid="CHECK16" or @sid="CHECK17" or @sid="FIELD47" or @sid="BUTTON2" or @sid="FIELD48"] | /XFDL/page/*/triggeritem xtHvgrYCYiWUtvgbaA6yx4fY4hI= OizUQl+uqgV2nDIogC/Rip5va1xGY8Um+pKGvIK2rlMrhUQVcBfgiQ==

3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi 89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=

hDLcFK0GO/Hz1arxOOvsgM/VLyU= nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM 8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA= cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv +OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=
CN=Merlin Hughes,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE CN=Transient CA,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE 1017788370348 MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS 8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1 MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU 2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q 4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch 3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx 0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D 451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7 PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5 NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25 4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==
absolute 655 840 extent 155 27 0 readonly 05-08-02 (BUTTON1.value != "") ? "*" : "" date optional MM-DD-YY absolute 362 873 extent 22 23 Helvetica 18 plain (CHECK17.value == "on") ? set("value", "off") : "" absolute 604 873 extent 22 23 Helvetica 18 plain (CHECK16.value == "on") ? set("value", "off") : "" absolute 41 917 extent 770 23 string optional (CHECK17.value == "on") ? "mandatory" : "optional" readonly (CHECK17.value == "on") ? "readwrite" : "readonly" 0 wordwrap fixed absolute 656 940 extent 155 27 0 readonly (BUTTON2.value != "") ? "*" : "" date optional MM-DD-YY absolute 960 1260 extent 1 1
libxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/urls.txt0000644000175000017500000000257310052374102027326 0ustar tonytonyExamples by merlin@baltimore.ie http://lists.w3.org/Archives/Public/w3c-ietf-xmldsig/2000JulSep/att-0153/01-merlin-xmldsig.tar.gz http://lists.w3.org/Archives/Public/w3c-ietf-xmldsig/2000JulSep/att-0235/01-merlin-xmldsig-three.tar.gz http://lists.w3.org/Archives/Public/w3c-ietf-xmldsig/2000OctDec/att-0036/01-merlin-xmldsig-seven.tar.gz http://lists.w3.org/Archives/Public/w3c-ietf-xmldsig/2000OctDec/att-0059/01-merlin-xmldsig-eight.tar.gz http://lists.w3.org/Archives/Public/w3c-ietf-xmldsig/2000OctDec/att-0065/01-merlin-xmldsig-nine.tar.gz http://lists.w3.org/Archives/Public/w3c-ietf-xmldsig/2001JanMar/att-0139/01-merlin-xmldsig-twelve.tar.gz http://lists.w3.org/Archives/Public/w3c-ietf-xmldsig/2001JanMar/att-0139/02-merlin-xmldsig-thirteen.tar.gz http://lists.w3.org/Archives/Public/w3c-ietf-xmldsig/2001JanMar/att-0155/03-merlin-xmldsig-fourteen.tar.gz http://lists.w3.org/Archives/Public/w3c-ietf-xmldsig/2001JanMar/att-0155/04-merlin-xmldsig-fifteen.tar.gz http://lists.w3.org/Archives/Public/w3c-ietf-xmldsig/2001AprJun/att-0033/01-merlin-xmldsig-sixteen.tar.gz http://lists.w3.org/Archives/Public/w3c-ietf-xmldsig/2001AprJun/att-0110/01-merlin-xmldsig-seventeen.tar.gz http://lists.w3.org/Archives/Public/w3c-ietf-xmldsig/2001AprJun/att-0124/01-merlin-xmldsig-eighteen.tar.gz http://lists.w3.org/Archives/Public/w3c-ietf-xmldsig/2002AprJun/att-0016/01-merlin-xmldsig-twenty-three.tar.gz ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/libxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000755000175000017500000000000012273503733032603 5ustar tonytony././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-c14n-13.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000052710052374102032576 0ustar tonytony foo bar bar ././@LongLink0000000000000000000000000000021700000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-b64-dsa-c14n-0.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000113010052374102032565 0ustar tonytony N6pjx3OY2VRHMmLhoAV8HmMu2nc= ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-c14n-14.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000052710052374102032576 0ustar tonytony foo bar bar ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-x509-is.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000163710052374102032601 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= bmKMy/w1DO9dHA6E7Dt0B8IFkYAj1/UD3TqcdqIcfkMT7evE8+NBgg== CN=Another Transient CA,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE 1017792003066 ././@LongLink0000000000000000000000000000021300000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-rsa-c14n-1.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000073410052374102032576 0ustar tonytony 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/xml-stylesheet.b64libxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000004257210052374102032604 0ustar tonytonyPCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFu c2l0aW9uYWwvL0VOIj4KPGh0bWw+CjxoZWFkPgo8dGl0bGU+QXNzb2NpYXRpbmcg U3R5bGUgU2hlZXRzIHdpdGggWE1MIGRvY3VtZW50czwvdGl0bGU+CjxsaW5rIHJl bD0ic3R5bGVzaGVldCIgdHlwZT0idGV4dC9jc3MiIGhyZWY9Imh0dHA6Ly93d3cu dzMub3JnL1N0eWxlU2hlZXRzL1RSL1czQy1SRUMiPgo8c3R5bGUgdHlwZT0idGV4 dC9jc3MiPmNvZGUgeyBmb250LWZhbWlseTogbW9ub3NwYWNlIH08L3N0eWxlPgo8 L2hlYWQ+Cjxib2R5Pgo8ZGl2IGNsYXNzPSJoZWFkIj4KPGEgaHJlZj0iaHR0cDov L3d3dy53My5vcmcvIj48aW1nIHNyYz0iaHR0cDovL3d3dy53My5vcmcvSWNvbnMv V1dXL3czY19ob21lIiBhbHQ9IlczQyIgaGVpZ2h0PSI0OCIgd2lkdGg9IjcyIj48 L2E+CjxoMT5Bc3NvY2lhdGluZyBTdHlsZSBTaGVldHMgd2l0aCBYTUwgZG9jdW1l bnRzPGJyPlZlcnNpb24gMS4wPC9oMT4KPGgyPlczQyBSZWNvbW1lbmRhdGlvbiAy OSBKdW5lIDE5OTk8L2gyPgo8ZGw+CjxkdD5UaGlzIHZlcnNpb246PC9kdD4KPGRk Pgo8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzA2L1JFQy14bWwtc3R5 bGVzaGVldC0xOTk5MDYyOSI+aHR0cDovL3d3dy53My5vcmcvMTk5OS8wNi9SRUMt eG1sLXN0eWxlc2hlZXQtMTk5OTA2Mjk8L2E+Cjxicj4KPC9kZD4KPGR0PkxhdGVz dCB2ZXJzaW9uOjwvZHQ+CjxkZD4KPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcv VFIveG1sLXN0eWxlc2hlZXQiPmh0dHA6Ly93d3cudzMub3JnL1RSL3htbC1zdHls ZXNoZWV0PC9hPgo8YnI+CjwvZGQ+CjxkdD5QcmV2aW91cyB2ZXJzaW9uOjwvZHQ+ CjxkZD4KPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcvVFIvMTk5OS94bWwtc3R5 bGVzaGVldC0xOTk5MDQyOCI+aHR0cDovL3d3dy53My5vcmcvVFIvMTk5OS94bWwt c3R5bGVzaGVldC0xOTk5MDQyODwvYT4KPGJyPgo8L2RkPgo8ZHQ+RWRpdG9yOjwv ZHQ+CjxkZD4KCkphbWVzIENsYXJrCjxhIGhyZWY9Im1haWx0bzpqamNAamNsYXJr LmNvbSI+Jmx0O2pqY0BqY2xhcmsuY29tJmd0OzwvYT4KPGJyPgo8L2RkPgo8L2Rs Pgo8cCBjbGFzcz0iY29weXJpZ2h0Ij4KPGEgaHJlZj0iaHR0cDovL3d3dy53My5v cmcvQ29uc29ydGl1bS9MZWdhbC9pcHItbm90aWNlLmh0bWwjQ29weXJpZ2h0Ij4K CQlDb3B5cmlnaHQ8L2E+ICZuYnNwOyZjb3B5OyZuYnNwOyAxOTk5IDxhIGhyZWY9 Imh0dHA6Ly93d3cudzMub3JnIj5XM0M8L2E+CgkJKDxhIGhyZWY9Imh0dHA6Ly93 d3cubGNzLm1pdC5lZHUiPk1JVDwvYT4sCgkJPGEgaHJlZj0iaHR0cDovL3d3dy5p bnJpYS5mci8iPklOUklBPC9hPiwKCQk8YSBocmVmPSJodHRwOi8vd3d3LmtlaW8u YWMuanAvIj5LZWlvPC9hPiApLCBBbGwgUmlnaHRzIFJlc2VydmVkLiBXM0MKCQk8 YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9Db25zb3J0aXVtL0xlZ2FsL2lwci1u b3RpY2UuaHRtbCNMZWdhbCBEaXNjbGFpbWVyIj5saWFiaWxpdHksPC9hPjxhIGhy ZWY9Imh0dHA6Ly93d3cudzMub3JnL0NvbnNvcnRpdW0vTGVnYWwvaXByLW5vdGlj ZS5odG1sI1czQyBUcmFkZW1hcmtzIj50cmFkZW1hcms8L2E+LAoJCTxhIGhyZWY9 Imh0dHA6Ly93d3cudzMub3JnL0NvbnNvcnRpdW0vTGVnYWwvY29weXJpZ2h0LWRv Y3VtZW50cy5odG1sIj5kb2N1bWVudCB1c2UgPC9hPmFuZAoJCTxhIGhyZWY9Imh0 dHA6Ly93d3cudzMub3JnL0NvbnNvcnRpdW0vTGVnYWwvY29weXJpZ2h0LXNvZnR3 YXJlLmh0bWwiPnNvZnR3YXJlIGxpY2Vuc2luZyA8L2E+cnVsZXMgYXBwbHkuCgk8 L3A+CjxociB0aXRsZT0iU2VwYXJhdG9yIGZvciBoZWFkZXIiPgo8L2Rpdj4KPGgy Pgo8YSBuYW1lPSJhYnN0cmFjdCI+QWJzdHJhY3Q8L2E+CjwvaDI+Cgo8cD5UaGlz IGRvY3VtZW50IGFsbG93cyBhIHN0eWxlIHNoZWV0IHRvIGJlIGFzc29jaWF0ZWQg d2l0aCBhbiBYTUwKZG9jdW1lbnQgYnkgaW5jbHVkaW5nIG9uZSBvciBtb3JlIHBy b2Nlc3NpbmcgaW5zdHJ1Y3Rpb25zIHdpdGggYQp0YXJnZXQgb2YgPGNvZGU+eG1s LXN0eWxlc2hlZXQ8L2NvZGU+IGluIHRoZSBkb2N1bWVudCdzIHByb2xvZy48L3A+ Cgo8aDI+CjxhIG5hbWU9InN0YXR1cyI+U3RhdHVzIG9mIHRoaXMgZG9jdW1lbnQ8 L2E+CjwvaDI+Cgo8cD5UaGlzIGRvY3VtZW50IGhhcyBiZWVuIHJldmlld2VkIGJ5 IFczQyBNZW1iZXJzIGFuZCBvdGhlciBpbnRlcmVzdGVkCnBhcnRpZXMgYW5kIGhh cyBiZWVuIGVuZG9yc2VkIGJ5IHRoZSBEaXJlY3RvciBhcyBhIFczQyA8YSBocmVm PSJodHRwOi8vd3d3LnczLm9yZy9Db25zb3J0aXVtL1Byb2Nlc3MvI1JlY3NXM0Mi PlJlY29tbWVuZGF0aW9uPC9hPi4gSXQKaXMgYSBzdGFibGUgZG9jdW1lbnQgYW5k IG1heSBiZSB1c2VkIGFzIHJlZmVyZW5jZSBtYXRlcmlhbCBvciBjaXRlZCBhcwph IG5vcm1hdGl2ZSByZWZlcmVuY2UgZnJvbSBvdGhlciBkb2N1bWVudHMuIFczQydz IHJvbGUgaW4gbWFraW5nIHRoZQpSZWNvbW1lbmRhdGlvbiBpcyB0byBkcmF3IGF0 dGVudGlvbiB0byB0aGUgc3BlY2lmaWNhdGlvbiBhbmQgdG8KcHJvbW90ZSBpdHMg d2lkZXNwcmVhZCBkZXBsb3ltZW50LiBUaGlzIGVuaGFuY2VzIHRoZSBmdW5jdGlv bmFsaXR5IGFuZAppbnRlcm9wZXJhYmlsaXR5IG9mIHRoZSBXZWIuPC9wPgoKPHA+ VGhlIGxpc3Qgb2Yga25vd24gZXJyb3JzIGluIHRoaXMgc3BlY2lmaWNhdGlvbnMg aXMgYXZhaWxhYmxlIGF0CjxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkv MDYvUkVDLXhtbC1zdHlsZXNoZWV0LTE5OTkwNjI5L2VycmF0YSI+aHR0cDovL3d3 dy53My5vcmcvVFIvMTk5OS94bWwtc3R5bGVzaGVldC0xOTk5MDYyOS9lcnJhdGE8 L2E+LjwvcD4KCjxwPkNvbW1lbnRzIG9uIHRoaXMgc3BlY2lmaWNhdGlvbiBtYXkg YmUgc2VudCB0byAmbHQ7PGEgaHJlZj0ibWFpbHRvOnd3dy14bWwtc3R5bGVzaGVl dC1jb21tZW50c0B3My5vcmciPnd3dy14bWwtc3R5bGVzaGVldC1jb21tZW50c0B3 My5vcmc8L2E+Jmd0Oy4gVGhlIGFyY2hpdmUgb2YgcHVibGljCmNvbW1lbnRzIGlz IGF2YWlsYWJsZSBhdCA8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9BcmNoaXZl cy9QdWJsaWMvd3d3LXhtbC1zdHlsZXNoZWV0LWNvbW1lbnRzIj5odHRwOi8vdzMu b3JnL0FyY2hpdmVzL1B1YmxpYy93d3cteG1sLXN0eWxlc2hlZXQtY29tbWVudHM8 L2E+LjwvcD4KCjxwPkEgbGlzdCBvZiBjdXJyZW50IFczQyBSZWNvbW1lbmRhdGlv bnMgYW5kIG90aGVyIHRlY2huaWNhbCBkb2N1bWVudHMKY2FuIGJlIGZvdW5kIGF0 IDxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3JnL1RSIj5odHRwOi8vd3d3LnczLm9y Zy9UUjwvYT4uPC9wPgoKPHA+VGhlIFdvcmtpbmcgR3JvdXAgZXhwZWN0cyBhZGRp dGlvbmFsIG1lY2hhbmlzbXMgZm9yIGxpbmtpbmcgc3R5bGUKc2hlZXRzIHRvIFhN TCBkb2N1bWVudCB0byBiZSBkZWZpbmVkIGluIGEgZnV0dXJlIHNwZWNpZmljYXRp b24uPC9wPgoKPHA+VGhlIHVzZSBvZiBYTUwgcHJvY2Vzc2luZyBpbnN0cnVjdGlv bnMgaW4gdGhpcyBzcGVjaWZpY2F0aW9uIHNob3VsZApub3QgYmUgdGFrZW4gYXMg YSBwcmVjZWRlbnQuICBUaGUgVzNDIGRvZXMgbm90IGFudGljaXBhdGUgcmVjb21t ZW5kaW5nCnRoZSB1c2Ugb2YgcHJvY2Vzc2luZyBpbnN0cnVjdGlvbnMgaW4gYW55 IGZ1dHVyZSBzcGVjaWZpY2F0aW9uLiAgVGhlCjxhIGhyZWY9IiNyYXRpb25hbGUi PlJhdGlvbmFsZTwvYT4gZXhwbGFpbnMgd2h5IHRoZXkgd2VyZSB1c2VkIGluCnRo aXMgc3BlY2lmaWNhdGlvbi48L3A+Cgo8cD5UaGlzIGRvY3VtZW50IHdhcyBwcm9k dWNlZCBhcyBwYXJ0IG9mIHRoZSA8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9Y TUwvQWN0aXZpdHkiPlczQyBYTUwgQWN0aXZpdHk8L2E+LjwvcD4KCgo8aDI+Cjxh IG5hbWU9ImNvbnRlbnRzIj5UYWJsZSBvZiBjb250ZW50czwvYT4KPC9oMj4xIDxh IGhyZWY9IiNUaGUgeG1sLXN0eWxlc2hlZXQgcHJvY2Vzc2luZyBpbnN0cnVjdGlv biI+VGhlIHhtbC1zdHlsZXNoZWV0IHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb248L2E+ Cjxicj4KPGgzPkFwcGVuZGljZXM8L2gzPkEgPGEgaHJlZj0iI1JlZmVyZW5jZXMi PlJlZmVyZW5jZXM8L2E+Cjxicj5CIDxhIGhyZWY9IiNyYXRpb25hbGUiPlJhdGlv bmFsZTwvYT4KPGJyPgo8aHI+Cgo8aDI+CjxhIG5hbWU9IlRoZSB4bWwtc3R5bGVz aGVldCBwcm9jZXNzaW5nIGluc3RydWN0aW9uIj48L2E+MSBUaGUgPGNvZGU+eG1s LXN0eWxlc2hlZXQ8L2NvZGU+IHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb248L2gyPgoK PHA+U3R5bGUgU2hlZXRzIGNhbiBiZSBhc3NvY2lhdGVkIHdpdGggYW4gWE1MPGEg aHJlZj0iI1hNTCI+W1hNTDEwXTwvYT4KZG9jdW1lbnQgYnkgdXNpbmcgYSBwcm9j ZXNzaW5nIGluc3RydWN0aW9uIHdob3NlIHRhcmdldCBpcwo8Y29kZT54bWwtc3R5 bGVzaGVldDwvY29kZT4uICBUaGlzIHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb24gZm9s bG93cyB0aGUKYmVoYXZpb3VyIG9mIHRoZSBIVE1MIDQuMCA8Y29kZT4mbHQ7TElO SwpSRUw9InN0eWxlc2hlZXQiJmd0OzwvY29kZT48YSBocmVmPSIjSFRNTCI+W0hU TUw0MF08L2E+LjwvcD4KCjxwPlRoZSA8Y29kZT54bWwtc3R5bGVzaGVldDwvY29k ZT4gcHJvY2Vzc2luZyBpbnN0cnVjdGlvbiBpcyBwYXJzZWQgaW4KdGhlIHNhbWUg d2F5IGFzIGEgc3RhcnQtdGFnLCB3aXRoIHRoZSBleGNlcHRpb24gdGhhdCBlbnRp dGllcyBvdGhlcgp0aGFuIHByZWRlZmluZWQgZW50aXRpZXMgbXVzdCBub3QgYmUg cmVmZXJlbmNlZC48L3A+Cgo8cD5UaGUgZm9sbG93aW5nIGdyYW1tYXIgaXMgZ2l2 ZW4gdXNpbmcgdGhlIHNhbWUgbm90YXRpb24gYXMgdGhlCmdyYW1tYXIgaW4gdGhl IFhNTCBSZWNvbW1lbmRhdGlvbjxhIGhyZWY9IiNYTUwiPltYTUwxMF08L2E+LiAg U3ltYm9scyBpbiB0aGUKZ3JhbW1hciB0aGF0IGFyZSBub3QgZGVmaW5lZCBoZXJl IGFyZSBkZWZpbmVkIGluIHRoZSBYTUwKUmVjb21tZW5kYXRpb24uPC9wPgoKPGg1 PnhtbC1zdHlsZXNoZWV0IHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb248L2g1Pgo8dGFi bGUgY2xhc3M9InNjcmFwIj4KPHRib2R5Pgo8dHIgdmFsaWduPSJiYXNlbGluZSI+ Cjx0ZD4KPGEgbmFtZT0iTlQtU3R5bGVTaGVldFBJIj48L2E+WzFdJm5ic3A7Jm5i c3A7Jm5ic3A7PC90ZD4KPHRkPlN0eWxlU2hlZXRQSTwvdGQ+Cjx0ZD4mbmJzcDsm bmJzcDsmbmJzcDs6Oj0mbmJzcDsmbmJzcDsmbmJzcDs8L3RkPgo8dGQ+JyZsdDs/ eG1sLXN0eWxlc2hlZXQnICg8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9UUi9S RUMteG1sI05ULVMiPlM8L2E+IDxhIGhyZWY9IiNOVC1Qc2V1ZG9BdHQiPlBzZXVk b0F0dDwvYT4pKiA8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9UUi9SRUMteG1s I05ULVMiPlM8L2E+PyAnPyZndDsnPC90ZD4KPHRkPgo8L3RkPgo8L3RyPgo8dHIg dmFsaWduPSJiYXNlbGluZSI+Cjx0ZD4KPGEgbmFtZT0iTlQtUHNldWRvQXR0Ij48 L2E+WzJdJm5ic3A7Jm5ic3A7Jm5ic3A7PC90ZD4KPHRkPlBzZXVkb0F0dDwvdGQ+ Cjx0ZD4mbmJzcDsmbmJzcDsmbmJzcDs6Oj0mbmJzcDsmbmJzcDsmbmJzcDs8L3Rk Pgo8dGQ+CjxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3JnL1RSL1JFQy14bWwjTlQt TmFtZSI+TmFtZTwvYT4gPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcvVFIvUkVD LXhtbCNOVC1TIj5TPC9hPj8gJz0nIDxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3Jn L1RSL1JFQy14bWwjTlQtUyI+UzwvYT4/IDxhIGhyZWY9IiNOVC1Qc2V1ZG9BdHRW YWx1ZSI+UHNldWRvQXR0VmFsdWU8L2E+CjwvdGQ+Cjx0ZD4KPC90ZD4KPC90cj4K PHRyIHZhbGlnbj0iYmFzZWxpbmUiPgo8dGQ+CjxhIG5hbWU9Ik5ULVBzZXVkb0F0 dFZhbHVlIj48L2E+WzNdJm5ic3A7Jm5ic3A7Jm5ic3A7PC90ZD4KPHRkPlBzZXVk b0F0dFZhbHVlPC90ZD4KPHRkPiZuYnNwOyZuYnNwOyZuYnNwOzo6PSZuYnNwOyZu YnNwOyZuYnNwOzwvdGQ+Cjx0ZD4oJyInIChbXiImbHQ7JmFtcDtdIHwgPGEgaHJl Zj0iaHR0cDovL3d3dy53My5vcmcvVFIvUkVDLXhtbCNOVC1DaGFyUmVmIj5DaGFy UmVmPC9hPiB8IDxhIGhyZWY9IiNOVC1QcmVkZWZFbnRpdHlSZWYiPlByZWRlZkVu dGl0eVJlZjwvYT4pKiAnIic8L3RkPgo8dGQ+CjwvdGQ+CjwvdHI+Cjx0ciB2YWxp Z249ImJhc2VsaW5lIj4KPHRkPgo8L3RkPgo8dGQ+CjwvdGQ+Cjx0ZD4KPC90ZD4K PHRkPnwgIiciIChbXicmbHQ7JmFtcDtdIHwgPGEgaHJlZj0iaHR0cDovL3d3dy53 My5vcmcvVFIvUkVDLXhtbCNOVC1DaGFyUmVmIj5DaGFyUmVmPC9hPiB8IDxhIGhy ZWY9IiNOVC1QcmVkZWZFbnRpdHlSZWYiPlByZWRlZkVudGl0eVJlZjwvYT4pKiAi JyIpPC90ZD4KPHRkPgo8L3RkPgo8L3RyPgo8dHIgdmFsaWduPSJiYXNlbGluZSI+ Cjx0ZD4KPC90ZD4KPHRkPgo8L3RkPgo8dGQ+CjwvdGQ+Cjx0ZD4tICg8YSBocmVm PSJodHRwOi8vd3d3LnczLm9yZy9UUi9SRUMteG1sI05ULUNoYXIiPkNoYXI8L2E+ KiAnPyZndDsnIDxhIGhyZWY9Imh0dHA6Ly93d3cudzMub3JnL1RSL1JFQy14bWwj TlQtQ2hhciI+Q2hhcjwvYT4qKTwvdGQ+Cjx0ZD4KPC90ZD4KPC90cj4KPHRyIHZh bGlnbj0iYmFzZWxpbmUiPgo8dGQ+CjxhIG5hbWU9Ik5ULVByZWRlZkVudGl0eVJl ZiI+PC9hPls0XSZuYnNwOyZuYnNwOyZuYnNwOzwvdGQ+Cjx0ZD5QcmVkZWZFbnRp dHlSZWY8L3RkPgo8dGQ+Jm5ic3A7Jm5ic3A7Jm5ic3A7Ojo9Jm5ic3A7Jm5ic3A7 Jm5ic3A7PC90ZD4KPHRkPicmYW1wO2FtcDsnIHwgJyZhbXA7bHQ7JyB8ICcmYW1w O2d0OycgfCAnJmFtcDtxdW90OycgfCAnJmFtcDthcG9zOyc8L3RkPgo8dGQ+Cjwv dGQ+CjwvdHI+CjwvdGJvZHk+CjwvdGFibGU+Cgo8cD5JbiA8YSBocmVmPSIjTlQt UHNldWRvQXR0VmFsdWUiPlBzZXVkb0F0dFZhbHVlPC9hPiwgYSA8YSBocmVmPSJo dHRwOi8vd3d3LnczLm9yZy9UUi9SRUMteG1sI05ULUNoYXJSZWYiPkNoYXJSZWY8 L2E+IG9yIGEgPGEgaHJlZj0iI05ULVByZWRlZkVudGl0eVJlZiI+UHJlZGVmRW50 aXR5UmVmPC9hPiBpcyBpbnRlcnByZXRlZCBpbiB0aGUKc2FtZSBtYW5uZXIgYXMg aW4gYSBub3JtYWwgWE1MIGF0dHJpYnV0ZSB2YWx1ZS4gIFRoZSBhY3R1YWwgdmFs dWUgb2YKdGhlIHBzZXVkby1hdHRyaWJ1dGUgaXMgdGhlIHZhbHVlIGFmdGVyIGVh Y2ggcmVmZXJlbmNlIGlzIHJlcGxhY2VkIGJ5CnRoZSBjaGFyYWN0ZXIgaXQgcmVm ZXJlbmNlcy4gIFRoaXMgcmVwbGFjZW1lbnQgaXMgbm90IHBlcmZvcm1lZAphdXRv bWF0aWNhbGx5IGJ5IGFuIFhNTCBwcm9jZXNzb3IuPC9wPgoKPHA+VGhlIDxjb2Rl PnhtbC1zdHlsZXNoZWV0PC9jb2RlPiBwcm9jZXNzaW5nIGluc3RydWN0aW9uIGlz IGFsbG93ZWQKb25seSBpbiB0aGUgcHJvbG9nIG9mIGFuIFhNTCBkb2N1bWVudC4g VGhlIHN5bnRheCBvZiBYTUwgY29uc3RyYWlucwp3aGVyZSBwcm9jZXNzaW5nIGlu c3RydWN0aW9ucyBhcmUgYWxsb3dlZCBpbiB0aGUgcHJvbG9nOyB0aGUKPGNvZGU+ eG1sLXN0eWxlc2hlZXQ8L2NvZGU+IHByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb24gaXMg YWxsb3dlZCBhbnl3aGVyZQppbiB0aGUgcHJvbG9nIHRoYXQgbWVldHMgdGhlc2Ug Y29uc3RyYWludHMuPC9wPgoKPGJsb2NrcXVvdGU+CjxiPk5PVEU6IDwvYj5JZiB0 aGUgPGNvZGU+eG1sLXN0eWxlc2hlZXQ8L2NvZGU+IHByb2Nlc3NpbmcgaW5zdHJ1 Y3Rpb24Kb2NjdXJzIGluIHRoZSBleHRlcm5hbCBEVEQgc3Vic2V0IG9yIGluIGEg cGFyYW1ldGVyIGVudGl0eSwgaXQgaXMKcG9zc2libGUgdGhhdCBpdCBtYXkgbm90 IGJlIHByb2Nlc3NlZCBieSBhIG5vbi12YWxpZGF0aW5nIFhNTApwcm9jZXNzb3Ig KHNlZSA8YSBocmVmPSIjWE1MIj5bWE1MMTBdPC9hPikuPC9ibG9ja3F1b3RlPgoK PHA+VGhlIGZvbGxvd2luZyBwc2V1ZG8gYXR0cmlidXRlcyBhcmUgZGVmaW5lZDwv cD4KCjxwcmU+aHJlZiBDREFUQSAjUkVRVUlSRUQKdHlwZSBDREFUQSAjUkVRVUlS RUQKdGl0bGUgQ0RBVEEgI0lNUExJRUQKbWVkaWEgQ0RBVEEgI0lNUExJRUQKY2hh cnNldCBDREFUQSAjSU1QTElFRAphbHRlcm5hdGUgKHllc3xubykgIm5vIjwvcHJl PgoKPHA+VGhlIHNlbWFudGljcyBvZiB0aGUgcHNldWRvLWF0dHJpYnV0ZXMgYXJl IGV4YWN0bHkgYXMgd2l0aAo8Y29kZT4mbHQ7TElOSyBSRUw9InN0eWxlc2hlZXQi Jmd0OzwvY29kZT4gaW4gSFRNTCA0LjAsIHdpdGggdGhlCmV4Y2VwdGlvbiBvZiB0 aGUgPGNvZGU+YWx0ZXJuYXRlPC9jb2RlPiBwc2V1ZG8tYXR0cmlidXRlLiAgSWYK PGNvZGU+YWx0ZXJuYXRlPSJ5ZXMiPC9jb2RlPiBpcyBzcGVjaWZpZWQsIHRoZW4g dGhlIHByb2Nlc3NpbmcKaW5zdHJ1Y3Rpb24gaGFzIHRoZSBzZW1hbnRpY3Mgb2Yg PGNvZGU+Jmx0O0xJTksgUkVMPSJhbHRlcm5hdGUKc3R5bGVzaGVldCImZ3Q7PC9j b2RlPiBpbnN0ZWFkIG9mIDxjb2RlPiZsdDtMSU5LClJFTD0ic3R5bGVzaGVldCIm Z3Q7PC9jb2RlPi48L3A+Cgo8YmxvY2txdW90ZT4KPGI+Tk9URTogPC9iPlNpbmNl IHRoZSB2YWx1ZSBvZiB0aGUgPGNvZGU+aHJlZjwvY29kZT4gYXR0cmlidXRlIGlz IGEgVVJJCnJlZmVyZW5jZSwgaXQgbWF5IGJlIGEgcmVsYXRpdmUgVVJJIGFuZCBp dCBtYXkgY29udGFpbiBhIGZyYWdtZW50CmlkZW50aWZpZXIuIEluIHBhcnRpY3Vs YXIgdGhlIFVSSSByZWZlcmVuY2UgbWF5IGNvbnRhaW4gb25seSBhCmZyYWdtZW50 IGlkZW50aWZpZXIuICBTdWNoIGEgVVJJIHJlZmVyZW5jZSBpcyBhIHJlZmVyZW5j ZSB0byBhIHBhcnQgb2YKdGhlIGRvY3VtZW50IGNvbnRhaW5pbmcgdGhlIDxjb2Rl PnhtbC1zdHlsZXNoZWV0PC9jb2RlPiBwcm9jZXNzaW5nCmluc3RydWN0aW9uIChz ZWUgPGEgaHJlZj0iI1JGQzIzOTYiPltSRkMyMzk2XTwvYT4pLiBUaGUgY29uc2Vx dWVuY2UgaXMgdGhhdCB0aGUKPGNvZGU+eG1sLXN0eWxlc2hlZXQ8L2NvZGU+IHBy b2Nlc3NpbmcgaW5zdHJ1Y3Rpb24gYWxsb3dzIHN0eWxlIHNoZWV0cwp0byBiZSBl bWJlZGRlZCBpbiB0aGUgc2FtZSBkb2N1bWVudCBhcyB0aGUgPGNvZGU+eG1sLXN0 eWxlc2hlZXQ8L2NvZGU+CnByb2Nlc3NpbmcgaW5zdHJ1Y3Rpb24uPC9ibG9ja3F1 b3RlPgoKPHA+SW4gc29tZSBjYXNlcywgc3R5bGUgc2hlZXRzIG1heSBiZSBsaW5r ZWQgd2l0aCBhbiBYTUwgZG9jdW1lbnQgYnkKbWVhbnMgZXh0ZXJuYWwgdG8gdGhl IGRvY3VtZW50LiBGb3IgZXhhbXBsZSwgZWFybGllciB2ZXJzaW9ucyBvZiBIVFRQ CjxhIGhyZWY9IiNSRkMyMDY4Ij5bUkZDMjA2OF08L2E+IChzZWN0aW9uIDE5LjYu Mi40KSBhbGxvd2VkIHN0eWxlIHNoZWV0cyB0byBiZQphc3NvY2lhdGVkIHdpdGgg WE1MIGRvY3VtZW50cyBieSBtZWFucyBvZiB0aGUgPGNvZGU+TGluazwvY29kZT4K aGVhZGVyLiAgQW55IGxpbmtzIHRvIHN0eWxlIHNoZWV0cyB0aGF0IGFyZSBzcGVj aWZpZWQgZXh0ZXJuYWxseSB0byB0aGUKZG9jdW1lbnQgYXJlIGNvbnNpZGVyZWQg dG8gb2NjdXIgYmVmb3JlIHRoZSBsaW5rcyBzcGVjaWZpZWQgYnkgdGhlCjxjb2Rl PnhtbC1zdHlsZXNoZWV0PC9jb2RlPiBwcm9jZXNzaW5nIGluc3RydWN0aW9ucy4g IFRoaXMgaXMgdGhlIHNhbWUKYXMgaW4gSFRNTCA0LjAgKHNlZSA8YSBocmVmPSJo dHRwOi8vd3d3LnczLm9yZy9UUi9SRUMtaHRtbDQwL3ByZXNlbnQvc3R5bGVzLmh0 bWwjaC0xNC42Ij5zZWN0aW9uCjE0LjY8L2E+KS48L3A+Cgo8cD5IZXJlIGFyZSBz b21lIGV4YW1wbGVzIGZyb20gSFRNTCA0LjAgd2l0aCB0aGUgY29ycmVzcG9uZGlu Zwpwcm9jZXNzaW5nIGluc3RydWN0aW9uOjwvcD4KCjxwcmU+Jmx0O0xJTksgaHJl Zj0ibXlzdHlsZS5jc3MiIHJlbD0ic3R5bGUgc2hlZXQiIHR5cGU9InRleHQvY3Nz IiZndDsKJmx0Oz94bWwtc3R5bGVzaGVldCBocmVmPSJteXN0eWxlLmNzcyIgdHlw ZT0idGV4dC9jc3MiPyZndDsKCiZsdDtMSU5LIGhyZWY9Im15c3R5bGUuY3NzIiB0 aXRsZT0iQ29tcGFjdCIgcmVsPSJzdHlsZXNoZWV0Igp0eXBlPSJ0ZXh0L2NzcyIm Z3Q7CiZsdDs/eG1sLXN0eWxlc2hlZXQgaHJlZj0ibXlzdHlsZS5jc3MiIHRpdGxl PSJDb21wYWN0IiB0eXBlPSJ0ZXh0L2NzcyI/Jmd0OwoKJmx0O0xJTksgaHJlZj0i bXlzdHlsZS5jc3MiIHRpdGxlPSJNZWRpdW0iIHJlbD0iYWx0ZXJuYXRlIHN0eWxl c2hlZXQiCnR5cGU9InRleHQvY3NzIiZndDsKJmx0Oz94bWwtc3R5bGVzaGVldCBh bHRlcm5hdGU9InllcyIgaHJlZj0ibXlzdHlsZS5jc3MiIHRpdGxlPSJNZWRpdW0i CnR5cGU9InRleHQvY3NzIj8mZ3Q7PC9wcmU+Cgo8cD5NdWx0aXBsZSA8Y29kZT54 bWwtc3R5bGVzaGVldDwvY29kZT4gcHJvY2Vzc2luZyBpbnN0cnVjdGlvbnMgYXJl CmFsc28gYWxsb3dlZCB3aXRoIGV4YWN0bHkgdGhlIHNhbWUgc2VtYW50aWNzIGFz IHdpdGggPGNvZGU+TElOSwpSRUw9InN0eWxlc2hlZXQiPC9jb2RlPi4gRm9yIGV4 YW1wbGUsPC9wPgoKPHByZT4mbHQ7TElOSyByZWw9ImFsdGVybmF0ZSBzdHlsZXNo ZWV0IiB0aXRsZT0iY29tcGFjdCIgaHJlZj0ic21hbGwtYmFzZS5jc3MiCnR5cGU9 InRleHQvY3NzIiZndDsKJmx0O0xJTksgcmVsPSJhbHRlcm5hdGUgc3R5bGVzaGVl dCIgdGl0bGU9ImNvbXBhY3QiIGhyZWY9InNtYWxsLWV4dHJhcy5jc3MiCnR5cGU9 InRleHQvY3NzIiZndDsKJmx0O0xJTksgcmVsPSJhbHRlcm5hdGUgc3R5bGVzaGVl dCIgdGl0bGU9ImJpZyBwcmludCIgaHJlZj0iYmlncHJpbnQuY3NzIgp0eXBlPSJ0 ZXh0L2NzcyImZ3Q7CiZsdDtMSU5LIHJlbD0ic3R5bGVzaGVldCIgaHJlZj0iY29t bW9uLmNzcyIgdHlwZT0idGV4dC9jc3MiJmd0OzwvcHJlPgoKPHA+d291bGQgYmUg ZXF1aXZhbGVudCB0bzo8L3A+Cgo8cHJlPiZsdDs/eG1sLXN0eWxlc2hlZXQgYWx0 ZXJuYXRlPSJ5ZXMiIHRpdGxlPSJjb21wYWN0IiBocmVmPSJzbWFsbC1iYXNlLmNz cyIKdHlwZT0idGV4dC9jc3MiPyZndDsKJmx0Oz94bWwtc3R5bGVzaGVldCBhbHRl cm5hdGU9InllcyIgdGl0bGU9ImNvbXBhY3QiIGhyZWY9InNtYWxsLWV4dHJhcy5j c3MiCnR5cGU9InRleHQvY3NzIj8mZ3Q7CiZsdDs/eG1sLXN0eWxlc2hlZXQgYWx0 ZXJuYXRlPSJ5ZXMiIHRpdGxlPSJiaWcgcHJpbnQiIGhyZWY9ImJpZ3ByaW50LmNz cyIKdHlwZT0idGV4dC9jc3MiPyZndDsKJmx0Oz94bWwtc3R5bGVzaGVldCBocmVm PSJjb21tb24uY3NzIiB0eXBlPSJ0ZXh0L2NzcyI/Jmd0OzwvcHJlPgoKCgo8aHIg dGl0bGU9IlNlcGFyYXRvciBmcm9tIGZvb3RlciI+Cgo8aDI+CjxhIG5hbWU9IlJl ZmVyZW5jZXMiPjwvYT5BIFJlZmVyZW5jZXM8L2gyPgoKPGRsPgoKPGR0Pgo8YSBu YW1lPSJIVE1MIj5IVE1MNDA8L2E+CjwvZHQ+CjxkZD5Xb3JsZCBXaWRlIFdlYgpD b25zb3J0aXVtLiA8aT5IVE1MIDQuMCBTcGVjaWZpY2F0aW9uLjwvaT4gVzNDIFJl Y29tbWVuZGF0aW9uLiBTZWUKPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcvVFIv UkVDLWh0bWw0MCI+aHR0cDovL3d3dy53My5vcmcvVFIvUkVDLWh0bWw0MDwvYT4K PC9kZD4KCjxkdD4KPGEgbmFtZT0iUkZDMjA2OCI+UkZDMjA2ODwvYT4KPC9kdD4K PGRkPlIuIEZpZWxkaW5nLCBKLiBHZXR0eXMsIEouIE1vZ3VsLApILiBGcnlzdHlr IE5pZWxzZW4sIGFuZCBULiBCZXJuZXJzLUxlZS4gIDxpPkh5cGVydGV4dCBUcmFu c2ZlcgpQcm90b2NvbCAtLSBIVFRQLzEuMS48L2k+LiBJRVRGIFJGQyAyMDY4LiBT ZWUgPGEgaHJlZj0iaHR0cDovL3d3dy5pZXRmLm9yZy9yZmMvcmZjMjA2OC50eHQi Pmh0dHA6Ly93d3cuaWV0Zi5vcmcvcmZjL3JmYzIwNjgudHh0PC9hPi48L2RkPgoK PGR0Pgo8YSBuYW1lPSJSRkMyMzk2Ij5SRkMyMzk2PC9hPgo8L2R0Pgo8ZGQ+VC4g QmVybmVycy1MZWUsIFIuIEZpZWxkaW5nLCBhbmQKTC4gTWFzaW50ZXIuICA8aT5V bmlmb3JtIFJlc291cmNlIElkZW50aWZpZXJzIChVUkkpOiBHZW5lcmljClN5bnRh eDwvaT4uIElFVEYgUkZDIDIzOTYuIFNlZSA8YSBocmVmPSJodHRwOi8vd3d3Lmll dGYub3JnL3JmYy9yZmMyMzk2LnR4dCI+aHR0cDovL3d3dy5pZXRmLm9yZy9yZmMv cmZjMjM5Ni50eHQ8L2E+LjwvZGQ+Cgo8ZHQ+CjxhIG5hbWU9IlhNTCI+WE1MMTA8 L2E+CjwvZHQ+CjxkZD5Xb3JsZCBXaWRlIFdlYiBDb25zb3J0aXVtLiA8aT5FeHRl bnNpYmxlCk1hcmt1cCBMYW5ndWFnZSAoWE1MKSAxLjAuPC9pPiBXM0MgUmVjb21t ZW5kYXRpb24uIFNlZSA8YSBocmVmPSJodHRwOi8vd3d3LnczLm9yZy9UUi8xOTk4 L1JFQy14bWwtMTk5ODAyMTAiPmh0dHA6Ly93d3cudzMub3JnL1RSLzE5OTgvUkVD LXhtbC0xOTk4MDIxMDwvYT4KPC9kZD4KCjwvZGw+CgoKCgo8aDI+CjxhIG5hbWU9 InJhdGlvbmFsZSI+PC9hPkIgUmF0aW9uYWxlPC9oMj4KCjxwPlRoZXJlIHdhcyBh biB1cmdlbnQgcmVxdWlyZW1lbnQgZm9yIGEgc3BlY2lmaWNhdGlvbiBmb3Igc3R5 bGUgc2hlZXQKbGlua2luZyB0aGF0IGNvdWxkIGJlIGNvbXBsZXRlZCBpbiB0aW1l IGZvciB0aGUgbmV4dCByZWxlYXNlIGZyb20KbWFqb3IgYnJvd3NlciB2ZW5kb3Jz LiAgT25seSBieSBjaG9vc2luZyBhIHNpbXBsZSBtZWNoYW5pc20gY2xvc2VseQpi YXNlZCBvbiBhIHByb3ZlbiBleGlzdGluZyBtZWNoYW5pc20gY291bGQgdGhlIHNw ZWNpZmljYXRpb24gYmUKY29tcGxldGVkIGluIHRpbWUgdG8gbWVldCB0aGlzIHJl cXVpcmVtZW50LjwvcD4KCjxwPlVzZSBvZiBhIHByb2Nlc3NpbmcgaW5zdHJ1Y3Rp b24gYXZvaWRzIHBvbGx1dGluZyB0aGUgbWFpbiBkb2N1bWVudApzdHJ1Y3R1cmUg d2l0aCBhcHBsaWNhdGlvbiBzcGVjaWZpYyBwcm9jZXNzaW5nIGluZm9ybWF0aW9u LjwvcD4KCjxwPlRoZSBtZWNoYW5pc20gY2hvc2VuIGZvciB0aGlzIHZlcnNpb24g b2YgdGhlIHNwZWNpZmljYXRpb24gaXMgbm90IGEKY29uc3RyYWludCBvbiB0aGUg YWRkaXRpb25hbCBtZWNoYW5pc21zIHBsYW5uZWQgZm9yIGZ1dHVyZSB2ZXJzaW9u cy4KVGhlcmUgaXMgbm8gZXhwZWN0YXRpb24gdGhhdCB0aGVzZSB3aWxsIHVzZSBw cm9jZXNzaW5nIGluc3RydWN0aW9uczsKaW5kZWVkIHRoZXkgbWF5IG5vdCBpbmNs dWRlIHRoZSBsaW5raW5nIGluZm9ybWF0aW9uIGluIHRoZSBzb3VyY2UKZG9jdW1l bnQuPC9wPgoKCgoKPC9ib2R5Pgo8L2h0bWw+Cg== ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/certs/libxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000755000175000017500000000000012273503733032603 5ustar tonytony././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/certs/lugh.crtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000152310377666730032620 0ustar tonytony0O0!Ħ0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020403000021Z 120402225946Z0f1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure1 0 ULugh00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2HvX0䔹PkVt݂NF[MrvK'.́MEH'CU|()5U9%= ~Ȭc>!eL jН_$Pe7 f+Lck<Ȑc:080U0U Y"P0U# 0 V0Z2}0 *H800-lܛ^[O|2&tCsci!tֵcD././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/certs/macha.crtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000152410377666730032621 0ustar tonytony0P0!{0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020403000003Z 120402225946Z0g1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10 UMacha00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2]h"D㶤Lw'WIGބ}Z<IVs$9p[8Z0N`E?Y;~07;:080U0U 3Ay0U# 0 V0Z2}0 *H800->3WLܜ[:+r<)֒jn @././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/certs/nemain.crtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000152410377666730032621 0ustar tonytony0P0!0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020403000008Z 120402225946Z0h1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10 UNemain00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2|sO5(#  $h Ā߰ $ fW+zmTSƫokSa&/HV@Ԇs t-Ļ\wU!$cGR\o/T0vQnԋFgRd:080U0U tħҜ0U# 0 V0Z2}0 *H8/0,$/5)M7faJKQ}Xx>?_~ ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/certs/mullan.crtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000127110763336446032615 0ustar tonytony00sGͷr0 *H80@10 &,dcom10 &,dsun10U Sean Mullan0 080304205618Z 080602205618Z0@10 &,dcom10 &,dsun10U Sean Mullan00,*H80Su)RJ.RI[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2Φ: H././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/certs/xmldsig.jkslibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000001566010372164212032606 0ustar tonytonymachalۥX.509T0P0!{0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020403000003Z 120402225946Z0g1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10 UMacha00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2]h"D㶤Lw'WIGބ}Z<IVs$9p[8Z0N`E?Y;~07;:080U0U 3Ay0U# 0 V0Z2}0 *H800->3WLܜ[:+r<)֒jn @calX.509^0Z0!:<0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020402235946Z 120402225946Z0v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2Φ: HbadbljX.509R0N0!gJ0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020402235957Z 120402225946Z0f1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure1 0 UBadb00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2Bn.Es,ŎP_.xB~˖⭢@g 7O9/c7{`ydw)¸lvb!%8;s56#:GSp&)*Ht1 FFߣ:080U0U j50U# 0 V0Z2}0 *H8/0,R?R&c:}kt5>iq{F\NoulughlX.509S0O0!Ħ0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020403000021Z 120402225946Z0f1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure1 0 ULugh00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2HvX0䔹PkVt݂NF[MrvK'.́MEH'CU|()5U9%= ~Ȭc>!eL jН_$Pe7 f+Lck<Ȑc:080U0U Y"P0U# 0 V0Z2}0 *H800-lܛ^[O|2&tCsci!tֵcDnemainl@X.509T0P0!0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020403000008Z 120402225946Z0h1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10 UNemain00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2|sO5(#  $h Ā߰ $ fW+zmTSƫokSa&/HV@Ԇs t-Ļ\wU!$cGR\o/T0vQnԋFgRd:080U0U tħҜ0U# 0 V0Z2}0 *H8/0,$/5)M7faJKQ}Xx>?_~ balorlX.509S0O0!G0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020403000015Z 120402225946Z0g1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10 UBalor00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2n[eK 7#7Ra6J'*8\YMxĕ ;p6|"oYSL.C8)6r+f K~[AOftQ=d3s8#b\82 suW_:080U0U m0U# 0 V0Z2}0 *H8/0,CƃN_o!ydazڥd]_Ղ߭morigulX.509T0P0!Q0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020402235952Z 120402225946Z0h1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10 UMorigu00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2}M@ϔcCGOaQ~Ȼ)=nYC*RL(Sϒ+=P$i9,xE4h;հ┉Ek"=R,cڳ;"Wn:080U0U .8K0U# 0 V0Z2}0 *H8/0,B8|I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2`1qU::ߎ~M<jrTTLY^gm߼Ւ($kCW7d9̈́ʯ,jXl_QO W$"SDET*P$d\E>XC:080U0U 1˅0U# 0 V0Z2}0 *H8/0,43N'FDT;@x,*RԎY5zv *fl././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/certs/badb.crtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000152210377666730032617 0ustar tonytony0N0!gJ0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020402235957Z 120402225946Z0f1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure1 0 UBadb00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2Bn.Es,ŎP_.xB~˖⭢@g 7O9/c7{`ydw)¸lvb!%8;s56#:GSp&)*Ht1 FFߣ:080U0U j50U# 0 V0Z2}0 *H8/0,R?R&c:}kt5>iq{F\Nou././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/certs/crllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000067310377666730032625 0ustar tonytony-----BEGIN CRL----- MIIBJDCB5AIBATAJBgcqhkjOOAQDMHYxCzAJBgNVBAYTAklFMQ8wDQYDVQQIEwZE dWJsaW4xJDAiBgNVBAoTG0JhbHRpbW9yZSBUZWNobm9sb2dpZXMgTHRkLjERMA8G A1UECxMIWC9TZWN1cmUxHTAbBgNVBAMTFEFub3RoZXIgVHJhbnNpZW50IENBFw0w MjA0MDQwMjE2NThaFw0xMTA0MDIwMjE2NThaMBkwFwIGAOz5Id5/Fw0wMjA0MDQw MjE2NThaoCMwITATBgNVHSMEDDAKgAiKHFYwWjISfTAKBgNVHRQEAwIBADAJBgcq hkjOOAQDAzAAMC0CFCEIm38fvGzSJHms284hUs9dNB8nAhUAjEtZr0TGgc6sVRVk krEgltdo7Jw= -----END CRL----- ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/certs/balor.crtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000152310377666730032620 0ustar tonytony0O0!G0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020403000015Z 120402225946Z0g1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10 UBalor00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2n[eK 7#7Ra6J'*8\YMxĕ ;p6|"oYSL.C8)6r+f K~[AOftQ=d3s8#b\82 suW_:080U0U m0U# 0 V0Z2}0 *H8/0,CƃN_o!ydazڥd]_Ղ߭././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/certs/morigu.crtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000152410377666730032621 0ustar tonytony0P0!Q0 *H80v1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10UAnother Transient CA0 020402235952Z 120402225946Z0h1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10 UMorigu00+*H80J'ѠX* gm>I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2}M@ϔcCGOaQ~Ȼ)=nYC*RL(Sϒ+=P$i9,xE4h;հ┉Ek"=R,cڳ;"Wn:080U0U .8K0U# 0 V0Z2}0 *H8/0,B8|I[qtpχEm!X (.)9qk‡P5$6QWNkE/{=k ޥ^K>/̕ )2)%MsS?j9`KxkrY% ϵlNBA&I\?{e|FN}\_xDg31BzN {+i`&2b@Nn5y aZd%tl{񸶨-,xFy2`1qU::ߎ~M<jrTTLY^gm߼Ւ($kCW7d9̈́ʯ,jXl_QO W$"SDET*P$d\E>XC:080U0U 1˅0U# 0 V0Z2}0 *H8/0,43N'FDT;@x,*RԎ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/Readme.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000420410052374102032572 0ustar tonytonySample XML Signatures[1][2] [1] http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/ [2] http://www.w3.org/TR/2001/REC-xml-c14n-20010315 1. A large and complex signature: This includes internal and external base 64, references of the forms "", "#xpointer(/)", "#foo" and "#xpointer(id('foo'))" (with and without comments), manifests, signature properties, simple xpath with here(), xslt, retrieval method and odd interreferential dependencies. signature.xml - A signature signature.tmpl - The template from which the signature was created signature-c14n-*.txt - All intermediate c14n output 2. Some basic signatures: The key for the HMAC-SHA1 signatures is "secret".getBytes("ASCII") which is, in hex, (73 65 63 72 65 74). No key info is provided for these signatures. signature-enveloped-dsa.xml signature-enveloping-b64-dsa.xml signature-enveloping-dsa.xml signature-enveloping-hmac-sha1-40.xml signature-enveloping-hmac-sha1.xml signature-enveloping-rsa.xml signature-external-b64-dsa.xml signature-external-dsa.xml - The signatures signature-*-c14n-*.txt - The intermediate c14n output 3. Varying key information: To resolve the key associated with the KeyName in `signature-keyname.xml' you must perform a cunning transformation from the name `Xxx' to the certificate that resides in the directory `certs/' that has a subject name containing the common name `Xxx', which happens to be in the file `certs/xxx.crt'. To resolve the key associated with the X509Data in `signature-x509-is.xml', `signature-x509-ski.xml' and `signature-x509-sn.xml' you need to resolve the identified certificate from those in the `certs' directory. In `signature-x509-crt-crl.xml' an X.509 CRL is present which has revoked the X.509 certificate used for signing. So verification should be qualified. signature-keyname.xml signature-retrievalmethod-rawx509crt.xml signature-x509-crt-crl.xml signature-x509-crt.xml signature-x509-is.xml signature-x509-ski.xml signature-x509-sn.xml - The signatures certs/*.crt - The certificates Merlin Hughes Baltimore Technologies, Ltd. http://www.baltimore.com/ Thursday, April 4, 2002 ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-c14n-11.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000045710052374102032600 0ustar tonytony qURlo3LSq4TWQtygBZJ0iXQ9E14= ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-c14n-4.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000025110052374102032570 0ustar tonytony ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature.tmpllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000002635710052374102032607 0ustar tonytony ]> foo bar aaaa aaaa self::text() aaaa ancestor-or-self::dsig:SignedInfo and count(ancestor-or-self::dsig:Reference | here()/ancestor::dsig:Reference[1]) > count(ancestor-or-self::dsig:Reference) or count(ancestor-or-self::node() | id('notaries')) = count(ancestor-or-self::node()) aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa ancestor-or-self::dsig:X509Data I am the text. SSBhbSB0aGUgdGV4dC4= aaaa aaaa Notaries
aaaa
192.168.21.138 CN=Merlin Hughes,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE CN=Transient CA,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE 1017788370348 MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS 8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1 MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU 2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q 4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch 3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx 0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D 451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7 PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5 NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25 4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==
bar
././@LongLink0000000000000000000000000000022400000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-hmac-sha1-40-c14n-1.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000102010052374102032563 0ustar tonytony 40 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000003312610052374102032577 0ustar tonytony ]> foo bar 60NvZvtdTB+7UnlLp/H24p7h4bs= 60NvZvtdTB+7UnlLp/H24p7h4bs= self::text() zyjp8GJOX69990Kkqw8ioPXGExk= ancestor-or-self::dsig:SignedInfo and count(ancestor-or-self::dsig:Reference | here()/ancestor::dsig:Reference[1]) > count(ancestor-or-self::dsig:Reference) or count(ancestor-or-self::node() | id('notaries')) = count(ancestor-or-self::node()) tQiE3GUKiBenPyp3J0Ei6rJMFv4= zyjp8GJOX69990Kkqw8ioPXGExk= qg4HFwsN+/WX32uH85WlJU9l45k= ETlEI3y7hvvAtMe9wQSz7LhbHEE= J/O0HhdaPXxx49fgGWMESL09GpA= J/O0HhdaPXxx49fgGWMESL09GpA= J/O0HhdaPXxx49fgGWMESL09GpA= MkL9CX8yeABBth1RChyPx58Ls8w= yamSIokKmjA3hB/s3Fu07wDO3vM= yamSIokKmjA3hB/s3Fu07wDO3vM= yamSIokKmjA3hB/s3Fu07wDO3vM= 419CYgyTWOTGYGBhzieWklNf7Bk= VzK45P9Ksjqq5oXlKQpkGgB2CNY= 7/9fR+NIDz9owc1Lfsxu1JBr8uo= qURlo3LSq4TWQtygBZJ0iXQ9E14= WvZUJAJ/3QNqzQvwne2vvy7U5Pck8ZZ5UTa6pIwR7GE+PoGi6A1kyw== ancestor-or-self::dsig:X509Data I am the text. SSBhbSB0aGUgdGV4dC4= 60NvZvtdTB+7UnlLp/H24p7h4bs= qURlo3LSq4TWQtygBZJ0iXQ9E14= Notaries
c7wq5XKos6RqNVJyFy7/fl6+sAs=
192.168.21.138 CN=Merlin Hughes,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE CN=Transient CA,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE 1017788370348 MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS 8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1 MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU 2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q 4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch 3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx 0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D 451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7 PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5 NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25 4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==
bar
././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-c14n-3.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000025110052374102032570 0ustar tonytony ././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-x509-crt.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000374610052374102032604 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= GCQVmBq+1H7e9IjvKfe+egLM1Jlp3L1JCGkl9SlJ0eaDh2MKYUUnHA== MIIDUDCCAxCgAwIBAgIGAOz5IVHTMAkGByqGSM44BAMwdjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEdMBsGA1UEAxMUQW5vdGhlciBUcmFu c2llbnQgQ0EwHhcNMDIwNDAyMjM1OTUyWhcNMTIwNDAyMjI1OTQ2WjBoMQswCQYD VQQGEwJJRTEPMA0GA1UECBMGRHVibGluMSQwIgYDVQQKExtCYWx0aW1vcmUgVGVj aG5vbG9naWVzIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMQ8wDQYDVQQDEwZNb3Jp Z3UwggG2MIIBKwYHKoZIzjgEATCCAR4CgYEAhIqwSieM0aAez+6H71gqCfBnwG3d Pu7JAElb13GkwXRw9RfPh0VtIVjhDJbyKAIuzCk5r54ccRixa8TQ2vWVwodQ9eru 7jUknAc2rVEAV5mJTrBr7UUve/X9PWsCDN6lXvFLiJp/Pi/F0cyV/CAp+jIp+rol TXOhUz9qEjnFYMMCFQCYS/p4gmsHgo3R89EAE/Hc0dhyWQKBgCWG5hn8DM+1rv5s TkJBqyZJXNzy4z974s3sAGURfBBGTpB9kFxfxNt480TxkWeDhR+39DMA5TEAsRPu QoB6Tgl7K2nNzRdgJjK4YkBObgX1ljWkAnnJCZSbC8Nh2VpkniV0bM79HnsS+eCf 8bi2qOOiLSzHeOrtzO8PB0YeeTLQA4GEAAKBgH1NBJ9Az5TwY4tDE0dPYVHHABt+ yLspnT3k9G6YWUMFhZ/+3RuqEPjnKrPfUoXTTJGIACgPU3/PkqwrPVD0JMdpOcnZ LHiJ/P7QRQeMwDRoBrs7genB1bDd4pSJrEUcjrkA5uRrIj2Z5fL+UuLiLGPO2rM7 BNQRIq3QFPdX++NuozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIK7Ljjh +EsfMBMGA1UdIwQMMAqACIocVjBaMhJ9MAkGByqGSM44BAMDLwAwLAIUEJJCOHw8 ppxoRyz3s+Vmb4NKIfMCFDgJoZn9zh/3WoYNBURODwLvyBOy ././@LongLink0000000000000000000000000000021000000000000011556 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-b64-dsa.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000310010052374102032564 0ustar tonytony N6pjx3OY2VRHMmLhoAV8HmMu2nc= KgAeq8e0yUNfFz+mFlZ3QgyQNMciV+Z3BoDQDvQNker7pazEnJmOIA==

3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi 89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=

hDLcFK0GO/Hz1arxOOvsgM/VLyU= nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM 8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA= cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv +OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=
c29tZSB0ZXh0
././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-c14n-5.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000027610052374102032577 0ustar tonytony ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-c14n-0.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000001610052374102032567 0ustar tonytonyI am the text.././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-x509-ski.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000133110052374102032570 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= F9nEU1Us48iKTml8n7E4wt7HtFJ5gaLIgox0J9WbujGndW0oQJbeGg== hf10xKfSnIg= ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-c14n-6.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000052510052374102032574 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= ././@LongLink0000000000000000000000000000021300000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-dsa-c14n-1.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000073410052374102032576 0ustar tonytony 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-c14n-1.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000050310052374102032570 0ustar tonytony 192.168.21.138 ././@LongLink0000000000000000000000000000022100000000000011560 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-hmac-sha1-c14n-0.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000012110052374102032564 0ustar tonytonysome text././@LongLink0000000000000000000000000000021100000000000011557 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-external-dsa-c14n-0.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000077010052374102032576 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= ././@LongLink0000000000000000000000000000021200000000000011560 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloped-dsa-c14n-0.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000007510052374102032574 0ustar tonytony ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-c14n-7.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000023310052374102032570 0ustar tonytony ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-c14n-10.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000403610052374102032575 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= qURlo3LSq4TWQtygBZJ0iXQ9E14= Notaries
c7wq5XKos6RqNVJyFy7/fl6+sAs=
././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-keyname.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000124010052374102032567 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= JkJ3GplEU0iDbqSv7ZOXhvv3zeM1KmP+CLphhoc+NPYqpGYQiW6O6w== Lugh ././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-external-b64-dsa.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000310310052374102032567 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= IhOlAjMFaZtkEju5R5bi528h1HpDa4A21sudZynhJRRLjZuQIHZ3eQ==

3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi 89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=

hDLcFK0GO/Hz1arxOOvsgM/VLyU= nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM 8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA= cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv +OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=
././@LongLink0000000000000000000000000000020400000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-rsa.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000217710052374102032601 0ustar tonytony 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= ov3HOoPN0w71N3DdGNhN+dSzQm6NJFUB5qGKRp9Q986nVzMb8wCIVxCQu+x3vMtq p4/R3KEcPtEJSaoR+thGq++GPIh2mZXyWJs3xHy9P4xmoTVwli7/l7s8ebDSmnbZ 7xZU4Iy1BSMZSxGKnRG+Z/0GJIfTz8jhH6wCe3l03L4= q07hpxA5DGFfvJFZueFl/LI85XxQxrvqgVugL25V090A9MrlLBg5PmAsxFTe+G6a xvWJQwYOVHj/nuiCnNLa9a7uAtPFiTtW+v5H3wlLaY3ws4atRBNOQlYkIBp38sTf QBkk4i8PEU1GQ2M0CLIJq4/2Akfv1wxzSQ9+8oWkArc= AQAB some text ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-c14n-16.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000001425010052374102032574 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= 60NvZvtdTB+7UnlLp/H24p7h4bs= self::text() zyjp8GJOX69990Kkqw8ioPXGExk= zyjp8GJOX69990Kkqw8ioPXGExk= qg4HFwsN+/WX32uH85WlJU9l45k= ETlEI3y7hvvAtMe9wQSz7LhbHEE= J/O0HhdaPXxx49fgGWMESL09GpA= J/O0HhdaPXxx49fgGWMESL09GpA= J/O0HhdaPXxx49fgGWMESL09GpA= MkL9CX8yeABBth1RChyPx58Ls8w= yamSIokKmjA3hB/s3Fu07wDO3vM= yamSIokKmjA3hB/s3Fu07wDO3vM= yamSIokKmjA3hB/s3Fu07wDO3vM= 419CYgyTWOTGYGBhzieWklNf7Bk= VzK45P9Ksjqq5oXlKQpkGgB2CNY= 7/9fR+NIDz9owc1Lfsxu1JBr8uo= qURlo3LSq4TWQtygBZJ0iXQ9E14= ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-c14n-2.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000025110052374102032570 0ustar tonytony ././@LongLink0000000000000000000000000000021200000000000011560 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-hmac-sha1.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000113510052374102032572 0ustar tonytony 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= JElPttIT4Am7Q+MNoMyv+WDfAZw= some text ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-c14n-17.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000001561510052374102032602 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= 60NvZvtdTB+7UnlLp/H24p7h4bs= self::text() zyjp8GJOX69990Kkqw8ioPXGExk= ancestor-or-self::dsig:SignedInfo and count(ancestor-or-self::dsig:Reference | here()/ancestor::dsig:Reference[1]) > count(ancestor-or-self::dsig:Reference) or count(ancestor-or-self::node() | id('notaries')) = count(ancestor-or-self::node()) tQiE3GUKiBenPyp3J0Ei6rJMFv4= zyjp8GJOX69990Kkqw8ioPXGExk= qg4HFwsN+/WX32uH85WlJU9l45k= ETlEI3y7hvvAtMe9wQSz7LhbHEE= J/O0HhdaPXxx49fgGWMESL09GpA= J/O0HhdaPXxx49fgGWMESL09GpA= J/O0HhdaPXxx49fgGWMESL09GpA= MkL9CX8yeABBth1RChyPx58Ls8w= yamSIokKmjA3hB/s3Fu07wDO3vM= yamSIokKmjA3hB/s3Fu07wDO3vM= yamSIokKmjA3hB/s3Fu07wDO3vM= 419CYgyTWOTGYGBhzieWklNf7Bk= VzK45P9Ksjqq5oXlKQpkGgB2CNY= 7/9fR+NIDz9owc1Lfsxu1JBr8uo= qURlo3LSq4TWQtygBZJ0iXQ9E14= ././@LongLink0000000000000000000000000000020300000000000011560 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloped-dsa.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000324510052374102032576 0ustar tonytony fdy6S2NLpnT4fMdokUHSHsmpcvo= Z4pBb+o+XOKWME7CpLyXuNqyIYdXOcGvthfUf+ZDLL5immPx+3tK8Q==

3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi 89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=

hDLcFK0GO/Hz1arxOOvsgM/VLyU= nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM 8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA= cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv +OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=
././@LongLink0000000000000000000000000000021500000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-hmac-sha1-40.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000121410052374102032570 0ustar tonytony 40 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= HHiqvCU= some text ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-c14n-15.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000052710052374102032576 0ustar tonytony foo bar bar ././@LongLink0000000000000000000000000000022100000000000011560 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-hmac-sha1-c14n-1.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000073510052374102032577 0ustar tonytony 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-c14n-12.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000061710052374102032576 0ustar tonytony foo bar bar ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-x509-sn.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000143510052374102032575 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= MUOjiqG0dbjvR6+qYYPL85nKSt2FeZGQBQkYudv48KyJhJLG1Bp+bA== CN=Badb,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-c14n-8.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000047010052374102032573 0ustar tonytony 7/9fR+NIDz9owc1Lfsxu1JBr8uo= ././@LongLink0000000000000000000000000000020400000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-dsa.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000271310052374102032575 0ustar tonytony 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= PfD92lkxKgc2OKvF4p0ba6cJj6d1eqIDx5Q1hvVYTviotje23Snunw==

3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi 89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=

hDLcFK0GO/Hz1arxOOvsgM/VLyU= nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM 8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA= cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv +OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=
some text
././@LongLink0000000000000000000000000000022400000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-hmac-sha1-40-c14n-0.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000012110052374102032564 0ustar tonytonysome text././@LongLink0000000000000000000000000000020200000000000011557 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-x509-crt-crl.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000472210052374102032577 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= WF6EaX66f8CdGE6NafmzdLpb/1OVYX4kBNsqgGIqHR5JZAu4HpbVQQ== MIIDTjCCAw6gAwIBAgIGAOz5Id5/MAkGByqGSM44BAMwdjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEdMBsGA1UEAxMUQW5vdGhlciBUcmFu c2llbnQgQ0EwHhcNMDIwNDAzMDAwMDI4WhcNMTIwNDAyMjI1OTQ2WjBmMQswCQYD VQQGEwJJRTEPMA0GA1UECBMGRHVibGluMSQwIgYDVQQKExtCYWx0aW1vcmUgVGVj aG5vbG9naWVzIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMQ0wCwYDVQQDEwRCcmVz MIIBtjCCASsGByqGSM44BAEwggEeAoGBAISKsEonjNGgHs/uh+9YKgnwZ8Bt3T7u yQBJW9dxpMF0cPUXz4dFbSFY4QyW8igCLswpOa+eHHEYsWvE0Nr1lcKHUPXq7u41 JJwHNq1RAFeZiU6wa+1FL3v1/T1rAgzepV7xS4iafz4vxdHMlfwgKfoyKfq6JU1z oVM/ahI5xWDDAhUAmEv6eIJrB4KN0fPRABPx3NHYclkCgYAlhuYZ/AzPta7+bE5C QasmSVzc8uM/e+LN7ABlEXwQRk6QfZBcX8TbePNE8ZFng4Uft/QzAOUxALET7kKA ek4Jeytpzc0XYCYyuGJATm4F9ZY1pAJ5yQmUmwvDYdlaZJ4ldGzO/R57Evngn/G4 tqjjoi0sx3jq7czvDwdGHnky0AOBhAACgYBgvDFxw1U6Ou2G6P/+347Jfk2wPB1/ atr4p3JUVLuT0ExZG6np+rKiXmcBbYKbAhMY37zVkroR9bwo+NgaJGubQ4ex5Y1X N2Q5gIHNhNfKr8G4LPVqWGxf/lFPDYxX3ezqBJPpJCJTREX7s6Hp/VTV2SpQlySv +GRcFKJFPlhD9aM6MDgwDgYDVR0PAQH/BAQDAgeAMBEGA1UdDgQKBAiC+5gx0MHL hTATBgNVHSMEDDAKgAiKHFYwWjISfTAJBgcqhkjOOAQDAy8AMCwCFDTcM5i61uqq /aveERhOJ6NG/LubAhREVDtAeNbTEywXr4O7KvEEvFLUjg== MIIBJDCB5AIBATAJBgcqhkjOOAQDMHYxCzAJBgNVBAYTAklFMQ8wDQYDVQQIEwZE dWJsaW4xJDAiBgNVBAoTG0JhbHRpbW9yZSBUZWNobm9sb2dpZXMgTHRkLjERMA8G A1UECxMIWC9TZWN1cmUxHTAbBgNVBAMTFEFub3RoZXIgVHJhbnNpZW50IENBFw0w MjA0MDQwMjE2NThaFw0xMTA0MDIwMjE2NThaMBkwFwIGAOz5Id5/Fw0wMjA0MDQw MjE2NThaoCMwITATBgNVHSMEDDAKgAiKHFYwWjISfTAKBgNVHRQEAwIBADAJBgcq hkjOOAQDAzAAMC0CFCEIm38fvGzSJHms284hUs9dNB8nAhUAjEtZr0TGgc6sVRVk krEgltdo7Jw= ././@LongLink0000000000000000000000000000020200000000000011557 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-external-dsa.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000267610052374102032605 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= LaL1/t/XodYvDJDgSEbq47GX8ltnlx3FFURdi7o+UFVi+zLf0WyWaQ==

3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi 89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=

hDLcFK0GO/Hz1arxOOvsgM/VLyU= nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM 8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA= cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv +OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=
././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-c14n-9.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000047010052374102032573 0ustar tonytony 7/9fR+NIDz9owc1Lfsxu1JBr8uo= ././@LongLink0000000000000000000000000000021300000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-rsa-c14n-0.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000012110052374102032564 0ustar tonytonysome text././@LongLink0000000000000000000000000000021500000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-external-b64-dsa-c14n-0.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000120710052374102032572 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= ././@LongLink0000000000000000000000000000021200000000000011560 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloped-dsa-c14n-1.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000116210052374102032572 0ustar tonytony fdy6S2NLpnT4fMdokUHSHsmpcvo= ././@LongLink0000000000000000000000000000022000000000000011557 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-retrievalmethod-rawx509crt.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000135610052374102032577 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= SNB5FI193RFXoG2j8Z9bXWgW7BMPICqNob4Hjh08oou4tkhGxz4+pg== ././@LongLink0000000000000000000000000000021300000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-dsa-c14n-0.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-thr0000644000175000017500000000012110052374102032564 0ustar tonytonysome textlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/0000755000175000017500000000000012273503733032214 5ustar tonytony././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c14n-11.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c10000644000175000017500000000412207357133753032451 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= l/bqIouk6Gs8eEjG0Tad0MJJgWw= Notaries
c7wq5XKos6RqNVJyFy7/fl6+sAs=
././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c14n-12.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c10000644000175000017500000000054307357133753032454 0ustar tonytony l/bqIouk6Gs8eEjG0Tad0MJJgWw= ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c14n-13.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c10000644000175000017500000000061507357133753032454 0ustar tonytony foo bar bar ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/Readme.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/Re0000644000175000017500000000122107357133753032511 0ustar tonytonyExample Signature[1] [1] http://www.w3.org/Signature/Drafts/xmldsig-core/Overview.html See signature.xml This includes internal and external base 64, references of the forms "", "#xpointer(/)", "#foo" and "#xpointer(id('foo'))" (with and without comments), manifests, signature properties, simple xpath with here(), xslt, retrieval method and odd interreferential dependencies. Included in the directory are: signature.xml - The signature itself signature.tmpl - The template from which the signature was created c14n-*.txt - All intermediate c14n output Merlin Hughes Baltimore Technologies, Ltd. Tuesday, April 10, 2001 ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/signature.tmpllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/si0000644000175000017500000002357007357133753032571 0ustar tonytony ]> foo bar aaaa aaaa self::text() aaaa ancestor-or-self::dsig:SignedInfo and count(ancestor-or-self::dsig:Reference | here()/ancestor::dsig:Reference[1]) > count(ancestor-or-self::dsig:Reference) or count(ancestor-or-self::node() | id('notaries')) = count(ancestor-or-self::node()) aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa ancestor-or-self::dsig:X509Data I am the text. SSBhbSB0aGUgdGV4dC4= aaaa aaaa Notaries
aaaa
192.168.21.138 CN=Merlin Hughes,O=Baltimore Technologies\, Ltd.,ST=Dublin,C=IE CN=Test DSA CA,O=Baltimore Technologies\, Ltd.,ST=Dublin,C=IE 970849936 MIIDNzCCAvWgAwIBAgIEOd3+kDAJBgcqhkjOOAQDMFsxCzAJBgNVBAYTAklFMQ8w DQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9yZSBUZWNobm9sb2dpZXMs IEx0ZC4xFDASBgNVBAMTC1Rlc3QgRFNBIENBMB4XDTAwMTAwNjE2MzIxNVoXDTAx MTAwNjE2MzIxNFowXTELMAkGA1UEBhMCSUUxDzANBgNVBAgTBkR1YmxpbjElMCMG A1UEChMcQmFsdGltb3JlIFRlY2hub2xvZ2llcywgTHRkLjEWMBQGA1UEAxMNTWVy bGluIEh1Z2hlczCCAbYwggErBgcqhkjOOAQBMIIBHgKBgQDaJjfDTrawMHf8MiUt Y54b37hSmYNnR3KpGT10uU1Dqppcju06uN0iGbqf947DjkBC25hKnqykK31xBw0E CPbYq/KC98kghdf2xJCu6B8aqJ95K9jdVflJ3WP7PQxJn+fmM23zy6HYLXVICpfq etdNj/VHCShZE3bdJiE6VobSFQIVAPQecqS2PaTDprcQnkwx4MHTRXhrAoGAMuGA lqeB1ax+vyO2+Osubjhl7pHxLu47RIH+/M52DjESA9KMSrwzsYx8yNR2WooByrE0 t6fu0VncK7UK8olO4t7wpv2z4AFQPRVCKFwo0qgn5aKIkICGMlrRy81avb27wGcW othx3iPPMtFXtoDqK0JItaI9R8zc1msFhM1GKMYDgYQAAoGActA8YGxrtngg/zKV vqEOefnwmViFztcnPBYPlJsvh6yKI4iDm68fnp4Mi3RrJ6bZAygFrUIQLxLjV+OJ tgJAEto0xAs+Mehuq1DkSFEpP3oDzCTOsrOiS1DwQe4oIb7zVk/9l7aPtJMHW0LV lMdwZNFNNJoqMcT2ZfCPrfvYvQ2jRzBFMB4GA1UdEQQXMBWBE21lcmxpbkBiYWx0 aW1vcmUuaWUwDgYDVR0PAQH/BAQDAgeAMBMGA1UdIwQMMAqACEJZQG0KwRbPMAkG ByqGSM44BAMDMQAwLgIVAK4skWEFYgrggaJA8vYAwSjg12+KAhUAwHTo7wd4tENw 9LAKPklQ/74fH18=
bar
././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c14n-7.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c10000644000175000017500000000023407357133753032451 0ustar tonytony ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c14n-15.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c10000644000175000017500000000052507357133753032454 0ustar tonytony foo bar bar ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/signature.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/si0000644000175000017500000003051707357133753032570 0ustar tonytony ]> foo bar 60NvZvtdTB+7UnlLp/H24p7h4bs= 60NvZvtdTB+7UnlLp/H24p7h4bs= self::text() zyjp8GJOX69990Kkqw8ioPXGExk= ancestor-or-self::dsig:SignedInfo and count(ancestor-or-self::dsig:Reference | here()/ancestor::dsig:Reference[1]) > count(ancestor-or-self::dsig:Reference) or count(ancestor-or-self::node() | id('notaries')) = count(ancestor-or-self::node()) DkRNHKuQgDiTy9XAAMGbyydg3BI= zyjp8GJOX69990Kkqw8ioPXGExk= X9dMPL0KeDZXh9GE3vLcOtPsYjI= 7tHLZrC0kqOhPCiYu/WusgG4tBo= zbVZy3ycg7CyFcPzNs0C6bA3qio= zbVZy3ycg7CyFcPzNs0C6bA3qio= zbVZy3ycg7CyFcPzNs0C6bA3qio= ar0/7EQyRfUZmrPPcTQFdVCt2PY= 0aW4L0GoFzYUo4gyZSfoyZBhpuc= 0aW4L0GoFzYUo4gyZSfoyZBhpuc= 0aW4L0GoFzYUo4gyZSfoyZBhpuc= 1puYWb36Z5TIDmEIVd/JLR3iD8Y= MMtXLCswiEDurKMgg2r+vBPlk8Q= 7eI/P8mppgkqXqW0+at2UGj06qs= l/bqIouk6Gs8eEjG0Tad0MJJgWw= SiMb9su56spmMlNjrWWKdkgj1hDhveaWCx5Bwpj5AuJ6T3Zy68NJ/A== ancestor-or-self::dsig:X509Data I am the text. SSBhbSB0aGUgdGV4dC4= 60NvZvtdTB+7UnlLp/H24p7h4bs= l/bqIouk6Gs8eEjG0Tad0MJJgWw= Notaries
c7wq5XKos6RqNVJyFy7/fl6+sAs=
192.168.21.138 CN=Merlin Hughes,O=Baltimore Technologies\, Ltd.,ST=Dublin,C=IE CN=Test DSA CA,O=Baltimore Technologies\, Ltd.,ST=Dublin,C=IE 970849936 MIIDNzCCAvWgAwIBAgIEOd3+kDAJBgcqhkjOOAQDMFsxCzAJBgNVBAYTAklFMQ8w DQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9yZSBUZWNobm9sb2dpZXMs IEx0ZC4xFDASBgNVBAMTC1Rlc3QgRFNBIENBMB4XDTAwMTAwNjE2MzIxNVoXDTAx MTAwNjE2MzIxNFowXTELMAkGA1UEBhMCSUUxDzANBgNVBAgTBkR1YmxpbjElMCMG A1UEChMcQmFsdGltb3JlIFRlY2hub2xvZ2llcywgTHRkLjEWMBQGA1UEAxMNTWVy bGluIEh1Z2hlczCCAbYwggErBgcqhkjOOAQBMIIBHgKBgQDaJjfDTrawMHf8MiUt Y54b37hSmYNnR3KpGT10uU1Dqppcju06uN0iGbqf947DjkBC25hKnqykK31xBw0E CPbYq/KC98kghdf2xJCu6B8aqJ95K9jdVflJ3WP7PQxJn+fmM23zy6HYLXVICpfq etdNj/VHCShZE3bdJiE6VobSFQIVAPQecqS2PaTDprcQnkwx4MHTRXhrAoGAMuGA lqeB1ax+vyO2+Osubjhl7pHxLu47RIH+/M52DjESA9KMSrwzsYx8yNR2WooByrE0 t6fu0VncK7UK8olO4t7wpv2z4AFQPRVCKFwo0qgn5aKIkICGMlrRy81avb27wGcW othx3iPPMtFXtoDqK0JItaI9R8zc1msFhM1GKMYDgYQAAoGActA8YGxrtngg/zKV vqEOefnwmViFztcnPBYPlJsvh6yKI4iDm68fnp4Mi3RrJ6bZAygFrUIQLxLjV+OJ tgJAEto0xAs+Mehuq1DkSFEpP3oDzCTOsrOiS1DwQe4oIb7zVk/9l7aPtJMHW0LV lMdwZNFNNJoqMcT2ZfCPrfvYvQ2jRzBFMB4GA1UdEQQXMBWBE21lcmxpbkBiYWx0 aW1vcmUuaWUwDgYDVR0PAQH/BAQDAgeAMBMGA1UdIwQMMAqACEJZQG0KwRbPMAkG ByqGSM44BAMDMQAwLgIVAK4skWEFYgrggaJA8vYAwSjg12+KAhUAwHTo7wd4tENw 9LAKPklQ/74fH18=
bar
././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c14n-10.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c10000644000175000017500000000055407357133753032456 0ustar tonytony 7eI/P8mppgkqXqW0+at2UGj06qs= ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c14n-8.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c10000644000175000017500000000026207357133753032452 0ustar tonytonyNotaries
Great, A. T.
Hun, A. T.
././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c14n-6.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c10000644000175000017500000000052607357133753032455 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c14n-1.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c10000644000175000017500000000050407357133753032451 0ustar tonytony 192.168.21.138 ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c14n-0.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c10000644000175000017500000000001607357133753032447 0ustar tonytonyI am the text.././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c14n-17.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c10000644000175000017500000001447207357133753032462 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= 60NvZvtdTB+7UnlLp/H24p7h4bs= self::text() zyjp8GJOX69990Kkqw8ioPXGExk= zyjp8GJOX69990Kkqw8ioPXGExk= X9dMPL0KeDZXh9GE3vLcOtPsYjI= 7tHLZrC0kqOhPCiYu/WusgG4tBo= zbVZy3ycg7CyFcPzNs0C6bA3qio= zbVZy3ycg7CyFcPzNs0C6bA3qio= zbVZy3ycg7CyFcPzNs0C6bA3qio= ar0/7EQyRfUZmrPPcTQFdVCt2PY= 0aW4L0GoFzYUo4gyZSfoyZBhpuc= 0aW4L0GoFzYUo4gyZSfoyZBhpuc= 0aW4L0GoFzYUo4gyZSfoyZBhpuc= 1puYWb36Z5TIDmEIVd/JLR3iD8Y= MMtXLCswiEDurKMgg2r+vBPlk8Q= 7eI/P8mppgkqXqW0+at2UGj06qs= l/bqIouk6Gs8eEjG0Tad0MJJgWw= ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/bad-signature.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/ba0000644000175000017500000003051310407572337032526 0ustar tonytony ]> foo bar 60NvZvtdTB+7UnlLp/H24p7h4bs= 60NvZvtdTB+7UnlLp/H24p7h4bs= self::text() zyjp8GJOX69990Kkqw8ioPXGExk= ancestor-or-self::dsig:SignedInfo and count(ancestor-or-self::dsig:Reference | here()/ancestor::dsig:Reference[1]) > count(ancestor-or-self::dsig:Reference) or count(ancestor-or-self::node() | id('notaries')) = count(ancestor-or-self::node()) DkRNHKuQgDiTy9XAAMGbyydg3BI= zyjp8GJOX69990Kkqw8ioPXGExk= X9dMPL0KeDZXh9GE3vLcOtPsYjI= 7tHLZrC0kqOhPCiYu/WusgG4tBo= zbVZy3ycg7CyFcPzNs0C6bA3qio= zbVZy3ycg7CyFcPzNs0C6bA3qio= zbVZy3ycg7CyFcPzNs0C6bA3qio= ar0/7EQyRfUZmrPPcTQFdVCt2PY= 0aW4L0GoFzYUo4gyZSfoyZBhpuc= 0aW4L0GoFzYUo4gyZSfoyZBhpuc= 0aW4L0GoFzYUo4gyZSfoyZBhpuc= 1puYWb36Z5TIDmEIVd/JLR3iD8Y= MMtXLCswiEDurKMgg2r+vBPlk8Q= 7eI/P8mppgkqXqW0+at2UGj06qs= l/bqIouk6Gs8eEjG0Tad0MJJgWw= SiMb9su56spmMlNjrWWKdkgj1hDhveaWCx5Bwpj5AuJ6T3Zy68NJ/A== ancestor-or-self::dsig:X509Data I am the bad text. aBADSIGN 60NvZvtdTB+7UnlLp/H24p7h4bs= l/bqIouk6Gs8eEjG0Tad0MJJgWw= Notaries
c7wq5XKos6RqNVJyFy7/fl6+sAs=
192.168.21.138 CN=Merlin Hughes,O=Baltimore Technologies\, Ltd.,ST=Dublin,C=IE CN=Test DSA CA,O=Baltimore Technologies\, Ltd.,ST=Dublin,C=IE 970849936 MIIDNzCCAvWgAwIBAgIEOd3+kDAJBgcqhkjOOAQDMFsxCzAJBgNVBAYTAklFMQ8w DQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9yZSBUZWNobm9sb2dpZXMs IEx0ZC4xFDASBgNVBAMTC1Rlc3QgRFNBIENBMB4XDTAwMTAwNjE2MzIxNVoXDTAx MTAwNjE2MzIxNFowXTELMAkGA1UEBhMCSUUxDzANBgNVBAgTBkR1YmxpbjElMCMG A1UEChMcQmFsdGltb3JlIFRlY2hub2xvZ2llcywgTHRkLjEWMBQGA1UEAxMNTWVy bGluIEh1Z2hlczCCAbYwggErBgcqhkjOOAQBMIIBHgKBgQDaJjfDTrawMHf8MiUt Y54b37hSmYNnR3KpGT10uU1Dqppcju06uN0iGbqf947DjkBC25hKnqykK31xBw0E CPbYq/KC98kghdf2xJCu6B8aqJ95K9jdVflJ3WP7PQxJn+fmM23zy6HYLXVICpfq etdNj/VHCShZE3bdJiE6VobSFQIVAPQecqS2PaTDprcQnkwx4MHTRXhrAoGAMuGA lqeB1ax+vyO2+Osubjhl7pHxLu47RIH+/M52DjESA9KMSrwzsYx8yNR2WooByrE0 t6fu0VncK7UK8olO4t7wpv2z4AFQPRVCKFwo0qgn5aKIkICGMlrRy81avb27wGcW othx3iPPMtFXtoDqK0JItaI9R8zc1msFhM1GKMYDgYQAAoGActA8YGxrtngg/zKV vqEOefnwmViFztcnPBYPlJsvh6yKI4iDm68fnp4Mi3RrJ6bZAygFrUIQLxLjV+OJ tgJAEto0xAs+Mehuq1DkSFEpP3oDzCTOsrOiS1DwQe4oIb7zVk/9l7aPtJMHW0LV lMdwZNFNNJoqMcT2ZfCPrfvYvQ2jRzBFMB4GA1UdEQQXMBWBE21lcmxpbkBiYWx0 aW1vcmUuaWUwDgYDVR0PAQH/BAQDAgeAMBMGA1UdIwQMMAqACEJZQG0KwRbPMAkG ByqGSM44BAMDMQAwLgIVAK4skWEFYgrggaJA8vYAwSjg12+KAhUAwHTo7wd4tENw 9LAKPklQ/74fH18=
bar
././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c14n-4.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c10000644000175000017500000000025207357133753032451 0ustar tonytony ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c14n-9.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c10000644000175000017500000000055407357133753032456 0ustar tonytony 7eI/P8mppgkqXqW0+at2UGj06qs= ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c14n-18.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c10000644000175000017500000001603607357133753032460 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= 60NvZvtdTB+7UnlLp/H24p7h4bs= self::text() zyjp8GJOX69990Kkqw8ioPXGExk= ancestor-or-self::dsig:SignedInfo and count(ancestor-or-self::dsig:Reference | here()/ancestor::dsig:Reference[1]) > count(ancestor-or-self::dsig:Reference) or count(ancestor-or-self::node() | id('notaries')) = count(ancestor-or-self::node()) DkRNHKuQgDiTy9XAAMGbyydg3BI= zyjp8GJOX69990Kkqw8ioPXGExk= X9dMPL0KeDZXh9GE3vLcOtPsYjI= 7tHLZrC0kqOhPCiYu/WusgG4tBo= zbVZy3ycg7CyFcPzNs0C6bA3qio= zbVZy3ycg7CyFcPzNs0C6bA3qio= zbVZy3ycg7CyFcPzNs0C6bA3qio= ar0/7EQyRfUZmrPPcTQFdVCt2PY= 0aW4L0GoFzYUo4gyZSfoyZBhpuc= 0aW4L0GoFzYUo4gyZSfoyZBhpuc= 0aW4L0GoFzYUo4gyZSfoyZBhpuc= 1puYWb36Z5TIDmEIVd/JLR3iD8Y= MMtXLCswiEDurKMgg2r+vBPlk8Q= 7eI/P8mppgkqXqW0+at2UGj06qs= l/bqIouk6Gs8eEjG0Tad0MJJgWw= ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c14n-14.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c10000644000175000017500000000052507357133753032454 0ustar tonytony foo bar bar ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c14n-5.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c10000644000175000017500000000027707357133753032460 0ustar tonytony ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c14n-2.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c10000644000175000017500000000025207357133753032451 0ustar tonytony ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c14n-16.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c10000644000175000017500000000052507357133753032454 0ustar tonytony foo bar bar ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c14n-3.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c10000644000175000017500000000025207357133753032451 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-exc-c14n-one/0000755000175000017500000000000012273503733031171 5ustar tonytony././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-exc-c14n-one/Readme.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-exc-c14n-one/Readm0000644000175000017500000000013407420631614032140 0ustar tonytonyuntested exclusive c14n example signature + c14n output merlin@baltimore.ie mon jan 14 2002 ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-exc-c14n-one/c14n-1.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-exc-c14n-one/c14n-0000644000175000017500000000026007420631614031732 0ustar tonytony ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-exc-c14n-one/c14n-0.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-exc-c14n-one/c14n-0000644000175000017500000000024007420631614031730 0ustar tonytony ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-exc-c14n-one/c14n-4.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-exc-c14n-one/c14n-0000644000175000017500000000427707420631614031746 0ustar tonytony 7yOTjUu+9oEhShgyIIXDLjQ08aY= 09xMy0RTQM1Q91demYe/0F6AGXo= ZQH+SkCN8c5y0feAr+aRTZDwyvY= a1cTqBgbqpUt6bMJN4C6zFtnoyo= ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-exc-c14n-one/exc-signature.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-exc-c14n-one/exc-s0000644000175000017500000000651007420631614032133 0ustar tonytony 7yOTjUu+9oEhShgyIIXDLjQ08aY= 09xMy0RTQM1Q91demYe/0F6AGXo= ZQH+SkCN8c5y0feAr+aRTZDwyvY= a1cTqBgbqpUt6bMJN4C6zFtnoyo= Kv1e7Kjhz4gFtOZKgvC5cLYtMQNIn99fyLBa6D//bBokTxTUEkMwaA== 8FkJgwdyizV5Vd0m6DA/DZsdweJdnkueYVUd7L8aA4JpZxrlCI/M7mDE/OGhEhgB nFzSTrBjSFpT7DG66uy7oJeE+RgkXO7EWWOEglMPwaZgGgi1oZarv95VOx3uO8W8 L7+S/3AuHNUZQD4b5bpdYAmjXFwz6dl0mKiXAvVuP9E= mFf8DiMVNFXy0vag9oNGNW/g4u0= g8gRdNlq9EOTR2TjmVApqCAZAq3jEjOIxXbs8JBiZ+U7dV9geeXEy13GbYoP23Qr apZQo+35diw+cMYPHjN+iUCwUkiGWv7/piAK+Ootfw03etL8XiVWjtL5NBof2CNp wmAw7mrwmNG092y1e6HXSGMMZpaoth/P8xhsxCQsqI8= j0V14dc/I+okDAeG4ZbWUzb3HTFkEOC6feOMo5Dk218GcPqEKroVHaDBF9CmRV1v B8MUOExB+6ZNHfcs5Vaw0HVn62YiEBzrmKikx6SxO4Dg9L8I5WbHn37vxUKvHs8r 7+rma3kpZQftTMiBpJ8XK8Z6jg8VhuJqo9yZZO+p3I0= ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-exc-c14n-one/c14n-2.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-exc-c14n-one/c14n-0000644000175000017500000000026107420631614031733 0ustar tonytony ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-exc-c14n-one/c14n-3.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-exc-c14n-one/c14n-0000644000175000017500000000030107420631614031726 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/0000755000175000017500000000000012273503733031305 5ustar tonytony././@LongLink0000000000000000000000000000021700000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-element-aes256-cbc-carried-kw-aes256.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encryp0000644000175000017500000000430107704772224032534 0ustar tonytony spade shovel Dig PLC, 1 First Ave, Dublin 1, Ireland Foo Key pdDtiyd7XQ/BFEEN0PMJuHnLUfCY+bJlsW+q04OiKSPnRd4/dS1tjaTfj5dPpGXe cY3fJvRsq9QP1CJiwyEC/EQ1zSLbzwOtZ+NtxtsFgYvPBJ9t86ZcXIjlErQ85z3L wnb8rSHpE9tu4tJ1rjgf2i6NCbdFnSMXLSDgLEs48+gkX0cJCmKxzRaSE4cV0OSl hBWND4EYzX1M679VlSYrI0de+lSPO3Vx+y/TuZ5Vo+uu9+YP+ce0LRkx2BicjjsP QO9sp+yjHPNDIV1Z7VHsDIWqqmBaNQo3GuzF5WzWgaXTKnPv/IgUQn+1t3EtgHyb JhnfR/1em16z/Zaf9Uy1Lfd//yfEJ9BCjqwe1UjwN6ytu1v2BHd+8bVjD2o+Dg8V 7ayOLlkWOTOLvtJMPOXPqw== ned EWlIkFPGrkeW4cyjWSznLVoClVh/OEC7Klya9d9o7R6wll6JswZb2w== Foo Key jed bsL63D0hPN6EOyzdgfEmKsAAvoJiGM+Wp9a9KZM92IKdl7s3YSntRg== Foo Key ././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encsig-sha256-hmac-sha256-kw-aes128.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encsig0000644000175000017500000000206607704772224032512 0ustar tonytony eI1OLVStn6Z4q7Byq8XGUJ4bce1LMSlanI6o+SvYzt0= cOQGJE3d3fXi1BIfdvr1v6tz/4lt9xGznfyDPXEvc4Q= job rPnY/XoSGCbuwy7vpslf29rs9dbvSCmGFOjEs3LT6g/qyZjfDA+2fQ== ././@LongLink0000000000000000000000000000020700000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-content-aes128-cbc-kw-aes192.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encryp0000644000175000017500000000311607704772224032537 0ustar tonytony spade shovel Dig PLC, 1 First Ave, Dublin 1, Ireland jeb IbjZH7Mq564oMybpvCHWYM/5ER3eFsAV YDYTxR+smxZDSVoXXEp3n6HzTgWqV7ZlG6I1lmEv7zLGZBF/o7eqe5QGT6L3DPNW geflA8vVJHxwliixWcvHCnNKQkx+Sw8YbIknCQyr4mqtXEmHhsie5XYTEyqgKLVP YdNXf56wLUTMEmBqq7cto9OrYcBWkrDcQQvHmDkHuG+Nom4m+623GsB0FNts6VyN sdGMwo4K0bEFReLL04l6It+cgLJ2q+LKdBoMQL59IAQmrwi0bkiqee2cLlDuGyQ1 KD9IQ1qtlJpvQujN4xNVWT00UjtWxmpSMID/Kue/AnXn7Cf8zw1ZZQitgh8uWOX2 uMy99F2YlxqIK1r+MeXHuZDNf75S8dFaKIKtHMf7ioA= ././@LongLink0000000000000000000000000000021700000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encsig-ripemd160-hmac-ripemd160-kw-tripledes.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encsig0000644000175000017500000000204707704772224032511 0ustar tonytony ixv9ZpIiqEzBC3Uztm5Rl6tXd9Q= kwV4uELL96oFm8/+VGzq+xAOgUg= bob gHMpx5iF7+KXtNHLasZrkcLHn8Ti4rxUjCIRK+IcgbQir6FUsQ/uxQ3o8enEMWq1 ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/Readme.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/Readme0000644000175000017500000001037507704772224032441 0ustar tonytonyExample Signatures[1] using Encryption[2] key information and Additional Security URIs[3], Encrypted Data[2] and Decryption Transform[4] [1] http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/ [2] http://www.w3.org/Encryption/2001/Drafts/xmlenc-core/ [3] http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt [4] http://www.w3.org/TR/xmlenc-decrypt *** Some of these signature are WITHOUT cryptographic merit; for example, key transport of an HMAC key is meaningless. These are provided solely for testing purposes. *** Private keys necessary for performing the verification and decryption are provided in the PKCS#12 file ids.p12, encrypted under the pass phrase "Our Little Secret". I may have done some of the ASN.1 encoding in this P12 incorrectly; I hope not. Private keys are also available in PKCS#8 encoding; rsa.p8, dh1.p8. RSA/OAEP is presently poorly defined; I assume MGF1/SHA-1. Secret keys are identified by key name as follows: Key Name | Algorithm | Key Value ----------+-----------+----------- bob | 3des | "abcdefghijklmnopqrstuvwx".getBytes ("ASCII") job | aes-128 | "abcdefghijklmnop".getBytes ("ASCII") jeb | aes-192 | "abcdefghijklmnopqrstuvwx".getBytes ("ASCII") jed | aes-256 | "abcdefghijklmnopqrstuvwxyz012345".getBytes ("ASCII") . encrypt-content-aes128-cbc-kw-aes192.xml . encrypt-content-aes192-cbc-dh-sha512.xml . encrypt-content-tripledes-cbc.xml . encrypt-data-aes128-cbc.xml . encrypt-data-aes192-cbc-kw-aes256.xml . encrypt-data-aes256-cbc-kw-tripledes.xml . encrypt-data-tripledes-cbc-rsa-oaep-mgf1p-sha256.xml . encrypt-data-tripledes-cbc-rsa-oaep-mgf1p.xml . encrypt-element-aes128-cbc-rsa-1_5.xml . encrypt-element-aes192-cbc-ref.xml . encrypt-element-aes256-cbc-kw-aes256-dh-ripemd160.xml . encrypt-element-tripledes-cbc-kw-aes128.xml Encrypted content, element and data. RSA private key has friendly name "RSA" in the P12, and is rsa.p8. DH private key has ID "DH1", and is dh1.p8. . encrypt-content-aes256-cbc-prop.xml Contains a useless EncryptionProperty. . encrypt-element-aes256-cbc-carried-kw-aes256.xml External EncryptedKey contains a CarriedKeyName which is referenced by a KeyName in the EncryptedData; the key for Recipient "someone else" is not for you; the key for Recipient "you" is. . encrypt-element-aes256-cbc-retrieved-kw-aes256.xml External EncryptedKey is identified by a RetrievalMethod in the EncryptedData. . decryption-transform.xml Decryption transform. . decryption-transform-except.xml Decryption transform with Except. All signatures are performed with nontruncated HMAC algorithms. For debugging purposes, where chosen, the MAC key is "abcdefghijklmnopqrstuvwxyz012345".getBytes ("ASCII"). Where agreed, it has length equal to the HMAC output length; e.g., 256 bits for HMAC/SHA-256. . encsig-ripemd160-hmac-ripemd160-kw-tripledes.xml RIPEMD-160 message digest; HMAC/RIPEMD-160 key is wrapped using triple DES. The decryption key is from the above table, identified by the key name "bob". . encsig-sha256-hmac-sha256-kw-aes128.xml SHA-256 message digest; HMAC/SHA-256 key is wrapped using AES-128. The decryption key is from the above table, identified by the key name "job". . encsig-sha384-hmac-sha384-kw-aes192.xml SHA-384 message digest; HMAC/SHA-384 key is wrapped using AES-192. The decryption key is from the above table, identified by the key name "jeb". . encsig-sha512-hmac-sha512-kw-aes256.xml SHA-512 message digest; HMAC/SHA-512 key is wrapped using AES-256. The decryption key is from the above table, identified by the key name "jed". . encsig-hmac-sha256-rsa-1_5.xml HMAC/SHA-256 keys is transported using RSA/OAEP. Your private key has friendly name "RSA" in the P12. . encsig-hmac-sha256-rsa-oaep-mgf1p.xml HMAC/SHA-256 keys is transported using RSA/PKCS#1. Your private key has friendly name "RSA" in the P12. . encsig-hmac-sha256-dh.xml HMAC/SHA-256 key is agreed using Diffie Hellman. Your private key has friendly name "DH1" in the P12. . encsig-hmac-sha256-kw-tripledes-dh.xml HMAC/SHA-256 key is wrapped using triple DES. The decryption key is agreed using Diffie Hellman. Your private key has friendly name "DH1" in the P12. Merlin Hughes Baltimore Technologies, Ltd. Monday, March 4, 2002 ././@LongLink0000000000000000000000000000021400000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-data-tripledes-cbc-rsa-oaep-mgf1p.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encryp0000644000175000017500000000430307704772224032536 0ustar tonytony MIICkjCCAfugAwIBAgIGAOxN32E+MA0GCSqGSIb3DQEBBQUAMG4xCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJDAiBgNVBAoTG0JhbHRpbW9yZSBUZWNobm9s b2dpZXMgTHRkLjERMA8GA1UECxMIWC9TZWN1cmUxFTATBgNVBAMTDFRyYW5zaWVu dCBDQTAeFw0wMjAyMjgxNzUyNDZaFw0wMzAyMjgxNzUyNDBaMG8xCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJDAiBgNVBAoTG0JhbHRpbW9yZSBUZWNobm9s b2dpZXMgTHRkLjERMA8GA1UECxMIWC9TZWN1cmUxFjAUBgNVBAMTDU1lcmxpbiBI dWdoZXMwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAORdNSxbNFWlQeNsOlYJ 9gN9eZD+rguRqKhmhOm7i63VDd5ALm2APXhqAmGBPzLN5jlL9g2XALK5WSO4XKjJ McVfYg4+nPuOeHgqdD4HUgf19j/6SaTMcmDFJQMmx1Qw+Aakq3mGcSfvOJcBZctz a50VucfCGL1NdfBEcaL3BnhjAgMBAAGjOjA4MA4GA1UdDwEB/wQEAwIFoDARBgNV HQ4ECgQIjFG0ZGNyvNswEwYDVR0jBAwwCoAIhJXVlhr6O4wwDQYJKoZIhvcNAQEF BQADgYEAXzG7x5aCJYRusTbmuZqhidGM5iiA9+RmZ4JTPDEgbeiTiJROxpr+ZjnA TmsDKrCpqNUiHWjmsKEArYQp8R/KjdKl/pVe3jUvTxb0YZ+li/7k0GQ5LyRT/K4c 2SgyLlyBPhpMq+z3g4P2egVRaZbxsLuKQILf7MIV/X5iAEBzu1w= S5SqVG+QxxpCNWobuqQFAI6db1pTEpWNMQXQVJAPjlfmvnVmTtq5v6fgMA2l/r7M iX7gUPZthrKezkSavDfi057cK6YKpC5/KACXjNJvUoaVXj/aXpcoMOO+ZTPq36eo pyeW99DWYgCbY88Kf9R3r3QMx/ogwjScfRVJTRZL3Lo= HG02AxNyn4iA9NH5x+PQ9lgPNzTkljThotXWKz0UYrE= ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/ids.p12libxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/ids.p10000644000175000017500000002161707704772224032343 0ustar tonytony0#0#I *H #:#60#20#. *H ##0#0@ *H  00' *H  0K 4` eUΥhF5Q O>+5o~?M"#@:FAct[k:ю%q:fX}JioE+1#;u1}!FKA^Ha\=x -(%X-so'8YP|§a"Oms〟wiR-Q?)ZY`6)˂4/xqb(c-.7U&(7!Zľ۪:y9sIo3lurUgv0WmYlgTaL_BGAb0Ojݐv֝èYF8fGY 3A42qgq Q{C5shRL1D^ܺrV$^^3Iƶx9Sh u੎3ߔi޷t+@H^1!8]q|>B"1<0 *H  1DH10# *H  1]=S$v>Ӳ΄w0 *H  0 *H  00~M 0 *H80n1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10U Transient CA0 020228175319Z 030228175254Z0o1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10U Nilrem Sehguh0%0*H>0\k5ϣbx&:Qb3xI/d>;T<=I¶hL0YCOG 8#K&M!jtL\A9icf u _cOula =f04ހS 9y3]E}%?<J-2nП]^jb9@Pi6'>ARWK?YE0 >-+ΥÐvBsP"R82WB(͢*c/3my f;ԜT8\V\MP_1ORz;UA Qkqhs\فն4 !<򸃘sAghh}p g~}x7P(_'. &T,LNA |z}꼀`tިA}VP\ۆE<6ѫsK- K_vH{p$mNײ>G6נ#]CҊ)3^]%:080U0U 0CqA0U# 0 :&uY[0 *H8/0, |O*Z'tI;lj*_{20$+ ]b1%0# *H  1]=S$v>Ӳ΄w0 *H  0 *H  00MJb0  *H 0n1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10U Transient CA0 020228175240Z 030228175240Z0n1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10U Transient CA00  *H 0y~7=z[CSFѧ;[̧b/LWrue{Ö`ʏB]9M# ʤ , };fJT8+fRzFve?필ӧ6040U0U00U Ֆ;0  *H El'!#\R>q`ei΂Ea+\sg?9ԾNADxwlMG${e[q{l})HY#X` <!Z YD]'U,t0 *H  0 *H  00~M0 *H80n1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10U Transient CA0 020228175316Z 030228175254Z0o1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10U Merlin Hughes0%0*H>0\k5ϣbx&:Qb3xI/d>;T<=I¶hL0YCOG 8#K&M!jtL\A9icf u _cOula =f04ހS 9y3]E}%?<J-2nП]^jb9@Pi6'>ARWK?YE0 >-+ΥÐvBsP"R82WB(͢*c/3my f;ԜT8\V\MP_1ORz;UA Qkqhs\فն4 !<򸃘sAghh}p g~}x7P(_'. R[YB 薪Su{Ü,{<#1&r Mͫ7#Ѵf<4$ LYɝuOؕ8 ZYkʣih5{%>*x׳9D:080U0U @0_ւ0U# 0 :&uY[0 *H8/0,8`XfĎ|+UqdSTǿhښqM1%0# *H  1w>D]'U,t0 *H  0 *H  00MJb0  *H 0n1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10U Transient CA0 020228175240Z 030228175240Z0n1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10U Transient CA00  *H 0y~7=z[CSFѧ;[̧b/LWrue{Ö`ʏB]9M# ʤ , };fJT8+fRzFve?필ӧ6040U0U00U Ֆ;0  *H El'!#\R>q`ei΂Ea+\sg?9ԾNADxwT ?]/ ThbXdjz;V7OʋV)f~,WH!}' kٓ|qRpA}R4raFozk@!%֏ݨ\r*$8 wtr4!%9sAbߴCFK6Ιvg}EElcKia*2u ,e]];D{4%x<P\uF~Ip\9?Ukp$: vIopdjINm;(8y.^d?SPߦ|o8IXQ1;ȷHSeJ+]_$ #fYDImk.jx۶9=',tk~``!G-3 Y1<0 *H  1RSA0# *H  1#wl6i{A_l.,0 *H  0 *H  00Ma>0  *H 0n1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10U Transient CA0 020228175246Z 030228175240Z0o1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10U Merlin Hughes00  *H 0]5,[4UAl:V }y f黋 @.m=xja?29K Y#\1_b>xx*t>R?Ir`%&T0yq'8eskMuDqxc:080U0U Qdcr0U# 0 Ֆ;0  *H _1ǖ%n6湚ь(fgS<1 m蓈Nƚf9Nk*"h氡)ʍҥ^5/Oad9/$S(2.\>LzQi񰻊@~b@s\1%0# *H  1#wl6i{A_l.,0 *H  0 *H  00MJb0  *H 0n1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10U Transient CA0 020228175240Z 030228175240Z0n1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10U Transient CA00  *H 0y~7=z[CSFѧ;[̧b/LWrue{Ö`ʏB]9M# ʤ , };fJT8+fRzFve?필ӧ6040U0U00U Ֆ;0  *H El'!#\R>q`ei΂Ea+\sg?9ԾNADxwLs9*v K?|Fǣ. ;Wv[=쮗kPČ_?j(bH6])b@ 8a1 ;RJB7"g:^70*jXX:YaH'"9sƑheo#6mp;1<0 *H  1DSA0# *H  1i7sU@7!yۅMN0 *H  m0i *H  YU0Q0Mߐ20 *H80n1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10U Transient CA0 020228175258Z 030228175254Z0o1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10U Merlin Hughes00+*H80kYK-)tLXPg,WRA`\C{rHTn+ QYF'2H f!ZTS}#Kw_VCJ̑k|LRQy;>xx1U4dhEpQ3]ux]<))f9L7'Jeئ}mse+pÖmM7 1Z^F>dyNC7o;lҶWɪ:tu[NZT(kU]|^cfo y8!v9NUWH'LOS8 !WV"GU]rrq://ꫬ1L^:080U0U w0ȟY0U# 0 :&uY[0 *H810.R[A8_p\rnyQΪСkU|pQF$1%0# *H  1i7sU@7!yۅMN0 *H  0 *H  00MJb0  *H 0n1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10U Transient CA0 020228175240Z 030228175240Z0n1 0 UIE10 UDublin1$0"U Baltimore Technologies Ltd.10U X/Secure10U Transient CA00  *H 0y~7=z[CSFѧ;[̧b/LWrue{Ö`ʏB]9M# ʤ , };fJT8+fRzFve?필ӧ6040U0U00U Ֆ;0  *H El'!#\R>q`ei΂Ea+\sg?9ԾNADxw spade shovel Dig PLC, 1 First Ave, Dublin 1, Ireland bm9uY2U=

plygl2uMNc+jYtAZeKCZxPsmqa2z8DrOUa7L455iszN4SdPnL+LsZD47VJayvQY8 6D1J5arkwrbUzmhMAjBZsENPBgffRwwEBTjoq+gjSyZNIbxqsqnJdEyUElzn4kGE whECkJGnOaScacpjZg11h+gd0iBfY091bGHrCZrvr/8=

9jJXQijNovoq6QUBFcEUYwUvyTM= PerUZgMEMDTegMdTBRG9DPY5EHmwDxwzladdRcfvfdfU/9wlPzz5BUotMm730J9d lF6avWr929fzYsnIOUDeUOJpltXmrTYnvz5Bi6yuUu6bVwSfv7u4S+I/EM9ZB+eY 3fdF5TAMHD4tK86lw5APDrN2QnO1UMCwIvjOFatSOI0= Ulu6B1lCwajtIBnolqqgU+R1oxfye63DnI/iLM/Oe+Y8I/LMMaEmo3LmCU30m82r NyOUqgfnm97S0bT8ZhI8gvw0EyQJ87vhlUz4WcmddU/YlTi3gJHUClr2olmBmRCt m2vKo/BpoLGJ0Wg1eyWfo54+gCqbeNez/DmBGcBEEhM=
MIIDvjCCA36gAwIBAgIGAOxN39MIMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDIyODE3NTMxNloXDTAzMDIyODE3NTI1NFowbzELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl czCCAiUwggGaBgcqhkjOPgIBMIIBjQKBgQCmXKCXa4w1z6Ni0Bl4oJnE+yaprbPw Os5RrsvjnmKzM3hJ0+cv4uxkPjtUlrK9BjzoPUnlquTCttTOaEwCMFmwQ08GB99H DAQFOOir6CNLJk0hvGqyqcl0TJQSXOfiQYTCEQKQkac5pJxpymNmDXWH6B3SIF9j T3VsYesJmu+v/wKBgD3q1GYDBDA03oDHUwURvQz2ORB5sA8cM5WnXUXH733X1P/c JT88+QVKLTJu99CfXZRemr1q/dvX82LJyDlA3lDiaZbV5q02J78+QYusrlLum1cE n7+7uEviPxDPWQfnmN33ReUwDBw+LSvOpcOQDw6zdkJztVDAsCL4zhWrUjiNAhUA 9jJXQijNovoq6QUBFcEUYwUvyTMCbQCs/HkLusCqHmY71JxUOFzy5fuWkPpWXJzx qU3oz1BfMZtPUqjpBnqU97M7VUEg+5pRG2txaHP8XNmB1bY0DCE88riDmHP7HqZB Z2gbaH2LxXDQDayb5GcPfn38eDcWvVAaKP9fJ8wG5RUu3AoDgYQAAoGAUlu6B1lC wajtIBnolqqgU+R1oxfye63DnI/iLM/Oe+Y8I/LMMaEmo3LmCU30m82rNyOUqgfn m97S0bT8ZhI8gvw0EyQJ87vhlUz4WcmddU/YlTi3gJHUClr2olmBmRCtm2vKo/Bp oLGJ0Wg1eyWfo54+gCqbeNez/DmBGcBEEhOjOjA4MA4GA1UdDwEB/wQEAwIDCDAR BgNVHQ4ECgQIgUAwB+9f1oIwEwYDVR0jBAwwCoAIgjqisiZ1WVswCQYHKoZIzjgE AwMvADAsAhQ41mCUsFhmxI58tytV8XEVZOCuUwIUVMe/HbUAH5PJ7aRoCNqa3fCI cU0=
MIIDvjCCA36gAwIBAgIGAOxN3+EMMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDIyODE3NTMxOVoXDTAzMDIyODE3NTI1NFowbzELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTmlscmVtIFNlaGd1 aDCCAiUwggGaBgcqhkjOPgIBMIIBjQKBgQCmXKCXa4w1z6Ni0Bl4oJnE+yaprbPw Os5RrsvjnmKzM3hJ0+cv4uxkPjtUlrK9BjzoPUnlquTCttTOaEwCMFmwQ08GB99H DAQFOOir6CNLJk0hvGqyqcl0TJQSXOfiQYTCEQKQkac5pJxpymNmDXWH6B3SIF9j T3VsYesJmu+v/wKBgD3q1GYDBDA03oDHUwURvQz2ORB5sA8cM5WnXUXH733X1P/c JT88+QVKLTJu99CfXZRemr1q/dvX82LJyDlA3lDiaZbV5q02J78+QYusrlLum1cE n7+7uEviPxDPWQfnmN33ReUwDBw+LSvOpcOQDw6zdkJztVDAsCL4zhWrUjiNAhUA 9jJXQijNovoq6QUBFcEUYwUvyTMCbQCs/HkLusCqHmY71JxUOFzy5fuWkPpWXJzx qU3oz1BfMZtPUqjpBnqU97M7VUEg+5pRG2txaHP8XNmB1bY0DCE88riDmHP7HqZB Z2gbaH2LxXDQDayb5GcPfn38eDcWvVAaKP9fJ8wG5RUu3AoDgYQAAoGAGSYT19Pb VCxMt06cAP7zQZ6AC5eXp3zeAweIevV96ryA1mB03qhB9X2lVowAUOFc24aVRTz7 wRoRjNQ20atzSy21C7yXDkvZ4uxfdrpIqpIVrI28e7XL+6CrhnAk621OvdeyEz5H orA21hPXoCNdnUPG5Ib20oopM87ptF5dwiWjOjA4MA4GA1UdDwEB/wQEAwIDCDAR BgNVHQ4ECgQIiDCSQ3FB/oEwEwYDVR0jBAwwCoAIgjqisiZ1WVswCQYHKoZIzjgE AwMvADAsAhQMtZ98TyqVkVqUJ3RJqaU7l2xqKgIUX997qRqeMjAkK88NHeNd95/2 Yos=
5jIlxXZGhx8vUNbL0ZvdRry6mPapX8qLYlDgy3tE6nRbnBRWACviYQAXBqvDfn1R TKmBWZ5NoJobM8lXWOk2nNQIuSQojcFYRuvcWU7DffDVX7dUCAVRJp6PS/5V1IHR JJ2WBagWSW1lFW9mqjfe0ZflEZGYI3/5kUYQIpbMvEuXoF8129VGiKalZsCVTRxd /IsdT8x/7L57GlGq0OzCMI5zG3QrBV7wUOoqBu5SxS8QUvUPucH8hsD4Bq4BwVEa GlUVAj7H3HYYo7fviTO4i2lTMunGW9rcJVnKXjDM/Mds3oM4zbBo/Ao3m3rmpUUz AwSe6ofh6ML418+cyCaRUoVQOlG+VwkHEKUiYYGhsKY=
././@LongLink0000000000000000000000000000022300000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-data-tripledes-cbc-rsa-oaep-mgf1p-sha256.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encryp0000644000175000017500000000440607704772224032542 0ustar tonytony MTIzNDU2Nzg= MIICkjCCAfugAwIBAgIGAOxN32E+MA0GCSqGSIb3DQEBBQUAMG4xCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJDAiBgNVBAoTG0JhbHRpbW9yZSBUZWNobm9s b2dpZXMgTHRkLjERMA8GA1UECxMIWC9TZWN1cmUxFTATBgNVBAMTDFRyYW5zaWVu dCBDQTAeFw0wMjAyMjgxNzUyNDZaFw0wMzAyMjgxNzUyNDBaMG8xCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJDAiBgNVBAoTG0JhbHRpbW9yZSBUZWNobm9s b2dpZXMgTHRkLjERMA8GA1UECxMIWC9TZWN1cmUxFjAUBgNVBAMTDU1lcmxpbiBI dWdoZXMwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAORdNSxbNFWlQeNsOlYJ 9gN9eZD+rguRqKhmhOm7i63VDd5ALm2APXhqAmGBPzLN5jlL9g2XALK5WSO4XKjJ McVfYg4+nPuOeHgqdD4HUgf19j/6SaTMcmDFJQMmx1Qw+Aakq3mGcSfvOJcBZctz a50VucfCGL1NdfBEcaL3BnhjAgMBAAGjOjA4MA4GA1UdDwEB/wQEAwIFoDARBgNV HQ4ECgQIjFG0ZGNyvNswEwYDVR0jBAwwCoAIhJXVlhr6O4wwDQYJKoZIhvcNAQEF BQADgYEAXzG7x5aCJYRusTbmuZqhidGM5iiA9+RmZ4JTPDEgbeiTiJROxpr+ZjnA TmsDKrCpqNUiHWjmsKEArYQp8R/KjdKl/pVe3jUvTxb0YZ+li/7k0GQ5LyRT/K4c 2SgyLlyBPhpMq+z3g4P2egVRaZbxsLuKQILf7MIV/X5iAEBzu1w= 1SVctZA/RB6vVjsu5NYTxowdvsViJJ1skDXX09RmNU3YlCuPpSqWWhCU5u5ILfr9 6AFcascXbdFyEZ9tjDhK8Nid2MEqkR/Mc9zFHf7mPMnO7C8bRggkjjdILSIF/Ft7 FXzm/DFP50IF3zPe/n5jy2Nk8uRvTmKUDcnoV6qnUgY= QOImekuU44UeCmVaMma9bCT5h5a6mWXDSndTB81jvHw= libxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/rsa.p80000644000175000017500000000117307704772224032353 0ustar tonytony0w0  *H a0]]5,[4UAl:V }y f黋 @.m=xja?29K Y#\1_b>xx*t>R?Ir`%&T0yq'8eskMuDqxcSUީ8[Cg jVT2k d]Ce S] &2:;~`!+T)){ ! d]#6S[A@0fЊdwT|JӭQҫ{8->Qkxè:hoc4@uؙT "G:#j!@9h0wS!k~~ x$FheEp?@bq>8(W$8>P>]fkAZ x/N~W'Z@ "J././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encsig-hmac-sha256-rsa-1_5.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encsig0000644000175000017500000000443007704772224032507 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= 9XBpYbFplNqqF7U/QtCHYE20U7oIxcyCr0L19MlenNo= MIICkjCCAfugAwIBAgIGAOxN32E+MA0GCSqGSIb3DQEBBQUAMG4xCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJDAiBgNVBAoTG0JhbHRpbW9yZSBUZWNobm9s b2dpZXMgTHRkLjERMA8GA1UECxMIWC9TZWN1cmUxFTATBgNVBAMTDFRyYW5zaWVu dCBDQTAeFw0wMjAyMjgxNzUyNDZaFw0wMzAyMjgxNzUyNDBaMG8xCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJDAiBgNVBAoTG0JhbHRpbW9yZSBUZWNobm9s b2dpZXMgTHRkLjERMA8GA1UECxMIWC9TZWN1cmUxFjAUBgNVBAMTDU1lcmxpbiBI dWdoZXMwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAORdNSxbNFWlQeNsOlYJ 9gN9eZD+rguRqKhmhOm7i63VDd5ALm2APXhqAmGBPzLN5jlL9g2XALK5WSO4XKjJ McVfYg4+nPuOeHgqdD4HUgf19j/6SaTMcmDFJQMmx1Qw+Aakq3mGcSfvOJcBZctz a50VucfCGL1NdfBEcaL3BnhjAgMBAAGjOjA4MA4GA1UdDwEB/wQEAwIFoDARBgNV HQ4ECgQIjFG0ZGNyvNswEwYDVR0jBAwwCoAIhJXVlhr6O4wwDQYJKoZIhvcNAQEF BQADgYEAXzG7x5aCJYRusTbmuZqhidGM5iiA9+RmZ4JTPDEgbeiTiJROxpr+ZjnA TmsDKrCpqNUiHWjmsKEArYQp8R/KjdKl/pVe3jUvTxb0YZ+li/7k0GQ5LyRT/K4c 2SgyLlyBPhpMq+z3g4P2egVRaZbxsLuKQILf7MIV/X5iAEBzu1w= BRhPOKN/KLCih2Q2RoxQiaV0s1FfpOM+kisl9MwRSPow5CyX91rBVfoWpP/Qq1T3 Rj/f0gVoJyE008uLic4X/S4spnudlOzTkVB6bUzoBt4j+z4hEq/cIfHqVdEJ+lN0 iu1sJk3k6ESl22OWEqQB7Rl5sAdhFPOqXsnLUNWmqA8= ././@LongLink0000000000000000000000000000020500000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-element-aes128-cbc-rsa-1_5.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encryp0000644000175000017500000000553707704772224032550 0ustar tonytony spade shovel Dig PLC, 1 First Ave, Dublin 1, Ireland MIICkjCCAfugAwIBAgIGAOxN32E+MA0GCSqGSIb3DQEBBQUAMG4xCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJDAiBgNVBAoTG0JhbHRpbW9yZSBUZWNobm9s b2dpZXMgTHRkLjERMA8GA1UECxMIWC9TZWN1cmUxFTATBgNVBAMTDFRyYW5zaWVu dCBDQTAeFw0wMjAyMjgxNzUyNDZaFw0wMzAyMjgxNzUyNDBaMG8xCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJDAiBgNVBAoTG0JhbHRpbW9yZSBUZWNobm9s b2dpZXMgTHRkLjERMA8GA1UECxMIWC9TZWN1cmUxFjAUBgNVBAMTDU1lcmxpbiBI dWdoZXMwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAORdNSxbNFWlQeNsOlYJ 9gN9eZD+rguRqKhmhOm7i63VDd5ALm2APXhqAmGBPzLN5jlL9g2XALK5WSO4XKjJ McVfYg4+nPuOeHgqdD4HUgf19j/6SaTMcmDFJQMmx1Qw+Aakq3mGcSfvOJcBZctz a50VucfCGL1NdfBEcaL3BnhjAgMBAAGjOjA4MA4GA1UdDwEB/wQEAwIFoDARBgNV HQ4ECgQIjFG0ZGNyvNswEwYDVR0jBAwwCoAIhJXVlhr6O4wwDQYJKoZIhvcNAQEF BQADgYEAXzG7x5aCJYRusTbmuZqhidGM5iiA9+RmZ4JTPDEgbeiTiJROxpr+ZjnA TmsDKrCpqNUiHWjmsKEArYQp8R/KjdKl/pVe3jUvTxb0YZ+li/7k0GQ5LyRT/K4c 2SgyLlyBPhpMq+z3g4P2egVRaZbxsLuKQILf7MIV/X5iAEBzu1w= heZshNX5m7arS3OmR72+8WNCMMpznxE41dLWkgd6XJpzl+IN2xuijAf4YPEjjJmZ nt9PlO3/hiHl0Cvpg5vMR6AhvL49BvCz9JCeMG6x3MHBiKbRNhyEq2rX7o1GdJhC 5cm35Q/ZDKV9DHG8jWmPcOb8yKU9NYo2LJKDb3YHOJY= 0wkECpTy60/FDwbVM4zgd9qJVjR4h0q4PLm5pyyIxAuhbEh0art03yEikmbWBt2H 7qOk2G9iufUdwwqNPuZV5Qw5Rg2FMvTx234lDERGn5p+hhjOTcss5JF9QDzgdiec KABX3vbCESi/f3uwQ8BYDT+6SnxTR+xtcNv5xhbUCIFk/TaenSWx6p6fntTwTl1e lpwnI0EtM1yf4a9tBiH9PNd36BUv2rvSi4cZvJqSB3ZKvGtuwwyRzOzlzl259d1u QuoYysTBEAHw/WIop8eAexU9PUv7UbTkQAQag1yStda+GepVdpXEpu4hcxXQcvfs 9AQgkAgh4JKrnY4Bhz2B/e4CHHfbEedDOi+FVYlZuLn0CzrKMnM+1nUmqxJVWHz7 hytidpuqNRw3gcMkYvgH6g== ././@LongLink0000000000000000000000000000022100000000000011560 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-element-aes256-cbc-retrieved-kw-aes256.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encryp0000644000175000017500000000335307704772224032542 0ustar tonytony spade shovel Dig PLC, 1 First Ave, Dublin 1, Ireland cudR6Hg0xqhrOjbvQz4C/WOdHbcB7Duc+xFxbObkfkW6jXweDOf8Tq87FPbj5bby oCLbWqq3ap/zx/gN8Xv3Fj6fYUz3dIb1wzXy7B0/3me7i4fBHyGropflLi7iEag2 WU7aGJ0CA9/jQr6Td2qhH0CDU47QN9eK/PVMPPfLX1D1A90uK32wPn+SCysE58Q3 rCi7Jwo+OsrxT0qqjP82T3FjVi0i/dsnPb5GQWLE3/y7OsIuknuMRO4mWma+bO/m aAN9JNeom5Kn3IKHCK2+kyx+LsGo2daKxF7RF9QqlaA/imsMS4trRjZjYhgfgm96 kb1l4AI7VZcfRXwYdzLqKNHty6ZxbSQBMeEca0mEuIbor7IH34641a/BuFME/BLm MoVaLUCE0rg1e1U0S18UCg== jed bsL63D0hPN6EOyzdgfEmKsAAvoJiGM+Wp9a9KZM92IKdl7s3YSntRg== ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encsig-hmac-sha256-dh.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encsig0000644000175000017500000001253007704772224032507 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= 255LFQdP+eAK2aeuuLnz10pmaw4WEYb6TZa3B6H4z8c= bm9uY2U=

plygl2uMNc+jYtAZeKCZxPsmqa2z8DrOUa7L455iszN4SdPnL+LsZD47VJayvQY8 6D1J5arkwrbUzmhMAjBZsENPBgffRwwEBTjoq+gjSyZNIbxqsqnJdEyUElzn4kGE whECkJGnOaScacpjZg11h+gd0iBfY091bGHrCZrvr/8=

9jJXQijNovoq6QUBFcEUYwUvyTM= PerUZgMEMDTegMdTBRG9DPY5EHmwDxwzladdRcfvfdfU/9wlPzz5BUotMm730J9d lF6avWr929fzYsnIOUDeUOJpltXmrTYnvz5Bi6yuUu6bVwSfv7u4S+I/EM9ZB+eY 3fdF5TAMHD4tK86lw5APDrN2QnO1UMCwIvjOFatSOI0= Ulu6B1lCwajtIBnolqqgU+R1oxfye63DnI/iLM/Oe+Y8I/LMMaEmo3LmCU30m82r NyOUqgfnm97S0bT8ZhI8gvw0EyQJ87vhlUz4WcmddU/YlTi3gJHUClr2olmBmRCt m2vKo/BpoLGJ0Wg1eyWfo54+gCqbeNez/DmBGcBEEhM=
MIIDvjCCA36gAwIBAgIGAOxN39MIMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDIyODE3NTMxNloXDTAzMDIyODE3NTI1NFowbzELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl czCCAiUwggGaBgcqhkjOPgIBMIIBjQKBgQCmXKCXa4w1z6Ni0Bl4oJnE+yaprbPw Os5RrsvjnmKzM3hJ0+cv4uxkPjtUlrK9BjzoPUnlquTCttTOaEwCMFmwQ08GB99H DAQFOOir6CNLJk0hvGqyqcl0TJQSXOfiQYTCEQKQkac5pJxpymNmDXWH6B3SIF9j T3VsYesJmu+v/wKBgD3q1GYDBDA03oDHUwURvQz2ORB5sA8cM5WnXUXH733X1P/c JT88+QVKLTJu99CfXZRemr1q/dvX82LJyDlA3lDiaZbV5q02J78+QYusrlLum1cE n7+7uEviPxDPWQfnmN33ReUwDBw+LSvOpcOQDw6zdkJztVDAsCL4zhWrUjiNAhUA 9jJXQijNovoq6QUBFcEUYwUvyTMCbQCs/HkLusCqHmY71JxUOFzy5fuWkPpWXJzx qU3oz1BfMZtPUqjpBnqU97M7VUEg+5pRG2txaHP8XNmB1bY0DCE88riDmHP7HqZB Z2gbaH2LxXDQDayb5GcPfn38eDcWvVAaKP9fJ8wG5RUu3AoDgYQAAoGAUlu6B1lC wajtIBnolqqgU+R1oxfye63DnI/iLM/Oe+Y8I/LMMaEmo3LmCU30m82rNyOUqgfn m97S0bT8ZhI8gvw0EyQJ87vhlUz4WcmddU/YlTi3gJHUClr2olmBmRCtm2vKo/Bp oLGJ0Wg1eyWfo54+gCqbeNez/DmBGcBEEhOjOjA4MA4GA1UdDwEB/wQEAwIDCDAR BgNVHQ4ECgQIgUAwB+9f1oIwEwYDVR0jBAwwCoAIgjqisiZ1WVswCQYHKoZIzjgE AwMvADAsAhQ41mCUsFhmxI58tytV8XEVZOCuUwIUVMe/HbUAH5PJ7aRoCNqa3fCI cU0=
MIIDvjCCA36gAwIBAgIGAOxN3+EMMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDIyODE3NTMxOVoXDTAzMDIyODE3NTI1NFowbzELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTmlscmVtIFNlaGd1 aDCCAiUwggGaBgcqhkjOPgIBMIIBjQKBgQCmXKCXa4w1z6Ni0Bl4oJnE+yaprbPw Os5RrsvjnmKzM3hJ0+cv4uxkPjtUlrK9BjzoPUnlquTCttTOaEwCMFmwQ08GB99H DAQFOOir6CNLJk0hvGqyqcl0TJQSXOfiQYTCEQKQkac5pJxpymNmDXWH6B3SIF9j T3VsYesJmu+v/wKBgD3q1GYDBDA03oDHUwURvQz2ORB5sA8cM5WnXUXH733X1P/c JT88+QVKLTJu99CfXZRemr1q/dvX82LJyDlA3lDiaZbV5q02J78+QYusrlLum1cE n7+7uEviPxDPWQfnmN33ReUwDBw+LSvOpcOQDw6zdkJztVDAsCL4zhWrUjiNAhUA 9jJXQijNovoq6QUBFcEUYwUvyTMCbQCs/HkLusCqHmY71JxUOFzy5fuWkPpWXJzx qU3oz1BfMZtPUqjpBnqU97M7VUEg+5pRG2txaHP8XNmB1bY0DCE88riDmHP7HqZB Z2gbaH2LxXDQDayb5GcPfn38eDcWvVAaKP9fJ8wG5RUu3AoDgYQAAoGAGSYT19Pb VCxMt06cAP7zQZ6AC5eXp3zeAweIevV96ryA1mB03qhB9X2lVowAUOFc24aVRTz7 wRoRjNQ20atzSy21C7yXDkvZ4uxfdrpIqpIVrI28e7XL+6CrhnAk621OvdeyEz5H orA21hPXoCNdnUPG5Ib20oopM87ptF5dwiWjOjA4MA4GA1UdDwEB/wQEAwIDCDAR BgNVHQ4ECgQIiDCSQ3FB/oEwEwYDVR0jBAwwCoAIgjqisiZ1WVswCQYHKoZIzjgE AwMvADAsAhQMtZ98TyqVkVqUJ3RJqaU7l2xqKgIUX997qRqeMjAkK88NHeNd95/2 Yos=
libxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/dsa.p80000644000175000017500000000051607704772224032335 0ustar tonytony0J0+*H80kYK-)tLXPg,WRA`\C{rHTn+ QYF'2H f!ZTS}#Kw_VCJ̑k|LRQy;>xx1U4dhEpQ3]ux]<))f9L7'Jeئ}mse+pÖmM7 1Z^F>dyNC7o;lҶWɪ:tuRVYsy飱 e././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encsig-sha512-hmac-sha512-kw-aes256.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encsig0000644000175000017500000000222307704772224032505 0ustar tonytony c8+KT9+qCSbNpdZm7/dp9Mv/lgF51ATycY0Ttz/0bw2p5nvnmeEgQpIPw5HhVJ9Ku6dDf0RKVVR/CsYvPGfnEg== zB8ZUo9bQxzxnxW2aZ217eu//1e5xHB6RlfEOFOlx1l5PIhadKAlQo0z1D9B2HVU Kj4StSnlUsrvDo2BxgiAoA== jed tPCC89jQShB+WDINCdRfKgf8wTlAx8xRXD73RmEHPBfix8zS1N82KQ== ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/plaintext.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/plaint0000644000175000017500000000114707704772224032530 0ustar tonytony spade shovel Dig PLC, 1 First Ave, Dublin 1, Ireland Dig PLC, 1 First Ave, Dublin 1, Ireland Foo B Baz 1234 567890 12345 ././@LongLink0000000000000000000000000000022400000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-element-aes256-cbc-kw-aes256-dh-ripemd160.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encryp0000644000175000017500000001535407704772224032546 0ustar tonytony spade shovel Dig PLC, 1 First Ave, Dublin 1, Ireland bm9uY2U=

plygl2uMNc+jYtAZeKCZxPsmqa2z8DrOUa7L455iszN4SdPnL+LsZD47VJayvQY8 6D1J5arkwrbUzmhMAjBZsENPBgffRwwEBTjoq+gjSyZNIbxqsqnJdEyUElzn4kGE whECkJGnOaScacpjZg11h+gd0iBfY091bGHrCZrvr/8=

9jJXQijNovoq6QUBFcEUYwUvyTM= PerUZgMEMDTegMdTBRG9DPY5EHmwDxwzladdRcfvfdfU/9wlPzz5BUotMm730J9d lF6avWr929fzYsnIOUDeUOJpltXmrTYnvz5Bi6yuUu6bVwSfv7u4S+I/EM9ZB+eY 3fdF5TAMHD4tK86lw5APDrN2QnO1UMCwIvjOFatSOI0= Ulu6B1lCwajtIBnolqqgU+R1oxfye63DnI/iLM/Oe+Y8I/LMMaEmo3LmCU30m82r NyOUqgfnm97S0bT8ZhI8gvw0EyQJ87vhlUz4WcmddU/YlTi3gJHUClr2olmBmRCt m2vKo/BpoLGJ0Wg1eyWfo54+gCqbeNez/DmBGcBEEhM=
MIIDvjCCA36gAwIBAgIGAOxN39MIMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDIyODE3NTMxNloXDTAzMDIyODE3NTI1NFowbzELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl czCCAiUwggGaBgcqhkjOPgIBMIIBjQKBgQCmXKCXa4w1z6Ni0Bl4oJnE+yaprbPw Os5RrsvjnmKzM3hJ0+cv4uxkPjtUlrK9BjzoPUnlquTCttTOaEwCMFmwQ08GB99H DAQFOOir6CNLJk0hvGqyqcl0TJQSXOfiQYTCEQKQkac5pJxpymNmDXWH6B3SIF9j T3VsYesJmu+v/wKBgD3q1GYDBDA03oDHUwURvQz2ORB5sA8cM5WnXUXH733X1P/c JT88+QVKLTJu99CfXZRemr1q/dvX82LJyDlA3lDiaZbV5q02J78+QYusrlLum1cE n7+7uEviPxDPWQfnmN33ReUwDBw+LSvOpcOQDw6zdkJztVDAsCL4zhWrUjiNAhUA 9jJXQijNovoq6QUBFcEUYwUvyTMCbQCs/HkLusCqHmY71JxUOFzy5fuWkPpWXJzx qU3oz1BfMZtPUqjpBnqU97M7VUEg+5pRG2txaHP8XNmB1bY0DCE88riDmHP7HqZB Z2gbaH2LxXDQDayb5GcPfn38eDcWvVAaKP9fJ8wG5RUu3AoDgYQAAoGAUlu6B1lC wajtIBnolqqgU+R1oxfye63DnI/iLM/Oe+Y8I/LMMaEmo3LmCU30m82rNyOUqgfn m97S0bT8ZhI8gvw0EyQJ87vhlUz4WcmddU/YlTi3gJHUClr2olmBmRCtm2vKo/Bp oLGJ0Wg1eyWfo54+gCqbeNez/DmBGcBEEhOjOjA4MA4GA1UdDwEB/wQEAwIDCDAR BgNVHQ4ECgQIgUAwB+9f1oIwEwYDVR0jBAwwCoAIgjqisiZ1WVswCQYHKoZIzjgE AwMvADAsAhQ41mCUsFhmxI58tytV8XEVZOCuUwIUVMe/HbUAH5PJ7aRoCNqa3fCI cU0=
MIIDvjCCA36gAwIBAgIGAOxN3+EMMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDIyODE3NTMxOVoXDTAzMDIyODE3NTI1NFowbzELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTmlscmVtIFNlaGd1 aDCCAiUwggGaBgcqhkjOPgIBMIIBjQKBgQCmXKCXa4w1z6Ni0Bl4oJnE+yaprbPw Os5RrsvjnmKzM3hJ0+cv4uxkPjtUlrK9BjzoPUnlquTCttTOaEwCMFmwQ08GB99H DAQFOOir6CNLJk0hvGqyqcl0TJQSXOfiQYTCEQKQkac5pJxpymNmDXWH6B3SIF9j T3VsYesJmu+v/wKBgD3q1GYDBDA03oDHUwURvQz2ORB5sA8cM5WnXUXH733X1P/c JT88+QVKLTJu99CfXZRemr1q/dvX82LJyDlA3lDiaZbV5q02J78+QYusrlLum1cE n7+7uEviPxDPWQfnmN33ReUwDBw+LSvOpcOQDw6zdkJztVDAsCL4zhWrUjiNAhUA 9jJXQijNovoq6QUBFcEUYwUvyTMCbQCs/HkLusCqHmY71JxUOFzy5fuWkPpWXJzx qU3oz1BfMZtPUqjpBnqU97M7VUEg+5pRG2txaHP8XNmB1bY0DCE88riDmHP7HqZB Z2gbaH2LxXDQDayb5GcPfn38eDcWvVAaKP9fJ8wG5RUu3AoDgYQAAoGAGSYT19Pb VCxMt06cAP7zQZ6AC5eXp3zeAweIevV96ryA1mB03qhB9X2lVowAUOFc24aVRTz7 wRoRjNQ20atzSy21C7yXDkvZ4uxfdrpIqpIVrI28e7XL+6CrhnAk621OvdeyEz5H orA21hPXoCNdnUPG5Ib20oopM87ptF5dwiWjOjA4MA4GA1UdDwEB/wQEAwIDCDAR BgNVHQ4ECgQIiDCSQ3FB/oEwEwYDVR0jBAwwCoAIgjqisiZ1WVswCQYHKoZIzjgE AwMvADAsAhQMtZ98TyqVkVqUJ3RJqaU7l2xqKgIUX997qRqeMjAkK88NHeNd95/2 Yos=
qKWnCxVIlNvPEqBMxhCaY6z9NK0ZFCmRef1U5wbIMPaR/g2Zdw7VZg==
betMfG/VMLdwNGdkspCrJSo092PltInklQisKd8ImQgeFMzjn73OpXhK0KJtB9IB 1xGjENZ8Yzu625ehhCZGGFK4mp8DkIE7Sfw7O+5UEqprE/cGrWL0bbcz0U7X2Evh 4/9va6h+DHAzmVYW7bqsa0WkiHkELRq44ORdSzyPUIwpGUCsOWyThsYfIn4uhIHQ NJVTKPRHTb5H5lsxNtobSeXACSYAHk/BmJM99h4IQ9Gh7bCkhkmZsIvo/lNOW+6r xtvLqHfYw9XhJe7hL0Q5EluMCBZQJ/Vx2r5lTXzBeonlurpzNdRa+ClKSVRUwKYH Vjemr/o+Y4e4r8gD3TVP3auVuUCmi3XLpj4WjOsPDcekzZUgXA/xuJ+7jHXjOEOK RViMiwIk0cqOa6s0Qg63EQ==
././@LongLink0000000000000000000000000000021200000000000011560 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-element-tripledes-cbc-kw-aes128.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encryp0000644000175000017500000000303407704772224032536 0ustar tonytony spade shovel Dig PLC, 1 First Ave, Dublin 1, Ireland job dV45TUpJbidb9iKa34xj1WVtTZ036cnqvym2TBJWR5c= bmExbDyrUQtsGjNBU7TRpMhOC76O/wBDWVMQML43lWNP0xp7QwVPce1XdbB4AVUn xxAuJh18jOd9UzPTzrJHrKWvsWP8Xp1m/HL3A1XhOUe+MEcFyJB9fXazhDmyaSYU SvieaPXcpzKWiHhZE8RKUyAYw9nU9wf2SEUgCVRuRPfsrXg4Uyr83VTn84LPe9sL dd2hMj4jhgHL86b7PTYBWdtrYXq0Jwzptuw+TZ1C706BAZDYNAiSTdx3J17Ey3ex IeIFBBIq8D8Gp7XiH4UxiDB6rtA2czox6+FCvaIsrGFaaw9XdzvhiZ3HxYROjprz qiXcJlZzG6j8yRdpHSjsDkN3w7XjEgRODieGx110rBytZcwtqb0zc6JTZH5DzoJy ././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encsig-sha384-hmac-sha384-kw-aes192.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encsig0000644000175000017500000000214407704772224032507 0ustar tonytony bWetGDV3M5oEiecfEHILQxVQRa1XgdY37VH8eWi9yVVx7Rr7UNhk+v6Jk7sMNPoA iEjhOJoKiwsOBduxHj7bxILSsl6TLhNO3w/vlRcw9RZAe24HIxLRfhj4Xqsz1Orr jeb 19D633XVohP6UJvaVRAhJek+ahtM3gOiVs6nZyAasDEb+WCUQOcWZw== ././@LongLink0000000000000000000000000000020400000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-data-aes192-cbc-kw-aes256.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encryp0000644000175000017500000000147707704772224032547 0ustar tonytony jed 4AAgyi3M7xNdBimbQZKdGJLn3/cS4Yv8QKuA01+gUnY= 50lv94d/DFJirJXYOUXaBlrO+7gIXpx8cqH+G2xvE4mueoIxmGs8RH7FBXwjuMgf ././@LongLink0000000000000000000000000000020200000000000011557 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-content-aes256-cbc-prop.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encryp0000644000175000017500000000267507704772224032550 0ustar tonytony spade shovel Dig PLC, 1 First Ave, Dublin 1, Ireland jed H8n1OuEJFyUgUguDFF6ml8nRbA0IaDYgmtGelWT4V7CSz9q/AvtfxyMzUH+tQZ+F jyXh3otR1+V1+8EsevzEq5nUmNKl+wyxQmWaUvbvXpSwAJnlJdyvnP56JiXUBS+p C2KzlO9kk8l6awtuRd9Z6eVjngwTf7kNprmu5Bv0o+x7dcq96G8wGLvMThbs4uxk iIDK5+qGBzzIlFw3GG82MKmnVBveQw3LD52y76yBtoayuAJFJMnrXa0OEAaBRSI2 fjPNGJV3sCyKZDHqGlsQ4X+VvXzevLbBLkFy1xH9/zoUXo8cEaTvsIOBYu/Xn/CJ y/dpe/dvOqqji+9vFccAyrBHxHeYSonuFsxfpSDVC6Y= certifiable ././@LongLink0000000000000000000000000000020100000000000011556 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-element-aes192-cbc-ref.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encryp0000644000175000017500000000324707704772224032544 0ustar tonytony spade shovel Dig PLC, 1 First Ave, Dublin 1, Ireland jeb self::text()[parent::rep:CipherValue[@Id="example1"]] zih1MFU6Px1m2U1lSEIV9LUIsnb3SIWBfRHlRrOWKFFFcVvXiE6z3nCbkNYMuy1T nPwXDd9/BkOGiPuFT2jixN7Zowe2ANK1dZXKVjZ1+ACx+Kg17U+EMPEuq481OW7e wm0vnbur0L2lCXb4DP7c6sotV89W53v2MlaYqWHhlBO/zasqwhl6q/c/L/GdPUHH ovKZ+24ZWYktxCLEXMslIAysQ0UFBLolrtC/7XDgYY9s4UvbedgeqbrdnxQ4LiRn L+aKN1bnKF3KlWKCJFvVrRESriGPBfpasWA/A1LOK333a8LaOlS7RFamflfICk+t VqCspVnIs6vBBtrGLI5SsJS+rh1r42jI/h/ivELUOmUq1sZCFQvEhx7AiHi4/9SY LWcR4w3ZH3aqFL/XtAzKYQ== ././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/decryption-transform-except.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/decryp0000644000175000017500000000645107704772224032532 0ustar tonytony spade shovel Dig PLC, 1 First Ave, Dublin 1, Ireland jed cX6lnfgmvWuxyiQgNhzAq1lYggW2M5GziFgNBQju3xcnDqlzf5LSjeyBnbL0Q7ws 8XhySFCrdwIi5mVxyfdFkVrTlzQQ0viaqTDgi9PQRgZMOImGGWij3wbmf9XseHHt 6q8V7LPjMFQAnsLDQgKf4gzzOnhtKf15GfTEpGvUnNn2dLDxw+hDcD1N54/bjSQs uTiL7PgGQ5g4u4eaXRRLWeAGsIf5QgdQG3GLiOZIX1LJ5bREKgXeKrtJJI97xUX3 3vaF+tKRcSFBFIMjFrw271bFj4vvvQZfSS6xX+BKXHOUu8C4NH9Le8pA9o4NgCB8 tWA8W3iI5/BGEZve0Me9byvPHYjRXlbG+YqysVTmzfw= x3aR5pJ5pepFFH5ENv61pZG4pVwNKaM+H9oyY4qG6d8l/C0J1iGv6c8dyLp0YQ2k 5Oe9qba6preOZG1NZAYK2/6pu9RCon9vRJ9hVLDpeng= LuHrz9+WG7/c4Q81tFboNZg2cktWbZcRfp08XrmgKy1GDm9xSfTYCA==

imup6lmki4rAmUstKb/xdBRMWNtQ+pDN97ZnLA9X3lKbkEHtYFyjQ3uActgVSJ75 iVRuKxz4Cb5RzVm25EaKmKq8rif1MtBIi6jjDJxmIdNaEKG9zVTf9giJx1N9I0t3 oh1fAVZDSrzKzJGQ2WvDfIfFHdJMtB3C0VKGmLZR7Xk=

xDve3j7sEnh4rIzM5gK+5/gxxFU= NLugAf6IZJxo3BCOi5yrGEVwtlEzXcnndXhd0Tz38CnQKc4SEupm4PyP5TmLvK64 TDfOD7sno/W5oI1KZdimfW2c4r/6waNzZSvicMOWhLYY621Nn6njBc8VNwoxWpzC XhKm70b8+D4YZMn/eU5DN8dvhTv/bNK21FfJqjp033U= W7dOmH/vWqocVCiqaxj6soxVXfR8XpMdY2Zv4Amjr3n81geyOLb6IZ+l7MUbdp85 29DQzuoVTthVpB9X4JKCprZIzifOTM1PFflTBzjx7egJwJWAIVdWyiIPjke6Va+w uV2n4Rl/cgCvrXK5cTov5C/Bpaf6o+qrrDGFBLLZTF4=
././@LongLink0000000000000000000000000000020700000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-data-aes256-cbc-kw-tripledes.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encryp0000644000175000017500000000152607704772224032542 0ustar tonytony bob ZyJbVsjRM4MEsswwwHz57aUz1eMqZHuEIoEPGS47CcmLvhuCtlzWZ9S/WcVJZIpz Lp2ZWyJERT05icmHvWWbEtCCfmB2jvSlSclhS0oj3A3PU90aE6v+bFFQxrHw7VUd ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/decryption-transform.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/decryp0000644000175000017500000000554307704772224032533 0ustar tonytony spade shovel Dig PLC, 1 First Ave, Dublin 1, Ireland jed SE3HkQevYxzuN9LoMH3QIYHK0X7DBlobhiTbRucgKcTKt9DsUJIcd6JZV6lrw/4x YICyq6YM73IWpibspxgz/0chhvWem9sYZvWTuTtZgHzeY0Uri6bpXqBEn1YT0K6B chwfv1myfp91EmdPHU+shH6ZEyYkHJUMss58iIawIuVsIfpCO7xDKgfs/glnN3os epY0KvAMZSnwUAf42fQ3TlahLTR+B52AmdodwaCwQlwQwrC7RH0FtNiiLQA9SA2t //StKWcyHjswUCejfKLdjv6bK+WmBxmnNWtmI9DYkjJ6V5pYU1MVw+JG410O+gaa fnNWxlWa+BGwcTaz+KNrP8bIqli8IoJJgxXIUqfb734= wSvPYqTcpLfX2mKXibtsmm7FDu8N+/BObM0+bGaeXhk= O0VYUdslJ8t2EURD0T/v2nNrFQMo42vzvfAhooZrDbkuLbCj6/Hxmw==

imup6lmki4rAmUstKb/xdBRMWNtQ+pDN97ZnLA9X3lKbkEHtYFyjQ3uActgVSJ75 iVRuKxz4Cb5RzVm25EaKmKq8rif1MtBIi6jjDJxmIdNaEKG9zVTf9giJx1N9I0t3 oh1fAVZDSrzKzJGQ2WvDfIfFHdJMtB3C0VKGmLZR7Xk=

xDve3j7sEnh4rIzM5gK+5/gxxFU= NLugAf6IZJxo3BCOi5yrGEVwtlEzXcnndXhd0Tz38CnQKc4SEupm4PyP5TmLvK64 TDfOD7sno/W5oI1KZdimfW2c4r/6waNzZSvicMOWhLYY621Nn6njBc8VNwoxWpzC XhKm70b8+D4YZMn/eU5DN8dvhTv/bNK21FfJqjp033U= W7dOmH/vWqocVCiqaxj6soxVXfR8XpMdY2Zv4Amjr3n81geyOLb6IZ+l7MUbdp85 29DQzuoVTthVpB9X4JKCprZIzifOTM1PFflTBzjx7egJwJWAIVdWyiIPjke6Va+w uV2n4Rl/cgCvrXK5cTov5C/Bpaf6o+qrrDGFBLLZTF4=
././@LongLink0000000000000000000000000000020400000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encsig-hmac-sha256-rsa-oaep-mgf1p.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encsig0000644000175000017500000000476007704772224032515 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= 9XBpYbFplNqqF7U/QtCHYE20U7oIxcyCr0L19MlenNo= MTIzNDU2Nzg= MIICkjCCAfugAwIBAgIGAOxN32E+MA0GCSqGSIb3DQEBBQUAMG4xCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJDAiBgNVBAoTG0JhbHRpbW9yZSBUZWNobm9s b2dpZXMgTHRkLjERMA8GA1UECxMIWC9TZWN1cmUxFTATBgNVBAMTDFRyYW5zaWVu dCBDQTAeFw0wMjAyMjgxNzUyNDZaFw0wMzAyMjgxNzUyNDBaMG8xCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJDAiBgNVBAoTG0JhbHRpbW9yZSBUZWNobm9s b2dpZXMgTHRkLjERMA8GA1UECxMIWC9TZWN1cmUxFjAUBgNVBAMTDU1lcmxpbiBI dWdoZXMwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAORdNSxbNFWlQeNsOlYJ 9gN9eZD+rguRqKhmhOm7i63VDd5ALm2APXhqAmGBPzLN5jlL9g2XALK5WSO4XKjJ McVfYg4+nPuOeHgqdD4HUgf19j/6SaTMcmDFJQMmx1Qw+Aakq3mGcSfvOJcBZctz a50VucfCGL1NdfBEcaL3BnhjAgMBAAGjOjA4MA4GA1UdDwEB/wQEAwIFoDARBgNV HQ4ECgQIjFG0ZGNyvNswEwYDVR0jBAwwCoAIhJXVlhr6O4wwDQYJKoZIhvcNAQEF BQADgYEAXzG7x5aCJYRusTbmuZqhidGM5iiA9+RmZ4JTPDEgbeiTiJROxpr+ZjnA TmsDKrCpqNUiHWjmsKEArYQp8R/KjdKl/pVe3jUvTxb0YZ+li/7k0GQ5LyRT/K4c 2SgyLlyBPhpMq+z3g4P2egVRaZbxsLuKQILf7MIV/X5iAEBzu1w= NGIOL9UzhGwPYvVzbBxOGzxXfTIkzIsmtNSkWA03p64aS41vVA0sKWvcr/79Nf7T 6RdA61TmwOKa5GDUYRumEadC7Z0zKFDKcuN78iJzlj2WwVqr5vBx14X2BSVW+de1 UTmXRZFRosFOk9etvD7Lm1V+kqIxqSrod68G8gJvGrY= ././@LongLink0000000000000000000000000000021300000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/bad-encrypt-content-aes128-cbc-kw-aes192.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/bad-en0000644000175000017500000000311607704772224032365 0ustar tonytony spade shovel Dig PLC, 1 First Ave, Dublin 1, Ireland jeb JbjZH7Mq564oMybpvCHWYM/5ER3eFsAV YDYTxR+smxZDSVoXXEp3n6HzTgWqV7ZlG6I1lmEv7zLGZBF/o7eqe5QGT6L3DPNW geflA8vVJHxwliixWcvHCnNKQkx+Sw8YbIknCQyr4mqtXEmHhsie5XYTEyqgKLVP YdNXf56wLUTMEmBqq7cto9OrYcBWkrDcQQvHmDkHuG+Nom4m+623GsB0FNts6VyN sdGMwo4K0bEFReLL04l6It+cgLJ2q+LKdBoMQL59IAQmrwi0bkiqee2cLlDuGyQ1 KD9IQ1qtlJpvQujN4xNVWT00UjtWxmpSMID/Kue/AnXn7Cf8zw1ZZQitgh8uWOX2 uMy99F2YlxqIK1r+MeXHuZDNf75S8dFaKIKtHMf7ioA= ././@LongLink0000000000000000000000000000020000000000000011555 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-content-tripledes-cbc.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encryp0000644000175000017500000000224307704772224032537 0ustar tonytony spade shovel Dig PLC, 1 First Ave, Dublin 1, Ireland bob uchJT2QyzQe7BoBaDYKPR5BDgEW8jsJ3UOGEYz9EVrBKVztYfcu0xhif5Y9kqtyx DDa7woNcTyhwQDZh9jGr5hzkcjrsKfMjJw+PnKNZzc+KMW0z861L8sdhdl8TA+bt yudfaCEJaH4RdHABp+VMzL5CrXr5skvubolWs1KzUtqbRekkxucknzJmnqRY8yPp 4iBvVuvus+Bk0pj271NWu13CmHvdJRMMDSX30JMfsecW6mfdF5xjoFciL8VnemzJ qt0SUVjMzoeY0PnCdk09Ej2OZdj8AtkLPCEKeiBBD+coCf5F8WaLrPTRPgjoAtiN Wda+McaZPJje1IfoAKGTcg== libxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/dh0.p80000644000175000017500000000067507704772224032247 0ustar tonytony00*H>0\k5ϣbx&:Qb3xI/d>;T<=I¶hL0YCOG 8#K&M!jtL\A9icf u _cOula =f04ހS 9y3]E}%?<J-2nП]^jb9@Pi6'>ARWK?YE0 >-+ΥÐvBsP"R82WB(͢*c/3my f;ԜT8\V\MP_1ORz;UA Qkqhs\فն4 !<򸃘sAghh}p g~}x7P(_'. y04y.46䠽f././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-data-aes128-cbc.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encryp0000644000175000017500000000070107704772224032534 0ustar tonytony job QMpxhXq1DtBeyC9KfSaMQWrEtefe+e935gF/x62spvmL6IW0XeS0W4Kk31OgWzN0 libxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/dh1.p80000644000175000017500000000067507704772224032250 0ustar tonytony00*H>0\k5ϣbx&:Qb3xI/d>;T<=I¶hL0YCOG 8#K&M!jtL\A9icf u _cOula =f04ހS 9y3]E}%?<J-2nП]^jb9@Pi6'>ARWK?YE0 >-+ΥÐvBsP"R82WB(͢*c/3my f;ԜT8\V\MP_1ORz;UA Qkqhs\فն4 !<򸃘sAghh}p g~}x7P(_'. _1lkF5|͠././@LongLink0000000000000000000000000000020500000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encsig-hmac-sha256-kw-tripledes-dh.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encsig0000644000175000017500000001406107704772224032510 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= 9XBpYbFplNqqF7U/QtCHYE20U7oIxcyCr0L19MlenNo= bm9uY2U=

plygl2uMNc+jYtAZeKCZxPsmqa2z8DrOUa7L455iszN4SdPnL+LsZD47VJayvQY8 6D1J5arkwrbUzmhMAjBZsENPBgffRwwEBTjoq+gjSyZNIbxqsqnJdEyUElzn4kGE whECkJGnOaScacpjZg11h+gd0iBfY091bGHrCZrvr/8=

9jJXQijNovoq6QUBFcEUYwUvyTM= PerUZgMEMDTegMdTBRG9DPY5EHmwDxwzladdRcfvfdfU/9wlPzz5BUotMm730J9d lF6avWr929fzYsnIOUDeUOJpltXmrTYnvz5Bi6yuUu6bVwSfv7u4S+I/EM9ZB+eY 3fdF5TAMHD4tK86lw5APDrN2QnO1UMCwIvjOFatSOI0= Ulu6B1lCwajtIBnolqqgU+R1oxfye63DnI/iLM/Oe+Y8I/LMMaEmo3LmCU30m82r NyOUqgfnm97S0bT8ZhI8gvw0EyQJ87vhlUz4WcmddU/YlTi3gJHUClr2olmBmRCt m2vKo/BpoLGJ0Wg1eyWfo54+gCqbeNez/DmBGcBEEhM=
MIIDvjCCA36gAwIBAgIGAOxN39MIMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDIyODE3NTMxNloXDTAzMDIyODE3NTI1NFowbzELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl czCCAiUwggGaBgcqhkjOPgIBMIIBjQKBgQCmXKCXa4w1z6Ni0Bl4oJnE+yaprbPw Os5RrsvjnmKzM3hJ0+cv4uxkPjtUlrK9BjzoPUnlquTCttTOaEwCMFmwQ08GB99H DAQFOOir6CNLJk0hvGqyqcl0TJQSXOfiQYTCEQKQkac5pJxpymNmDXWH6B3SIF9j T3VsYesJmu+v/wKBgD3q1GYDBDA03oDHUwURvQz2ORB5sA8cM5WnXUXH733X1P/c JT88+QVKLTJu99CfXZRemr1q/dvX82LJyDlA3lDiaZbV5q02J78+QYusrlLum1cE n7+7uEviPxDPWQfnmN33ReUwDBw+LSvOpcOQDw6zdkJztVDAsCL4zhWrUjiNAhUA 9jJXQijNovoq6QUBFcEUYwUvyTMCbQCs/HkLusCqHmY71JxUOFzy5fuWkPpWXJzx qU3oz1BfMZtPUqjpBnqU97M7VUEg+5pRG2txaHP8XNmB1bY0DCE88riDmHP7HqZB Z2gbaH2LxXDQDayb5GcPfn38eDcWvVAaKP9fJ8wG5RUu3AoDgYQAAoGAUlu6B1lC wajtIBnolqqgU+R1oxfye63DnI/iLM/Oe+Y8I/LMMaEmo3LmCU30m82rNyOUqgfn m97S0bT8ZhI8gvw0EyQJ87vhlUz4WcmddU/YlTi3gJHUClr2olmBmRCtm2vKo/Bp oLGJ0Wg1eyWfo54+gCqbeNez/DmBGcBEEhOjOjA4MA4GA1UdDwEB/wQEAwIDCDAR BgNVHQ4ECgQIgUAwB+9f1oIwEwYDVR0jBAwwCoAIgjqisiZ1WVswCQYHKoZIzjgE AwMvADAsAhQ41mCUsFhmxI58tytV8XEVZOCuUwIUVMe/HbUAH5PJ7aRoCNqa3fCI cU0=
MIIDvjCCA36gAwIBAgIGAOxN3+EMMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDIyODE3NTMxOVoXDTAzMDIyODE3NTI1NFowbzELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTmlscmVtIFNlaGd1 aDCCAiUwggGaBgcqhkjOPgIBMIIBjQKBgQCmXKCXa4w1z6Ni0Bl4oJnE+yaprbPw Os5RrsvjnmKzM3hJ0+cv4uxkPjtUlrK9BjzoPUnlquTCttTOaEwCMFmwQ08GB99H DAQFOOir6CNLJk0hvGqyqcl0TJQSXOfiQYTCEQKQkac5pJxpymNmDXWH6B3SIF9j T3VsYesJmu+v/wKBgD3q1GYDBDA03oDHUwURvQz2ORB5sA8cM5WnXUXH733X1P/c JT88+QVKLTJu99CfXZRemr1q/dvX82LJyDlA3lDiaZbV5q02J78+QYusrlLum1cE n7+7uEviPxDPWQfnmN33ReUwDBw+LSvOpcOQDw6zdkJztVDAsCL4zhWrUjiNAhUA 9jJXQijNovoq6QUBFcEUYwUvyTMCbQCs/HkLusCqHmY71JxUOFzy5fuWkPpWXJzx qU3oz1BfMZtPUqjpBnqU97M7VUEg+5pRG2txaHP8XNmB1bY0DCE88riDmHP7HqZB Z2gbaH2LxXDQDayb5GcPfn38eDcWvVAaKP9fJ8wG5RUu3AoDgYQAAoGAGSYT19Pb VCxMt06cAP7zQZ6AC5eXp3zeAweIevV96ryA1mB03qhB9X2lVowAUOFc24aVRTz7 wRoRjNQ20atzSy21C7yXDkvZ4uxfdrpIqpIVrI28e7XL+6CrhnAk621OvdeyEz5H orA21hPXoCNdnUPG5Ib20oopM87ptF5dwiWjOjA4MA4GA1UdDwEB/wQEAwIDCDAR BgNVHQ4ECgQIiDCSQ3FB/oEwEwYDVR0jBAwwCoAIgjqisiZ1WVswCQYHKoZIzjgE AwMvADAsAhQMtZ98TyqVkVqUJ3RJqaU7l2xqKgIUX997qRqeMjAkK88NHeNd95/2 Yos=
2s+2ji8opL0SLKziiyNZ+mZ8Ibfu7cTwe4C0MmyarYDwGmsiRSqff8trHUwa+njZ
././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/plaintext.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/plaint0000644000175000017500000000002307704772224032520 0ustar tonytonytop secret message libxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/0000755000175000017500000000000012273503733032224 5ustar tonytony././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/Readme.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/R0000644000175000017500000000143607473417724032366 0ustar tonytonyGregor Karlinger 's exclusive c14n[1] examples[2] dumped in an XML Signature[3], thereby undoing their usefulness as standalone exclusive c14n examples, but simplifying their testing. All errors are my own. Version 2. . iaikTests.example?.xml - Gregor's examples (*) . signature.xml - Signature representing the examples . signature.tmpl - Signature template . c14n-?.txt - Intermediate c14n output (*) I ran perl -pi -e 's/foo.com/example.org/g' on the files. [1] http://www.w3.org/TR/2002/CR-xml-exc-c14n-20020212 [2] http://lists.w3.org/Archives/Public/w3c-ietf-xmldsig/2002JanMar/0259.html [3] http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/ Merlin Hughes Baltimore Technologies, Ltd. http://www.baltimore.com/ Thursday, April 18, 2002 ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/signature.tmpllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/s0000644000175000017500000001074307473417724032430 0ustar tonytony self::Parent or (parent::Parent and not(self::Child)) or self::GrandChild or parent::GrandChild self::Parent or (parent::Parent and not(self::Child)) or self::GrandChild or parent::GrandChild self::Parent or (parent::Parent and not(self::default:Child)) or self::GrandChild or parent::GrandChild self::Parent or (parent::Parent and not(self::default:Child)) or self::GrandChild or parent::GrandChild self::default:Parent or (parent::default:Parent and not(self::default:Child)) or self::ns1:GrandChild or parent::ns1:GrandChild or self::default:GrandChild or parent::default:GrandChild self::default:Parent or (parent::default:Parent and not(self::default:Child)) or self::ns1:GrandChild or parent::ns1:GrandChild or self::default:GrandChild or parent::default:GrandChild self::Parent or (parent::Parent and not(self::Child)) or self::ns1:GrandChild or parent::ns1:GrandChild self::Parent or (parent::Parent and not(self::Child)) or self::ns1:GrandChild or parent::ns1:GrandChild ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/c14n-7.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/c0000644000175000017500000000020007473417724032373 0ustar tonytony ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/signature.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/s0000644000175000017500000002133507473417724032427 0ustar tonytony self::Parent or (parent::Parent and not(self::Child)) or self::GrandChild or parent::GrandChild ayC7IAjulu8Ujs1l7IOkr09X9Lo= self::Parent or (parent::Parent and not(self::Child)) or self::GrandChild or parent::GrandChild tYcPYeXWUpBwCJKaPHpnT+oc7FQ= self::Parent or (parent::Parent and not(self::default:Child)) or self::GrandChild or parent::GrandChild 3/E99/WWurMo5RB3R9mPMi8TNek= self::Parent or (parent::Parent and not(self::default:Child)) or self::GrandChild or parent::GrandChild 3/E99/WWurMo5RB3R9mPMi8TNek= self::default:Parent or (parent::default:Parent and not(self::default:Child)) or self::ns1:GrandChild or parent::ns1:GrandChild or self::default:GrandChild or parent::default:GrandChild +9y4JHXxsQSJitQS+qdtKd7P5LE= self::default:Parent or (parent::default:Parent and not(self::default:Child)) or self::ns1:GrandChild or parent::ns1:GrandChild or self::default:GrandChild or parent::default:GrandChild HLOhaTrExlTg9ARVdOhHdm1DAKk= self::Parent or (parent::Parent and not(self::Child)) or self::ns1:GrandChild or parent::ns1:GrandChild C+g6VAAmq2rWCqmCfHpLn7BFB/c= self::Parent or (parent::Parent and not(self::Child)) or self::ns1:GrandChild or parent::ns1:GrandChild C+g6VAAmq2rWCqmCfHpLn7BFB/c= NkRZexf7MJKmcBEGqorF3JHl6ewlZcghwbRWg96ae7Ob9118U73HVw==

3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi 89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=

hDLcFK0GO/Hz1arxOOvsgM/VLyU= nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM 8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA= cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv +OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=
CN=Merlin Hughes,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE CN=Transient CA,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE 1017788370348 MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS 8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1 MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU 2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q 4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch 3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx 0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D 451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7 PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5 NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25 4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==
././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/c14n-8.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/c0000644000175000017500000001161407473417724032406 0ustar tonytony self::Parent or (parent::Parent and not(self::Child)) or self::GrandChild or parent::GrandChild ayC7IAjulu8Ujs1l7IOkr09X9Lo= self::Parent or (parent::Parent and not(self::Child)) or self::GrandChild or parent::GrandChild tYcPYeXWUpBwCJKaPHpnT+oc7FQ= self::Parent or (parent::Parent and not(self::default:Child)) or self::GrandChild or parent::GrandChild 3/E99/WWurMo5RB3R9mPMi8TNek= self::Parent or (parent::Parent and not(self::default:Child)) or self::GrandChild or parent::GrandChild 3/E99/WWurMo5RB3R9mPMi8TNek= self::default:Parent or (parent::default:Parent and not(self::default:Child)) or self::ns1:GrandChild or parent::ns1:GrandChild or self::default:GrandChild or parent::default:GrandChild +9y4JHXxsQSJitQS+qdtKd7P5LE= self::default:Parent or (parent::default:Parent and not(self::default:Child)) or self::ns1:GrandChild or parent::ns1:GrandChild or self::default:GrandChild or parent::default:GrandChild HLOhaTrExlTg9ARVdOhHdm1DAKk= self::Parent or (parent::Parent and not(self::Child)) or self::ns1:GrandChild or parent::ns1:GrandChild C+g6VAAmq2rWCqmCfHpLn7BFB/c= self::Parent or (parent::Parent and not(self::Child)) or self::ns1:GrandChild or parent::ns1:GrandChild C+g6VAAmq2rWCqmCfHpLn7BFB/c= ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/c14n-6.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/c0000644000175000017500000000020007473417724032373 0ustar tonytony ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/c14n-1.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/c0000644000175000017500000000014707473417724032405 0ustar tonytony ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/c14n-0.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/c0000644000175000017500000000027607473417724032410 0ustar tonytony ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/iaikTests.example3.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/i0000644000175000017500000000700607473417724032414 0ustar tonytony ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/c14n-4.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/c0000644000175000017500000000057307473417724032410 0ustar tonytony ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/c14n-5.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/c0000644000175000017500000000047107473417724032405 0ustar tonytony ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/iaikTests.example1.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/i0000644000175000017500000000236307473417724032415 0ustar tonytony ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/c14n-2.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/c0000644000175000017500000000006207473417724032401 0ustar tonytony ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/iaikTests.example2.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/i0000644000175000017500000000172607473417724032417 0ustar tonytony ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/iaikTests.example4.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/i0000644000175000017500000000223407473417724032412 0ustar tonytony ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/c14n-3.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/c0000644000175000017500000000006207473417724032401 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/0000755000175000017500000000000012273503733032155 5ustar tonytony././@LongLink0000000000000000000000000000021200000000000011560 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloping-b64-dsa-c14n-0.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/si0000644000175000017500000000113007356340570032512 0ustar tonytonyedInfo xmlns="http://www.w3.org/2000/09/xmldsig#"> N6pjx3OY2VRHMmLhoAV8HmMu2nc= ././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloping-rsa-c14n-1.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/si0000644000175000017500000000073407360355355032525 0ustar tonytony 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/Readme.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/Re0000644000175000017500000000065707405430021032444 0ustar tonytonyExample Signatures[1] [1] http://www.w3.org/Signature/Drafts/xmldsig-core/Overview.html See signature-*.xml The key for the HMAC-SHA1 signatures is "secret".getBytes("ASCII") which is, in hex, (73 65 63 72 65 74). Included in the directory are: signature-*.xml - The signatures signature-*-c14n-?.txt - The intermediate c14n output Merlin Hughes Baltimore Technologies, Ltd. Friday, March 23, 2001 ././@LongLink0000000000000000000000000000021700000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloping-hmac-sha1-40-c14n-1.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/si0000644000175000017500000000102007360355355032512 0ustar tonytony 40 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= ././@LongLink0000000000000000000000000000020300000000000011560 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloping-b64-dsa.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/si0000644000175000017500000000572307356340570032526 0ustar tonytony N6pjx3OY2VRHMmLhoAV8HmMu2nc= W+lrPJcfT0Uyj/AXyu9X2XLsTvBo6Rs8GNZUNUT4/+wx3HYuv/BovQ==

rFto8uPQM6y34FLPmDh40BLJ1rVrC8VeRquuhPZ6jYNFkQuwxnu/wCvIAMhukPBL FET8bJf/b2ef+oqxZajEb+88zlZoyG8g/wMfDBHTxz+CnowLahnCCTYBp5kt7G8q UobJuvjylwj1st7V9Lsu03iXMXtbiriUjFa5gURasN8=

kEjAFpCe4lcUOdwphpzf+tBaUds= oe14R2OtyKx+s+60O5BRNMOYpIg2TU/f15N3bsDErKOWtKXeNK9FS7dWStreDxo2 SSgOonqAd4FuJ/4uva7GgNL4ULIqY7E+mW5iwJ7n/WTELh98mEocsLXkNh24HcH4 BZfSCTruuzmCyjdV1KSqX/Eux04HfCWYmdxN3SQ/qqw= pA5NnZvcd574WRXuOA7ZfC/7Lqt4cB0MRLWtHubtJoVOao9ib5ry4rTk0r6ddnOv AIGKktutzK3ymvKleS3DOrwZQgJ+/BDWDW8kO9R66o6rdjiSobBi/0c2V1+dkqOg jFmKz395mvCOZGhC7fqAVhHat2EjGPMfgSZyABa7+1k=
MIIDbTCCAyygAwIBAgIGAOCdrKxkMAkGByqGSM44BAMwezELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjElMCMGA1UEChMcQmFsdGltb3JlIFRlY2hub2xvZ2ll cywgTHRkLjERMA8GA1UECxMIWC9TZWN1cmUxITAfBgNVBAMTGFgvU2VjdXJlIDEw MjQtYml0IERTQSBDQTAeFw0wMDA3MjcxNzEzMzNaFw0wMTA3MjcxNzEzMjZaMHwx CzAJBgNVBAYTAklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9y ZSBUZWNobm9sb2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMSIwIAYDVQQD ExlYL1NlY3VyZSAxMDI0LWJpdCBEU0EgY3J0MIIBuDCCASwGByqGSM44BAEwggEf AoGBAKxbaPLj0DOst+BSz5g4eNASyda1awvFXkarroT2eo2DRZELsMZ7v8AryADI bpDwSxRE/GyX/29nn/qKsWWoxG/vPM5WaMhvIP8DHwwR08c/gp6MC2oZwgk2AaeZ LexvKlKGybr48pcI9bLe1fS7LtN4lzF7W4q4lIxWuYFEWrDfAhUAkEjAFpCe4lcU Odwphpzf+tBaUdsCgYEAoe14R2OtyKx+s+60O5BRNMOYpIg2TU/f15N3bsDErKOW tKXeNK9FS7dWStreDxo2SSgOonqAd4FuJ/4uva7GgNL4ULIqY7E+mW5iwJ7n/WTE Lh98mEocsLXkNh24HcH4BZfSCTruuzmCyjdV1KSqX/Eux04HfCWYmdxN3SQ/qqwD gYUAAoGBAKQOTZ2b3Hee+FkV7jgO2Xwv+y6reHAdDES1rR7m7SaFTmqPYm+a8uK0 5NK+nXZzrwCBipLbrcyt8prypXktwzq8GUICfvwQ1g1vJDvUeuqOq3Y4kqGwYv9H NldfnZKjoIxZis9/eZrwjmRoQu36gFYR2rdhIxjzH4EmcgAWu/tZozswOTAPBgNV HQ8BAf8EBQMDAIAAMBEGA1UdDgQKBAiA4IML4dndEDATBgNVHSMEDDAKgAiHoMnY nDxZUDAJBgcqhkjOOAQDAzAAMC0CFQCEXa1E2ueJ8WMX5nP1lCcBWhxC2wIUGUCB b6M6Oj3NQAJbnZsdY63rKa0=
c29tZSB0ZXh0
././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloping-dsa-c14n-1.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/si0000644000175000017500000000073407356340570032523 0ustar tonytonyedInfo xmlns="http://www.w3.org/2000/09/xmldsig#"> 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= ././@LongLink0000000000000000000000000000021400000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloping-hmac-sha1-c14n-0.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/si0000644000175000017500000000012107360355355032513 0ustar tonytonysome text././@LongLink0000000000000000000000000000020400000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-external-dsa-c14n-0.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/si0000644000175000017500000000077007356340570032523 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= ././@LongLink0000000000000000000000000000020500000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloped-dsa-c14n-0.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/si0000644000175000017500000000005607356340570032520 0ustar tonytony ././@LongLink0000000000000000000000000000020100000000000011556 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-external-b64-dsa.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/si0000644000175000017500000000571507356340570032527 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= gU0blQcXJFHR5MhUIb2Clq7bcT+NfxOG5yLFUd3Y85QNfTaR5vu+6Q==

rFto8uPQM6y34FLPmDh40BLJ1rVrC8VeRquuhPZ6jYNFkQuwxnu/wCvIAMhukPBL FET8bJf/b2ef+oqxZajEb+88zlZoyG8g/wMfDBHTxz+CnowLahnCCTYBp5kt7G8q UobJuvjylwj1st7V9Lsu03iXMXtbiriUjFa5gURasN8=

kEjAFpCe4lcUOdwphpzf+tBaUds= oe14R2OtyKx+s+60O5BRNMOYpIg2TU/f15N3bsDErKOWtKXeNK9FS7dWStreDxo2 SSgOonqAd4FuJ/4uva7GgNL4ULIqY7E+mW5iwJ7n/WTELh98mEocsLXkNh24HcH4 BZfSCTruuzmCyjdV1KSqX/Eux04HfCWYmdxN3SQ/qqw= pA5NnZvcd574WRXuOA7ZfC/7Lqt4cB0MRLWtHubtJoVOao9ib5ry4rTk0r6ddnOv AIGKktutzK3ymvKleS3DOrwZQgJ+/BDWDW8kO9R66o6rdjiSobBi/0c2V1+dkqOg jFmKz395mvCOZGhC7fqAVhHat2EjGPMfgSZyABa7+1k=
MIIDbTCCAyygAwIBAgIGAOCdrKxkMAkGByqGSM44BAMwezELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjElMCMGA1UEChMcQmFsdGltb3JlIFRlY2hub2xvZ2ll cywgTHRkLjERMA8GA1UECxMIWC9TZWN1cmUxITAfBgNVBAMTGFgvU2VjdXJlIDEw MjQtYml0IERTQSBDQTAeFw0wMDA3MjcxNzEzMzNaFw0wMTA3MjcxNzEzMjZaMHwx CzAJBgNVBAYTAklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9y ZSBUZWNobm9sb2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMSIwIAYDVQQD ExlYL1NlY3VyZSAxMDI0LWJpdCBEU0EgY3J0MIIBuDCCASwGByqGSM44BAEwggEf AoGBAKxbaPLj0DOst+BSz5g4eNASyda1awvFXkarroT2eo2DRZELsMZ7v8AryADI bpDwSxRE/GyX/29nn/qKsWWoxG/vPM5WaMhvIP8DHwwR08c/gp6MC2oZwgk2AaeZ LexvKlKGybr48pcI9bLe1fS7LtN4lzF7W4q4lIxWuYFEWrDfAhUAkEjAFpCe4lcU Odwphpzf+tBaUdsCgYEAoe14R2OtyKx+s+60O5BRNMOYpIg2TU/f15N3bsDErKOW tKXeNK9FS7dWStreDxo2SSgOonqAd4FuJ/4uva7GgNL4ULIqY7E+mW5iwJ7n/WTE Lh98mEocsLXkNh24HcH4BZfSCTruuzmCyjdV1KSqX/Eux04HfCWYmdxN3SQ/qqwD gYUAAoGBAKQOTZ2b3Hee+FkV7jgO2Xwv+y6reHAdDES1rR7m7SaFTmqPYm+a8uK0 5NK+nXZzrwCBipLbrcyt8prypXktwzq8GUICfvwQ1g1vJDvUeuqOq3Y4kqGwYv9H NldfnZKjoIxZis9/eZrwjmRoQu36gFYR2rdhIxjzH4EmcgAWu/tZozswOTAPBgNV HQ8BAf8EBQMDAIAAMBEGA1UdDgQKBAiA4IML4dndEDATBgNVHSMEDDAKgAiHoMnY nDxZUDAJBgcqhkjOOAQDAzAAMC0CFQCEXa1E2ueJ8WMX5nP1lCcBWhxC2wIUGUCB b6M6Oj3NQAJbnZsdY63rKa0=
././@LongLink0000000000000000000000000000017700000000000011572 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloping-rsa.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/si0000644000175000017500000000217707356340570032526 0ustar tonytony 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= TTx2opM6OcMi6zlasWEhP992di482KhTo80pgheFySZcpvorB47i8FkgDjftdxbn 2xlrZh0rp0v2dVVxWtLFjUpvN/Z+fkG/AXiT3kAhzRBqmYYYZxIuCtQM57yoBrIh /nSy3HWs5wDqroFAx9q52qMMbKNbnwHG6Y/K1ZiVnNg= qe5VYmNxjeUSQDEI5lkHNDXxfXpXj95Ni7tcQ9DHDSgUJ1m2dNwKublDVQZDmmlf HJ2n/us+EZTZNUST4GqublhgzcCCvYq9dbU8oqiEz0ktTIWCPy36UvQcaRwufpiV RFaTDNPqjkjWPrM2cnpfyoI7ydbVCBRfI9zISQiR0Mk= AQAB some text ././@LongLink0000000000000000000000000000020500000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloping-hmac-sha1.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/si0000644000175000017500000000113507360355355032521 0ustar tonytony 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= JElPttIT4Am7Q+MNoMyv+WDfAZw= some text ././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloped-dsa.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/si0000644000175000017500000000612707405103163032513 0ustar tonytony K8M/lPbKnuMDsO0Uzuj75lQtzQI= DpEylhQoiUKBoKWmYfajXO7LZxiDYgVtUtCNyTgwZgoChzorA2nhkQ==

rFto8uPQM6y34FLPmDh40BLJ1rVrC8VeRquuhPZ6jYNFkQuwxnu/wCvIAMhukPBL FET8bJf/b2ef+oqxZajEb+88zlZoyG8g/wMfDBHTxz+CnowLahnCCTYBp5kt7G8q UobJuvjylwj1st7V9Lsu03iXMXtbiriUjFa5gURasN8=

kEjAFpCe4lcUOdwphpzf+tBaUds= oe14R2OtyKx+s+60O5BRNMOYpIg2TU/f15N3bsDErKOWtKXeNK9FS7dWStreDxo2 SSgOonqAd4FuJ/4uva7GgNL4ULIqY7E+mW5iwJ7n/WTELh98mEocsLXkNh24HcH4 BZfSCTruuzmCyjdV1KSqX/Eux04HfCWYmdxN3SQ/qqw= pA5NnZvcd574WRXuOA7ZfC/7Lqt4cB0MRLWtHubtJoVOao9ib5ry4rTk0r6ddnOv AIGKktutzK3ymvKleS3DOrwZQgJ+/BDWDW8kO9R66o6rdjiSobBi/0c2V1+dkqOg jFmKz395mvCOZGhC7fqAVhHat2EjGPMfgSZyABa7+1k=
MIIDbTCCAyygAwIBAgIGAOCdrKxkMAkGByqGSM44BAMwezELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjElMCMGA1UEChMcQmFsdGltb3JlIFRlY2hub2xvZ2ll cywgTHRkLjERMA8GA1UECxMIWC9TZWN1cmUxITAfBgNVBAMTGFgvU2VjdXJlIDEw MjQtYml0IERTQSBDQTAeFw0wMDA3MjcxNzEzMzNaFw0wMTA3MjcxNzEzMjZaMHwx CzAJBgNVBAYTAklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9y ZSBUZWNobm9sb2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMSIwIAYDVQQD ExlYL1NlY3VyZSAxMDI0LWJpdCBEU0EgY3J0MIIBuDCCASwGByqGSM44BAEwggEf AoGBAKxbaPLj0DOst+BSz5g4eNASyda1awvFXkarroT2eo2DRZELsMZ7v8AryADI bpDwSxRE/GyX/29nn/qKsWWoxG/vPM5WaMhvIP8DHwwR08c/gp6MC2oZwgk2AaeZ LexvKlKGybr48pcI9bLe1fS7LtN4lzF7W4q4lIxWuYFEWrDfAhUAkEjAFpCe4lcU Odwphpzf+tBaUdsCgYEAoe14R2OtyKx+s+60O5BRNMOYpIg2TU/f15N3bsDErKOW tKXeNK9FS7dWStreDxo2SSgOonqAd4FuJ/4uva7GgNL4ULIqY7E+mW5iwJ7n/WTE Lh98mEocsLXkNh24HcH4BZfSCTruuzmCyjdV1KSqX/Eux04HfCWYmdxN3SQ/qqwD gYUAAoGBAKQOTZ2b3Hee+FkV7jgO2Xwv+y6reHAdDES1rR7m7SaFTmqPYm+a8uK0 5NK+nXZzrwCBipLbrcyt8prypXktwzq8GUICfvwQ1g1vJDvUeuqOq3Y4kqGwYv9H NldfnZKjoIxZis9/eZrwjmRoQu36gFYR2rdhIxjzH4EmcgAWu/tZozswOTAPBgNV HQ8BAf8EBQMDAIAAMBEGA1UdDgQKBAiA4IML4dndEDATBgNVHSMEDDAKgAiHoMnY nDxZUDAJBgcqhkjOOAQDAzAAMC0CFQCEXa1E2ueJ8WMX5nP1lCcBWhxC2wIUGUCB b6M6Oj3NQAJbnZsdY63rKa0=
././@LongLink0000000000000000000000000000021000000000000011556 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloping-hmac-sha1-40.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/si0000644000175000017500000000121407360355355032517 0ustar tonytony 40 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= HHiqvCU= some text ././@LongLink0000000000000000000000000000021400000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloping-hmac-sha1-c14n-1.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/si0000644000175000017500000000073507360355355032526 0ustar tonytony 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= ././@LongLink0000000000000000000000000000017700000000000011572 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloping-dsa.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/si0000644000175000017500000000553607356340570032530 0ustar tonytony 7/XTsHaBSOnJ/jXD5v0zL6VKYsk= SVsFIWuARkAaD9HZXhNASHShx38UZiDS3IsIb2DS1eBUdD4V70E6MA==

rFto8uPQM6y34FLPmDh40BLJ1rVrC8VeRquuhPZ6jYNFkQuwxnu/wCvIAMhukPBL FET8bJf/b2ef+oqxZajEb+88zlZoyG8g/wMfDBHTxz+CnowLahnCCTYBp5kt7G8q UobJuvjylwj1st7V9Lsu03iXMXtbiriUjFa5gURasN8=

kEjAFpCe4lcUOdwphpzf+tBaUds= oe14R2OtyKx+s+60O5BRNMOYpIg2TU/f15N3bsDErKOWtKXeNK9FS7dWStreDxo2 SSgOonqAd4FuJ/4uva7GgNL4ULIqY7E+mW5iwJ7n/WTELh98mEocsLXkNh24HcH4 BZfSCTruuzmCyjdV1KSqX/Eux04HfCWYmdxN3SQ/qqw= pA5NnZvcd574WRXuOA7ZfC/7Lqt4cB0MRLWtHubtJoVOao9ib5ry4rTk0r6ddnOv AIGKktutzK3ymvKleS3DOrwZQgJ+/BDWDW8kO9R66o6rdjiSobBi/0c2V1+dkqOg jFmKz395mvCOZGhC7fqAVhHat2EjGPMfgSZyABa7+1k=
MIIDbTCCAyygAwIBAgIGAOCdrKxkMAkGByqGSM44BAMwezELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjElMCMGA1UEChMcQmFsdGltb3JlIFRlY2hub2xvZ2ll cywgTHRkLjERMA8GA1UECxMIWC9TZWN1cmUxITAfBgNVBAMTGFgvU2VjdXJlIDEw MjQtYml0IERTQSBDQTAeFw0wMDA3MjcxNzEzMzNaFw0wMTA3MjcxNzEzMjZaMHwx CzAJBgNVBAYTAklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9y ZSBUZWNobm9sb2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMSIwIAYDVQQD ExlYL1NlY3VyZSAxMDI0LWJpdCBEU0EgY3J0MIIBuDCCASwGByqGSM44BAEwggEf AoGBAKxbaPLj0DOst+BSz5g4eNASyda1awvFXkarroT2eo2DRZELsMZ7v8AryADI bpDwSxRE/GyX/29nn/qKsWWoxG/vPM5WaMhvIP8DHwwR08c/gp6MC2oZwgk2AaeZ LexvKlKGybr48pcI9bLe1fS7LtN4lzF7W4q4lIxWuYFEWrDfAhUAkEjAFpCe4lcU Odwphpzf+tBaUdsCgYEAoe14R2OtyKx+s+60O5BRNMOYpIg2TU/f15N3bsDErKOW tKXeNK9FS7dWStreDxo2SSgOonqAd4FuJ/4uva7GgNL4ULIqY7E+mW5iwJ7n/WTE Lh98mEocsLXkNh24HcH4BZfSCTruuzmCyjdV1KSqX/Eux04HfCWYmdxN3SQ/qqwD gYUAAoGBAKQOTZ2b3Hee+FkV7jgO2Xwv+y6reHAdDES1rR7m7SaFTmqPYm+a8uK0 5NK+nXZzrwCBipLbrcyt8prypXktwzq8GUICfvwQ1g1vJDvUeuqOq3Y4kqGwYv9H NldfnZKjoIxZis9/eZrwjmRoQu36gFYR2rdhIxjzH4EmcgAWu/tZozswOTAPBgNV HQ8BAf8EBQMDAIAAMBEGA1UdDgQKBAiA4IML4dndEDATBgNVHSMEDDAKgAiHoMnY nDxZUDAJBgcqhkjOOAQDAzAAMC0CFQCEXa1E2ueJ8WMX5nP1lCcBWhxC2wIUGUCB b6M6Oj3NQAJbnZsdY63rKa0=
some text
././@LongLink0000000000000000000000000000021700000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloping-hmac-sha1-40-c14n-0.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/si0000644000175000017500000000012107360355355032513 0ustar tonytonysome text././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-external-dsa.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/si0000644000175000017500000000552107356340570032522 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= Fj9OwSxpJppDnihohduxEUqu9/p6TR9PpgNGapaiBHGcY2QUDBaOEw==

rFto8uPQM6y34FLPmDh40BLJ1rVrC8VeRquuhPZ6jYNFkQuwxnu/wCvIAMhukPBL FET8bJf/b2ef+oqxZajEb+88zlZoyG8g/wMfDBHTxz+CnowLahnCCTYBp5kt7G8q UobJuvjylwj1st7V9Lsu03iXMXtbiriUjFa5gURasN8=

kEjAFpCe4lcUOdwphpzf+tBaUds= oe14R2OtyKx+s+60O5BRNMOYpIg2TU/f15N3bsDErKOWtKXeNK9FS7dWStreDxo2 SSgOonqAd4FuJ/4uva7GgNL4ULIqY7E+mW5iwJ7n/WTELh98mEocsLXkNh24HcH4 BZfSCTruuzmCyjdV1KSqX/Eux04HfCWYmdxN3SQ/qqw= pA5NnZvcd574WRXuOA7ZfC/7Lqt4cB0MRLWtHubtJoVOao9ib5ry4rTk0r6ddnOv AIGKktutzK3ymvKleS3DOrwZQgJ+/BDWDW8kO9R66o6rdjiSobBi/0c2V1+dkqOg jFmKz395mvCOZGhC7fqAVhHat2EjGPMfgSZyABa7+1k=
MIIDbTCCAyygAwIBAgIGAOCdrKxkMAkGByqGSM44BAMwezELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjElMCMGA1UEChMcQmFsdGltb3JlIFRlY2hub2xvZ2ll cywgTHRkLjERMA8GA1UECxMIWC9TZWN1cmUxITAfBgNVBAMTGFgvU2VjdXJlIDEw MjQtYml0IERTQSBDQTAeFw0wMDA3MjcxNzEzMzNaFw0wMTA3MjcxNzEzMjZaMHwx CzAJBgNVBAYTAklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9y ZSBUZWNobm9sb2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMSIwIAYDVQQD ExlYL1NlY3VyZSAxMDI0LWJpdCBEU0EgY3J0MIIBuDCCASwGByqGSM44BAEwggEf AoGBAKxbaPLj0DOst+BSz5g4eNASyda1awvFXkarroT2eo2DRZELsMZ7v8AryADI bpDwSxRE/GyX/29nn/qKsWWoxG/vPM5WaMhvIP8DHwwR08c/gp6MC2oZwgk2AaeZ LexvKlKGybr48pcI9bLe1fS7LtN4lzF7W4q4lIxWuYFEWrDfAhUAkEjAFpCe4lcU Odwphpzf+tBaUdsCgYEAoe14R2OtyKx+s+60O5BRNMOYpIg2TU/f15N3bsDErKOW tKXeNK9FS7dWStreDxo2SSgOonqAd4FuJ/4uva7GgNL4ULIqY7E+mW5iwJ7n/WTE Lh98mEocsLXkNh24HcH4BZfSCTruuzmCyjdV1KSqX/Eux04HfCWYmdxN3SQ/qqwD gYUAAoGBAKQOTZ2b3Hee+FkV7jgO2Xwv+y6reHAdDES1rR7m7SaFTmqPYm+a8uK0 5NK+nXZzrwCBipLbrcyt8prypXktwzq8GUICfvwQ1g1vJDvUeuqOq3Y4kqGwYv9H NldfnZKjoIxZis9/eZrwjmRoQu36gFYR2rdhIxjzH4EmcgAWu/tZozswOTAPBgNV HQ8BAf8EBQMDAIAAMBEGA1UdDgQKBAiA4IML4dndEDATBgNVHSMEDDAKgAiHoMnY nDxZUDAJBgcqhkjOOAQDAzAAMC0CFQCEXa1E2ueJ8WMX5nP1lCcBWhxC2wIUGUCB b6M6Oj3NQAJbnZsdY63rKa0=
././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloping-rsa-c14n-0.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/si0000644000175000017500000000012107356340570032511 0ustar tonytonysome text././@LongLink0000000000000000000000000000021000000000000011556 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-external-b64-dsa-c14n-0.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/si0000644000175000017500000000117607356340570032524 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= ././@LongLink0000000000000000000000000000020500000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloped-dsa-c14n-1.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/si0000644000175000017500000000116207356340570032517 0ustar tonytonyedInfo xmlns="http://www.w3.org/2000/09/xmldsig#"> K8M/lPbKnuMDsO0Uzuj75lQtzQI= ././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloping-dsa-c14n-0.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/si0000644000175000017500000000012107356340570032511 0ustar tonytonysome textlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/0000755000175000017500000000000012273503733032325 5ustar tonytony././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signature-x509-is.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/s0000644000175000017500000000202507356023536032515 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= pjlt4UQxI954TIicsctTxRk4qC4tF/h2Y0kmivXvyUU8EPoaCH8bIrcFWz7I7C3P 7NZi341itjSWA9cFnSBKboBPvKxPMMmYShsVMFBDyB2jiF1T3Qc4C/E0BJpR/Ntn uBUNBPNxC0TUjuS7fIYku3NpVVbIv1OP0OqWNi0KDN0= CN=X/Secure CA,OU=X/Secure,O=Baltimore Technologies\, Ltd.,ST=Dublin,C=IE 989921098912 ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/certs/libxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/c0000755000175000017500000000000012273503733032470 5ustar tonytony././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/certs/lugh.crtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/c0000644000175000017500000000130507356023536032475 0ustar tonytony00*{40  *H 0n1 0 UIE10 UDublin1%0#U Baltimore Technologies, Ltd.10U X/Secure10U X/Secure CA0 010515100518Z 020515100437Z0g1 0 UIE10 UDublin1%0#U Baltimore Technologies, Ltd.10U X/Secure1 0 ULugh00  *H 0*NkZ֋"<iά+U2ザcrڄ~$5/hZYb>xUaQWD#<,2 k{[d2m pPw v} "ˁ"Kp1Iq0o0U0U aZ)jw05U.0,*http://www.baltimore.com/products/xsecure/0U# 0  0  *H m >fg/`6#&s+ȖZ҆f?tRT K{4a2 ,,%N{ .0q]AW%5\ՀI ITkGz^././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/certs/nocertifiacte.crtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/c0000644000175000017500000000256007356023536032501 0ustar tonytonyExample Signatures[1] [1] http://www.w3.org/Signature/Drafts/xmldsig-core/Overview.html This is an exercise over some key information types, interop of which is required for certain standardisation processes. . signature-keyname.xml . signature-retrievalmethod-rawx509crt.xml . signature-x509-crt-crl.xml . signature-x509-crt.xml . signature-x509-is.xml . signature-x509-ski.xml . signature-x509-sn.xml . certs/*.crt To resolve the key associated with the KeyName in `signature-keyname.xml' you must perform a cunning transformation from the name `Xxx' to the certificate that resides in the directory `certs/' that has a subject name containing the common name `Xxx'. The transformation from this key name to the filename under which the certificate is stored `certs/xxx.crt' is a trade secret encryption process, the circumvention of which may expose you to civil and criminal prosecution under the DMCA and other applicable laws. To resolve the key associated with the X509Data in `signature-x509-is.xml', `signature-x509-ski.xml' and `signature-x509-sn.xml' you need to resolve the identified certificate from those in the `certs' directory. In `signature-x509-crt-crl.xml' an X.509 CRL is present which has revoked the X.509 certificate used for signing. So verification should be qualified. Merlin Hughes Baltimore Technologies, Ltd. Tuesday, May 15, 2001 ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/certs/macha.crtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/c0000644000175000017500000000130607356023536032476 0ustar tonytony00+{<0  *H 0n1 0 UIE10 UDublin1%0#U Baltimore Technologies, Ltd.10U X/Secure10U X/Secure CA0 010515100458Z 020515100437Z0h1 0 UIE10 UDublin1%0#U Baltimore Technologies, Ltd.10U X/Secure10 UMacha00  *H 0Ham{Hu9$F ٩+5| H"Љ;^淕?@ر 8H)xxL1yaٻ2ZQMݯӮV`(@OAC; S;Idr&Dcq0o0U0U U2.L05U.0,*http://www.baltimore.com/products/xsecure/0U# 0  0  *H [1W nNAp[Į%:Uh]Ǥ2[l gwhY5SQIB=05U.0,*http://www.baltimore.com/products/xsecure/0U# 0  0  *H  -|F^@&?ٟQi>Y:-D W]'o4aWe 1:3[Wy{cRO#-~|IVȝ"{Gh|9 '~/Q 3w././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/certs/badb.crtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/c0000644000175000017500000000130507356023536032475 0ustar tonytony00*{0  *H 0n1 0 UIE10 UDublin1%0#U Baltimore Technologies, Ltd.10U X/Secure10U X/Secure CA0 010515100450Z 020515100437Z0g1 0 UIE10 UDublin1%0#U Baltimore Technologies, Ltd.10U X/Secure1 0 UBadb00  *H 0@Fc<Y+@X%` #=:l<'~Qe5"s~Iz: QM=,Ϡ ɞ'4, x/x}oGKO]q0o0U0U ba05U.0,*http://www.baltimore.com/products/xsecure/0U# 0  0  *H sWuֲc}UUf%'S篕.&j `M ra-u8ǁ2I+ \wqCCtFn ·E@ v\cfh@()5,././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/certs/balor.crtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/c0000644000175000017500000000130607356023536032476 0ustar tonytony00+{iE0  *H 0n1 0 UIE10 UDublin1%0#U Baltimore Technologies, Ltd.10U X/Secure10U X/Secure CA0 010515100510Z 020515100437Z0h1 0 UIE10 UDublin1%0#U Baltimore Technologies, Ltd.10U X/Secure10 UBalor00  *H 07^c76Gn2APO敃 ^vȏC+5GM໰z$ȽrrTou3n\;"ݷBd,vG!QX8#.-uYvl_ G7:V>{L0ŌHf^OtK!ыs ~`y#giR$('iYoI}_Feq0o0U0U ߙHr05U.0,*http://www.baltimore.com/products/xsecure/0U# 0  0  *H dt.%$:M& zes4[^ Zwway:+ϰ$ΆN*z;Zr_:@W Jy uoOiHx?2bNES4\w%>ZO{ ݇a././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/certs/bres.crtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/c0000644000175000017500000000130507356023536032475 0ustar tonytony00*{堙0  *H 0n1 0 UIE10 UDublin1%0#U Baltimore Technologies, Ltd.10U X/Secure10U X/Secure CA0 010515100524Z 020515100437Z0g1 0 UIE10 UDublin1%0#U Baltimore Technologies, Ltd.10U X/Secure1 0 UBres00  *H 0BDɑp#pr$SRЛ!.PCIᄍ;!>1K6؄d1VxYlPe6*C]rfxLL݇ȹ$407(jV;,k .q0o0U0U Usb05U.0,*http://www.baltimore.com/products/xsecure/0U# 0  0  *H 3.~Qz)7@m ZA7ykt'EDbGDƖ7"vR?AT2|Z,XA%3}p)"TCLe7:dƏ~"u././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/Readme.txtlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/R0000644000175000017500000000256007357133753032464 0ustar tonytonyExample Signatures[1] [1] http://www.w3.org/Signature/Drafts/xmldsig-core/Overview.html This is an exercise over some key information types, interop of which is required for certain standardisation processes. . signature-keyname.xml . signature-retrievalmethod-rawx509crt.xml . signature-x509-crt-crl.xml . signature-x509-crt.xml . signature-x509-is.xml . signature-x509-ski.xml . signature-x509-sn.xml . certs/*.crt To resolve the key associated with the KeyName in `signature-keyname.xml' you must perform a cunning transformation from the name `Xxx' to the certificate that resides in the directory `certs/' that has a subject name containing the common name `Xxx'. The transformation from this key name to the filename under which the certificate is stored `certs/xxx.crt' is a trade secret encryption process, the circumvention of which may expose you to civil and criminal prosecution under the DMCA and other applicable laws. To resolve the key associated with the X509Data in `signature-x509-is.xml', `signature-x509-ski.xml' and `signature-x509-sn.xml' you need to resolve the identified certificate from those in the `certs' directory. In `signature-x509-crt-crl.xml' an X.509 CRL is present which has revoked the X.509 certificate used for signing. So verification should be qualified. Merlin Hughes Baltimore Technologies, Ltd. Tuesday, May 15, 2001 ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signature-x509-crt.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/s0000644000175000017500000000361507356023536032523 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= ZrROxIcOSBvt5z2krEhQGSVIo4oAwTJwGAoFiWucvvEtY9k0L2R5RVHBnHCzk5GT kHGaT8SUqtnDeiH6W/2FNfciiV/w1pxURvNcyW8cYCn1B5XF68vILXUaptWf0DKw DvCFS+uLh0ACuEUfpe1Dx1fwB85lpK2iQcpx9dPaC4M= MIICwzCCAiygAwIBAgIGAOZ75QhHMA0GCSqGSIb3DQEBBQUAMG4xCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9yZSBUZWNobm9s b2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMRQwEgYDVQQDEwtYL1NlY3Vy ZSBDQTAeFw0wMTA1MTUxMDA0NDVaFw0wMjA1MTUxMDA0MzdaMGkxCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9yZSBUZWNobm9s b2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMQ8wDQYDVQQDEwZNb3JpZ3Uw gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALT4FJkxu+bB5lOwYa+irIb7sJU7 9sRQbYYnfw35D7NQkig+Lvi2LXXoA6ABull2bF+gu+sgRzezzOs6VsTL8z57TIz2 48HaMInFjOiqSANmzQKlXv1PjXSxSyHRi/3xc8gMfmCxeSPCZ5VpUiQoJ5ZpWcDz /LKvb0l9X0YBzMZlAgMBAAGjcTBvMA4GA1UdDwEB/wQEAwIHgDARBgNVHQ4ECgQI hbis35lIcu8wNQYDVR0SBC4wLIYqaHR0cDovL3d3dy5iYWx0aW1vcmUuY29tL3By b2R1Y3RzL3hzZWN1cmUvMBMGA1UdIwQMMAqACIXsHwqPfxrRMA0GCSqGSIb3DQEB BQUAA4GBAGSBdPou5CWAiyS5/f46m00mIIqO3xl6ZXOc/DRblF4gWnesd2F5v/s6 lAbqK8+wJM6GxvpOkSp6O1q6hZRyzF86QPlXCfhKAXkgzHXtb6PfT2m9t0iawnjy P+oyYofnFU5FFVOCujSrmFx3FCU+Wg6RT3v1jRoM3YfMYZYEzfTT ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signature-x509-ski.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/s0000644000175000017500000000152707356023536032523 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= odQDs0dMckjo3hrQVZfx73SBDAR75bKaa/voefbB2f+uKvLMQDF1CeB8wA7vmlDV oJJe3/18vvawSjWgIowN/KR7EZwkcvtw9hnb1QYEddX+CueeCfdEvp553nIPtibg z+77wAbVq1VCOEspx3gn9DZcLJeGHkaeeTQNplYkn84= iIg+zElCPZ0= ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signature-keyname.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/s0000644000175000017500000000143607356023536032522 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= KTe1H5Hjp8hwahNFoUqHDuPJNNqhS1U3BBBH5/gByItNIwV18nMiLq4KunzFnOqD xzTuO0/T+wsoYC1xOEuCDxyIujNCaJfLh+rCi5THulnc8KSHHEoPQ+7fA1VjmO31 2iw1iENOi7m//wzKlIHuxZCJ5nvolT21PV6nSE4DHlA= Lugh ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signature-x509-sn.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/s0000644000175000017500000000163507356023536032523 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= L5EGwmlRmiKHu0SuMEhEwAzFK3uNWidqgpc+ZJws8pyD/uTZKdS93GMXlyMup4Dj +E8+AFNj8zJ2JtQUBCkyTOS6XjMvSU4Q4/tlm6srjROtIvqpnwfUF0zEw5YswmlF TpZY92EUQEiAErDt9LL9ZOy3fTAbyxs0WCzQEGoODE8= CN=Badb,OU=X/Secure,O=Baltimore Technologies\, Ltd.,ST=Dublin,C=IE ././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signature-x509-crt-crl.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/s0000644000175000017500000000501507356023536032517 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= DrNVqKOilPswEwCilZ3EkjFyQof5BJAbAdi2I8qZuJAsL7d180nWe/xPAURHC6IR t2xJkNgCxrgdpy9//2UzaeE65URi2THgbPW1fhrp6dVeJyhiq9YfJ0Ofn7oeADkt kd3jZipUUG7UGQ0oz3bMaZ6OaGYLkygnUXWh5EHpg4A= MIICwTCCAiqgAwIBAgIGAOZ75aCZMA0GCSqGSIb3DQEBBQUAMG4xCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9yZSBUZWNobm9s b2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMRQwEgYDVQQDEwtYL1NlY3Vy ZSBDQTAeFw0wMTA1MTUxMDA1MjRaFw0wMjA1MTUxMDA0MzdaMGcxCzAJBgNVBAYT AklFMQ8wDQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9yZSBUZWNobm9s b2dpZXMsIEx0ZC4xETAPBgNVBAsTCFgvU2VjdXJlMQ0wCwYDVQQDEwRCcmVzMIGf MA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDAQtREqcPJkeGXcCORs/SwcHLh9ySw tQNTUvTQm54hBLbTLhJQ20NJf46Z4YSNoaI7IT4x8fiv+JZLNrQc2ISGZBibMVZ4 4ZvSWYls7d9QurRltvQ2oCqDhUMSXcGY3HJmeEzITIfdh6bIuSQ0sDAXNygVhGr/ vVaUOyxr1AoutQIDAQABo3EwbzAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIz2 q1W6c2KTMDUGA1UdEgQuMCyGKmh0dHA6Ly93d3cuYmFsdGltb3JlLmNvbS9wcm9k dWN0cy94c2VjdXJlLzATBgNVHSMEDDAKgAiF7B8Kj38a0TANBgkqhkiG9w0BAQUF AAOBgQAzFhnxji5+UdJ6tbfRKTfhQG0JWrWiQRy0N3lrAXQnpQBFjOjtRPRiR5ST vRQbRNrGljegIpoFFK12Uj9BxP6x+uZUqzKDfFqWEN0s9Y9YQdkl+DN9jZZwgK6N KYGqh43HIoPKGb1UQ93tTGW+F4ygNxHluvO1Ovtku8aPBn4idQ== MIIBdjCB4AIBATANBgkqhkiG9w0BAQUFADBuMQswCQYDVQQGEwJJRTEPMA0GA1UE CBMGRHVibGluMSUwIwYDVQQKExxCYWx0aW1vcmUgVGVjaG5vbG9naWVzLCBMdGQu MREwDwYDVQQLEwhYL1NlY3VyZTEUMBIGA1UEAxMLWC9TZWN1cmUgQ0EXDTAxMDUx NTEwNDUwMFoXDTAxMDkyMDEwNDUwMFowGTAXAgYA5nvloJkXDTAxMDUxNTEwNDUw MFqgIzAhMAoGA1UdFAQDAgEAMBMGA1UdIwQMMAqACIXsHwqPfxrRMA0GCSqGSIb3 DQEBBQUAA4GBADVPiyJ4Q+Kr3B/GGmh/KbVtSPv5x1zffGxp1XwV5cVOmksVrKNx rCw86K0ZLxVgy1rIql8+i1b9u3Ozuo6VhU0el/NF2Tto2jAyy0j+PPK2Xv1/ATQx J2PK+Ty9vkm+7jjurfeJVvAC8D+WFBAh/JWIzmMXA8cMBfTFBRPhZQao ././@LongLink0000000000000000000000000000021400000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signature-retrievalmethod-rawx509crt.xmllibxml-security-java-1.5.6/src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/s0000644000175000017500000000155407356023536032523 0ustar tonytony 60NvZvtdTB+7UnlLp/H24p7h4bs= FnwsSCWT6REW/8QnOjv0BK+r3Ly/4aB++pNnZp9pnz8f7+j33eKSj1soyQLq5zmN FwyeeQhnlTbR1kfve014ub9uHVC9A1cfmGZxQF1DC+enHt+AAPJaa278/ocgpMb5 Gibl4w7e3HAdBn/RJCrFJH77wY2oU5Ob0zIQtECVNJk= libxml-security-java-1.5.6/src/test/resources/test.jks0000644000175000017500000000221710763336446021630 0ustar tonytonymullan{00 +*wp fa@c5o.t&wUGWX gg= )h_ 3 rDb{#,4cT!\cpZF&~xX(޵~.ø̐ y,]B:>7g ae@- T79c<xnDUtmP唻!K[O' E^C Li[B !OUQɳcQw__fј!R2Ѷ%^1%sO io!PwaLMbyhkx1i;-8Ωl@7I#iW a {ǮtYPUX.50900sGͷr0 *H80@10 &,dcom10 &,dsun10U Sean Mullan0 080304205618Z 080602205618Z0@10 &,dcom10 &,dsun10U Sean Mullan00,*H80Su)RJ.R "The Websig Library" "xmlsecurity.org" "Christian Geuer-Pollmann" "Volume 1" "Copyright \xa9 2001 Institute for Data Communications Systems" "" titlepage.mif contents.mif Packages Classes almanac.mif sample-src\doc-files\appendix.html index.mif sample-src\doc-files\colophon.html libxml-security-java-1.5.6/src/test/resources/interop/0000755000175000017500000000000012273503733021607 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/interop/c14n/0000755000175000017500000000000012273503733022354 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/interop/c14n/Y1/0000755000175000017500000000000012273503733022645 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/interop/c14n/Y1/Readme.txt0000644000175000017500000000013407477166152024613 0ustar tonytonyuntested exclusive c14n example signature + c14n output merlin@baltimore.ie mon jan 14 2002 libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y1/c14n-2.html0000644000175000017500000004210307536065573024452 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<Foo xmlns="urn:foo" xmlns:bar="urn:bar" xml:space="preserve">
  <dsig:Signature xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
    <dsig:SignedInfo xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
      <dsig:CanonicalizationMethod xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></dsig:CanonicalizationMethod>
      <dsig:SignatureMethod xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></dsig:SignatureMethod>
      <dsig:Reference xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" URI="#xpointer(id('to-be-signed'))">
        <dsig:Transforms xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
          <dsig:Transform xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></dsig:Transform>
        </dsig:Transforms>
        <dsig:DigestMethod xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod>
        <dsig:DigestValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">7yOTjUu+9oEhShgyIIXDLjQ08aY=</dsig:DigestValue>
      </dsig:Reference>
      <dsig:Reference xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" URI="#xpointer(id('to-be-signed'))">
        <dsig:Transforms xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
          <dsig:Transform xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
            <InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" PrefixList="bar #default"></InclusiveNamespaces>
          </dsig:Transform>
        </dsig:Transforms>
        <dsig:DigestMethod xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod>
        <dsig:DigestValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">09xMy0RTQM1Q91demYe/0F6AGXo=</dsig:DigestValue>
      </dsig:Reference>
      <dsig:Reference xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" URI="#xpointer(id('to-be-signed'))">
        <dsig:Transforms xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
          <dsig:Transform xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"></dsig:Transform>
        </dsig:Transforms>
        <dsig:DigestMethod xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod>
        <dsig:DigestValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">ZQH+SkCN8c5y0feAr+aRTZDwyvY=</dsig:DigestValue>
      </dsig:Reference>
      <dsig:Reference xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" URI="#xpointer(id('to-be-signed'))">
        <dsig:Transforms xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
          <dsig:Transform xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments">
            <InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" PrefixList="bar #default"></InclusiveNamespaces>
          </dsig:Transform>
        </dsig:Transforms>
        <dsig:DigestMethod xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod>
        <dsig:DigestValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">a1cTqBgbqpUt6bMJN4C6zFtnoyo=</dsig:DigestValue>
      </dsig:Reference>
    </dsig:SignedInfo>
    <dsig:SignatureValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
      Kv1e7Kjhz4gFtOZKgvC5cLYtMQNIn99fyLBa6D//bBokTxTUEkMwaA==
    </dsig:SignatureValue>
    <dsig:KeyInfo xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
      <dsig:KeyValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
        <dsig:DSAKeyValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
          <dsig:P xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
            8FkJgwdyizV5Vd0m6DA/DZsdweJdnkueYVUd7L8aA4JpZxrlCI/M7mDE/OGhEhgB
            nFzSTrBjSFpT7DG66uy7oJeE+RgkXO7EWWOEglMPwaZgGgi1oZarv95VOx3uO8W8
            L7+S/3AuHNUZQD4b5bpdYAmjXFwz6dl0mKiXAvVuP9E=
          </dsig:P>
          <dsig:Q xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
            mFf8DiMVNFXy0vag9oNGNW/g4u0=
          </dsig:Q>
          <dsig:G xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
            g8gRdNlq9EOTR2TjmVApqCAZAq3jEjOIxXbs8JBiZ+U7dV9geeXEy13GbYoP23Qr
            apZQo+35diw+cMYPHjN+iUCwUkiGWv7/piAK+Ootfw03etL8XiVWjtL5NBof2CNp
            wmAw7mrwmNG092y1e6HXSGMMZpaoth/P8xhsxCQsqI8=
          </dsig:G>
          <dsig:Y xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
            j0V14dc/I+okDAeG4ZbWUzb3HTFkEOC6feOMo5Dk218GcPqEKroVHaDBF9CmRV1v
            B8MUOExB+6ZNHfcs5Vaw0HVn62YiEBzrmKikx6SxO4Dg9L8I5WbHn37vxUKvHs8r
            7+rma3kpZQftTMiBpJ8XK8Z6jg8VhuJqo9yZZO+p3I0=
          </dsig:Y>
        </dsig:DSAKeyValue>
      </dsig:KeyValue>
    </dsig:KeyInfo>
    <dsig:Object xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Id="to-be-signed">
      <bar:Baz xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
        <!--  comment -->
      </bar:Baz>
    </dsig:Object>
  </dsig:Signature>
</Foo>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y1/c14n-0.html0000644000175000017500000004210307536065573024450 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<Foo xmlns="urn:foo" xmlns:bar="urn:bar" xml:space="preserve">
  <dsig:Signature xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
    <dsig:SignedInfo xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
      <dsig:CanonicalizationMethod xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></dsig:CanonicalizationMethod>
      <dsig:SignatureMethod xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></dsig:SignatureMethod>
      <dsig:Reference xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" URI="#xpointer(id('to-be-signed'))">
        <dsig:Transforms xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
          <dsig:Transform xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></dsig:Transform>
        </dsig:Transforms>
        <dsig:DigestMethod xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod>
        <dsig:DigestValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">7yOTjUu+9oEhShgyIIXDLjQ08aY=</dsig:DigestValue>
      </dsig:Reference>
      <dsig:Reference xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" URI="#xpointer(id('to-be-signed'))">
        <dsig:Transforms xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
          <dsig:Transform xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
            <InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" PrefixList="bar #default"></InclusiveNamespaces>
          </dsig:Transform>
        </dsig:Transforms>
        <dsig:DigestMethod xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod>
        <dsig:DigestValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">09xMy0RTQM1Q91demYe/0F6AGXo=</dsig:DigestValue>
      </dsig:Reference>
      <dsig:Reference xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" URI="#xpointer(id('to-be-signed'))">
        <dsig:Transforms xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
          <dsig:Transform xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"></dsig:Transform>
        </dsig:Transforms>
        <dsig:DigestMethod xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod>
        <dsig:DigestValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">ZQH+SkCN8c5y0feAr+aRTZDwyvY=</dsig:DigestValue>
      </dsig:Reference>
      <dsig:Reference xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" URI="#xpointer(id('to-be-signed'))">
        <dsig:Transforms xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
          <dsig:Transform xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments">
            <InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" PrefixList="bar #default"></InclusiveNamespaces>
          </dsig:Transform>
        </dsig:Transforms>
        <dsig:DigestMethod xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod>
        <dsig:DigestValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">a1cTqBgbqpUt6bMJN4C6zFtnoyo=</dsig:DigestValue>
      </dsig:Reference>
    </dsig:SignedInfo>
    <dsig:SignatureValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
      Kv1e7Kjhz4gFtOZKgvC5cLYtMQNIn99fyLBa6D//bBokTxTUEkMwaA==
    </dsig:SignatureValue>
    <dsig:KeyInfo xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
      <dsig:KeyValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
        <dsig:DSAKeyValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
          <dsig:P xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
            8FkJgwdyizV5Vd0m6DA/DZsdweJdnkueYVUd7L8aA4JpZxrlCI/M7mDE/OGhEhgB
            nFzSTrBjSFpT7DG66uy7oJeE+RgkXO7EWWOEglMPwaZgGgi1oZarv95VOx3uO8W8
            L7+S/3AuHNUZQD4b5bpdYAmjXFwz6dl0mKiXAvVuP9E=
          </dsig:P>
          <dsig:Q xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
            mFf8DiMVNFXy0vag9oNGNW/g4u0=
          </dsig:Q>
          <dsig:G xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
            g8gRdNlq9EOTR2TjmVApqCAZAq3jEjOIxXbs8JBiZ+U7dV9geeXEy13GbYoP23Qr
            apZQo+35diw+cMYPHjN+iUCwUkiGWv7/piAK+Ootfw03etL8XiVWjtL5NBof2CNp
            wmAw7mrwmNG092y1e6HXSGMMZpaoth/P8xhsxCQsqI8=
          </dsig:G>
          <dsig:Y xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
            j0V14dc/I+okDAeG4ZbWUzb3HTFkEOC6feOMo5Dk218GcPqEKroVHaDBF9CmRV1v
            B8MUOExB+6ZNHfcs5Vaw0HVn62YiEBzrmKikx6SxO4Dg9L8I5WbHn37vxUKvHs8r
            7+rma3kpZQftTMiBpJ8XK8Z6jg8VhuJqo9yZZO+p3I0=
          </dsig:Y>
        </dsig:DSAKeyValue>
      </dsig:KeyValue>
    </dsig:KeyInfo>
    <dsig:Object xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Id="to-be-signed">
      <bar:Baz xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
        <!--  comment -->
      </bar:Baz>
    </dsig:Object>
  </dsig:Signature>
</Foo>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y1/.cvsignore0000644000175000017500000000002307773017673024654 0ustar tonytonyc14n-*.apache.html libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y1/c14n-1.txt0000644000175000017500000000026007477166152024321 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y1/c14n-0.txt0000644000175000017500000000024007477166152024316 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y1/c14n-4.txt0000644000175000017500000000427707477166152024340 0ustar tonytony 7yOTjUu+9oEhShgyIIXDLjQ08aY= 09xMy0RTQM1Q91demYe/0F6AGXo= ZQH+SkCN8c5y0feAr+aRTZDwyvY= a1cTqBgbqpUt6bMJN4C6zFtnoyo= libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y1/exc-signature.xml0000644000175000017500000000651007477166152026161 0ustar tonytony 7yOTjUu+9oEhShgyIIXDLjQ08aY= 09xMy0RTQM1Q91demYe/0F6AGXo= ZQH+SkCN8c5y0feAr+aRTZDwyvY= a1cTqBgbqpUt6bMJN4C6zFtnoyo= Kv1e7Kjhz4gFtOZKgvC5cLYtMQNIn99fyLBa6D//bBokTxTUEkMwaA== 8FkJgwdyizV5Vd0m6DA/DZsdweJdnkueYVUd7L8aA4JpZxrlCI/M7mDE/OGhEhgB nFzSTrBjSFpT7DG66uy7oJeE+RgkXO7EWWOEglMPwaZgGgi1oZarv95VOx3uO8W8 L7+S/3AuHNUZQD4b5bpdYAmjXFwz6dl0mKiXAvVuP9E= mFf8DiMVNFXy0vag9oNGNW/g4u0= g8gRdNlq9EOTR2TjmVApqCAZAq3jEjOIxXbs8JBiZ+U7dV9geeXEy13GbYoP23Qr apZQo+35diw+cMYPHjN+iUCwUkiGWv7/piAK+Ootfw03etL8XiVWjtL5NBof2CNp wmAw7mrwmNG092y1e6HXSGMMZpaoth/P8xhsxCQsqI8= j0V14dc/I+okDAeG4ZbWUzb3HTFkEOC6feOMo5Dk218GcPqEKroVHaDBF9CmRV1v B8MUOExB+6ZNHfcs5Vaw0HVn62YiEBzrmKikx6SxO4Dg9L8I5WbHn37vxUKvHs8r 7+rma3kpZQftTMiBpJ8XK8Z6jg8VhuJqo9yZZO+p3I0= libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y1/c14n-1.html0000644000175000017500000004456707536065573024471 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<Foo xmlns="urn:foo" xmlns:bar="urn:bar" xml:space="preserve">
  <dsig:Signature xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
    <dsig:SignedInfo xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
      <dsig:CanonicalizationMethod xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></dsig:CanonicalizationMethod>
      <dsig:SignatureMethod xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></dsig:SignatureMethod>
      <dsig:Reference xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" URI="#xpointer(id('to-be-signed'))">
        <dsig:Transforms xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
          <dsig:Transform xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></dsig:Transform>
        </dsig:Transforms>
        <dsig:DigestMethod xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod>
        <dsig:DigestValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">7yOTjUu+9oEhShgyIIXDLjQ08aY=</dsig:DigestValue>
      </dsig:Reference>
      <dsig:Reference xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" URI="#xpointer(id('to-be-signed'))">
        <dsig:Transforms xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
          <dsig:Transform xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
            <InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" PrefixList="bar #default"></InclusiveNamespaces>
          </dsig:Transform>
        </dsig:Transforms>
        <dsig:DigestMethod xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod>
        <dsig:DigestValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">09xMy0RTQM1Q91demYe/0F6AGXo=</dsig:DigestValue>
      </dsig:Reference>
      <dsig:Reference xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" URI="#xpointer(id('to-be-signed'))">
        <dsig:Transforms xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
          <dsig:Transform xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"></dsig:Transform>
        </dsig:Transforms>
        <dsig:DigestMethod xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod>
        <dsig:DigestValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">ZQH+SkCN8c5y0feAr+aRTZDwyvY=</dsig:DigestValue>
      </dsig:Reference>
      <dsig:Reference xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" URI="#xpointer(id('to-be-signed'))">
        <dsig:Transforms xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
          <dsig:Transform xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments">
            <InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" PrefixList="bar #default"></InclusiveNamespaces>
          </dsig:Transform>
        </dsig:Transforms>
        <dsig:DigestMethod xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod>
        <dsig:DigestValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">a1cTqBgbqpUt6bMJN4C6zFtnoyo=</dsig:DigestValue>
      </dsig:Reference>
    </dsig:SignedInfo>
    <dsig:SignatureValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
      Kv1e7Kjhz4gFtOZKgvC5cLYtMQNIn99fyLBa6D//bBokTxTUEkMwaA==
    </dsig:SignatureValue>
    <dsig:KeyInfo xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
      <dsig:KeyValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
        <dsig:DSAKeyValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
          <dsig:P xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
            8FkJgwdyizV5Vd0m6DA/DZsdweJdnkueYVUd7L8aA4JpZxrlCI/M7mDE/OGhEhgB
            nFzSTrBjSFpT7DG66uy7oJeE+RgkXO7EWWOEglMPwaZgGgi1oZarv95VOx3uO8W8
            L7+S/3AuHNUZQD4b5bpdYAmjXFwz6dl0mKiXAvVuP9E=
          </dsig:P>
          <dsig:Q xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
            mFf8DiMVNFXy0vag9oNGNW/g4u0=
          </dsig:Q>
          <dsig:G xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
            g8gRdNlq9EOTR2TjmVApqCAZAq3jEjOIxXbs8JBiZ+U7dV9geeXEy13GbYoP23Qr
            apZQo+35diw+cMYPHjN+iUCwUkiGWv7/piAK+Ootfw03etL8XiVWjtL5NBof2CNp
            wmAw7mrwmNG092y1e6HXSGMMZpaoth/P8xhsxCQsqI8=
          </dsig:G>
          <dsig:Y xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
            j0V14dc/I+okDAeG4ZbWUzb3HTFkEOC6feOMo5Dk218GcPqEKroVHaDBF9CmRV1v
            B8MUOExB+6ZNHfcs5Vaw0HVn62YiEBzrmKikx6SxO4Dg9L8I5WbHn37vxUKvHs8r
            7+rma3kpZQftTMiBpJ8XK8Z6jg8VhuJqo9yZZO+p3I0=
          </dsig:Y>
        </dsig:DSAKeyValue>
      </dsig:KeyValue>
    </dsig:KeyInfo>
    <dsig:Object xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Id="to-be-signed">
      <bar:Baz xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
        <!--  comment -->
      </bar:Baz>
    </dsig:Object>
  </dsig:Signature>
</Foo>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y1/c14n-2.txt0000644000175000017500000000026107477166152024323 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y1/c14n-3.html0000644000175000017500000004456707536065573024473 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<Foo xmlns="urn:foo" xmlns:bar="urn:bar" xml:space="preserve">
  <dsig:Signature xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
    <dsig:SignedInfo xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
      <dsig:CanonicalizationMethod xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></dsig:CanonicalizationMethod>
      <dsig:SignatureMethod xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></dsig:SignatureMethod>
      <dsig:Reference xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" URI="#xpointer(id('to-be-signed'))">
        <dsig:Transforms xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
          <dsig:Transform xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></dsig:Transform>
        </dsig:Transforms>
        <dsig:DigestMethod xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod>
        <dsig:DigestValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">7yOTjUu+9oEhShgyIIXDLjQ08aY=</dsig:DigestValue>
      </dsig:Reference>
      <dsig:Reference xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" URI="#xpointer(id('to-be-signed'))">
        <dsig:Transforms xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
          <dsig:Transform xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
            <InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" PrefixList="bar #default"></InclusiveNamespaces>
          </dsig:Transform>
        </dsig:Transforms>
        <dsig:DigestMethod xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod>
        <dsig:DigestValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">09xMy0RTQM1Q91demYe/0F6AGXo=</dsig:DigestValue>
      </dsig:Reference>
      <dsig:Reference xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" URI="#xpointer(id('to-be-signed'))">
        <dsig:Transforms xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
          <dsig:Transform xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"></dsig:Transform>
        </dsig:Transforms>
        <dsig:DigestMethod xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod>
        <dsig:DigestValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">ZQH+SkCN8c5y0feAr+aRTZDwyvY=</dsig:DigestValue>
      </dsig:Reference>
      <dsig:Reference xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" URI="#xpointer(id('to-be-signed'))">
        <dsig:Transforms xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
          <dsig:Transform xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments">
            <InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" PrefixList="bar #default"></InclusiveNamespaces>
          </dsig:Transform>
        </dsig:Transforms>
        <dsig:DigestMethod xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod>
        <dsig:DigestValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">a1cTqBgbqpUt6bMJN4C6zFtnoyo=</dsig:DigestValue>
      </dsig:Reference>
    </dsig:SignedInfo>
    <dsig:SignatureValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
      Kv1e7Kjhz4gFtOZKgvC5cLYtMQNIn99fyLBa6D//bBokTxTUEkMwaA==
    </dsig:SignatureValue>
    <dsig:KeyInfo xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
      <dsig:KeyValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
        <dsig:DSAKeyValue xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
          <dsig:P xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
            8FkJgwdyizV5Vd0m6DA/DZsdweJdnkueYVUd7L8aA4JpZxrlCI/M7mDE/OGhEhgB
            nFzSTrBjSFpT7DG66uy7oJeE+RgkXO7EWWOEglMPwaZgGgi1oZarv95VOx3uO8W8
            L7+S/3AuHNUZQD4b5bpdYAmjXFwz6dl0mKiXAvVuP9E=
          </dsig:P>
          <dsig:Q xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
            mFf8DiMVNFXy0vag9oNGNW/g4u0=
          </dsig:Q>
          <dsig:G xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
            g8gRdNlq9EOTR2TjmVApqCAZAq3jEjOIxXbs8JBiZ+U7dV9geeXEy13GbYoP23Qr
            apZQo+35diw+cMYPHjN+iUCwUkiGWv7/piAK+Ootfw03etL8XiVWjtL5NBof2CNp
            wmAw7mrwmNG092y1e6HXSGMMZpaoth/P8xhsxCQsqI8=
          </dsig:G>
          <dsig:Y xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
            j0V14dc/I+okDAeG4ZbWUzb3HTFkEOC6feOMo5Dk218GcPqEKroVHaDBF9CmRV1v
            B8MUOExB+6ZNHfcs5Vaw0HVn62YiEBzrmKikx6SxO4Dg9L8I5WbHn37vxUKvHs8r
            7+rma3kpZQftTMiBpJ8XK8Z6jg8VhuJqo9yZZO+p3I0=
          </dsig:Y>
        </dsig:DSAKeyValue>
      </dsig:KeyValue>
    </dsig:KeyInfo>
    <dsig:Object xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Id="to-be-signed">
      <bar:Baz xmlns="urn:foo" xmlns:bar="urn:bar" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
        <!--  comment -->
      </bar:Baz>
    </dsig:Object>
  </dsig:Signature>
</Foo>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y1/c14n-3.txt0000644000175000017500000000030107477166152024317 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/0000755000175000017500000000000012273503733022647 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/c14n-4.html0000644000175000017500000001543707536065573024470 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<!-- XPath="self::default:Parent or (parent::default:Parent and not(self::default:Child)) or self::ns1:GrandChild or parent::ns1:GrandChild or self::default:GrandChild or parent::default:GrandChild" -->
<!-- additionalNSPrefixes="default http://example.org/default ns1 http://example.org/ns1" -->
<!-- Result C14N:

    
  
 -->
<!-- Annotation C14N:
1. The default namespace node is rendered for Parent, since it is
   inherited from GrandParent.
2. The ns1 namespace node is rendered for the first GrandChild, since
   it is inherited from Child.
3. The default namespace node is not rendered for the first GrandChild,
   since the output parent of GrandChild (Parent) has the same namespace
   node with the same value, which is in the node set.
4. The ns1 namespace node is rendered for the second GrandChild (same as 2).
5. The default namespace node is rendered for the second GrandChild,
   since it is explicitly declared, and has a different value than that of
   Parent.
6. The ns1 namespace node is rendered for the third GrandChild (same as 2).   
7. The default namespace node is not rendered for the third GrandChild 
   (same as 3).
8. The ns1 namespace node is rendered for the fourth GrandChild (same as 2).   
9. The default namespace node is not rendered fourth the third GrandChild 
   (same as 3).
-->
<!-- Result EC14N:

     
      
-->
<!-- Annotation EC14N:
1. The default namespace node is rendered for Parent, since it is visibly
   utilized by Parent.
2. The ns1 namespace attribute is rendered for the first GrandChild, since it
   is visibly utilized by GrandChild.
3. The default namespace node is not rendered for the first GrandChild, since
   it is not visibly utilized.
4. The ns1 namespace attribute is rendered for the second GrandChild, since it
   is visibly utilized by GrandChild.
5. The default namespace node is not rendered for the second GrandChild, since
   it is not visibly utilized by GrandChild. The Gender attribute is in no
   namespace.
6. The ns1 namespace node is not rendered for the third GrandChild, since it
   is not visibly utilized.
7. The default namespace node is not rendered for the third GrandChild. It is
   visibly utilized, but the same namespace node with the same value has already
   been rendered in Parent (an output parent of GrandChild).
8. The default namespace node is not rendered for the fourth GrandChild, since
   it is not visibly utilized.
9. The ns1 namespace node is rendered for the fourth GrandChild, since it is
   visibly utilized by the ns1:Gender attribute of GrandChild.
-->
<GrandParent xmlns="http://example.org/default">
  <Parent xmlns="http://example.org/default">
    <Child xmlns="http://example.org/default" xmlns:ns1="http://example.org/ns1">
      <ns1:GrandChild xmlns="http://example.org/default" xmlns:ns1="http://example.org/ns1"></ns1:GrandChild>
      <ns1:GrandChild xmlns="http://bar.com/default" xmlns:ns1="http://example.org/ns1" Gender="male"></ns1:GrandChild>
      <GrandChild xmlns="http://example.org/default" xmlns:ns1="http://example.org/ns1"></GrandChild>
      <GrandChild xmlns="http://example.org/default" xmlns:ns1="http://example.org/ns1" ns1:Gender="male"></GrandChild>
    </Child>
  </Parent>
</GrandParent>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/Readme.txt0000644000175000017500000000143607477166152024623 0ustar tonytonyGregor Karlinger 's exclusive c14n[1] examples[2] dumped in an XML Signature[3], thereby undoing their usefulness as standalone exclusive c14n examples, but simplifying their testing. All errors are my own. Version 2. . iaikTests.example?.xml - Gregor's examples (*) . signature.xml - Signature representing the examples . signature.tmpl - Signature template . c14n-?.txt - Intermediate c14n output (*) I ran perl -pi -e 's/foo.com/example.org/g' on the files. [1] http://www.w3.org/TR/2002/CR-xml-exc-c14n-20020212 [2] http://lists.w3.org/Archives/Public/w3c-ietf-xmldsig/2002JanMar/0259.html [3] http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/ Merlin Hughes Baltimore Technologies, Ltd. http://www.baltimore.com/ Thursday, April 18, 2002 libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/signature.tmpl0000644000175000017500000001074307477166152025565 0ustar tonytony self::Parent or (parent::Parent and not(self::Child)) or self::GrandChild or parent::GrandChild self::Parent or (parent::Parent and not(self::Child)) or self::GrandChild or parent::GrandChild self::Parent or (parent::Parent and not(self::default:Child)) or self::GrandChild or parent::GrandChild self::Parent or (parent::Parent and not(self::default:Child)) or self::GrandChild or parent::GrandChild self::default:Parent or (parent::default:Parent and not(self::default:Child)) or self::ns1:GrandChild or parent::ns1:GrandChild or self::default:GrandChild or parent::default:GrandChild self::default:Parent or (parent::default:Parent and not(self::default:Child)) or self::ns1:GrandChild or parent::ns1:GrandChild or self::default:GrandChild or parent::default:GrandChild self::Parent or (parent::Parent and not(self::Child)) or self::ns1:GrandChild or parent::ns1:GrandChild self::Parent or (parent::Parent and not(self::Child)) or self::ns1:GrandChild or parent::ns1:GrandChild libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/c14n-7.txt0000644000175000017500000000020007477166152024323 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/c14n-2.html0000644000175000017500000000633107536065573024457 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<!-- XPath="self::Parent or (parent::Parent and not(self::default:Child)) or self::GrandChild or parent::GrandChild" -->
<!-- additionalNSPrefixes="default http://example.org" -->
<!-- Result C14N:

    
  
-->
<!-- Annotation C14N:
1. The xmlns="" of Parent is not rendered, although it is explicitly declared.
   This is because Parent has no output parent with a default namespace decla-
   ration that is in the node set.
2. The xmlns="" of GrandChild is not rendered, although it is explicitly
   declared. This is because GrandChild has no output parent with a default
   namespace declaration that is in the node set.
-->
<!-- Result EC14N:

    
  
-->
<!-- Annotation EC14N:
See Annotation C14N.
-->
<GrandParent xmlns="">
  <Parent xmlns="">
    <Child xmlns="http://example.org">
      <GrandChild xmlns=""></GrandChild>
    </Child>
  </Parent>
</GrandParent>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/signature.xml0000644000175000017500000002133507477166152025410 0ustar tonytony self::Parent or (parent::Parent and not(self::Child)) or self::GrandChild or parent::GrandChild ayC7IAjulu8Ujs1l7IOkr09X9Lo= self::Parent or (parent::Parent and not(self::Child)) or self::GrandChild or parent::GrandChild tYcPYeXWUpBwCJKaPHpnT+oc7FQ= self::Parent or (parent::Parent and not(self::default:Child)) or self::GrandChild or parent::GrandChild 3/E99/WWurMo5RB3R9mPMi8TNek= self::Parent or (parent::Parent and not(self::default:Child)) or self::GrandChild or parent::GrandChild 3/E99/WWurMo5RB3R9mPMi8TNek= self::default:Parent or (parent::default:Parent and not(self::default:Child)) or self::ns1:GrandChild or parent::ns1:GrandChild or self::default:GrandChild or parent::default:GrandChild +9y4JHXxsQSJitQS+qdtKd7P5LE= self::default:Parent or (parent::default:Parent and not(self::default:Child)) or self::ns1:GrandChild or parent::ns1:GrandChild or self::default:GrandChild or parent::default:GrandChild HLOhaTrExlTg9ARVdOhHdm1DAKk= self::Parent or (parent::Parent and not(self::Child)) or self::ns1:GrandChild or parent::ns1:GrandChild C+g6VAAmq2rWCqmCfHpLn7BFB/c= self::Parent or (parent::Parent and not(self::Child)) or self::ns1:GrandChild or parent::ns1:GrandChild C+g6VAAmq2rWCqmCfHpLn7BFB/c= NkRZexf7MJKmcBEGqorF3JHl6ewlZcghwbRWg96ae7Ob9118U73HVw==

3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi 89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=

hDLcFK0GO/Hz1arxOOvsgM/VLyU= nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM 8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA= cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv +OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=
CN=Merlin Hughes,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE CN=Transient CA,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE 1017788370348 MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS 8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1 MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU 2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q 4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch 3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx 0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D 451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7 PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5 NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25 4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/c14n-8.txt0000644000175000017500000001161407477166152024337 0ustar tonytony self::Parent or (parent::Parent and not(self::Child)) or self::GrandChild or parent::GrandChild ayC7IAjulu8Ujs1l7IOkr09X9Lo= self::Parent or (parent::Parent and not(self::Child)) or self::GrandChild or parent::GrandChild tYcPYeXWUpBwCJKaPHpnT+oc7FQ= self::Parent or (parent::Parent and not(self::default:Child)) or self::GrandChild or parent::GrandChild 3/E99/WWurMo5RB3R9mPMi8TNek= self::Parent or (parent::Parent and not(self::default:Child)) or self::GrandChild or parent::GrandChild 3/E99/WWurMo5RB3R9mPMi8TNek= self::default:Parent or (parent::default:Parent and not(self::default:Child)) or self::ns1:GrandChild or parent::ns1:GrandChild or self::default:GrandChild or parent::default:GrandChild +9y4JHXxsQSJitQS+qdtKd7P5LE= self::default:Parent or (parent::default:Parent and not(self::default:Child)) or self::ns1:GrandChild or parent::ns1:GrandChild or self::default:GrandChild or parent::default:GrandChild HLOhaTrExlTg9ARVdOhHdm1DAKk= self::Parent or (parent::Parent and not(self::Child)) or self::ns1:GrandChild or parent::ns1:GrandChild C+g6VAAmq2rWCqmCfHpLn7BFB/c= self::Parent or (parent::Parent and not(self::Child)) or self::ns1:GrandChild or parent::ns1:GrandChild C+g6VAAmq2rWCqmCfHpLn7BFB/c= libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/c14n-6.txt0000644000175000017500000000020007477166152024322 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/c14n-6.html0000644000175000017500000000723707536065573024471 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<!-- XPath="self::Parent or (parent::Parent and not(self::Child)) or self::ns1:GrandChild or parent::ns1:GrandChild" -->
<!-- additionalNSPrefixes="ns1 http://example.org/ns1" -->
<!-- InlusiveNamespacePrefixList="ns2" -->
<!-- Result C14N:

    
      
 -->
<!-- Annotation C14N:
1. The namespace nodes ns1 und ns2 are rendered for GrandChild, since
   they are both in scope for GrandChild and in the output node set.   
-->
<!-- Result EC14N:

    
      
-->
<!-- Annotation EC14N:
1. The namespace node ns1 is rendered for GrandChild since it is visibly
   utilized by GrandChild.
2. The namespace node ns2 is rendered since it is on the 
   InlusiveNamespacePrefixList and is therefore treated as in C14N mode.
-->
<GrandParent xmlns="">
  <Parent xmlns="">
    <Child xmlns="" xmlns:ns1="http://example.org/ns1" xmlns:ns2="http://example.org/ns2">
      <ns1:GrandChild xmlns="" xmlns:ns1="http://example.org/ns1" xmlns:ns2="http://example.org/ns2"></ns1:GrandChild>
    </Child>
  </Parent>
</GrandParent>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/c14n-0.html0000644000175000017500000000727707536065573024467 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<!-- XPath="self::Parent or (parent::Parent and not(self::Child)) or self::GrandChild or parent::GrandChild" -->
<!-- Result C14N:

    
  
-->
<!-- Annotation C14N:
1. Parent inherts xml:lang and xml:space since it is an orphan node.
2. Parent has explicitly declared attributes xml:foo and xml:fool.
3. GrandChild inherts xml:foo from its Child ancestor.
4. GrandChild inherits xml:fool from its Parent ancestor.
5. GrandChild inherits xml:lang from its Child ancestor.
6. GrandChild has explicitly declared attribute xml:space.
-->
<!-- Result EC14N:

    
  
-->
<!-- Annotation EC14N:
1. Only those attributes in the xml namespace are rendered, which are
   explicitely declared in the attribute axis of an element.
-->
<GrandParent xmlns="" xml:lang="en" xml:space="default">
  <Parent xmlns="" xml:foo="bar" xml:fool="barbar">
    <Child xmlns="" xml:foo="barbarossa" xml:lang="ge">
      <GrandChild xmlns="" xml:space="preserve"></GrandChild>
    </Child>
  </Parent>
</GrandParent>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/.cvsignore0000644000175000017500000000002307773017673024656 0ustar tonytonyc14n-*.apache.html libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/c14n-1.txt0000644000175000017500000000014707477166152024327 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/c14n-5.html0000644000175000017500000001543707536065573024471 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<!-- XPath="self::default:Parent or (parent::default:Parent and not(self::default:Child)) or self::ns1:GrandChild or parent::ns1:GrandChild or self::default:GrandChild or parent::default:GrandChild" -->
<!-- additionalNSPrefixes="default http://example.org/default ns1 http://example.org/ns1" -->
<!-- Result C14N:

    
  
 -->
<!-- Annotation C14N:
1. The default namespace node is rendered for Parent, since it is
   inherited from GrandParent.
2. The ns1 namespace node is rendered for the first GrandChild, since
   it is inherited from Child.
3. The default namespace node is not rendered for the first GrandChild,
   since the output parent of GrandChild (Parent) has the same namespace
   node with the same value, which is in the node set.
4. The ns1 namespace node is rendered for the second GrandChild (same as 2).
5. The default namespace node is rendered for the second GrandChild,
   since it is explicitly declared, and has a different value than that of
   Parent.
6. The ns1 namespace node is rendered for the third GrandChild (same as 2).   
7. The default namespace node is not rendered for the third GrandChild 
   (same as 3).
8. The ns1 namespace node is rendered for the fourth GrandChild (same as 2).   
9. The default namespace node is not rendered fourth the third GrandChild 
   (same as 3).
-->
<!-- Result EC14N:

     
      
-->
<!-- Annotation EC14N:
1. The default namespace node is rendered for Parent, since it is visibly
   utilized by Parent.
2. The ns1 namespace attribute is rendered for the first GrandChild, since it
   is visibly utilized by GrandChild.
3. The default namespace node is not rendered for the first GrandChild, since
   it is not visibly utilized.
4. The ns1 namespace attribute is rendered for the second GrandChild, since it
   is visibly utilized by GrandChild.
5. The default namespace node is not rendered for the second GrandChild, since
   it is not visibly utilized by GrandChild. The Gender attribute is in no
   namespace.
6. The ns1 namespace node is not rendered for the third GrandChild, since it
   is not visibly utilized.
7. The default namespace node is not rendered for the third GrandChild. It is
   visibly utilized, but the same namespace node with the same value has already
   been rendered in Parent (an output parent of GrandChild).
8. The default namespace node is not rendered for the fourth GrandChild, since
   it is not visibly utilized.
9. The ns1 namespace node is rendered for the fourth GrandChild, since it is
   visibly utilized by the ns1:Gender attribute of GrandChild.
-->
<GrandParent xmlns="http://example.org/default">
  <Parent xmlns="http://example.org/default">
    <Child xmlns="http://example.org/default" xmlns:ns1="http://example.org/ns1">
      <ns1:GrandChild xmlns="http://example.org/default" xmlns:ns1="http://example.org/ns1"></ns1:GrandChild>
      <ns1:GrandChild xmlns="http://bar.com/default" xmlns:ns1="http://example.org/ns1" Gender="male"></ns1:GrandChild>
      <GrandChild xmlns="http://example.org/default" xmlns:ns1="http://example.org/ns1"></GrandChild>
      <GrandChild xmlns="http://example.org/default" xmlns:ns1="http://example.org/ns1" ns1:Gender="male"></GrandChild>
    </Child>
  </Parent>
</GrandParent>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/c14n-0.txt0000644000175000017500000000027607477166152024331 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/iaikTests.example3.xml0000644000175000017500000000700607477166152027063 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/c14n-4.txt0000644000175000017500000000057307477166152024335 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/c14n-1.html0000644000175000017500000000727707536065573024470 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<!-- XPath="self::Parent or (parent::Parent and not(self::Child)) or self::GrandChild or parent::GrandChild" -->
<!-- Result C14N:

    
  
-->
<!-- Annotation C14N:
1. Parent inherts xml:lang and xml:space since it is an orphan node.
2. Parent has explicitly declared attributes xml:foo and xml:fool.
3. GrandChild inherts xml:foo from its Child ancestor.
4. GrandChild inherits xml:fool from its Parent ancestor.
5. GrandChild inherits xml:lang from its Child ancestor.
6. GrandChild has explicitly declared attribute xml:space.
-->
<!-- Result EC14N:

    
  
-->
<!-- Annotation EC14N:
1. Only those attributes in the xml namespace are rendered, which are
   explicitely declared in the attribute axis of an element.
-->
<GrandParent xmlns="" xml:lang="en" xml:space="default">
  <Parent xmlns="" xml:foo="bar" xml:fool="barbar">
    <Child xmlns="" xml:foo="barbarossa" xml:lang="ge">
      <GrandChild xmlns="" xml:space="preserve"></GrandChild>
    </Child>
  </Parent>
</GrandParent>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/c14n-5.txt0000644000175000017500000000047107477166152024333 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/iaikTests.example1.xml0000644000175000017500000000236207477166152027061 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/c14n-2.txt0000644000175000017500000000006207477166152024324 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/iaikTests.example2.xml0000644000175000017500000000172607477166152027065 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/c14n-3.html0000644000175000017500000000633107536065573024460 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<!-- XPath="self::Parent or (parent::Parent and not(self::default:Child)) or self::GrandChild or parent::GrandChild" -->
<!-- additionalNSPrefixes="default http://example.org" -->
<!-- Result C14N:

    
  
-->
<!-- Annotation C14N:
1. The xmlns="" of Parent is not rendered, although it is explicitly declared.
   This is because Parent has no output parent with a default namespace decla-
   ration that is in the node set.
2. The xmlns="" of GrandChild is not rendered, although it is explicitly
   declared. This is because GrandChild has no output parent with a default
   namespace declaration that is in the node set.
-->
<!-- Result EC14N:

    
  
-->
<!-- Annotation EC14N:
See Annotation C14N.
-->
<GrandParent xmlns="">
  <Parent xmlns="">
    <Child xmlns="http://example.org">
      <GrandChild xmlns=""></GrandChild>
    </Child>
  </Parent>
</GrandParent>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/c14n-7.html0000644000175000017500000000730307536065573024464 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<!-- XPath="self::Parent or (parent::Parent and not(self::Child)) or self::ns1:GrandChild or parent::ns1:GrandChild" -->
<!-- additionalNSPrefixes="ns1 http://example.org/ns1" -->
<!-- InlusiveNamespacePrefixList="ns2" -->
<!-- Result C14N:

    
      
 -->
<!-- Annotation C14N:
1. The namespace nodes ns1 und ns2 are rendered for GrandChild, since
   they are both in scope for GrandChild and in the output node set.   
-->
<!-- Result EC14N:

    
      
-->
<!-- Annotation EC14N:
1. The namespace node ns1 is rendered for GrandChild since it is visibly
   utilized by GrandChild.
2. The namespace node ns2 is rendered since it is on the 
   InlusiveNamespacePrefixList and is therefore treated as in C14N mode.
-->
<GrandParent xmlns="">
  <Parent xmlns="">
    <Child xmlns="" xmlns:ns1="http://example.org/ns1" xmlns:ns2="http://example.org/ns2">
      <ns1:GrandChild xmlns="" xmlns:ns1="http://example.org/ns1" xmlns:ns2="http://example.org/ns2"></ns1:GrandChild>
    </Child>
  </Parent>
</GrandParent>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/iaikTests.example4.xml0000644000175000017500000000223407477166152027062 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y3/c14n-3.txt0000644000175000017500000000006207477166152024325 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y2/0000755000175000017500000000000012273503733022646 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/interop/c14n/Y2/signature-joseph-exc.xml0000644000175000017500000000741007477166152027450 0ustar tonytony ]> ancestor-or-self::e6 AaBWmuBu+YJ6/VVXKwlrdA== ancestor-or-self::e6 SjyCLpdMX/5X+8Wueu3tlg== ancestor-or-self::e6 lOOQdTLkMX7sv41ZlpwO0g== QY8y1yZWODi6TR/vlmHwz17B6dk5mekvRNJozYZUBovxQat0F2o4/Q==

8FkJgwdyizV5Vd0m6DA/DZsdweJdnkueYVUd7L8aA4JpZxrlCI/M7mDE/OGhEhgB nFzSTrBjSFpT7DG66uy7oJeE+RgkXO7EWWOEglMPwaZgGgi1oZarv95VOx3uO8W8 L7+S/3AuHNUZQD4b5bpdYAmjXFwz6dl0mKiXAvVuP9E=

mFf8DiMVNFXy0vag9oNGNW/g4u0= g8gRdNlq9EOTR2TjmVApqCAZAq3jEjOIxXbs8JBiZ+U7dV9geeXEy13GbYoP23Qr apZQo+35diw+cMYPHjN+iUCwUkiGWv7/piAK+Ootfw03etL8XiVWjtL5NBof2CNp wmAw7mrwmNG092y1e6HXSGMMZpaoth/P8xhsxCQsqI8= j0V14dc/I+okDAeG4ZbWUzb3HTFkEOC6feOMo5Dk218GcPqEKroVHaDBF9CmRV1v B8MUOExB+6ZNHfcs5Vaw0HVn62YiEBzrmKikx6SxO4Dg9L8I5WbHn37vxUKvHs8r 7+rma3kpZQftTMiBpJ8XK8Z6jg8VhuJqo9yZZO+p3I0=
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y2/c14n-2.html0000644000175000017500000004420607536065573024461 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<doc xmlns="" xmlns:foo="http://www.bar.org" xml:base="http://www.example.org/2002/">
   <e1 xmlns="" xmlns:foo="http://www.bar.org"></e1>
   <e2 xmlns="" xmlns:foo="http://www.bar.org"></e2>
   <e3 xmlns="" xmlns:foo="http://www.bar.org" id="elem3" name="elem3"></e3>
   <e4 xmlns="" xmlns:foo="http://www.bar.org" id="elem4" name="elem4"></e4>
   <e5 xmlns="http://example.org" xmlns:a="http://www.w3.org" xmlns:b="http://www.ietf.org" xmlns:foo="http://www.bar.org" attr="I'm" attr2="all" b:attr="sorted" a:attr="out"></e5>
   <e6 xmlns="" xmlns:a="http://www.w3.org" xmlns:foo="http://www.bar.org" test="../baz">
       <e7 xmlns="http://www.ietf.org" xmlns:a="http://www.w3.org" xmlns:foo="http://www.bar.org">
           <e8 xmlns="" xmlns:a="http://www.w3.org" xmlns:foo="http://www.bar.org" a:foo="bar">
               <e9 xmlns="" xmlns:a="http://www.ietf.org" xmlns:foo="http://www.bar.org" attr="default"></e9>
           </e8>
       </e7>
   </e6>
   <Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
      <SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" xml:base="http://www.example.org/2002/">
         <CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>
         <SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>
         <Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" URI="">
            <Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
               <Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
                  <XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
                     ancestor-or-self::e6
                  </XPath>
               </Transform>
               <Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></Transform>
            </Transforms>
            <DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/2001/04/xmldsig-more#md5"></DigestMethod>
            <DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">AaBWmuBu+YJ6/VVXKwlrdA==</DigestValue>
         </Reference>
         <Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" URI="">
            <Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
               <Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
                  <XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
                     ancestor-or-self::e6
                  </XPath>
               </Transform>
               <Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>
            </Transforms>
            <DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/2001/04/xmldsig-more#md5"></DigestMethod>
            <DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">SjyCLpdMX/5X+8Wueu3tlg==</DigestValue>
         </Reference>
         <Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" URI="">
            <Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
               <Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
                  <XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
                     ancestor-or-self::e6
                  </XPath>
               </Transform>
               <Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
                  <InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:foo="http://www.bar.org" PrefixList="a"></InclusiveNamespaces>
               </Transform>
            </Transforms>
            <DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/2001/04/xmldsig-more#md5"></DigestMethod>
            <DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">lOOQdTLkMX7sv41ZlpwO0g==</DigestValue>
         </Reference>
      </SignedInfo>
      <SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
         QY8y1yZWODi6TR/vlmHwz17B6dk5mekvRNJozYZUBovxQat0F2o4/Q==
      </SignatureValue>
      <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
         <KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
            <DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
               <P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
                  8FkJgwdyizV5Vd0m6DA/DZsdweJdnkueYVUd7L8aA4JpZxrlCI/M7mDE/OGhEhgB
                  nFzSTrBjSFpT7DG66uy7oJeE+RgkXO7EWWOEglMPwaZgGgi1oZarv95VOx3uO8W8
                  L7+S/3AuHNUZQD4b5bpdYAmjXFwz6dl0mKiXAvVuP9E=
               </P>
               <Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
                  mFf8DiMVNFXy0vag9oNGNW/g4u0=
               </Q>
               <G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
                  g8gRdNlq9EOTR2TjmVApqCAZAq3jEjOIxXbs8JBiZ+U7dV9geeXEy13GbYoP23Qr
                  apZQo+35diw+cMYPHjN+iUCwUkiGWv7/piAK+Ootfw03etL8XiVWjtL5NBof2CNp
                  wmAw7mrwmNG092y1e6HXSGMMZpaoth/P8xhsxCQsqI8=
               </G>
               <Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
                  j0V14dc/I+okDAeG4ZbWUzb3HTFkEOC6feOMo5Dk218GcPqEKroVHaDBF9CmRV1v
                  B8MUOExB+6ZNHfcs5Vaw0HVn62YiEBzrmKikx6SxO4Dg9L8I5WbHn37vxUKvHs8r
                  7+rma3kpZQftTMiBpJ8XK8Z6jg8VhuJqo9yZZO+p3I0=
               </Y>
            </DSAKeyValue>
         </KeyValue>
      </KeyInfo>
   </Signature>
</doc>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y2/c14n-0.html0000644000175000017500000004405407536065573024460 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<doc xmlns="" xmlns:foo="http://www.bar.org" xml:base="http://www.example.org/2002/">
   <e1 xmlns="" xmlns:foo="http://www.bar.org"></e1>
   <e2 xmlns="" xmlns:foo="http://www.bar.org"></e2>
   <e3 xmlns="" xmlns:foo="http://www.bar.org" id="elem3" name="elem3"></e3>
   <e4 xmlns="" xmlns:foo="http://www.bar.org" id="elem4" name="elem4"></e4>
   <e5 xmlns="http://example.org" xmlns:a="http://www.w3.org" xmlns:b="http://www.ietf.org" xmlns:foo="http://www.bar.org" attr="I'm" attr2="all" b:attr="sorted" a:attr="out"></e5>
   <e6 xmlns="" xmlns:a="http://www.w3.org" xmlns:foo="http://www.bar.org" test="../baz">
       <e7 xmlns="http://www.ietf.org" xmlns:a="http://www.w3.org" xmlns:foo="http://www.bar.org">
           <e8 xmlns="" xmlns:a="http://www.w3.org" xmlns:foo="http://www.bar.org" a:foo="bar">
               <e9 xmlns="" xmlns:a="http://www.ietf.org" xmlns:foo="http://www.bar.org" attr="default"></e9>
           </e8>
       </e7>
   </e6>
   <Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
      <SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" xml:base="http://www.example.org/2002/">
         <CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>
         <SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>
         <Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" URI="">
            <Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
               <Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
                  <XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
                     ancestor-or-self::e6
                  </XPath>
               </Transform>
               <Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></Transform>
            </Transforms>
            <DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/2001/04/xmldsig-more#md5"></DigestMethod>
            <DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">AaBWmuBu+YJ6/VVXKwlrdA==</DigestValue>
         </Reference>
         <Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" URI="">
            <Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
               <Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
                  <XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
                     ancestor-or-self::e6
                  </XPath>
               </Transform>
               <Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>
            </Transforms>
            <DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/2001/04/xmldsig-more#md5"></DigestMethod>
            <DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">SjyCLpdMX/5X+8Wueu3tlg==</DigestValue>
         </Reference>
         <Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" URI="">
            <Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
               <Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
                  <XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
                     ancestor-or-self::e6
                  </XPath>
               </Transform>
               <Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
                  <InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:foo="http://www.bar.org" PrefixList="a"></InclusiveNamespaces>
               </Transform>
            </Transforms>
            <DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/2001/04/xmldsig-more#md5"></DigestMethod>
            <DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">lOOQdTLkMX7sv41ZlpwO0g==</DigestValue>
         </Reference>
      </SignedInfo>
      <SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
         QY8y1yZWODi6TR/vlmHwz17B6dk5mekvRNJozYZUBovxQat0F2o4/Q==
      </SignatureValue>
      <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
         <KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
            <DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
               <P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
                  8FkJgwdyizV5Vd0m6DA/DZsdweJdnkueYVUd7L8aA4JpZxrlCI/M7mDE/OGhEhgB
                  nFzSTrBjSFpT7DG66uy7oJeE+RgkXO7EWWOEglMPwaZgGgi1oZarv95VOx3uO8W8
                  L7+S/3AuHNUZQD4b5bpdYAmjXFwz6dl0mKiXAvVuP9E=
               </P>
               <Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
                  mFf8DiMVNFXy0vag9oNGNW/g4u0=
               </Q>
               <G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
                  g8gRdNlq9EOTR2TjmVApqCAZAq3jEjOIxXbs8JBiZ+U7dV9geeXEy13GbYoP23Qr
                  apZQo+35diw+cMYPHjN+iUCwUkiGWv7/piAK+Ootfw03etL8XiVWjtL5NBof2CNp
                  wmAw7mrwmNG092y1e6HXSGMMZpaoth/P8xhsxCQsqI8=
               </G>
               <Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
                  j0V14dc/I+okDAeG4ZbWUzb3HTFkEOC6feOMo5Dk218GcPqEKroVHaDBF9CmRV1v
                  B8MUOExB+6ZNHfcs5Vaw0HVn62YiEBzrmKikx6SxO4Dg9L8I5WbHn37vxUKvHs8r
                  7+rma3kpZQftTMiBpJ8XK8Z6jg8VhuJqo9yZZO+p3I0=
               </Y>
            </DSAKeyValue>
         </KeyValue>
      </KeyInfo>
   </Signature>
</doc>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y2/.cvsignore0000644000175000017500000000002307773017673024655 0ustar tonytonyc14n-*.apache.html libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y2/c14n-1.txt0000644000175000017500000000031207477166152024320 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y2/c14n-0.txt0000644000175000017500000000045707477166152024331 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y2/c14n-1.html0000644000175000017500000004405407536065573024461 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<doc xmlns="" xmlns:foo="http://www.bar.org" xml:base="http://www.example.org/2002/">
   <e1 xmlns="" xmlns:foo="http://www.bar.org"></e1>
   <e2 xmlns="" xmlns:foo="http://www.bar.org"></e2>
   <e3 xmlns="" xmlns:foo="http://www.bar.org" id="elem3" name="elem3"></e3>
   <e4 xmlns="" xmlns:foo="http://www.bar.org" id="elem4" name="elem4"></e4>
   <e5 xmlns="http://example.org" xmlns:a="http://www.w3.org" xmlns:b="http://www.ietf.org" xmlns:foo="http://www.bar.org" attr="I'm" attr2="all" b:attr="sorted" a:attr="out"></e5>
   <e6 xmlns="" xmlns:a="http://www.w3.org" xmlns:foo="http://www.bar.org" test="../baz">
       <e7 xmlns="http://www.ietf.org" xmlns:a="http://www.w3.org" xmlns:foo="http://www.bar.org">
           <e8 xmlns="" xmlns:a="http://www.w3.org" xmlns:foo="http://www.bar.org" a:foo="bar">
               <e9 xmlns="" xmlns:a="http://www.ietf.org" xmlns:foo="http://www.bar.org" attr="default"></e9>
           </e8>
       </e7>
   </e6>
   <Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
      <SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" xml:base="http://www.example.org/2002/">
         <CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>
         <SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>
         <Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" URI="">
            <Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
               <Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
                  <XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
                     ancestor-or-self::e6
                  </XPath>
               </Transform>
               <Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></Transform>
            </Transforms>
            <DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/2001/04/xmldsig-more#md5"></DigestMethod>
            <DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">AaBWmuBu+YJ6/VVXKwlrdA==</DigestValue>
         </Reference>
         <Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" URI="">
            <Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
               <Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
                  <XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
                     ancestor-or-self::e6
                  </XPath>
               </Transform>
               <Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>
            </Transforms>
            <DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/2001/04/xmldsig-more#md5"></DigestMethod>
            <DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">SjyCLpdMX/5X+8Wueu3tlg==</DigestValue>
         </Reference>
         <Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" URI="">
            <Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
               <Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
                  <XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
                     ancestor-or-self::e6
                  </XPath>
               </Transform>
               <Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
                  <InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:foo="http://www.bar.org" PrefixList="a"></InclusiveNamespaces>
               </Transform>
            </Transforms>
            <DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org" Algorithm="http://www.w3.org/2001/04/xmldsig-more#md5"></DigestMethod>
            <DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">lOOQdTLkMX7sv41ZlpwO0g==</DigestValue>
         </Reference>
      </SignedInfo>
      <SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
         QY8y1yZWODi6TR/vlmHwz17B6dk5mekvRNJozYZUBovxQat0F2o4/Q==
      </SignatureValue>
      <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
         <KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
            <DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
               <P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
                  8FkJgwdyizV5Vd0m6DA/DZsdweJdnkueYVUd7L8aA4JpZxrlCI/M7mDE/OGhEhgB
                  nFzSTrBjSFpT7DG66uy7oJeE+RgkXO7EWWOEglMPwaZgGgi1oZarv95VOx3uO8W8
                  L7+S/3AuHNUZQD4b5bpdYAmjXFwz6dl0mKiXAvVuP9E=
               </P>
               <Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
                  mFf8DiMVNFXy0vag9oNGNW/g4u0=
               </Q>
               <G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
                  g8gRdNlq9EOTR2TjmVApqCAZAq3jEjOIxXbs8JBiZ+U7dV9geeXEy13GbYoP23Qr
                  apZQo+35diw+cMYPHjN+iUCwUkiGWv7/piAK+Ootfw03etL8XiVWjtL5NBof2CNp
                  wmAw7mrwmNG092y1e6HXSGMMZpaoth/P8xhsxCQsqI8=
               </G>
               <Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:foo="http://www.bar.org">
                  j0V14dc/I+okDAeG4ZbWUzb3HTFkEOC6feOMo5Dk218GcPqEKroVHaDBF9CmRV1v
                  B8MUOExB+6ZNHfcs5Vaw0HVn62YiEBzrmKikx6SxO4Dg9L8I5WbHn37vxUKvHs8r
                  7+rma3kpZQftTMiBpJ8XK8Z6jg8VhuJqo9yZZO+p3I0=
               </Y>
            </DSAKeyValue>
         </KeyValue>
      </KeyInfo>
   </Signature>
</doc>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y2/c14n-2.txt0000644000175000017500000000035007477166152024323 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/0000755000175000017500000000000012273503733022650 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-11.txt0000644000175000017500000000051307533734515024403 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-15.html0000644000175000017500000046772607557514362024565 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-12.txt0000644000175000017500000000035207533734515024405 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-11.html0000644000175000017500000046772607557514362024561 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-17.html0000644000175000017500000046772607557514362024567 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/signature-manifest.xml0000644000175000017500000005551411670122756027213 0ustar tonytony ancestor-or-self::bar:Something lCOS/JtpmOE+4eXFaOpY4v4BOgI= ancestor-or-self::bar:Something and ((name() != "bar") or parent::bar:Something) and ((name() != "foo") or parent::foo:Something) and ((name() != "baz") or parent::baz:Something) and ((name() != "") or self::text()) OyVqEWXE7C+5NyKtceUkdmiFO9A= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) OyVqEWXE7C+5NyKtceUkdmiFO9A= ancestor-or-self::bar:Something and not (self::foo:Something) and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) mL1aAQ/RoOPO0SHj9KR+yY3n4CM= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) != count(parent::node()/namespace::* | self::node())) bQgF8ICymYZTuUP0FE40l3Q7BZk= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "")) bQgF8ICymYZTuUP0FE40l3Q7BZk= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) = count(parent::node()/namespace::* | self::node())) IJQgd59FJ1PAxxCY5mIL6cZemi0= ancestor-or-self::bar:Something and (string(self::node()) = namespace-uri(parent::node())) SXGijO1eArEaXGphF0dxwj5fp1g= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or ((name() = "") and ((count(ancestor-or-self::node()) mod 2) = 1))) rNm4Id9ah12nugzXAUJgjas7ls0= ancestor-or-self::bar:Something Wa7sEWwUmSNsv6p75omGKXL6rjI= ancestor-or-self::bar:Something and ((name() != "bar") or parent::bar:Something) and ((name() != "foo") or parent::foo:Something) and ((name() != "baz") or parent::baz:Something) and ((name() != "") or self::text()) Wa7sEWwUmSNsv6p75omGKXL6rjI= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) Wa7sEWwUmSNsv6p75omGKXL6rjI= ancestor-or-self::bar:Something and not (self::foo:Something) and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) uOQJQIIUETYyk0+YEBdbEQwrYbw= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) != count(parent::node()/namespace::* | self::node())) 6Wmm693F38R+R8E9DZM+MVXXMME= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "")) 6Wmm693F38R+R8E9DZM+MVXXMME= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) = count(parent::node()/namespace::* | self::node())) 2jmj7l5rSw0yVb/vlWAYkK/YBwk= ancestor-or-self::bar:Something and (string(self::node()) = namespace-uri(parent::node())) 2jmj7l5rSw0yVb/vlWAYkK/YBwk= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or ((name() = "") and ((count(ancestor-or-self::node()) mod 2) = 1))) 6Wmm693F38R+R8E9DZM+MVXXMME= ancestor-or-self::bar:Something AWtqDbXWKf8TV78C2d16uarbpGk= ancestor-or-self::bar:Something and ((name() != "bar") or parent::bar:Something) and ((name() != "foo") or parent::foo:Something) and ((name() != "baz") or parent::baz:Something) and ((name() != "") or self::text()) Wa7sEWwUmSNsv6p75omGKXL6rjI= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) Wa7sEWwUmSNsv6p75omGKXL6rjI= ancestor-or-self::bar:Something and not (self::foo:Something) and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) uOQJQIIUETYyk0+YEBdbEQwrYbw= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) != count(parent::node()/namespace::* | self::node())) 6Wmm693F38R+R8E9DZM+MVXXMME= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "")) 6Wmm693F38R+R8E9DZM+MVXXMME= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) = count(parent::node()/namespace::* | self::node())) NpjMPzEF5YZFbz4ls7eN36QWdXs= ancestor-or-self::bar:Something and (string(self::node()) = namespace-uri(parent::node())) 2jmj7l5rSw0yVb/vlWAYkK/YBwk= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or ((name() = "") and ((count(ancestor-or-self::node()) mod 2) = 1))) EacBN2aBBNSjpCOzZUOOvSv4zHU= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or ((name() = "") and ((count(ancestor-or-self::node()) mod 2) = 1))) EacBN2aBBNSjpCOzZUOOvSv4zHU= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or ((name() = "") and ((count(ancestor-or-self::node()) mod 2) = 1))) EacBN2aBBNSjpCOzZUOOvSv4zHU= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or ((name() = "") and ((count(ancestor-or-self::node()) mod 2) = 1))) EacBN2aBBNSjpCOzZUOOvSv4zHU= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or ((name() = "") and ((count(ancestor-or-self::node()) mod 2) = 1))) EacBN2aBBNSjpCOzZUOOvSv4zHU= libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-9.html0000644000175000017500000046772607557514362024510 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-26.txt0000644000175000017500000000045407533734515024415 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-13.txt0000644000175000017500000000034207533734515024405 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-23.txt0000644000175000017500000000034207533734515024406 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-4.html0000644000175000017500000046772607557514362024503 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-10.html0000644000175000017500000046772607557514362024560 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/Readme.txt0000644000175000017500000000133407533734515024616 0ustar tonytonySignature[1] using Canonical XML[2] and Exclusive Canonical XML[3] [1] http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/ [2] http://www.w3.org/TR/2001/REC-xml-c14n-20010315 [3] http://www.w3.org/TR/2002/PR-xml-exc-c14n-20020524/ . signature.xml - The signatures . c14n-*.xml - The intermediate c14n output This signature demonstrates canonicalization behaviour when parts of the namespace axis are excluded or included. The same examples are repeated for canonical XML, exclusive canonical XML and exclusive canonical XML with an inclusive namespace prefix list. Some examples repeat the same behaviour with different XPath expressions. Merlin Hughes Baltimore Technologies, Ltd. Tuesday, May 28, 2002 libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-18.html0000644000175000017500000047734207557514362024563 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-7.txt0000644000175000017500000000025707533734515024335 0ustar tonytony xmlns:bar="http://example.org/bar" xmlns:foo="http://example.org/foo" xmlns:bar="http://example.org/bar" xmlns:foo="http://example.org/foo" xmlns:baz="http://example.org/baz"libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-2.html0000644000175000017500000046772607557514362024501 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-25.html0000644000175000017500000047734207557514362024561 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-15.txt0000644000175000017500000000000007533734515024376 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-22.txt0000644000175000017500000000034207533734515024405 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/signature.xml0000644000175000017500000005674707533734515025425 0ustar tonytony ancestor-or-self::bar:Something lCOS/JtpmOE+4eXFaOpY4v4BOgI= ancestor-or-self::bar:Something and ((name() != "bar") or parent::bar:Something) and ((name() != "foo") or parent::foo:Something) and ((name() != "baz") or parent::baz:Something) and ((name() != "") or self::text()) OyVqEWXE7C+5NyKtceUkdmiFO9A= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) OyVqEWXE7C+5NyKtceUkdmiFO9A= ancestor-or-self::bar:Something and not (self::foo:Something) and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) mL1aAQ/RoOPO0SHj9KR+yY3n4CM= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) != count(parent::node()/namespace::* | self::node())) bQgF8ICymYZTuUP0FE40l3Q7BZk= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "")) bQgF8ICymYZTuUP0FE40l3Q7BZk= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) = count(parent::node()/namespace::* | self::node())) IJQgd59FJ1PAxxCY5mIL6cZemi0= ancestor-or-self::bar:Something and (string(self::node()) = namespace-uri(parent::node())) SXGijO1eArEaXGphF0dxwj5fp1g= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or ((name() = "") and ((count(ancestor-or-self::node()) mod 2) = 1))) rNm4Id9ah12nugzXAUJgjas7ls0= ancestor-or-self::bar:Something Wa7sEWwUmSNsv6p75omGKXL6rjI= ancestor-or-self::bar:Something and ((name() != "bar") or parent::bar:Something) and ((name() != "foo") or parent::foo:Something) and ((name() != "baz") or parent::baz:Something) and ((name() != "") or self::text()) Wa7sEWwUmSNsv6p75omGKXL6rjI= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) Wa7sEWwUmSNsv6p75omGKXL6rjI= ancestor-or-self::bar:Something and not (self::foo:Something) and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) uOQJQIIUETYyk0+YEBdbEQwrYbw= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) != count(parent::node()/namespace::* | self::node())) 6Wmm693F38R+R8E9DZM+MVXXMME= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "")) 6Wmm693F38R+R8E9DZM+MVXXMME= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) = count(parent::node()/namespace::* | self::node())) 2jmj7l5rSw0yVb/vlWAYkK/YBwk= ancestor-or-self::bar:Something and (string(self::node()) = namespace-uri(parent::node())) 2jmj7l5rSw0yVb/vlWAYkK/YBwk= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or ((name() = "") and ((count(ancestor-or-self::node()) mod 2) = 1))) 6Wmm693F38R+R8E9DZM+MVXXMME= ancestor-or-self::bar:Something AWtqDbXWKf8TV78C2d16uarbpGk= ancestor-or-self::bar:Something and ((name() != "bar") or parent::bar:Something) and ((name() != "foo") or parent::foo:Something) and ((name() != "baz") or parent::baz:Something) and ((name() != "") or self::text()) Wa7sEWwUmSNsv6p75omGKXL6rjI= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) Wa7sEWwUmSNsv6p75omGKXL6rjI= ancestor-or-self::bar:Something and not (self::foo:Something) and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) uOQJQIIUETYyk0+YEBdbEQwrYbw= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) != count(parent::node()/namespace::* | self::node())) 6Wmm693F38R+R8E9DZM+MVXXMME= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "")) 6Wmm693F38R+R8E9DZM+MVXXMME= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) = count(parent::node()/namespace::* | self::node())) NpjMPzEF5YZFbz4ls7eN36QWdXs= ancestor-or-self::bar:Something and (string(self::node()) = namespace-uri(parent::node())) 2jmj7l5rSw0yVb/vlWAYkK/YBwk= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or ((name() = "") and ((count(ancestor-or-self::node()) mod 2) = 1))) EacBN2aBBNSjpCOzZUOOvSv4zHU= Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==

3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi 89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=

hDLcFK0GO/Hz1arxOOvsgM/VLyU= nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM 8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA= cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv +OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=
CN=Merlin Hughes,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE CN=Transient CA,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE 1017788370348 MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS 8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1 MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU 2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q 4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch 3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx 0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D 451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7 PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5 NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25 4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-12.html0000644000175000017500000046772607557514362024562 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-10.txt0000644000175000017500000000051307533734515024402 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-8.txt0000644000175000017500000000047507533734515024340 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-20.html0000644000175000017500000047734207557514362024554 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-6.txt0000644000175000017500000000123107533734515024325 0ustar tonytony xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-6.html0000644000175000017500000046772607557514362024505 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-19.html0000644000175000017500000047734207557514362024564 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-22.html0000644000175000017500000047734207557514362024556 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-0.html0000644000175000017500000046772607557514362024477 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/.cvsignore0000644000175000017500000000002307773017673024657 0ustar tonytonyc14n-*.apache.html libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-23.html0000644000175000017500000047734207557514362024557 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-1.txt0000644000175000017500000000064207533734515024325 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-20.txt0000644000175000017500000000051307533734515024403 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-5.html0000644000175000017500000046772607557514362024504 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-19.txt0000644000175000017500000000051307533734515024413 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-0.txt0000644000175000017500000000057007533734515024324 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-25.txt0000644000175000017500000000000007533734515024377 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-17.txt0000644000175000017500000000034207533734515024411 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-4.txt0000644000175000017500000000036307533734515024330 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-24.txt0000644000175000017500000000021407533734515024405 0ustar tonytony xmlns="http://example.org/" xmlns="http://example.org/" xmlns="http://example.org/" xmlns="http://example.org/" xmlns="http://example.org/"libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-1.html0000644000175000017500000046772607557514362024500 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-9.txt0000644000175000017500000000051307533734515024332 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-18.txt0000644000175000017500000000054707533734515024421 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-14.txt0000644000175000017500000000034207533734515024406 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-14.html0000644000175000017500000046772607557514362024564 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-13.html0000644000175000017500000046772607557514362024563 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-8.html0000644000175000017500000046772607557514362024507 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-21.html0000644000175000017500000047734207557514362024555 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-21.txt0000644000175000017500000000035207533734515024405 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-27.txt0000644000175000017500000004437707533734515024432 0ustar tonytony ancestor-or-self::bar:Something lCOS/JtpmOE+4eXFaOpY4v4BOgI= ancestor-or-self::bar:Something and ((name() != "bar") or parent::bar:Something) and ((name() != "foo") or parent::foo:Something) and ((name() != "baz") or parent::baz:Something) and ((name() != "") or self::text()) OyVqEWXE7C+5NyKtceUkdmiFO9A= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) OyVqEWXE7C+5NyKtceUkdmiFO9A= ancestor-or-self::bar:Something and not (self::foo:Something) and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) mL1aAQ/RoOPO0SHj9KR+yY3n4CM= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) != count(parent::node()/namespace::* | self::node())) bQgF8ICymYZTuUP0FE40l3Q7BZk= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "")) bQgF8ICymYZTuUP0FE40l3Q7BZk= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) = count(parent::node()/namespace::* | self::node())) IJQgd59FJ1PAxxCY5mIL6cZemi0= ancestor-or-self::bar:Something and (string(self::node()) = namespace-uri(parent::node())) SXGijO1eArEaXGphF0dxwj5fp1g= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or ((name() = "") and ((count(ancestor-or-self::node()) mod 2) = 1))) rNm4Id9ah12nugzXAUJgjas7ls0= ancestor-or-self::bar:Something Wa7sEWwUmSNsv6p75omGKXL6rjI= ancestor-or-self::bar:Something and ((name() != "bar") or parent::bar:Something) and ((name() != "foo") or parent::foo:Something) and ((name() != "baz") or parent::baz:Something) and ((name() != "") or self::text()) Wa7sEWwUmSNsv6p75omGKXL6rjI= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) Wa7sEWwUmSNsv6p75omGKXL6rjI= ancestor-or-self::bar:Something and not (self::foo:Something) and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) uOQJQIIUETYyk0+YEBdbEQwrYbw= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) != count(parent::node()/namespace::* | self::node())) 6Wmm693F38R+R8E9DZM+MVXXMME= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "")) 6Wmm693F38R+R8E9DZM+MVXXMME= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) = count(parent::node()/namespace::* | self::node())) 2jmj7l5rSw0yVb/vlWAYkK/YBwk= ancestor-or-self::bar:Something and (string(self::node()) = namespace-uri(parent::node())) 2jmj7l5rSw0yVb/vlWAYkK/YBwk= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or ((name() = "") and ((count(ancestor-or-self::node()) mod 2) = 1))) 6Wmm693F38R+R8E9DZM+MVXXMME= ancestor-or-self::bar:Something AWtqDbXWKf8TV78C2d16uarbpGk= ancestor-or-self::bar:Something and ((name() != "bar") or parent::bar:Something) and ((name() != "foo") or parent::foo:Something) and ((name() != "baz") or parent::baz:Something) and ((name() != "") or self::text()) Wa7sEWwUmSNsv6p75omGKXL6rjI= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) Wa7sEWwUmSNsv6p75omGKXL6rjI= ancestor-or-self::bar:Something and not (self::foo:Something) and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) uOQJQIIUETYyk0+YEBdbEQwrYbw= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) != count(parent::node()/namespace::* | self::node())) 6Wmm693F38R+R8E9DZM+MVXXMME= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "")) 6Wmm693F38R+R8E9DZM+MVXXMME= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) = count(parent::node()/namespace::* | self::node())) NpjMPzEF5YZFbz4ls7eN36QWdXs= ancestor-or-self::bar:Something and (string(self::node()) = namespace-uri(parent::node())) 2jmj7l5rSw0yVb/vlWAYkK/YBwk= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or ((name() = "") and ((count(ancestor-or-self::node()) mod 2) = 1))) EacBN2aBBNSjpCOzZUOOvSv4zHU= libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-26.html0000644000175000017500000047734207557514362024562 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-5.txt0000644000175000017500000000036307533734515024331 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-2.txt0000644000175000017500000000064207533734515024326 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-16.txt0000644000175000017500000000000007533734515024377 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-3.html0000644000175000017500000046772607557514362024502 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/signatureStripped.xml0000644000175000017500000001276707533734515027132 0ustar tonytony ancestor-or-self::bar:Something and ((name() != "bar") or parent::bar:Something) and ((name() != "foo") or parent::foo:Something) and ((name() != "baz") or parent::baz:Something) and ((name() != "") or self::text()) OyVqEWXE7C+5NyKtceUkdmiFO9A= Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==

3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi 89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=

hDLcFK0GO/Hz1arxOOvsgM/VLyU= nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM 8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA= cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv +OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=
CN=Merlin Hughes,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE CN=Transient CA,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE 1017788370348 MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS 8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1 MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU 2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q 4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch 3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx 0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D 451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7 PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5 NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25 4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-7.html0000644000175000017500000046772607557514362024506 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-16.html0000644000175000017500000046772607557514362024566 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-24.html0000644000175000017500000047734207557514362024560 0ustar tonytony Caninical XML node set

Explanation of the output

The following text contains the nodeset of the given Reference before it is canonicalized. There exist four different styles to indicate how a given node is treated.

  • A node which is in the node set is labeled using the INCLUDED style.
  • A node which is NOT in the node set is labeled EXCLUDED style.
  • A namespace which is in the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.
  • A namespace which is in NOT the node set AND in the InclusiveNamespaces PrefixList is labeled using the INCLUDEDINCLUSIVENAMESPACE style.

Output

<foo:Root xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
··<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·····<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<bar:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
···········<foo:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
·············<baz:Something xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"></baz:Something>¶
···········</foo:Something>¶
········</bar:Something>¶
·····</foo:Something>¶
··</bar:Something>¶
··<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
····<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">¶
······<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>¶
······<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">lCOS/JtpmOE+4eXFaOpY4v4BOgI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">OyVqEWXE7C+5NyKtceUkdmiFO9A=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">mL1aAQ/RoOPO0SHj9KR+yY3n4CM=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">bQgF8ICymYZTuUP0FE40l3Q7BZk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">IJQgd59FJ1PAxxCY5mIL6cZemi0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">SXGijO1eArEaXGphF0dxwj5fp1g=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">rNm4Id9ah12nugzXAUJgjas7ls0=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">AWtqDbXWKf8TV78C2d16uarbpGk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············((name()·!=·"bar")·or·parent::bar:Something)··and¶
··············((name()·!=·"foo")·or·parent::foo:Something)··and¶
··············((name()·!=·"baz")·or·parent::baz:Something)··and¶
··············((name()·!=·"")·or·self::text())¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">Wa7sEWwUmSNsv6p75omGKXL6rjI=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············not·(self::foo:Something)··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············(string(self::node())·=·namespace-uri(parent::node())))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">uOQJQIIUETYyk0+YEBdbEQwrYbw=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··!=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·""))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">6Wmm693F38R+R8E9DZM+MVXXMME=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(count(parent::node()/namespace::*)··=¶
···············count(parent::node()/namespace::*·|·self::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">NpjMPzEF5YZFbz4ls7eN36QWdXs=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(string(self::node())·=·namespace-uri(parent::node()))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">2jmj7l5rSw0yVb/vlWAYkK/YBwk=</DigestValue>¶
······</Reference>¶
······<Reference xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" URI="">¶
········<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">¶
············<XPath xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··············¶
··············ancestor-or-self::bar:Something··and¶
··············(self::text()··or¶
···············(namespace-uri()·!=·"")··or¶
···············((name()·=·"")··and¶
················((count(ancestor-or-self::node())·mod·2)·=·1)))¶
············</XPath>¶
··········</Transform>¶
··········<Transform xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">¶
············<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" PrefixList="#default"></InclusiveNamespaces>¶
··········</Transform>¶
········</Transforms>¶
········<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>¶
········<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">EacBN2aBBNSjpCOzZUOOvSv4zHU=</DigestValue>¶
······</Reference>¶
····</SignedInfo>¶
····<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······Fx34Vc07fXac6qmshhhLe8ogjElSmC6YxTnhxj8wMTSkfvxY+wYtrQ==¶
····</SignatureValue>¶
····<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
······<KeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<DSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<P xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH¶
············Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi¶
············89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=¶
··········</P>¶
··········<Q xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">hDLcFK0GO/Hz1arxOOvsgM/VLyU=</Q>¶
··········<G xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z¶
············Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM¶
············8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA=¶
··········</G>¶
··········<Y xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i¶
············Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv¶
············+OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=¶
··········</Y>¶
········</DSAKeyValue>¶
······</KeyValue>¶
······<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
········<X509SubjectName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········CN=Merlin·Hughes,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
········</X509SubjectName>¶
········<X509IssuerSerial xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········<X509IssuerName xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
············CN=Transient·CA,OU=X/Secure,O=Baltimore·Technologies·Ltd.,ST=Dublin,C=IE¶
··········</X509IssuerName>¶
··········<X509SerialNumber xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">1017788370348</X509SerialNumber>¶
········</X509IssuerSerial>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl¶
··········czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn¶
··········Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS¶
··········8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1¶
··········MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx¶
··········YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU¶
··········2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N¶
··········A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q¶
··········4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA¶
··········R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL¶
··········ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE¶
··········lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj¶
··········Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn¶
········</X509Certificate>¶
········<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo">¶
··········MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx¶
··········DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll¶
··········cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB¶
··········MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch¶
··········3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx¶
··········0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw¶
··········w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg¶
··········nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ¶
··········t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D¶
··········451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7¶
··········PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5¶
··········NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25¶
··········4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA¶
··········MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s¶
··········gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==¶
········</X509Certificate>¶
······</X509Data>¶
····</KeyInfo>¶
··</Signature></foo:Root>
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y4/c14n-3.txt0000644000175000017500000000054307533734515024327 0ustar tonytony xmlns:foo="http://example.org/foo" xmlns:foo="http://example.org/foo" libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/0000755000175000017500000000000012273503733022651 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-11.txt0000644000175000017500000000074507504076531024406 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-12.txt0000644000175000017500000000061007504076531024376 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-26.txt0000644000175000017500000000100707504076531024404 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-13.txt0000644000175000017500000000057407504076531024410 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-23.txt0000644000175000017500000000057407504076531024411 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/Readme.txt0000644000175000017500000000133307504076531024611 0ustar tonytonySignature[1] using Canonical XML[2] and Exclusive Canonical XML[3] [1] http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/ [2] http://www.w3.org/TR/2001/REC-xml-c14n-20010315 [3] http://www.w3.org/TR/2002/PR-xml-exc-c14n-20020524/ . signature.xml - The signatures . c14n-*.xml - The intermediate c14n output This signature demonstrates canonicalization behaviour when parts of the namespace axis are excluded or included. The same examples are repeated for canonical XML, exclusive canonical XML and exclusive canonical XML with an inclusive namespace prefix list. Some examples repeat the same behaviour with different XPath expressions. Merlin Hughes Baltimore Technologies, Ltd. Friday, May 31, 2002 libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-7.txt0000644000175000017500000000043007504076531024322 0ustar tonytony xmlns:bar="http://example.org/bar" xmlns:foo="http://example.org/foo" xmlns:foo="http://example.org/foo" xmlns:bar="http://example.org/bar" xmlns:foo="http://example.org/foo" xmlns:foo="http://example.org/foo" xmlns:foo="http://example.org/foo" xmlns:baz="http://example.org/baz"libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-15.txt0000644000175000017500000000000007504076531024372 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-22.txt0000644000175000017500000000057407504076531024410 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/signature.xml0000644000175000017500000005425307504076531025407 0ustar tonytony ancestor-or-self::bar:Something zDcKZDPIDity6ezoUjjYh5l5HD8= ancestor-or-self::bar:Something and ((name() != "bar") or parent::bar:Something) and ((name() != "foo") or parent::foo:Something) and ((name() != "baz") or parent::baz:Something) and ((name() != "") or self::text()) c6/BJXIi3MjZG8+1xfVv0U0OF/s= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) jT1amifr+CPI+9DdvhzLAJhMggs= ancestor-or-self::bar:Something and not (self::foo:Something) and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) rwkxkAxYpYzu6x85sa2RgCWmn2Q= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) != count(parent::node()/namespace::* | self::node())) wH13J/+xZdks1qYv5s8oQD1u4PE= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "")) wH13J/+xZdks1qYv5s8oQD1u4PE= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) = count(parent::node()/namespace::* | self::node())) TYZShIzLB4+/2u+yVB7OocXtWyI= ancestor-or-self::bar:Something and (string(self::node()) = namespace-uri(parent::node())) EhCKd+AMiKcL/i41otNu2FnO+/s= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or ((name() = "") and ((count(ancestor-or-self::node()) mod 2) = 1))) 5oWfKR+g5kK86E3FRTBck+R/BQ0= ancestor-or-self::bar:Something uKgNnJZ4MvqphhpPjor3iChHsQQ= ancestor-or-self::bar:Something and ((name() != "bar") or parent::bar:Something) and ((name() != "foo") or parent::foo:Something) and ((name() != "baz") or parent::baz:Something) and ((name() != "") or self::text()) PMxe5U6Yzpybj86NXLeXND6J7z8= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) uKgNnJZ4MvqphhpPjor3iChHsQQ= ancestor-or-self::bar:Something and not (self::foo:Something) and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) 8yo+TMHoDprtw3V8HBuaX7I2eYA= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) != count(parent::node()/namespace::* | self::node())) yFhy1S9CS8j2bPAgM43KZcSX8Us= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "")) yFhy1S9CS8j2bPAgM43KZcSX8Us= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) = count(parent::node()/namespace::* | self::node())) 2jmj7l5rSw0yVb/vlWAYkK/YBwk= ancestor-or-self::bar:Something and (string(self::node()) = namespace-uri(parent::node())) 2jmj7l5rSw0yVb/vlWAYkK/YBwk= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or ((name() = "") and ((count(ancestor-or-self::node()) mod 2) = 1))) yFhy1S9CS8j2bPAgM43KZcSX8Us= ancestor-or-self::bar:Something K5OrULSkVjkuQd85gxbrkcowg60= ancestor-or-self::bar:Something and ((name() != "bar") or parent::bar:Something) and ((name() != "foo") or parent::foo:Something) and ((name() != "baz") or parent::baz:Something) and ((name() != "") or self::text()) PMxe5U6Yzpybj86NXLeXND6J7z8= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) uKgNnJZ4MvqphhpPjor3iChHsQQ= ancestor-or-self::bar:Something and not (self::foo:Something) and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) 8yo+TMHoDprtw3V8HBuaX7I2eYA= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) != count(parent::node()/namespace::* | self::node())) yFhy1S9CS8j2bPAgM43KZcSX8Us= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "")) yFhy1S9CS8j2bPAgM43KZcSX8Us= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) = count(parent::node()/namespace::* | self::node())) 9nKcDwpjNsAMgP+d+YYSVix6DG0= ancestor-or-self::bar:Something and (string(self::node()) = namespace-uri(parent::node())) 2jmj7l5rSw0yVb/vlWAYkK/YBwk= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or ((name() = "") and ((count(ancestor-or-self::node()) mod 2) = 1))) CwltHOmCf0tFSyrqRDYQNFT4eo8= N6aqg79OKMQzkU7uTHRmn4ryplhaTh0OFlCRqa/rS+pUBV6M8nTX5A==

3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi 89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=

hDLcFK0GO/Hz1arxOOvsgM/VLyU= nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM 8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA= cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv +OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=
CN=Merlin Hughes,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE CN=Transient CA,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE 1017788370348 MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS 8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1 MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU 2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q 4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch 3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx 0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D 451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7 PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5 NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25 4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-10.txt0000644000175000017500000000101007504076531024367 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/merlin-c14n-three.tar.gz0000644000175000017500000001255707504076531027152 0ustar tonytonyMe<][ʶ^WzlV"w4;{pSQPQP  Eq~EmMw9jV_U #l oDAÊ \ J`8|a7$Qq:s/TO٦Ih|o@GPCAE:G-?#)\Yado\Rs?Aĕ"}͕˯ժg| BZ_=fٜȲyR(=HrmoV*E_ˆ۔"mnrv6H8UK׸R}R'j>YzG?~)l5ϫ`Zd bսmQCy ZTިqF)+g[c:`Ew4MF7%ZGR]cny\]f)Thh,v w]Zy+A&!f~UFq~.D7uόz]5cEU~%Ʒ uLc8ǍM ;babj7ݜ~4;36~P}uaMjK*AXYEo⟞-%޽{|-ԿwzYOQ R g#3m(֠ ըha]V f|NB;eⰨ^t>Un*w2PH!@9kkÓmK0E/`r/\KfR$xV"xb Ziv`9̳*WE`%mAH dSݍƢZ 2P+8߁_&$e: O@N|D@+򫓉K024E|\ KR,/t:VoA1ՀQnCBkÛ[_W+:qe"ZҳT{ j825…/M0fC#߻1}mo"otzyc9ihC(J2oZ|R])ٜD@o5\n)ڵ-#v9bA%U"fw8s7x(Y/$ )Z}\iI8Ib0]a$ٛ=tZf1^0֑)TG|.r7ߎg59~I``Qcu6iCp{#Zӓo&ա>OR^Q /0WXPaYQcwyۆpQm۳m-B}+y»7vn7VCAk]}1UKalmM8&3$S"MI6(n‘@M*_5RߦR@e9Ql.evGrȖEW"%E#қ^"u{ê5I;j+8L+l֔Y|MDl~q"\ĊhIpXdSv-(tőH(J"#0uVW5 CÚGMlc5#-6M8;S&> טu 0FOt*n- d:h4( n,I8/8a4s製i/k1_o&z™LЉq0*StX u\r;p$dIbw@ٖorMU&#\Q&ׄAOxܘ[pWDP~J?iͩ6R $pS 䎪AUY$MdM SփͪbOʐ!N\:~WtNs&ZMuXy-P2e`"X!M޽\* "i,$逳>%SZa[tvTRh&6jb&Iwl7rO?ڣΚ&T;Ojzj/[ k[2Oq|Ǘ`uAQFah֎*ħa&lSR.Hw'ͦz[vK`B=2NA<=fc&fFwnN&"nDSXd$L';҂[T[ &3? #ゝƐrtGU Sˌs<#-Wm*,y8QÉNw1,HUh$ŵUaZ_;Kg^A/6*{376]i+(͡-VC /.,(Z؎nFUդ1ڣ% 97)P:]ȜD}n22[mu܋Yɦ[U2†:]b%T5ق|h!;XJHU%Msg)v(f,#u ޙh0d^+;,~11ю*ӭdɃTCZni'hGLxy{ck~۟wn/k_.߷YS>+>!^?wn~rw.{s:[Y9Csx!ap9? ||S9N/J/C'O%C~%S#?yb߻\9}Sb2C.=j;&}m/"3n?X9׶?Tr?99A)gz(IS_?x{)a)?!?XE~t1 xX-_+ag<_|E)~l><]|=)?9?_O79,MN."yAK?<㲟}r_wy,rg<]<}G"~ĭ?ۏCmVQNEK49(Ox.?ze,V5ճ7jl`<-G Ǵ>ouD lǕ>x1K*;|iz~ mۃ G eQ7=5ѕHFL>q@v<Ŕ+;w{ŏG-{ӕoϔ+ע&^5J'δYl>Z2kTpˍr$H]Pgɶ%f B ~ O/L%3elRx k:uتw{d;\5bF܈!*D`׷{߃RF2JHg:tlP&JyS2,nJRە-Wr1hL-ְB:YZdUۮCU$-ӑe*Q]3}<3CL,SPa-hYU. _ݠg=oD\VU`\`-ZBFg]S  od{ZBS} !$SsoE.yC-g_qͳRi gbfz8sevwiD|zZ+vDd@libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-8.txt0000644000175000017500000000103007504076531024320 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/signatureCommented.xml0000644000175000017500000005472407504076531027246 0ustar tonytony ancestor-or-self::bar:Something zDcKZDPIDity6ezoUjjYh5l5HD8= ancestor-or-self::bar:Something and ((name() != "bar") or parent::bar:Something) and ((name() != "foo") or parent::foo:Something) and ((name() != "baz") or parent::baz:Something) and ((name() != "") or self::text()) c6/BJXIi3MjZG8+1xfVv0U0OF/s= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) jT1amifr+CPI+9DdvhzLAJhMggs= ancestor-or-self::bar:Something and not (self::foo:Something) and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) rwkxkAxYpYzu6x85sa2RgCWmn2Q= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) != count(parent::node()/namespace::* | self::node())) wH13J/+xZdks1qYv5s8oQD1u4PE= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "")) wH13J/+xZdks1qYv5s8oQD1u4PE= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) = count(parent::node()/namespace::* | self::node())) TYZShIzLB4+/2u+yVB7OocXtWyI= ancestor-or-self::bar:Something and (string(self::node()) = namespace-uri(parent::node())) EhCKd+AMiKcL/i41otNu2FnO+/s= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or ((name() = "") and ((count(ancestor-or-self::node()) mod 2) = 1))) 5oWfKR+g5kK86E3FRTBck+R/BQ0= ancestor-or-self::bar:Something uKgNnJZ4MvqphhpPjor3iChHsQQ= ancestor-or-self::bar:Something and ((name() != "bar") or parent::bar:Something) and ((name() != "foo") or parent::foo:Something) and ((name() != "baz") or parent::baz:Something) and ((name() != "") or self::text()) PMxe5U6Yzpybj86NXLeXND6J7z8= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) uKgNnJZ4MvqphhpPjor3iChHsQQ= ancestor-or-self::bar:Something and not (self::foo:Something) and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) 8yo+TMHoDprtw3V8HBuaX7I2eYA= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) != count(parent::node()/namespace::* | self::node())) yFhy1S9CS8j2bPAgM43KZcSX8Us= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "")) yFhy1S9CS8j2bPAgM43KZcSX8Us= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) = count(parent::node()/namespace::* | self::node())) 2jmj7l5rSw0yVb/vlWAYkK/YBwk= ancestor-or-self::bar:Something and (string(self::node()) = namespace-uri(parent::node())) 2jmj7l5rSw0yVb/vlWAYkK/YBwk= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or ((name() = "") and ((count(ancestor-or-self::node()) mod 2) = 1))) yFhy1S9CS8j2bPAgM43KZcSX8Us= ancestor-or-self::bar:Something K5OrULSkVjkuQd85gxbrkcowg60= ancestor-or-self::bar:Something and ((name() != "bar") or parent::bar:Something) and ((name() != "foo") or parent::foo:Something) and ((name() != "baz") or parent::baz:Something) and ((name() != "") or self::text()) PMxe5U6Yzpybj86NXLeXND6J7z8= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) uKgNnJZ4MvqphhpPjor3iChHsQQ= ancestor-or-self::bar:Something and not (self::foo:Something) and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) 8yo+TMHoDprtw3V8HBuaX7I2eYA= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) != count(parent::node()/namespace::* | self::node())) yFhy1S9CS8j2bPAgM43KZcSX8Us= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "")) yFhy1S9CS8j2bPAgM43KZcSX8Us= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) = count(parent::node()/namespace::* | self::node())) 9nKcDwpjNsAMgP+d+YYSVix6DG0= ancestor-or-self::bar:Something and (string(self::node()) = namespace-uri(parent::node())) 2jmj7l5rSw0yVb/vlWAYkK/YBwk= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or ((name() = "") and ((count(ancestor-or-self::node()) mod 2) = 1))) CwltHOmCf0tFSyrqRDYQNFT4eo8= N6aqg79OKMQzkU7uTHRmn4ryplhaTh0OFlCRqa/rS+pUBV6M8nTX5A==

3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi 89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=

hDLcFK0GO/Hz1arxOOvsgM/VLyU= nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM 8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA= cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv +OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=
CN=Merlin Hughes,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE CN=Transient CA,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE 1017788370348 MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS 8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1 MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU 2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q 4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch 3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx 0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D 451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7 PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5 NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25 4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==
libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-6.txt0000644000175000017500000000205007504076531024321 0ustar tonytony xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo"libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-1.txt0000644000175000017500000000113707504076531024321 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-20.txt0000644000175000017500000000074507504076531024406 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-19.txt0000644000175000017500000000101007504076531024400 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-0.txt0000644000175000017500000000102207504076531024311 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-25.txt0000644000175000017500000000000007504076531024373 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-17.txt0000644000175000017500000000057407504076531024414 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-4.txt0000644000175000017500000000061507504076531024324 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-24.txt0000644000175000017500000000034007504076531024401 0ustar tonytony xmlns="http://example.org/" xmlns="http://example.org/" xmlns="http://example.org/" xmlns="http://example.org/" xmlns="http://example.org/" xmlns="http://example.org/" xmlns="http://example.org/" xmlns="http://example.org/"libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-9.txt0000644000175000017500000000074507504076531024335 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-18.txt0000644000175000017500000000100107504076531024377 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-14.txt0000644000175000017500000000057407504076531024411 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-21.txt0000644000175000017500000000061007504076531024376 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-27.txt0000644000175000017500000004437707504076531024426 0ustar tonytony ancestor-or-self::bar:Something zDcKZDPIDity6ezoUjjYh5l5HD8= ancestor-or-self::bar:Something and ((name() != "bar") or parent::bar:Something) and ((name() != "foo") or parent::foo:Something) and ((name() != "baz") or parent::baz:Something) and ((name() != "") or self::text()) c6/BJXIi3MjZG8+1xfVv0U0OF/s= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) jT1amifr+CPI+9DdvhzLAJhMggs= ancestor-or-self::bar:Something and not (self::foo:Something) and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) rwkxkAxYpYzu6x85sa2RgCWmn2Q= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) != count(parent::node()/namespace::* | self::node())) wH13J/+xZdks1qYv5s8oQD1u4PE= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "")) wH13J/+xZdks1qYv5s8oQD1u4PE= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) = count(parent::node()/namespace::* | self::node())) TYZShIzLB4+/2u+yVB7OocXtWyI= ancestor-or-self::bar:Something and (string(self::node()) = namespace-uri(parent::node())) EhCKd+AMiKcL/i41otNu2FnO+/s= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or ((name() = "") and ((count(ancestor-or-self::node()) mod 2) = 1))) 5oWfKR+g5kK86E3FRTBck+R/BQ0= ancestor-or-self::bar:Something uKgNnJZ4MvqphhpPjor3iChHsQQ= ancestor-or-self::bar:Something and ((name() != "bar") or parent::bar:Something) and ((name() != "foo") or parent::foo:Something) and ((name() != "baz") or parent::baz:Something) and ((name() != "") or self::text()) PMxe5U6Yzpybj86NXLeXND6J7z8= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) uKgNnJZ4MvqphhpPjor3iChHsQQ= ancestor-or-self::bar:Something and not (self::foo:Something) and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) 8yo+TMHoDprtw3V8HBuaX7I2eYA= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) != count(parent::node()/namespace::* | self::node())) yFhy1S9CS8j2bPAgM43KZcSX8Us= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "")) yFhy1S9CS8j2bPAgM43KZcSX8Us= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) = count(parent::node()/namespace::* | self::node())) 2jmj7l5rSw0yVb/vlWAYkK/YBwk= ancestor-or-self::bar:Something and (string(self::node()) = namespace-uri(parent::node())) 2jmj7l5rSw0yVb/vlWAYkK/YBwk= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or ((name() = "") and ((count(ancestor-or-self::node()) mod 2) = 1))) yFhy1S9CS8j2bPAgM43KZcSX8Us= ancestor-or-self::bar:Something K5OrULSkVjkuQd85gxbrkcowg60= ancestor-or-self::bar:Something and ((name() != "bar") or parent::bar:Something) and ((name() != "foo") or parent::foo:Something) and ((name() != "baz") or parent::baz:Something) and ((name() != "") or self::text()) PMxe5U6Yzpybj86NXLeXND6J7z8= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) uKgNnJZ4MvqphhpPjor3iChHsQQ= ancestor-or-self::bar:Something and not (self::foo:Something) and (self::text() or (namespace-uri() != "") or (string(self::node()) = namespace-uri(parent::node()))) 8yo+TMHoDprtw3V8HBuaX7I2eYA= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) != count(parent::node()/namespace::* | self::node())) yFhy1S9CS8j2bPAgM43KZcSX8Us= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "")) yFhy1S9CS8j2bPAgM43KZcSX8Us= ancestor-or-self::bar:Something and (count(parent::node()/namespace::*) = count(parent::node()/namespace::* | self::node())) 9nKcDwpjNsAMgP+d+YYSVix6DG0= ancestor-or-self::bar:Something and (string(self::node()) = namespace-uri(parent::node())) 2jmj7l5rSw0yVb/vlWAYkK/YBwk= ancestor-or-self::bar:Something and (self::text() or (namespace-uri() != "") or ((name() = "") and ((count(ancestor-or-self::node()) mod 2) = 1))) CwltHOmCf0tFSyrqRDYQNFT4eo8= libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-5.txt0000644000175000017500000000061507504076531024325 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-2.txt0000644000175000017500000000107407504076531024322 0ustar tonytony libxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-16.txt0000644000175000017500000000000007504076531024373 0ustar tonytonylibxml-security-java-1.5.6/src/test/resources/interop/c14n/Y5/c14n-3.txt0000644000175000017500000000106507504076531024323 0ustar tonytony xmlns:foo="http://example.org/foo" libxml-security-java-1.5.6/src/test/resources/interop/xfilter2/0000755000175000017500000000000012273503733023346 5ustar tonytonylibxml-security-java-1.5.6/src/test/resources/interop/xfilter2/merlin-xpath-filter2-three.tar.gz0000644000175000017500000005717507533734770031610 0ustar tonytonyIm=\wHBK:ڞ$@ yI(BH_)!rPmW+22~Z߱ݛdvB7~9ׇa$FS_vpDb _ _[A|Ilӽ V`z,́V"oß&d4εȷl؞{bpau_ޔpu{h AT=Ȋ?nn: 77OjThy(X yD4УЃјxwa@+=+ka ~*ﯭ0\q[7*P^Y]?B;^sTsG- <aZHfshWnd7StoS9=`M`i.@]:]57y2xm9jC^+=߮!Q:4T_.ix9ڰ%}H}i= Є j;ۡ݇(+M`w G@ 4'ZƢ1ck6xN8wEYϖrɈ\HV p0n^&4)1_i{1tt 񢉎xnz=vK hPjHw0qZfF&-hYQfVQ[QC[C&^3~+"sן"hfv"gƜKsM]:6'EeeZTEħuYąsE^]j3r<*X7u5=1R+cWUYrQz| + ô*@TWG~_i/lxʃKj#I LHiYoq}nB[1kzVMWjuQWF6:7J^d3&Y|# i4EuP'aQ&$ "VԤ஌(+ؘz>3}oDƒx]KJ^zl67#_O{ ՎW>_t6^֊QXj]ZhT,q"Pkʬ2ʳ1VNi߇5њH;E[M!uX+6Pb*uf̦ijWjR:1+'b"% +(ouB`N!tvP Zb#v‚Z# dCK{>'ܳFu/o#Y *Zx D ۯ=t8+w/ sW 9Ǩ8yY01gzӳD-u?NrƊd9|S9Y8 =6dQ<1 g22Xcڏd$Yt]$2r)cZ2)ifki좋 YȜY,QsBpjVfB8N4eeDrWxEbk,-g\UȬ%$<7,m&C _ KxIe^幘ţ\`\5b-p([p5' G>MSXsvQX,[I\a=UšV NhFUH{}ی]psdTdav4m cB-kɣ`rʆLqk|DuHBinAcQkm]Ks RӒ@fʢ$XTT+aѤXzT튍$۠,ItZ7fv/&ljsGI|?;}mޚ3 s"@ñ<:,ppSa:ʘgn4Y9s^<2ܑg21Wsp9RZMZ-Tj>eW'ug u>th5y0f#[=ɿ_h܆I9޾b$Nu3\9by?"Q`&Zr .Bb yuu|Oa1  z07`N؋ietS(DlwKa 47[vhaM-6kө\;[fG B$;|o.؆ܗ>*+-Wa yXAN\π#@d.=ݑAt-Kb `ͽ fs?w̷.+Q؍ċB8U $p- rK <Y?KkEJWV<7۞o^6 Y)[<_!0\Z WHfmE[_?Q}NȞ{ZKb/w:W;ԨE-=uzR -KS'#;C;l+`cmwjdM8 Mza0K/]7>5LPn1SBw_Wp?ϸ05 5#xp@Mm|/ce?#xnRn~/YOGӁjݜBZ/wx |>f OߤyogQbԟ).g'Ua "} J_HE$t# ZFrSP]^xV~Yu{Lr7ƞSn.o3=} ?773ȿpGvJ-UM<' \*3y N&)'HߡUu02;g:4C1Ƴbj va߭o!Q,(q)(1,~,~x #d0a[t֜ОU١w@,j_ bj AH3zmNd`4,pV_f/'{CjwkLK0n}HJ?|.#!& ;u?vҺ8e)PgX8r. `^+~C Rex=|a:G8U>tfE -?;8?hA P:^*~̄x-'7ƷP± ;:}sQOc,8~YgSy-)xcهV&?ۺpEy3K'*GndG`("Nc E~' J Z|J?`0өa\7Dz7p&xK O̅e>n2fss("qs(=]|6X.Rt a!.]XLމJ'W^pb>qLq" ?UAD[]o`e/g7‡_A|9:/O]‰xoNC =xրvhm<4Do-l)xsFfY/Q/`qԉݓ䓖 -wA©Y9M+R$1Ҟ>ώ2=>l=!lA|X~vրΕ˥ko, >4 T\*~} mc!dhЖcB"Ї3ΏE,JciW/r{ytB%zmN·lـ@x6Nmݹ[@ (#$$q*?XFЭ`&BKO?})=3DclCG ߮kʈgMg۶Yy7sL Kc(PkPi6#4|h~pڶDbK-^Q`zۨQ3t׸OGFlF|rvOJeyWɋ% L* cJ`q -n%ټ/T=(Av;?b!)/rsCJp@"0ˍ6|{|eG2/e&f0H?&3d*̬evR%V^~f4U, ]K׭2rw.;tuY":Qxo'N/5GԌ*)5Md>c@Pؤe&{5xޒـmM-.J =l]Om=5U,갾rR;h2I1~f&aN!(>$(9¸3lZ7t j#p˵D-< af>NT?#*B:#25=x@d2% S鑁wm ZS>/=~>ݳJxjx} Қw=4#|Z@I'Q3I[n%: 1,vwaRE3NK-;0}l#?֐HSɾ3QRC=-a)f.l a"Aʉ1P' Yd< hv%@.9;DѲ(D9PpHF9G@g` и^hm\1~DD\$ Ō (d/C7v#Ms.ق 硕fi2{DFL.AP3V_vq-/g86j>'!$zH BcgGd "9 O]Tp>4jR##-Ο%@沔qaac0;bHf7"l5V1wV9T*zM=UnC/:in}Dgm1PD*-qOuߺhu/HEk+谋KH7Dn}>2ڔkw{77+M':좻V$LHѺgr’WiKX~Dp$ Aɭ$dOp HTq%B/ ]XѢ]NT&~."X Q󲨋rᲐds="ɮ8M )sf֒\d&7Aªh Qv!GddQ,^Yǜ5a"먳.lPKvXN\v V~\&0KW,$ǝheuܩ(Ê%hxLȳ$ +%9lpY9 e$W{ƋWCrj qn~j!}"!}BN9 gn ,#)#70/3Sd Ckn aH?D4~I!9TΘ+ Ur&y%˕0M&NBv< Qq{o& BRVg9;I GZf@2}iO1=)GFn{^p:>cs~ =C$72)/zHdcf}ZuoE4k9[j<*yKʆo:1ZEܶ: n9¨GGgPZj/#VRJ-g j ,k^I俤*D9x~DO|=;"M2Iy>옪ww8\z^k8>8Bp ^.oFԊș-ǎoWY1KÎ %pw_b Gn/.?~<)/mwY_EqQ{Om`%{x _GswYd_TB@v9*T@SM4 Mim4Y]Vq+[G}^G*ǖGjKk. l$Jds '#gNqf³ NْZy9}v9v}sqYt]n]'oօ? Vjd$t2m. l2On6}T\9az̳z .<;ggޜ>p;>͹8,6MHefZ;-NvN INGvUoo. l2oM:lYrJ})Hٙ7 :\xv)<;b1Vp:q:I669 l*6M_'+UWNX/<;f³ Nٙ7.7λ|s.}?7Kו*"*YOl.sex|DwF-`~SLB԰Eg %9^1<ôߙn YLF +z f VZ-1Ɂs6-|m}a~|,I_+5k\lr2_ 5VX3f1_ ?5piY l*)$}-\<M:^`/<;py]x{pb<λ 8,{PpiIZjib gO^~֑K$Zu2_'/F,ੀ"$}I\<Oov.+7tΝ< .-8qzb`s>ݟ%sST=3Ox5+pxg%8OOIG)܋.gX1Be4$&oilӰޚ`Dwߵ͕kOވ]맶Rbx^_}IO83f[kĤx4!3ہo=UDo>uaa Y)S-W-;^u嗤mk&|8g1ڧ TUyjI;&p\E3!D΄8 #_ IC['2*[iaMa?HaJqf~zkrc ~&)-kK^[i&jV8hy} _bϤp}SWǕ꺸5 ol&8X=~_t/$J&LgndNI6*57Sۈ7}<6-w:ba;.i:+NkH[ɋZvnuXEg4Q죮oxEIؖ$ϫsQpJIre7LZ=gZ&dp_9)AX#'cp&I/hA7>N~j ǬqhΎTj]E>^cN+'9}wBw?3m9ǟF0ӉØ)+s3*JR״o* !_?TZ ^oમkߠ3 ׮?дK'.X)j\])ɏ\C @ÁR \Ǎ ܦ*%:}B l/uV^Ë,1؝>v)<G4}e&/`7qؓөm.Z/b/V@w,,̤n$)]]X$8!'̴OW |O|j.[:˜ZT^ '7#i*?(R-oqi}l)ד2;#]/1`K<11O׀@hhZäz:k_*X8mݻG]tnFG{kzv,ܖjR ֯U~|]=wi';܏ ѦyWu֨ mA2Q JbN\4ci]6 ƪiB!-dpu#tiy׵e6F ,~/^A ?=en[hMr.^ǞZ<}}wuMyuzn#y>kws_`9H(uu}&7*<ͩDyڎN?ށ\]%O9I%6w7ܤHNÐsad@fCG #$Sj.$SU[%$XKϝ|/\9[z:qa7Bt!C([;`\%Ʃ5.nnEvd\~Ԑ+Ԓ]GDSe;=-7UjOJ\fM$Ԛƫ !:Bccw/=Dždz<UxM_JuݹZ7ᄑn_t[W,'?M(z\C aD)=3DclCG ߮BOgMg۶QM4sL輠C,3;P !lGh M=21еmĖD[dQ:g6B!q '&b43I}f3+]UTڇW"q VxAȖ|kuS]2 g˕ec<^GZEXoa8`\nl~5(qV?b$c~zسܙ~Ƥ֜Op c6K}(P2@a8tQ`&QZkpBMݴpʜsgR͟Mh`Ҕ9 |qá5`En? d.7S#Obxd$Zia1Ƿ ~Ⱦn_Y4"H;L̨n2ٙJ궯[_zT%(BtMT 預vs9rԉ7.N/5GԌ*)5Md>z8&pHn%`dlmjYxuaD 2Mm=5FI8eŖP~@KAOjM3%N֟ VD{Q1kΚ5 `߲*0i#`L7،2tX{穪vU!6 _  bcI\w |Ƌxwv=ې6nps-TS?#zlwN5gȌ@EP6 nEsMyx"43aC6Q'w쇤ςsu;E61x92}u>ݱϹr'vV "MYnOE%m?c'yxI`{eprXnrdh90?;| +>PZ!b"ۉCN-C"c6>^Y ̾Ȱd.}tESȐNxc:YJJ>4WI_/}he13_ d즊@ÙxdʶmN'vDk7å7φ Hp*Js޴Jx0"dY0At(* nX)ɼ)<tl `UtPοwq,tWur{<$J&Q'p@B4d_Aҥj/0G~zM13$+DohbEo/.[jhۗ~4P;W'X]z Dhb(oS 'AgX|93 pղm/3j}0¬ؼv¥u9}Xv1*4^A_+Df J'# xr-RZhw/6DX#X)C-4uJ٪r<3DS#$Xx[އl C"lSDgw7\QoDE6,nlO dg ~Qo Ӫb+>mwm๰"tDoDh}N"·ũ{Ж ՊzX-H<=`B ;ӣ1ũ(bd bGlqϓ@; Dd g%9OjV"m$W m-YG/0F=O OO?n`cD>=" c82"|]de~/3bEe <QƈmMt?*pnqo[mwwȕ_}F?^%?O[5Z` 9FS%K?]9 W}^+p߉n+cޒRuK-x%\ኔ78vgsSݐḛbf4zsom:~)|ۂ_m{T>%T¾]8^OxDĄ>J(#>Xjrq+YΉ;w,H4G;/l; BJ)dxDzz; gXL@*8'_O ȗE:'ÅsC9 qaz4cC%kנ3ԌtHm&Z7.M929 '%pR+;qҥ)OX~k/F'AtEtѢkqa#!GᕐaZx6ӎ|:,=C \sB/.LOy"'aW0ᤄ.N|']|WƱ>yqF> D-OО3{$[񬧩2amcƫ!{|1fs+~:K I>^7A0ٝxGV >\̮r N,`ߑ2dE\X[^%Jnu2dyFY n~-HY'_h^7tgd+P *2{t }3Fq^Ic`4Q/u3_OKD2%},!6{wkƮ+ݛ>VMI_J1ěW* I/Ϲ-t6y[9Ae"%wWBM0:I KZjxLmDv;WܲseK){rW"YW7O2Zʱ^]aCkQ%(k}fve)#zzRx*Yw_Sw**_zI?ΠMhB(Ua5)LrVAQRauQß܆Rc=+E.>^C큺Bvw5A|ҙMi>^t;)>#ߝ7i|_b"zOU[ ;ʁ;jnh}ªU&oKdu[V֓D>=YE&YJSH=Pt.\kMe)Xm}w^ihZuf2~&u2_[ߔbm\O3ʛFci\_@|⺾&AeK.@naϧjBxv`~IHe!+ѻ:p]lufdW+*YHotwŅ~c=*NYZHf4_T[zN[:BSaS'Ϋ334JF18|Фǘy$-:]t@8-4MiZJfTp@q+ᑩkc Gwzu`g^}Pb0mz r4@+К,VR[eY/2XxSrkUq5*[RF5iMQ.ክn3W25\JxbZ/wP,@ "J cA Z }AnEqhBviˋ fEbeTyA P p̤3vkj67̱4"(47fZ'SƴgŊaB|]Z=%3e7-|"+]XN+=yGWo%Mj}mmB.<.׹)}4ID;92J$||Q5~M_wj- %VըQmL {hu 3;v5N`0NMXWA-_^ƍָ♵fE|‡\;C \xh6^f( DF|OvoQif4g[1qƨS˖+ J[$_kBq6I=Sz#ڵ8=L̇MR{ƪQV@Mr LS+N7 ,oNp ƖDv8ꉢF9-d}wQl3j1!`. K,/qߢK43n*M4ҦS6舦cMPj I&MFEg l&ֱG]ekNKs6u3S~ҹ%S>i>dUfWy}SeY{3i P.wi"m_b6iMEi&yf쁂J`cqgf0bf(Urt7s9k,^϶2+ݜks7Nvz~PϽIj'َze؃;s{z{=mxΟ~_ʃ<׌u룛6t46t,# -C*?'Em4jbGҗp6b_9v.k]vz?vv{+]awq+ҤvWiM˸iu7QnuڟNER^NET\o> u_]] ooKR|br};4;ŭ̝ny8҄pZ?mW[73|,ʣf|y~}|*mYVo@0ؐUٌ3gs__CΉmxtW>q>΅:.>[EՄֻlIҡ ﶸ2eGSy"0:qJ9Ui-ቶ7}nRiri>=r{W>G\i\?)O/ >ql-6]D>\Q pVJUڛB^Z_+5_'vpo&ٔqJp9Dn"ۚ/C!&&"xZYjMfmsZ s"kJe8K>Q%'Vɒ+d$e'ϥ{>f6z΍qJ9lu>Cg cCzlmV |B͘X81N:y*I3GS/ܱiwgpܛ W7xR=Og˕4^i~nv{ugMk?䫫fȧEe#1ZPU5Cjej05%lX9ha[`<^,%_hܖb%;{ϓZv@*{U/0h`OTL7gn_纪h+[ Z%A)U`ﶅ&+RӚP%FɴV<:i>{Yog۬_wڽpq}~dƿ/x&^ N(*Ah#ڗQ >B%<=_y"I :NˋEZx Wذ)G Q:!m[o4-2 RmfĘ-xėiU"*jDZ5yG]9[z`¢o|Ex 50"0| .=+3z+rW!Sź ( ^ [=\-(/Y-Q(dQQYL,P_f Ja*p]^ȃ=T L1ܧtk:<@݋ײ3f$Z]FWP5l*u1l<ƃ~R-KRb<'&}EVZ,AU2\h"fZ`<ڳ"e/sME*J%4(2Mu!o3w%F0x}X/c:=MMa3uxqQz\ ֹPdD#*ꊭ!wB3`@E`&@7LE8\msWʎYPЁuRuk2L/Hmj+mޠL}i\):T2;jI5(WFP:7ݩ6Ї }Mt)m"\5^ 6Kw̅Ȏ fp F1ؼ'!].|>E/F.y8kBAR#zxO9!P<@>t3[m_`{TY 50s4Lv^-/SL;E!!_ ` s40{]aXs["mu % Z~޺$]af9i;ofk>A㕀-n*R1ve.ZݔVt K1 cCQQ mǓ펋-v.,Dž}b?^n c"B?vx!*4mQC{-S՗|3`@ҵCPf6иƯ2&2"H-ǔ 4jXDP6-)^HXm09 dj,0& ?_*z:1% b zƒM t5]G31{뛜_mZ趦o=T &c 5'`,#8-ͽWWugO TlhĂ6P3nI3a㮊Q 9Jlňsdjav^)djiȽ )u -<]}o\G1> DQZKfoC1,{C0a dk ~3<%h {Fcx1gYp)2fj:հJ"!hSHڔLZ>f2| + [Qs&DRuW~"2A7/z?:rLJFkdRK&¹V3|a[*0~Be (bD#c8-& 0QLe䥊 ψL 0⇩;qZrtѝa9VjrwgK m.~ Ԛҷl0kG9&̨ ܨ-[)rkM((=ݼAavœ*Ң gif} } uj ?jDz%>^()C Ik+sbD} @p[%-(>4!.ySLhRF@𨋦Π1uǵ}k3AGC""<Y!` 4P@GK/x9o Kk t$].3΃>i*rlEóKTԄT %lAB0}+x=/Ӆ>{3iDcaN jfHF؊ϊ;W386h.BZCOP+D*2Tcτ'\,% 2$jkClX}(R\=^O-lsfGֻɐY$vJsѽRY8;QH:ͯ.h6ژi;oi\wiFiy[(7r /x{, լ+>B5MK|)쓲 FzN{U-Oo XִGzZSikY bF+HL>jP h?Ur<K?K`,;"y.N.zwa)‰)eqŻ7W2ނ?܆_PS r\||_k8\z^k8h|S_-6>U Z:3P_t4тի^1KuoG_b󏧶zvs~~hWN*`_O$鰨yoЏm`[=<ϣSݚ:ZK)>0`]L94ДCSMBcZMkVz縕irA_pNgj'#c3) ;wܱ=f^@n}whXj+hńm A뇩fI\r9 /"Xi)b!M.|Nz|N %z%5ؔcSM96mMS%H9 srR9peQ̳Y8l3E39ܳx6VnB;owL~nf$LmݢYWĉ%jvlbs:q:Q6N96ؔcSM`SYʁ+#ԏBdzv3E39ܳxvYsͰߜIͬiNbӄ]ruaoJ_,؉`1ttl`/9UI9ǦrlʱilJ=6I䒳fr+#gL139ܳxvx"wޝ3aLmCY7GncrD~r:7ؔcSM96mM7g~NV*R? =yv={ܳsN٩7gΝ7λ |s&}?73.O+/OlKgnx.h8g tH/0{h+6,[Qu_P,OFհ?]BWH40.oӟac8G@mr*)8rKžc1K¹ bLv,7!pb-n)jl`/QĦg rlʱ)Ǧcp06I>x;=WFf0z$eaD{v;±N:.&d|3}C ¹,F9hN8 /$y.(^9Ö։uR_Gv/F)|I\8ؤOF;ؕzH2N}U\Fsν|a;XM'g"$\Uq5 gI$xs)9<wL??3+D,heIЄ&qJT䵓UH/啄$ =Õ^ZK(1^ed;YNF4{r2;\'Ҫ;YdlԓdĸqO&2]b%t&igX֏P}(qF#dc' LV40!*)2mD\:fAÊzPXk?s]hlO{ uDDUQ[Ҧ.33>pyp!;M Ogo7-dMp^Bmޫ#u}Yx&zЃ2i$&ohlӰO4gDw2؀9Go^ֆߕ<<_.yy3G͖[N[#nc 9%FH0<8y B?trxQi͈D#s~OARW8W>G\i]'ߋO->?Z[4(h~)ؙ*~Z%S 5C?^ceyCY*hwqvj~&mTqGCp5t!a`>rڠN WWǕG( oA9 ^-+Qk~f3l|AχXԁn/pBGhXzꥎ{֩E]uZǿAё (<Xb$6c3-_WLv͵7A Ű q^eY,9PF2 %VE|Ф-oӞScЭ!;2S%3;, bbUQMmԗZTDrh3$]=#I?S/@ DE&3m=PdRdѩ+ C5$^9nd١ Q͂ >Hydag)3k;r.1K{_6|>9_DCb]cKgyiYw \) Baltimore Technologies, Ltd. Wednesday, June 10, 2002 ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/interop/xfilter2/merlin-xpath-filter2-three/sign-xfdl.tmpllibxml-security-java-1.5.6/src/test/resources/interop/xfilter2/merlin-xpath-filter2-three/sign-xfdl.0000644000175000017500000026706707533734770032360 0ustar tonytony SF71 Thomas Mohr 4/6/98 4/6/98 application/x-xfdl application/x-xfdl 1.0.0 letter 120 8.0;10.5 235 235 235 Courier 9 plain absolute 17 32 extent 876 1 absolute 17 82 extent 876 1 absolute 17 133 extent 876 1 absolute 17 179 extent 876 1 absolute 268 218 extent 406 1 absolute 268 263 extent 406 1 absolute 17 311 extent 657 1 absolute 268 354 extent 406 1 absolute 268 398 extent 406 1 absolute 17 484 extent 657 1 absolute 17 530 extent 657 1 absolute 17 578 extent 657 1 absolute 17 626 extent 876 1 absolute 17 743 extent 876 1 absolute 17 867 extent 876 1 absolute 17 967 extent 876 1 absolute 17 1164 extent 876 1 absolute 17 32 extent 1 1133 absolute 510 32 extent 1 51 absolute 892 32 extent 1 1133 absolute 268 133 extent 1 266 absolute 349 179 extent 1 220 absolute 430 133 extent 1 266 absolute 510 179 extent 1 220 absolute 592 133 extent 1 265 absolute 673 133 extent 1 494 absolute 268 484 extent 1 143 absolute 349 484 extent 1 143 absolute 431 484 extent 1 143 absolute 510 484 extent 1 143 absolute 591 484 extent 1 143 absolute 20 58 extent 489 23 string mandatory wordwrap fixed 0 John Q. Public absolute 537 58 extent 123 23 string mandatory wordwrap fixed 0 123456789 absolute 19 109 extent 872 23 string mandatory wordwrap fixed 0 PureEdge Solutions Inc. absolute 28 191 extent 22 23 Helvetica 18 plain absolute 269 188 extent 80 23 wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 188 extent 80 23 wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 188 extent 80 23 center wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" time short optional optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 absolute 511 188 extent 81 23 center wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" time short optional optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 absolute 593 188 extent 80 23 wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 absolute 28 231 extent 22 23 Helvetica 18 plain absolute 269 231 extent 80 23 wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 231 extent 80 23 wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 231 extent 80 23 center wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" time short optional optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 absolute 511 231 extent 81 23 center wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" time short optional optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 absolute 593 231 extent 80 23 wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 absolute 28 277 extent 22 23 Helvetica 18 plain absolute 269 276 extent 80 23 wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 276 extent 80 23 wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 276 extent 80 23 center wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" time short optional optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 absolute 511 276 extent 81 23 center wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" time short optional optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 absolute 593 276 extent 80 23 wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 absolute 28 322 extent 22 23 Helvetica 18 plain absolute 269 321 extent 80 23 wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 321 extent 80 23 wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 321 extent 79 23 center wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" time short optional optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 absolute 511 321 extent 81 23 center wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" time short optional optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 absolute 593 321 extent 80 23 wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 absolute 28 367 extent 22 23 Helvetica 18 plain absolute 269 366 extent 80 23 wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 366 extent 80 23 wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 366 extent 80 23 center wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" time short optional optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 absolute 511 366 extent 81 23 center wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" time short optional optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 absolute 593 366 extent 80 23 wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 absolute 121 412 extent 15 14 Helvetica 10 plain off off (CHECK5.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK8.value == "on") || (CHECK7.value == "on")) ? set("value", "off") : "" absolute 121 438 extent 15 14 Helvetica 10 plain off off (CHECK5.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK8.value == "on") || (CHECK6.value == "on")) ? set("value", "off") : "" absolute 519 412 extent 15 14 Helvetica 10 plain off off (CHECK5.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK6.value == "on") || (CHECK7.value == "on")) ? set("value", "off") : "" absolute 28 495 extent 22 23 Helvetica 18 plain absolute 269 498 extent 80 23 wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 498 extent 81 23 wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 432 498 extent 78 23 center wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" time short optional optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 absolute 511 498 extent 80 23 center wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" time short optional optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 absolute 592 498 extent 81 23 wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 absolute 28 543 extent 22 23 Helvetica 18 plain absolute 269 543 extent 80 23 wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 543 extent 81 23 wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 432 543 extent 78 23 center wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" time short optional optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 absolute 511 543 extent 80 23 center wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" time short optional optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 absolute 592 543 extent 81 23 wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 absolute 28 591 extent 22 23 Helvetica 18 plain absolute 269 590 extent 80 23 wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 590 extent 81 23 wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 432 590 extent 78 23 center wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" time short optional optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 absolute 511 590 extent 80 23 center wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" time short optional optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 absolute 592 590 extent 81 23 wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 absolute 680 326 extent 15 14 Helvetica 10 plain absolute 689 404 extent 15 14 Helvetica 10 plain off (CHECK12.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK14.value == "on") || (CHECK15.value == "on")) ? set("value", "off") : "" absolute 689 428 extent 15 14 Helvetica 10 plain off (CHECK12.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK15.value == "on") || (CHECK13.value == "on")) ? set("value", "off") : "" absolute 689 485 extent 15 14 Helvetica 10 plain off (CHECK12.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK14.value == "on") || (CHECK13.value == "on")) ? set("value", "off") : "" absolute 42 657 extent 846 57 wordwrap fixed 0 string optional (CHECK10.value == "on") ? "mandatory" : "optional" absolute 42 712 extent 846 31 0 string optional (CHECK8.value == "on") ? "mandatory" : "optional" readonly (CHECK8.value == "on") ? "readwrite" : "readonly" /XFDL/page[@sid="PAGE1"]/*[@sid="CHECK16" or @sid="CHECK17" or @sid="FIELD47" or @sid="BUTTON2" or @sid="FIELD48"] | /XFDL/page/triggeritem[not(@sid)] absolute 655 840 extent 155 27 0 readonly 05-08-02 (BUTTON1.value != "") ? "*" : "" date optional MM-DD-YY absolute 362 873 extent 22 23 Helvetica 18 plain (CHECK17.value == "on") ? set("value", "off") : "" absolute 604 873 extent 22 23 Helvetica 18 plain (CHECK16.value == "on") ? set("value", "off") : "" absolute 41 917 extent 770 23 string optional (CHECK17.value == "on") ? "mandatory" : "optional" readonly (CHECK17.value == "on") ? "readwrite" : "readonly" 0 wordwrap fixed absolute 656 940 extent 155 27 0 readonly (BUTTON2.value != "") ? "*" : "" date optional MM-DD-YY absolute 960 1260 extent 1 1 ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/interop/xfilter2/merlin-xpath-filter2-three/sign-xfdl-c14n-0.txtlibxml-security-java-1.5.6/src/test/resources/interop/xfilter2/merlin-xpath-filter2-three/sign-xfdl-0000644000175000017500000025642407533734770032352 0ustar tonytony SF71 Thomas Mohr 4/6/98 4/6/98 application/x-xfdl application/x-xfdl 1.0.0 letter 120 8.0;10.5 235 235 235 Courier 9 plain absolute 17 32 extent 876 1 absolute 17 82 extent 876 1 absolute 17 133 extent 876 1 absolute 17 179 extent 876 1 absolute 268 218 extent 406 1 absolute 268 263 extent 406 1 absolute 17 311 extent 657 1 absolute 268 354 extent 406 1 absolute 268 398 extent 406 1 absolute 17 484 extent 657 1 absolute 17 530 extent 657 1 absolute 17 578 extent 657 1 absolute 17 626 extent 876 1 absolute 17 743 extent 876 1 absolute 17 867 extent 876 1 absolute 17 967 extent 876 1 absolute 17 1164 extent 876 1 absolute 17 32 extent 1 1133 absolute 510 32 extent 1 51 absolute 892 32 extent 1 1133 absolute 268 133 extent 1 266 absolute 349 179 extent 1 220 absolute 430 133 extent 1 266 absolute 510 179 extent 1 220 absolute 592 133 extent 1 265 absolute 673 133 extent 1 494 absolute 268 484 extent 1 143 absolute 349 484 extent 1 143 absolute 431 484 extent 1 143 absolute 510 484 extent 1 143 absolute 591 484 extent 1 143 absolute 20 58 extent 489 23 string mandatory wordwrap fixed 0 John Q. Public absolute 537 58 extent 123 23 string mandatory wordwrap fixed 0 123456789 absolute 19 109 extent 872 23 string mandatory wordwrap fixed 0 PureEdge Solutions Inc. absolute 28 191 extent 22 23 Helvetica 18 plain absolute 269 188 extent 80 23 wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 188 extent 80 23 wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 188 extent 80 23 center wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" time short optional optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 absolute 511 188 extent 81 23 center wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" time short optional optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 absolute 593 188 extent 80 23 wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 absolute 28 231 extent 22 23 Helvetica 18 plain absolute 269 231 extent 80 23 wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 231 extent 80 23 wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 231 extent 80 23 center wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" time short optional optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 absolute 511 231 extent 81 23 center wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" time short optional optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 absolute 593 231 extent 80 23 wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 absolute 28 277 extent 22 23 Helvetica 18 plain absolute 269 276 extent 80 23 wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 276 extent 80 23 wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 276 extent 80 23 center wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" time short optional optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 absolute 511 276 extent 81 23 center wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" time short optional optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 absolute 593 276 extent 80 23 wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 absolute 28 322 extent 22 23 Helvetica 18 plain absolute 269 321 extent 80 23 wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 321 extent 80 23 wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 321 extent 79 23 center wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" time short optional optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 absolute 511 321 extent 81 23 center wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" time short optional optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 absolute 593 321 extent 80 23 wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 absolute 28 367 extent 22 23 Helvetica 18 plain absolute 269 366 extent 80 23 wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 366 extent 80 23 wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 366 extent 80 23 center wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" time short optional optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 absolute 511 366 extent 81 23 center wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" time short optional optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 absolute 593 366 extent 80 23 wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 absolute 121 412 extent 15 14 Helvetica 10 plain off off (CHECK5.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK8.value == "on") || (CHECK7.value == "on")) ? set("value", "off") : "" absolute 121 438 extent 15 14 Helvetica 10 plain off off (CHECK5.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK8.value == "on") || (CHECK6.value == "on")) ? set("value", "off") : "" absolute 519 412 extent 15 14 Helvetica 10 plain off off (CHECK5.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK6.value == "on") || (CHECK7.value == "on")) ? set("value", "off") : "" absolute 28 495 extent 22 23 Helvetica 18 plain absolute 269 498 extent 80 23 wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 498 extent 81 23 wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 432 498 extent 78 23 center wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" time short optional optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 absolute 511 498 extent 80 23 center wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" time short optional optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 absolute 592 498 extent 81 23 wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 absolute 28 543 extent 22 23 Helvetica 18 plain absolute 269 543 extent 80 23 wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 543 extent 81 23 wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 432 543 extent 78 23 center wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" time short optional optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 absolute 511 543 extent 80 23 center wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" time short optional optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 absolute 592 543 extent 81 23 wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 absolute 28 591 extent 22 23 Helvetica 18 plain absolute 269 590 extent 80 23 wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 590 extent 81 23 wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 432 590 extent 78 23 center wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" time short optional optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 absolute 511 590 extent 80 23 center wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" time short optional optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 absolute 592 590 extent 81 23 wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 absolute 680 326 extent 15 14 Helvetica 10 plain absolute 689 404 extent 15 14 Helvetica 10 plain off (CHECK12.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK14.value == "on") || (CHECK15.value == "on")) ? set("value", "off") : "" absolute 689 428 extent 15 14 Helvetica 10 plain off (CHECK12.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK15.value == "on") || (CHECK13.value == "on")) ? set("value", "off") : "" absolute 689 485 extent 15 14 Helvetica 10 plain off (CHECK12.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK14.value == "on") || (CHECK13.value == "on")) ? set("value", "off") : "" absolute 42 657 extent 846 57 wordwrap fixed 0 string optional (CHECK10.value == "on") ? "mandatory" : "optional" absolute 42 712 extent 846 31 0 string optional (CHECK8.value == "on") ? "mandatory" : "optional" readonly (CHECK8.value == "on") ? "readwrite" : "readonly" absolute 655 840 extent 155 27 0 readonly 05-08-02 (BUTTON1.value != "") ? "*" : "" date optional MM-DD-YY absolute 960 1260 extent 1 1 ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/interop/xfilter2/merlin-xpath-filter2-three/sign-spec.xmllibxml-security-java-1.5.6/src/test/resources/interop/xfilter2/merlin-xpath-filter2-three/sign-spec.0000644000175000017500000001425007533734770032335 0ustar tonytony //ToBeSigned //NotToBeSigned //ReallyToBeSigned p6/HaYIdxbEdYX8/8zNfjED4H5Y= / 2jmj7l5rSw0yVb/vlWAYkK/YBwk= Ft7PdmEYSC8GwxffIa4xiobr1iEaUf3LGNfPLiQnJBJI/1Cp5WiEiQ== 3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi 89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE= hDLcFK0GO/Hz1arxOOvsgM/VLyU= nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM 8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA= cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv +OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U= CN=Merlin Hughes,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE CN=Transient CA,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE 1017788370348 MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS 8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1 MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU 2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q 4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch 3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx 0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D 451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7 PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5 NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25 4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg== libxml-security-java-1.5.6/src/test/resources/interop/xfilter2/merlin-xpath-filter2-three/.cvsignore0000644000175000017500000000002307773017673032437 0ustar tonytonyc14n-*.apache.html ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/interop/xfilter2/merlin-xpath-filter2-three/sign-spec-c14n-0.txtlibxml-security-java-1.5.6/src/test/resources/interop/xfilter2/merlin-xpath-filter2-three/sign-spec-0000644000175000017500000000026607533734770032336 0ustar tonytony ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/interop/xfilter2/merlin-xpath-filter2-three/sign-spec.tmpllibxml-security-java-1.5.6/src/test/resources/interop/xfilter2/merlin-xpath-filter2-three/sign-spec.0000644000175000017500000000323007533734770032331 0ustar tonytony //ToBeSigned //NotToBeSigned //ReallyToBeSigned / ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/interop/xfilter2/merlin-xpath-filter2-three/sign-spec-c14n-2.txtlibxml-security-java-1.5.6/src/test/resources/interop/xfilter2/merlin-xpath-filter2-three/sign-spec-0000644000175000017500000000317107533734770032334 0ustar tonytony //ToBeSigned //NotToBeSigned //ReallyToBeSigned p6/HaYIdxbEdYX8/8zNfjED4H5Y= / 2jmj7l5rSw0yVb/vlWAYkK/YBwk= ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/interop/xfilter2/merlin-xpath-filter2-three/sign-xfdl.xmllibxml-security-java-1.5.6/src/test/resources/interop/xfilter2/merlin-xpath-filter2-three/sign-xfdl.0000644000175000017500000030031307533734770032336 0ustar tonytony SF71 Thomas Mohr 4/6/98 4/6/98 application/x-xfdl application/x-xfdl 1.0.0 letter 120 8.0;10.5 235 235 235 Courier 9 plain absolute 17 32 extent 876 1 absolute 17 82 extent 876 1 absolute 17 133 extent 876 1 absolute 17 179 extent 876 1 absolute 268 218 extent 406 1 absolute 268 263 extent 406 1 absolute 17 311 extent 657 1 absolute 268 354 extent 406 1 absolute 268 398 extent 406 1 absolute 17 484 extent 657 1 absolute 17 530 extent 657 1 absolute 17 578 extent 657 1 absolute 17 626 extent 876 1 absolute 17 743 extent 876 1 absolute 17 867 extent 876 1 absolute 17 967 extent 876 1 absolute 17 1164 extent 876 1 absolute 17 32 extent 1 1133 absolute 510 32 extent 1 51 absolute 892 32 extent 1 1133 absolute 268 133 extent 1 266 absolute 349 179 extent 1 220 absolute 430 133 extent 1 266 absolute 510 179 extent 1 220 absolute 592 133 extent 1 265 absolute 673 133 extent 1 494 absolute 268 484 extent 1 143 absolute 349 484 extent 1 143 absolute 431 484 extent 1 143 absolute 510 484 extent 1 143 absolute 591 484 extent 1 143 absolute 20 58 extent 489 23 string mandatory wordwrap fixed 0 John Q. Public absolute 537 58 extent 123 23 string mandatory wordwrap fixed 0 123456789 absolute 19 109 extent 872 23 string mandatory wordwrap fixed 0 PureEdge Solutions Inc. absolute 28 191 extent 22 23 Helvetica 18 plain absolute 269 188 extent 80 23 wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 188 extent 80 23 wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 188 extent 80 23 center wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" time short optional optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 absolute 511 188 extent 81 23 center wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" time short optional optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 absolute 593 188 extent 80 23 wordwrap fixed readonly (CHECK1.value == "on") ? "readwrite" : "readonly" (CHECK1.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK1.value == "on") ? "mandatory" : "optional") 0 absolute 28 231 extent 22 23 Helvetica 18 plain absolute 269 231 extent 80 23 wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 231 extent 80 23 wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 231 extent 80 23 center wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" time short optional optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 absolute 511 231 extent 81 23 center wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" time short optional optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 absolute 593 231 extent 80 23 wordwrap fixed readonly (CHECK2.value == "on") ? "readwrite" : "readonly" (CHECK2.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK2.value == "on") ? "mandatory" : "optional") 0 absolute 28 277 extent 22 23 Helvetica 18 plain absolute 269 276 extent 80 23 wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 276 extent 80 23 wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 276 extent 80 23 center wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" time short optional optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 absolute 511 276 extent 81 23 center wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" time short optional optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 absolute 593 276 extent 80 23 wordwrap fixed readonly (CHECK3.value == "on") ? "readwrite" : "readonly" (CHECK3.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK3.value == "on") ? "mandatory" : "optional") 0 absolute 28 322 extent 22 23 Helvetica 18 plain absolute 269 321 extent 80 23 wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 321 extent 80 23 wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 321 extent 79 23 center wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" time short optional optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 absolute 511 321 extent 81 23 center wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" time short optional optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 absolute 593 321 extent 80 23 wordwrap fixed readonly (CHECK4.value == "on") ? "readwrite" : "readonly" (CHECK4.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK4.value == "on") ? "mandatory" : "optional") 0 absolute 28 367 extent 22 23 Helvetica 18 plain absolute 269 366 extent 80 23 wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 366 extent 80 23 wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 431 366 extent 80 23 center wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" time short optional optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 absolute 511 366 extent 81 23 center wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" time short optional optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 absolute 593 366 extent 80 23 wordwrap fixed readonly (CHECK5.value == "on") ? "readwrite" : "readonly" (CHECK5.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK5.value == "on") ? "mandatory" : "optional") 0 absolute 121 412 extent 15 14 Helvetica 10 plain off off (CHECK5.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK8.value == "on") || (CHECK7.value == "on")) ? set("value", "off") : "" absolute 121 438 extent 15 14 Helvetica 10 plain off off (CHECK5.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK8.value == "on") || (CHECK6.value == "on")) ? set("value", "off") : "" absolute 519 412 extent 15 14 Helvetica 10 plain off off (CHECK5.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK6.value == "on") || (CHECK7.value == "on")) ? set("value", "off") : "" absolute 28 495 extent 22 23 Helvetica 18 plain absolute 269 498 extent 80 23 wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 498 extent 81 23 wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 432 498 extent 78 23 center wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" time short optional optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 absolute 511 498 extent 80 23 center wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" time short optional optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 absolute 592 498 extent 81 23 wordwrap fixed readonly (CHECK9.value == "on") ? "readwrite" : "readonly" (CHECK9.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK9.value == "on") ? "mandatory" : "optional") 0 absolute 28 543 extent 22 23 Helvetica 18 plain absolute 269 543 extent 80 23 wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 543 extent 81 23 wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 432 543 extent 78 23 center wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" time short optional optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 absolute 511 543 extent 80 23 center wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" time short optional optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 absolute 592 543 extent 81 23 wordwrap fixed readonly (CHECK10.value == "on") ? "readwrite" : "readonly" (CHECK10.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK10.value == "on") ? "mandatory" : "optional") 0 absolute 28 591 extent 22 23 Helvetica 18 plain absolute 269 590 extent 80 23 wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 350 590 extent 81 23 wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" date case_insensitive optional MM-DD-YY optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 Courier 8 plain absolute 432 590 extent 78 23 center wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" time short optional optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 absolute 511 590 extent 80 23 center wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" time short optional optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 absolute 592 590 extent 81 23 wordwrap fixed readonly (CHECK11.value == "on") ? "readwrite" : "readonly" (CHECK11.value == "off") ? set("value", "") : "" float optional 0 9999.9999 optional ((CHECK11.value == "on") ? "mandatory" : "optional") 0 absolute 680 326 extent 15 14 Helvetica 10 plain absolute 689 404 extent 15 14 Helvetica 10 plain off (CHECK12.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK14.value == "on") || (CHECK15.value == "on")) ? set("value", "off") : "" absolute 689 428 extent 15 14 Helvetica 10 plain off (CHECK12.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK15.value == "on") || (CHECK13.value == "on")) ? set("value", "off") : "" absolute 689 485 extent 15 14 Helvetica 10 plain off (CHECK12.value == "on") ? "on" : "off" readwrite (value == "on") ? "readonly" : "readwrite" ((CHECK14.value == "on") || (CHECK13.value == "on")) ? set("value", "off") : "" absolute 42 657 extent 846 57 wordwrap fixed 0 string optional (CHECK10.value == "on") ? "mandatory" : "optional" absolute 42 712 extent 846 31 0 string optional (CHECK8.value == "on") ? "mandatory" : "optional" readonly (CHECK8.value == "on") ? "readwrite" : "readonly" /XFDL/page[@sid="PAGE1"]/*[@sid="CHECK16" or @sid="CHECK17" or @sid="FIELD47" or @sid="BUTTON2" or @sid="FIELD48"] | /XFDL/page/triggeritem[not(@sid)] xtHvgrYCYiWUtvgbaA6yx4fY4hI= UCx213C5lb0LhhsAHEO+L5Pbkq8sBhh/yXJuL4zDZMyASF/cn6eoDA==

3eOeAvqnEyFpW+uTSgrdj7YLjaTkpyHecKFIoLu8QZNkGTQI1ciITBH0lqfIkdCH Si8fiUC3DTq3J9FsJef4YVtDF7JpUvHTOQqtq7Zgx6KC8Wxkz6rQCxOr7F0ApOYi 89zLRoe4MkDGe6ux0+WtyOTQoVIGNTDDUFXrUQNbLrE=

hDLcFK0GO/Hz1arxOOvsgM/VLyU= nnx7hbdWozGbtnFgnbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43z Kt7dlEaQL7b5+JTZt3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM 8d2rhd2Ui0xHbk0D451nhLxVWulviOSPhzKKvXrbySA= cfYpihpAQeepbNFS4MAbQRhdXpDi5wLrwxE5hIvoYqo1L8BQVu8fY1TFAPtoae1i Bg/GIJyP3iLfyuBJaDvJJLP30wBH9i/s5J3656PevpOVdTfi777Fi9Gj6y/ib2Vv +OZfJkkp4L50+p5TUhPmQLJtREsgtl+tnIOyJT++G9U=
CN=Merlin Hughes,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE CN=Transient CA,OU=X/Secure,O=Baltimore Technologies Ltd.,ST=Dublin,C=IE 1017788370348 MIIDUDCCAxCgAwIBAgIGAOz46g2sMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkzMFoXDTEyMDQwMjIxNTkyNVowbzELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEWMBQGA1UEAxMNTWVybGluIEh1Z2hl czCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDd454C+qcTIWlb65NKCt2PtguNpOSn Id5woUigu7xBk2QZNAjVyIhMEfSWp8iR0IdKLx+JQLcNOrcn0Wwl5/hhW0MXsmlS 8dM5Cq2rtmDHooLxbGTPqtALE6vsXQCk5iLz3MtGh7gyQMZ7q7HT5a3I5NChUgY1 MMNQVetRA1susQIVAIQy3BStBjvx89Wq8Tjr7IDP1S8lAoGBAJ58e4W3VqMxm7Zx YJ2xZ6KX0Ze10WnKZDyURn+T9iFIFbKRFElKDeotXwwXwYON8yre3ZRGkC+2+fiU 2bdzIWTT6LMbIMVbk+07P4OZOxJ6XWL9GuYcOQcNvX42xh34DPHdq4XdlItMR25N A+OdZ4S8VVrpb4jkj4cyir1628kgA4GEAAKBgHH2KYoaQEHnqWzRUuDAG0EYXV6Q 4ucC68MROYSL6GKqNS/AUFbvH2NUxQD7aGntYgYPxiCcj94i38rgSWg7ySSz99MA R/Yv7OSd+uej3r6TlXU34u++xYvRo+sv4m9lb/jmXyZJKeC+dPqeU1IT5kCybURL ILZfrZyDsiU/vhvVozowODAOBgNVHQ8BAf8EBAMCB4AwEQYDVR0OBAoECIatY7SE lXEOMBMGA1UdIwQMMAqACIOGPkB2MuKTMAkGByqGSM44BAMDLwAwLAIUSvT02iQj Q5da4Wpe0Bvs7GuCcVsCFCEcQpbjUfnxXFXNWiFyQ49ZrWqn MIIDSzCCAwugAwIBAgIGAOz46fwJMAkGByqGSM44BAMwbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MB4XDTAyMDQwMjIyNTkyNVoXDTEyMDQwMjIxNTkyNVowbjELMAkGA1UEBhMCSUUx DzANBgNVBAgTBkR1YmxpbjEkMCIGA1UEChMbQmFsdGltb3JlIFRlY2hub2xvZ2ll cyBMdGQuMREwDwYDVQQLEwhYL1NlY3VyZTEVMBMGA1UEAxMMVHJhbnNpZW50IENB MIIBtzCCASwGByqGSM44BAEwggEfAoGBAN3jngL6pxMhaVvrk0oK3Y+2C42k5Kch 3nChSKC7vEGTZBk0CNXIiEwR9JanyJHQh0ovH4lAtw06tyfRbCXn+GFbQxeyaVLx 0zkKrau2YMeigvFsZM+q0AsTq+xdAKTmIvPcy0aHuDJAxnursdPlrcjk0KFSBjUw w1BV61EDWy6xAhUAhDLcFK0GO/Hz1arxOOvsgM/VLyUCgYEAnnx7hbdWozGbtnFg nbFnopfRl7XRacpkPJRGf5P2IUgVspEUSUoN6i1fDBfBg43zKt7dlEaQL7b5+JTZ t3MhZNPosxsgxVuT7Ts/g5k7EnpdYv0a5hw5Bw29fjbGHfgM8d2rhd2Ui0xHbk0D 451nhLxVWulviOSPhzKKvXrbySADgYQAAoGAfag+HCABIJadDD9Aarhgc2QR3Lp7 PpMOh0lAwLiIsvkO4UlbeOS0IJC8bcqLjM1fVw6FGSaxmq+4y1ag2m9k6IdE0Qh5 NxB/xFkmdwqXFRIJVp44OeUygB47YK76NmUIYG3DdfiPPU3bqzjvtOtETiCHvo25 4D6UjwPpYErXRUajNjA0MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMECDAGAQH/AgEA MBEGA1UdDgQKBAiDhj5AdjLikzAJBgcqhkjOOAQDAy8AMCwCFELu0nuweqW7Wf0s gk/CAGGL0BGKAhRNdgQGr5iyZKoH4oqPm0VJ9TjXLg==
absolute 655 840 extent 155 27 0 readonly 05-08-02 (BUTTON1.value != "") ? "*" : "" date optional MM-DD-YY absolute 362 873 extent 22 23 Helvetica 18 plain (CHECK17.value == "on") ? set("value", "off") : "" absolute 604 873 extent 22 23 Helvetica 18 plain (CHECK16.value == "on") ? set("value", "off") : "" absolute 41 917 extent 770 23 string optional (CHECK17.value == "on") ? "mandatory" : "optional" readonly (CHECK17.value == "on") ? "readwrite" : "readonly" 0 wordwrap fixed absolute 656 940 extent 155 27 0 readonly (BUTTON2.value != "") ? "*" : "" date optional MM-DD-YY absolute 960 1260 extent 1 1
././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/resources/interop/xfilter2/merlin-xpath-filter2-three/sign-spec-c14n-1.txtlibxml-security-java-1.5.6/src/test/resources/interop/xfilter2/merlin-xpath-filter2-three/sign-spec-0000644000175000017500000000000007533734770032320 0ustar tonytonylibxml-security-java-1.5.6/src/test/java/0000755000175000017500000000000012273503732017035 5ustar tonytonylibxml-security-java-1.5.6/src/test/java/org/0000755000175000017500000000000012273503732017624 5ustar tonytonylibxml-security-java-1.5.6/src/test/java/org/apache/0000755000175000017500000000000012273503732021045 5ustar tonytonylibxml-security-java-1.5.6/src/test/java/org/apache/xml/0000755000175000017500000000000012273503732021645 5ustar tonytonylibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/0000755000175000017500000000000012273503732023514 5ustar tonytonylibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/c14n/0000755000175000017500000000000012273503732024261 5ustar tonytonylibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/c14n/implementations/0000755000175000017500000000000012273503732027471 5ustar tonytony././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/c14n/implementations/NameSpaceSymbTableTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/c14n/implementations/NameSpaceSymbT0000644000175000017500000001562012214631242032224 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.c14n.implementations; import java.util.ArrayList; import java.util.List; import org.apache.xml.security.c14n.implementations.NameSpaceSymbTable; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Attr; import org.w3c.dom.Document; public class NameSpaceSymbTableTest extends org.junit.Assert { static Attr node1,node2; static { try { Document doc = XMLUtils.createDocumentBuilder(false).newDocument(); node1 = doc.createAttributeNS("a","b"); node2 = doc.createAttributeNS("b","c"); } catch (Exception e) { e.printStackTrace(); } } @org.junit.Test public void testNullFirstXmlns() { NameSpaceSymbTable ns = new NameSpaceSymbTable(); assertNull(ns.getMapping("xmlns")); } @org.junit.Test public void testXmlnsPut() { NameSpaceSymbTable ns = new NameSpaceSymbTable(); ns.push(); ns.addMapping("xmlns", "http://a", node1); assertEquals(node1, ns.getMapping("xmlns")); } @org.junit.Test public void testXmlnsMap() { NameSpaceSymbTable ns = new NameSpaceSymbTable(); ns.push(); ns.addMapping("xmlns", "http://a", node1); assertEquals(node1, ns.getMapping("xmlns")); ns.pop(); assertEquals(null, ns.getMapping("xmlns")); } @org.junit.Test public void testXmlnsMap2() { NameSpaceSymbTable ns = new NameSpaceSymbTable(); ns.push(); ns.push(); ns.addMapping("xmlns", "http://a", node1); ns.pop(); ns.pop(); assertEquals(null, ns.getMapping("xmlns")); } @org.junit.Test public void testXmlnsPrefix() { NameSpaceSymbTable ns = new NameSpaceSymbTable(); ns.push(); ns.addMapping("xmlns", "http://a", node1); assertEquals(node1, ns.getMapping("xmlns")); ns.push(); ns.addMapping("xmlns", "http://a", node1); assertEquals(null, ns.getMapping("xmlns")); ns.push(); ns.addMapping("xmlns", "http://b", node1); assertEquals(node1, ns.getMapping("xmlns")); } @org.junit.Test public void testXmlnsRemovePrefix() { NameSpaceSymbTable ns = new NameSpaceSymbTable(); ns.push(); ns.push(); ns.addMapping("xmlns", "http://a", node1); assertEquals(node1, ns.getMapping("xmlns")); ns.pop(); assertNull(ns.getMapping("xmlns")); } @org.junit.Test public void testPrefix() { NameSpaceSymbTable ns = new NameSpaceSymbTable(); ns.push(); ns.addMapping("a", "http://a", node1); assertEquals(node1, ns.getMapping("a")); ns.push(); assertNull(ns.getMapping("a")); ns.push(); ns.addMapping("a", "http://c",node1); assertEquals(node1, ns.getMapping("a")); ns.pop(); ns.push(); assertNull(ns.getMapping("a")); ns.addMapping("a", "http://c",node1); assertEquals(node1, ns.getMapping("a")); } @org.junit.Test public void testSeveralPrefixes() { NameSpaceSymbTable ns = new NameSpaceSymbTable(); ns.push(); ns.addMapping("a", "http://a",node1); ns.addMapping("b", "http://b",node2); assertEquals(node1, ns.getMapping("a")); assertEquals(node2, ns.getMapping("b")); ns.push(); assertNull(ns.getMapping("a")); } @org.junit.Test public void testSeveralPrefixes2() { NameSpaceSymbTable ns = new NameSpaceSymbTable(); ns.push(); ns.addMapping("a", "http://a",node1); ns.push(); assertEquals(node1, ns.getMapping("a")); ns.pop(); assertEquals(node1, ns.getMapping("a")); } @org.junit.Test public void testGetUnrenderedNodes() { NameSpaceSymbTable ns = new NameSpaceSymbTable(); ns.push(); List l = new ArrayList(); ns.addMapping("xmlns", "http://a", node1); ns.push(); ns.getUnrenderedNodes(l); assertTrue(l.contains(node1)); Attr n = (Attr)ns.addMappingAndRender("xmlns", "", node2); assertNotNull("xmlns=\"\" not rendered", n); assertEquals(n, node2); } @org.junit.Test public void testUnrederedNodes() { NameSpaceSymbTable ns = new NameSpaceSymbTable(); ns.push(); List l = new ArrayList(); ns.getUnrenderedNodes(l); assertTrue(l.isEmpty()); l.clear(); ns.push(); ns.addMapping("xmlns","http://a", node1); ns.addMapping("a", "http://a", node2); ns.push(); ns.getUnrenderedNodes(l); assertTrue(l.contains(node1)); assertTrue(l.contains(node2)); ns.push(); l.clear(); ns.getUnrenderedNodes(l); assertFalse(l.contains(node1)); assertFalse(l.contains(node2)); ns.pop(); ns.pop(); l.clear(); ns.getUnrenderedNodes(l); assertTrue(l.contains(node1)); assertTrue(l.contains(node2)); } @org.junit.Test public void testBug38655() { NameSpaceSymbTable ns = new NameSpaceSymbTable(); ns.push(); ns.addMappingAndRender("generated-command", "http://foo.com/command",node1); ns.addMappingAndRender("generated-event", "http://foo.com/event",node1); ns.addMappingAndRender("command", "http://foo.com/command",node1); ns.addMappingAndRender("ui", "http://foo.com/ui", node1); ns.addMappingAndRender("event", "http://foo.com/event", node1); ns.addMappingAndRender("instruction", "http://foo/instruction", node1); ns.addMappingAndRender("directory", "http://foo.com/io/directory", node1); ns.addMappingAndRender("function", "http://foo.com/function", node1); ns.addMappingAndRender("xmlns", "http://www.w3.org/1999/xhtml", node1); ns.addMappingAndRender("ctrl", "http://foo.com/controls", node1); ns.addMappingAndRender("wiki", "http://foo.com/samples/wiki", node1); } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/c14n/implementations/UtfHelperTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/c14n/implementations/UtfHelperTest.0000644000175000017500000000533511551556206032240 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.c14n.implementations; import java.io.ByteArrayOutputStream; import java.io.UnsupportedEncodingException; import java.util.Arrays; public class UtfHelperTest extends org.junit.Assert { @org.junit.Test public void testBug40156() { String s = "\u00e4\u00f6\u00fc"; byte a[] = UtfHelpper.getStringInUtf8(s); try { byte correct[] = s.getBytes("UTF8"); boolean equals = Arrays.equals(correct, a); assertTrue(equals); } catch (UnsupportedEncodingException e) { // TODO Auto-generated catch block e.printStackTrace(); } } @org.junit.Test public void testUtf() throws Exception { int chunk = 1 << 16; int j = 0; ByteArrayOutputStream charByCharOs = new ByteArrayOutputStream(); ByteArrayOutputStream strOs = new ByteArrayOutputStream(); char chs[] = new char[chunk]; for (int i = 0; i < chunk; i++) { int ch = (chunk * j) + i; if (ch == 0xDBFF) { ch = 1; } chs[i] = (char)ch; UtfHelpper.writeCharToUtf8((char)ch, charByCharOs); } String str = new String(chs); byte a[] = UtfHelpper.getStringInUtf8(str); try { // System.out.println("chunk:"+j); byte correct[] = str.getBytes("UTF8"); assertTrue("UtfHelper.getStringInUtf8 false", Arrays.equals(correct, a)); assertTrue( "UtfHelper.getStringInUtf8 false", Arrays.equals(correct, charByCharOs.toByteArray()) ); UtfHelpper.writeStringToUtf8(str, strOs); assertTrue( "UtfHelper.writeStringToUtf8 false", Arrays.equals(correct, strOs.toByteArray()) ); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/0000755000175000017500000000000012273503732024473 5ustar tonytonylibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/version/0000755000175000017500000000000012273503732026160 5ustar tonytonylibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/version/VersionTest.java0000644000175000017500000000544211654523221031312 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.version; import java.security.Provider; import java.security.Security; /** * Version test. */ public class VersionTest extends org.junit.Assert { /** * A unit test for the algorithm below to convert a version number * to a double. */ @org.junit.Test public void testConvertVersion() throws Exception { String version = convertVersion("1.4.4"); assertTrue("1.44".equals(version)); version = convertVersion("1.4.4-SNAPSHOT"); assertTrue("1.44".equals(version)); version = convertVersion("1.4"); assertTrue("1.4".equals(version)); } @org.junit.Test public void testVersion() throws Exception { Security.addProvider(new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); Provider provider = Security.getProvider("ApacheXMLDSig"); assertTrue(provider != null); String version = System.getProperty("product.version"); assertTrue(version != null); version = convertVersion(version); double versionD = Double.parseDouble(version); assertTrue(versionD == provider.getVersion()); assertTrue(provider.getInfo().contains("Santuario")); } /** * Convert the version to a number that can be parsed to a double. * Namely, remove the "-SNAPSHOT" from the end, and convert version * numbers like 1.4.4 to 1.44. */ private String convertVersion(String version) { // Remove the "-SNAPSHOT" version if it exists int dash = version.indexOf('-'); if (dash != -1) { version = version.substring(0, dash); } // Remove the second decimal point if it exists int lastDot = version.lastIndexOf('.'); if (version.indexOf('.') != lastDot) { String prefix = version.substring(0, lastDot); String suffix = version.substring(lastDot + 1, version.length()); version = prefix.concat(suffix); } return version; } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/keys/0000755000175000017500000000000012273503732025446 5ustar tonytonylibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/keys/keyresolver/0000755000175000017500000000000012273503732030020 5ustar tonytony././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/keys/keyresolver/RetrievalMethodResolverTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/keys/keyresolver/RetrievalMeth0000644000175000017500000000607712214631242032521 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.keys.keyresolver; import java.io.FileInputStream; import java.security.Security; import javax.xml.parsers.DocumentBuilder; import org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; /** * Some tests on attacks against the RetrievalMethodResolver. */ public class RetrievalMethodResolverTest extends org.junit.Assert { private static final String BASEDIR = System.getProperty("basedir"); private static final String SEP = System.getProperty("file.separator"); public RetrievalMethodResolverTest() { org.apache.xml.security.Init.init(); Security.insertProviderAt(new XMLDSigRI(), 1); } @org.junit.Test public void testReferenceToSameRetrievalMethod() throws Exception { FileInputStream fis = null; String filename = "src/test/resources/org/apache/xml/security/keyresolver/retrievalmethod1.xml"; if (BASEDIR != null && !"".equals(BASEDIR)) { fis = new FileInputStream(BASEDIR + SEP + filename); } else { fis = new FileInputStream(filename); } DocumentBuilder db = XMLUtils.createDocumentBuilder(false); Document doc = db.parse(fis); KeyInfo keyInfo = new KeyInfo(doc.getDocumentElement(), null); // Check neither of these give a StackOverflowError. keyInfo.getPublicKey(); keyInfo.getX509Certificate(); } @org.junit.Test public void testLoopBetweenRetrievalMethods() throws Exception { FileInputStream fis = null; String filename = "src/test/resources/org/apache/xml/security/keyresolver/retrievalmethod2.xml"; if (BASEDIR != null && !"".equals(BASEDIR)) { fis = new FileInputStream(BASEDIR + SEP + filename); } else { fis = new FileInputStream(filename); } DocumentBuilder db = XMLUtils.createDocumentBuilder(false); Document doc = db.parse(fis); KeyInfo keyInfo = new KeyInfo(doc.getDocumentElement(), null); // Check neither of these give a StackOverflowError. keyInfo.getPublicKey(); keyInfo.getX509Certificate(); } } ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/keys/keyresolver/KeyResolverTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/keys/keyresolver/KeyResolverTe0000644000175000017500000003312512214631242032503 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.keys.keyresolver; import java.io.FileInputStream; import java.math.BigInteger; import java.security.KeyFactory; import java.security.KeyStore; import java.security.NoSuchAlgorithmException; import java.security.PrivateKey; import java.security.PublicKey; import java.security.cert.X509Certificate; import java.security.interfaces.RSAPrivateKey; import java.security.interfaces.RSAPublicKey; import java.security.spec.RSAPrivateKeySpec; import java.security.spec.RSAPublicKeySpec; import javax.crypto.Cipher; import javax.crypto.NoSuchPaddingException; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; import javax.xml.parsers.DocumentBuilder; import org.apache.xml.security.algorithms.JCEMapper; import org.apache.xml.security.encryption.EncryptedData; import org.apache.xml.security.encryption.EncryptedKey; import org.apache.xml.security.encryption.XMLCipher; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.keys.content.X509Data; import org.apache.xml.security.keys.content.x509.XMLX509Certificate; import org.apache.xml.security.keys.content.x509.XMLX509IssuerSerial; import org.apache.xml.security.keys.content.x509.XMLX509SKI; import org.apache.xml.security.keys.content.x509.XMLX509SubjectName; import org.apache.xml.security.keys.keyresolver.KeyResolver; import org.apache.xml.security.keys.keyresolver.KeyResolverException; import org.apache.xml.security.keys.keyresolver.KeyResolverSpi; import org.apache.xml.security.keys.keyresolver.implementations.PrivateKeyResolver; import org.apache.xml.security.keys.keyresolver.implementations.SecretKeyResolver; import org.apache.xml.security.keys.keyresolver.implementations.SingleKeyResolver; import org.apache.xml.security.keys.storage.StorageResolver; import org.apache.xml.security.keys.storage.implementations.KeyStoreResolver; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Text; /** * KeyResolver test. */ public class KeyResolverTest extends org.junit.Assert { private static final String BASEDIR = System.getProperty("basedir"); private static final String SEP = System.getProperty("file.separator"); public KeyResolverTest() { org.apache.xml.security.Init.init(); } /** * Test key resolvers through a KeyInfo. */ @org.junit.Test public void testKeyResolvers() throws Exception { char[] pwd = "secret".toCharArray(); KeyStore ks = KeyStore.getInstance("JCEKS"); FileInputStream fis = null; if (BASEDIR != null && !"".equals(BASEDIR)) { fis = new FileInputStream(BASEDIR + SEP + "src/test/resources/test.jceks"); } else { fis = new FileInputStream("src/test/resources/test.jceks"); } ks.load(fis, pwd); X509Certificate cert = (X509Certificate)ks.getCertificate("rsakey"); PublicKey publicKey = cert.getPublicKey(); PrivateKey privateKey = (PrivateKey) ks.getKey("rsakey", pwd); SecretKey secretKey = (SecretKey) ks.getKey("des3key", pwd); StorageResolver storage = new StorageResolver(new KeyStoreResolver(ks)); KeyResolverSpi privateKeyResolver = new PrivateKeyResolver(ks, pwd); KeyResolverSpi secretKeyResolver = new SecretKeyResolver(ks, pwd); DocumentBuilder db = XMLUtils.createDocumentBuilder(false); Document doc = db.newDocument(); KeyInfo ki; X509Data x509data; // X509Certificate hint ki = new KeyInfo(doc); ki.addStorageResolver(storage); x509data = new X509Data(doc); x509data.add(new XMLX509Certificate(doc, cert)); ki.add(x509data); assertEquals(publicKey, ki.getPublicKey()); assertNull(ki.getPrivateKey()); ki.registerInternalKeyResolver(privateKeyResolver); assertEquals(privateKey, ki.getPrivateKey()); // Issuer/Serial hint ki = new KeyInfo(doc); ki.addStorageResolver(storage); x509data = new X509Data(doc); x509data.add(new XMLX509IssuerSerial(doc, cert.getIssuerX500Principal().getName(), cert.getSerialNumber())); ki.add(x509data); assertEquals(publicKey, ki.getPublicKey()); ki.registerInternalKeyResolver(privateKeyResolver); assertEquals(privateKey, ki.getPrivateKey()); // SubjectName hint ki = new KeyInfo(doc); ki.addStorageResolver(storage); x509data = new X509Data(doc); x509data.add(new XMLX509SubjectName(doc, cert.getSubjectX500Principal().getName())); ki.add(x509data); assertEquals(publicKey, ki.getPublicKey()); ki.registerInternalKeyResolver(privateKeyResolver); assertEquals(privateKey, ki.getPrivateKey()); // SKI hint ki = new KeyInfo(doc); ki.addStorageResolver(storage); x509data = new X509Data(doc); x509data.add(new XMLX509SKI(doc, cert)); ki.add(x509data); assertEquals(publicKey, ki.getPublicKey()); ki.registerInternalKeyResolver(privateKeyResolver); assertEquals(privateKey, ki.getPrivateKey()); // KeyName hint String rsaKeyName = "rsakey"; ki = new KeyInfo(doc); ki.addKeyName(rsaKeyName); ki.registerInternalKeyResolver(new SingleKeyResolver(rsaKeyName, publicKey)); assertEquals(publicKey, ki.getPublicKey()); ki = new KeyInfo(doc); ki.addKeyName(rsaKeyName); ki.registerInternalKeyResolver(privateKeyResolver); assertEquals(privateKey, ki.getPrivateKey()); ki = new KeyInfo(doc); ki.addKeyName(rsaKeyName); ki.registerInternalKeyResolver(new SingleKeyResolver(rsaKeyName, privateKey)); assertEquals(privateKey, ki.getPrivateKey()); String des3KeyName = "des3key"; ki = new KeyInfo(doc); ki.addKeyName(des3KeyName); ki.registerInternalKeyResolver(secretKeyResolver); assertEquals(secretKey, ki.getSecretKey()); ki = new KeyInfo(doc); ki.addKeyName(des3KeyName); ki.registerInternalKeyResolver(new SingleKeyResolver(des3KeyName, secretKey)); assertEquals(secretKey, ki.getSecretKey()); } /** * Encrypt some data, embedded the data encryption key * in the message using the key transport algorithm rsa-1_5. * Decrypt the data by resolving the Key Encryption Key. * This test verifies if a KeyResolver can return a PrivateKey. */ @org.junit.Test public void testResolvePrivateKey() throws Exception { // See if AES-128 is available... String algorithmId = JCEMapper.translateURItoJCEID( org.apache.xml.security.utils.EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES128 ); boolean haveAES = false; if (algorithmId != null) { try { if (Cipher.getInstance(algorithmId) != null) { haveAES = true; } } catch (NoSuchAlgorithmException nsae) { // } catch (NoSuchPaddingException nspe) { // } } if (!haveAES) { return; } // Create a sample XML document Document document = XMLUtils.createDocumentBuilder(false).newDocument(); Element rootElement = document.createElement("root"); document.appendChild(rootElement); Element elem = document.createElement("elem"); Text text = document.createTextNode("text"); elem.appendChild(text); rootElement.appendChild(elem); // Create a data encryption key byte[] keyBytes = { 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7 }; SecretKeySpec dataEncryptKey = new SecretKeySpec(keyBytes, "AES"); // Create public and private keys KeyFactory keyFactory = KeyFactory.getInstance("RSA"); RSAPublicKeySpec pubKeySpec = new RSAPublicKeySpec( new BigInteger( "8710a2bcb2f3fdac177f0ae0461c2dd0ebf72e0d88a5400583a7d8bdabd6" + "ae009d30cfdf6acb5b6a64cdc730bc630a39d946d08babffe62ea20a87e37c93b3b0e8a8e576045b" + "bddfbde83ca9bfa180fe6a5f5eee60661936d728314e809201ef52cd71d9fa3c8ce83f9d30ab5e08" + "1539219e7e45dd6a60be65ac95d2049b8f21", 16), new BigInteger("10001", 16)); RSAPrivateKeySpec privKeySpec = new RSAPrivateKeySpec( new BigInteger( "8710a2bcb2f3fdac177f0ae0461c2dd0ebf72e0d88a5400583a7d8bdabd" + "6ae009d30cfdf6acb5b6a64cdc730bc630a39d946d08babffe62ea20a87e37c93b3b0e8a8e576045" + "bbddfbde83ca9bfa180fe6a5f5eee60661936d728314e809201ef52cd71d9fa3c8ce83f9d30ab5e0" + "81539219e7e45dd6a60be65ac95d2049b8f21", 16), new BigInteger( "20c39e569c2aa80cc91e5e6b0d56e49e5bbf78827bf56a546c1d996c597" + "5187cb9a50fa828e5efe51d52f5d112c20bc700b836facadca6e0051afcdfe866841e37d207c0295" + "36ff8674b301e2198b2c56abb0a0313f8ff84c1fcd6fa541aa6e5d9c018fab4784d2940def5dc709" + "ddc714d73b6c23b5d178eaa5933577b8e8ae9", 16)); RSAPublicKey pubKey = (RSAPublicKey) keyFactory.generatePublic(pubKeySpec); RSAPrivateKey privKey = (RSAPrivateKey) keyFactory.generatePrivate(privKeySpec); // Encrypt the data encryption key with the key encryption key XMLCipher keyCipher = XMLCipher.getInstance(XMLCipher.RSA_v1dot5); keyCipher.init(XMLCipher.WRAP_MODE, pubKey); EncryptedKey encryptedKey = keyCipher.encryptKey(document, dataEncryptKey); String keyName = "testResolvePrivateKey"; KeyInfo kekInfo = new KeyInfo(document); kekInfo.addKeyName(keyName); encryptedKey.setKeyInfo(kekInfo); // Encrypt the data XMLCipher xmlCipher = XMLCipher.getInstance(XMLCipher.AES_128); xmlCipher.init(XMLCipher.ENCRYPT_MODE, dataEncryptKey); EncryptedData encryptedData = xmlCipher.getEncryptedData(); KeyInfo keyInfo = new KeyInfo(document); keyInfo.add(encryptedKey); encryptedData.setKeyInfo(keyInfo); xmlCipher.doFinal(document, rootElement, true); Element encryptedDataElement = (Element) rootElement.getFirstChild(); assertEquals("EncryptedData", encryptedDataElement.getLocalName()); // Decrypt the data by resolving the private key used as the KEK // First test with an internal KeyResolver MyPrivateKeyResolver.pk = privKey; MyPrivateKeyResolver.pkName = keyName; decryptDocument(document, new MyPrivateKeyResolver()); // Now test with a static KeyResolver KeyResolver.registerAtStart(MyPrivateKeyResolver.class.getName(), false); KeyResolverSpi resolver = (KeyResolverSpi)KeyResolver.iterator().next(); assertEquals(MyPrivateKeyResolver.class.getName(), resolver.getClass().getName()); decryptDocument(document, null); } private void decryptDocument(Document docSource, KeyResolverSpi internalResolver) throws Exception { Document document = (Document)docSource.cloneNode(true); Element rootElement = document.getDocumentElement(); Element encryptedDataElement = (Element)rootElement.getFirstChild(); XMLCipher decryptCipher = XMLCipher.getInstance(); decryptCipher.init(XMLCipher.DECRYPT_MODE, null); if (internalResolver != null) { decryptCipher.registerInternalKeyResolver(internalResolver); } decryptCipher.doFinal(document, encryptedDataElement); Element decryptedElement = (Element) rootElement.getFirstChild(); assertEquals("elem", decryptedElement.getLocalName()); } // A KeyResolver that returns a PrivateKey for a specific KeyName. public static class MyPrivateKeyResolver extends KeyResolverSpi { // We use static variables because KeyResolver.register() demands // the use of the default constructor. private static PrivateKey pk; private static String pkName; public boolean engineCanResolve(Element element, String BaseURI, StorageResolver storage) { return false; } public PrivateKey engineLookupAndResolvePrivateKey( Element element, String BaseURI, StorageResolver storage ) throws KeyResolverException { if (Constants.SignatureSpecNS.equals(element.getNamespaceURI()) && Constants._TAG_KEYNAME.equals(element.getLocalName())) { String keyName = element.getFirstChild().getNodeValue(); if (pkName.equals(keyName)) { return pk; } } return null; } } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/keys/content/0000755000175000017500000000000012273503732027120 5ustar tonytonylibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/keys/content/x509/0000755000175000017500000000000012273503732027625 5ustar tonytony././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/keys/content/x509/XMLX509SKITest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/keys/content/x509/XMLX509SKITe0000644000175000017500000000620212214631242031427 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.keys.content.x509; import java.io.File; import java.io.FileInputStream; import java.security.cert.CertStore; import java.security.cert.CertificateFactory; import java.security.cert.CollectionCertStoreParameters; import java.security.cert.X509CertSelector; import java.security.cert.X509Certificate; import java.util.Collection; import java.util.Collections; import org.apache.xml.security.keys.content.x509.XMLX509SKI; /** * Test bugfix 41892: XML Security 1.4.0 does not build with IBM's JDK */ public class XMLX509SKITest extends org.junit.Assert { private static final String BASEDIR = System.getProperty("basedir"); private static final String SEP = System.getProperty("file.separator"); private CertificateFactory cf; public XMLX509SKITest() throws Exception { cf = CertificateFactory.getInstance("X.509"); } @org.junit.Test public void testGetSKIBytesFromCert() throws Exception { File f = null; if (BASEDIR != null && !"".equals(BASEDIR)) { f = new File(BASEDIR + SEP + "src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/certs/lugh.crt"); } else { f = new File( "src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/certs/lugh.crt"); } FileInputStream fis = new FileInputStream(f); X509Certificate cert = (X509Certificate) cf.generateCertificate(fis); // Get subject key identifier from certificate byte[] skid = XMLX509SKI.getSKIBytesFromCert(cert); // Use X509CertSelector to match on certificate using the skid, // thereby testing that the returned skid was correct X509CertSelector xcs = new X509CertSelector(); // DER-encode skid - required by X509CertSelector byte[] encodedSkid = new byte[skid.length+2]; encodedSkid[0] = 0x04; // OCTET STRING tag value encodedSkid[1] = (byte) skid.length; // length System.arraycopy(skid, 0, encodedSkid, 2, skid.length); xcs.setSubjectKeyIdentifier(encodedSkid); CertStore cs = CertStore.getInstance( "Collection", new CollectionCertStoreParameters(Collections.singleton(cert))); Collection certs = cs.getCertificates(xcs); assertTrue(!certs.isEmpty()); } } ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/keys/content/x509/XMLX509IssuerSerialTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/keys/content/x509/XMLX509Issue0000644000175000017500000000351212214631242031601 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.keys.content.x509; import org.apache.xml.security.keys.content.x509.XMLX509IssuerSerial; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; /** * XMLX509IssuerSerial tests. * * @author Sean Mullan */ public class XMLX509IssuerSerialTest extends org.junit.Assert { private Document doc; public XMLX509IssuerSerialTest() throws Exception { doc = XMLUtils.createDocumentBuilder(false).newDocument(); } @org.junit.Test public void testGetIssuerName() throws Exception { // Make sure hex encoded value is not escaped (see ...) String issuer = "9.99.999=#abc123"; XMLX509IssuerSerial is = new XMLX509IssuerSerial(doc, issuer, 0); assertEquals(issuer, is.getIssuerName()); // System.out.println(is.getIssuerName()); issuer = "CN=#abc123"; is = new XMLX509IssuerSerial(doc, issuer, 0); assertEquals("CN=\\#abc123", is.getIssuerName()); // System.out.println(is.getIssuerName()); } } ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/keys/content/x509/XMLX509CertificateTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/keys/content/x509/XMLX509Certi0000644000175000017500000000426012214631242031560 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.keys.content.x509; import java.io.File; import java.io.FileInputStream; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; import org.apache.xml.security.keys.content.x509.XMLX509Certificate; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; /** * Certificate parsing test. * * @author Sean Mullan */ public class XMLX509CertificateTest extends org.junit.Assert { private static final String BASEDIR = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); private static final String SEP = System.getProperty("file.separator"); @org.junit.Test public void testGetX509Certificate() throws Exception { File f = new File(BASEDIR + SEP + "src/test/resources" + SEP + "ie" + SEP + "baltimore" + SEP + "merlin-examples" + SEP + "merlin-xmldsig-twenty-three" + SEP + "signature-x509-crt.xml"); FileInputStream fis = new FileInputStream(f); Document doc = XMLUtils.createDocumentBuilder(false).parse(fis); NodeList nl = doc.getElementsByTagNameNS (Constants.SignatureSpecNS, "X509Certificate"); XMLX509Certificate xmlCert = new XMLX509Certificate((Element) nl.item(0), ""); xmlCert.getX509Certificate(); // System.out.println(cert); } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/keys/storage/0000755000175000017500000000000012273503732027112 5ustar tonytony././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/keys/storage/StorageResolverTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/keys/storage/StorageResolverTe0000644000175000017500000000666412005760702032463 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.keys.storage; import java.io.FileInputStream; import java.security.KeyStore; import java.security.cert.X509Certificate; import java.util.Iterator; import java.util.NoSuchElementException; import org.apache.xml.security.keys.storage.StorageResolver; /** * KeyStore StorageResolver test. */ public class StorageResolverTest extends org.junit.Assert { private static final String BASEDIR = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); private static final String SEP = System.getProperty("file.separator"); @org.junit.Test public void testStorageResolver() throws Exception { String inputDir = BASEDIR + SEP + "src/test/resources" + SEP + "org" + SEP + "apache" + SEP + "xml" + SEP + "security" + SEP + "samples" + SEP + "input"; FileInputStream inStream = new FileInputStream(inputDir + SEP + "keystore.jks"); KeyStore ks = KeyStore.getInstance("JKS"); ks.load(inStream, "xmlsecurity".toCharArray()); FileInputStream inStream2 = new FileInputStream(inputDir + SEP + "keystore2.jks"); KeyStore ks2 = KeyStore.getInstance("JCEKS"); ks2.load(inStream2, "xmlsecurity".toCharArray()); StorageResolver storage = new StorageResolver(ks); storage.add(ks2); Iterator iter = storage.getIterator(); checkIterator(iter); // check new iterator starts from the beginning Iterator iter2 = storage.getIterator(); checkIterator(iter2); // check the iterators are independent // check calling next() without calling hasNext() iter = storage.getIterator(); iter2 = storage.getIterator(); while (iter.hasNext()) { X509Certificate cert = (X509Certificate) iter.next(); X509Certificate cert2 = (X509Certificate) iter2.next(); if (!cert.equals(cert2)) { fail("StorageResolver iterators are not independent"); } } assertFalse(iter2.hasNext()); } private void checkIterator(Iterator iter) { int count = 0; iter.hasNext(); // hasNext() is idempotent while (iter.hasNext()) { X509Certificate cert = (X509Certificate) iter.next(); cert.getSubjectX500Principal().getName(); count++; } // The iterator skipped over symmetric keys assertEquals(4, count); // Cannot go beyond last element try { iter.next(); fail("Expecting NoSuchElementException"); } catch (NoSuchElementException e) { // } } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/keys/storage/KeyStoreResolverTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/keys/storage/KeyStoreResolverT0000644000175000017500000000637012005760702032451 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.keys.storage; import java.io.FileInputStream; import java.security.KeyStore; import java.security.cert.X509Certificate; import java.util.Iterator; import java.util.NoSuchElementException; import org.apache.xml.security.keys.storage.implementations.KeyStoreResolver; /** * KeyStore StorageResolver test. */ public class KeyStoreResolverTest extends org.junit.Assert { private static final String BASEDIR = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); private static final String SEP = System.getProperty("file.separator"); @org.junit.Test public void testKeyStoreResolver() throws Exception { FileInputStream f = new FileInputStream(BASEDIR + SEP + "src/test/resources" + SEP + "org" + SEP + "apache" + SEP + "xml" + SEP + "security" + SEP + "samples" + SEP + "input" + SEP + "keystore2.jks"); KeyStore ks = KeyStore.getInstance("JCEKS"); ks.load(f, "xmlsecurity".toCharArray()); KeyStoreResolver ksResolver = new KeyStoreResolver(ks); Iterator iter = ksResolver.getIterator(); checkIterator(iter); // check new iterator starts from the beginning Iterator iter2 = ksResolver.getIterator(); checkIterator(iter2); // check the iterators are independent // check calling next() without calling hasNext() iter = ksResolver.getIterator(); iter2 = ksResolver.getIterator(); while (iter.hasNext()) { X509Certificate cert = (X509Certificate) iter.next(); X509Certificate cert2 = (X509Certificate) iter2.next(); if (!cert.equals(cert2)) { fail("KeyStoreResolver iterators are not independent"); } } assertFalse(iter2.hasNext()); } private void checkIterator(Iterator iter) { int count = 0; iter.hasNext(); // hasNext() is idempotent while (iter.hasNext()) { X509Certificate cert = (X509Certificate) iter.next(); cert.getSubjectX500Principal().getName(); count++; } // The iterator skipped over symmetric keys assertEquals(3, count); // Cannot go beyond last element try { iter.next(); fail("Expecting NoSuchElementException"); } catch (NoSuchElementException e) { // } } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/c14n/0000755000175000017500000000000012273503732025240 5ustar tonytonylibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/c14n/implementations/0000755000175000017500000000000012273503732030450 5ustar tonytony././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/c14n/implementations/Santuario191Test.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/c14n/implementations/Santuario0000644000175000017500000000533312214631242032335 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.c14n.implementations; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import javax.xml.parsers.DocumentBuilder; import org.w3c.dom.Document; import org.w3c.dom.NodeList; import org.apache.xml.security.c14n.implementations.Canonicalizer11; import org.apache.xml.security.c14n.implementations.Canonicalizer11_OmitComments; import org.apache.xml.security.utils.XMLUtils; /** * This is a test for Santuario-191: * * https://issues.apache.org/jira/browse/SANTUARIO-191 * * An xml:Id attribute is appearing in a child element, contrary to the C14n11 spec. */ public class Santuario191Test extends org.junit.Assert { private static final String INPUT_DATA = "" + "" + "" + " Alice" + " Bob" + "" + ""; private static final String EXPECTED_RESULT = "" + " Alice" + " Bob" + ""; private DocumentBuilder db; static { org.apache.xml.security.Init.init(); } @org.junit.Test public void testSantuario191() throws Exception { // // Parse the Data // db = XMLUtils.createDocumentBuilder(false); Document doc = db.parse(new ByteArrayInputStream(INPUT_DATA.getBytes("UTF8"))); // // Canonicalize the data // NodeList dataNodes = doc.getElementsByTagName("data"); Canonicalizer11 c14ner = new Canonicalizer11_OmitComments(); byte[] result = c14ner.engineCanonicalizeSubTree(dataNodes.item(0)); // // Test against expected result // ByteArrayOutputStream out = new ByteArrayOutputStream(); out.write(result); assertTrue(EXPECTED_RESULT.equals(out.toString("UTF8"))); } } ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/c14n/implementations/Santuario273Test.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/c14n/implementations/Santuario0000644000175000017500000001053412214631242032334 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.c14n.implementations; import java.io.ByteArrayInputStream; import javax.xml.parsers.DocumentBuilder; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.Init; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.test.DSNamespaceContext; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Node; /** * This is a test for Santuario-273: * * https://issues.apache.org/jira/browse/SANTUARIO-273 * "xml:base attribute not processed correctly in C14N11 canonicalization" */ public class Santuario273Test extends org.junit.Assert { public static String input = "" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " 60NvZvtdTB+7UnlLp/H24p7h4bs=\n" + " \n" + " \n" + " \n" + " fKMmy9GYF2s8rLFrZdVugTOFuWx19ccX7jh5HqFd4vMOY7LWAj52ykjSdvtW3fNY\n" + " PPYGC4MFL19oPSId5GEsMtFMpGXB3XaCtoKjMCHQsN3+kom8YnGf7Ge1JNRcGty5\n" + " 0UsoP6Asj47+QR7QECT64uoziha4WRDVyXjDrg24W+U=\n" + " \n" + " \n" + " Lugh\n" + " \n" + "\n" ; public static final String expectedResult = "\n" + " \n" + " \n" + " \n" + " \n" + " 60NvZvtdTB+7UnlLp/H24p7h4bs=\n" + " \n" + " "; static { Init.init(); } @org.junit.Test public void testC14n11Base() throws Exception { DocumentBuilder documentBuilder = XMLUtils.createDocumentBuilder(true); documentBuilder.setErrorHandler(new org.apache.xml.security.utils.IgnoreAllErrorHandler()); byte inputBytes[] = input.getBytes(); Document doc = documentBuilder.parse(new ByteArrayInputStream(inputBytes)); Canonicalizer c14n = Canonicalizer.getInstance(Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS); XPathFactory xpf = XPathFactory.newInstance(); XPath xPath = xpf.newXPath(); xPath.setNamespaceContext(new DSNamespaceContext()); Node signedInfo = (Node) xPath.evaluate("//ds:SignedInfo[1]", doc, XPathConstants.NODE); byte[] output = c14n.canonicalizeSubtree(signedInfo); assertEquals( new String(output, "UTF-8"), expectedResult); } } ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/c14n/implementations/Canonicalizer20010315Test.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/c14n/implementations/Canonical0000644000175000017500000013060112234743735032271 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.c14n.implementations; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.HashMap; import java.util.Map; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.OutputKeys; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathExpressionException; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.c14n.InvalidCanonicalizerException; import org.apache.xml.security.test.DSNamespaceContext; import org.apache.xml.security.test.resource.TestVectorResolver; import org.apache.xml.security.utils.IgnoreAllErrorHandler; import org.apache.xml.security.utils.JavaUtils; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.NodeList; import org.xml.sax.SAXException; /** * Unit test for * {@link org.apache.xml.security.c14n.implementations.Canonicalizer20010315WithXPath} * * @author Christian Geuer-Pollmann */ public class Canonicalizer20010315Test extends org.junit.Assert { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Canonicalizer20010315Test.class.getName()); static { org.apache.xml.security.Init.init(); } /** Field prefix */ private String prefix; public Canonicalizer20010315Test() { prefix = "src/test/resources/org/apache/xml/security/c14n/"; String basedir = System.getProperty("basedir"); if (basedir != null && !"".equals(basedir)) { prefix = basedir + "/" + prefix; } } /** * 3.1 PIs, Comments, and Outside of Document Element * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void test31withCommentsSubtree() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { String descri = "3.1: PIs, Comments, and Outside of Document Element. (commented)"; String fileIn = prefix + "in/31_input.xml"; String fileRef = prefix + "in/31_c14n-comments.xml"; String fileOut = prefix + "out/xpath_31_output-comments.xml"; String c14nURI = Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS; boolean validating = true; String xpath = null; assertTrue(descri, c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath)); } /** * 3.1 PIs, Comments, and Outside of Document Element * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void test31withCommentsSubset() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { String descri = "3.1: PIs, Comments, and Outside of Document Element. (commented)"; String fileIn = prefix + "in/31_input.xml"; String fileRef = prefix + "in/31_c14n-comments.xml"; String fileOut = prefix + "out/xpath_31_output-comments.xml"; String c14nURI = Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS; boolean validating = true; String xpath = Canonicalizer.XPATH_C14N_WITH_COMMENTS_SINGLE_NODE; assertTrue(descri, c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath)); } /** * 3.1 PIs, Comments, and Outside of Document Element * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @see
the example from the spec * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void test31subtree() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { String descri = "3.1: PIs, Comments, and Outside of Document Element. (uncommented)"; String fileIn = prefix + "in/31_input.xml"; String fileRef = prefix + "in/31_c14n.xml"; String fileOut = prefix + "out/xpath_31_output.xml"; String c14nURI = Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS; boolean validating = true; String xpath = null; assertTrue(descri, c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath)); } /** * 3.1 PIs, Comments, and Outside of Document Element * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @see the example from the spec * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void test31subset() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { String descri = "3.1: PIs, Comments, and Outside of Document Element. (uncommented)"; String fileIn = prefix + "in/31_input.xml"; String fileRef = prefix + "in/31_c14n.xml"; String fileOut = prefix + "out/xpath_31_output.xml"; String c14nURI = Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS; boolean validating = true; String xpath = Canonicalizer.XPATH_C14N_WITH_COMMENTS_SINGLE_NODE; assertTrue(descri, c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath)); } /** * 3.2 Whitespace in Document Content * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @see the example from the spec * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void test32subtree() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { String descri = "3.2 Whitespace in Document Content. (uncommented)"; String fileIn = prefix + "in/32_input.xml"; String fileRef = prefix + "in/32_c14n.xml"; String fileOut = prefix + "out/xpath_32_output.xml"; String c14nURI = Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS; boolean validating = true; String xpath = null; assertTrue(descri, c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath)); } /** * 3.2 Whitespace in Document Content * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @see the example from the spec * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void test32subset() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { String descri = "3.2 Whitespace in Document Content. (uncommented)"; String fileIn = prefix + "in/32_input.xml"; String fileRef = prefix + "in/32_c14n.xml"; String fileOut = prefix + "out/xpath_32_output.xml"; String c14nURI = Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS; boolean validating = true; String xpath = Canonicalizer.XPATH_C14N_WITH_COMMENTS_SINGLE_NODE; assertTrue(descri, c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath)); } /** * 3.3 Start and End Tags * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @see the example from the spec * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void test33subtree() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { String descri = "3.3 Start and End Tags. (uncommented)"; String fileIn = prefix + "in/33_input.xml"; String fileRef = prefix + "in/33_c14n.xml"; String fileOut = prefix + "out/xpath_33_output.xml"; String c14nURI = Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS; boolean validating = true; String xpath = null; // Canonicalizer.XPATH_C14N_OMIT_COMMENTS_SINGLE_NODE; assertTrue(descri, c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath)); } @org.junit.Test public void test33subset() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { String descri = "3.3 Start and End Tags. (uncommented)"; String fileIn = prefix + "in/33_input.xml"; String fileRef = prefix + "in/33_c14n.xml"; String fileOut = prefix + "out/xpath_33_output.xml"; String c14nURI = Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS; boolean validating = true; String xpath = Canonicalizer.XPATH_C14N_WITH_COMMENTS_SINGLE_NODE; assertTrue(descri, c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath)); } /** * 3.4 Character Modifications and Character References * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @see #test34validatingParser * @see the example from the spec * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void test34() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { String descri = "3.4 Character Modifications and Character References. (uncommented)"; String fileIn = prefix + "in/34_input.xml"; String fileRef = prefix + "in/34_c14n.xml"; String fileOut = prefix + "out/xpath_34_output.xml"; String c14nURI = Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS; boolean validating = false; String xpath = null; assertTrue(descri, c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath)); } /** * 3.4 Character Modifications and Character References (patched to run on validating Parsers) *

* The spec states that: *

* Note: The last element, normId, is well-formed but violates a validity * constraint for attributes of type ID. For testing canonical XML * implementations based on validating processors, remove the line * containing this element from the input and canonical form. In general, * XML consumers should be discouraged from using this feature of XML. * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @see the example from the spec * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void test34subtree() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { String descri = "3.4 Character Modifications and Character References. (uncommented, patched to run on validating Parsers)"; String fileIn = prefix + "in/34_input_validatingParser.xml"; String fileRef = prefix + "in/34_c14n_validatingParser.xml"; String fileOut = prefix + "out/xpath_34_output_validatingParser.xml"; String c14nURI = Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS; boolean validating = true; String xpath = null; assertTrue(descri, c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath)); } /** * 3.4 Character Modifications and Character References (patched to run on validating Parsers) *

* The spec states that: *

* Note: The last element, normId, is well-formed but violates a validity * constraint for attributes of type ID. For testing canonical XML * implementations based on validating processors, remove the line * containing this element from the input and canonical form. In general, * XML consumers should be discouraged from using this feature of XML. * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @see the example from the spec * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void test34subset() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { String descri = "3.4 Character Modifications and Character References. (uncommented, patched to run on validating Parsers)"; String fileIn = prefix + "in/34_input_validatingParser.xml"; String fileRef = prefix + "in/34_c14n_validatingParser.xml"; String fileOut = prefix + "out/xpath_34_output_validatingParser.xml"; String c14nURI = Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS; boolean validating = true; String xpath = Canonicalizer.XPATH_C14N_WITH_COMMENTS_SINGLE_NODE; assertTrue(descri, c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath)); } /** * 3.5 Entity References * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @see the example from the spec * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void test35subtree() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { String descri = "3.5 Entity References. (uncommented)"; String fileIn = prefix + "in/35_input.xml"; String fileRef = prefix + "in/35_c14n.xml"; String fileOut = prefix + "out/xpath_35_output.xml"; String c14nURI = Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS; boolean validating = true; String xpath = null; assertTrue(descri, c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath)); } /** * 3.5 Entity References * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @see the example from the spec * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void test35subset() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { String descri = "3.5 Entity References. (uncommented)"; String fileIn = prefix + "in/35_input.xml"; String fileRef = prefix + "in/35_c14n.xml"; String fileOut = prefix + "out/xpath_35_output.xml"; String c14nURI = Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS; boolean validating = true; String xpath = Canonicalizer.XPATH_C14N_WITH_COMMENTS_SINGLE_NODE; assertTrue(descri, c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath)); } /** * 3.6 UTF-8 Encoding * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @see the example from the spec * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void test36subtree() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { String descri = "3.6 UTF-8 Encoding. (uncommented)"; String fileIn = prefix + "in/36_input.xml"; String fileRef = prefix + "in/36_c14n.xml"; String fileOut = prefix + "out/xpath_36_output.xml"; String c14nURI = Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS; boolean validating = true; String xpath = null; assertTrue(descri, c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath)); } /** * 3.6 UTF-8 Encoding * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @see the example from the spec * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void test36subset() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { String descri = "3.6 UTF-8 Encoding. (uncommented)"; String fileIn = prefix + "in/36_input.xml"; String fileRef = prefix + "in/36_c14n.xml"; String fileOut = prefix + "out/xpath_36_output.xml"; String c14nURI = Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS; boolean validating = true; String xpath = Canonicalizer.XPATH_C14N_WITH_COMMENTS_SINGLE_NODE; assertTrue(descri, c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath)); } /** * 3.7 Document Subsets * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @see the example from the spec * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void test37() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { String descri = "3.7 Document Subsets. (uncommented)"; String fileIn = prefix + "in/37_input.xml"; String fileRef = prefix + "in/37_c14n.xml"; String fileOut = prefix + "out/xpath_37_output.xml"; String c14nURI = Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS; boolean validating = true; Map namespace = new HashMap(); namespace.put("ietf", "http://www.ietf.org"); String xpath = "(//. | //@* | //namespace::*)" + "[ " + "self::ietf:e1 or " + "(parent::ietf:e1 and not(self::text() or self::e2)) or " + "count(id(\"E3\")|ancestor-or-self::node()) = count(ancestor-or-self::node()) " + "]"; assertTrue(descri, c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath, namespace)); } /** * 3.7 Document Subsets * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @see the example from the spec * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void test37byNodeList() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { //String descri = "3.7 Document Subsets. (uncommented), c14n by NodeList"; String fileIn = prefix + "in/37_input.xml"; String fileRef = prefix + "in/37_c14n.xml"; //String c14nURI = Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS; //boolean validating = true; DocumentBuilder db = XMLUtils.createDocumentBuilder(false, false); org.xml.sax.EntityResolver resolver = new TestVectorResolver(); db.setEntityResolver(resolver); Document doc = db.parse(resolver.resolveEntity(null, fileIn)); String xpath = "(//. | //@* | //namespace::*)" + "[ " + "self::ietf:e1 or " + "(parent::ietf:e1 and not(self::text() or self::e2)) or " + "count(id(\"E3\")|ancestor-or-self::node()) = count(ancestor-or-self::node()) " + "]"; Map namespace = new HashMap(); namespace.put("ietf", "http://www.ietf.org"); XPathFactory xpf = XPathFactory.newInstance(); XPath xPath = xpf.newXPath(); DSNamespaceContext namespaceContext = new DSNamespaceContext(namespace); xPath.setNamespaceContext(namespaceContext); NodeList nodes = (NodeList)xPath.evaluate((String) xpath, doc, XPathConstants.NODESET); Canonicalizer c14n = Canonicalizer.getInstance(Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS); byte c14nBytes[] = c14n.canonicalizeXPathNodeSet(nodes); InputStream refStream = resolver.resolveEntity(null, fileRef).getByteStream(); byte refBytes[] = JavaUtils.getBytesFromStream(refStream); assertEquals(new String(refBytes),new String(c14nBytes)); } /** * Note: This specification supports the recent XML plenary decision to * deprecate relative namespace URIs as follows: implementations of XML * canonicalization MUST report an operation failure on documents containing * relative namespace URIs. XML canonicalization MUST NOT be implemented * with an XML parser that converts relative URIs to absolute URIs. * * Implementations MUST report an operation failure on documents containing * relative namespace URIs. * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @throws TransformerException */ @org.junit.Test public void testRelativeNSbehaviour() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException { //J- String inputStr = "" + "" + "" + "" + "" + "\n" + ""; //J+ DocumentBuilder db = XMLUtils.createDocumentBuilder(false); Document doc = db.parse(new ByteArrayInputStream(inputStr.getBytes())); boolean weCatchedTheRelativeNS = false; try { Canonicalizer c14n = Canonicalizer.getInstance(Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS); c14n.canonicalizeSubtree(doc); } catch (CanonicalizationException cex) { // if we reach this point - good. log.debug("We catched the C14nEx, that's good: " + cex.getMessage()); weCatchedTheRelativeNS = true; } assertTrue("We did not catch the relative namespace", weCatchedTheRelativeNS); } /** * The XPath data model represents data using UCS characters. * Implementations MUST use XML processors that support UTF-8 and UTF-16 * and translate to the UCS character domain. For UTF-16, the leading byte * order mark is treated as an artifact of encoding and stripped from the * UCS character data (subsequent zero width non-breaking spaces appearing * within the UTF-16 data are not removed) [UTF-16, Section 3.2]. Support * for ISO-8859-1 encoding is RECOMMENDED, and all other character encodings * are OPTIONAL. * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @throws TransformerException */ @org.junit.Test public void testTranslationFromUTF16toUTF8() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException { String val = "The german &auml (which is Unicode &#xE4;): "ä""; byte utf16[] = convertToUTF16(val.getBytes()); Canonicalizer c14n = Canonicalizer.getInstance(Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS); byte c14nBytes[] = c14n.canonicalize(utf16); org.xml.sax.EntityResolver resolver = new TestVectorResolver(); InputStream refStream = resolver.resolveEntity( null, prefix + "/in/testTranslationFromUTF16toUTF8.xml").getByteStream(); byte refBytes[] = JavaUtils.getBytesFromStream(refStream); boolean equal = java.security.MessageDigest.isEqual(refBytes, c14nBytes); assertTrue("Parser does not translate to UCS character domain", equal); } /** * Method testXMLAttributes1 * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void testXMLAttributes1() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { //J- String input = "" + "" + "" + "" + "" + "" + "" + "" + ""; String definedOutput = "" + "" + "" + "" + ""; //J+ assertTrue(doTestXMLAttributes(input, definedOutput)); } /** * Method testXMLAttributes2 * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void testXMLAttributes2() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { //J- String input = "" + "" + "" + "" + "" + "" + "" + "" + ""; String definedOutput = "" + "" + "" + "" + ""; //J+ assertTrue(doTestXMLAttributes(input, definedOutput)); } /** * Method testXMLAttributes3 * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void testXMLAttributes3() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { //J- String input = "" + "" + "" + "" + "" + "" + "" + "" + ""; String definedOutput = "" + "" + "" + "" + ""; //J+ assertTrue(doTestXMLAttributes(input, definedOutput)); } /** * Method testXMLAttributes4 * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test @org.junit.Ignore public void _testXMLAttributes4() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { //J- String input = "" + "" + "" + "" + "" + "" + "" + "" + ""; String definedOutput = "" + "" + "" + "" + "" + "" + ""; //J+ assertTrue(doTestXMLAttributes(input, definedOutput)); } /** * Method testXMLAttributes5 * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test @org.junit.Ignore public void _testXMLAttributes5() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { //J- String input = "" + "" + "" + "" + "" + "" + "" + "" + ""; String definedOutput = "" + "" + "" + "" + "" + "" + ""; //J+ assertTrue(doTestXMLAttributes(input, definedOutput)); } /** * Method testXMLAttributes6 * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test @org.junit.Ignore public void _testXMLAttributes6() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { //J- String input = "" + "" + "" + "" + "" + "" + "" + "" + ""; String definedOutput = "" + "" + "" + "" + "" + "" + ""; //J+ assertTrue(doTestXMLAttributes(input, definedOutput)); } /** * Method doTestXMLAttributes * * @param input * @param definedOutput * @param writeResultsToFile * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @throws TransformerException * @throws XPathExpressionException */ private boolean doTestXMLAttributes(String input, String definedOutput) throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { DocumentBuilder db = XMLUtils.createDocumentBuilder(true); db.setErrorHandler(new org.apache.xml.security.utils .IgnoreAllErrorHandler()); Document doc = db.parse(new ByteArrayInputStream(input.getBytes())); Canonicalizer c14nizer = Canonicalizer.getInstance(Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS); //XMLUtils.circumventBug2650(doc); XPathFactory xpf = XPathFactory.newInstance(); XPath xPath = xpf.newXPath(); xPath.setNamespaceContext(new DSNamespaceContext()); String xpath = "(//*[local-name()='included'] | //@*[parent::node()[local-name()='included']])"; NodeList nodes = (NodeList)xPath.evaluate((String) xpath, doc, XPathConstants.NODESET); byte result[] = c14nizer.canonicalizeXPathNodeSet(nodes); byte defined[] = definedOutput.getBytes(); assertEquals(definedOutput, new String(result)); return java.security.MessageDigest.isEqual(defined, result); } private boolean c14nAndCompare( String fileIn, String fileRef, String fileOut, String c14nURI, boolean validating, String xpath ) throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { Map namespace = new HashMap(); return c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath, namespace); } private boolean c14nAndCompare( String fileIn, String fileRef, String fileOut, String c14nURI, boolean validating, String xpath, Map namespaces ) throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { DocumentBuilder documentBuilder = XMLUtils.createDocumentBuilder(validating, false); // throw away all warnings and errors documentBuilder.setErrorHandler(new IgnoreAllErrorHandler()); // org.xml.sax.EntityResolver resolver = new TestVectorResolver(); // documentBuilder.setEntityResolver(resolver); // Document doc = documentBuilder.parse(resolver.resolveEntity(null, fileIn)); Document doc = documentBuilder.parse(fileIn); Canonicalizer c14n = Canonicalizer.getInstance(c14nURI); byte c14nBytes[] = null; if (xpath == null) { c14nBytes = c14n.canonicalizeSubtree(doc); } else { NodeList nl = null; XPathFactory xpf = XPathFactory.newInstance(); XPath xPath = xpf.newXPath(); DSNamespaceContext namespaceContext = new DSNamespaceContext(namespaces); xPath.setNamespaceContext(namespaceContext); nl = (NodeList)xPath.evaluate((String) xpath, doc, XPathConstants.NODESET); c14nBytes = c14n.canonicalizeXPathNodeSet(nl); } // org.xml.sax.InputSource refIs = resolver.resolveEntity(null, fileRef); // byte refBytes[] = JavaUtils.getBytesFromStream(refIs.getByteStream()); byte refBytes[] = JavaUtils.getBytesFromFile(fileRef); // if everything is OK, result is true; we do a binary compare, byte by byte boolean result = java.security.MessageDigest.isEqual(refBytes, c14nBytes); if (!result) { File f = new File(fileOut); if (!f.exists()) { File parent = new File(f.getParent()); parent.mkdirs(); f.createNewFile(); } FileOutputStream fos = new FileOutputStream(f); fos.write(c14nBytes); log.debug("Wrote erroneous result to file " + f.toURI().toURL().toString()); assertEquals(new String(refBytes),new String(c14nBytes)); fos.close(); } return result; } /** * This method takes the input bytes as XML Document and converts it to an * UTF-16 encoded XML document which is serialized to byte[] and returned. * * @param input * * @throws IOException * @throws ParserConfigurationException * @throws SAXException * @throws TransformerConfigurationException * @throws TransformerException */ public static byte[] convertToUTF16(byte input[]) throws ParserConfigurationException, IOException, SAXException, TransformerConfigurationException, TransformerException { //String ENCODING_ISO8859_1 = "ISO-8859-1"; //String ENCODING_UTF8 = "UTF-8"; String ENCODING_UTF16 = "UTF-16"; DocumentBuilder db = XMLUtils.createDocumentBuilder(false); Document doc = db.parse(new ByteArrayInputStream(input)); TransformerFactory tFactory = TransformerFactory.newInstance(); Transformer transformer = tFactory.newTransformer(); transformer.setOutputProperty(OutputKeys.ENCODING, ENCODING_UTF16); transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no"); DOMSource source = new DOMSource(doc); ByteArrayOutputStream os = new ByteArrayOutputStream(); StreamResult result = new StreamResult(os); transformer.transform(source, result); return os.toByteArray(); } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/c14n/implementations/Bug45961Test.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/c14n/implementations/Bug45961T0000644000175000017500000001160012214631242031634 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.c14n.implementations; import java.io.FileInputStream; import java.security.KeyStore; import java.security.PrivateKey; import java.security.cert.X509Certificate; import javax.xml.parsers.DocumentBuilder; import org.apache.xml.security.Init; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.signature.ObjectContainer; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.signature.XMLSignatureException; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; public class Bug45961Test extends org.junit.Assert { private static final String OBJECT_ID = "Object"; private static final String MOCK_CANONICALIZATION_METHOD = MockCanonicalizationMethod.MOCK_CANONICALIZATION_METHOD; private static final char[] PASSWORD = "changeit".toCharArray(); private static final String ALIAS = "mullan"; private DocumentBuilder _builder; private ObjectContainer object; public Bug45961Test() throws Exception { Init.init(); Canonicalizer.register(MOCK_CANONICALIZATION_METHOD, MockCanonicalizationMethod.class.getName()); _builder = XMLUtils.createDocumentBuilder(false); } @org.junit.Test public void testBug() throws Exception { Document document = getSignedDocument(); NodeList list = document.getElementsByTagNameNS(Constants.SignatureSpecNS, Constants._TAG_SIGNATURE); Element element = (Element) list.item(0); XMLSignature signature = new XMLSignature(element, null); KeyInfo keyInfo = signature.getKeyInfo(); X509Certificate certificate = keyInfo.getX509Certificate(); assertNotNull(certificate); try { signature.checkSignatureValue(certificate); } catch (XMLSignatureException e) { fail(e.getMessage()); } } private Document getSignedDocument() throws Exception { KeyStore ks = KeyStore.getInstance("JKS"); FileInputStream fis = new FileInputStream(getAbsolutePath("src/test/resources/test.jks")); ks.load(fis, PASSWORD); fis.close(); PrivateKey privateKey = (PrivateKey) ks.getKey(ALIAS, PASSWORD); X509Certificate signingCert = (X509Certificate) ks .getCertificate(ALIAS); Document document = _builder.newDocument(); XMLSignature signature = new XMLSignature(document, null, XMLSignature.ALGO_ID_SIGNATURE_DSA, MOCK_CANONICALIZATION_METHOD); Element root = document.createElementNS("", "RootElement"); root.appendChild(document.createTextNode("Some simple test\n")); root.appendChild(signature.getElement()); document.appendChild(root); // document.appendChild(signature.getElement()); Element root2 = document.createElementNS("", "RootElement"); root2.appendChild(document.createTextNode("Some simple test\n")); object = new ObjectContainer(document); object.appendChild(root2); object.setId(OBJECT_ID); root.appendChild(object.getElement()); signature.addDocument("#" + OBJECT_ID); signature.addDocument("", getTransforms(document)); signature.addKeyInfo(signingCert); signature.sign(privateKey); return document; } private Transforms getTransforms(Document document) throws Exception { Transforms transforms = new Transforms(document); transforms.addTransform(Transforms.TRANSFORM_ENVELOPED_SIGNATURE); return transforms; } private String getAbsolutePath(String path) { String basedir = System.getProperty("basedir"); if (basedir != null && !"".equals(basedir)) { path = basedir + "/" + path; } return path; } } ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/c14n/implementations/MockCanonicalizationMethod.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/c14n/implementations/MockCanon0000644000175000017500000000475512030302102032231 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.c14n.implementations; import java.io.OutputStream; import java.util.Set; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.CanonicalizerSpi; import org.apache.xml.security.c14n.implementations.Canonicalizer11_OmitComments; import org.w3c.dom.Node; public class MockCanonicalizationMethod extends CanonicalizerSpi { public static final String MOCK_CANONICALIZATION_METHOD = "mock.canonicalization.method"; private Canonicalizer11_OmitComments _impl; public MockCanonicalizationMethod() { _impl = new Canonicalizer11_OmitComments(); } public byte[] engineCanonicalizeSubTree(Node rootNode) throws CanonicalizationException { return _impl.engineCanonicalizeSubTree(rootNode); } public byte[] engineCanonicalizeSubTree(Node rootNode, String inclusiveNamespaces) throws CanonicalizationException { return _impl.engineCanonicalizeSubTree(rootNode, inclusiveNamespaces); } public byte[] engineCanonicalizeXPathNodeSet(Set xpathNodeSet) throws CanonicalizationException { return _impl.engineCanonicalizeXPathNodeSet(xpathNodeSet); } public byte[] engineCanonicalizeXPathNodeSet(Set xpathNodeSet, String inclusiveNamespaces) throws CanonicalizationException { return _impl.engineCanonicalizeXPathNodeSet(xpathNodeSet, inclusiveNamespaces); } public boolean engineGetIncludeComments() { return _impl.engineGetIncludeComments(); } public String engineGetURI() { return MOCK_CANONICALIZATION_METHOD; } public void setWriter(OutputStream os) { _impl.setWriter(os); } } ././@LongLink0000000000000000000000000000020300000000000011560 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/c14n/implementations/Canonicalizer20010315ExclusiveTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/c14n/implementations/Canonical0000644000175000017500000004120611610334611032255 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.c14n.implementations; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.StringReader; import java.util.HashSet; import java.util.Set; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerException; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathExpressionException; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.InvalidCanonicalizerException; import org.apache.xml.security.c14n.implementations.Canonicalizer20010315; import org.apache.xml.security.c14n.implementations.Canonicalizer20010315Excl; import org.apache.xml.security.c14n.implementations.Canonicalizer20010315ExclOmitComments; import org.apache.xml.security.c14n.implementations.Canonicalizer20010315ExclWithComments; import org.apache.xml.security.c14n.implementations.Canonicalizer20010315WithComments; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.signature.XMLSignatureException; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.test.DSNamespaceContext; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.JavaUtils; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.InputSource; import org.xml.sax.SAXException; /** * @author Christian Geuer-Pollmann */ public class Canonicalizer20010315ExclusiveTest extends org.junit.Assert { static { org.apache.xml.security.Init.init(); } /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog( Canonicalizer20010315ExclusiveTest.class.getName() ); /** Field dbf */ DocumentBuilderFactory dbf; /** Field db */ DocumentBuilder db; public Canonicalizer20010315ExclusiveTest() throws ParserConfigurationException { this.dbf = DocumentBuilderFactory.newInstance(); this.dbf.setNamespaceAware(true); this.db = this.dbf.newDocumentBuilder(); } /** * Method testA * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @throws TransformerException * @throws XMLSecurityException * @throws XMLSignatureException * @throws org.apache.xml.security.keys.keyresolver.KeyResolverException */ @org.junit.Test public void testA() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XMLSignatureException, XMLSecurityException, org.apache.xml.security.keys.keyresolver.KeyResolverException { File fileIn = new File(getAbsolutePath( "src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/signature.xml")); // File fileIn = new File("signature.xml"); assertTrue("file exists", fileIn.exists()); Document doc = this.db.parse(fileIn); Element signatureElement = (Element) doc.getElementsByTagNameNS( Constants.SignatureSpecNS, Constants._TAG_SIGNATURE).item(0); XMLSignature xmlSignature = new XMLSignature(signatureElement, fileIn.toURI().toURL().toString()); boolean verify = xmlSignature.checkSignatureValue(xmlSignature.getKeyInfo().getPublicKey()); int length = xmlSignature.getSignedInfo().getLength(); int numberOfPositiveReferences = 0; for (int i = 0; i < length; i++) { boolean singleResult = xmlSignature.getSignedInfo().getVerificationResult(i); if (singleResult) { numberOfPositiveReferences++; } } assertTrue("Verification failed; only " + numberOfPositiveReferences + "/" + length + " matched", verify); } /** * Method test221 * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @throws TransformerException * @throws XMLSecurityException * @throws XMLSignatureException */ @org.junit.Test public void test221() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XMLSignatureException, XMLSecurityException { Document doc = this.db.parse( getAbsolutePath("src/test/resources/org/apache/xml/security/c14n/inExcl/example2_2_1.xml") ); Node root = doc.getElementsByTagNameNS("http://example.net", "elem2").item(0); Canonicalizer20010315 c = new Canonicalizer20010315WithComments(); byte[] reference = JavaUtils.getBytesFromFile(getAbsolutePath( "src/test/resources/org/apache/xml/security/c14n/inExcl/example2_2_1_c14nized.xml")); byte[] result = c.engineCanonicalizeSubTree(root); boolean equals = java.security.MessageDigest.isEqual(reference, result); assertTrue(equals); } /** * Method test222 * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @throws TransformerException * @throws XMLSecurityException * @throws XMLSignatureException */ @org.junit.Test public void test222() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XMLSignatureException, XMLSecurityException { Document doc = this.db.parse(getAbsolutePath( "src/test/resources/org/apache/xml/security/c14n/inExcl/example2_2_2.xml") ); Node root = doc.getElementsByTagNameNS("http://example.net", "elem2").item(0); Canonicalizer20010315 c = new Canonicalizer20010315WithComments(); byte[] reference = JavaUtils.getBytesFromFile(getAbsolutePath( "src/test/resources/org/apache/xml/security/c14n/inExcl/example2_2_2_c14nized.xml")); byte[] result = c.engineCanonicalizeSubTree(root); boolean equals = java.security.MessageDigest.isEqual(reference, result); assertTrue(equals); } /** * Method test221excl * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @throws TransformerException * @throws XMLSecurityException * @throws XMLSignatureException */ @org.junit.Test public void test221excl() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XMLSignatureException, XMLSecurityException { Document doc = this.db.parse(getAbsolutePath( "src/test/resources/org/apache/xml/security/c14n/inExcl/example2_2_1.xml")); Node root = doc.getElementsByTagNameNS("http://example.net", "elem2").item(0); Canonicalizer20010315Excl c = new Canonicalizer20010315ExclWithComments(); byte[] reference = JavaUtils.getBytesFromFile(getAbsolutePath( "src/test/resources/org/apache/xml/security/c14n/inExcl/example2_2_c14nized_exclusive.xml")); byte[] result = c.engineCanonicalizeSubTree(root); boolean equals = java.security.MessageDigest.isEqual(reference, result); assertTrue(equals); } /** * Method test222excl * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @throws TransformerException * @throws XMLSecurityException * @throws XMLSignatureException */ @org.junit.Test public void test222excl() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XMLSignatureException, XMLSecurityException { Document doc = this.db.parse(getAbsolutePath( "src/test/resources/org/apache/xml/security/c14n/inExcl/example2_2_2.xml")); Node root = doc.getElementsByTagNameNS("http://example.net", "elem2").item(0); Canonicalizer20010315Excl c = new Canonicalizer20010315ExclWithComments(); byte[] reference = JavaUtils.getBytesFromFile(getAbsolutePath( "src/test/resources/org/apache/xml/security/c14n/inExcl/example2_2_c14nized_exclusive.xml") ); byte[] result = c.engineCanonicalizeSubTree(root); boolean equals = java.security.MessageDigest.isEqual(reference, result); assertTrue(equals); } /** * Method test223excl * * Provided by Gabriel McGoldrick - see e-mail of 21/11/03 * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @throws TransformerException * @throws XMLSecurityException * @throws XMLSignatureException * @throws XPathExpressionException */ @org.junit.Test public void test223excl() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XMLSignatureException, XMLSecurityException, XPathExpressionException { Document doc = this.db.parse(getAbsolutePath( "src/test/resources/org/apache/xml/security/c14n/inExcl/example2_2_3.xml")); XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); xpath.setNamespaceContext(new DSNamespaceContext()); String expression = "(//. | //@* | //namespace::*)[ancestor-or-self::p]"; NodeList nodes = (NodeList) xpath.evaluate(expression, doc, XPathConstants.NODESET); Canonicalizer20010315Excl c = new Canonicalizer20010315ExclWithComments(); byte[] reference = JavaUtils.getBytesFromFile( getAbsolutePath( "src/test/resources/org/apache/xml/security/c14n/inExcl/example2_2_3_c14nized_exclusive.xml") ); byte[] result = c.engineCanonicalizeXPathNodeSet(nodes); assertEquals(new String(reference), new String(result)); } /** * Tests node-set as input. See bug 37708. * Provided by Pete Hendry. */ @org.junit.Test @SuppressWarnings("unchecked") public void testNodeSet() throws Exception { final String XML = "" + "" + "" + "hello" + "" + "" + ""; final String c14nXML = "" + "" + "hello" + "" + ""; Document doc = this.db.parse(new InputSource(new StringReader(XML))); Canonicalizer20010315ExclOmitComments c14n = new Canonicalizer20010315ExclOmitComments(); Set nodeSet = new HashSet(); XMLUtils.getSet(doc.getDocumentElement().getFirstChild(), nodeSet, null, false); XMLSignatureInput input = new XMLSignatureInput(nodeSet); byte[] bytes = c14n.engineCanonicalize(input, "env ns0 xsi wsu"); assertEquals(c14nXML, new String(bytes)); } /** * Method test24excl - a testcase for SANTUARIO-263 * "Canonicalizer can't handle dynamical created DOM correctly" * https://issues.apache.org/jira/browse/SANTUARIO-263 */ @org.junit.Test public void test24excl() throws Exception { Document doc = this.db.parse( getAbsolutePath( "src/test/resources/org/apache/xml/security/c14n/inExcl/example2_4.xml")); Node root = doc.getElementsByTagNameNS("http://example.net", "elem2").item(0); Canonicalizer20010315Excl c = new Canonicalizer20010315ExclWithComments(); byte[] reference = JavaUtils.getBytesFromFile(getAbsolutePath( "src/test/resources/org/apache/xml/security/c14n/inExcl/example2_4_c14nized.xml")); byte[] result = c.engineCanonicalizeSubTree(root); boolean equals = java.security.MessageDigest.isEqual(reference, result); assertTrue(equals); } /** * Method test24Aexcl - a testcase for SANTUARIO-263 * "Canonicalizer can't handle dynamical created DOM correctly" * https://issues.apache.org/jira/browse/SANTUARIO-263 */ @org.junit.Test public void test24Aexcl() throws Exception { Document doc = dbf.newDocumentBuilder ().newDocument (); Element local = doc.createElementNS("foo:bar", "dsig:local"); Element test = doc.createElementNS("http://example.net", "etsi:test"); Element elem2 = doc.createElementNS("http://example.net", "etsi:elem2"); Element stuff = doc.createElementNS("foo:bar", "dsig:stuff"); elem2.appendChild(stuff); test.appendChild(elem2); local.appendChild(test); doc.appendChild(local); Node root = doc.getElementsByTagNameNS("http://example.net", "elem2").item(0); Canonicalizer20010315Excl c = new Canonicalizer20010315ExclWithComments(); byte[] reference = JavaUtils.getBytesFromFile(getAbsolutePath( "src/test/resources/org/apache/xml/security/c14n/inExcl/example2_4_c14nized.xml")); byte[] result = c.engineCanonicalizeSubTree(root); boolean equals = java.security.MessageDigest.isEqual(reference, result); assertTrue(equals); } private String getAbsolutePath(String path) { String basedir = System.getProperty("basedir"); if (basedir != null && !"".equals(basedir)) { path = basedir + "/" + path; } return path; } } ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/c14n/implementations/ExclusiveC14NInteropTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/c14n/implementations/Exclusive0000644000175000017500000001252512234743735032355 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.c14n.implementations; import java.io.File; import org.apache.xml.security.signature.Reference; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.test.interop.InteropTestBase; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * Interop test for exclusive canonical XML. * * @author Christian Geuer-Pollmann */ public class ExclusiveC14NInteropTest extends InteropTestBase { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ExclusiveC14NInteropTest.class.getName()); static { org.apache.xml.security.Init.init(); } /** * Constructor ExclusiveC14NInteropTest */ public ExclusiveC14NInteropTest() { super(); } /** * Method test_Y1 * * @throws Exception */ @org.junit.Test public void test_Y1() throws Exception { String success = t("src/test/resources/interop/c14n/Y1", "exc-signature.xml"); assertTrue(success, success == null); } /** * Method test_Y2 * * @throws Exception */ @org.junit.Test public void test_Y2() throws Exception { String success = t("src/test/resources/interop/c14n/Y2", "signature-joseph-exc.xml"); assertTrue(success, success == null); } /** * Method test_Y3 * * @throws Exception */ @org.junit.Test public void test_Y3() throws Exception { String success = t("src/test/resources/interop/c14n/Y3", "signature.xml"); assertTrue(success, success == null); } /** * Method test_Y4 * * @throws Exception */ @org.junit.Test public void test_Y4() throws Exception { String success = t("src/test/resources/interop/c14n/Y4", "signature.xml"); assertTrue(success, success == null); } @org.junit.Test public void test_xfilter2() throws Exception { String success = t("src/test/resources/interop/xfilter2/merlin-xpath-filter2-three", "sign-spec.xml"); assertTrue(success, success == null); } /** * Method t * * @param directory * @param file * * @throws Exception */ private String t(String directory, String file) throws Exception { String basedir = System.getProperty("basedir"); if (basedir != null && !"".equals(basedir)) { directory = basedir + "/" + directory; } File f = new File(directory + "/" + file); javax.xml.parsers.DocumentBuilder db = XMLUtils.createDocumentBuilder(false, false); org.w3c.dom.Document doc = db.parse(f); Element sigElement = (Element) doc.getElementsByTagNameNS(Constants.SignatureSpecNS, Constants._TAG_SIGNATURE).item(0); XMLSignature signature = new XMLSignature(sigElement, f.toURI().toURL().toString()); boolean verify = signature.checkSignatureValue(signature.getKeyInfo().getPublicKey()); log.debug(" signature.checkSignatureValue finished: " + verify); // if (!verify) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < signature.getSignedInfo().getLength(); i++) { boolean refVerify = signature.getSignedInfo().getVerificationResult(i); //JavaUtils.writeBytesToFilename(directory + "/c14n-" + i + ".apache.html", signature.getSignedInfo().item(i).getHTMLRepresentation().getBytes()); if (refVerify) { log.debug("Reference " + i + " was OK"); } else { sb.append(i + " "); //JavaUtils.writeBytesToFilename(directory + "/c14n-" + i + ".apache.txt", signature.getSignedInfo().item(i).getContentsAfterTransformation().getBytes()); //JavaUtils.writeBytesToFilename(directory + "/c14n-" + i + ".apache.html", signature.getSignedInfo().item(i).getHTMLRepresentation().getBytes()); Reference reference = signature.getSignedInfo().item(i); int length = reference.getTransforms().getLength(); String algo = reference.getTransforms().item(length - 1).getURI(); log.debug("Reference " + i + " failed: " + algo); } } String r = sb.toString().trim(); if (r.length() == 0) { return null; } else { return r; } } } ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/c14n/implementations/Canonicalizer11Test.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/c14n/implementations/Canonical0000644000175000017500000004044312234743735032275 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.c14n.implementations; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.util.HashMap; import java.util.Map; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerException; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathExpressionException; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.c14n.InvalidCanonicalizerException; import org.apache.xml.security.test.DSNamespaceContext; import org.apache.xml.security.utils.IgnoreAllErrorHandler; import org.apache.xml.security.utils.JavaUtils; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.NodeList; import org.xml.sax.SAXException; /** * Unit test for * {@link org.apache.xml.security.c14n.implementations.Canonicalizer11} */ public class Canonicalizer11Test extends org.junit.Assert { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Canonicalizer11Test.class.getName()); static { org.apache.xml.security.Init.init(); } /** Field prefix */ private String prefix; public Canonicalizer11Test() { prefix = "src/test/resources/org/apache/xml/security/c14n/"; String basedir = System.getProperty("basedir"); if (basedir != null && !"".equals(basedir)) { prefix = basedir + "/" + prefix; } } /** * 3.1 PIs, Comments, and Outside of Document Element * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void test31withCommentsSubtree() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { String descri = "3.1: PIs, Comments, and Outside of Document Element. (commented)"; String fileIn = prefix + "in/31_input.xml"; String fileRef = prefix + "in/31_c14n-comments.xml"; String fileOut = prefix + "out/xpath_31_output-comments.xml"; String c14nURI = Canonicalizer.ALGO_ID_C14N11_WITH_COMMENTS; boolean validating = true; String xpath = null; assertTrue(descri, c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath)); } /** * 3.2 Whitespace in Document Content * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @see the example from the spec * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void test32subtree() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { String descri = "3.2 Whitespace in Document Content. (uncommented)"; String fileIn = prefix + "in/32_input.xml"; String fileRef = prefix + "in/32_c14n.xml"; String fileOut = prefix + "out/xpath_32_output.xml"; String c14nURI = Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS; boolean validating = true; String xpath = null; assertTrue(descri, c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath)); } /** * 3.3 Start and End Tags * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @see the example from the spec * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void test33subtree() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { String descri = "3.3 Start and End Tags. (uncommented)"; String fileIn = prefix + "in/33_input.xml"; String fileRef = prefix + "in/33_c14n.xml"; String fileOut = prefix + "out/xpath_33_output.xml"; String c14nURI = Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS; boolean validating = true; String xpath = null; // Canonicalizer.XPATH_C14N_OMIT_COMMENTS_SINGLE_NODE; assertTrue(descri, c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath)); } /** * 3.4 Character Modifications and Character References * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @see #test34validatingParser * @see the example from the spec * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void test34() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { String descri = "3.4 Character Modifications and Character References. (uncommented)"; String fileIn = prefix + "in/34_input.xml"; String fileRef = prefix + "in/34_c14n.xml"; String fileOut = prefix + "out/xpath_34_output.xml"; String c14nURI = Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS; boolean validating = false; String xpath = null; assertTrue(descri, c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath)); } /** * 3.5 Entity References * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @see the example from the spec * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void test35subtree() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { String descri = "3.5 Entity References. (uncommented)"; String fileIn = prefix + "in/35_input.xml"; String fileRef = prefix + "in/35_c14n.xml"; String fileOut = prefix + "out/xpath_35_output.xml"; String c14nURI = Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS; boolean validating = true; String xpath = null; assertTrue(descri, c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath)); } /** * 3.6 UTF-8 Encoding * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @see the example from the spec * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void test36subtree() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { String descri = "3.6 UTF-8 Encoding. (uncommented)"; String fileIn = prefix + "in/36_input.xml"; String fileRef = prefix + "in/36_c14n.xml"; String fileOut = prefix + "out/xpath_36_output.xml"; String c14nURI = Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS; boolean validating = true; String xpath = null; assertTrue(descri, c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath)); } /** * 3.7 Document Subsets * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @see the example from the spec * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void test37() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { String descri = "3.7 Document Subsets. (uncommented)"; String fileIn = prefix + "in/37_input.xml"; String fileRef = prefix + "in/37_c14n.xml"; String fileOut = prefix + "out/xpath_37_output.xml"; String c14nURI = Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS; boolean validating = true; Map namespace = new HashMap(); namespace.put("ietf", "http://www.ietf.org"); String xpath = "(//. | //@* | //namespace::*)" + "[ " + "self::ietf:e1 or " + "(parent::ietf:e1 and not(self::text() or self::e2)) or " + "count(id(\"E3\")|ancestor-or-self::node()) = count(ancestor-or-self::node()) " + "]"; assertTrue(descri, c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath, namespace)); } /** * 3.8 Document Subsets and XML Attributes * * @throws CanonicalizationException * @throws FileNotFoundException * @throws IOException * @throws InvalidCanonicalizerException * @throws ParserConfigurationException * @throws SAXException * @throws TransformerException * @throws XPathExpressionException */ @org.junit.Test public void test38() throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { String descri = "3.8 Document Subsets and XML Attributes (uncommented)"; String fileIn = prefix + "in/38_input.xml"; String fileRef = prefix + "in/38_c14n.xml"; String fileOut = prefix + "out/xpath_38_output.xml"; String c14nURI = Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS; boolean validating = true; Map namespace = new HashMap(); namespace.put("ietf", "http://www.ietf.org"); String xpath = "(//. | //@* | //namespace::*)" + "[ " + "self::ietf:e1 or " + "(parent::ietf:e1 and not(self::text() or self::e2)) or " + "count(id(\"E3\")|ancestor-or-self::node()) = count(ancestor-or-self::node()) " + "]"; assertTrue(descri, c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath, namespace)); } private boolean c14nAndCompare( String fileIn, String fileRef, String fileOut, String c14nURI, boolean validating, String xpath ) throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { Map namespace = new HashMap(); return c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath, namespace); } private boolean c14nAndCompare( String fileIn, String fileRef, String fileOut, String c14nURI, boolean validating, String xpath, Map namespaces ) throws IOException, FileNotFoundException, SAXException, ParserConfigurationException, CanonicalizationException, InvalidCanonicalizerException, TransformerException, XPathExpressionException { DocumentBuilder documentBuilder = XMLUtils.createDocumentBuilder(validating, false); // throw away all warnings and errors documentBuilder.setErrorHandler(new IgnoreAllErrorHandler()); // org.xml.sax.EntityResolver resolver = new TestVectorResolver(); // documentBuilder.setEntityResolver(resolver); // Document doc = documentBuilder.parse(resolver.resolveEntity(null, fileIn)); Document doc = documentBuilder.parse(fileIn); Canonicalizer c14n = Canonicalizer.getInstance(c14nURI); byte c14nBytes[] = null; if (xpath == null) { c14nBytes = c14n.canonicalizeSubtree(doc); } else { NodeList nl = null; XPathFactory xpf = XPathFactory.newInstance(); XPath xPath = xpf.newXPath(); DSNamespaceContext namespaceContext = new DSNamespaceContext(namespaces); xPath.setNamespaceContext(namespaceContext); nl = (NodeList)xPath.evaluate((String) xpath, doc, XPathConstants.NODESET); c14nBytes = c14n.canonicalizeXPathNodeSet(nl); } // org.xml.sax.InputSource refIs = resolver.resolveEntity(null, fileRef); // byte refBytes[] = JavaUtils.getBytesFromStream(refIs.getByteStream()); byte refBytes[] = JavaUtils.getBytesFromFile(fileRef); // if everything is OK, result is true; we do a binary compare, byte by byte boolean result = java.security.MessageDigest.isEqual(refBytes, c14nBytes); if (!result) { File f = new File(fileOut); if (!f.exists()) { File parent = new File(f.getParent()); parent.mkdirs(); f.createNewFile(); } FileOutputStream fos = new FileOutputStream(f); fos.write(c14nBytes); log.debug("Wrote erroneous result to file " + f.toURI().toURL().toString()); assertEquals(new String(refBytes), new String(c14nBytes)); fos.close(); } return result; } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/c14n/helper/0000755000175000017500000000000012273503732026517 5ustar tonytony././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/c14n/helper/C14nHelperTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/c14n/helper/C14nHelperTest.jav0000644000175000017500000000622711551556206031737 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.c14n.helper; import org.apache.xml.security.c14n.helper.C14nHelper; /** * @author Christian Geuer-Pollmann */ public class C14nHelperTest extends org.junit.Assert { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(C14nHelperTest.class.getName()); static { org.apache.xml.security.Init.init(); } /** * Method testNamespaceIsAbsolute01 */ @org.junit.Test public void testNamespaceIsAbsolute01() { String namespaceURI = "http://www.w3.org/Signature/"; assertTrue("URI fails: \"" + namespaceURI + "\"", C14nHelper.namespaceIsAbsolute(namespaceURI)); } /** * @see The list */ @org.junit.Test public void testNamespaceIsAbsolute02() { String namespaceURI = "http://www.w3.org/../blah"; assertTrue("URI fails: \"" + namespaceURI + "\"", C14nHelper.namespaceIsAbsolute(namespaceURI)); } /** * Method testNamespaceIsAbsolute03 */ @org.junit.Test public void testNamespaceIsAbsolute03() { // unknown protocol? String namespaceURI = "hxxp://www.w3.org/"; assertTrue("URI fails: \"" + namespaceURI + "\"", C14nHelper.namespaceIsAbsolute(namespaceURI)); } /** * Method testNamespaceIsRelative01 */ @org.junit.Test public void testNamespaceIsRelative01() { String namespaceURI = "../blah"; assertTrue("URI fails: \"" + namespaceURI + "\"", C14nHelper.namespaceIsRelative(namespaceURI)); } /** * Method testNamespaceIsRelative02 */ @org.junit.Test public void testNamespaceIsRelative02() { String namespaceURI = "blah"; assertTrue("URI fails: \"" + namespaceURI + "\"", C14nHelper.namespaceIsRelative(namespaceURI)); } /** * Method testNamespaceIsRelative03 */ @org.junit.Test @org.junit.Ignore public void testNamespaceIsRelative03() { String namespaceURI = "http://..."; assertTrue("URI fails: \"" + namespaceURI + "\"", C14nHelper.namespaceIsRelative(namespaceURI)); } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/c14n/helper/AttrCompareTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/c14n/helper/AttrCompareTest.ja0000644000175000017500000001656112214631242032116 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.c14n.helper; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.ParserConfigurationException; import org.apache.xml.security.c14n.helper.AttrCompare; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; /** * Unit test for {@link org.apache.xml.security.c14n.AttrCompare#compare} * * @author Christian Geuer-Pollmann */ public class AttrCompareTest extends org.junit.Assert { static { org.apache.xml.security.Init.init(); } /** * Method testA1 * * @throws ParserConfigurationException */ @org.junit.Test public void testA1() throws ParserConfigurationException { Document doc = createDoc("documentElement"); Element root = doc.getDocumentElement(); Attr attr0 = createAttr(doc, "xmlns", "http://default/", Constants.NamespaceSpecNS); Attr attr1 = createAttr(doc, "xmlns:b", "http://val1/", Constants.NamespaceSpecNS); root.setAttributeNode(attr0); root.setAttributeNode(attr1); NamedNodeMap nnm = root.getAttributes(); assertEquals("nnm.getLength()", nnm.getLength(), 2); Attr attr00 = (Attr) nnm.item(0); Attr attr10 = (Attr) nnm.item(1); assertNotNull("Attribute attr00", attr00); assertNotNull("Attribute attr10", attr10); AttrCompare attrCompare = new AttrCompare(); assertTrue(attr0 + " < " + attr1, attrCompare.compare(attr0, attr1) < 0); assertTrue(attr1 + " < " + attr0, attrCompare.compare(attr1, attr0) > 0); } @org.junit.Test public void testA2() throws ParserConfigurationException { Document doc = createDoc("documentElement"); Attr attr0 = doc.createAttributeNS(null, "foo"); Attr attr1 = doc.createAttributeNS("http://goo", "goo:foo"); // System.out.println("Attr1: " + attr1 + " (" + attr1.getLocalName() +")"); AttrCompare attrCompare = new AttrCompare(); assertTrue(attr0 + " < " + attr1, attrCompare.compare(attr0, attr1) < 0); assertTrue(attr1 + " < " + attr0, attrCompare.compare(attr1, attr0) > 0); } /** * Method testA2 * * @throws ParserConfigurationException */ @org.junit.Test public void __testA2() throws ParserConfigurationException { Document doc = createDoc("documentElement"); Element root = doc.getDocumentElement(); Attr attr0 = createAttr(doc, "aAttr", "val0", null); Attr attr1 = createAttr(doc, "bAttr", "val1", null); root.setAttributeNode(attr0); root.setAttributeNode(attr1); NamedNodeMap nnm = root.getAttributes(); assertEquals("nnm.getLength()", nnm.getLength(), 2); Attr attr00 = (Attr) nnm.item(0); Attr attr10 = (Attr) nnm.item(1); assertNotNull("Attribute attr00", attr00); assertNotNull("Attribute attr10", attr10); AttrCompare attrCompare = new AttrCompare(); assertTrue(attr0 + " < " + attr1, attrCompare.compare(attr0, attr1) < 0); assertTrue(attr1 + " < " + attr0, attrCompare.compare(attr1, attr0) > 0); } /** * This test uses the attrs[] array to compare every attribute against * the others (and vice versa). * * The attribute values are taken from example 3.3 Start and End Tags * http://www.w3.org/TR/2001/REC-xml-c14n-20010315#Example-SETags * * @throws ParserConfigurationException */ @org.junit.Test public void testComplete() throws ParserConfigurationException { /* */ Document doc = createDoc("documentElement"); Element root = doc.getDocumentElement(); // This List has to be ordered to verify correctness of the comparison //J- Attr attrs[] = { createAttr(doc, "xmlns", "http://example.org", Constants.NamespaceSpecNS), createAttr(doc, "xmlns:a", "http://www.w3.org", Constants.NamespaceSpecNS), createAttr(doc, "xmlns:b", "http://www.ietf.org", Constants.NamespaceSpecNS), createAttr(doc, "attr", "I'm", null), createAttr(doc, "attr2", "all", null), createAttr(doc, "b:attr", "sorted", "http://www.ietf.org"), createAttr(doc, "a:attr", "out", "http://www.w3.org") }; //J+ for (int i = 0; i < attrs.length; i++) { root.setAttributeNode(attrs[i]); } NamedNodeMap nnm = root.getAttributes(); assertEquals("nnm.getLength()", nnm.getLength(), attrs.length); for (int i = 0; i < attrs.length; i++) { Attr attr = attrs[i]; assertNotNull("Attribute attr", attr); } AttrCompare attrCompare = new AttrCompare(); for (int i = 0; i < attrs.length; i++) { for (int j = i + 1; j < attrs.length; j++) { Attr attr0 = attrs[i]; Attr attr1 = attrs[j]; assertTrue(attr0 + " < " + attr1, attrCompare.compare(attr0, attr1) < 0); assertTrue(attr1 + " < " + attr0, attrCompare.compare(attr1, attr0) > 0); } } } /** * Method createAttr * * @param doc * @param QName * @param Value * @param NamespaceURI * @return */ private static Attr createAttr( Document doc, String QName, String Value, String NamespaceURI ) { Attr attr = null; if ((NamespaceURI != null) && (NamespaceURI.length() > 0)) { attr = doc.createAttributeNS(NamespaceURI, QName); } else { attr = doc.createAttributeNS(null, QName); } attr.appendChild(doc.createTextNode(Value)); return attr; } /** * Method createDoc * * @param documentElement * @return * @throws ParserConfigurationException */ private static Document createDoc( String documentElement ) throws ParserConfigurationException { DocumentBuilder documentBuilder = XMLUtils.createDocumentBuilder(false); Document doc = documentBuilder.newDocument(); Element root = doc.createElementNS(null, documentElement); doc.appendChild(root); return doc; } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/encryption/0000755000175000017500000000000012273503732026665 5ustar tonytony././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/encryption/XMLEncryption11Test.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/encryption/XMLEncryption11Test0000644000175000017500000007126012214631242032324 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.encryption; import java.io.File; import java.lang.reflect.Constructor; import java.security.Key; import java.security.KeyStore; import java.security.NoSuchAlgorithmException; import java.security.PrivateKey; import java.security.Provider; import java.security.Security; import java.security.cert.Certificate; import java.security.cert.X509Certificate; import java.util.HashMap; import java.util.Map; import javax.crypto.Cipher; import javax.crypto.KeyGenerator; import javax.crypto.NoSuchPaddingException; import javax.xml.parsers.DocumentBuilder; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathExpressionException; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.algorithms.JCEMapper; import org.apache.xml.security.encryption.EncryptedData; import org.apache.xml.security.encryption.EncryptedKey; import org.apache.xml.security.encryption.XMLCipher; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.keys.content.X509Data; import org.apache.xml.security.keys.content.x509.XMLX509Certificate; import org.apache.xml.security.test.DSNamespaceContext; import org.apache.xml.security.utils.Base64; import org.apache.xml.security.utils.EncryptionConstants; import org.apache.xml.security.utils.XMLUtils; // import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; /** * This is a set of tests that use the test vectors associated with the W3C XML Encryption 1.1 specification: * * http://www.w3.org/2008/xmlsec/Drafts/xmlenc-core-11/test-cases/ * * Note: I had to convert the given .p12 file into a .jks as it could not be loaded with KeyStore. * * TODO As of now all of the KeyWrapping tests are supported, but none of the KeyAgreement tests. */ public class XMLEncryption11Test extends org.junit.Assert { private static String cardNumber; private static int nodeCount = 0; private boolean haveISOPadding; /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(XMLEncryption11Test.class.getName()); /** * Constructor XMLEncryption11Test */ public XMLEncryption11Test() throws Exception { // // If the BouncyCastle provider is not installed, then try to load it // via reflection. If it is not available, then skip this test as it is // required for GCM algorithm support // if (Security.getProvider("BC") == null) { Constructor cons = null; try { Class c = Class.forName("org.bouncycastle.jce.provider.BouncyCastleProvider"); cons = c.getConstructor(new Class[] {}); } catch (Exception e) { //ignore } if (cons == null) { // BouncyCastle is not available so just return return; } else { Provider provider = (java.security.Provider)cons.newInstance(new Object[]{}); Security.insertProviderAt(provider, 2); } } // Create the comparison strings String filename = "src/test/resources/org/w3c/www/interop/xmlenc-core-11/plaintext.xml"; String basedir = System.getProperty("basedir"); if (basedir != null && !"".equals(basedir)) { filename = basedir + "/" + filename; } File f = new File(filename); DocumentBuilder db = XMLUtils.createDocumentBuilder(false); Document doc = db.parse(new java.io.FileInputStream(f)); cardNumber = retrieveCCNumber(doc); // Count the nodes in the document as a secondary test nodeCount = countNodes(doc); // Initialise the library org.apache.xml.security.Init.init(); // Check what algorithms are available haveISOPadding = false; String algorithmId = JCEMapper.translateURItoJCEID(EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES128); if (algorithmId != null) { try { if (Cipher.getInstance(algorithmId) != null) { haveISOPadding = true; } } catch (NoSuchAlgorithmException nsae) { // } catch (NoSuchPaddingException nspe) { // } } } /** * rsa-oaep-mgf1p, Digest:SHA256, MGF:SHA1, PSource: None */ @org.junit.Test public void testKeyWrappingRSA2048() throws Exception { if (haveISOPadding) { String keystore = "src/test/resources/org/w3c/www/interop/xmlenc-core-11/RSA-2048_SHA256WithRSA.jks"; String basedir = System.getProperty("basedir"); if (basedir != null && !"".equals(basedir)) { keystore = basedir + "/" + keystore; } KeyStore keyStore = KeyStore.getInstance("jks"); keyStore.load(new java.io.FileInputStream(keystore), "passwd".toCharArray()); Certificate cert = keyStore.getCertificate("importkey"); KeyStore.PrivateKeyEntry pkEntry = (KeyStore.PrivateKeyEntry) keyStore.getEntry("importkey", new KeyStore.PasswordProtection("passwd".toCharArray())); PrivateKey rsaKey = pkEntry.getPrivateKey(); String filename = "src/test/resources/org/w3c/www/interop/xmlenc-core-11/" + "cipherText__RSA-2048__aes128-gcm__rsa-oaep-mgf1p.xml"; Document dd = decryptElement(filename, rsaKey, (X509Certificate)cert); // XMLUtils.outputDOM(dd.getFirstChild(), System.out); checkDecryptedDoc(dd, true); } else { log.warn( "Skipping testRSA2048 as necessary " + "crypto algorithms are not available" ); } } /** * rsa-oaep-mgf1p, Digest:SHA256, MGF:SHA1, PSource: None */ @org.junit.Test public void testKeyWrappingRSA2048EncryptDecrypt() throws Exception { if (haveISOPadding) { String keystore = "src/test/resources/org/w3c/www/interop/xmlenc-core-11/RSA-2048_SHA256WithRSA.jks"; String basedir = System.getProperty("basedir"); if (basedir != null && !"".equals(basedir)) { keystore = basedir + "/" + keystore; } KeyStore keyStore = KeyStore.getInstance("jks"); keyStore.load(new java.io.FileInputStream(keystore), "passwd".toCharArray()); Certificate cert = keyStore.getCertificate("importkey"); KeyStore.PrivateKeyEntry pkEntry = (KeyStore.PrivateKeyEntry) keyStore.getEntry("importkey", new KeyStore.PasswordProtection("passwd".toCharArray())); PrivateKey rsaKey = pkEntry.getPrivateKey(); // Perform encryption String filename = "src/test/resources/org/w3c/www/interop/xmlenc-core-11/plaintext.xml"; if (basedir != null && !"".equals(basedir)) { filename = basedir + "/" + filename; } File f = new File(filename); DocumentBuilder db = XMLUtils.createDocumentBuilder(false); Document doc = db.parse(new java.io.FileInputStream(f)); Key sessionKey = getSessionKey("http://www.w3.org/2009/xmlenc11#aes128-gcm"); EncryptedKey encryptedKey = createEncryptedKey( doc, (X509Certificate)cert, sessionKey, "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p", "http://www.w3.org/2000/09/xmldsig#sha1", null, null ); doc = encryptDocument( doc, encryptedKey, sessionKey, "http://www.w3.org/2009/xmlenc11#aes128-gcm" ); // XMLUtils.outputDOM(doc.getFirstChild(), System.out); // Perform decryption Document dd = decryptElement(doc, rsaKey, (X509Certificate)cert); // XMLUtils.outputDOM(dd.getFirstChild(), System.out); checkDecryptedDoc(dd, true); } else { log.warn( "Skipping testRSA2048 as necessary " + "crypto algorithms are not available" ); } } /** * rsa-oaep-mgf1p, Digest:SHA256, MGF:SHA1, PSource: None */ @org.junit.Test public void testKeyWrappingRSA3072() throws Exception { if (haveISOPadding) { String keystore = "src/test/resources/org/w3c/www/interop/xmlenc-core-11/RSA-3072_SHA256WithRSA.jks"; String basedir = System.getProperty("basedir"); if (basedir != null && !"".equals(basedir)) { keystore = basedir + "/" + keystore; } KeyStore keyStore = KeyStore.getInstance("jks"); keyStore.load(new java.io.FileInputStream(keystore), "passwd".toCharArray()); Certificate cert = keyStore.getCertificate("importkey"); KeyStore.PrivateKeyEntry pkEntry = (KeyStore.PrivateKeyEntry) keyStore.getEntry("importkey", new KeyStore.PasswordProtection("passwd".toCharArray())); PrivateKey rsaKey = pkEntry.getPrivateKey(); String filename = "src/test/resources/org/w3c/www/interop/xmlenc-core-11/" + "cipherText__RSA-3072__aes192-gcm__rsa-oaep-mgf1p__Sha256.xml"; Document dd = decryptElement(filename, rsaKey, (X509Certificate)cert); // XMLUtils.outputDOM(dd.getFirstChild(), System.out); checkDecryptedDoc(dd, true); } else { log.warn( "Skipping testRSA3072 as necessary " + "crypto algorithms are not available" ); } } /** * rsa-oaep-mgf1p, Digest:SHA256, MGF:SHA1, PSource: None */ @org.junit.Test public void testKeyWrappingRSA3072EncryptDecrypt() throws Exception { if (haveISOPadding) { String keystore = "src/test/resources/org/w3c/www/interop/xmlenc-core-11/RSA-3072_SHA256WithRSA.jks"; String basedir = System.getProperty("basedir"); if (basedir != null && !"".equals(basedir)) { keystore = basedir + "/" + keystore; } KeyStore keyStore = KeyStore.getInstance("jks"); keyStore.load(new java.io.FileInputStream(keystore), "passwd".toCharArray()); Certificate cert = keyStore.getCertificate("importkey"); KeyStore.PrivateKeyEntry pkEntry = (KeyStore.PrivateKeyEntry) keyStore.getEntry("importkey", new KeyStore.PasswordProtection("passwd".toCharArray())); PrivateKey rsaKey = pkEntry.getPrivateKey(); // Perform encryption String filename = "src/test/resources/org/w3c/www/interop/xmlenc-core-11/plaintext.xml"; if (basedir != null && !"".equals(basedir)) { filename = basedir + "/" + filename; } File f = new File(filename); DocumentBuilder db = XMLUtils.createDocumentBuilder(false); Document doc = db.parse(new java.io.FileInputStream(f)); Key sessionKey = getSessionKey("http://www.w3.org/2009/xmlenc11#aes192-gcm"); EncryptedKey encryptedKey = createEncryptedKey( doc, (X509Certificate)cert, sessionKey, "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p", "http://www.w3.org/2001/04/xmlenc#sha256", null, null ); doc = encryptDocument( doc, encryptedKey, sessionKey, "http://www.w3.org/2009/xmlenc11#aes192-gcm" ); // XMLUtils.outputDOM(doc.getFirstChild(), System.out); // Perform decryption Document dd = decryptElement(doc, rsaKey, (X509Certificate)cert); // XMLUtils.outputDOM(dd.getFirstChild(), System.out); checkDecryptedDoc(dd, true); } else { log.warn( "Skipping testRSA3072 as necessary " + "crypto algorithms are not available" ); } } /** * rsa-oaep, Digest:SHA384, MGF:SHA1, PSource: None */ @org.junit.Test public void testKeyWrappingRSA3072OAEP() throws Exception { if (haveISOPadding) { String keystore = "src/test/resources/org/w3c/www/interop/xmlenc-core-11/RSA-3072_SHA256WithRSA.jks"; String basedir = System.getProperty("basedir"); if (basedir != null && !"".equals(basedir)) { keystore = basedir + "/" + keystore; } KeyStore keyStore = KeyStore.getInstance("jks"); keyStore.load(new java.io.FileInputStream(keystore), "passwd".toCharArray()); Certificate cert = keyStore.getCertificate("importkey"); KeyStore.PrivateKeyEntry pkEntry = (KeyStore.PrivateKeyEntry) keyStore.getEntry("importkey", new KeyStore.PasswordProtection("passwd".toCharArray())); PrivateKey rsaKey = pkEntry.getPrivateKey(); String filename = "src/test/resources/org/w3c/www/interop/xmlenc-core-11/" + "cipherText__RSA-3072__aes256-gcm__rsa-oaep__Sha384-MGF_Sha1.xml"; Document dd = decryptElement(filename, rsaKey, (X509Certificate)cert); // XMLUtils.outputDOM(dd.getFirstChild(), System.out); checkDecryptedDoc(dd, true); } else { log.warn( "Skipping testRSA307OAEP as necessary " + "crypto algorithms are not available" ); } } /** * rsa-oaep, Digest:SHA384, MGF:SHA1, PSource: None */ @org.junit.Test public void testKeyWrappingRSA3072OAEPEncryptDecrypt() throws Exception { if (haveISOPadding) { String keystore = "src/test/resources/org/w3c/www/interop/xmlenc-core-11/RSA-3072_SHA256WithRSA.jks"; String basedir = System.getProperty("basedir"); if (basedir != null && !"".equals(basedir)) { keystore = basedir + "/" + keystore; } KeyStore keyStore = KeyStore.getInstance("jks"); keyStore.load(new java.io.FileInputStream(keystore), "passwd".toCharArray()); Certificate cert = keyStore.getCertificate("importkey"); KeyStore.PrivateKeyEntry pkEntry = (KeyStore.PrivateKeyEntry) keyStore.getEntry("importkey", new KeyStore.PasswordProtection("passwd".toCharArray())); PrivateKey rsaKey = pkEntry.getPrivateKey(); // Perform encryption String filename = "src/test/resources/org/w3c/www/interop/xmlenc-core-11/plaintext.xml"; if (basedir != null && !"".equals(basedir)) { filename = basedir + "/" + filename; } File f = new File(filename); DocumentBuilder db = XMLUtils.createDocumentBuilder(false); Document doc = db.parse(new java.io.FileInputStream(f)); Key sessionKey = getSessionKey("http://www.w3.org/2009/xmlenc11#aes256-gcm"); EncryptedKey encryptedKey = createEncryptedKey( doc, (X509Certificate)cert, sessionKey, "http://www.w3.org/2009/xmlenc11#rsa-oaep", "http://www.w3.org/2001/04/xmldsig-more#sha384", "http://www.w3.org/2009/xmlenc11#mgf1sha1", null ); doc = encryptDocument( doc, encryptedKey, sessionKey, "http://www.w3.org/2009/xmlenc11#aes256-gcm" ); // XMLUtils.outputDOM(doc.getFirstChild(), System.out); // Perform decryption Document dd = decryptElement(doc, rsaKey, (X509Certificate)cert); // XMLUtils.outputDOM(dd.getFirstChild(), System.out); checkDecryptedDoc(dd, true); } else { log.warn( "Skipping testRSA2048 as necessary " + "crypto algorithms are not available" ); } } /** * rsa-oaep, Digest:SHA512, MGF:SHA1, PSource: Specified 8 bytes */ @org.junit.Test public void testKeyWrappingRSA4096() throws Exception { if (haveISOPadding) { String keystore = "src/test/resources/org/w3c/www/interop/xmlenc-core-11/RSA-4096_SHA256WithRSA.jks"; String basedir = System.getProperty("basedir"); if (basedir != null && !"".equals(basedir)) { keystore = basedir + "/" + keystore; } KeyStore keyStore = KeyStore.getInstance("jks"); keyStore.load(new java.io.FileInputStream(keystore), "passwd".toCharArray()); Certificate cert = keyStore.getCertificate("importkey"); KeyStore.PrivateKeyEntry pkEntry = (KeyStore.PrivateKeyEntry) keyStore.getEntry("importkey", new KeyStore.PasswordProtection("passwd".toCharArray())); PrivateKey rsaKey = pkEntry.getPrivateKey(); String filename = "src/test/resources/org/w3c/www/interop/xmlenc-core-11/" + "cipherText__RSA-4096__aes256-gcm__rsa-oaep__Sha512-MGF_Sha1_PSource.xml"; Document dd = decryptElement(filename, rsaKey, (X509Certificate)cert); // XMLUtils.outputDOM(dd.getFirstChild(), System.out); checkDecryptedDoc(dd, true); } else { log.warn( "Skipping testRSA4096 as necessary " + "crypto algorithms are not available" ); } } /** * rsa-oaep, Digest:SHA512, MGF:SHA1, PSource: Specified 8 bytes */ @org.junit.Test public void testKeyWrappingRSA4096EncryptDecrypt() throws Exception { if (haveISOPadding) { String keystore = "src/test/resources/org/w3c/www/interop/xmlenc-core-11/RSA-4096_SHA256WithRSA.jks"; String basedir = System.getProperty("basedir"); if (basedir != null && !"".equals(basedir)) { keystore = basedir + "/" + keystore; } KeyStore keyStore = KeyStore.getInstance("jks"); keyStore.load(new java.io.FileInputStream(keystore), "passwd".toCharArray()); Certificate cert = keyStore.getCertificate("importkey"); KeyStore.PrivateKeyEntry pkEntry = (KeyStore.PrivateKeyEntry) keyStore.getEntry("importkey", new KeyStore.PasswordProtection("passwd".toCharArray())); PrivateKey rsaKey = pkEntry.getPrivateKey(); // Perform encryption String filename = "src/test/resources/org/w3c/www/interop/xmlenc-core-11/plaintext.xml"; if (basedir != null && !"".equals(basedir)) { filename = basedir + "/" + filename; } File f = new File(filename); DocumentBuilder db = XMLUtils.createDocumentBuilder(false); Document doc = db.parse(new java.io.FileInputStream(f)); Key sessionKey = getSessionKey("http://www.w3.org/2009/xmlenc11#aes256-gcm"); EncryptedKey encryptedKey = createEncryptedKey( doc, (X509Certificate)cert, sessionKey, "http://www.w3.org/2009/xmlenc11#rsa-oaep", "http://www.w3.org/2001/04/xmlenc#sha512", "http://www.w3.org/2009/xmlenc11#mgf1sha1", Base64.decode("ZHVtbXkxMjM=".getBytes("UTF-8")) ); doc = encryptDocument( doc, encryptedKey, sessionKey, "http://www.w3.org/2009/xmlenc11#aes256-gcm" ); // XMLUtils.outputDOM(doc.getFirstChild(), System.out); // Perform decryption Document dd = decryptElement(doc, rsaKey, (X509Certificate)cert); // XMLUtils.outputDOM(dd.getFirstChild(), System.out); checkDecryptedDoc(dd, true); } else { log.warn( "Skipping testRSA2048 as necessary " + "crypto algorithms are not available" ); } } /** * Method decryptElement * * Take a key, encryption type and a file, find an encrypted element * decrypt it and return the resulting document * * @param filename File to decrypt from * @param key The Key to use for decryption */ private Document decryptElement(String filename, Key rsaKey, X509Certificate rsaCert) throws Exception { // Parse the document in question String basedir = System.getProperty("basedir"); if (basedir != null && !"".equals(basedir)) { filename = basedir + "/" + filename; } File f = new File(filename); DocumentBuilder db = XMLUtils.createDocumentBuilder(false); Document doc = db.parse(new java.io.FileInputStream(f)); return decryptElement(doc, rsaKey, rsaCert); } /** * Method decryptElement * * Take a key, encryption type and a document, find an encrypted element * decrypt it and return the resulting document * * @param filename File to decrypt from * @param key The Key to use for decryption */ private Document decryptElement(Document doc, Key rsaKey, X509Certificate rsaCert) throws Exception { // Create the XMLCipher element XMLCipher cipher = XMLCipher.getInstance(); // Need to pre-load the Encrypted Data so we can get the key info Element ee = (Element) doc.getElementsByTagNameNS( "http://www.w3.org/2001/04/xmlenc#", "EncryptedData" ).item(0); cipher.init(XMLCipher.DECRYPT_MODE, null); EncryptedData encryptedData = cipher.loadEncryptedData(doc, ee); KeyInfo ki = encryptedData.getKeyInfo(); EncryptedKey encryptedKey = ki.itemEncryptedKey(0); KeyInfo kiek = encryptedKey.getKeyInfo(); X509Data certData = kiek.itemX509Data(0); XMLX509Certificate xcert = certData.itemCertificate(0); X509Certificate cert = xcert.getX509Certificate(); assertTrue(rsaCert.equals(cert)); XMLCipher cipher2 = XMLCipher.getInstance(); cipher2.init(XMLCipher.UNWRAP_MODE, rsaKey); Key key = cipher2.decryptKey( encryptedKey, encryptedData.getEncryptionMethod().getAlgorithm() ); cipher.init(XMLCipher.DECRYPT_MODE, key); Document dd = cipher.doFinal(doc, ee); return dd; } /** * Create an EncryptedKey object using the given parameters. */ private EncryptedKey createEncryptedKey( Document doc, X509Certificate rsaCert, Key sessionKey, String encryptionMethod, String digestMethod, String mgfAlgorithm, byte[] oaepParams ) throws Exception { // Create the XMLCipher element XMLCipher cipher = XMLCipher.getInstance(encryptionMethod, null, digestMethod); cipher.init(XMLCipher.WRAP_MODE, rsaCert.getPublicKey()); EncryptedKey encryptedKey = cipher.encryptKey(doc, sessionKey, mgfAlgorithm, oaepParams); KeyInfo builderKeyInfo = encryptedKey.getKeyInfo(); if (builderKeyInfo == null) { builderKeyInfo = new KeyInfo(doc); encryptedKey.setKeyInfo(builderKeyInfo); } X509Data x509Data = new X509Data(doc); x509Data.addCertificate(rsaCert); builderKeyInfo.add(x509Data); return encryptedKey; } /** * Generate a session key using the given algorithm */ private Key getSessionKey(String encryptionMethod) throws Exception { // Generate a session key KeyGenerator keyGen = KeyGenerator.getInstance("AES"); if (encryptionMethod.contains("128")) { keyGen.init(128); } else if (encryptionMethod.contains("192")) { keyGen.init(192); } else if (encryptionMethod.contains("256")) { keyGen.init(256); } return keyGen.generateKey(); } /** * Encrypt a Document using the given parameters. */ private Document encryptDocument( Document doc, EncryptedKey encryptedKey, Key sessionKey, String encryptionMethod ) throws Exception { // Create the XMLCipher element XMLCipher cipher = XMLCipher.getInstance(encryptionMethod); cipher.init(XMLCipher.ENCRYPT_MODE, sessionKey); EncryptedData builder = cipher.getEncryptedData(); KeyInfo builderKeyInfo = builder.getKeyInfo(); if (builderKeyInfo == null) { builderKeyInfo = new KeyInfo(doc); builder.setKeyInfo(builderKeyInfo); } builderKeyInfo.add(encryptedKey); return cipher.doFinal(doc, doc.getDocumentElement()); } /** * Method countNodes * * Recursively count the number of nodes in the document * * @param n Node to count beneath */ private static int countNodes(Node n) { if (n == null) { return 0; // Paranoia } int count = 1; // Always count myself Node c = n.getFirstChild(); while (c != null) { count += countNodes(c); c = c.getNextSibling(); } return count; } /** * Method retrieveCCNumber * * Retrieve the credit card number from the payment info document * * @param doc The document to retrieve the card number from * @return The retrieved credit card number * @throws XPathExpressionException */ private static String retrieveCCNumber(Document doc) throws javax.xml.transform.TransformerException, XPathExpressionException { XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); Map namespace = new HashMap(); namespace.put("x", "urn:example:po"); DSNamespaceContext context = new DSNamespaceContext(namespace); xpath.setNamespaceContext(context); String expression = "//x:Number/text()"; Node ccnumElt = (Node) xpath.evaluate(expression, doc, XPathConstants.NODE); if (ccnumElt != null) { return ccnumElt.getNodeValue(); } return null; } /* * Check we have retrieved a Credit Card number and that it is OK * Check that the document has the correct number of nodes */ private void checkDecryptedDoc(Document d, boolean doNodeCheck) throws Exception { String cc = retrieveCCNumber(d); log.debug("Retrieved Credit Card : " + cc); assertTrue(cc, ((cc!= null) && (cc.equals(cardNumber)))); // Test cc numbers if (doNodeCheck) { int myNodeCount = countNodes(d); assertTrue( "Node count mismatches", ((myNodeCount > 0) && myNodeCount == nodeCount) ); } } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/encryption/EncryptContentTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/encryption/EncryptContentTest.0000644000175000017500000001524712214631242032507 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.encryption; import java.io.ByteArrayInputStream; import java.security.NoSuchAlgorithmException; import javax.crypto.Cipher; import javax.crypto.NoSuchPaddingException; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.DESedeKeySpec; import javax.xml.parsers.DocumentBuilder; import javax.xml.transform.TransformerFactory; import org.apache.xml.security.algorithms.JCEMapper; import org.apache.xml.security.encryption.EncryptedData; import org.apache.xml.security.encryption.XMLCipher; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; public class EncryptContentTest extends org.junit.Assert { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(EncryptContentTest.class.getName()); private static final String DATA = "\n" + " \n" + " Bugs\n" + " Bunny\n" + " 34\n" + " Y10\n" + " \n" + "\n"; private static final String MULTIPLE_USER_DATA = "\n" + " \n" + " Bugs\n" + " Bunny\n" + " \n" + " \n" + " Daffy\n" + " Duck\n" + " \n" + "\n"; private DocumentBuilder db; private SecretKey secretKey; private boolean haveISOPadding; public EncryptContentTest() throws Exception { org.apache.xml.security.Init.init(); db = XMLUtils.createDocumentBuilder(false); byte[] bits192 = "abcdefghijklmnopqrstuvwx".getBytes(); DESedeKeySpec keySpec = new DESedeKeySpec(bits192); SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede"); secretKey = keyFactory.generateSecret(keySpec); TransformerFactory tf = TransformerFactory.newInstance(); tf.newTransformer(); // Determine if we have ISO 10126 Padding - needed for Bulk AES or // 3DES encryption haveISOPadding = false; String algorithmId = JCEMapper.translateURItoJCEID( org.apache.xml.security.utils.EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES128 ); if (algorithmId != null) { try { if (Cipher.getInstance(algorithmId) != null) { haveISOPadding = true; } } catch (NoSuchAlgorithmException nsae) { // } catch (NoSuchPaddingException nspe) { // } } } @org.junit.Test public void testContentRemoved() throws Exception { if (!haveISOPadding) { log.warn("Test testContentRemoved skipped as necessary algorithms not available"); return; } Document doc = db.parse(new ByteArrayInputStream(DATA.getBytes("UTF8"))); NodeList dataToEncrypt = doc.getElementsByTagName("user"); XMLCipher dataCipher = XMLCipher.getInstance(XMLCipher.TRIPLEDES); dataCipher.init(XMLCipher.ENCRYPT_MODE, secretKey); for (int i = 0; i < dataToEncrypt.getLength(); i++) { dataCipher.doFinal(doc,(Element) dataToEncrypt.item(i), true); } // Check that user content has been removed Element user = (Element) dataToEncrypt.item(0); Node child = user.getFirstChild(); while (child != null && child.getNodeType() != Node.ELEMENT_NODE) { child = child.getNextSibling(); } // child should be EncryptedData, if not throw exception Element childElem = (Element) child; if (!childElem.getLocalName().equals("EncryptedData")) { // t.transform(new DOMSource(doc), new StreamResult(System.out)); throw new Exception("Element content not replaced"); } // there shouldn't be any more children elements Node sibling = childElem.getNextSibling(); while (sibling != null && sibling.getNodeType() != Node.ELEMENT_NODE) { sibling = sibling.getNextSibling(); } if (sibling != null) { // t.transform(new DOMSource(doc), new StreamResult(System.out)); throw new Exception("Sibling element content not replaced"); } // t.transform(new DOMSource(doc), new StreamResult(System.out)); } /** * See SANTUARIO-301: * https://issues.apache.org/jira/browse/SANTUARIO-301 */ @org.junit.Test public void testMultipleKeyInfoElements() throws Exception { if (!haveISOPadding) { log.warn("Test testMultipleKeyInfoElements skipped as necessary algorithms not available"); return; } Document doc = db.parse(new ByteArrayInputStream(MULTIPLE_USER_DATA.getBytes("UTF8"))); NodeList dataToEncrypt = doc.getElementsByTagName("user"); XMLCipher dataCipher = XMLCipher.getInstance(XMLCipher.TRIPLEDES); dataCipher.init(XMLCipher.ENCRYPT_MODE, secretKey); KeyInfo keyInfo = new KeyInfo(doc); keyInfo.addKeyName("mykey"); EncryptedData encryptedData = dataCipher.getEncryptedData(); encryptedData.setKeyInfo(keyInfo); for (int i = 0; i < dataToEncrypt.getLength(); i++) { dataCipher.doFinal(doc,(Element) dataToEncrypt.item(i), true); } NodeList keyInfoList = doc.getElementsByTagNameNS(Constants.SignatureSpecNS, "KeyInfo"); assertEquals(keyInfoList.getLength(), 2); } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/encryption/ReferenceListTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/encryption/ReferenceListTest.j0000644000175000017500000001276112214631242032432 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.encryption; import java.util.Iterator; import javax.xml.parsers.DocumentBuilder; import org.apache.xml.security.encryption.Reference; import org.apache.xml.security.encryption.ReferenceList; import org.apache.xml.security.encryption.XMLCipher; import org.apache.xml.security.utils.EncryptionConstants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; public class ReferenceListTest extends org.junit.Assert { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ReferenceListTest.class.getName()); private DocumentBuilder db; public ReferenceListTest() throws Exception { org.apache.xml.security.Init.init(); db = XMLUtils.createDocumentBuilder(false); } @org.junit.Test public void testReferenceList() throws Exception { Document doc = db.newDocument(); XMLCipher dataCipher = XMLCipher.getInstance(); dataCipher.init(XMLCipher.DECRYPT_MODE, null); ReferenceList dataRefList = dataCipher.createReferenceList(ReferenceList.DATA_REFERENCE); Reference dataRef1 = dataRefList.newDataReference("#id1"); dataRefList.add(dataRef1); Reference dataRef2 = dataRefList.newDataReference("#id2"); dataRefList.add(dataRef2); assertEquals("#id1", dataRef1.getURI()); ReferenceList keyRefList = dataCipher.createReferenceList(ReferenceList.KEY_REFERENCE); Reference keyRef10 = keyRefList.newKeyReference("#id10"); keyRefList.add(keyRef10); Reference keyRef20 = keyRefList.newKeyReference("#id20"); keyRefList.add(keyRef20); assertEquals("#id10", keyRef10.getURI()); // See SANTUARIO-302 // https://issues.apache.org/jira/browse/SANTUARIO-302 Element dataRefListElement = dataCipher.martial(doc, dataRefList); assertEquals(EncryptionConstants.EncryptionSpecNS, dataRefListElement.getNamespaceURI()); assertEquals(EncryptionConstants._TAG_REFERENCELIST, dataRefListElement.getLocalName()); Element dataRef1Element = (Element)dataRefListElement.getFirstChild(); assertEquals(EncryptionConstants.EncryptionSpecNS, dataRef1Element.getNamespaceURI()); assertEquals(EncryptionConstants._TAG_DATAREFERENCE, dataRef1Element.getLocalName()); assertEquals("#id1", dataRef1Element.getAttribute("URI")); Element dataRef2Element = (Element)dataRef1Element.getNextSibling(); assertEquals(EncryptionConstants.EncryptionSpecNS, dataRef2Element.getNamespaceURI()); assertEquals(EncryptionConstants._TAG_DATAREFERENCE, dataRef2Element.getLocalName()); assertEquals("#id2", dataRef2Element.getAttribute("URI")); assertNull(dataRef2Element.getNextSibling()); Element keyRefListElement = dataCipher.martial(doc, keyRefList); assertEquals(EncryptionConstants.EncryptionSpecNS, keyRefListElement.getNamespaceURI()); assertEquals(EncryptionConstants._TAG_REFERENCELIST, keyRefListElement.getLocalName()); Element keyRef10Element = (Element)keyRefListElement.getFirstChild(); assertEquals(EncryptionConstants.EncryptionSpecNS, keyRef10Element.getNamespaceURI()); assertEquals(EncryptionConstants._TAG_KEYREFERENCE, keyRef10Element.getLocalName()); assertEquals("#id10", keyRef10Element.getAttribute("URI")); Element keyRef20Element = (Element)keyRef10Element.getNextSibling(); assertEquals(EncryptionConstants.EncryptionSpecNS, keyRef20Element.getNamespaceURI()); assertEquals(EncryptionConstants._TAG_KEYREFERENCE, keyRef20Element.getLocalName()); assertEquals("#id20", keyRef20Element.getAttribute("URI")); assertNull(keyRef20Element.getNextSibling()); // See SANTUARIO-304 // https://issues.apache.org/jira/browse/SANTUARIO-304 Iterator iter = dataRefList.getReferences(); Reference ref = iter.next(); assertEquals(EncryptionConstants._TAG_DATAREFERENCE, ref.getType()); assertEquals("#id1", ref.getURI()); ref = iter.next(); assertEquals(EncryptionConstants._TAG_DATAREFERENCE, ref.getType()); assertEquals("#id2", ref.getURI()); assertTrue(!iter.hasNext()); iter = keyRefList.getReferences(); ref = iter.next(); assertEquals(EncryptionConstants._TAG_KEYREFERENCE, ref.getType()); assertEquals("#id10", ref.getURI()); ref = iter.next(); assertEquals(EncryptionConstants._TAG_KEYREFERENCE, ref.getType()); assertEquals("#id20", ref.getURI()); assertTrue(!iter.hasNext()); } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/encryption/BaltimoreEncTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/encryption/BaltimoreEncTest.ja0000644000175000017500000005032012214631242032376 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.encryption; import java.io.File; import java.security.Key; import java.security.KeyFactory; import java.security.NoSuchAlgorithmException; import java.security.PrivateKey; import java.security.cert.X509Certificate; import java.security.spec.PKCS8EncodedKeySpec; import java.util.HashMap; import java.util.Map; import javax.crypto.Cipher; import javax.crypto.NoSuchPaddingException; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; import javax.xml.parsers.DocumentBuilder; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathExpressionException; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.algorithms.JCEMapper; import org.apache.xml.security.encryption.EncryptedData; import org.apache.xml.security.encryption.EncryptedKey; import org.apache.xml.security.encryption.XMLCipher; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.keys.content.KeyName; import org.apache.xml.security.keys.content.X509Data; import org.apache.xml.security.keys.content.x509.XMLX509Certificate; import org.apache.xml.security.keys.keyresolver.KeyResolver; import org.apache.xml.security.test.DSNamespaceContext; import org.apache.xml.security.utils.EncryptionConstants; import org.apache.xml.security.utils.JavaUtils; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; /** * Interop test for XML Encryption * * @author Berin Lautenbach */ public class BaltimoreEncTest extends org.junit.Assert { private static String cardNumber; private static String rsaCertSerialNumber; private static String testDecryptString; private static int nodeCount = 0; private static byte[] jebBytes; private static byte[] jobBytes; private static byte[] jedBytes; private static PrivateKey rsaKey; private boolean haveISOPadding; private boolean haveKeyWraps; /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(BaltimoreEncTest.class.getName()); /** * Constructor BaltimoreEncTest */ public BaltimoreEncTest() throws Exception { // Create the comparison strings String filename = "src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/plaintext.xml"; String basedir = System.getProperty("basedir"); if (basedir != null && !"".equals(basedir)) { filename = basedir + "/" + filename; } File f = new File(filename); DocumentBuilder db = XMLUtils.createDocumentBuilder(false); Document doc = db.parse(new java.io.FileInputStream(f)); cardNumber = retrieveCCNumber(doc); // Test decrypt testDecryptString = new String("top secret message\n"); // Count the nodes in the document as a secondary test nodeCount = countNodes(doc); // Create the keys jebBytes = "abcdefghijklmnopqrstuvwx".getBytes("ASCII"); jobBytes = "abcdefghijklmnop".getBytes("ASCII"); jedBytes = "abcdefghijklmnopqrstuvwxyz012345".getBytes("ASCII"); // Certificate information rsaCertSerialNumber = new String("1014918766910"); // rsaKey filename = "src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/rsa.p8"; if (basedir != null && !"".equals(basedir)) { filename = basedir + "/" + filename; } byte[] pkcs8Bytes = JavaUtils.getBytesFromFile(filename); PKCS8EncodedKeySpec pkcs8Spec = new PKCS8EncodedKeySpec(pkcs8Bytes); // Create a key factory KeyFactory keyFactory = KeyFactory.getInstance("RSA"); rsaKey = keyFactory.generatePrivate(pkcs8Spec); // Initialise the library org.apache.xml.security.Init.init(); // Register our key resolver KeyResolver.register("org.apache.xml.security.test.encryption.BobKeyResolver", false); // Check what algorithms are available haveISOPadding = false; String algorithmId = JCEMapper.translateURItoJCEID(EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES128); if (algorithmId != null) { try { if (Cipher.getInstance(algorithmId) != null) { haveISOPadding = true; } } catch (NoSuchAlgorithmException nsae) { // } catch (NoSuchPaddingException nspe) { // } } haveKeyWraps = (JCEMapper.translateURItoJCEID(EncryptionConstants.ALGO_ID_KEYWRAP_AES128) != null); } /** * Method test_five_content_3des_cbc * * Check the merlin-enc-five element content test for 3DES */ @org.junit.Test public void test_five_content_3des_cbc() throws Exception { if (haveISOPadding) { String filename = "src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-content-tripledes-cbc.xml"; Document dd = decryptElement(filename); checkDecryptedDoc(dd, true); } else { log.warn( "Skipping test test_five_content_3des_cbs as necessary " + "crypto algorithms are not available" ); } } /** * Method test_five_content_aes256_cbc * * Check the merlin-enc-five element content test for AES256 */ @org.junit.Test public void test_five_content_aes256_cbc() throws Exception { if (haveISOPadding) { String filename = "src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-content-aes256-cbc-prop.xml"; Document dd = decryptElement(filename); checkDecryptedDoc(dd, true); } else { log.warn( "Skipping test test_five_content_aes256_cbc as necessary " + "crypto algorithms are not available" ); } } /** * Method test_five_content_aes128_cbc_kw_aes192 * * Check the merlin-enc-five element content test for AES128 with * AES 192 key wrap */ @org.junit.Test public void test_five_content_aes128_cbc_kw_aes192() throws Exception { if (haveISOPadding && haveKeyWraps) { String filename = "src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-content-aes128-cbc-kw-aes192.xml"; Document dd = decryptElement(filename); checkDecryptedDoc(dd, true); } else { log.warn( "Skipping test test_five_content_aes128_cbc_kw_aes192 as necessary " + "crypto algorithms are not available" ); } } /** * Method test_five_content_3des_cbc_kw_aes128 * * Check the merlin-enc-five element content test for 3DES with * AES 128 key wrap */ @org.junit.Test public void test_five_content_3des_cbc_kw_aes128() throws Exception { if (haveISOPadding && haveKeyWraps) { String filename = "src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-element-tripledes-cbc-kw-aes128.xml"; Document dd = decryptElement(filename); checkDecryptedDoc(dd, true); } else { log.warn( "Skipping test test_five_content_3des_cbc_kw_aes128 as necessary " + "crypto algorithms are not available" ); } } /** * Method test_five_content_aes128_cbc_kw_rsa_15 * * Check the merlin-enc-five element content test for AES128 with * RSA key wrap (PKCS 1.5 padding) */ @org.junit.Test public void test_five_content_aes128_cbc_rsa_15() throws Exception { if (haveISOPadding) { String filename = "src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-element-aes128-cbc-rsa-1_5.xml"; Document dd = decryptElement(filename); checkDecryptedDoc(dd, true); } else { log.warn( "Skipping test test_five_content_aes128_cbc_rsa_15 as necessary " + "crypto algorithms are not available" ); } } /** * Method test_five_element_aes192_cbc_ref * * Check the merlin-enc-five element data test for AES192 with * a CipherReference element */ @org.junit.Test public void test_five_element_aes192_cbc_ref() throws Exception { if (haveISOPadding) { String filename = "src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-element-aes192-cbc-ref.xml"; Document dd = decryptElement(filename); // Note - we don't check the node count, as it will be different // due to the encrypted text remainin in the reference nodes checkDecryptedDoc(dd, false); } else { log.warn( "Skipping test test_five_element_aes192_cbc_ref as necessary " + "crypto algorithms are not available" ); } } /** * Method test_five_data_aes128_cbc * * Check the merlin-enc-five element data test for AES128 with no * key wrap */ @org.junit.Test public void test_five_data_aes128_cbc() throws Exception { if (haveISOPadding) { String filename = "src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-data-aes128-cbc.xml"; byte[] decrypt = decryptData(filename); checkDecryptedData(decrypt); } else { log.warn( "Skipping test test_five_data_aes128_cbc as necessary " + "crypto algorithms are not available" ); } } /** * Method test_five_data_aes256_cbc_3des * * Check the merlin-enc-five element data test for AES256 with 3DES * key wrap */ @org.junit.Test public void test_five_data_aes256_cbc_3des() throws Exception { if (haveISOPadding && haveKeyWraps) { String filename = "src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-data-aes256-cbc-kw-tripledes.xml"; byte[] decrypt = decryptData(filename); checkDecryptedData(decrypt); } else { log.warn( "Skipping test test_five_data_aes256_cbc_3des as necessary " + "crypto algorithms are not available" ); } } /** * Method test_five_data_aes192_cbc_aes256 * * Check the merlin-enc-five element data test for AES192 with AES256 * key wrap */ @org.junit.Test public void test_five_data_aes192_cbc_aes256() throws Exception { if (haveISOPadding && haveKeyWraps) { String filename = "src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-data-aes192-cbc-kw-aes256.xml"; byte[] decrypt = decryptData(filename); checkDecryptedData(decrypt); } else { log.warn( "Skipping test test_five_data_aes192_cbc_aes256 as necessary " + "crypto algorithms are not available" ); } } /** * Method test_five_data_3des_cbc_rsa_oaep * * Check the merlin-enc-five element data test for 3DES with * RSA key wrap (OAEP and no parameters) */ @org.junit.Test public void test_five_data_3des_cbc_rsa_oaep() throws Exception { if (haveISOPadding) { String filename = "src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-data-tripledes-cbc-rsa-oaep-mgf1p.xml"; byte[] decrypt = decryptData(filename); checkDecryptedData(decrypt); } else { log.warn( "Skipping test test_five_data_3des_cbc_rsa_oaep as necessary " + "crypto algorithms are not available" ); } } /** * Method decryptElement * * Take a key, encryption type and a file, find an encrypted element * decrypt it and return the resulting document * * @param filename File to decrypt from */ private Document decryptElement(String filename) throws Exception { XMLCipher cipher; // Parse the document in question String basedir = System.getProperty("basedir"); if (basedir != null && !"".equals(basedir)) { filename = basedir + "/" + filename; } File f = new File(filename); DocumentBuilder db = XMLUtils.createDocumentBuilder(false); Document doc = db.parse(new java.io.FileInputStream(f)); // Now we have the document, lets build the XMLCipher element Element ee = null; // Create the XMLCipher element cipher = XMLCipher.getInstance(); // Need to pre-load the Encrypted Data so we can get the key info ee = (Element) doc.getElementsByTagName("EncryptedData").item(0); cipher.init(XMLCipher.DECRYPT_MODE, null); EncryptedData encryptedData = cipher.loadEncryptedData(doc, ee); Key key = findKey(encryptedData); cipher.init(XMLCipher.DECRYPT_MODE, key); Document dd = cipher.doFinal(doc, ee); return dd; } /** * Method decryptData * * Take a file, find an encrypted element decrypt it and return the * resulting byte array * * @param filename File to decrypt from */ private byte[] decryptData(String filename) throws Exception { XMLCipher cipher; // Parse the document in question String basedir = System.getProperty("basedir"); if (basedir != null && !"".equals(basedir)) { filename = basedir + "/" + filename; } File f = new File(filename); DocumentBuilder db = XMLUtils.createDocumentBuilder(false); Document doc = db.parse(new java.io.FileInputStream(f)); // Now we have the document, lets build the XMLCipher element Element ee = null; // Create the XMLCipher element cipher = XMLCipher.getInstance(); // Need to pre-load the Encrypted Data so we can get the key info ee = (Element) doc.getElementsByTagName("EncryptedData").item(0); cipher.init(XMLCipher.DECRYPT_MODE, null); EncryptedData encryptedData = cipher.loadEncryptedData(doc, ee); Key key = findKey(encryptedData); cipher.init(XMLCipher.DECRYPT_MODE, key); return cipher.decryptToByteArray(ee); } /** * Method mapKeyName * * Create a secret key from a key name for merlin-five * * @param name Name to map a key from */ private SecretKey mapKeyName(String name) throws Exception { if (name.equals("job")) { // Job is a AES-128 key SecretKey key = new SecretKeySpec(jobBytes, "AES"); return key; } if (name.equals("jeb")) { // Jeb is a AES-192 key SecretKey key = new SecretKeySpec(jebBytes, "AES"); return key; } if (name.equals("jed")) { // Jed is a AES-256 key SecretKey key = new SecretKeySpec(jedBytes, "AES"); return key; } return null; } /** * Method findKey * * Given an encryptedData structure, return the key that will decrypt * it * * @param encryptedData EncryptedData to get key for */ private Key findKey(EncryptedData encryptedData) throws Exception { KeyInfo ki = encryptedData.getKeyInfo(); Key key = null; Key kek = null; if (ki == null) { return null; } // First check for a known key name KeyName keyName = ki.itemKeyName(0); if (keyName != null) { return (mapKeyName(keyName.getKeyName())); } // Decrypt any encryptedKey structures EncryptedKey encryptedKey = ki.itemEncryptedKey(0); if (encryptedKey == null) { return null; } KeyInfo kiek = encryptedKey.getKeyInfo(); if (kiek == null) { return null; } KeyName kekKeyName = kiek.itemKeyName(0); if (kekKeyName != null) { kek = mapKeyName(kekKeyName.getKeyName()); } else { X509Data certData = kiek.itemX509Data(0); XMLX509Certificate xcert = certData.itemCertificate(0); X509Certificate cert = xcert.getX509Certificate(); if (cert != null) { if (cert.getSerialNumber().toString().equals(rsaCertSerialNumber)) { kek = rsaKey; } } } if (kek != null) { XMLCipher cipher = XMLCipher.getInstance(); cipher.init(XMLCipher.UNWRAP_MODE, kek); key = cipher.decryptKey( encryptedKey, encryptedData.getEncryptionMethod().getAlgorithm() ); } return key; } /** * Method countNodes * * Recursively count the number of nodes in the document * * @param n Node to count beneath */ private static int countNodes(Node n) { if (n == null) { return 0; // Paranoia } int count = 1; // Always count myself Node c = n.getFirstChild(); while (c != null) { count += countNodes(c); c = c.getNextSibling(); } return count; } /** * Method retrieveCCNumber * * Retrieve the credit card number from the payment info document * * @param doc The document to retrieve the card number from * @return The retrieved credit card number * @throws XPathExpressionException */ private static String retrieveCCNumber(Document doc) throws javax.xml.transform.TransformerException, XPathExpressionException { XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); Map namespace = new HashMap(); namespace.put("x", "urn:example:po"); DSNamespaceContext context = new DSNamespaceContext(namespace); xpath.setNamespaceContext(context); String expression = "//x:Number/text()"; Node ccnumElt = (Node) xpath.evaluate(expression, doc, XPathConstants.NODE); if (ccnumElt != null) { return ccnumElt.getNodeValue(); } return null; } /* * Check we have retrieved a Credit Card number and that it is OK * Check that the document has the correct number of nodes */ private void checkDecryptedDoc(Document d, boolean doNodeCheck) throws Exception { String cc = retrieveCCNumber(d); log.debug("Retrieved Credit Card : " + cc); assertTrue(cc, ((cc!= null) && (cc.equals(cardNumber)))); // Test cc numbers if (doNodeCheck) { int myNodeCount = countNodes(d); assertTrue( "Node count mismatches", ((myNodeCount > 0) && myNodeCount == nodeCount) ); } } /** * Check a decrypt of data was OK */ private void checkDecryptedData(byte[] data) throws Exception { String input = new String(data, "ASCII"); assertEquals(testDecryptString, input); } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/encryption/BobKeyResolver.java0000644000175000017500000001030012030302102032372 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.encryption; import java.security.cert.X509Certificate; import java.security.PublicKey; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.DESedeKeySpec; import org.apache.xml.security.keys.content.KeyName; import org.apache.xml.security.keys.keyresolver.KeyResolverException; import org.apache.xml.security.keys.keyresolver.KeyResolverSpi; import org.apache.xml.security.keys.storage.StorageResolver; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * Test resolver - simply maps a key name to the appropriate key * * @author Berin Lautenbach */ public class BobKeyResolver extends KeyResolverSpi { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(BobKeyResolver.class.getName()); private KeyName _kn = null; /** * Method engineCanResolve * * @param element * @param BaseURI * @param storage * */ public boolean engineCanResolve(Element element, String BaseURI, StorageResolver storage) { if (element == null) { return false; } log.debug("Can I resolve " + element.getTagName()); boolean isKeyName = XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_KEYNAME); try { if (isKeyName) { _kn = new KeyName(element, ""); if (_kn.getKeyName().equals("bob")) { return true; } } } catch (Exception e) { // Do nothing } return false; } /** * Method engineResolvePublicKey * * @param element * @param BaseURI * @param storage * @return null if no {@link PublicKey} could be obtained * @throws KeyResolverException */ public PublicKey engineLookupAndResolvePublicKey( Element element, String BaseURI, StorageResolver storage ) throws KeyResolverException { return null; } /** * Method engineResolveX509Certificate * * @param element * @param BaseURI * @param storage * * @throws KeyResolverException */ public X509Certificate engineLookupResolveX509Certificate( Element element, String BaseURI, StorageResolver storage ) throws KeyResolverException { return null; } /** * Method engineResolveSecretKey * * @param element * @param BaseURI * @param storage * * @throws KeyResolverException */ public javax.crypto.SecretKey engineLookupAndResolveSecretKey( Element element, String BaseURI, StorageResolver storage ) throws KeyResolverException { if (engineCanResolve(element, BaseURI, storage)) { try { DESedeKeySpec keySpec = new DESedeKeySpec("abcdefghijklmnopqrstuvwx".getBytes("ASCII")); SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede"); SecretKey key = keyFactory.generateSecret(keySpec); return key; } catch (Exception e) { throw new KeyResolverException("Something badly wrong in creation of bob's key"); } } return null; } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/encryption/XMLCipherTest.java0000644000175000017500000007770612214631242032175 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.encryption; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.security.Key; import java.security.KeyPairGenerator; import java.security.KeyPair; import java.security.NoSuchAlgorithmException; import java.security.PrivateKey; import java.security.PublicKey; import javax.crypto.Cipher; import javax.crypto.KeyGenerator; import javax.crypto.NoSuchPaddingException; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.DESedeKeySpec; import javax.crypto.spec.SecretKeySpec; import javax.xml.parsers.DocumentBuilder; import org.apache.xml.security.algorithms.JCEMapper; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.encryption.XMLCipher; import org.apache.xml.security.encryption.EncryptedData; import org.apache.xml.security.encryption.EncryptedKey; import org.apache.xml.security.encryption.EncryptionMethod; import org.apache.xml.security.encryption.CipherData; import org.apache.xml.security.transforms.params.XPathContainer; import org.apache.xml.security.utils.EncryptionConstants; import org.apache.xml.security.utils.XMLUtils; import org.apache.xml.security.keys.KeyInfo; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * * @author Axl Mattheus * @author Berin Lautenbach */ public class XMLCipherTest extends org.junit.Assert { /** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(XMLCipherTest.class.getName()); static { org.apache.xml.security.Init.init(); } private String documentName; private String elementName; private String elementIndex; private XMLCipher cipher; private String basedir; private boolean haveISOPadding; private boolean haveKeyWraps; private String tstBase64EncodedString; public XMLCipherTest() { basedir = System.getProperty("basedir","."); documentName = System.getProperty("org.apache.xml.enc.test.doc", basedir + "/build.xml"); elementName = System.getProperty("org.apache.xml.enc.test.elem", "path"); elementIndex = System.getProperty("org.apache.xml.enc.test.idx", "0"); tstBase64EncodedString = new String("YmNkZWZnaGlqa2xtbm9wcRrPXjQ1hvhDFT+EdesMAPE4F6vlT+y0HPXe0+nAGLQ8"); // Determine if we have ISO 10126 Padding - needed for Bulk AES or // 3DES encryption haveISOPadding = false; String algorithmId = JCEMapper.translateURItoJCEID(EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES128); if (algorithmId != null) { try { if (Cipher.getInstance(algorithmId) != null) { haveISOPadding = true; } } catch (NoSuchAlgorithmException nsae) { // } catch (NoSuchPaddingException nspe) { // } } haveKeyWraps = (JCEMapper.translateURItoJCEID(EncryptionConstants.ALGO_ID_KEYWRAP_AES128) != null); } /** * Test encryption using a generated AES 128 bit key that is * encrypted using a AES 192 bit key. Then reverse using the KEK */ @org.junit.Test public void testAES128ElementAES192KWCipherUsingKEK() throws Exception { Document d = document(); // source Document ed = null; Document dd = null; Element e = (Element) d.getElementsByTagName(element()).item(index()); Element ee = null; String source = null; String target = null; if (haveISOPadding && haveKeyWraps) { source = toString(d); // Set up a Key Encryption Key byte[] bits192 = "abcdefghijklmnopqrstuvwx".getBytes(); Key kek = new SecretKeySpec(bits192, "AES"); // Generate a traffic key KeyGenerator keygen = KeyGenerator.getInstance("AES"); keygen.init(128); Key key = keygen.generateKey(); cipher = XMLCipher.getInstance(XMLCipher.AES_192_KeyWrap); cipher.init(XMLCipher.WRAP_MODE, kek); EncryptedKey encryptedKey = cipher.encryptKey(d, key); // encrypt cipher = XMLCipher.getInstance(XMLCipher.AES_128); cipher.init(XMLCipher.ENCRYPT_MODE, key); EncryptedData builder = cipher.getEncryptedData(); KeyInfo builderKeyInfo = builder.getKeyInfo(); if (builderKeyInfo == null) { builderKeyInfo = new KeyInfo(d); builder.setKeyInfo(builderKeyInfo); } builderKeyInfo.add(encryptedKey); ed = cipher.doFinal(d, e); //decrypt key = null; ee = (Element) ed.getElementsByTagName("xenc:EncryptedData").item(0); cipher = XMLCipher.getInstance(XMLCipher.AES_128); cipher.init(XMLCipher.DECRYPT_MODE, null); cipher.setKEK(kek); dd = cipher.doFinal(ed, ee); target = toString(dd); assertEquals(source, target); } else { log.warn( "Test testAES128ElementAES192KWCipherUsingKEK skipped as " + "necessary algorithms not available" ); } } /** * Test encryption using a generated AES 256 bit key that is * encrypted using an RSA key. Reverse using KEK */ @org.junit.Test public void testAES128ElementRSAKWCipherUsingKEK() throws Exception { Document d = document(); // source Document ed = null; Document dd = null; Element e = (Element) d.getElementsByTagName(element()).item(index()); Element ee = null; String source = null; String target = null; if (haveISOPadding) { source = toString(d); // Generate an RSA key KeyPairGenerator rsaKeygen = KeyPairGenerator.getInstance("RSA"); KeyPair kp = rsaKeygen.generateKeyPair(); PrivateKey priv = kp.getPrivate(); PublicKey pub = kp.getPublic(); // Generate a traffic key KeyGenerator keygen = KeyGenerator.getInstance("AES"); keygen.init(256); Key key = keygen.generateKey(); cipher = XMLCipher.getInstance(XMLCipher.RSA_v1dot5); cipher.init(XMLCipher.WRAP_MODE, pub); EncryptedKey encryptedKey = cipher.encryptKey(d, key); // encrypt cipher = XMLCipher.getInstance(XMLCipher.AES_256); cipher.init(XMLCipher.ENCRYPT_MODE, key); EncryptedData builder = cipher.getEncryptedData(); KeyInfo builderKeyInfo = builder.getKeyInfo(); if (builderKeyInfo == null) { builderKeyInfo = new KeyInfo(d); builder.setKeyInfo(builderKeyInfo); } builderKeyInfo.add(encryptedKey); ed = cipher.doFinal(d, e); log.debug("Encrypted document"); log.debug(toString(ed)); //decrypt key = null; ee = (Element) ed.getElementsByTagName("xenc:EncryptedData").item(0); cipher = XMLCipher.getInstance(XMLCipher.AES_128); cipher.init(XMLCipher.DECRYPT_MODE, null); cipher.setKEK(priv); dd = cipher.doFinal(ed, ee); target = toString(dd); assertEquals(source, target); } else { log.warn( "Test testAES128ElementRSAKWCipherUsingKEK skipped as " + "necessary algorithms not available" ); } } /** * Test encryption using a generated AES 192 bit key that is * encrypted using a 3DES key. Then reverse by decrypting * EncryptedKey by hand */ @org.junit.Test public void testAES192ElementAES256KWCipher() throws Exception { Document d = document(); // source Document ed = null; Document dd = null; Element e = (Element) d.getElementsByTagName(element()).item(index()); Element ee = null; String source = null; String target = null; if (haveISOPadding && haveKeyWraps) { source = toString(d); // Set up a Key Encryption Key byte[] bits192 = "abcdefghijklmnopqrstuvwx".getBytes(); DESedeKeySpec keySpec = new DESedeKeySpec(bits192); SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede"); Key kek = keyFactory.generateSecret(keySpec); // Generate a traffic key KeyGenerator keygen = KeyGenerator.getInstance("AES"); keygen.init(192); Key key = keygen.generateKey(); cipher = XMLCipher.getInstance(XMLCipher.TRIPLEDES_KeyWrap); cipher.init(XMLCipher.WRAP_MODE, kek); EncryptedKey encryptedKey = cipher.encryptKey(d, key); // encrypt cipher = XMLCipher.getInstance(XMLCipher.AES_192); cipher.init(XMLCipher.ENCRYPT_MODE, key); EncryptedData builder = cipher.getEncryptedData(); KeyInfo builderKeyInfo = builder.getKeyInfo(); if (builderKeyInfo == null) { builderKeyInfo = new KeyInfo(d); builder.setKeyInfo(builderKeyInfo); } builderKeyInfo.add(encryptedKey); ed = cipher.doFinal(d, e); //decrypt key = null; ee = (Element) ed.getElementsByTagName("xenc:EncryptedData").item(0); cipher = XMLCipher.getInstance(); cipher.init(XMLCipher.DECRYPT_MODE, null); EncryptedData encryptedData = cipher.loadEncryptedData(ed, ee); if(encryptedData == null) { System.out.println("ed is null"); } else if (encryptedData.getKeyInfo() == null) { System.out.println("ki is null"); } EncryptedKey ek = encryptedData.getKeyInfo().itemEncryptedKey(0); if (ek != null) { XMLCipher keyCipher = XMLCipher.getInstance(); keyCipher.init(XMLCipher.UNWRAP_MODE, kek); key = keyCipher.decryptKey(ek, encryptedData.getEncryptionMethod().getAlgorithm()); } // Create a new cipher just to be paranoid XMLCipher cipher3 = XMLCipher.getInstance(); cipher3.init(XMLCipher.DECRYPT_MODE, key); dd = cipher3.doFinal(ed, ee); target = toString(dd); assertEquals(source, target); } else { log.warn( "Test testAES192ElementAES256KWCipher skipped as " + "necessary algorithms not available" ); } } @org.junit.Test public void testTripleDesElementCipher() throws Exception { Document d = document(); // source Document ed = null; // target Document dd = null; // target Element e = (Element) d.getElementsByTagName(element()).item(index()); Element ee = null; String source = null; String target = null; if (haveISOPadding) { source = toString(d); // prepare for encryption byte[] passPhrase = "24 Bytes per DESede key!".getBytes(); DESedeKeySpec keySpec = new DESedeKeySpec(passPhrase); SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede"); SecretKey key = keyFactory.generateSecret(keySpec); // encrypt cipher = XMLCipher.getInstance(XMLCipher.TRIPLEDES); cipher.init(XMLCipher.ENCRYPT_MODE, key); ed = cipher.doFinal(d, e); //decrypt cipher = XMLCipher.getInstance(XMLCipher.TRIPLEDES); cipher.init(XMLCipher.DECRYPT_MODE, key); ee = (Element) ed.getElementsByTagName("xenc:EncryptedData").item(0); EncryptedData encryptedData = cipher.loadEncryptedData(ed, ee); String algorithm = encryptedData.getEncryptionMethod().getAlgorithm(); assertEquals(XMLCipher.TRIPLEDES, algorithm); dd = cipher.doFinal(ed, ee); target = toString(dd); assertEquals(source, target); } else { log.warn( "Test testTripleDesElementCipher skipped as necessary algorithms not available" ); } } @org.junit.Test public void testAes128ElementCipher() throws Exception { byte[] bits128 = { (byte) 0x10, (byte) 0x11, (byte) 0x12, (byte) 0x13, (byte) 0x14, (byte) 0x15, (byte) 0x16, (byte) 0x17, (byte) 0x18, (byte) 0x19, (byte) 0x1A, (byte) 0x1B, (byte) 0x1C, (byte) 0x1D, (byte) 0x1E, (byte) 0x1F}; Key key = new SecretKeySpec(bits128, "AES"); Document d = document(); // source Document ed = null; // target Document dd = null; // target Element e = (Element) d.getElementsByTagName(element()).item(index()); Element ee = null; String source = null; String target = null; if (haveISOPadding) { source = toString(d); // encrypt cipher = XMLCipher.getInstance(XMLCipher.AES_128); cipher.init(XMLCipher.ENCRYPT_MODE, key); ed = cipher.doFinal(d, e); //decrypt cipher = XMLCipher.getInstance(XMLCipher.AES_128); cipher.init(XMLCipher.DECRYPT_MODE, key); ee = (Element) ed.getElementsByTagName("xenc:EncryptedData").item(0); EncryptedData encryptedData = cipher.loadEncryptedData(ed, ee); String algorithm = encryptedData.getEncryptionMethod().getAlgorithm(); assertEquals(XMLCipher.AES_128, algorithm); dd = cipher.doFinal(ed, ee); target = toString(dd); assertEquals(source, target); } else { log.warn( "Test testAes128ElementCipher skipped as necessary algorithms not available" ); } } @org.junit.Test public void testAes192ElementCipher() throws Exception { byte[] bits192 = { (byte) 0x08, (byte) 0x09, (byte) 0x0A, (byte) 0x0B, (byte) 0x0C, (byte) 0x0D, (byte) 0x0E, (byte) 0x0F, (byte) 0x10, (byte) 0x11, (byte) 0x12, (byte) 0x13, (byte) 0x14, (byte) 0x15, (byte) 0x16, (byte) 0x17, (byte) 0x18, (byte) 0x19, (byte) 0x1A, (byte) 0x1B, (byte) 0x1C, (byte) 0x1D, (byte) 0x1E, (byte) 0x1F}; Key key = new SecretKeySpec(bits192, "AES"); Document d = document(); // source Document ed = null; // target Document dd = null; // target Element e = (Element) d.getElementsByTagName(element()).item(index()); Element ee = null; String source = null; String target = null; if (haveISOPadding) { source = toString(d); // encrypt cipher = XMLCipher.getInstance(XMLCipher.AES_192); cipher.init(XMLCipher.ENCRYPT_MODE, key); ed = cipher.doFinal(d, e); //decrypt cipher = XMLCipher.getInstance(XMLCipher.AES_192); cipher.init(XMLCipher.DECRYPT_MODE, key); ee = (Element) ed.getElementsByTagName("xenc:EncryptedData").item(0); EncryptedData encryptedData = cipher.loadEncryptedData(ed, ee); String algorithm = encryptedData.getEncryptionMethod().getAlgorithm(); assertEquals(XMLCipher.AES_192, algorithm); dd = cipher.doFinal(ed, ee); target = toString(dd); assertEquals(source, target); } else { log.warn("Test testAes192ElementCipher skipped as necessary algorithms not available"); } } @org.junit.Test public void testAes265ElementCipher() throws Exception { byte[] bits256 = { (byte) 0x00, (byte) 0x01, (byte) 0x02, (byte) 0x03, (byte) 0x04, (byte) 0x05, (byte) 0x06, (byte) 0x07, (byte) 0x08, (byte) 0x09, (byte) 0x0A, (byte) 0x0B, (byte) 0x0C, (byte) 0x0D, (byte) 0x0E, (byte) 0x0F, (byte) 0x10, (byte) 0x11, (byte) 0x12, (byte) 0x13, (byte) 0x14, (byte) 0x15, (byte) 0x16, (byte) 0x17, (byte) 0x18, (byte) 0x19, (byte) 0x1A, (byte) 0x1B, (byte) 0x1C, (byte) 0x1D, (byte) 0x1E, (byte) 0x1F}; Key key = new SecretKeySpec(bits256, "AES"); Document d = document(); // source Document ed = null; // target Document dd = null; // target Element e = (Element) d.getElementsByTagName(element()).item(index()); Element ee = null; String source = null; String target = null; if (haveISOPadding) { source = toString(d); // encrypt cipher = XMLCipher.getInstance(XMLCipher.AES_256); cipher.init(XMLCipher.ENCRYPT_MODE, key); ed = cipher.doFinal(d, e); //decrypt cipher = XMLCipher.getInstance(XMLCipher.AES_256); cipher.init(XMLCipher.DECRYPT_MODE, key); ee = (Element) ed.getElementsByTagName("xenc:EncryptedData").item(0); EncryptedData encryptedData = cipher.loadEncryptedData(ed, ee); String algorithm = encryptedData.getEncryptionMethod().getAlgorithm(); assertEquals(XMLCipher.AES_256, algorithm); dd = cipher.doFinal(ed, ee); target = toString(dd); assertEquals(source, target); } else { log.warn("Test testAes265ElementCipher skipped as necessary algorithms not available"); } } /* * Test case for when the entire document is encrypted and decrypted * In this case the EncryptedData becomes the root element of the document */ @org.junit.Test public void testTripleDesDocumentCipher() throws Exception { Document d = document(); // source Document ed = null; // target Document dd = null; // target Element e = d.getDocumentElement(); Element ee = null; String source = null; String target = null; if (haveISOPadding) { source = toString(d); // prepare for encryption byte[] passPhrase = "24 Bytes per DESede key!".getBytes(); DESedeKeySpec keySpec = new DESedeKeySpec(passPhrase); SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede"); SecretKey key = keyFactory.generateSecret(keySpec); // encrypt cipher = XMLCipher.getInstance(XMLCipher.TRIPLEDES); cipher.init(XMLCipher.ENCRYPT_MODE, key); ed = cipher.doFinal(d, e); //decrypt cipher = XMLCipher.getInstance(XMLCipher.TRIPLEDES); cipher.init(XMLCipher.DECRYPT_MODE, key); ee = (Element) ed.getElementsByTagName("xenc:EncryptedData").item(0); dd = cipher.doFinal(ed, ee); target = toString(dd); assertEquals(source, target); } else { log.warn( "Test testTripleDesDocumentCipher skipped as " + "necessary algorithms not available" ); } } /* * Test a Cipher Reference */ @org.junit.Test public void testSameDocumentCipherReference() throws Exception { if (haveISOPadding) { DocumentBuilder db = XMLUtils.createDocumentBuilder(false); Document d = db.newDocument(); Element docElement = d.createElement("EncryptedDoc"); d.appendChild(docElement); // Create the XMLCipher object cipher = XMLCipher.getInstance(); EncryptedData ed = cipher.createEncryptedData(CipherData.REFERENCE_TYPE, "#CipherTextId"); EncryptionMethod em = cipher.createEncryptionMethod(XMLCipher.AES_128); ed.setEncryptionMethod(em); org.apache.xml.security.encryption.Transforms xencTransforms = cipher.createTransforms(d); ed.getCipherData().getCipherReference().setTransforms(xencTransforms); org.apache.xml.security.transforms.Transforms dsTransforms = xencTransforms.getDSTransforms(); // An XPath transform XPathContainer xpc = new XPathContainer(d); xpc.setXPath("self::text()[parent::CipherText[@Id=\"CipherTextId\"]]"); dsTransforms.addTransform( org.apache.xml.security.transforms.Transforms.TRANSFORM_XPATH, xpc.getElementPlusReturns() ); // Add a Base64 Transforms dsTransforms.addTransform( org.apache.xml.security.transforms.Transforms.TRANSFORM_BASE64_DECODE ); Element ee = cipher.martial(d, ed); docElement.appendChild(ee); // Add the cipher text Element encryptedElement = d.createElement("CipherText"); encryptedElement.setAttributeNS(null, "Id", "CipherTextId"); encryptedElement.setIdAttributeNS(null, "Id", true); encryptedElement.appendChild(d.createTextNode(tstBase64EncodedString)); docElement.appendChild(encryptedElement); // dump(d); // Now the decrypt, with a brand new cipher XMLCipher cipherDecrypt = XMLCipher.getInstance(); Key key = new SecretKeySpec("abcdefghijklmnop".getBytes("ASCII"), "AES"); cipherDecrypt.init(XMLCipher.DECRYPT_MODE, key); byte[] decryptBytes = cipherDecrypt.decryptToByteArray(ee); assertEquals("A test encrypted secret", new String(decryptBytes, "ASCII")); } else { log.warn( "Test testSameDocumentCipherReference skipped as " + "necessary algorithms not available" ); } } /* * Test physical representation of decrypted element, see SANTUARIO-309 */ @org.junit.Test public void testPhysicalRepresentation() throws Exception { if (haveISOPadding) { DocumentBuilder db = XMLUtils.createDocumentBuilder(false); byte[] bits192 = "abcdefghijklmnopqrstuvwx".getBytes(); DESedeKeySpec keySpec = new DESedeKeySpec(bits192); SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede"); SecretKey secretKey = keyFactory.generateSecret(keySpec); // Test inherited namespaces don't add extra attributes // Test unused namespaces are preserved final String DATA1 = "11"; Document doc = db.parse(new ByteArrayInputStream(DATA1.getBytes("UTF8"))); Element elem = (Element)doc.getDocumentElement().getFirstChild(); XMLCipher dataCipher = XMLCipher.getInstance(XMLCipher.TRIPLEDES); dataCipher.init(XMLCipher.ENCRYPT_MODE, secretKey); dataCipher.doFinal(doc, elem); Element encrElem = (Element)doc.getDocumentElement().getFirstChild(); assertEquals("EncryptedData", encrElem.getLocalName()); XMLCipher deCipher = XMLCipher.getInstance(XMLCipher.TRIPLEDES); deCipher.init(XMLCipher.DECRYPT_MODE, secretKey); deCipher.doFinal(doc, encrElem); Element decrElem = (Element)doc.getDocumentElement().getFirstChild(); assertEquals("ns:elem", decrElem.getNodeName()); assertEquals("ns.com", decrElem.getNamespaceURI()); assertEquals(1, decrElem.getAttributes().getLength()); Attr attr = (Attr)decrElem.getAttributes().item(0); assertEquals("xmlns:ns2", attr.getName()); assertEquals("ns2.com", attr.getValue()); // Test default namespace undeclaration is preserved final String DATA2 = "11"; doc = db.parse(new ByteArrayInputStream(DATA2.getBytes("UTF8"))); elem = (Element)doc.getDocumentElement().getFirstChild(); dataCipher = XMLCipher.getInstance(XMLCipher.TRIPLEDES); dataCipher.init(XMLCipher.ENCRYPT_MODE, secretKey); dataCipher.doFinal(doc, elem); encrElem = (Element)doc.getDocumentElement().getFirstChild(); assertEquals("EncryptedData", encrElem.getLocalName()); deCipher = XMLCipher.getInstance(XMLCipher.TRIPLEDES); deCipher.init(XMLCipher.DECRYPT_MODE, secretKey); deCipher.doFinal(doc, encrElem); decrElem = (Element)doc.getDocumentElement().getFirstChild(); assertEquals("elem", decrElem.getNodeName()); assertNull(decrElem.getNamespaceURI()); assertEquals(1, decrElem.getAttributes().getLength()); attr = (Attr)decrElem.getAttributes().item(0); assertEquals("xmlns", attr.getName()); assertEquals("", attr.getValue()); // Test comments and PIs are not treated specially when serializing element content. // Other c14n algorithms add a newline after comments and PIs, when they are before or after the document element. final String DATA3 = ""; doc = db.parse(new ByteArrayInputStream(DATA3.getBytes("UTF8"))); elem = (Element)doc.getDocumentElement(); dataCipher = XMLCipher.getInstance(XMLCipher.TRIPLEDES); dataCipher.init(XMLCipher.ENCRYPT_MODE, secretKey); dataCipher.doFinal(doc, elem, true); encrElem = (Element)elem.getFirstChild(); assertEquals("EncryptedData", encrElem.getLocalName()); assertNull(encrElem.getNextSibling()); deCipher = XMLCipher.getInstance(XMLCipher.TRIPLEDES); deCipher.init(XMLCipher.DECRYPT_MODE, secretKey); deCipher.doFinal(doc, encrElem); Node n = elem.getFirstChild(); assertEquals(Node.COMMENT_NODE, n.getNodeType()); n = n.getNextSibling(); assertEquals(Node.PROCESSING_INSTRUCTION_NODE, n.getNodeType()); n = n.getNextSibling(); assertEquals(Node.ELEMENT_NODE, n.getNodeType()); n = n.getNextSibling(); assertEquals(Node.COMMENT_NODE, n.getNodeType()); n = n.getNextSibling(); assertEquals(Node.PROCESSING_INSTRUCTION_NODE, n.getNodeType()); n = n.getNextSibling(); assertNull(n); } else { log.warn( "Test testPhysicalRepresentation skipped as " + "necessary algorithms not available" ); } } @org.junit.Test public void testSerializedData() throws Exception { if (!haveISOPadding) { log.warn("Test testSerializedData skipped as necessary algorithms not available"); return; } byte[] bits128 = { (byte) 0x10, (byte) 0x11, (byte) 0x12, (byte) 0x13, (byte) 0x14, (byte) 0x15, (byte) 0x16, (byte) 0x17, (byte) 0x18, (byte) 0x19, (byte) 0x1A, (byte) 0x1B, (byte) 0x1C, (byte) 0x1D, (byte) 0x1E, (byte) 0x1F}; Key key = new SecretKeySpec(bits128, "AES"); Document d = document(); // source Element e = (Element) d.getElementsByTagName(element()).item(index()); // encrypt cipher = XMLCipher.getInstance(XMLCipher.AES_128); cipher.init(XMLCipher.ENCRYPT_MODE, key); // serialize element ... Canonicalizer canon = Canonicalizer.getInstance(Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS); ByteArrayOutputStream baos = new ByteArrayOutputStream(); canon.setWriter(baos); canon.notReset(); canon.canonicalizeSubtree(e); baos.close(); String before = baos.toString("UTF-8"); byte[] serialized = baos.toByteArray(); EncryptedData encryptedData = cipher.encryptData( d, EncryptionConstants.TYPE_ELEMENT, new ByteArrayInputStream(serialized) ); //decrypt XMLCipher dcipher = XMLCipher.getInstance(XMLCipher.AES_128); dcipher.init(XMLCipher.DECRYPT_MODE, key); String algorithm = encryptedData.getEncryptionMethod().getAlgorithm(); assertEquals(XMLCipher.AES_128, algorithm); byte[] bytes = dcipher.decryptToByteArray(dcipher.martial(encryptedData)); String after = new String(bytes, "UTF-8"); assertEquals(before, after); // test with null type encryptedData = cipher.encryptData(d, null, new ByteArrayInputStream(serialized)); } @org.junit.Test public void testEncryptedKeyWithRecipient() throws Exception { String filename = "src/test/resources/org/apache/xml/security/encryption/encryptedKey.xml"; if (basedir != null && !"".equals(basedir)) { filename = basedir + "/" + filename; } File f = new File(filename); DocumentBuilder builder = XMLUtils.createDocumentBuilder(false); Document document = builder.parse(f); XMLCipher keyCipher = XMLCipher.getInstance(); keyCipher.init(XMLCipher.UNWRAP_MODE, null); NodeList ekList = document.getElementsByTagNameNS( EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_ENCRYPTEDKEY ); for (int i = 0; i < ekList.getLength(); i++) { EncryptedKey ek = keyCipher.loadEncryptedKey(document, (Element) ekList.item(i)); assertNotNull(ek.getRecipient()); } } private String toString (Node n) throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); Canonicalizer c14n = Canonicalizer.getInstance (Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS); byte[] serBytes = c14n.canonicalizeSubtree(n); baos.write(serBytes); baos.close(); return baos.toString("UTF-8"); } private Document document() { Document d = null; try { DocumentBuilder db = XMLUtils.createDocumentBuilder(false); File f = new File(documentName); d = db.parse(f); } catch (Exception e) { e.printStackTrace(); System.exit(-1); } return (d); } private String element() { return (elementName); } private int index() { int result = -1; try { result = Integer.parseInt(elementIndex); } catch (NumberFormatException nfe) { nfe.printStackTrace(); System.exit(-1); } return (result); } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/DSNamespaceContext.java0000644000175000017500000000374411671643306031041 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import javax.xml.namespace.NamespaceContext; /** * A NamespaceContext implementation for digital signatures */ public class DSNamespaceContext implements NamespaceContext { private Map namespaceMap = new HashMap(); public DSNamespaceContext() { namespaceMap.put("ds", "http://www.w3.org/2000/09/xmldsig#"); } public DSNamespaceContext(Map namespaces) { this(); namespaceMap.putAll(namespaces); } public String getNamespaceURI(String arg0) { return namespaceMap.get(arg0); } public void putPrefix(String prefix, String namespace) { namespaceMap.put(prefix, namespace); } public String getPrefix(String arg0) { for (String key : namespaceMap.keySet()) { String value = namespaceMap.get(key); if (value.equals(arg0)) { return key; } } return null; } public Iterator getPrefixes(String arg0) { return namespaceMap.keySet().iterator(); } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/utils/0000755000175000017500000000000012273503732025633 5ustar tonytonylibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/utils/Base64Test.java0000644000175000017500000001004311551556206030362 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.utils; import java.io.ByteArrayOutputStream; import org.apache.xml.security.utils.Base64; import org.apache.xml.security.utils.XMLUtils; /** * Unit test for {@link org.apache.xml.security.utils.Base64} * * @author Christian Geuer-Pollmann */ public class Base64Test extends org.junit.Assert { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Base64Test.class.getName()); static { org.apache.xml.security.Init.init(); } @org.junit.Test public void testA1() throws Exception { String textData = "Hallo"; String result0 = Base64.encode(textData.getBytes("UTF-8")); assertNotNull("Result of encoding result0", result0); byte resultBytes[] = Base64.decode(result0); String resultStr = new String(resultBytes, "UTF-8"); assertEquals("Result of decoding", 0, textData.compareTo(resultStr)); ByteArrayOutputStream os = new ByteArrayOutputStream(); Base64.decode(result0.getBytes(),os); resultStr = new String(os.toByteArray(), "UTF-8"); assertEquals("Result of decoding", 0, textData.compareTo(resultStr)); } @org.junit.Test public void testWrap1() throws java.io.UnsupportedEncodingException,Exception { String inputData = "The quick brown fox jumps over the lazy dog and some extr"; String expectedResult = "VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZyBhbmQgc29tZSBleHRy"; String result = Base64.encode(inputData.getBytes("UTF-8")); assertEquals("Result of encoding", result, expectedResult); String result2 = new String(Base64.decode(result), "UTF-8"); assertEquals("Result of encoding", result2, inputData); ByteArrayOutputStream os = new ByteArrayOutputStream(); Base64.decode(expectedResult.getBytes(),os); result2 = new String(os.toByteArray(), "UTF-8"); assertEquals("Result of encoding", result2, inputData); } @org.junit.Test public void testWrap2() throws java.io.UnsupportedEncodingException, Exception { String inputData = "The quick brown fox jumps over the lazy dog and some extra text that will cause a line wrap"; String expectedResult = null; if (XMLUtils.ignoreLineBreaks()) { expectedResult = "VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZyBhbmQgc29tZSBleHRyYSB0ZXh0IHRoYXQgd2lsbCBjYXVzZSBhIGxpbmUgd3JhcA=="; } else { expectedResult = "VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZyBhbmQgc29tZSBleHRy\nYSB0ZXh0IHRoYXQgd2lsbCBjYXVzZSBhIGxpbmUgd3JhcA=="; } String result = Base64.encode(inputData.getBytes("UTF-8")); assertEquals("Result of encoding", result, expectedResult); String result2 = new String(Base64.decode(result), "UTF-8"); assertEquals("Result of encoding", result2, inputData); ByteArrayOutputStream os = new ByteArrayOutputStream(); Base64.decode(expectedResult.getBytes(),os); result2 = new String(os.toByteArray(), "UTF-8"); assertEquals("Result of encoding", result2, inputData); } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/utils/OldApiTest.java0000644000175000017500000001513711551556206030517 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.utils; import java.security.PublicKey; import java.security.cert.X509Certificate; import javax.crypto.SecretKey; import javax.xml.parsers.DocumentBuilderFactory; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.keys.keyresolver.KeyResolver; import org.apache.xml.security.keys.keyresolver.KeyResolverException; import org.apache.xml.security.keys.keyresolver.KeyResolverSpi; import org.apache.xml.security.keys.storage.StorageResolver; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.utils.resolver.ResourceResolver; import org.apache.xml.security.utils.resolver.ResourceResolverException; import org.apache.xml.security.utils.resolver.ResourceResolverSpi; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; public class OldApiTest extends org.junit.Assert { public static class OldResourceResolverSpi extends ResourceResolverSpi { Attr uriCompare; String baseCompare; public boolean engineCanResolve(Attr uri, String BaseURI) { if (uri.getValue().indexOf("!!!test=") != 0) { return false; } uriCompare = uri; baseCompare = BaseURI; return true; } public XMLSignatureInput engineResolve( Attr uri, String BaseURI ) throws ResourceResolverException { assertEquals(uriCompare, uri); assertEquals(baseCompare,BaseURI); return null; } } static class PublicKeyMock implements PublicKey { private static final long serialVersionUID = 2072239246582775281L; public String getAlgorithm() { // TODO Auto-generated method stub return null; } public byte[] getEncoded() { // TODO Auto-generated method stub return null; } public String getFormat() { // TODO Auto-generated method stub return null; } } static public class OldKeyResolverSpi extends KeyResolverSpi { static int number = 0; PublicKey pk = null; public OldKeyResolverSpi() { number++; } public boolean engineCanResolve( Element element, String BaseURI, StorageResolver storage ) { if ("!!!testUri".equals(BaseURI)) { return true; } return false; } public PublicKey engineResolvePublicKey( Element element, String BaseURI, StorageResolver storage ) throws KeyResolverException { if (pk == null) { pk = new PublicKeyMock(); } return pk; } public X509Certificate engineResolveX509Certificate( Element element, String BaseURI, StorageResolver storage ) throws KeyResolverException { return null; }; public SecretKey engineResolveSecretKey( Element element, String BaseURI, StorageResolver storage ) throws KeyResolverException{ return null; } } static public class OldKeyResolverNoPublicConsSpi extends OldKeyResolverSpi { protected OldKeyResolverNoPublicConsSpi() { // } public OldKeyResolverNoPublicConsSpi(PublicKey pk) { this.pk = pk; } } @org.junit.Test public void testOldResourceResolverSpi() throws Exception { Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); Attr uri = doc.createAttribute("id"); uri.setNodeValue("!!!test=1"); ((Element)doc.createElement("test")).setAttributeNode(uri); Attr uri1 = doc.createAttribute("id"); uri1.setNodeValue("!!!test=2"); doc.createElement("test1").setAttributeNode(uri1); ResourceResolver.registerAtStart(OldResourceResolverSpi.class.getName()); ResourceResolver resolver = ResourceResolver.getInstance(uri, "test"); ResourceResolver resolver1 = ResourceResolver.getInstance(uri1, "test1"); ResourceResolver resolver2 = ResourceResolver.getInstance(uri1, "test2"); resolver2.resolve(uri1, "test2"); resolver.resolve(uri, "test"); resolver1.resolve(uri1, "test1"); } @org.junit.Test public void testOldKeyResolverSpi() throws Exception { KeyResolver.register(OldKeyResolverSpi.class.getName(), true); Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); Element el = ((Element)doc.createElement("test")); PublicKey pk = KeyResolver.getPublicKey(el, "!!!testUri", null); assertNotNull(pk); assertTrue(pk instanceof PublicKeyMock); assertEquals(2, OldKeyResolverSpi.number); PublicKey pk1 = KeyResolver.getPublicKey(el, "!!!testUri", null); assertNotSame(pk, pk1); assertEquals(3, OldKeyResolverSpi.number); } @org.junit.Test public void testOldKeyResolverSpiInKeyInfo() throws Exception { Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); Element el = (Element)doc.createElementNS("http://www.w3.org/2000/09/xmldsig#","KeyInfo"); el.appendChild((Element)doc.createElementNS("http://www.w3.org/2000/09/xmldsig#","KeyInfo")); KeyInfo ki = new KeyInfo(el,"!!!testUri"); PublicKey pk = new PublicKeyMock(); ki.registerInternalKeyResolver(new OldKeyResolverNoPublicConsSpi(pk)); assertNotNull(ki.getPublicKey()); } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/utils/resolver/0000755000175000017500000000000012273503732027474 5ustar tonytony././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/utils/resolver/ResolverDirectHTTPTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/utils/resolver/ResolverDirectH0000644000175000017500000001454012214631242032460 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.utils.resolver; import org.apache.xml.security.Init; import org.apache.xml.security.utils.XMLUtils; import org.apache.xml.security.utils.resolver.ResourceResolver; import org.apache.xml.security.utils.resolver.ResourceResolverException; import org.apache.xml.security.utils.resolver.implementations.ResolverDirectHTTP; import org.junit.Assert; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; public class ResolverDirectHTTPTest extends org.junit.Assert { //change these properties to match your environment private static final String url = "http://www.apache.org"; private static final String proxyHost = "127.0.0.1"; private static final String proxyPort = "3128"; private static final String proxyUsername = "proxyUser"; private static final String proxyPassword = "proxyPass"; private static final String serverUsername = "serverUser"; private static final String serverPassword = "serverPass"; @Before public void setUp() { org.apache.xml.security.Init.init(); } @Test public void testBug40783() throws Exception { Init.init(); Document doc = XMLUtils.createDocumentBuilder(false).newDocument(); Attr uri = doc.createAttribute("id"); uri.setNodeValue("urn:ddd:uuu"); ((Element) doc.createElement("test")).setAttributeNode(uri); try { ResourceResolver resolver = ResourceResolver.getInstance(uri, null); fail("No exception thrown, but resolver found: " + resolver); } catch (ResourceResolverException e) { // } } @Test @Ignore public void testProxyAuth() throws Exception { Document doc = XMLUtils.createDocumentBuilder(false).newDocument(); Attr uri = doc.createAttribute("URI"); uri.setNodeValue(url); ResolverDirectHTTP resolverDirectHTTP = new ResolverDirectHTTP(); resolverDirectHTTP.engineSetProperty("http.proxy.host",proxyHost); resolverDirectHTTP.engineSetProperty("http.proxy.port", proxyPort); resolverDirectHTTP.engineSetProperty("http.proxy.username", proxyUsername); resolverDirectHTTP.engineSetProperty("http.proxy.password", proxyPassword); resolverDirectHTTP.engineResolve(uri, url); } @Test @Ignore public void testProxyAuthWithWrongPassword() throws Exception { Document doc = XMLUtils.createDocumentBuilder(false).newDocument(); Attr uri = doc.createAttribute("URI"); uri.setNodeValue(url); ResolverDirectHTTP resolverDirectHTTP = new ResolverDirectHTTP(); resolverDirectHTTP.engineSetProperty("http.proxy.host",proxyHost); resolverDirectHTTP.engineSetProperty("http.proxy.port", proxyPort); resolverDirectHTTP.engineSetProperty("http.proxy.username", proxyUsername); resolverDirectHTTP.engineSetProperty("http.proxy.password", "wrongPassword"); try { resolverDirectHTTP.engineResolve(uri, url); Assert.fail("Expected ResourceResolverException"); } catch (ResourceResolverException e) { Assert.assertEquals("Server returned HTTP response code: 407 for URL: " + url, e.getMessage()); } } @Test @Ignore public void testServerAuth() throws Exception { Document doc = XMLUtils.createDocumentBuilder(false).newDocument(); Attr uri = doc.createAttribute("URI"); uri.setNodeValue(url); ResolverDirectHTTP resolverDirectHTTP = new ResolverDirectHTTP(); resolverDirectHTTP.engineSetProperty("http.basic.username", serverUsername); resolverDirectHTTP.engineSetProperty("http.basic.password", serverPassword); resolverDirectHTTP.engineResolve(uri, url); } @Test @Ignore public void testServerAuthWithWrongPassword() throws Exception { Document doc = XMLUtils.createDocumentBuilder(false).newDocument(); Attr uri = doc.createAttribute("URI"); uri.setNodeValue(url); ResolverDirectHTTP resolverDirectHTTP = new ResolverDirectHTTP(); resolverDirectHTTP.engineSetProperty("http.basic.username", serverUsername); resolverDirectHTTP.engineSetProperty("http.basic.password", "wrongPassword"); try { resolverDirectHTTP.engineResolve(uri, url); Assert.fail("Expected ResourceResolverException"); } catch (ResourceResolverException e) { Assert.assertEquals("Server returned HTTP response code: 401 for URL: " + url, e.getMessage()); } } @Test @Ignore public void testProxyAndServerAuth() throws Exception { Document doc = XMLUtils.createDocumentBuilder(false).newDocument(); Attr uri = doc.createAttribute("URI"); uri.setNodeValue(url); ResolverDirectHTTP resolverDirectHTTP = new ResolverDirectHTTP(); resolverDirectHTTP.engineSetProperty("http.proxy.host",proxyHost); resolverDirectHTTP.engineSetProperty("http.proxy.port", proxyPort); resolverDirectHTTP.engineSetProperty("http.proxy.username", proxyUsername); resolverDirectHTTP.engineSetProperty("http.proxy.password", proxyPassword); resolverDirectHTTP.engineSetProperty("http.basic.username", serverUsername); resolverDirectHTTP.engineSetProperty("http.basic.password", serverPassword); resolverDirectHTTP.engineResolve(uri, url); } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/utils/resolver/OfflineResolver.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/utils/resolver/OfflineResolver0000644000175000017500000001463711623442440032532 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.utils.resolver; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.net.URISyntaxException; import java.util.HashMap; import java.util.Map; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.utils.resolver.ResourceResolverException; import org.apache.xml.security.utils.resolver.ResourceResolverSpi; import org.w3c.dom.Attr; /** * This class helps us home users to resolve http URIs without a network * connection. *
* The OfflineResolver is only needed for Unit testing. This is not needed for * a production environment. It's a very simple cache/proxy to HTTP space * so that I can do unit testing with http:// URIs even if I'm not connected * to the internet. * */ public class OfflineResolver extends ResourceResolverSpi { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(OfflineResolver.class.getName()); /** Field _uriMap */ static Map _uriMap = null; /** Field _mimeMap */ static Map _mimeMap = null; static { org.apache.xml.security.Init.init(); _uriMap = new HashMap(); _mimeMap = new HashMap(); String basedir = System.getProperty("basedir") == null ? "./": System.getProperty("basedir") + "/"; OfflineResolver.register( "http://www.w3.org/TR/xml-stylesheet", basedir + "src/test/resources/org/w3c/www/TR/xml-stylesheet.html", "text/html" ); OfflineResolver.register( "http://www.w3.org/TR/2000/REC-xml-20001006", basedir + "src/test/resources/org/w3c/www/TR/2000/REC-xml-20001006", "text/xml" ); OfflineResolver.register( "http://www.nue.et-inf.uni-siegen.de/index.html", basedir + "src/test/resources/org/apache/xml/security/temp/nuehomepage", "text/html" ); OfflineResolver.register( "http://www.nue.et-inf.uni-siegen.de/~geuer-pollmann/id2.xml", basedir + "src/test/resources/org/apache/xml/security/temp/id2.xml", "text/xml" ); OfflineResolver.register( "http://xmldsig.pothole.com/xml-stylesheet.txt", basedir + "src/test/resources/com/pothole/xmldsig/xml-stylesheet.txt", "text/xml" ); OfflineResolver.register( "http://www.w3.org/Signature/2002/04/xml-stylesheet.b64", basedir + "src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/xml-stylesheet.b64", "text/plain" ); } /** * Method engineResolve * * @param uri * @param BaseURI * * @throws ResourceResolverException */ public XMLSignatureInput engineResolve(Attr uri, String BaseURI) throws ResourceResolverException { try { String URI = uri.getNodeValue(); if (OfflineResolver._uriMap.containsKey(URI)) { String newURI = (String) OfflineResolver._uriMap.get(URI); log.debug("Mapped " + URI + " to " + newURI); InputStream is = new FileInputStream(newURI); log.debug("Available bytes = " + is.available()); XMLSignatureInput result = new XMLSignatureInput(is); // XMLSignatureInput result = new XMLSignatureInput(inputStream); result.setSourceURI(URI); result.setMIMEType((String) OfflineResolver._mimeMap.get(URI)); return result; } else { Object exArgs[] = {"The URI " + URI + " is not configured for offline work" }; throw new ResourceResolverException( "generic.EmptyMessage", exArgs, uri, BaseURI ); } } catch (IOException ex) { throw new ResourceResolverException("generic.EmptyMessage", ex, uri, BaseURI); } } /** * We resolve http URIs without fragment... * * @param uri * @param BaseURI */ public boolean engineCanResolve(Attr uri, String BaseURI) { String uriNodeValue = uri.getNodeValue(); if (uriNodeValue.equals("") || uriNodeValue.startsWith("#")) { return false; } URI uriNew = null; try { uriNew = getNewURI(uri.getNodeValue(), BaseURI); if (uriNew.getScheme().equals("http")) { log.debug("I state that I can resolve " + uriNew.toString()); return true; } } catch (URISyntaxException ex) { // } return false; } /** * Method register * * @param URI * @param filename * @param MIME */ private static void register(String URI, String filename, String MIME) { OfflineResolver._uriMap.put(URI, filename); OfflineResolver._mimeMap.put(URI, MIME); } private static URI getNewURI(String uri, String baseURI) throws URISyntaxException { URI newUri = null; if (baseURI == null || "".equals(baseURI)) { newUri = new URI(uri); } else { newUri = new URI(baseURI).resolve(uri); } // if the URI contains a fragment, ignore it if (newUri.getFragment() != null) { URI uriNewNoFrag = new URI(newUri.getScheme(), newUri.getSchemeSpecificPart(), null); return uriNewNoFrag; } return newUri; } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/utils/resolver/ResourceResolverTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/utils/resolver/ResourceResolve0000644000175000017500000000630212214631242032540 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.utils.resolver; import java.io.File; import org.apache.xml.security.utils.XMLUtils; import org.apache.xml.security.utils.resolver.ResourceResolver; import org.w3c.dom.Attr; import org.w3c.dom.Document; /** * Unit test for {@link org.apache.xml.security.utils.resolver.ResourceResolver} * * @author Sean Mullan */ public class ResourceResolverTest extends org.junit.Assert { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog (ResourceResolverTest.class.getName()); static { org.apache.xml.security.Init.init(); } /** * Tests registering a custom resolver implementation. */ @org.junit.Test public void testCustomResolver() throws Exception { String className = "org.apache.xml.security.test.utils.resolver.OfflineResolver"; ResourceResolver.registerAtStart(className); Document doc = XMLUtils.createDocumentBuilder(false).newDocument(); Attr uriAttr = doc.createAttribute("URI"); uriAttr.setValue("http://www.apache.org"); ResourceResolver res = ResourceResolver.getInstance(uriAttr, "http://www.apache.org"); try { uriAttr.setValue("http://xmldsig.pothole.com/xml-stylesheet.txt"); res.resolve(uriAttr, null); } catch (Exception e) { e.printStackTrace(); fail(uriAttr.getValue() + " should be resolvable by the OfflineResolver"); } try { uriAttr.setValue("http://www.apache.org"); res.resolve(uriAttr, null); fail(uriAttr.getValue() + " should not be resolvable by the OfflineResolver"); } catch (Exception e) { // } } @org.junit.Test public void testLocalFileWithEmptyBaseURI() throws Exception { Document doc = XMLUtils.createDocumentBuilder(false).newDocument(); Attr uriAttr = doc.createAttribute("URI"); String basedir = System.getProperty("basedir"); String file = new File(basedir, "build.xml").toURI().toString(); uriAttr.setValue(file); ResourceResolver res = ResourceResolver.getInstance(uriAttr, file); try { res.resolve(uriAttr, ""); } catch (Exception e) { fail(e.getMessage()); } } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/transforms/0000755000175000017500000000000012273503732026671 5ustar tonytony././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/transforms/SampleTransform.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/transforms/SampleTransform.jav0000644000175000017500000000364311551556206032520 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.transforms; import java.io.IOException; import javax.xml.parsers.ParserConfigurationException; import org.xml.sax.SAXException; import org.apache.xml.security.c14n.*; import org.apache.xml.security.exceptions.*; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.transforms.*; public class SampleTransform extends TransformSpi { public static final String uri = "http://org.apache.xml.security.test.transforms.SampleTransform"; public SampleTransform() throws Exception { try { Transform.register (uri, "org.apache.xml.security.test.transforms.SampleTransform"); } catch (AlgorithmAlreadyRegisteredException e) { } } protected String engineGetURI() { return uri; } protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input) throws IOException, CanonicalizationException, InvalidCanonicalizerException, TransformationException, ParserConfigurationException, SAXException { throw new UnsupportedOperationException(); } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/transforms/implementations/0000755000175000017500000000000012273503732032101 5ustar tonytony././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/transforms/implementations/TransformXSLTTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/transforms/implementations/Tra0000644000175000017500000000721012214631242032543 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.transforms.implementations; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import javax.xml.parsers.ParserConfigurationException; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.xml.sax.SAXException; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.test.DSNamespaceContext; import org.apache.xml.security.transforms.Transform; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.utils.XMLUtils; public class TransformXSLTTest extends org.junit.Assert { private static final String BASEDIR = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); private static final String SEP = System.getProperty("file.separator"); private static final String SOURCE_PATH = "src/test/resources/com/phaos/phaos-xmldsig-three/"; private static final String SIGNATURE_FILE = "signature-rsa-detached-xslt-transform.xml"; private static final String STYLESHEET_FILE = "document-stylesheet.xml"; /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(TransformXSLTTest.class.getName()); static { org.apache.xml.security.Init.init(); } /** * Make sure Transform.performTransform does not throw NullPointerException. * See bug 41927 for more info. */ @org.junit.Test public void test1() throws Exception { File file1 = null; File file2 = null; if (BASEDIR != null && !"".equals(BASEDIR)) { file1 = new File(BASEDIR + SEP + SOURCE_PATH, SIGNATURE_FILE); file2 = new File(BASEDIR + SEP + SOURCE_PATH, STYLESHEET_FILE); } else { file1 = new File(SOURCE_PATH, SIGNATURE_FILE); file1 = new File(SOURCE_PATH, STYLESHEET_FILE); } Document doc1 = getDocument(file1); Document doc2 = getDocument(file2); XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); xpath.setNamespaceContext(new DSNamespaceContext()); String expression = "//ds:Transform[1]"; Element transformEl = (Element) xpath.evaluate(expression, doc1, XPathConstants.NODE); Transform transform = new Transform(doc1, Transforms.TRANSFORM_XSLT, transformEl.getChildNodes()); transform.performTransform(new XMLSignatureInput(doc2)); } private static Document getDocument(File file) throws ParserConfigurationException, SAXException, IOException { return XMLUtils.createDocumentBuilder(false).parse(new FileInputStream(file)); } } ././@LongLink0000000000000000000000000000020000000000000011555 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/transforms/implementations/TransformBase64DecodeTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/transforms/implementations/Tra0000644000175000017500000001306312214631242032546 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.transforms.implementations; import java.io.ByteArrayInputStream; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.ParserConfigurationException; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.test.DSNamespaceContext; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.transforms.implementations.TransformBase64Decode; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Node; /** * Unit test for {@link org.apache.xml.security.transforms.implementations.TransformBase64Decode} * * @author Christian Geuer-Pollmann */ public class TransformBase64DecodeTest extends org.junit.Assert { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(TransformBase64DecodeTest.class.getName()); static { org.apache.xml.security.Init.init(); } @org.junit.Test public void test1() throws Exception { // base64 encoded String s1 = "VGhlIFVSSSBvZiB0aGUgdHJhbnNmb3JtIGlzIGh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1s\n" + "ZHNpZyNiYXNlNjQ="; Document doc = TransformBase64DecodeTest.createDocument(); Transforms t = new Transforms(doc); doc.appendChild(t.getElement()); t.addTransform(TransformBase64Decode.implementedTransformURI); XMLSignatureInput in = new XMLSignatureInput(new ByteArrayInputStream(s1.getBytes())); XMLSignatureInput out = t.performTransforms(in); String result = new String(out.getBytes()); assertTrue( result.equals("The URI of the transform is http://www.w3.org/2000/09/xmldsig#base64") ); } @org.junit.Test public void test2() throws Exception { // base64 encoded twice String s2 = "VkdobElGVlNTU0J2WmlCMGFHVWdkSEpoYm5ObWIzSnRJR2x6SUdoMGRIQTZMeTkzZDNjdWR6TXVi\n" + "M0puTHpJd01EQXZNRGt2ZUcxcwpaSE5wWnlOaVlYTmxOalE9"; Document doc = TransformBase64DecodeTest.createDocument(); Transforms t = new Transforms(doc); doc.appendChild(t.getElement()); t.addTransform(TransformBase64Decode.implementedTransformURI); XMLSignatureInput in = new XMLSignatureInput(new ByteArrayInputStream(s2.getBytes())); XMLSignatureInput out = t.performTransforms(t.performTransforms(in)); String result = new String(out.getBytes()); assertTrue( result.equals("The URI of the transform is http://www.w3.org/2000/09/xmldsig#base64") ); } @org.junit.Test public void test3() throws Exception { //J- String input = "" + "\n" + "\n" + "VGhlIFVSSSBvZiB0aGU gdHJhbnNmb 3JtIGlzIGh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1s\n" + "ZHNpZyNiYXNlNjQ=\n" + "\n" + "\n" ; //J+ DocumentBuilder db = XMLUtils.createDocumentBuilder(false); db.setErrorHandler(new org.apache.xml.security.utils.IgnoreAllErrorHandler()); Document doc = db.parse(new ByteArrayInputStream(input.getBytes())); //XMLUtils.circumventBug2650(doc); XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); xpath.setNamespaceContext(new DSNamespaceContext()); String expression = "//ds:Base64"; Node base64Node = (Node) xpath.evaluate(expression, doc, XPathConstants.NODE); XMLSignatureInput xmlinput = new XMLSignatureInput(base64Node); Document doc2 = TransformBase64DecodeTest.createDocument(); Transforms t = new Transforms(doc2); doc2.appendChild(t.getElement()); t.addTransform(Transforms.TRANSFORM_BASE64_DECODE); XMLSignatureInput out = t.performTransforms(xmlinput); String result = new String(out.getBytes()); assertTrue( "\"" + result + "\"", result.equals("The URI of the transform is http://www.w3.org/2000/09/xmldsig#base64") ); } private static Document createDocument() throws ParserConfigurationException { DocumentBuilder db = XMLUtils.createDocumentBuilder(false); Document doc = db.newDocument(); if (doc == null) { throw new RuntimeException("Could not create a Document"); } else { log.debug("I could create the Document"); } return doc; } } ././@LongLink0000000000000000000000000000017700000000000011572 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/transforms/implementations/Xpath2TransformationTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/transforms/implementations/Xpa0000644000175000017500000002165512214631242032556 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.transforms.implementations; import java.io.ByteArrayInputStream; import org.apache.xml.security.Init; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; public class Xpath2TransformationTest extends org.junit.Assert { static { Init.init(); } @org.junit.Test public void testXpath2Transform() throws Exception { String sig="\r\n" + "\r\n" + " 2.0\r\n" + " \r\n" + " \r\n" + " Record\r\n" + " 2004-12-13T14:27:35\r\n" + " \r\n" + " \r\n" + " \r\n" + " \r\n" + " \r\n" + " \r\n" + " 2003-07-20\r\n" + " 20\r\n" + " PDF\r\n" + " 222222\r\n" + " \r\n" + " \r\n" + " \r\n" + " \r\n" + " AAA\r\n" + " \r\n" + " \r\n" + " \r\n" + " \r\n" + " \r\n" + "2006-08-09T17:21:35Hess Yvan (first signature)\r\n" + "\r\n" + "\r\n" + "\r\n" + "\r\n" + "\r\n" + "\r\n" + "/edoc:EDOC/edoc:Object\r\n" + "\r\n" + "\r\n" + "\r\n" + "YMXHTYArDBcWDG99epurfdSEAWM=\r\n" + "\r\n" + "\r\n" + "\r\n" + "Un2HBIOcwGe36k8eDEJISKP8/EmCp813JlmV0qqxIPVgdMsIJXR5Wky6uqwP+E3wAXj4NykW76GV\r\n" + "1eSD9dTKw/M/bFMbId0nBp0ZFaFE5DKU/My4956qr2oyJqiFRKOokCxds0jMQvGcKeWVC9oAROxR\r\n" + "byZQbrtjGw9YS+D5afY=\r\n" + "\r\n" + "\r\n" + "\r\n" + "\r\n" + "MIIDADCCAmmgAwIBAgIGAQpEtx7tMA0GCSqGSIb3DQEBBQUAMIGXMRQwEgYDVQQGEwtTd2l0emVy\r\n" + "bGFuZDERMA8GA1UECBMIRnJpYm91cmcxETAPBgNVBAcTCEdpdmlzaWV6MRUwEwYDVQQLEwxIeXBl\r\n" + "cnN1aXRlIDUxGTAXBgNVBAoTEEluZm9ybWF0aXF1ZS1NVEYxJzAlBgNVBAMTHklNVEYgUm9vdENl\r\n" + "cnRpZmljYXRlIEF1dGhvcml0eTAeFw0wNjAzMjgyMjAwMDBaFw0xNjAzMTcyMzAwMDBaMIGMMRQw\r\n" + "EgYDVQQGEwtTd2l0emVybGFuZDERMA8GA1UECBMIRnJpYm91cmcxETAPBgNVBAcTCEdpdmlzaWV6\r\n" + "MRUwEwYDVQQLEwxIeXBlcnN1aXRlIDUxGTAXBgNVBAoTEEluZm9ybWF0aXF1ZS1NVEYxHDAaBgNV\r\n" + "BAMTE0lNVEYgRW5kQ2VydGlmaWNhdGUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOxpALzU\r\n" + "r8TjtFB7ghScWXdaDuHHRM7bPOoyuDSCxCznCBQitrwT/Un/vkZjDxSTG1bLWObqUMf1Yf6ul30n\r\n" + "nU9NsHO2fr7+YwtGnCV5vZ+qzWSQBY7qS+Gg8Ft9z0PluNRe84ukcQt7mdqSYet2qKbYWLP8tyFc\r\n" + "XCYs0JL5E6aTAgMBAAGjYDBeMB8GA1UdIwQYMBaAFIeIxHkuiPSRw5OArsqR7wZYgVPlMB0GA1Ud\r\n" + "DgQWBBRrfNhYheJHag+VBqDPWEOQyt3rqDAMBgNVHRMBAf8EAjAAMA4GA1UdDwEB/wQEAwIFoDAN\r\n" + "BgkqhkiG9w0BAQUFAAOBgQB4OVKzObDkpadteusbvcEin2GdK3B2qz/HwqH07AEt/pQbJ/oQOsYL\r\n" + "qVyDFt3umJ5uHon15nkps3HRE4MoYNfVbtz1G+0nMcAbxVYJDIfC4YBJRUAm/aA0twfkiH6gFmLi\r\n" + "V8o5YRtkjXvZQKUtJ/Ps/m0DAC4A935jTHDd6F4FCw==\r\n" + "\r\n" + "\r\n" + "\r\n" + ""; String correctC14n="\n" + " \n" + " Record\n" + " 2004-12-13T14:27:35\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " 2003-07-20\n" + " 20\n" + " PDF\n" + " 222222\n" + " \n" + " \n" + " \n" + " \n" + " AAA\n" + " \n" + " \n" + " \n" + " \n" + " "; ByteArrayInputStream is = new ByteArrayInputStream(sig.getBytes()); javax.xml.parsers.DocumentBuilder db = XMLUtils.createDocumentBuilder(false); org.w3c.dom.Document doc = db.parse(is); Element sigElement = (Element) doc.getElementsByTagNameNS( Constants.SignatureSpecNS, Constants._TAG_SIGNATURE).item(0); XMLSignature sign = new XMLSignature(sigElement, ""); boolean verify = sign.checkSignatureValue(sign.getKeyInfo().getPublicKey()); if (!verify) { for (int i = 0; i < sign.getSignedInfo().getLength(); i++) { boolean refVerify = sign.getSignedInfo().getVerificationResult(i); if (!refVerify) { byte[] contentBytes = sign.getSignedInfo().item(i).getContentsAfterTransformation().getBytes(); assertEquals( correctC14n, new String(contentBytes) ); } } } } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/CreateExclC14nInteropValues.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/CreateExclC14nInteropValues.ja0000644000175000017500000004222312214631242032171 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileOutputStream; import javax.xml.parsers.DocumentBuilder; import org.apache.xml.security.signature.ObjectContainer; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.transforms.params.InclusiveNamespaces; import org.apache.xml.security.transforms.params.XPathContainer; import org.apache.xml.security.utils.JavaUtils; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; /** * Class CreateExclC14nInteropValues */ public class CreateExclC14nInteropValues { /** * Method main * * @param unused * @throws Exception */ public static void main(String unused[]) throws Exception { org.apache.xml.security.Init.init(); DocumentBuilder db = XMLUtils.createDocumentBuilder(false); Document doc = db.newDocument(); String directory = "data/org/apache/xml/security/c14n/outExcl/"; File signatureFile = new File(directory + "apacheSignature.xml"); XMLSignature xmlSignature = new XMLSignature(doc, signatureFile.toURI().toURL().toString(), XMLSignature.ALGO_ID_MAC_HMAC_SHA1); doc.appendChild(xmlSignature.getElement()); { // ref 0 Transforms tf = new Transforms(doc); { XPathContainer xc = new XPathContainer(doc); xc.setXPath( "self::Parent or (parent::Parent and not(self::Child)) or self::GrandChild or parent::GrandChild"); tf.addTransform(Transforms.TRANSFORM_XPATH, xc.getElement()); } xmlSignature.addDocument("iaikTests.example1.xml", tf); } { // ref 1 Transforms tf = new Transforms(doc); { XPathContainer xc = new XPathContainer(doc); xc.setXPath( "self::Parent or (parent::Parent and not(self::Child)) or self::GrandChild or parent::GrandChild"); tf.addTransform(Transforms.TRANSFORM_XPATH, xc.getElement()); } tf.addTransform(Transforms.TRANSFORM_C14N_EXCL_OMIT_COMMENTS); xmlSignature.addDocument("iaikTests.example1.xml", tf); } { // ref 2 Transforms tf = new Transforms(doc); { XPathContainer xc = new XPathContainer(doc); xc.setXPathNamespaceContext("xmlns:default", "http://example.org"); xc.setXPath( "self::Parent or (parent::Parent and not(self::default:Child)) or self::GrandChild or parent::GrandChild"); tf.addTransform(Transforms.TRANSFORM_XPATH, xc.getElement()); } xmlSignature.addDocument("iaikTests.example2.xml", tf); } { // ref 3 Transforms tf = new Transforms(doc); { XPathContainer xc = new XPathContainer(doc); xc.setXPathNamespaceContext("xmlns:default", "http://example.org"); xc.setXPath( "self::Parent or (parent::Parent and not(self::default:Child)) or self::GrandChild or parent::GrandChild"); tf.addTransform(Transforms.TRANSFORM_XPATH, xc.getElement()); } tf.addTransform(Transforms.TRANSFORM_C14N_EXCL_OMIT_COMMENTS); xmlSignature.addDocument("iaikTests.example2.xml", tf); } { // ref 4 Transforms tf = new Transforms(doc); { XPathContainer xc = new XPathContainer(doc); xc.setXPathNamespaceContext("xmlns:default", "http://example.org/default"); xc.setXPathNamespaceContext("xmlns:ns1", "http://example.org/ns1"); xc.setXPath( "self::default:Parent or (parent::default:Parent and not(self::default:Child)) or self::ns1:GrandChild or parent::ns1:GrandChild or self::default:GrandChild or parent::default:GrandChild"); tf.addTransform(Transforms.TRANSFORM_XPATH, xc.getElement()); } xmlSignature.addDocument("iaikTests.example3.xml", tf); } { // ref 5 Transforms tf = new Transforms(doc); { XPathContainer xc = new XPathContainer(doc); xc.setXPathNamespaceContext("xmlns:default", "http://example.org/default"); xc.setXPathNamespaceContext("xmlns:ns1", "http://example.org/ns1"); xc.setXPath( "self::default:Parent or (parent::default:Parent and not(self::default:Child)) or self::ns1:GrandChild or parent::ns1:GrandChild or self::default:GrandChild or parent::default:GrandChild"); tf.addTransform(Transforms.TRANSFORM_XPATH, xc.getElement()); } tf.addTransform(Transforms.TRANSFORM_C14N_EXCL_OMIT_COMMENTS); xmlSignature.addDocument("iaikTests.example3.xml", tf); } { // ref 6 Transforms tf = new Transforms(doc); { XPathContainer xc = new XPathContainer(doc); xc.setXPathNamespaceContext("xmlns:ns1", "http://example.org/ns1"); xc.setXPath( "self::Parent or (parent::Parent and not(self::Child)) or self::ns1:GrandChild or parent::ns1:GrandChild"); tf.addTransform(Transforms.TRANSFORM_XPATH, xc.getElement()); } xmlSignature.addDocument("iaikTests.example4.xml", tf); } { // ref 7 Transforms tf = new Transforms(doc); { XPathContainer xc = new XPathContainer(doc); xc.setXPathNamespaceContext("xmlns:ns1", "http://example.org/ns1"); xc.setXPath( "self::Parent or (parent::Parent and not(self::Child)) or self::ns1:GrandChild or parent::ns1:GrandChild"); tf.addTransform(Transforms.TRANSFORM_XPATH, xc.getElement()); } { InclusiveNamespaces incNS = new InclusiveNamespaces(doc, "ns2"); tf.addTransform(Transforms.TRANSFORM_C14N_EXCL_OMIT_COMMENTS, incNS.getElement()); } xmlSignature.addDocument("iaikTests.example4.xml", tf); } { // ref 8 ObjectContainer obj = new ObjectContainer(doc); String id = "object1"; obj.setId(id); String xmlStr = "" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + ""; Document importDoc = db.parse(new ByteArrayInputStream(xmlStr.getBytes())); obj.getElement().appendChild(doc.createTextNode("\n")); obj.getElement() .appendChild(doc.importNode(importDoc.getDocumentElement(), true)); obj.getElement().appendChild(doc.createTextNode("\n")); xmlSignature.appendObject(obj); // ref apache_8 Transforms tf = new Transforms(doc); { XPathContainer xc = new XPathContainer(doc); xc.setXPath("self::node()[local-name()='included']"); tf.addTransform(Transforms.TRANSFORM_XPATH, xc.getElement()); } xmlSignature.addDocument("#" + id, tf); } { // ref 9 ObjectContainer obj = new ObjectContainer(doc); String id = "object2"; obj.setId(id); String xmlStr = "" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + ""; Document importDoc = db.parse(new ByteArrayInputStream(xmlStr.getBytes())); obj.getElement().appendChild(doc.createTextNode("\n")); obj.getElement() .appendChild(doc.importNode(importDoc.getDocumentElement(), true)); obj.getElement().appendChild(doc.createTextNode("\n")); xmlSignature.appendObject(obj); // ref apache_8 Transforms tf = new Transforms(doc); { XPathContainer xc = new XPathContainer(doc); xc.setXPath("self::node()[local-name()='included']"); tf.addTransform(Transforms.TRANSFORM_XPATH, xc.getElement()); } xmlSignature.addDocument("#" + id, tf); } { // ref 10 ObjectContainer obj = new ObjectContainer(doc); String id = "object3"; obj.setId(id); String xmlStr = "" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + ""; Document importDoc = db.parse(new ByteArrayInputStream(xmlStr.getBytes())); obj.getElement().appendChild(doc.createTextNode("\n")); obj.getElement() .appendChild(doc.importNode(importDoc.getDocumentElement(), true)); obj.getElement().appendChild(doc.createTextNode("\n")); xmlSignature.appendObject(obj); // ref apache_8 Transforms tf = new Transforms(doc); { XPathContainer xc = new XPathContainer(doc); xc.setXPath("self::node()[local-name()='included']"); tf.addTransform(Transforms.TRANSFORM_XPATH, xc.getElement()); } xmlSignature.addDocument("#" + id, tf); } { // ref 11 ObjectContainer obj = new ObjectContainer(doc); String id = "object4"; obj.setId(id); String xmlStr = "" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + ""; Document importDoc = db.parse(new ByteArrayInputStream(xmlStr.getBytes())); obj.getElement().appendChild(doc.createTextNode("\n")); obj.getElement() .appendChild(doc.importNode(importDoc.getDocumentElement(), true)); obj.getElement().appendChild(doc.createTextNode("\n")); xmlSignature.appendObject(obj); Transforms tf = new Transforms(doc); { XPathContainer xc = new XPathContainer(doc); xc.setXPath("self::node()[local-name()='included']"); tf.addTransform(Transforms.TRANSFORM_XPATH, xc.getElement()); } xmlSignature.addDocument("#" + id, tf); } { // ref 12 ObjectContainer obj = new ObjectContainer(doc); String id = "object5"; obj.setId(id); String xmlStr = "" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + ""; Document importDoc = db.parse(new ByteArrayInputStream(xmlStr.getBytes())); obj.getElement().appendChild(doc.createTextNode("\n")); obj.getElement() .appendChild(doc.importNode(importDoc.getDocumentElement(), true)); obj.getElement().appendChild(doc.createTextNode("\n")); xmlSignature.appendObject(obj); Transforms tf = new Transforms(doc); { XPathContainer xc = new XPathContainer(doc); xc.setXPath("self::node()[local-name()='included']"); tf.addTransform(Transforms.TRANSFORM_XPATH, xc.getElement()); } xmlSignature.addDocument("#" + id, tf); } { // ref 13 ObjectContainer obj = new ObjectContainer(doc); String id = "object6"; obj.setId(id); String xmlStr = "" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + ""; Document importDoc = db.parse(new ByteArrayInputStream(xmlStr.getBytes())); obj.getElement().appendChild(doc.createTextNode("\n")); obj.getElement() .appendChild(doc.importNode(importDoc.getDocumentElement(), true)); obj.getElement().appendChild(doc.createTextNode("\n")); xmlSignature.appendObject(obj); Transforms tf = new Transforms(doc); { XPathContainer xc = new XPathContainer(doc); xc.setXPath("self::node()[local-name()='included']"); tf.addTransform(Transforms.TRANSFORM_XPATH, xc.getElement()); } xmlSignature.addDocument("#" + id, tf); } { // ref 13b String id = "object6"; Transforms tf = new Transforms(doc); { XPathContainer xc = new XPathContainer(doc); xc.setXPath("self::node()[local-name()='included']"); tf.addTransform(Transforms.TRANSFORM_XPATH, xc.getElement()); tf.addTransform(Transforms.TRANSFORM_C14N_OMIT_COMMENTS); } xmlSignature.addDocument("#" + id, tf); } { // ref 13c String id = "object6"; Transforms tf = new Transforms(doc); { XPathContainer xc = new XPathContainer(doc); xc.setXPath("self::node()[local-name()='included']"); tf.addTransform(Transforms.TRANSFORM_XPATH, xc.getElement()); tf.addTransform(Transforms.TRANSFORM_C14N_OMIT_COMMENTS); tf.addTransform(Transforms.TRANSFORM_C14N_OMIT_COMMENTS); } xmlSignature.addDocument("#" + id, tf); // xmlSignature.addDocument("#" + id, tf, org.apache.xml.security.algorithms.MessageDigestAlgorithm.ALGO_ID_DIGEST_SHA1, "ref13c", null); } String secretKey = "secret"; xmlSignature.getKeyInfo().addKeyName("The UTF-8 octets of \"" + secretKey + "\" are used for signing (" + secretKey.length() + " octets)"); xmlSignature.sign(xmlSignature.createSecretKey(secretKey.getBytes())); FileOutputStream fos = new FileOutputStream(signatureFile); XMLUtils.outputDOM(doc, fos); fos.close(); int length = xmlSignature.getSignedInfo().getLength(); for (int i = 0; i < length; i++) { String fname = directory + "c14n-" + i + "-apache.xml"; System.out.println(fname); JavaUtils.writeBytesToFilename(fname, xmlSignature.getSignedInfo().getReferencedContentAfterTransformsItem(i).getBytes()); } XMLSignature s = new XMLSignature(doc.getDocumentElement(), signatureFile.toURI().toURL().toString()); boolean verify = s.checkSignatureValue(s.createSecretKey("secret".getBytes())); System.out.println("verify=" + verify); System.out.println(""); XMLUtils.outputDOMc14nWithComments(doc, System.out); } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/TestUtils.java0000644000175000017500000000300711551556206027300 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test; import org.apache.xml.security.utils.Constants; import org.w3c.dom.Document; import org.w3c.dom.Element; public class TestUtils { /** * Method createDSctx * * @param doc * @param prefix * @param namespace * @return the element. */ public static Element createDSctx(Document doc, String prefix, String namespace) { if ((prefix == null) || (prefix.trim().length() == 0)) { throw new IllegalArgumentException("You must supply a prefix"); } Element ctx = doc.createElementNS(null, "namespaceContext"); ctx.setAttributeNS(Constants.NamespaceSpecNS, "xmlns:" + prefix.trim(), namespace); return ctx; } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/dom/0000755000175000017500000000000012273503732025252 5ustar tonytonylibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/dom/keys/0000755000175000017500000000000012273503732026225 5ustar tonytony././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/dom/keys/DEREncodedKeyValueTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/dom/keys/DEREncodedKeyValueTes0000644000175000017500000001771112214631242032166 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.dom.keys; import java.io.FileInputStream; import java.lang.reflect.Constructor; import java.security.KeyFactory; import java.security.Provider; import java.security.PublicKey; import java.security.Security; import java.security.spec.X509EncodedKeySpec; import javax.xml.parsers.DocumentBuilder; import org.apache.xml.security.keys.content.DEREncodedKeyValue; import org.apache.xml.security.utils.Base64; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.JavaUtils; import org.apache.xml.security.utils.XMLUtils; import org.junit.Assert; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; public class DEREncodedKeyValueTest extends Assert { private static final String BASEDIR = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); private static final String SEP = System.getProperty("file.separator"); private DocumentBuilder documentBuilder; private PublicKey rsaKeyControl; private PublicKey dsaKeyControl; private PublicKey ecKeyControl; private final String idControl = "abc123"; public DEREncodedKeyValueTest() throws Exception { documentBuilder = XMLUtils.createDocumentBuilder(false); // // If the BouncyCastle provider is not installed, then try to load it // via reflection. // if (Security.getProvider("BC") == null) { Constructor cons = null; try { Class c = Class.forName("org.bouncycastle.jce.provider.BouncyCastleProvider"); cons = c.getConstructor(new Class[] {}); } catch (Exception e) { //ignore } if (cons != null) { Provider provider = (java.security.Provider)cons.newInstance(new Object[]{}); Security.insertProviderAt(provider, 1); ecKeyControl = loadPublicKey("ec.key", "EC"); } } rsaKeyControl = loadPublicKey("rsa.key", "RSA"); dsaKeyControl = loadPublicKey("dsa.key", "DSA"); } @org.junit.Test public void testSchema() throws Exception { DEREncodedKeyValue derEncodedKeyValue = new DEREncodedKeyValue(documentBuilder.newDocument(), rsaKeyControl); Element element = derEncodedKeyValue.getElement(); assertEquals("http://www.w3.org/2009/xmldsig11#", element.getNamespaceURI()); assertEquals("DEREncodedKeyValue", element.getLocalName()); } @org.junit.Test public void testRSAPublicKeyFromElement() throws Exception { Document doc = loadXML("DEREncodedKeyValue-RSA.xml"); NodeList nl = doc.getElementsByTagNameNS(Constants.SignatureSpec11NS, Constants._TAG_DERENCODEDKEYVALUE); Element element = (Element) nl.item(0); DEREncodedKeyValue derEncodedKeyValue = new DEREncodedKeyValue(element, ""); assertEquals(rsaKeyControl, derEncodedKeyValue.getPublicKey()); assertArrayEquals(rsaKeyControl.getEncoded(), derEncodedKeyValue.getBytesFromTextChild()); assertEquals(idControl, derEncodedKeyValue.getId()); } @org.junit.Test public void testDSAPublicKeyFromElement() throws Exception { Document doc = loadXML("DEREncodedKeyValue-DSA.xml"); NodeList nl = doc.getElementsByTagNameNS(Constants.SignatureSpec11NS, Constants._TAG_DERENCODEDKEYVALUE); Element element = (Element) nl.item(0); DEREncodedKeyValue derEncodedKeyValue = new DEREncodedKeyValue(element, ""); assertEquals(dsaKeyControl, derEncodedKeyValue.getPublicKey()); assertArrayEquals(dsaKeyControl.getEncoded(), derEncodedKeyValue.getBytesFromTextChild()); assertEquals(idControl, derEncodedKeyValue.getId()); } @org.junit.Test public void testECPublicKeyFromElement() throws Exception { if (ecKeyControl == null) { return; } Document doc = loadXML("DEREncodedKeyValue-EC.xml"); NodeList nl = doc.getElementsByTagNameNS(Constants.SignatureSpec11NS, Constants._TAG_DERENCODEDKEYVALUE); Element element = (Element) nl.item(0); DEREncodedKeyValue derEncodedKeyValue = new DEREncodedKeyValue(element, ""); assertEquals(ecKeyControl, derEncodedKeyValue.getPublicKey()); assertArrayEquals(ecKeyControl.getEncoded(), derEncodedKeyValue.getBytesFromTextChild()); assertEquals(idControl, derEncodedKeyValue.getId()); } @org.junit.Test public void testRSAPublicKeyFromKey() throws Exception { DEREncodedKeyValue derEncodedKeyValue = new DEREncodedKeyValue(documentBuilder.newDocument(), rsaKeyControl); assertEquals(rsaKeyControl, derEncodedKeyValue.getPublicKey()); assertArrayEquals(rsaKeyControl.getEncoded(), derEncodedKeyValue.getBytesFromTextChild()); } @org.junit.Test public void testDSAPublicKeyFromKey() throws Exception { DEREncodedKeyValue derEncodedKeyValue = new DEREncodedKeyValue(documentBuilder.newDocument(), dsaKeyControl); assertEquals(dsaKeyControl, derEncodedKeyValue.getPublicKey()); assertArrayEquals(dsaKeyControl.getEncoded(), derEncodedKeyValue.getBytesFromTextChild()); } @org.junit.Test public void testECPublicKeyFromKey() throws Exception { if (ecKeyControl == null) { return; } DEREncodedKeyValue derEncodedKeyValue = new DEREncodedKeyValue(documentBuilder.newDocument(), ecKeyControl); assertEquals(ecKeyControl, derEncodedKeyValue.getPublicKey()); assertArrayEquals(ecKeyControl.getEncoded(), derEncodedKeyValue.getBytesFromTextChild()); } @org.junit.Test public void testId() throws Exception { DEREncodedKeyValue derEncodedKeyValue = new DEREncodedKeyValue(documentBuilder.newDocument(), rsaKeyControl); assertEquals("", derEncodedKeyValue.getId()); assertNull(derEncodedKeyValue.getElement().getAttributeNodeNS(null, Constants._ATT_ID)); derEncodedKeyValue.setId(idControl); assertEquals(idControl, derEncodedKeyValue.getId()); assertTrue(derEncodedKeyValue.getElement().getAttributeNodeNS(null, Constants._ATT_ID).isId()); derEncodedKeyValue.setId(null); assertEquals("", derEncodedKeyValue.getId()); assertNull(derEncodedKeyValue.getElement().getAttributeNodeNS(null, Constants._ATT_ID)); } // Utility methods private String getControlFilePath(String fileName) { return BASEDIR + SEP + "src" + SEP + "test" + SEP + "resources" + SEP + "org" + SEP + "apache" + SEP + "xml" + SEP + "security" + SEP + "keys" + SEP + "content" + SEP + fileName; } private Document loadXML(String fileName) throws Exception { return documentBuilder.parse(new FileInputStream(getControlFilePath(fileName))); } private PublicKey loadPublicKey(String filePath, String algorithm) throws Exception { String fileData = new String(JavaUtils.getBytesFromFile(getControlFilePath(filePath))); byte[] keyBytes = Base64.decode(fileData); KeyFactory kf = KeyFactory.getInstance(algorithm); X509EncodedKeySpec keySpec = new X509EncodedKeySpec(keyBytes); return kf.generatePublic(keySpec); } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/dom/keys/KeyInfoReferenceTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/dom/keys/KeyInfoReferenceTest.0000644000175000017500000000776212214631242032256 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.dom.keys; import java.io.FileInputStream; import javax.xml.parsers.DocumentBuilder; import org.apache.xml.security.keys.content.KeyInfoReference; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.junit.Assert; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; public class KeyInfoReferenceTest extends Assert { private static final String BASEDIR = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); private static final String SEP = System.getProperty("file.separator"); private DocumentBuilder documentBuilder; private final String idControl = "abc123"; private final String uriControl = "http://www.example.org/keyinfo.xml"; public KeyInfoReferenceTest() throws Exception { documentBuilder = XMLUtils.createDocumentBuilder(false); } @org.junit.Test public void testSchema() throws Exception { KeyInfoReference keyInfoReference = new KeyInfoReference(documentBuilder.newDocument(), uriControl); Element element = keyInfoReference.getElement(); assertEquals("http://www.w3.org/2009/xmldsig11#", element.getNamespaceURI()); assertEquals("KeyInfoReference", element.getLocalName()); } @org.junit.Test public void testURIFromElement() throws Exception { Document doc = loadXML("KeyInfoReference.xml"); NodeList nl = doc.getElementsByTagNameNS(Constants.SignatureSpec11NS, Constants._TAG_KEYINFOREFERENCE); Element element = (Element) nl.item(0); KeyInfoReference keyInfoReference = new KeyInfoReference(element, ""); assertEquals(uriControl, keyInfoReference.getURI()); assertEquals(idControl, keyInfoReference.getId()); } @org.junit.Test public void testURIOnConstruction() throws Exception { KeyInfoReference keyInfoReference = new KeyInfoReference(documentBuilder.newDocument(), uriControl); assertEquals(uriControl, keyInfoReference.getURI()); } @org.junit.Test public void testId() throws Exception { KeyInfoReference keyInfoReference = new KeyInfoReference(documentBuilder.newDocument(), uriControl); assertEquals("", keyInfoReference.getId()); assertNull(keyInfoReference.getElement().getAttributeNodeNS(null, Constants._ATT_ID)); keyInfoReference.setId(idControl); assertEquals(idControl, keyInfoReference.getId()); assertTrue(keyInfoReference.getElement().getAttributeNodeNS(null, Constants._ATT_ID).isId()); keyInfoReference.setId(null); assertEquals("", keyInfoReference.getId()); assertNull(keyInfoReference.getElement().getAttributeNodeNS(null, Constants._ATT_ID)); } // Utility methods private String getControlFilePath(String fileName) { return BASEDIR + SEP + "src" + SEP + "test" + SEP + "resources" + SEP + "org" + SEP + "apache" + SEP + "xml" + SEP + "security" + SEP + "keys" + SEP + "content" + SEP + fileName; } private Document loadXML(String fileName) throws Exception { return documentBuilder.parse(new FileInputStream(getControlFilePath(fileName))); } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/dom/keys/keyresolver/0000755000175000017500000000000012273503732030577 5ustar tonytony././@LongLink0000000000000000000000000000017700000000000011572 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/dom/keys/keyresolver/DEREncodedKeyValueResolverTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/dom/keys/keyresolver/DEREncode0000644000175000017500000001131512214631242032244 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.dom.keys.keyresolver; import java.io.FileInputStream; import java.lang.reflect.Constructor; import java.security.KeyFactory; import java.security.Provider; import java.security.PublicKey; import java.security.Security; import java.security.spec.X509EncodedKeySpec; import javax.xml.parsers.DocumentBuilder; import org.apache.xml.security.Init; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.utils.Base64; import org.apache.xml.security.utils.JavaUtils; import org.apache.xml.security.utils.XMLUtils; import org.junit.Assert; import org.w3c.dom.Document; import org.w3c.dom.Element; public class DEREncodedKeyValueResolverTest extends Assert { private static final String BASEDIR = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); private static final String SEP = System.getProperty("file.separator"); private DocumentBuilder documentBuilder; private PublicKey rsaKeyControl; private PublicKey dsaKeyControl; private PublicKey ecKeyControl; public DEREncodedKeyValueResolverTest() throws Exception { documentBuilder = XMLUtils.createDocumentBuilder(false); // // If the BouncyCastle provider is not installed, then try to load it // via reflection. // if (Security.getProvider("BC") == null) { Constructor cons = null; try { Class c = Class.forName("org.bouncycastle.jce.provider.BouncyCastleProvider"); cons = c.getConstructor(new Class[] {}); } catch (Exception e) { //ignore } if (cons != null) { Provider provider = (java.security.Provider)cons.newInstance(new Object[]{}); Security.insertProviderAt(provider, 1); ecKeyControl = loadPublicKey("ec.key", "EC"); } } rsaKeyControl = loadPublicKey("rsa.key", "RSA"); dsaKeyControl = loadPublicKey("dsa.key", "DSA"); if (!Init.isInitialized()) { Init.init(); } } @org.junit.Test public void testRSAPublicKey() throws Exception { Document doc = loadXML("DEREncodedKeyValue-RSA.xml"); Element element = doc.getDocumentElement(); KeyInfo keyInfo = new KeyInfo(element, ""); assertEquals(rsaKeyControl, keyInfo.getPublicKey()); } @org.junit.Test public void testDSAPublicKey() throws Exception { Document doc = loadXML("DEREncodedKeyValue-DSA.xml"); Element element = doc.getDocumentElement(); KeyInfo keyInfo = new KeyInfo(element, ""); assertEquals(dsaKeyControl, keyInfo.getPublicKey()); } @org.junit.Test public void testECPublicKey() throws Exception { if (ecKeyControl == null) { return; } Document doc = loadXML("DEREncodedKeyValue-EC.xml"); Element element = doc.getDocumentElement(); KeyInfo keyInfo = new KeyInfo(element, ""); assertEquals(ecKeyControl, keyInfo.getPublicKey()); } // Utility methods private String getControlFilePath(String fileName) { return BASEDIR + SEP + "src" + SEP + "test" + SEP + "resources" + SEP + "org" + SEP + "apache" + SEP + "xml" + SEP + "security" + SEP + "keys" + SEP + "content" + SEP + fileName; } private Document loadXML(String fileName) throws Exception { return documentBuilder.parse(new FileInputStream(getControlFilePath(fileName))); } private PublicKey loadPublicKey(String filePath, String algorithm) throws Exception { String fileData = new String(JavaUtils.getBytesFromFile(getControlFilePath(filePath))); byte[] keyBytes = Base64.decode(fileData); KeyFactory kf = KeyFactory.getInstance(algorithm); X509EncodedKeySpec keySpec = new X509EncodedKeySpec(keyBytes); return kf.generatePublic(keySpec); } } ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/dom/keys/keyresolver/X509DigestResolverTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/dom/keys/keyresolver/X509Diges0000644000175000017500000000660312214631242032141 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.dom.keys.keyresolver; import java.io.FileInputStream; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import javax.xml.parsers.DocumentBuilder; import org.apache.xml.security.Init; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.keys.storage.StorageResolver; import org.apache.xml.security.keys.storage.implementations.SingleCertificateResolver; import org.apache.xml.security.utils.XMLUtils; import org.junit.Assert; import org.w3c.dom.Document; import org.w3c.dom.Element; public class X509DigestResolverTest extends Assert { private static final String BASEDIR = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); private static final String SEP = System.getProperty("file.separator"); private DocumentBuilder documentBuilder; private X509Certificate certControl; private StorageResolver storageResolver; public X509DigestResolverTest() throws Exception { documentBuilder = XMLUtils.createDocumentBuilder(false); certControl = loadCertificate("cert-X509Digest.crt"); storageResolver = new StorageResolver(new SingleCertificateResolver(certControl)); if (!Init.isInitialized()) { Init.init(); } } @org.junit.Test public void testDigest() throws Exception { Document doc = loadXML("X509Digest.xml"); Element element = doc.getDocumentElement(); KeyInfo keyInfo = new KeyInfo(element, ""); assertNull(keyInfo.getX509Certificate()); assertNull(keyInfo.getPublicKey()); keyInfo.addStorageResolver(storageResolver); assertEquals(certControl, keyInfo.getX509Certificate()); assertEquals(certControl.getPublicKey(), keyInfo.getPublicKey()); } // Utility methods private String getControlFilePath(String fileName) { return BASEDIR + SEP + "src" + SEP + "test" + SEP + "resources" + SEP + "org" + SEP + "apache" + SEP + "xml" + SEP + "security" + SEP + "keys" + SEP + "content" + SEP + "x509" + SEP + fileName; } private Document loadXML(String fileName) throws Exception { return documentBuilder.parse(new FileInputStream(getControlFilePath(fileName))); } private X509Certificate loadCertificate(String fileName) throws Exception { FileInputStream fis = new FileInputStream(getControlFilePath(fileName)); CertificateFactory certFactory = CertificateFactory.getInstance("X.509"); return (X509Certificate) certFactory.generateCertificate(fis); } } ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/dom/keys/keyresolver/KeyInfoReferenceResolverTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/dom/keys/keyresolver/KeyInfoRe0000644000175000017500000001450112214631242032347 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.dom.keys.keyresolver; import java.io.FileInputStream; import java.security.KeyFactory; import java.security.PublicKey; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import java.security.spec.X509EncodedKeySpec; import javax.xml.parsers.DocumentBuilder; import org.apache.xml.security.Init; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.utils.Base64; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.JavaUtils; import org.apache.xml.security.utils.XMLUtils; import org.junit.Assert; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; public class KeyInfoReferenceResolverTest extends Assert { private static final String BASEDIR = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); private static final String SEP = System.getProperty("file.separator"); private DocumentBuilder documentBuilder; public KeyInfoReferenceResolverTest() throws Exception { documentBuilder = XMLUtils.createDocumentBuilder(false); if (!Init.isInitialized()) { Init.init(); } } @org.junit.Test public void testRSAPublicKey() throws Exception { PublicKey rsaKeyControl = loadPublicKey("rsa-KeyInfoReference.key", "RSA"); Document doc = loadXML("KeyInfoReference-RSA.xml"); markKeyInfoIdAttrs(doc); Element referenceElement = doc.getElementById("theReference"); assertNotNull(referenceElement); KeyInfo keyInfo = new KeyInfo(referenceElement, ""); assertEquals(rsaKeyControl, keyInfo.getPublicKey()); } @org.junit.Test public void testX509Certificate() throws Exception { X509Certificate certControl = loadCertificate("cert-KeyInfoReference.crt"); Document doc = loadXML("KeyInfoReference-X509Certificate.xml"); markKeyInfoIdAttrs(doc); Element referenceElement = doc.getElementById("theReference"); assertNotNull(referenceElement); KeyInfo keyInfo = new KeyInfo(referenceElement, ""); assertEquals(certControl, keyInfo.getX509Certificate()); assertEquals(certControl.getPublicKey(), keyInfo.getPublicKey()); } @org.junit.Test public void testWrongReferentType() throws Exception { Document doc = loadXML("KeyInfoReference-WrongReferentType.xml"); markKeyInfoIdAttrs(doc); // Mark the ID-ness of the bogus element so can be resolved NodeList nl = doc.getElementsByTagNameNS("http://www.example.org/test", "KeyInfo"); for (int i = 0; i < nl.getLength(); i++) { Element keyInfoElement = (Element) nl.item(i); keyInfoElement.setIdAttributeNS(null, Constants._ATT_ID, true); } Element referenceElement = doc.getElementById("theReference"); assertNotNull(referenceElement); KeyInfo keyInfo = new KeyInfo(referenceElement, ""); assertNull(keyInfo.getPublicKey()); } @org.junit.Test public void testSameDocumentReferenceChain() throws Exception { Document doc = loadXML("KeyInfoReference-ReferenceChain.xml"); markKeyInfoIdAttrs(doc); Element referenceElement = doc.getElementById("theReference"); assertNotNull(referenceElement); KeyInfo keyInfo = new KeyInfo(referenceElement, ""); // Chains of references are not supported at this time assertNull(keyInfo.getPublicKey()); } @org.junit.Test public void testSameDocumentReferenceChainWithSecureValidation() throws Exception { Document doc = loadXML("KeyInfoReference-ReferenceChain.xml"); markKeyInfoIdAttrs(doc); Element referenceElement = doc.getElementById("theReference"); assertNotNull(referenceElement); KeyInfo keyInfo = new KeyInfo(referenceElement, ""); keyInfo.setSecureValidation(true); // Chains of references are not supported at this time assertNull(keyInfo.getPublicKey()); } // Utility methods private String getControlFilePath(String fileName) { return BASEDIR + SEP + "src" + SEP + "test" + SEP + "resources" + SEP + "org" + SEP + "apache" + SEP + "xml" + SEP + "security" + SEP + "keyresolver" + SEP + fileName; } private Document loadXML(String fileName) throws Exception { return documentBuilder.parse(new FileInputStream(getControlFilePath(fileName))); } private PublicKey loadPublicKey(String filePath, String algorithm) throws Exception { String fileData = new String(JavaUtils.getBytesFromFile(getControlFilePath(filePath))); byte[] keyBytes = Base64.decode(fileData); KeyFactory kf = KeyFactory.getInstance(algorithm); X509EncodedKeySpec keySpec = new X509EncodedKeySpec(keyBytes); return kf.generatePublic(keySpec); } private X509Certificate loadCertificate(String fileName) throws Exception { FileInputStream fis = new FileInputStream(getControlFilePath(fileName)); CertificateFactory certFactory = CertificateFactory.getInstance("X.509"); return (X509Certificate) certFactory.generateCertificate(fis); } private void markKeyInfoIdAttrs(Document doc) { NodeList nl = doc.getElementsByTagNameNS(Constants.SignatureSpecNS, Constants._TAG_KEYINFO); for (int i = 0; i < nl.getLength(); i++) { Element keyInfoElement = (Element) nl.item(i); keyInfoElement.setIdAttributeNS(null, Constants._ATT_ID, true); } } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/dom/keys/content/0000755000175000017500000000000012273503732027677 5ustar tonytonylibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/dom/keys/content/x509/0000755000175000017500000000000012273503732030404 5ustar tonytony././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/dom/keys/content/x509/XMLX509DigestTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/dom/keys/content/x509/XMLX509D0000644000175000017500000001143112214631242031452 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.dom.keys.content.x509; import java.io.FileInputStream; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import javax.xml.parsers.DocumentBuilder; import org.apache.xml.security.Init; import org.apache.xml.security.keys.content.x509.XMLX509Digest; import org.apache.xml.security.utils.Base64; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.junit.Assert; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; public class XMLX509DigestTest extends Assert { private static final String BASEDIR = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); private static final String SEP = System.getProperty("file.separator"); private DocumentBuilder documentBuilder; private X509Certificate certControl; private final String algorithmURIControl = "http://www.w3.org/2001/04/xmlenc#sha256"; private final String digestBase64Control = "jToLQ/K7aaLHy/aXLFnjEfCwSQd9z0MrBOH6Ru/aJyY="; private final byte[] digestControl; public XMLX509DigestTest() throws Exception { documentBuilder = XMLUtils.createDocumentBuilder(false); certControl = loadCertificate("cert-X509Digest.crt"); digestControl = Base64.decode(digestBase64Control); if (!Init.isInitialized()) { Init.init(); } } @org.junit.Test public void testSchema() throws Exception { XMLX509Digest x509Digest = new XMLX509Digest(documentBuilder.newDocument(), digestControl, algorithmURIControl); Element element = x509Digest.getElement(); assertEquals("http://www.w3.org/2009/xmldsig11#", element.getNamespaceURI()); assertEquals("X509Digest", element.getLocalName()); } @org.junit.Test public void testDigestFromElement() throws Exception { Document doc = loadXML("X509Digest.xml"); NodeList nl = doc.getElementsByTagNameNS(Constants.SignatureSpec11NS, Constants._TAG_X509DIGEST); Element element = (Element) nl.item(0); XMLX509Digest x509Digest = new XMLX509Digest(element, ""); assertEquals(algorithmURIControl, x509Digest.getAlgorithm()); assertArrayEquals(digestControl, x509Digest.getDigestBytes()); } @org.junit.Test public void testDigestOnConstructionWithCert() throws Exception { XMLX509Digest x509Digest = new XMLX509Digest(documentBuilder.newDocument(), certControl, algorithmURIControl); assertEquals(algorithmURIControl, x509Digest.getAlgorithm()); assertArrayEquals(digestControl, x509Digest.getDigestBytes()); } @org.junit.Test public void testDigestOnConstructionWithBytes() throws Exception { XMLX509Digest x509Digest = new XMLX509Digest(documentBuilder.newDocument(), digestControl, algorithmURIControl); assertEquals(algorithmURIControl, x509Digest.getAlgorithm()); assertArrayEquals(digestControl, x509Digest.getDigestBytes()); } @org.junit.Test public void testGetDigestBytesFromCert() throws Exception { assertArrayEquals(digestControl, XMLX509Digest.getDigestBytesFromCert(certControl, algorithmURIControl)); } // Utility methods private String getControlFilePath(String fileName) { return BASEDIR + SEP + "src" + SEP + "test" + SEP + "resources" + SEP + "org" + SEP + "apache" + SEP + "xml" + SEP + "security" + SEP + "keys" + SEP + "content" + SEP + "x509" + SEP + fileName; } private Document loadXML(String fileName) throws Exception { return documentBuilder.parse(new FileInputStream(getControlFilePath(fileName))); } private X509Certificate loadCertificate(String fileName) throws Exception { FileInputStream fis = new FileInputStream(getControlFilePath(fileName)); CertificateFactory certFactory = CertificateFactory.getInstance("X.509"); return (X509Certificate) certFactory.generateCertificate(fis); } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/signature/0000755000175000017500000000000012273503732026474 5ustar tonytonylibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/signature/NoKeyInfoTest.java0000644000175000017500000000454712214631242032043 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.signature; import java.io.File; import java.io.FileInputStream; import javax.xml.parsers.DocumentBuilder; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; import org.apache.xml.security.Init; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; public class NoKeyInfoTest extends org.junit.Assert { private static final String BASEDIR = System.getProperty("basedir"); private static final String SEP = System.getProperty("file.separator"); static { Init.init(); } private DocumentBuilder db; public NoKeyInfoTest() throws Exception { db = XMLUtils.createDocumentBuilder(false); } @org.junit.Test public void testNullKeyInfo() throws Exception { File f = null; String filename = "src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-hmac-sha1.xml"; if (BASEDIR != null && !"".equals(BASEDIR)) { f = new File(BASEDIR + SEP + filename); } else { f = new File(filename); } Document doc = db.parse(new FileInputStream(f)); NodeList nl = doc.getElementsByTagNameNS(Constants.SignatureSpecNS, "Signature"); XMLSignature sig = new XMLSignature ((Element) nl.item(0), f.toURI().toURL().toString()); KeyInfo ki = sig.getKeyInfo(); assertNull(ki); } } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/signature/UnknownAlgoSignatureTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/signature/UnknownAlgoSignature0000644000175000017500000001527212214631242032543 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.signature; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.security.KeyStore; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import java.security.PublicKey; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerException; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathExpressionException; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.Init; import org.apache.xml.security.c14n.InvalidCanonicalizerException; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.signature.XMLSignatureException; import org.apache.xml.security.test.DSNamespaceContext; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.xml.sax.SAXException; /** * Tests cases where signature algorithms are unknown. *

* The source documents are based on that created by the class * org.apache.xml.security.samples.signature.CreateEnvelopingSignature *

*/ public class UnknownAlgoSignatureTest extends org.junit.Assert { private static final String BASEDIR = System.getProperty("basedir"); private static final String SEP = System.getProperty("file.separator"); protected static final String KEYSTORE_TYPE = "JKS"; protected static final String KEYSTORE_FILE = "src/test/resources/org/apache/xml/security/samples/input/keystore.jks"; protected static final String CERT_ALIAS = "test"; protected static final String SIGNATURE_SOURCE_PATH = "src/test/resources/org/apache/xml/security/temp/signature"; protected PublicKey publicKey; static { Init.init(); } public UnknownAlgoSignatureTest() throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException { FileInputStream fis = null; if (BASEDIR != null && !"".equals(BASEDIR)) { fis = new FileInputStream(BASEDIR + SEP + KEYSTORE_FILE); } else { fis = new FileInputStream(KEYSTORE_FILE); } KeyStore keyStore = KeyStore.getInstance(KEYSTORE_TYPE); keyStore.load(fis, null); X509Certificate cert = (X509Certificate) keyStore.getCertificate(CERT_ALIAS); publicKey = cert.getPublicKey(); } @org.junit.Test public void testGood() throws ParserConfigurationException, SAXException, IOException, TransformerException, XMLSignatureException, XMLSecurityException, XPathExpressionException { assertTrue(checkSignature("signature-good.xml")); } @org.junit.Test public void testBadC14NAlgo() throws ParserConfigurationException, SAXException, IOException, TransformerException, XMLSecurityException, XPathExpressionException { try { assertTrue(checkSignature("signature-bad-c14n-algo.xml")); fail("Exception not caught"); } catch (InvalidCanonicalizerException e) { // succeed } } @org.junit.Test public void testBadSigAlgo() throws ParserConfigurationException, SAXException, IOException, TransformerException, XMLSecurityException, XPathExpressionException { try { assertTrue(checkSignature("signature-bad-sig-algo.xml")); fail("Exception not caught"); } catch (XMLSignatureException e) { // succeed } } @org.junit.Test public void testBadTransformAlgo() throws ParserConfigurationException, SAXException, IOException, TransformerException, XMLSecurityException, XPathExpressionException { try { assertTrue(checkReferences("signature-bad-transform-algo.xml")); fail("Exception not caught"); } catch (XMLSignatureException e) { // succeed } } protected boolean checkSignature(String fileName) throws ParserConfigurationException, SAXException, IOException, TransformerException, XMLSecurityException, XPathExpressionException { XMLSignature signature = unmarshalXMLSignature(fileName); return signature.checkSignatureValue(publicKey); } protected boolean checkReferences(String fileName) throws ParserConfigurationException, SAXException, IOException, TransformerException, XMLSecurityException, XPathExpressionException { XMLSignature signature = unmarshalXMLSignature(fileName); return signature.getSignedInfo().verify(false); } private XMLSignature unmarshalXMLSignature(String fileName) throws ParserConfigurationException, SAXException, IOException, TransformerException, XMLSecurityException, XPathExpressionException { File file = null; if (BASEDIR != null && !"".equals(BASEDIR)) { file = new File(BASEDIR + SEP + SIGNATURE_SOURCE_PATH, fileName); } else { file = new File(SIGNATURE_SOURCE_PATH, fileName); } Document doc = getDocument(file); XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); xpath.setNamespaceContext(new DSNamespaceContext()); String expression = "//ds:Signature[1]"; Element sigElement = (Element) xpath.evaluate(expression, doc, XPathConstants.NODE); return new XMLSignature(sigElement, file.toURI().toURL().toString()); } public static Document getDocument(File file) throws ParserConfigurationException, SAXException, IOException { DocumentBuilder db = XMLUtils.createDocumentBuilder(false); Document doc = db.parse(new FileInputStream(file)); return doc; } } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/signature/XPointerResourceResolver.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/signature/XPointerResourceReso0000644000175000017500000001472411551556206032542 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.signature; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathExpressionException; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.test.DSNamespaceContext; import org.apache.xml.security.utils.resolver.ResourceResolverException; import org.apache.xml.security.utils.resolver.ResourceResolverSpi; import org.w3c.dom.Attr; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * An implementation of a resource resolver, which evaluates xpointer expressions. * * @author wglas */ public class XPointerResourceResolver extends ResourceResolverSpi { private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(XPointerResourceResolver.class); private static final String XP_OPEN = "xpointer("; private static final String XNS_OPEN = "xmlns("; private Node baseNode; public XPointerResourceResolver(Node baseNode) { this.baseNode = baseNode; } public boolean engineCanResolve(Attr uri, String BaseURI) { String v = uri.getNodeValue(); if (v == null || v.length() <= 0) { return false; } if (v.charAt(0) != '#') { return false; } String xpURI; try { xpURI = URLDecoder.decode(v, "utf-8"); } catch (UnsupportedEncodingException e) { log.warn("utf-8 not a valid encoding",e); return false; } String parts[] = xpURI.substring(1).split("\\s"); // plain ID reference. if (parts.length == 1 && !parts[0].startsWith(XNS_OPEN)) { return true; } int i = 0; for (; i < parts.length - 1; ++i) { if (!parts[i].endsWith(")") || !parts[i].startsWith(XNS_OPEN)) { return false; } } if (!parts[i].endsWith(")") || !parts[i].startsWith(XP_OPEN)) { return false; } log.debug("xpURI = " + xpURI); log.debug("BaseURI = " + BaseURI); return true; } public XMLSignatureInput engineResolve(Attr uri, String BaseURI) throws ResourceResolverException { String v = uri.getNodeValue(); if (v.charAt(0) != '#') { return null; } String xpURI; try { xpURI = URLDecoder.decode(v, "utf-8"); } catch (UnsupportedEncodingException e) { log.warn("utf-8 not a valid encoding ", e); return null; } String parts[] = xpURI.substring(1).split("\\s"); int i = 0; Map namespaces = new HashMap(); if (parts.length > 1) { for (; i < parts.length - 1; ++i) { if (!parts[i].endsWith(")") || !parts[i].startsWith(XNS_OPEN)) { return null; } String mapping = parts[i].substring(XNS_OPEN.length(), parts[i].length() - 1); int pos = mapping.indexOf('='); if (pos <= 0 || pos >= mapping.length() - 1) { throw new ResourceResolverException( "malformed namespace part of XPointer expression", uri, BaseURI ); } namespaces.put( mapping.substring(0, pos), mapping.substring(pos + 1) ); } } try { Node node = null; NodeList nodes = null; // plain ID reference. if (i == 0 && !parts[i].startsWith(XP_OPEN)) { node = this.baseNode.getOwnerDocument().getElementById(parts[i]); } else { if (!parts[i].endsWith(")") || !parts[i].startsWith(XP_OPEN)) { return null; } String xpathExpr = parts[i].substring(XP_OPEN.length(), parts[i].length() - 1); XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); DSNamespaceContext context = new DSNamespaceContext(namespaces); xpath.setNamespaceContext(context); nodes = (NodeList) xpath.evaluate( xpathExpr, this.baseNode, XPathConstants.NODESET ); if (nodes.getLength() == 0) { return null; } if (nodes.getLength() == 1) { node = nodes.item(0); } } XMLSignatureInput result = null; if (node != null) { result = new XMLSignatureInput(node); } else if (nodes != null) { Set nodeSet = new HashSet(nodes.getLength()); for (int j = 0; j < nodes.getLength(); ++j) { nodeSet.add(nodes.item(j)); } result = new XMLSignatureInput(nodeSet); } else { return null; } result.setMIMEType("text/xml"); result.setExcludeComments(true); result.setSourceURI((BaseURI != null) ? BaseURI.concat(v) : v); return result; } catch (XPathExpressionException e) { throw new ResourceResolverException( "Problem evaluating XPath expression", e, uri, BaseURI ); } } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/signature/HMACOutputLengthTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/signature/HMACOutputLengthTest0000644000175000017500000001140312214631242032342 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.signature; import java.io.File; import javax.crypto.SecretKey; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; import org.apache.xml.security.Init; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.signature.XMLSignatureException; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; public class HMACOutputLengthTest extends org.junit.Assert { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog (HMACOutputLengthTest.class.getName()); private static final String BASEDIR = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); private static final String SEP = System.getProperty("file.separator"); public HMACOutputLengthTest() throws Exception { Init.init(); } @org.junit.Test public void test_signature_enveloping_hmac_sha1_trunclen_0() throws Exception { try { validate("signature-enveloping-hmac-sha1-trunclen-0-attack.xml"); fail("Expected HMACOutputLength exception"); } catch (XMLSignatureException xse) { // System.out.println(xse.getMessage()); if (xse.getMsgID().equals("algorithms.HMACOutputLengthMin")) { // pass } else { fail(xse.getMessage()); } } } @org.junit.Test public void test_signature_enveloping_hmac_sha1_trunclen_8() throws Exception { try { validate("signature-enveloping-hmac-sha1-trunclen-8-attack.xml"); } catch (XMLSignatureException xse) { // System.out.println(xse.getMessage()); if (xse.getMsgID().equals("algorithms.HMACOutputLengthMin")) { // pass } else { fail(xse.getMessage()); } } } @org.junit.Test public void test_generate_hmac_sha1_40() throws Exception { Document doc = XMLUtils.createDocumentBuilder(false).newDocument(); XMLSignature sig = new XMLSignature( doc, null, XMLSignature.ALGO_ID_MAC_HMAC_SHA1, 40, Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS ); try { sig.sign(getSecretKey("secret".getBytes("ASCII"))); fail("Expected HMACOutputLength Exception"); } catch (XMLSignatureException xse) { // System.out.println(xse.getMessage()); if (xse.getMsgID().equals("algorithms.HMACOutputLengthMin")) { // pass } else { fail(xse.getMessage()); } } } private boolean validate(String data) throws Exception { File file = new File(BASEDIR + SEP + "src/test/resources" + SEP + "javax" + SEP + "xml" + SEP + "crypto" + SEP + "dsig" + SEP, data); Document doc = XMLUtils.createDocumentBuilder(false).parse(file); NodeList nl = doc.getElementsByTagNameNS(Constants.SignatureSpecNS, "Signature"); if (nl.getLength() == 0) { throw new Exception("Couldn't find signature Element"); } Element sigElement = (Element) nl.item(0); XMLSignature signature = new XMLSignature(sigElement, file.toURI().toString()); SecretKey sk = signature.createSecretKey("secret".getBytes("ASCII")); return signature.checkSignatureValue(sk); } private SecretKey getSecretKey(final byte[] secret) { return new SecretKey() { private static final long serialVersionUID = -6527915934685938837L; public String getFormat() { return "RAW"; } public byte[] getEncoded() { return secret; } public String getAlgorithm(){ return "SECRET"; } }; } } ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/signature/SignatureReferenceTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/signature/SignatureReferenceTe0000644000175000017500000001367512214631242032475 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.signature; import java.io.FileInputStream; import java.io.InputStream; import java.security.KeyStore; import java.security.PrivateKey; import java.security.PublicKey; import java.util.Enumeration; import javax.xml.parsers.DocumentBuilder; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.apache.xml.security.Init; import org.apache.xml.security.signature.Reference; import org.apache.xml.security.signature.SignedInfo; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.signature.reference.ReferenceData; import org.apache.xml.security.signature.reference.ReferenceNodeSetData; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.ElementProxy; import org.apache.xml.security.utils.XMLUtils; import org.apache.xml.security.utils.resolver.implementations.ResolverXPointer; /** * Test a Signature and Validation, and check that we have access to the Element(s) that was * validated. */ public class SignatureReferenceTest extends org.junit.Assert { public static final String DS_NS = "http://www.w3.org/2000/09/xmldsig#"; private static final String BASEDIR = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); public static final String KEYSTORE_DIRECTORY = BASEDIR + "/src/test/resources/"; public static final String KEYSTORE_PASSWORD_STRING = "changeit"; public static final char[] KEYSTORE_PASSWORD = KEYSTORE_PASSWORD_STRING.toCharArray(); public SignatureReferenceTest() throws Exception { Init.init(); ElementProxy.setDefaultPrefix(Constants.SignatureSpecNS, "ds"); } @org.junit.Test public void testSigningVerifyingReference() throws Throwable { Document doc = getOriginalDocument(); XMLSignature signature = signDocument(doc); PublicKey pubKey = getPublicKey(); assertTrue(signature.checkSignatureValue(pubKey)); // Check the reference(s) SignedInfo signedInfo = signature.getSignedInfo(); assertTrue(signedInfo.getLength() == 1); Reference reference = signedInfo.item(0); ReferenceData referenceData = reference.getReferenceData(); assertNotNull(referenceData); assertTrue(referenceData instanceof ReferenceNodeSetData); // Test the cached Element Element referenceElement = (Element)((ReferenceNodeSetData)referenceData).iterator().next(); assertNotNull(referenceElement); assertTrue("root".equals(referenceElement.getLocalName())); Element originalElement = (Element) doc.getElementsByTagNameNS("http://ns.example.org/", "root").item(0); assertNotNull(originalElement); assertEquals(referenceElement, originalElement); } /** * Loads the 'localhost' keystore from the test keystore. * * @return test keystore. * @throws Exception */ private KeyStore getKeyStore() throws Exception { KeyStore ks = KeyStore.getInstance("JKS"); InputStream ksis = new FileInputStream(KEYSTORE_DIRECTORY + "test.jks"); ks.load(ksis, KEYSTORE_PASSWORD); ksis.close(); return ks; } private PublicKey getPublicKey() throws Exception { KeyStore keyStore = getKeyStore(); Enumeration aliases = keyStore.aliases(); while (aliases.hasMoreElements()) { String alias = aliases.nextElement(); if (keyStore.isKeyEntry(alias)) { return keyStore.getCertificate(alias).getPublicKey(); } } return null; } private PrivateKey getPrivateKey() throws Exception { KeyStore keyStore = getKeyStore(); Enumeration aliases = keyStore.aliases(); while (aliases.hasMoreElements()) { String alias = aliases.nextElement(); if (keyStore.isKeyEntry(alias)) { return (PrivateKey) keyStore.getKey(alias, KEYSTORE_PASSWORD); } } return null; } private Document getOriginalDocument() throws Throwable { DocumentBuilder db = XMLUtils.createDocumentBuilder(false); Document doc = db.newDocument(); Element rootElement = doc.createElementNS("http://ns.example.org/", "root"); rootElement.appendChild(doc.createTextNode("Hello World!")); doc.appendChild(rootElement); return doc; } private XMLSignature signDocument(Document doc) throws Throwable { XMLSignature sig = new XMLSignature(doc, "", XMLSignature.ALGO_ID_SIGNATURE_DSA); Element root = doc.getDocumentElement(); root.appendChild(sig.getElement()); sig.getSignedInfo().addResourceResolver(new ResolverXPointer()); Transforms transforms = new Transforms(doc); transforms.addTransform(Transforms.TRANSFORM_ENVELOPED_SIGNATURE); transforms.addTransform(Transforms.TRANSFORM_C14N_WITH_COMMENTS); sig.addDocument("", transforms, Constants.ALGO_ID_DIGEST_SHA1); sig.addKeyInfo(getPublicKey()); sig.sign(getPrivateKey()); return sig; } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/signature/KeyValueTest.java0000644000175000017500000000501512214631242031716 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.signature; import java.io.File; import java.io.FileInputStream; import java.security.PublicKey; import javax.xml.parsers.DocumentBuilder; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; import org.apache.xml.security.Init; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.keys.content.KeyValue; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; public class KeyValueTest extends org.junit.Assert { private static final String BASEDIR = System.getProperty("basedir"); private static final String SEP = System.getProperty("file.separator"); private DocumentBuilder db; static { Init.init(); } public KeyValueTest() throws Exception { db = XMLUtils.createDocumentBuilder(false); } @org.junit.Test public void testDSAPublicKey() throws Exception { File f = null; String filename = "src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-dsa.xml"; if (BASEDIR != null && !"".equals(BASEDIR)) { f = new File(BASEDIR + SEP + filename); } else { f = new File(filename); } Document doc = db.parse(new FileInputStream(f)); NodeList nl = doc.getElementsByTagNameNS(Constants.SignatureSpecNS, "Signature"); XMLSignature sig = new XMLSignature ((Element) nl.item(0), f.toURI().toURL().toString()); KeyInfo ki = sig.getKeyInfo(); KeyValue kv = ki.itemKeyValue(0); PublicKey pk = kv.getPublicKey(); assertNotNull(pk); } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/signature/InvalidKeyTest.java0000755000175000017500000000644612214631242032244 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.signature; import java.io.FileInputStream; import java.security.KeyStore; import java.security.PublicKey; import org.apache.xml.security.Init; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * Test case contributed by Matthias Germann for testing that bug 43239 is * fixed: "No installed provider supports this key" when checking a RSA * signature against a DSA key before RSA key. */ public class InvalidKeyTest extends org.junit.Assert { private static final String BASEDIR = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); private static final String SEP = System.getProperty("file.separator"); static { Init.init(); } @org.junit.Test public void test() throws Exception { FileInputStream input = new FileInputStream(BASEDIR + SEP + "src/test/resources/org/apache/xml/security/samples/input/truststore.jks"); KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType()); trustStore.load(input, "testpw".toCharArray()); try { validate(trustStore.getCertificate("bedag-test").getPublicKey()); throw new Exception("Failure expected on a DSA key"); } catch (Exception e) { // e.printStackTrace(); } validate(trustStore.getCertificate("a70-garaio-frontend-u").getPublicKey()); } private void validate(PublicKey pk) throws Exception { FileInputStream is = new FileInputStream(BASEDIR + SEP + "src/test/resources/org/apache/xml/security/samples/input/test-assertion.xml"); Document e = XMLUtils.createDocumentBuilder(false).parse(is); Node assertion = e.getFirstChild(); while (!(assertion instanceof Element)) { assertion = assertion.getNextSibling(); } Attr attr = ((Element)assertion).getAttributeNodeNS(null, "AssertionID"); if (attr != null) { ((Element)assertion).setIdAttributeNode(attr, true); } NodeList nl = assertion.getChildNodes(); Element n = (Element)nl.item(nl.getLength()-1); XMLSignature si = new XMLSignature((Element)n,""); si.checkSignatureValue(pk); // System.out.println("VALIDATION OK" ); } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/signature/XmlSecTest.java0000644000175000017500000001364612214631242031375 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.signature; import java.io.FileInputStream; import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.KeyStore; import java.security.PrivateKey; import java.security.PublicKey; import java.security.cert.X509Certificate; import javax.xml.parsers.DocumentBuilder; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.Init; import org.apache.xml.security.algorithms.MessageDigestAlgorithm; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.test.DSNamespaceContext; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.transforms.params.XPathContainer; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * Tests creating and validating an XML Signature with an XPath Transform. * Tests bug #44617. * * @author Frank Cornelis */ public class XmlSecTest extends org.junit.Assert { private static final String BASEDIR = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog (XmlSecTest.class.getName()); @org.junit.Test public void testCheckXmlSignatureSoftwareStack() throws Exception { checkXmlSignatureSoftwareStack(false); } @org.junit.Test public void testCheckXmlSignatureSoftwareStackWithCert() throws Exception { checkXmlSignatureSoftwareStack(true); } private void checkXmlSignatureSoftwareStack(boolean cert) throws Exception { Init.init(); DocumentBuilder documentBuilder = XMLUtils.createDocumentBuilder(false); Document testDocument = documentBuilder.newDocument(); Element rootElement = testDocument.createElementNS("urn:namespace", "tns:document"); rootElement.setAttributeNS (Constants.NamespaceSpecNS, "xmlns:tns", "urn:namespace"); testDocument.appendChild(rootElement); Element childElement = testDocument.createElementNS("urn:childnamespace", "t:child"); childElement.setAttributeNS (Constants.NamespaceSpecNS, "xmlns:t", "urn:childnamespace"); childElement.appendChild(testDocument.createTextNode("hello world")); rootElement.appendChild(childElement); PrivateKey privateKey = null; PublicKey publicKey = null; X509Certificate signingCert = null; if (cert) { // get key & self-signed certificate from keystore String fs = System.getProperty("file.separator"); FileInputStream fis = new FileInputStream(BASEDIR + fs + "src/test/resources" + fs + "test.jks"); KeyStore ks = KeyStore.getInstance("JKS"); ks.load(fis, "changeit".toCharArray()); signingCert = (X509Certificate) ks.getCertificate("mullan"); publicKey = signingCert.getPublicKey(); privateKey = (PrivateKey) ks.getKey("mullan", "changeit".toCharArray()); } else { KeyPair keyPair = KeyPairGenerator.getInstance("DSA").generateKeyPair(); publicKey = keyPair.getPublic(); privateKey = keyPair.getPrivate(); } XMLSignature signature = new XMLSignature( testDocument, "", XMLSignature.ALGO_ID_SIGNATURE_DSA, Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS ); Element signatureElement = signature.getElement(); rootElement.appendChild(signatureElement); Transforms transforms = new Transforms(testDocument); XPathContainer xpath = new XPathContainer(testDocument); xpath.setXPathNamespaceContext("ds", Constants.SignatureSpecNS); xpath.setXPath("not(ancestor-or-self::ds:Signature)"); transforms.addTransform(Transforms.TRANSFORM_XPATH, xpath.getElementPlusReturns()); transforms.addTransform(Transforms.TRANSFORM_C14N_WITH_COMMENTS); signature.addDocument("", transforms, MessageDigestAlgorithm.ALGO_ID_DIGEST_SHA1); if (cert) { signature.addKeyInfo(signingCert); } else { signature.addKeyInfo(publicKey); } Element nsElement = testDocument.createElementNS(null, "nsElement"); nsElement.setAttributeNS( Constants.NamespaceSpecNS, "xmlns:ds", Constants.SignatureSpecNS ); signature.sign(privateKey); XPathFactory xpf = XPathFactory.newInstance(); XPath xPath = xpf.newXPath(); xPath.setNamespaceContext(new DSNamespaceContext()); String expression = "//ds:Signature[1]"; Element sigElement = (Element) xPath.evaluate(expression, testDocument, XPathConstants.NODE); XMLSignature signatureToVerify = new XMLSignature(sigElement, ""); boolean signResult = signatureToVerify.checkSignatureValue(publicKey); assertTrue(signResult); } } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/signature/XMLSignatureInputTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/signature/XMLSignatureInputTes0000644000175000017500000001162111551556206032440 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.signature; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.InvalidCanonicalizerException; import org.apache.xml.security.signature.XMLSignatureInput; /** * Unit test for {@link org.apache.xml.security.signature.XMLSignatureInput} * * @author Christian Geuer-Pollmann * @see Bug 4336 */ public class XMLSignatureInputTest extends org.junit.Assert { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(XMLSignatureInputTest.class.getName()); static final String _octetStreamTextInput = "Kleiner Test"; static final String _nodeSetInput1 = "\n" + "\n" + "\n" + "]>\n" + "" + "" + "1" + "2" + "3" + "4" + ""; // added one for xmlns:xml since Xalan 2.2.D11 static final int _nodeSetInput1Nodes = 11; // was 10 static final int _nodeSetInput1NodesWithComments = _nodeSetInput1Nodes + 1; static final String _nodeSetInput2 = "\n" + "" + "" + "1" + "2" + "3" + "4" + ""; // added one for xmlns:xml since Xalan 2.2.D11 static final int _nodeSetInput2Nodes = 11; // was 10 static final int _nodeSetInput2NodesWithComments = _nodeSetInput2Nodes + 1; static final String _nodeSetInput3 = "" + "" + "1" + "2" + "3" + "4" + ""; // added one for xmlns:xml since Xalan 2.2.D11 static final int _nodeSetInput3Nodes = 11; // was 10 static final int _nodeSetInput3NodesWithComments = _nodeSetInput3Nodes + 1; static { org.apache.xml.security.Init.init(); } @org.junit.Test public void testSetOctetStreamGetOctetStream() throws IOException, CanonicalizationException, InvalidCanonicalizerException { InputStream inputStream = new ByteArrayInputStream(_octetStreamTextInput.getBytes("UTF-8")); XMLSignatureInput input = new XMLSignatureInput(inputStream); ByteArrayOutputStream baos = new ByteArrayOutputStream(); InputStream res = input.getOctetStream(); int off = 0; while (res.available() > 0) { byte array[] = new byte[1024]; int len = res.read(array); baos.write(array, off, len); off += len; } byte resBytes[] = baos.toByteArray(); String resString = new String(resBytes, "UTF-8"); assertTrue(resString.equals(_octetStreamTextInput)); } @org.junit.Test public void testIsInitializedWithOctetStream() throws IOException { InputStream inputStream = new ByteArrayInputStream(_octetStreamTextInput.getBytes()); XMLSignatureInput input = new XMLSignatureInput(inputStream); assertTrue("Input is initialized", input.isInitialized()); } @org.junit.Test public void testOctetStreamIsOctetStream() throws IOException { InputStream inputStream = new ByteArrayInputStream(_octetStreamTextInput.getBytes()); XMLSignatureInput input = new XMLSignatureInput(inputStream); assertTrue("Input is octet stream", input.isOctetStream()); } @org.junit.Test public void testOctetStreamIsNotNodeSet() throws IOException { InputStream inputStream = new ByteArrayInputStream(_octetStreamTextInput.getBytes()); XMLSignatureInput input = new XMLSignatureInput(inputStream); assertTrue("Input is not node set", !input.isNodeSet()); } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/signature/ProcessingInstructionTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/signature/ProcessingInstructio0000644000175000017500000001333512214631242032615 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.signature; import java.io.File; import java.io.FileInputStream; import java.net.URI; import java.net.URISyntaxException; import java.security.cert.X509Certificate; import javax.xml.parsers.DocumentBuilder; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.test.DSNamespaceContext; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.apache.xml.security.utils.XMLUtils; import org.apache.xml.security.utils.resolver.ResourceResolverContext; import org.apache.xml.security.utils.resolver.ResourceResolverException; import org.apache.xml.security.utils.resolver.ResourceResolverSpi; /** * A test-case for Bugzilla bug 45744 - "XPath transform and xml-stylesheet". */ public class ProcessingInstructionTest extends org.junit.Assert { static { org.apache.xml.security.Init.init(); } private static String dir; public ProcessingInstructionTest() { String base = System.getProperty("basedir") == null ? "./" : System.getProperty("basedir"); String fs = System.getProperty("file.separator"); dir = base + fs + "src/test/resources" + fs + "org" + fs + "apache" + fs + "xml" + fs + "security" + fs + "testcases" + fs; } @org.junit.Test public void testProcessingInstruction() throws Exception { String signatureFileName = dir + "upp_sign.xml"; DocumentBuilder db = XMLUtils.createDocumentBuilder(false); File f = new File(signatureFileName); Document doc = db.parse(new java.io.FileInputStream(f)); Node obj = doc.getElementsByTagNameNS("http://uri.etsi.org/01903/v1.3.2#", "QualifyingProperties").item(0); while (obj != null) { if (obj instanceof Element) { Attr attr = ((Element)obj).getAttributeNode("Id"); if (attr != null) { ((Element)obj).setIdAttributeNode(attr, true); } } obj = obj.getFirstChild(); } XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); xpath.setNamespaceContext(new DSNamespaceContext()); String expression = "//ds:Signature[1]"; Element sigElement = (Element) xpath.evaluate(expression, doc, XPathConstants.NODE); String baseUri = new File(".").toURI().toURL().toString(); XMLSignature signature = new XMLSignature(sigElement, baseUri); signature.addResourceResolver(FileResolver.getInstance()); X509Certificate cert = signature.getKeyInfo().getX509Certificate(); if (!signature.checkSignatureValue(cert)) { throw new Exception("Signature is invalid!"); } } /** * This class resolves "out.xml" on the local filesystem. */ private static class FileResolver extends ResourceResolverSpi { private static FileResolver resolver = null; public synchronized static ResourceResolverSpi getInstance() { if (resolver == null) { resolver = new FileResolver(); } return resolver; } private FileResolver() { } public XMLSignatureInput engineResolve(Attr uri, String baseURI) throws ResourceResolverException { try { URI uriNew = getNewURI(uri.getNodeValue(), baseURI); FileInputStream inputStream = new FileInputStream(dir + "out.xml"); XMLSignatureInput result = new XMLSignatureInput(inputStream); result.setSourceURI(uriNew.toString()); return result; } catch (Exception ex) { throw new ResourceResolverException( "generic.EmptyMessage", ex, uri, baseURI ); } } public boolean engineCanResolve(Attr uri, String BaseURI) { if (uri == null || !"out.xml".equals(uri.getNodeValue())) { return false; } return true; } private static URI getNewURI(String uri, String baseURI) throws URISyntaxException { URI newUri = null; if (baseURI == null || "".equals(baseURI)) { newUri = new URI(uri); } else { newUri = new URI(baseURI).resolve(uri); } // if the URI contains a fragment, ignore it if (newUri.getFragment() != null) { URI uriNewNoFrag = new URI(newUri.getScheme(), newUri.getSchemeSpecificPart(), null); return uriNewNoFrag; } return newUri; } } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/signature/ECDSASignatureTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/signature/ECDSASignatureTest.j0000644000175000017500000002470112214631242032205 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.signature; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.InputStream; import java.lang.reflect.Constructor; import java.security.KeyStore; import java.security.PrivateKey; import java.security.Provider; import java.security.Security; import java.security.cert.X509Certificate; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.algorithms.SignatureAlgorithm; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.test.DSNamespaceContext; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * Tests that creates and verifies ECDSA signatures. * * @author Wolfgang Glas */ public class ECDSASignatureTest extends org.junit.Assert { private static final String BASEDIR = System.getProperty("basedir"); private static final String SEP = System.getProperty("file.separator"); private static final String ECDSA_JKS = "src/test/resources/org/apache/xml/security/samples/input/ecdsa.jks"; private static final String ECDSA_JKS_PASSWORD = "security"; private KeyStore keyStore; private javax.xml.parsers.DocumentBuilder db; public ECDSASignatureTest() throws Exception { // // If the BouncyCastle provider is not installed, then try to load it // via reflection. If it is not available, then skip this test as it is // required for elliptic curves // if (Security.getProvider("BC") == null) { Constructor cons = null; try { Class c = Class.forName("org.bouncycastle.jce.provider.BouncyCastleProvider"); cons = c.getConstructor(new Class[] {}); } catch (Exception e) { //ignore } if (cons == null) { // BouncyCastle is not available so just return return; } else { Provider provider = (java.security.Provider)cons.newInstance(new Object[]{}); Security.insertProviderAt(provider, 1); } } //String id = "http://apache.org/xml/properties/dom/document-class-name"; //dbf.setAttribute(id, IndexedDocument.class.getName()); db = XMLUtils.createDocumentBuilder(false); org.apache.xml.security.Init.init(); } @org.junit.Test public void testOne() throws Exception { if (Security.getProvider("BC") == null) { return; } keyStore = KeyStore.getInstance("JKS"); keyStore.load( new java.io.FileInputStream(ECDSA_JKS), ECDSA_JKS_PASSWORD.toCharArray() ); doVerify(doSign()); doVerify(doSign()); } @org.junit.Test public void testTwo() throws Exception { if (Security.getProvider("BC") == null) { return; } File file = makeDataFile("src/test/resources/org/apache/xml/security/samples/input/ecdsaSignature.xml"); InputStream is = new FileInputStream(file); doVerify(is); } @org.junit.Test @org.junit.Ignore public void testThree() throws Exception { if (Security.getProvider("BC") == null) { return; } File file = makeDataFile("src/test/resources/at/buergerkarte/testresp.xml"); InputStream is = new FileInputStream(file); doVerify(is); } private byte[] doSign() throws Exception { PrivateKey privateKey = (PrivateKey)keyStore.getKey("ECDSA", ECDSA_JKS_PASSWORD.toCharArray()); org.w3c.dom.Document doc = db.newDocument(); doc.appendChild(doc.createComment(" Comment before ")); Element root = doc.createElementNS("", "RootElement"); doc.appendChild(root); root.appendChild(doc.createTextNode("Some simple text\n")); Element canonElem = XMLUtils.createElementInSignatureSpace(doc, Constants._TAG_CANONICALIZATIONMETHOD); canonElem.setAttributeNS( null, Constants._ATT_ALGORITHM, Canonicalizer.ALGO_ID_C14N_EXCL_OMIT_COMMENTS ); SignatureAlgorithm signatureAlgorithm = new SignatureAlgorithm(doc, XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA1); XMLSignature sig = new XMLSignature(doc, null, signatureAlgorithm.getElement(), canonElem); root.appendChild(sig.getElement()); doc.appendChild(doc.createComment(" Comment after ")); Transforms transforms = new Transforms(doc); transforms.addTransform(Transforms.TRANSFORM_ENVELOPED_SIGNATURE); transforms.addTransform(Transforms.TRANSFORM_C14N_WITH_COMMENTS); sig.addDocument("", transforms, Constants.ALGO_ID_DIGEST_SHA1); X509Certificate x509 = (X509Certificate)keyStore.getCertificate("ECDSA"); sig.addKeyInfo(x509); sig.sign(privateKey); ByteArrayOutputStream bos = new ByteArrayOutputStream(); XMLUtils.outputDOMc14nWithComments(doc, bos); return bos.toByteArray(); } private void doVerify(byte[] signedXml) throws Exception { doVerify(new ByteArrayInputStream(signedXml)); } private void doVerify(InputStream is) throws Exception { org.w3c.dom.Document doc = this.db.parse(is); XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); xpath.setNamespaceContext(new DSNamespaceContext()); String expression = "//ds:Signature[1]"; Element sigElement = (Element) xpath.evaluate(expression, doc, XPathConstants.NODE); XMLSignature signature = new XMLSignature(sigElement, ""); signature.addResourceResolver(new XPointerResourceResolver(sigElement)); KeyInfo ki = signature.getKeyInfo(); if (ki == null) { throw new RuntimeException("No keyinfo"); } X509Certificate cert = signature.getKeyInfo().getX509Certificate(); if (cert == null) { throw new RuntimeException("No certificate"); } assertTrue(signature.checkSignatureValue(cert) ); } private File makeDataFile(String relPath) { if (BASEDIR != null && !"".equals(BASEDIR)) { return new File(BASEDIR + SEP + relPath); } else { return new File(relPath); } } /** * DO NOT DELETE THIS COMMENTED OUT METHOD! * * The reason this method is commented out is to avoid introducing explicit * BouncyCastle dependencies. * * Create an X.509 Certificate and associated private key using the Elliptic Curve * DSA algorithm, and store in a KeyStore. This method was used to generate the * keystore used for this test * ("src/test/resources/org/apache/xml/security/samples/input/ecdsa.jks"). private static void setUpKeyAndCertificate() throws Exception { java.security.spec.ECGenParameterSpec ecGenParameterSpec = new java.security.spec.ECGenParameterSpec("B-409"); java.security.KeyPairGenerator kpg = java.security.KeyPairGenerator.getInstance("ECDH"); kpg.initialize(ecGenParameterSpec, new java.security.SecureRandom()); java.security.KeyPair kp = kpg.generateKeyPair(); org.bouncycastle.x509.X509V3CertificateGenerator certGen = new org.bouncycastle.x509.X509V3CertificateGenerator(); long now = System.currentTimeMillis(); certGen.setSerialNumber(java.math.BigInteger.valueOf(now)); org.bouncycastle.jce.X509Principal subject = new org.bouncycastle.jce.X509Principal( "CN=XML ECDSA Signature Test,DC=apache,DC=org" ); certGen.setIssuerDN(subject); certGen.setSubjectDN(subject); java.util.Date from_date = new java.util.Date(now); certGen.setNotBefore(from_date); java.util.Calendar cal = new java.util.GregorianCalendar(); cal.setTime(from_date); cal.add(java.util.Calendar.YEAR, 4); java.util.Date to_date = cal.getTime(); certGen.setNotAfter(to_date); certGen.setPublicKey(kp.getPublic()); certGen.setSignatureAlgorithm("SHA1withECDSA"); certGen.addExtension( org.bouncycastle.asn1.x509.X509Extensions.BasicConstraints, true, new org.bouncycastle.asn1.x509.BasicConstraints(false) ); certGen.addExtension( org.bouncycastle.asn1.x509.X509Extensions.KeyUsage, true, new org.bouncycastle.asn1.x509.KeyUsage( org.bouncycastle.asn1.x509.KeyUsage.digitalSignature | org.bouncycastle.asn1.x509.KeyUsage.keyEncipherment | org.bouncycastle.asn1.x509.KeyUsage.keyCertSign | org.bouncycastle.asn1.x509.KeyUsage.cRLSign ) ); X509Certificate x509 = certGen.generateX509Certificate(kp.getPrivate()); KeyStore keyStore = KeyStore.getInstance("JKS"); keyStore.load(null, ECDSA_JKS_PASSWORD.toCharArray()); keyStore.setKeyEntry( "ECDSA", kp.getPrivate(), ECDSA_JKS_PASSWORD.toCharArray(), new java.security.cert.Certificate[]{x509} ); keyStore.store( new java.io.FileOutputStream(ECDSA_JKS), ECDSA_JKS_PASSWORD.toCharArray() ); } */ } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/signature/SignatureTest.java0000644000175000017500000001566112214631242032142 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.signature; import java.io.InputStream; import java.io.FileInputStream; import java.security.KeyStore; import java.security.PrivateKey; import java.security.PublicKey; import java.util.Enumeration; import javax.xml.parsers.DocumentBuilder; import org.apache.xml.security.Init; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.signature.XMLSignatureException; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.ElementProxy; import org.apache.xml.security.utils.XMLUtils; import org.apache.xml.security.utils.resolver.implementations.ResolverXPointer; import org.w3c.dom.Document; import org.w3c.dom.Element; public class SignatureTest extends org.junit.Assert { public static final String DS_NS = "http://www.w3.org/2000/09/xmldsig#"; private static final String BASEDIR = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); public static final String KEYSTORE_DIRECTORY = BASEDIR + "/src/test/resources/"; public static final String KEYSTORE_PASSWORD_STRING = "changeit"; public static final char[] KEYSTORE_PASSWORD = KEYSTORE_PASSWORD_STRING.toCharArray(); public SignatureTest() throws Exception { Init.init(); ElementProxy.setDefaultPrefix(Constants.SignatureSpecNS, "ds"); } @org.junit.Test public void testSigning() throws Throwable { signDocument(getOriginalDocument()); } @org.junit.Test public void testSigningVerifyingFromRebuildSignature() throws Throwable { Document doc = getOriginalDocument(); signDocument(doc); Element signatureElem = (Element) doc.getElementsByTagNameNS(DS_NS, "Signature").item(0); XMLSignature signature = new XMLSignature(signatureElem, ""); PublicKey pubKey = getPublicKey(); assertTrue(signature.checkSignatureValue(pubKey)); } @org.junit.Test public void testSigningVerifyingFromExistingSignature() throws Throwable { Document doc = getOriginalDocument(); XMLSignature signature = signDocument(doc); PublicKey pubKey = getPublicKey(); assertTrue(signature.checkSignatureValue(pubKey)); } @org.junit.Test public void testSigningVerifyingFromExistingSignatureSameThread() throws Throwable { Document doc = getOriginalDocument(); XMLSignature signature = signDocument(doc); PublicKey pubKey = getPublicKey(); VerifyingRunnable r = new VerifyingRunnable(signature, pubKey); r.run(); if (r.throwable != null) { throw r.throwable; } assertTrue(r.result); } @org.junit.Test public void testSigningVerifyingFromExistingSignatureSeparateThread() throws Throwable { Document doc = getOriginalDocument(); XMLSignature signature = signDocument(doc); PublicKey pubKey = getPublicKey(); VerifyingRunnable r = new VerifyingRunnable(signature, pubKey); Thread t = new Thread(r); t.start(); t.join(); if (r.throwable != null) { throw r.throwable; } assertTrue(r.result); } public static class VerifyingRunnable implements Runnable { public volatile Throwable throwable; public volatile boolean result; private XMLSignature signature; private PublicKey pubKey; public VerifyingRunnable(XMLSignature signature, PublicKey pubKey) { this.signature = signature; this.pubKey = pubKey; } public void run() { try { result = signature.checkSignatureValue(pubKey); } catch (XMLSignatureException e) { throwable = e; } } } /** * Loads the 'localhost' keystore from the test keystore. * * @return test keystore. * @throws Exception */ private KeyStore getKeyStore() throws Exception { KeyStore ks = KeyStore.getInstance("JKS"); InputStream ksis = new FileInputStream(KEYSTORE_DIRECTORY + "test.jks"); ks.load(ksis, KEYSTORE_PASSWORD); ksis.close(); return ks; } private PublicKey getPublicKey() throws Exception { KeyStore keyStore = getKeyStore(); Enumeration aliases = keyStore.aliases(); while (aliases.hasMoreElements()) { String alias = aliases.nextElement(); if (keyStore.isKeyEntry(alias)) { return keyStore.getCertificate(alias).getPublicKey(); } } return null; } private PrivateKey getPrivateKey() throws Exception { KeyStore keyStore = getKeyStore(); Enumeration aliases = keyStore.aliases(); while (aliases.hasMoreElements()) { String alias = aliases.nextElement(); if (keyStore.isKeyEntry(alias)) { return (PrivateKey) keyStore.getKey(alias, KEYSTORE_PASSWORD); } } return null; } private Document getOriginalDocument() throws Throwable { DocumentBuilder db = XMLUtils.createDocumentBuilder(false); Document doc = db.newDocument(); Element rootElement = doc.createElementNS("http://ns.example.org/", "root"); rootElement.appendChild(doc.createTextNode("Hello World!")); doc.appendChild(rootElement); return doc; } private XMLSignature signDocument(Document doc) throws Throwable { XMLSignature sig = new XMLSignature(doc, "", XMLSignature.ALGO_ID_SIGNATURE_DSA); Element root = doc.getDocumentElement(); root.appendChild(sig.getElement()); sig.getSignedInfo().addResourceResolver(new ResolverXPointer()); Transforms transforms = new Transforms(doc); transforms.addTransform(Transforms.TRANSFORM_ENVELOPED_SIGNATURE); transforms.addTransform(Transforms.TRANSFORM_C14N_WITH_COMMENTS); sig.addDocument("", transforms, Constants.ALGO_ID_DIGEST_SHA1); sig.addKeyInfo(getPublicKey()); sig.sign(getPrivateKey()); return sig; } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/signature/X509DataTest.java0000644000175000017500000001107012214631242031426 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.signature; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.FileInputStream; import java.security.KeyStore; import java.security.PrivateKey; import java.security.cert.X509Certificate; import org.apache.xml.security.Init; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; public class X509DataTest extends org.junit.Assert { private static final String BASEDIR = System.getProperty("basedir"); KeyStore ks = null; @org.junit.Test public void testAddX509SubjectName() throws Exception { Init.init(); javax.xml.parsers.DocumentBuilder db = XMLUtils.createDocumentBuilder(false); org.w3c.dom.Document doc = db.newDocument(); XMLSignature sig = new XMLSignature(doc, "", XMLSignature.ALGO_ID_SIGNATURE_DSA); doc.appendChild(sig.getElement()); sig.addDocument(""); //Add in the KeyInfo for the certificate that we used the private key of X509Certificate cert =getCertificate(); sig.addKeyInfo(cert); sig.addKeyInfo(cert.getPublicKey()); // Add these three lines org.apache.xml.security.keys.KeyInfo ki = sig.getKeyInfo(); ki.itemX509Data(0).addSubjectName(cert.getSubjectX500Principal().getName()); ki.itemX509Data(0).addIssuerSerial(cert.getIssuerX500Principal().getName(), cert.getSerialNumber()); sig.sign(getPrivateKey()); ByteArrayOutputStream os = new ByteArrayOutputStream(); XMLUtils.outputDOM(doc, os); XMLSignature newSig = getSignature(os.toByteArray()); assertNotNull(newSig.getKeyInfo().itemX509Data(0)); assertEquals(cert.getSubjectX500Principal().getName(), newSig.getKeyInfo().itemX509Data(0).itemSubjectName(0).getSubjectName()); assertEquals(cert.getIssuerX500Principal().getName(), newSig.getKeyInfo().itemX509Data(0).itemIssuerSerial(0).getIssuerName()); } private XMLSignature getSignature(byte[] s) throws Exception { javax.xml.parsers.DocumentBuilder db = XMLUtils.createDocumentBuilder(false); Document doc = db.parse(new ByteArrayInputStream(s)); Element el = (Element)doc.getFirstChild(); return new XMLSignature(el, ""); } private KeyStore getKeyStore() throws Exception { if (ks != null) { return ks; } String keystoreType = "JKS"; String keystoreFile = "src/test/resources/org/apache/xml/security/samples/input/keystore.jks"; String keystorePass = "xmlsecurity"; ks = KeyStore.getInstance(keystoreType); FileInputStream fis = null; if (BASEDIR != null && !"".equals(BASEDIR)) { fis = new FileInputStream(BASEDIR + "/" + keystoreFile); } else { fis = new FileInputStream(keystoreFile); } //load the keystore ks.load(fis, keystorePass.toCharArray()); return ks; } private X509Certificate getCertificate() throws Exception { String certificateAlias = "test"; X509Certificate cert = (X509Certificate) getKeyStore().getCertificate(certificateAlias); return cert; } private PrivateKey getPrivateKey() throws Exception { String privateKeyAlias = "test"; String privateKeyPass = "xmlsecurity"; PrivateKey privateKey = (PrivateKey) getKeyStore().getKey(privateKeyAlias, privateKeyPass.toCharArray()); return privateKey; } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/signature/CreateSignatureTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/signature/CreateSignatureTest.0000644000175000017500000003064112214631242032417 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.signature; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.FileInputStream; import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.KeyStore; import java.security.PrivateKey; import java.security.PublicKey; import java.security.cert.X509Certificate; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.algorithms.SignatureAlgorithm; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.signature.ObjectContainer; import org.apache.xml.security.test.DSNamespaceContext; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.transforms.params.XPath2FilterContainer; import org.apache.xml.security.transforms.params.XPathContainer; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.ElementProxy; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * Tests that create signatures. * * @author Sean Mullan */ public class CreateSignatureTest extends org.junit.Assert { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(CreateSignatureTest.class.getName()); private static final String BASEDIR = System.getProperty("basedir"); private static final String SEP = System.getProperty("file.separator"); private KeyPair kp = null; private javax.xml.parsers.DocumentBuilder db; public CreateSignatureTest() throws Exception { db = XMLUtils.createDocumentBuilder(false); org.apache.xml.security.Init.init(); kp = KeyPairGenerator.getInstance("RSA").genKeyPair(); } /** * Test for bug 36044 - Canonicalizing an empty node-set throws an * ArrayIndexOutOfBoundsException. */ @org.junit.Test public void testEmptyNodeSet() throws Exception { Document doc = db.newDocument(); Element envelope = doc.createElementNS("http://www.usps.gov/", "Envelope"); envelope.appendChild(doc.createTextNode("\n")); doc.appendChild(envelope); XMLSignature sig = new XMLSignature(doc, null, XMLSignature.ALGO_ID_SIGNATURE_DSA); envelope.appendChild(sig.getElement()); ObjectContainer object1 = new ObjectContainer(doc); object1.setId("object-1"); object1.setMimeType("text/plain"); sig.appendObject(object1); ObjectContainer object2 = new ObjectContainer(doc); object2.setId("object-2"); object2.setMimeType("text/plain"); object2.setEncoding("http://www.w3.org/2000/09/xmldsig#base64"); object2.appendChild(doc.createTextNode("SSBhbSB0aGUgdGV4dC4=")); sig.appendObject(object2); Transforms transforms = new Transforms(doc); XPathContainer xpathC = new XPathContainer(doc); xpathC.setXPath("self::text()"); transforms.addTransform(Transforms.TRANSFORM_XPATH, xpathC.getElementPlusReturns()); sig.addDocument( "#object-1", transforms, Constants.ALGO_ID_DIGEST_SHA1, null, "http://www.w3.org/2000/09/xmldsig#Object" ); KeyStore ks = KeyStore.getInstance("JKS"); FileInputStream fis = null; if (BASEDIR != null && !"".equals(BASEDIR)) { fis = new FileInputStream(BASEDIR + SEP + "src/test/resources/org/apache/xml/security/samples/input/keystore.jks" ); } else { fis = new FileInputStream("src/test/resources/org/apache/xml/security/samples/input/keystore.jks"); } ks.load(fis, "xmlsecurity".toCharArray()); PrivateKey privateKey = (PrivateKey) ks.getKey("test", "xmlsecurity".toCharArray()); sig.sign(privateKey); } @org.junit.Test public void testOne() throws Exception { doVerify(doSign()); doVerify(doSign()); } @org.junit.Test public void testTwo() throws Exception { doSignWithCert(); } @org.junit.Test public void testWithNSPrefixDisabled() throws Exception { String prefix = ElementProxy.getDefaultPrefix(Constants.SignatureSpecNS); try { ElementProxy.setDefaultPrefix(Constants.SignatureSpecNS, ""); doSign(); ElementProxy.setDefaultPrefix(Constants.SignatureSpecNS, prefix); } catch (Exception e) { ElementProxy.setDefaultPrefix(Constants.SignatureSpecNS, prefix); throw e; } } @org.junit.Test public void testXFilter2Signature() throws Exception { Document doc = db.newDocument(); doc.appendChild(doc.createComment(" Comment before ")); Element root = doc.createElementNS("", "RootElement"); doc.appendChild(root); root.appendChild(doc.createTextNode("Some simple text\n")); // Sign XMLSignature sig = new XMLSignature(doc, null, XMLSignature.ALGO_ID_SIGNATURE_DSA); root.appendChild(sig.getElement()); Transforms transforms = new Transforms(doc); String filter = "here()/ancestor::ds.Signature/parent::node()/descendant-or-self::*"; XPath2FilterContainer xpathC = XPath2FilterContainer.newInstanceIntersect(doc, filter); xpathC.setXPathNamespaceContext("dsig-xpath", Transforms.TRANSFORM_XPATH2FILTER); Element node = xpathC.getElement(); transforms.addTransform(Transforms.TRANSFORM_XPATH2FILTER, node); sig.addDocument("", transforms, Constants.ALGO_ID_DIGEST_SHA1); KeyStore ks = KeyStore.getInstance("JKS"); FileInputStream fis = null; if (BASEDIR != null && !"".equals(BASEDIR)) { fis = new FileInputStream(BASEDIR + SEP + "src/test/resources/org/apache/xml/security/samples/input/keystore.jks" ); } else { fis = new FileInputStream("src/test/resources/org/apache/xml/security/samples/input/keystore.jks"); } ks.load(fis, "xmlsecurity".toCharArray()); PrivateKey privateKey = (PrivateKey) ks.getKey("test", "xmlsecurity".toCharArray()); sig.sign(privateKey); ByteArrayOutputStream bos = new ByteArrayOutputStream(); XMLUtils.outputDOMc14nWithComments(doc, bos); String signedDoc = new String(bos.toByteArray()); // Now Verify doc = db.parse(new ByteArrayInputStream(signedDoc.getBytes())); XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); xpath.setNamespaceContext(new DSNamespaceContext()); String expression = "//ds:Signature[1]"; Element sigElement = (Element) xpath.evaluate(expression, doc, XPathConstants.NODE); XMLSignature signature = new XMLSignature(sigElement, ""); assertTrue(signature.checkSignatureValue(ks.getCertificate("test").getPublicKey())); } private String doSign() throws Exception { PrivateKey privateKey = kp.getPrivate(); org.w3c.dom.Document doc = db.newDocument(); doc.appendChild(doc.createComment(" Comment before ")); Element root = doc.createElementNS("", "RootElement"); doc.appendChild(root); root.appendChild(doc.createTextNode("Some simple text\n")); Element canonElem = XMLUtils.createElementInSignatureSpace(doc, Constants._TAG_CANONICALIZATIONMETHOD); canonElem.setAttributeNS( null, Constants._ATT_ALGORITHM, Canonicalizer.ALGO_ID_C14N_EXCL_OMIT_COMMENTS ); SignatureAlgorithm signatureAlgorithm = new SignatureAlgorithm(doc, XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA1); XMLSignature sig = new XMLSignature(doc, null, signatureAlgorithm.getElement(), canonElem); root.appendChild(sig.getElement()); doc.appendChild(doc.createComment(" Comment after ")); Transforms transforms = new Transforms(doc); transforms.addTransform(Transforms.TRANSFORM_ENVELOPED_SIGNATURE); transforms.addTransform(Transforms.TRANSFORM_C14N_WITH_COMMENTS); sig.addDocument("", transforms, Constants.ALGO_ID_DIGEST_SHA1); sig.addKeyInfo(kp.getPublic()); sig.sign(privateKey); ByteArrayOutputStream bos = new ByteArrayOutputStream(); XMLUtils.outputDOMc14nWithComments(doc, bos); return new String(bos.toByteArray()); } private String doSignWithCert() throws Exception { KeyStore ks = KeyStore.getInstance("JKS"); FileInputStream fis = null; if (BASEDIR != null && !"".equals(BASEDIR)) { fis = new FileInputStream(BASEDIR + SEP + "src/test/resources/test.jks"); } else { fis = new FileInputStream("src/test/resources/test.jks"); } ks.load(fis, "changeit".toCharArray()); PrivateKey privateKey = (PrivateKey) ks.getKey("mullan", "changeit".toCharArray()); org.w3c.dom.Document doc = db.newDocument(); X509Certificate signingCert = (X509Certificate) ks.getCertificate("mullan"); doc.appendChild(doc.createComment(" Comment before ")); Element root = doc.createElementNS("", "RootElement"); doc.appendChild(root); root.appendChild(doc.createTextNode("Some simple text\n")); Element canonElem = XMLUtils.createElementInSignatureSpace(doc, Constants._TAG_CANONICALIZATIONMETHOD); canonElem.setAttributeNS( null, Constants._ATT_ALGORITHM, Canonicalizer.ALGO_ID_C14N_EXCL_OMIT_COMMENTS ); SignatureAlgorithm signatureAlgorithm = new SignatureAlgorithm(doc, XMLSignature.ALGO_ID_SIGNATURE_DSA); XMLSignature sig = new XMLSignature(doc, null, signatureAlgorithm.getElement(), canonElem); root.appendChild(sig.getElement()); doc.appendChild(doc.createComment(" Comment after ")); Transforms transforms = new Transforms(doc); transforms.addTransform(Transforms.TRANSFORM_ENVELOPED_SIGNATURE); transforms.addTransform(Transforms.TRANSFORM_C14N_WITH_COMMENTS); sig.addDocument("", transforms, Constants.ALGO_ID_DIGEST_SHA1); sig.addKeyInfo(signingCert); sig.sign(privateKey); X509Certificate cert = sig.getKeyInfo().getX509Certificate(); sig.checkSignatureValue(cert.getPublicKey()); ByteArrayOutputStream bos = new ByteArrayOutputStream(); XMLUtils.outputDOMc14nWithComments(doc, bos); return new String(bos.toByteArray()); } private void doVerify(String signedXML) throws Exception { org.w3c.dom.Document doc = db.parse(new ByteArrayInputStream(signedXML.getBytes())); XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); xpath.setNamespaceContext(new DSNamespaceContext()); String expression = "//ds:Signature[1]"; Element sigElement = (Element) xpath.evaluate(expression, doc, XPathConstants.NODE); XMLSignature signature = new XMLSignature(sigElement, ""); KeyInfo ki = signature.getKeyInfo(); if (ki == null) { throw new RuntimeException("No keyinfo"); } PublicKey pk = signature.getKeyInfo().getPublicKey(); if (pk == null) { throw new RuntimeException("No public key"); } assertTrue(signature.checkSignatureValue(pk)); } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/interop/0000755000175000017500000000000012273503732026153 5ustar tonytonylibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/interop/IAIKTest.java0000644000175000017500000003012111551556206030372 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.interop; import org.apache.xml.security.test.utils.resolver.OfflineResolver; import org.apache.xml.security.signature.XMLSignatureException; import org.apache.xml.security.utils.resolver.ResourceResolverSpi; import org.apache.xml.security.utils.resolver.implementations.ResolverAnonymous; /** * This test is to ensure interoperability with the examples provided by the IAIK * XML Signature implementation. Thanks to Gregor Karlinger who provided these * test vectors. They are located in the directory data/at/iaik/ixsil/. * * @author $Author: coheigea $ * @see The IAIK IXSIL Website */ public class IAIKTest extends InteropTestBase { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(IAIKTest.class.getName()); /** Field gregorsDir */ static String gregorsDir = "src/test/resources/at/iaik/ixsil/"; static { String basedir = System.getProperty("basedir"); if (basedir != null && !"".equals(basedir)) { gregorsDir = basedir + "/" + gregorsDir; } org.apache.xml.security.Init.init(); } /** * Constructor IAIKTest */ public IAIKTest() { super(); } /** * Method test_signatureAlgorithms_signatures_hMACShortSignature * * @throws Exception */ @org.junit.Test public void test_signatureAlgorithms_signatures_hMACShortSignature() throws Exception { String filename = gregorsDir + "signatureAlgorithms/signatures/hMACShortSignature.xml"; ResourceResolverSpi resolver = new OfflineResolver(); boolean followManifests = false; byte[] hmacKey = "secret".getBytes("ASCII"); try { this.verifyHMAC(filename, resolver, followManifests, hmacKey); fail("HMACOutputLength Exception not caught"); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } catch (XMLSignatureException ex) { if (ex.getMsgID().equals("algorithms.HMACOutputLengthMin")) { // succeed } else { fail(ex.getMessage()); } } } /** * Method test_signatureAlgorithms_signatures_hMACSignature * * @throws Exception */ @org.junit.Test public void test_signatureAlgorithms_signatures_hMACSignature() throws Exception { String filename = gregorsDir + "signatureAlgorithms/signatures/hMACSignature.xml"; ResourceResolverSpi resolver = new OfflineResolver(); boolean followManifests = false; byte[] hmacKey = "secret".getBytes("ASCII"); boolean verify = false; try { verify = this.verifyHMAC(filename, resolver, followManifests, hmacKey); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_coreFeatures_signatures_manifestSignature * * @throws Exception */ @org.junit.Test public void test_coreFeatures_signatures_manifestSignature_core() throws Exception { String filename = gregorsDir + "coreFeatures/signatures/manifestSignature.xml"; ResourceResolverSpi resolver = null; boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Core validation crashed for " + filename); throw ex; } if (!verify) { log.error("Core validation failed for " + filename); } assertTrue("Core validation failed for " + filename, verify); } /** * Method test_coreFeatures_signatures_manifestSignature_manifest * * @throws Exception */ @org.junit.Test public void test_coreFeatures_signatures_manifestSignature_manifest() throws Exception { String filename = gregorsDir + "coreFeatures/signatures/manifestSignature.xml"; ResourceResolverSpi resolver = null; boolean followManifests = true; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Following the ds:Manifest failed for " + filename); } assertTrue("Following the ds:Manifest failed for " + filename, verify); } /** * Method test_coreFeatures_signatures_signatureTypesSignature * * @throws Exception */ @org.junit.Test public void test_coreFeatures_signatures_signatureTypesSignature() throws Exception { String filename = gregorsDir + "coreFeatures/signatures/signatureTypesSignature.xml"; ResourceResolverSpi resolver = new OfflineResolver(); boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue("Verification failed for " + filename, verify); } /** * Method test_coreFeatures_signatures_anonymousReferenceSignature * * @throws Exception */ @org.junit.Test public void test_coreFeatures_signatures_anonymousReferenceSignature() throws Exception { String filename = gregorsDir + "coreFeatures/signatures/anonymousReferenceSignature.xml"; String anonymousRef = gregorsDir + "coreFeatures/samples/anonymousReferenceContent.xml"; ResourceResolverSpi resolver = new ResolverAnonymous(anonymousRef); boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_signatureAlgorithms_signatures_dSASignature * * @throws Exception */ @org.junit.Test public void test_signatureAlgorithms_signatures_dSASignature() throws Exception { String filename = gregorsDir + "signatureAlgorithms/signatures/dSASignature.xml"; ResourceResolverSpi resolver = null; boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_signatureAlgorithms_signatures_rSASignature * * @throws Exception */ @org.junit.Test public void test_signatureAlgorithms_signatures_rSASignature() throws Exception { String filename = gregorsDir + "signatureAlgorithms/signatures/rSASignature.xml"; ResourceResolverSpi resolver = null; boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_transforms_signatures_base64DecodeSignature * * @throws Exception */ @org.junit.Test public void test_transforms_signatures_base64DecodeSignature() throws Exception { String filename = gregorsDir + "transforms/signatures/base64DecodeSignature.xml"; ResourceResolverSpi resolver = null; boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_transforms_signatures_c14nSignature * * @throws Exception */ @org.junit.Test public void test_transforms_signatures_c14nSignature() throws Exception { String filename = gregorsDir + "transforms/signatures/c14nSignature.xml"; ResourceResolverSpi resolver = null; boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_transforms_signatures_envelopedSignatureSignature * * @throws Exception */ @org.junit.Test public void test_transforms_signatures_envelopedSignatureSignature() throws Exception { String filename = gregorsDir + "transforms/signatures/envelopedSignatureSignature.xml"; ResourceResolverSpi resolver = null; boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_transforms_signatures_xPathSignature * * @throws Exception */ @org.junit.Test public void test_transforms_signatures_xPathSignature() throws Exception { String filename = gregorsDir + "transforms/signatures/xPathSignature.xml"; ResourceResolverSpi resolver = null; boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/interop/BaltimoreTest.java0000644000175000017500000004121311551556206031577 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.interop; import org.apache.xml.security.test.utils.resolver.OfflineResolver; import org.apache.xml.security.utils.resolver.ResourceResolverSpi; import org.apache.xml.security.signature.XMLSignatureException; /** * This test is to ensure interoperability with the examples provided by Merlin Huges * from Baltimore using KeyTools XML. These test vectors are located in the directory * data/ie/baltimore/merlin-examples/. * * @author $Author: coheigea $ * @see The KeyTools XML Website */ public class BaltimoreTest extends InteropTestBase { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(BaltimoreTest.class.getName()); /** Field merlinsDir15 */ static String merlinsDir15 = "src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/"; static String merlinsDir16 = "src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen"; static String merlinsDir23 = "src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/"; static { String basedir = System.getProperty("basedir"); if(basedir != null && !"".equals(basedir)) { merlinsDir15 = basedir + "/" + merlinsDir15; merlinsDir16 = basedir + "/" + merlinsDir16; merlinsDir23 = basedir + "/" + merlinsDir23; } org.apache.xml.security.Init.init(); } /** * Constructor BaltimoreTest */ public BaltimoreTest() { super(); } /** * Method test_fifteen_enveloping_hmac_sha1 * * @throws Exception */ @org.junit.Test public void test_fifteen_enveloping_hmac_sha1() throws Exception { String filename = merlinsDir15 + "signature-enveloping-hmac-sha1.xml"; boolean verify = this.verifyHMAC(filename, new OfflineResolver(), false, "secret".getBytes("ASCII")); if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_fifteen_enveloping_hmac_sha1_40 * * @throws Exception */ @org.junit.Test public void test_fifteen_enveloping_hmac_sha1_40() throws Exception { String filename = merlinsDir15 + "signature-enveloping-hmac-sha1-40.xml"; ResourceResolverSpi resolver = new OfflineResolver(); boolean followManifests = false; byte[] hmacKey = "secret".getBytes("ASCII"); try { this.verifyHMAC(filename, resolver, followManifests, hmacKey); fail("HMACOutputLength Exception not caught"); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } catch (XMLSignatureException ex) { if (ex.getMsgID().equals("algorithms.HMACOutputLengthMin")) { // succeed } else { fail(ex.getMessage()); } } } /** * Method test_fifteen_enveloped_dsa * * @throws Exception */ @org.junit.Test public void test_fifteen_enveloped_dsa() throws Exception { String filename = merlinsDir15 + "signature-enveloped-dsa.xml"; ResourceResolverSpi resolver = new OfflineResolver(); boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_fifteen_enveloping_b64_dsa * * @throws Exception */ @org.junit.Test public void test_fifteen_enveloping_b64_dsa() throws Exception { String filename = merlinsDir15 + "signature-enveloping-b64-dsa.xml"; ResourceResolverSpi resolver = null; boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_fifteen_enveloping_dsa * * @throws Exception */ @org.junit.Test public void test_fifteen_enveloping_dsa() throws Exception { String filename = merlinsDir15 + "signature-enveloping-dsa.xml"; ResourceResolverSpi resolver = new OfflineResolver(); boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_fifteen_enveloping_rsa * * @throws Exception */ @org.junit.Test public void test_fifteen_enveloping_rsa() throws Exception { String filename = merlinsDir15 + "signature-enveloping-rsa.xml"; ResourceResolverSpi resolver = new OfflineResolver(); boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_fifteen_external_b64_dsa * * @throws Exception */ @org.junit.Test public void test_fifteen_external_b64_dsa() throws Exception { String filename = merlinsDir15 + "signature-external-b64-dsa.xml"; ResourceResolverSpi resolver = new OfflineResolver(); boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_fifteen_external_dsa * * @throws Exception */ @org.junit.Test public void test_fifteen_external_dsa() throws Exception { String filename = merlinsDir15 + "signature-external-dsa.xml"; ResourceResolverSpi resolver = new OfflineResolver(); boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_sixteen_external_dsa * * @throws Exception */ @org.junit.Test public void test_sixteen_external_dsa() throws Exception { String filename = merlinsDir16 + "/signature.xml"; ResourceResolverSpi resolver = new OfflineResolver(); boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_sixteen_bad_signature. This tests make sure that an * invalid signature is not valid. This is validating merlin's 16 * signature but some of the referenced content has been modified so * some of the references should be invalid. * * @throws Exception */ @org.junit.Test public void test_sixteen_bad_signature() throws Exception { String filename = merlinsDir16 + "/bad-signature.xml"; ResourceResolverSpi resolver = new OfflineResolver(); boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (verify) { log.error("Verification passed (should have failed) for " + filename); } assertFalse(filename, verify); } /** * Method test_twenty_three_enveloping_hmac_sha1 * * @throws Exception */ @org.junit.Test public void test_twenty_three_enveloping_hmac_sha1() throws Exception { String filename = merlinsDir23 + "signature-enveloping-hmac-sha1.xml"; boolean verify = this.verifyHMAC(filename, new OfflineResolver(), false, "secret".getBytes("ASCII")); if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_twenty_three_enveloping_hmac_sha1_40 * * @throws Exception */ @org.junit.Test public void test_twenty_three_enveloping_hmac_sha1_40() throws Exception { String filename = merlinsDir23 + "signature-enveloping-hmac-sha1-40.xml"; ResourceResolverSpi resolver = new OfflineResolver(); boolean followManifests = false; byte[] hmacKey = "secret".getBytes("ASCII"); try { this.verifyHMAC(filename, resolver, followManifests, hmacKey); fail("HMACOutputLength Exception not caught"); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } catch (XMLSignatureException ex) { if (ex.getMsgID().equals("algorithms.HMACOutputLengthMin")) { // succeed } else { fail(ex.getMessage()); } } } /** * Method test_twenty_three_enveloped_dsa * * @throws Exception */ @org.junit.Test public void test_twenty_three_enveloped_dsa() throws Exception { String filename = merlinsDir23 + "signature-enveloped-dsa.xml"; ResourceResolverSpi resolver = new OfflineResolver(); boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_twenty_three_enveloping_b64_dsa * * @throws Exception */ @org.junit.Test public void test_twenty_three_enveloping_b64_dsa() throws Exception { String filename = merlinsDir23 + "signature-enveloping-b64-dsa.xml"; ResourceResolverSpi resolver = null; boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_twenty_three_enveloping_dsa * * @throws Exception */ @org.junit.Test public void test_twenty_three_enveloping_dsa() throws Exception { String filename = merlinsDir23 + "signature-enveloping-dsa.xml"; ResourceResolverSpi resolver = new OfflineResolver(); boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_twenty_three_enveloping_rsa * * @throws Exception */ @org.junit.Test public void test_twenty_three_enveloping_rsa() throws Exception { String filename = merlinsDir23 + "signature-enveloping-rsa.xml"; ResourceResolverSpi resolver = new OfflineResolver(); boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_twenty_three_external_b64_dsa * * @throws Exception */ @org.junit.Test public void test_twenty_three_external_b64_dsa() throws Exception { String filename = merlinsDir23 + "signature-external-b64-dsa.xml"; ResourceResolverSpi resolver = new OfflineResolver(); boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_twenty_three_external_dsa * * @throws Exception */ @org.junit.Test public void test_twenty_three_external_dsa() throws Exception { String filename = merlinsDir23 + "signature-external-dsa.xml"; ResourceResolverSpi resolver = new OfflineResolver(); boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_twenty_three_external_dsa_2 * * @throws Exception */ @org.junit.Test public void test_twenty_three_external_dsa_2() throws Exception { String filename = merlinsDir23 + "signature.xml"; ResourceResolverSpi resolver = new OfflineResolver(); boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/interop/InteropTestBase.java0000644000175000017500000001541712234743735032107 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.interop; import java.io.File; import java.security.PublicKey; import java.security.cert.X509Certificate; import java.util.Iterator; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.signature.Reference; import org.apache.xml.security.signature.SignedInfo; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.signature.reference.ReferenceData; import org.apache.xml.security.signature.reference.ReferenceNodeSetData; import org.apache.xml.security.signature.reference.ReferenceOctetStreamData; import org.apache.xml.security.test.DSNamespaceContext; import org.apache.xml.security.utils.XMLUtils; import org.apache.xml.security.utils.resolver.ResourceResolverSpi; import org.w3c.dom.Element; import org.w3c.dom.Node; public class InteropTestBase extends org.junit.Assert { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(InteropTestBase.class.getName()); /** * Method verifyHMAC * * @param filename * @param resolver * @param hmacKey * * @throws Exception */ public boolean verifyHMAC( String filename, ResourceResolverSpi resolver, boolean followManifests, byte[] hmacKey ) throws Exception { File f = new File(filename); javax.xml.parsers.DocumentBuilder db = XMLUtils.createDocumentBuilder(false, false); org.w3c.dom.Document doc = db.parse(new java.io.FileInputStream(f)); XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); xpath.setNamespaceContext(new DSNamespaceContext()); String expression = "//ds:Signature[1]"; Element sigElement = (Element) xpath.evaluate(expression, doc, XPathConstants.NODE); XMLSignature signature = new XMLSignature(sigElement, f.toURI().toURL().toString()); if (resolver != null) { signature.addResourceResolver(resolver); } signature.setFollowNestedManifests(followManifests); byte keybytes[] = hmacKey; javax.crypto.SecretKey sk = signature.createSecretKey(keybytes); return signature.checkSignatureValue(sk); } /** * Method verify * * @param filename * @param resolver * * @throws Exception */ public boolean verify(String filename, ResourceResolverSpi resolver, boolean followManifests) throws Exception { File f = new File(filename); javax.xml.parsers.DocumentBuilder db = XMLUtils.createDocumentBuilder(false, false); org.w3c.dom.Document doc = db.parse(f); XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); xpath.setNamespaceContext(new DSNamespaceContext()); String expression = "//ds:Signature[1]"; Element sigElement = (Element) xpath.evaluate(expression, doc, XPathConstants.NODE); XMLSignature signature = new XMLSignature(sigElement, f.toURI().toURL().toString()); if (resolver != null) { signature.addResourceResolver(resolver); } signature.setFollowNestedManifests(followManifests); KeyInfo ki = signature.getKeyInfo(); boolean result = false; if (ki != null) { X509Certificate cert = ki.getX509Certificate(); if (cert != null) { result = signature.checkSignatureValue(cert); } else { PublicKey pk = ki.getPublicKey(); if (pk != null) { result = signature.checkSignatureValue(pk); } else { throw new RuntimeException( "Did not find a public key, so I can't check the signature"); } } checkReferences(signature); } else { throw new RuntimeException("Did not find a KeyInfo"); } if (!result) { for (int i = 0; i < signature.getSignedInfo().getLength(); i++) { boolean refVerify = signature.getSignedInfo().getVerificationResult(i); if (refVerify) { log.debug("Reference " + i + " was OK"); } else { // JavaUtils.writeBytesToFilename(filename + i + ".apache.txt", signature.getSignedInfo().item(i).getContentsAfterTransformation().getBytes()); log.debug("Reference " + i + " was not OK"); } } checkReferences(signature); //throw new RuntimeException("Falle:"+sb.toString()); } return result; } private void checkReferences(XMLSignature xmlSignature) throws Exception { SignedInfo signedInfo = xmlSignature.getSignedInfo(); assertTrue(signedInfo.getLength() > 0); for (int i = 0; i < signedInfo.getLength(); i++) { Reference reference = signedInfo.item(i); assertNotNull(reference); ReferenceData referenceData = reference.getReferenceData(); assertNotNull(referenceData); if (referenceData instanceof ReferenceNodeSetData) { Iterator iter = ((ReferenceNodeSetData)referenceData).iterator(); assertTrue(iter.hasNext()); boolean found = false; while (iter.hasNext()) { Node n = (Node)iter.next(); if (n instanceof Element) { found = true; break; } } assertTrue(found); } else if (referenceData instanceof ReferenceOctetStreamData) { assertNotNull(((ReferenceOctetStreamData)referenceData).getOctetStream()); } } } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/interop/RSASecurityTest.java0000644000175000017500000000550511551556206032042 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.interop; import org.apache.xml.security.utils.resolver.ResourceResolverSpi; /** * This test is to ensure interoperability with the examples provided by Blake Dournaee * from RSA Security using Cert-J 2.01. These test vectors are located in the directory * data/com/rsasecurity/bdournaee/. * * @author $Author: coheigea $ * @see RSA BSAFE Cert-J */ public class RSASecurityTest extends InteropTestBase { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(RSASecurityTest.class.getName()); /** Field blakesDir */ static String blakesDir = "src/test/resources/com/rsasecurity/bdournaee/"; static { String basedir = System.getProperty("basedir"); if(basedir != null && !"".equals(basedir)) { blakesDir = basedir + "/" + blakesDir; } org.apache.xml.security.Init.init(); } /** * Constructor RSASecurityTest */ public RSASecurityTest() { super(); } @org.junit.Test public void test_enveloping() throws Exception { String filename = blakesDir + "certj201_enveloping.xml"; boolean followManifests = false; ResourceResolverSpi resolver = null; boolean verify = this.verify(filename, resolver, followManifests); if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } @org.junit.Test public void test_enveloped() throws Exception { String filename = blakesDir + "certj201_enveloped.xml"; boolean followManifests = false; ResourceResolverSpi resolver = null; boolean verify = this.verify(filename, resolver, followManifests); if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/interop/IBMTest.java0000644000175000017500000002262111551556206030272 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.interop; import java.io.File; import org.apache.xml.security.test.utils.resolver.OfflineResolver; import org.apache.xml.security.utils.JavaUtils; import org.apache.xml.security.utils.resolver.ResourceResolverSpi; /** * This test is to ensure interoperability with the examples provided by the IBM * XML Security Suite. They have to be located in the directory * data/com/ibm/xss4j-20030127/. *
* For license issues, the vectors are not included in the distibution. See * the interop page for more on this. * * @see The IBM alphaWorks Website */ /* * To make interop against the IBM xss4j examples, download the * XSS4j from http://www.alphaworks.ibm.com/tech/xmlsecuritysuite * and extract the test signatures from * xss4j-20030127.zip#/xss4j/data/dsig * in the directory * data/com/ibm/xss4j-20030127/ * then the interop test is performed against these values, too. */ public class IBMTest extends InteropTestBase { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(IBMTest.class.getName()); /** Field kentsDir */ static final String kentsDir = "data/com/ibm/xss4j-20030127/"; static { org.apache.xml.security.Init.init(); } private boolean runTests = false; /** * Constructor IBMTest * * @param Name_ */ public IBMTest() { super(); String filename = "src/test/resources/com/ibm/xss4j-20011029/enveloped-rsa.sig"; File f = new File(filename); if (f.exists()) { runTests = true; } } /** * Method test_enveloping_hmac * * @throws Exception */ @org.junit.Test public void test_enveloping_hmac() throws Exception { if (!runTests) { return; } String filename = kentsDir + "enveloping-hmac.sig"; ResourceResolverSpi resolver = new OfflineResolver(); boolean followManifests = false; byte[] hmacKey = JavaUtils.getBytesFromFile(kentsDir + "enveloping-hmac.key"); boolean verify = false; try { verify = this.verifyHMAC(filename, resolver, followManifests, hmacKey); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_detached_dsa * * @throws Exception */ @org.junit.Test public void test_detached_dsa() throws Exception { if (!runTests) { return; } String filename = kentsDir + "detached-dsa.sig"; ResourceResolverSpi resolver = new OfflineResolver(); boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_detached_rsa * * @throws Exception */ @org.junit.Test public void test_detached_rsa() throws Exception { if (!runTests) { return; } String filename = kentsDir + "detached-rsa.sig"; ResourceResolverSpi resolver = new OfflineResolver(); boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_enveloped_dsa * * @throws Exception */ @org.junit.Test public void test_enveloped_dsa() throws Exception { if (!runTests) { return; } String filename = kentsDir + "enveloped-dsa.sig"; ResourceResolverSpi resolver = null; boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_enveloped_rsa * * @throws Exception */ @org.junit.Test public void test_enveloped_rsa() throws Exception { if (!runTests) { return; } String filename = kentsDir + "enveloped-rsa.sig"; ResourceResolverSpi resolver = null; boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_enveloping_dsa * * @throws Exception */ @org.junit.Test public void test_enveloping_dsa() throws Exception { if (!runTests) { return; } String filename = kentsDir + "enveloping-dsa.sig"; ResourceResolverSpi resolver = null; boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_enveloping_rsa * * @throws Exception */ @org.junit.Test public void test_enveloping_rsa() throws Exception { if (!runTests) { return; } String filename = kentsDir + "enveloping-rsa.sig"; ResourceResolverSpi resolver = null; boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (!verify) { log.error("Verification failed for " + filename); } assertTrue(filename, verify); } /** * Method test_enveloping_dsa_soaped_broken * * @throws Exception */ @org.junit.Test public void test_enveloping_dsa_soaped_broken() throws Exception { if (!runTests) { return; } String filename = kentsDir + "enveloping-dsa-soaped-broken.sig"; if (!new File(filename).exists() ) { System.err.println("Couldn't find: " + filename + " and couldn't do the test"); return; } ResourceResolverSpi resolver = null; boolean followManifests = false; boolean verify = true; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error("Verification crashed for " + filename); throw ex; } if (verify) { log.error("Verification failed for " + filename + ", had to be broken but was successful"); } assertTrue(filename, !verify); } /** * Method test_enveloping_exclusive * * @throws Exception * $todo$ implement exclusive-c14n */ @org.junit.Ignore public void _not_active_test_enveloping_exclusive() throws Exception { // exclusive c14n not supported yet } /** * Method test_enveloping_exclusive_soaped * * @throws Exception * $todo$ implement exclusive-c14n */ @org.junit.Ignore public void _not_active_test_enveloping_exclusive_soaped() throws Exception { // exclusive c14n not supported yet } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/secure_val/0000755000175000017500000000000012273503732026623 5ustar tonytony././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/secure_val/ForbiddenRetrievalMethodTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/secure_val/ForbiddenRetrievalM0000644000175000017500000000444012214631242032430 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.secure_val; import java.io.FileInputStream; import javax.xml.parsers.DocumentBuilder; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; /** * This is a test for a Retrieval Method pointing to another Retrieval Method (forbidden under * secure validation). */ public class ForbiddenRetrievalMethodTest extends org.junit.Assert { private static final String BASEDIR = System.getProperty("basedir"); private static final String SEP = System.getProperty("file.separator"); public ForbiddenRetrievalMethodTest() { org.apache.xml.security.Init.init(); } @org.junit.Test public void testMultipleRetrievalMethods() throws Exception { FileInputStream fis = null; String filename = "src/test/resources/org/apache/xml/security/keyresolver/retrievalmethod3.xml"; if (BASEDIR != null && !"".equals(BASEDIR)) { fis = new FileInputStream(BASEDIR + SEP + filename); } else { fis = new FileInputStream(filename); } DocumentBuilder db = XMLUtils.createDocumentBuilder(false); Document doc = db.parse(fis); KeyInfo keyInfo = new KeyInfo(doc.getDocumentElement(), null); keyInfo.setSecureValidation(true); // Check neither of these give a StackOverflowError. assertNull(keyInfo.getPublicKey()); assertNull(keyInfo.getX509Certificate()); } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/secure_val/ForbiddenReferenceTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/secure_val/ForbiddenReferenceT0000644000175000017500000000603512214631242032402 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.secure_val; import java.io.File; import org.apache.xml.security.signature.Manifest; import org.apache.xml.security.signature.MissingResourceFailureException; import org.apache.xml.security.test.interop.InteropTestBase; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * This is a test for a forbidden Reference algorithm when secure validation is enabled. */ public class ForbiddenReferenceTest extends InteropTestBase { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ForbiddenReferenceTest.class.getName()); static { org.apache.xml.security.Init.init(); } public ForbiddenReferenceTest() { super(); } @org.junit.Test public void testLocalFilesystem() throws Exception { boolean success = readAndVerifyManifest("src/test/resources/interop/c14n/Y3", "signature.xml", false); assertTrue(success); try { readAndVerifyManifest("src/test/resources/interop/c14n/Y3", "signature.xml", true); fail("Failure expected when secure validation is enabled"); } catch (MissingResourceFailureException ex) { assertTrue(ex.getMessage().contains("The Reference for URI")); } } private boolean readAndVerifyManifest( String directory, String file, boolean secValidation ) throws Exception { String basedir = System.getProperty("basedir"); if (basedir != null && !"".equals(basedir)) { directory = basedir + "/" + directory; } File f = new File(directory + "/" + file); javax.xml.parsers.DocumentBuilder db = XMLUtils.createDocumentBuilder(false); org.w3c.dom.Document doc = db.parse(f); Element manifestElement = (Element) doc.getElementsByTagNameNS(Constants.SignatureSpecNS, Constants._TAG_SIGNEDINFO).item(0); Manifest manifest = new Manifest(manifestElement, f.toURI().toURL().toString(), secValidation); return manifest.verifyReferences(); } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/secure_val/WrappingAttackTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/secure_val/WrappingAttackTest.0000644000175000017500000001020712234743735032411 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.secure_val; import java.io.File; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.signature.XMLSignatureException; import org.apache.xml.security.test.interop.InteropTestBase; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * This is a test for a wrapping attack. */ public class WrappingAttackTest extends InteropTestBase { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(WrappingAttackTest.class.getName()); static { org.apache.xml.security.Init.init(); } public WrappingAttackTest() { super(); } @org.junit.Test public void testWrappingAttack() throws Exception { boolean success = readAndVerifySignature( "src/test/resources/at/iaik/ixsil/coreFeatures/signatures", "manifestSignatureWrapping.xml" ); assertTrue(success); try { readAndVerifySignatureAndSetManifest( "src/test/resources/at/iaik/ixsil/coreFeatures/signatures", "manifestSignatureWrapping.xml" ); fail("Failure expected when secure validation is enabled"); } catch (XMLSignatureException ex) { assertTrue(ex.getMessage().contains("no XMLSignatureInput")); } } private boolean readAndVerifySignature( String directory, String file ) throws Exception { String basedir = System.getProperty("basedir"); if (basedir != null && !"".equals(basedir)) { directory = basedir + "/" + directory; } File f = new File(directory + "/" + file); javax.xml.parsers.DocumentBuilder db = XMLUtils.createDocumentBuilder(false, false); org.w3c.dom.Document doc = db.parse(f); Element sigElement = (Element) doc.getElementsByTagNameNS(Constants.SignatureSpecNS, Constants._TAG_SIGNATURE).item(0); XMLSignature signature = new XMLSignature(sigElement, f.toURI().toURL().toString()); return signature.checkSignatureValue(signature.getKeyInfo().getPublicKey()); } private boolean readAndVerifySignatureAndSetManifest( String directory, String file ) throws Exception { String basedir = System.getProperty("basedir"); if (basedir != null && !"".equals(basedir)) { directory = basedir + "/" + directory; } File f = new File(directory + "/" + file); javax.xml.parsers.DocumentBuilder db = XMLUtils.createDocumentBuilder(false, false); org.w3c.dom.Document doc = db.parse(f); Element sigElement = (Element) doc.getElementsByTagNameNS(Constants.SignatureSpecNS, Constants._TAG_SIGNATURE).item(0); Element manifestElement = (Element) doc.getElementsByTagName("Manifest").item(0); manifestElement.setIdAttribute("Id", true); XMLSignature signature = new XMLSignature(sigElement, f.toURI().toURL().toString(), true); return signature.checkSignatureValue(signature.getKeyInfo().getPublicKey()); } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/secure_val/ForbiddenAlgorithmTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/secure_val/ForbiddenAlgorithmT0000644000175000017500000000610512234743735032445 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.secure_val; import java.io.File; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.signature.XMLSignatureException; import org.apache.xml.security.test.interop.InteropTestBase; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * This is a test for a forbidden algorithm (MD5) when secure validation is enabled. */ public class ForbiddenAlgorithmTest extends InteropTestBase { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ForbiddenAlgorithmTest.class.getName()); static { org.apache.xml.security.Init.init(); } public ForbiddenAlgorithmTest() { super(); } @org.junit.Test public void testMD5Digest() throws Exception { boolean success = readAndVerifySignature("src/test/resources/interop/c14n/Y2", "signature-joseph-exc.xml", false); assertTrue(success); try { readAndVerifySignature("src/test/resources/interop/c14n/Y2", "signature-joseph-exc.xml", true); fail("Failure expected when secure validation is enabled"); } catch (XMLSignatureException ex) { assertTrue(ex.getMessage().contains("no XMLSignatureInput")); } } private boolean readAndVerifySignature( String directory, String file, boolean secValidation ) throws Exception { String basedir = System.getProperty("basedir"); if (basedir != null && !"".equals(basedir)) { directory = basedir + "/" + directory; } File f = new File(directory + "/" + file); javax.xml.parsers.DocumentBuilder db = XMLUtils.createDocumentBuilder(false, false); org.w3c.dom.Document doc = db.parse(f); Element sigElement = (Element) doc.getElementsByTagNameNS(Constants.SignatureSpecNS, Constants._TAG_SIGNATURE).item(0); XMLSignature signature = new XMLSignature(sigElement, f.toURI().toURL().toString(), secValidation); return signature.checkSignatureValue(signature.getKeyInfo().getPublicKey()); } } ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/secure_val/ForbiddenRefCountTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/secure_val/ForbiddenRefCountTe0000644000175000017500000000604612214631242032400 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.secure_val; import java.io.File; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.signature.Manifest; import org.apache.xml.security.test.interop.InteropTestBase; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * This is a test for a forbidden number of references when secure validation is enabled. */ public class ForbiddenRefCountTest extends InteropTestBase { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ForbiddenRefCountTest.class.getName()); static { org.apache.xml.security.Init.init(); } public ForbiddenRefCountTest() { super(); } @org.junit.Test public void testReferenceCount() throws Exception { boolean success = readAndVerifyManifest("src/test/resources/interop/c14n/Y4", "signature-manifest.xml", false); assertTrue(success); try { readAndVerifyManifest("src/test/resources/interop/c14n/Y4", "signature-manifest.xml", true); fail("Failure expected when secure validation is enabled"); } catch (XMLSecurityException ex) { assertTrue(ex.getMessage().contains("references are contained in the Manifest")); } } private boolean readAndVerifyManifest( String directory, String file, boolean secValidation ) throws Exception { String basedir = System.getProperty("basedir"); if (basedir != null && !"".equals(basedir)) { directory = basedir + "/" + directory; } File f = new File(directory + "/" + file); javax.xml.parsers.DocumentBuilder db = XMLUtils.createDocumentBuilder(false); org.w3c.dom.Document doc = db.parse(f); Element manifestElement = (Element) doc.getElementsByTagNameNS(Constants.SignatureSpecNS, Constants._TAG_SIGNEDINFO).item(0); Manifest manifest = new Manifest(manifestElement, f.toURI().toURL().toString(), secValidation); return manifest.verifyReferences(); } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/algorithms/0000755000175000017500000000000012273503732026644 5ustar tonytony././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/algorithms/SignatureAlgorithmTest.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/algorithms/SignatureAlgorithmT0000644000175000017500000000500712214631242032516 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.algorithms; import java.security.KeyPairGenerator; import java.security.PrivateKey; import org.apache.xml.security.algorithms.SignatureAlgorithm; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; public class SignatureAlgorithmTest extends org.junit.Assert { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(SignatureAlgorithmTest.class.getName()); static { org.apache.xml.security.Init.init(); } @org.junit.Test public void testSameKeySeveralAlgorithmSigning() throws Exception { Document doc = XMLUtils.createDocumentBuilder(false).newDocument(); SignatureAlgorithm signatureAlgorithm = new SignatureAlgorithm(doc, XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA1); PrivateKey pk = KeyPairGenerator.getInstance("RSA").genKeyPair().getPrivate(); signatureAlgorithm.initSign(pk); signatureAlgorithm.update((byte)2); signatureAlgorithm.sign(); SignatureAlgorithm otherSignatureAlgorithm = new SignatureAlgorithm(doc, XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA256); try { otherSignatureAlgorithm.initSign(pk); } catch (XMLSecurityException ex) { log.warn( "Test testSameKeySeveralAlgorithmSigning skipped as necessary algorithms " + "not available" ); return; } otherSignatureAlgorithm.update((byte)2); otherSignatureAlgorithm.sign(); } } libxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/resource/0000755000175000017500000000000012273503732026322 5ustar tonytonylibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/resource/testvectors.zip0000644000175000017500000002050007356016223031430 0ustar tonytonyPK Gj-+ data/org/PK Lj-+data/org/apache/PK Lj-+data/org/apache/xml/PK Aj-+data/org/apache/xml/security/PK Aj-+"data/org/apache/xml/security/c14n/PK Aj-+%data/org/apache/xml/security/c14n/in/PK*,\s9data/org/apache/xml/security/c14n/in/31_c14n-comments.xmlU10 @=p3cš& רTrH5=.X`H mm,UXiBMzMg ޸S'1 eع%gz ]ȸ./G0N2o]PKa*|]Yd0data/org/apache/xml/security/c14n/in/31_c14n.xml1 WTfXLj R^]/al*@G1data/org/apache/xml/security/c14n/in/31_input.xmle0@wlAt-0 Fc@R(ۊ{/w";oMep nhQhDfg¤~Q,e9fɯN׼oXʺ |SI3*w0Q@C{8OESK~wlmqPK*VG0data/org/apache/xml/security/c14n/in/32_c14n.xmlIORPPIIM̳!LhJfQI%H!lnfEj RSP p5( t#PKM>*G&H1data/org/apache/xml/security/c14n/in/32_input.xmlIORPPIIM̳!LpJfQI%H!tnfEj Rc0 d\ ~b><صPK*)k\0data/org/apache/xml/security/c14n/in/33_c14n.xml} E~aӝ5꾟ulM@bZ5M7s iEIឧl>08KpLpI]fHK"Fv;J*yF$Egu0[u/(;#+N]!Zw}$^r!()433Y zmVѫCV/?=t=ρ}J j|~A EK?PKAq*y`J_1data/org/apache/xml/security/c14n/in/33_input.xmlMk0 Ujdv ;̗2vpu+MI]ҟ?i6|-+ Gׅ\=CR%,L3ڪ|&wӣqg(hW@& 29]votzkG *Z,R@Һ~ \=9??bʲnyݧ U0-AgefzU`5I5H\"eK*z<.vϵ ZG%f2c)mpA.Wlq 7(GԴo !fC׈e?Jo\?a bd3P(1PKҚ*'Adata/org/apache/xml/security/c14n/in/34_c14n_validatingParser.xmlm0 |"N1tlS547=]iǎsيJ$O򞜳es14Z_@}娠;SȱnBɒYgՍ-&URpS'?r[D!#h9zFB^$v߱@L P eG!YC?blySÓIۺ,?o>wVu|֫/PKך*7;EBdata/org/apache/xml/security/c14n/in/34_input_validatingParser.xmluk0zԶ-Ue19j$?1a̕'-&(Ĕ d1hd v$zOP+%!{j1h(>譕!Þ q10%YϺH/VI#xD4.< h Ңeq)DU|_~ĦX)'ӏ~. pfbºه]Z'Ӷs?Xy~JvPK[*X7 <data/org/apache/xml/security/c14n/in/34_validatingParser.txtMN@ ~zFHn$+ѮзǛ"xIu>XI~h<]e^4mwIQ)N<Ǥ@ñ/%Xrz, W'~3AwtI#:V0%jt5 RlG萅]NFufLFptT@ W1e=t̿=`6٢#SG"b,b43AR'KBmKC DEPKw* S010data/org/apache/xml/security/c14n/in/35_c14n.xmlIOVH,))r(q+UJ+2*Dž!H1data/org/apache/xml/security/c14n/in/35_input.xml]AK@eQ0{mYp!M K!@8yDYJNs-ޯ6QJf$ tAjܘ.7:{ Yc+OPo< N]+TuEz ur%2%QɾT(RuƋR2e'Y7t0:/D1r,=:+Moxjc=::{ı7PK }*  0data/org/apache/xml/security/c14n/in/36_c14n.xml©PKM>* ]?@1data/org/apache/xml/security/c14n/in/36_input.xmlQ(K-*ϳU23PRHKOKU ׵05TIOSS64yPKRL>*ȓtUr0data/org/apache/xml/security/c14n/in/37_c14n.xmlI5T+U())///L-I/JWY'ȗelRa2Sl\Z Sm RSR*SAPKM>*l 1data/org/apache/xml/security/c14n/in/37_input.xmlQtw pUHOVQt QH5Rͱ*.HLNUHIMK,))(J-N-*KTP1P+d(x(({xecA*@ +U())///L-I/JWY'ȗe(((ؤB`8% X[%Wc%}bT#`3lPKM>*/ 4data/org/apache/xml/security/c14n/in/37_subset.xpathu 0DSRHz *^ 񰴫MIWW[00f6 pB[BCu 1$mq9ST1] pnV qB(VG`@K ̀X~r̤CsQLbua5{kplX / PK m*uu,data/org/apache/xml/security/c14n/in/doc.dtdPKM>*S$?\i,data/org/apache/xml/security/c14n/in/foo.xmlA @}&Yv %'ۧ&U#,!*@G1 data/org/apache/xml/security/c14n/in/31_input.xmlPK*VG0 data/org/apache/xml/security/c14n/in/32_c14n.xmlPKM>*G&H1 =data/org/apache/xml/security/c14n/in/32_input.xmlPK*)k\0 data/org/apache/xml/security/c14n/in/33_c14n.xmlPKAq*y`J_1 data/org/apache/xml/security/c14n/in/33_input.xmlPKot*c#0 6data/org/apache/xml/security/c14n/in/34_c14n.xmlPKҚ*'A Wdata/org/apache/xml/security/c14n/in/34_c14n_validatingParser.xmlPKn*1 z data/org/apache/xml/security/c14n/in/34_input.xmlPKך*7;EB data/org/apache/xml/security/c14n/in/34_input_validatingParser.xmlPK[*X7 < > data/org/apache/xml/security/c14n/in/34_validatingParser.txtPKw* S010 data/org/apache/xml/security/c14n/in/35_c14n.xmlPKM>*Dž!H1 #data/org/apache/xml/security/c14n/in/35_input.xmlPK }*  0 Edata/org/apache/xml/security/c14n/in/36_c14n.xmlPKM>* ]?@1 data/org/apache/xml/security/c14n/in/36_input.xmlPKRL>*ȓtUr0 .data/org/apache/xml/security/c14n/in/37_c14n.xmlPKM>*l 1 data/org/apache/xml/security/c14n/in/37_input.xmlPKM>*/ 4 data/org/apache/xml/security/c14n/in/37_subset.xpathPK m*uu, data/org/apache/xml/security/c14n/in/doc.dtdPKM>*S$?\i, 3data/org/apache/xml/security/c14n/in/foo.xmlPKt*z/ data/org/apache/xml/security/c14n/in/md5sum.txtPKh*vIBHG data/org/apache/xml/security/c14n/in/testTranslationFromUTF16toUTF8.xmlPK =}*Cw:. data/org/apache/xml/security/c14n/in/world.txtPK Aj-+Adata/PK 3././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/resource/TestVectorResolver.javalibxml-security-java-1.5.6/src/test/java/org/apache/xml/security/test/resource/TestVectorResolver.ja0000644000175000017500000001355311551556206032473 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.xml.security.test.resource; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import org.xml.sax.EntityResolver; import org.xml.sax.InputSource; /** * This package is responsible for retrieving test vectors for our unit tests. * * @author Christian Geuer-Pollmann * $todo$ Currently, the test vectors are in the file system under the data/ directory. * It is planned to put them all into a single jar/zip which is deployed with the library. */ public class TestVectorResolver implements EntityResolver { /** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(TestVectorResolver.class.getName()); /** Field alreadyInitialized */ static boolean alreadyInitialized = false; /** Field zis */ static java.util.zip.ZipInputStream zis = null; /** Field vectors */ static java.util.Map vectors = null; static { org.apache.xml.security.Init.init(); TestVectorResolver.init(); } /** Field _firstEntityResolved */ boolean _firstEntityResolved = false; /** Field _firstEntitySystemId */ String _firstEntitySystemIdDirectory = null; /** * Method init * */ public static void init() { String thisClass = "org.apache.xml.security.test.resource.TestVectorResolver"; String testVectorFile = "testvectors.zip"; if (!TestVectorResolver.alreadyInitialized) { TestVectorResolver.alreadyInitialized = true; TestVectorResolver.vectors = new java.util.HashMap(30); try { zis = new java.util.zip.ZipInputStream( Class.forName(thisClass).getResourceAsStream(testVectorFile) ); java.util.zip.ZipEntry ze = null; while ((ze = zis.getNextEntry()) != null) { if (!ze.isDirectory()) { byte data[] = org.apache.xml.security.utils.JavaUtils.getBytesFromStream(zis); TestVectorResolver.vectors.put(ze.getName(), data); log.debug("Contents of " + thisClass + "/" + testVectorFile + "#" + ze.getName() + " " + data.length + " bytes"); } } } catch (java.lang.ClassNotFoundException e) { // } catch (java.io.IOException e) { // } } } /** * Method getCurrentDir * * * @throws IOException */ private String getCurrentDir() throws IOException { String currentDir = new java.io.File(".").getCanonicalPath(); currentDir = currentDir.replace(File.separatorChar, '/'); currentDir = "file:///" + currentDir + "/"; return currentDir; } /** * Method getFileName * * @param systemId * * @throws IOException */ private String getFileName(String systemId) throws IOException { // clean up file name String currentDir = getCurrentDir(); if (systemId.startsWith(currentDir)) { return systemId.substring(currentDir.length()); } else { return systemId; } } /** * Method getFilePath * * @param systemId * * @throws IOException */ private String getFilePath(String systemId) throws IOException { String t = new File(systemId).getCanonicalPath(); t = t.replace(File.separatorChar, '/'); t = "file:///" + t; String currentDir = getCurrentDir(); if (t.startsWith(currentDir)) { t = t.substring(currentDir.length()); } t = t.substring(0, t.lastIndexOf("/")); return t; } /** * Method set1stSystemId * * @param systemId * @throws IOException */ private void set1stSystemId(String systemId) throws IOException { this._firstEntitySystemIdDirectory = getFilePath(systemId); log.debug("this._firstEntitySystemIdDirectory = " + this._firstEntitySystemIdDirectory); } /** * Method resolveEntity * * @param publicId * @param systemId * */ public InputSource resolveEntity(String publicId, String systemId) { try { if (!this._firstEntityResolved) { this.set1stSystemId(systemId); } systemId = this.getFileName(systemId); log.debug("publicId=\"" + publicId + "\" systemId=\"" + systemId + "\""); // InputStream result = this.getInputStream(systemId); // return new InputSource(result); return new InputSource(new FileInputStream(systemId)); } catch (FileNotFoundException ex) { return null; } catch (IOException ex) { return null; } } } libxml-security-java-1.5.6/src/test/java/javax/0000755000175000017500000000000012273503732020146 5ustar tonytonylibxml-security-java-1.5.6/src/test/java/javax/xml/0000755000175000017500000000000012273503732020746 5ustar tonytonylibxml-security-java-1.5.6/src/test/java/javax/xml/crypto/0000755000175000017500000000000012273503732022266 5ustar tonytonylibxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/0000755000175000017500000000000012273503733023246 5ustar tonytonylibxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/KeySelectors.java0000644000175000017500000004030611734555025026532 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test; import java.io.*; import java.security.*; import java.security.cert.*; import java.util.*; import javax.xml.crypto.*; import javax.xml.crypto.dsig.keyinfo.*; import javax.crypto.SecretKey; /** * This is a class which supplies several KeySelector implementations * * @author Sean Mullan * @author Valerie Peng */ public class KeySelectors { /** * KeySelector which would always return the secret key specified in its * constructor. */ public static class SecretKeySelector extends KeySelector { private SecretKey key; public SecretKeySelector(byte[] bytes) { key = wrapBytes(bytes); } public SecretKeySelector(SecretKey key) { this.key = key; } public KeySelectorResult select(KeyInfo ki, KeySelector.Purpose purpose, AlgorithmMethod method, XMLCryptoContext context) throws KeySelectorException { return new SimpleKSResult(key); } private SecretKey wrapBytes(final byte[] bytes) { return new SecretKey() { private static final long serialVersionUID = 3457835482691931082L; public String getFormat() { return "RAW"; } public String getAlgorithm() { return "Secret key"; } public byte[] getEncoded() { return (byte[]) bytes.clone(); } }; } } /** * KeySelector which would retrieve the X509Certificate out of the * KeyInfo element and return the public key. * NOTE: If there is an X509CRL in the KeyInfo element, then revoked * certificate will be ignored. */ public static class RawX509KeySelector extends KeySelector { public KeySelectorResult select(KeyInfo keyInfo, KeySelector.Purpose purpose, AlgorithmMethod method, XMLCryptoContext context) throws KeySelectorException { if (keyInfo == null) { throw new KeySelectorException("Null KeyInfo object!"); } // search for X509Data in keyinfo Iterator iter = keyInfo.getContent().iterator(); while (iter.hasNext()) { XMLStructure kiType = (XMLStructure) iter.next(); if (kiType instanceof X509Data) { X509Data xd = (X509Data) kiType; Object[] entries = xd.getContent().toArray(); X509CRL crl = null; // Looking for CRL before finding certificates for (int i = 0; (i < entries.length && crl == null); i++) { if (entries[i] instanceof X509CRL) { crl = (X509CRL) entries[i]; } } Iterator xi = xd.getContent().iterator(); while (xi.hasNext()) { Object o = xi.next(); // skip non-X509Certificate entries if (o instanceof X509Certificate) { if ((purpose != KeySelector.Purpose.VERIFY) && (crl != null) && crl.isRevoked((X509Certificate)o)) { continue; } else { return new SimpleKSResult (((X509Certificate)o).getPublicKey()); } } } } } throw new KeySelectorException("No X509Certificate found!"); } } /** * KeySelector which would retrieve the public key out of the * KeyValue element and return it. * NOTE: If the key algorithm doesn't match signature algorithm, * then the public key will be ignored. */ public static class KeyValueKeySelector extends KeySelector { public KeySelectorResult select(KeyInfo keyInfo, KeySelector.Purpose purpose, AlgorithmMethod method, XMLCryptoContext context) throws KeySelectorException { if (keyInfo == null) { throw new KeySelectorException("Null KeyInfo object!"); } List list = keyInfo.getContent(); for (int i = 0; i < list.size(); i++) { XMLStructure xmlStructure = (XMLStructure) list.get(i); if (xmlStructure instanceof KeyValue) { PublicKey pk = null; try { pk = ((KeyValue)xmlStructure).getPublicKey(); } catch (KeyException ke) { throw new KeySelectorException(ke); } return new SimpleKSResult(pk); } } throw new KeySelectorException("No KeyValue element found!"); } } /** * KeySelector which would perform special lookup as documented * by the ie/baltimore/merlin-examples testcases and return the * matching public key. */ public static class CollectionKeySelector extends KeySelector { private CertificateFactory certFac; private File certDir; private List certs; private static final int MATCH_SUBJECT = 0; private static final int MATCH_ISSUER = 1; private static final int MATCH_SERIAL = 2; private static final int MATCH_SUBJECT_KEY_ID = 3; private static final int MATCH_CERTIFICATE = 4; public CollectionKeySelector(File dir) { certDir = dir; try { certFac = CertificateFactory.getInstance("X509"); } catch (CertificateException ex) { // not going to happen } certs = new Vector(); File[] files = new File(certDir, "certs").listFiles(); for (File file : files) { try { certs.add((X509Certificate)certFac.generateCertificate (new FileInputStream(file))); } catch (Exception ex) { // ignore non-cert files } } } public List match( int matchType, Object value, List pool ) { List matchResult = new Vector(); for (X509Certificate c : pool) { switch (matchType) { case MATCH_SUBJECT: Principal p1 = new javax.security.auth.x500.X500Principal((String)value); if (c.getSubjectX500Principal().equals(p1)) { matchResult.add(c); } break; case MATCH_ISSUER: Principal p2 = new javax.security.auth.x500.X500Principal((String)value); if (c.getIssuerX500Principal().equals(p2)) { matchResult.add(c); } break; case MATCH_SERIAL: if (c.getSerialNumber().equals(value)) { matchResult.add(c); } break; case MATCH_SUBJECT_KEY_ID: byte[] extension = c.getExtensionValue("2.5.29.14"); if (extension != null) { byte extVal[] = new byte[extension.length - 4]; System.arraycopy(extension, 4, extVal, 0, extVal.length); if (Arrays.equals(extVal, (byte[]) value)) { matchResult.add(c); } } break; case MATCH_CERTIFICATE: if (c.equals(value)) { matchResult.add(c); } break; } } return matchResult; } public KeySelectorResult select(KeyInfo keyInfo, KeySelector.Purpose purpose, AlgorithmMethod method, XMLCryptoContext context) throws KeySelectorException { if (keyInfo == null) { throw new KeySelectorException("Null KeyInfo object!"); } Iterator iter = keyInfo.getContent().iterator(); while (iter.hasNext()) { XMLStructure xmlStructure = (XMLStructure) iter.next(); try { if (xmlStructure instanceof KeyName) { String name = ((KeyName)xmlStructure).getName(); PublicKey pk = null; try { // Lookup the public key using the key name 'Xxx', // i.e. the public key is in "certs/xxx.crt". File certFile = new File(new File(certDir, "certs"), name.toLowerCase()+".crt"); X509Certificate cert = (X509Certificate) certFac.generateCertificate (new FileInputStream(certFile)); pk = cert.getPublicKey(); } catch (FileNotFoundException e) { // assume KeyName contains subject DN and search // collection of certs for match List result = match(MATCH_SUBJECT, name, certs); int numOfMatches = (result == null? 0 : result.size()); if (numOfMatches != 1) { throw new KeySelectorException ((numOfMatches == 0 ? "No":"More than one") + " match found"); } pk = ((X509Certificate)result.get(0)).getPublicKey(); } return new SimpleKSResult(pk); } else if (xmlStructure instanceof RetrievalMethod) { // Lookup the public key using the retrieval method. // NOTE: only X509Certificate type is supported. RetrievalMethod rm = (RetrievalMethod) xmlStructure; String type = rm.getType(); if (type.equals(X509Data.RAW_X509_CERTIFICATE_TYPE)) { String uri = rm.getURI(); X509Certificate cert = (X509Certificate) certFac.generateCertificate (new FileInputStream(new File(certDir, uri))); return new SimpleKSResult(cert.getPublicKey()); } else { throw new KeySelectorException ("Unsupported RetrievalMethod type"); } } else if (xmlStructure instanceof X509Data) { List content = ((X509Data)xmlStructure).getContent(); int size = content.size(); List result = null; // Lookup the public key using the information // specified in X509Data element, i.e. searching // over the collection of certificate files under // "certs" subdirectory and return those match. for (int k = 0; k < size; k++) { Object obj = content.get(k); if (obj instanceof String) { result = match(MATCH_SUBJECT, obj, certs); } else if (obj instanceof byte[]) { result = match(MATCH_SUBJECT_KEY_ID, obj, certs); } else if (obj instanceof X509Certificate) { result = match(MATCH_CERTIFICATE, obj, certs); } else if (obj instanceof X509IssuerSerial) { X509IssuerSerial is = (X509IssuerSerial) obj; result = match(MATCH_SERIAL, is.getSerialNumber(), certs); result = match(MATCH_ISSUER, is.getIssuerName(), result); } else { throw new KeySelectorException("Unsupported X509Data: " + obj); } } int numOfMatches = (result == null ? 0 : result.size()); if (numOfMatches != 1) { throw new KeySelectorException ((numOfMatches==0?"No":"More than one") + " match found"); } return new SimpleKSResult(((X509Certificate) result.get(0)).getPublicKey()); } } catch (Exception ex) { throw new KeySelectorException(ex); } } throw new KeySelectorException("No matching key found!"); } } public static class ByteUtil { private static String mapping = "0123456789ABCDEF"; private static int numBytesPerRow = 6; private static String getHex(byte value) { int low = value & 0x0f; int high = ((value >> 4) & 0x0f); char[] res = new char[2]; res[0] = mapping.charAt(high); res[1] = mapping.charAt(low); return new String(res); } public static String dumpArray(byte[] in) { int numDumped = 0; StringBuffer buf = new StringBuffer(512); buf.append("{"); for (int i = 0;i < (in.length / numBytesPerRow); i++) { for (int j=0; j < (numBytesPerRow); j++) { buf.append("(byte)0x" + getHex(in[i * numBytesPerRow+j]) + ", "); } numDumped += numBytesPerRow; } while (numDumped < in.length) { buf.append("(byte)0x" + getHex(in[numDumped]) + " "); numDumped += 1; } buf.append("}"); return buf.toString(); } } private static class SimpleKSResult implements KeySelectorResult { private final Key key; SimpleKSResult(Key key) { this.key = key; } public Key getKey() { return key; } } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/0000755000175000017500000000000012273503733024174 5ustar tonytonylibxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/SignatureMethodTest.java0000644000175000017500000000646111654523221031004 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import javax.xml.crypto.dsig.*; import java.security.*; /** * Unit test for javax.xml.crypto.dsig.SignatureMethod * * @author Valerie Peng */ public class SignatureMethodTest extends org.junit.Assert { XMLSignatureFactory factory; private static final String SIG_ALGOS[] = { SignatureMethod.DSA_SHA1, SignatureMethod.RSA_SHA1, SignatureMethod.HMAC_SHA1 }; public SignatureMethodTest() throws Exception { factory = XMLSignatureFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); } @org.junit.Test public void testisFeatureSupported() throws Exception { SignatureMethod sm; for (int i = 0; i < SIG_ALGOS.length; i++) { String algo = SIG_ALGOS[i]; sm = factory.newSignatureMethod(algo, null); try { sm.isFeatureSupported(null); fail("Should raise a NPE for null feature"); } catch (NullPointerException npe) {} assertTrue(!sm.isFeatureSupported("not supported")); } } @org.junit.Test public void testConstructor() throws Exception { // test XMLSignatureFactory.newAlgorithmMethod // (String algorithm, AlgorithmParameterSpec params) // for generating SignatureMethod objects SignatureMethod sm; for (int i = 0; i < SIG_ALGOS.length; i++) { String algo = SIG_ALGOS[i]; sm = factory.newSignatureMethod(algo, null); assertEquals(sm.getAlgorithm(), algo); assertNull(sm.getParameterSpec()); try { sm = factory.newSignatureMethod (algo, new TestUtils.MyOwnSignatureMethodParameterSpec()); fail("Should raise an IAPE for invalid parameters"); } catch (InvalidAlgorithmParameterException iape) { } catch (Exception ex) { fail("Should raise an IAPE instead of " + ex); } } try { sm = factory.newSignatureMethod("non-existent", null); fail("Should raise an NSAE for non-existent algos"); } catch (NoSuchAlgorithmException nsae) { // } try { sm = factory.newSignatureMethod(null, null); fail("Should raise a NPE for null algo"); } catch (NullPointerException npe) { // } } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/JSRForbiddenRefCountTest.java0000644000175000017500000000560512214631242031616 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package javax.xml.crypto.test.dsig; import java.io.File; import java.security.Security; import javax.xml.crypto.MarshalException; import javax.xml.crypto.dom.DOMCryptoContext; import org.apache.jcp.xml.dsig.internal.dom.DOMSignedInfo; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Element; /** * This is a test for a forbidden number of references when secure validation is enabled. */ public class JSRForbiddenRefCountTest extends org.junit.Assert { static { Security.insertProviderAt(new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } @org.junit.Test public void testReferenceCount() throws Exception { Element signedInfoElement = getSignedInfoElement("src/test/resources/interop/c14n/Y4", "signature-manifest.xml"); InternalDOMCryptoContext context = new InternalDOMCryptoContext(); new DOMSignedInfo(signedInfoElement, context, null); context.setProperty("org.apache.jcp.xml.dsig.secureValidation", Boolean.TRUE); try { new DOMSignedInfo(signedInfoElement, context, null); } catch (MarshalException ex) { String error = "A maxiumum of 30 references per Manifest are allowed with secure validation"; assertTrue(ex.getMessage().contains(error)); } } private static class InternalDOMCryptoContext extends DOMCryptoContext { // } private Element getSignedInfoElement( String directory, String file ) throws Exception { String basedir = System.getProperty("basedir"); if (basedir != null && !"".equals(basedir)) { directory = basedir + "/" + directory; } File f = new File(directory + "/" + file); javax.xml.parsers.DocumentBuilder db = XMLUtils.createDocumentBuilder(false); org.w3c.dom.Document doc = db.parse(f); return (Element) doc.getElementsByTagNameNS(Constants.SignatureSpecNS, Constants._TAG_SIGNEDINFO).item(0); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/IaikCoreFeaturesTest.java0000644000175000017500000001155611654523221031070 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.io.File; import java.io.FileInputStream; import java.security.Security; import javax.xml.crypto.*; import javax.xml.crypto.dsig.XMLSignatureFactory; import javax.xml.crypto.test.KeySelectors; /** * This is a testcase to validate all "coreFeatures" * testcases from IAIK * * @author Sean Mullan */ public class IaikCoreFeaturesTest extends org.junit.Assert { private SignatureValidator validator; private String base; static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public IaikCoreFeaturesTest() { String fs = System.getProperty("file.separator"); base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); base = base + fs + "src/test/resources" + fs + "at" + fs + "iaik" + fs + "ixsil"; validator = new SignatureValidator(new File (base, "coreFeatures/signatures")); } @org.junit.Test public void test_anonymousReferenceSignature() throws Exception { String file = "anonymousReferenceSignature.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.KeyValueKeySelector(), new NullURIDereferencer(base)); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_manifestSignature() throws Exception { String file = "manifestSignature.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signatureTypesSignature() throws Exception { String file = "signatureTypesSignature.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.KeyValueKeySelector(), new OfflineDereferencer()); assertTrue("Signature failed core validation", coreValidity); } private static class NullURIDereferencer implements URIDereferencer { private OctetStreamData osd; NullURIDereferencer(String base) throws Exception { File content = new File (base, "coreFeatures/samples/anonymousReferenceContent.xml"); osd = new OctetStreamData(new FileInputStream(content)); } public Data dereference(URIReference uriReference, XMLCryptoContext context) throws URIReferenceException { if (uriReference.getURI() != null) { throw new URIReferenceException("must be a null URI"); } return osd; } } private static class OfflineDereferencer implements URIDereferencer { private String w3cRec; private URIDereferencer defaultDereferencer; OfflineDereferencer() throws Exception { String fs = System.getProperty("file.separator"); String base = System.getProperty("basedir") == null ? "./" : System.getProperty("basedir"); w3cRec = base + fs + "src/test/resources" + fs + "org" + fs + "w3c" + fs + "www" + fs + "TR" + fs + "2000"; defaultDereferencer = XMLSignatureFactory.getInstance().getURIDereferencer(); } public Data dereference(URIReference uriReference, XMLCryptoContext context) throws URIReferenceException { try { if ("http://www.w3.org/TR/2000/REC-xml-20001006".equals(uriReference.getURI())) { File content = new File(w3cRec, "REC-xml-20001006"); return new OctetStreamData(new FileInputStream(content)); } else { return defaultDereferencer.dereference(uriReference, context); } } catch (java.io.FileNotFoundException ex) { throw new URIReferenceException(ex.getMessage(), ex); } } } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/ReferenceTest.java0000644000175000017500000002572112030302102027556 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.io.*; import java.security.MessageDigest; import java.security.Security; import java.util.*; import javax.xml.crypto.URIDereferencer; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.keyinfo.*; import javax.xml.crypto.dsig.dom.DOMSignContext; import javax.xml.crypto.dsig.dom.DOMValidateContext; import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec; import javax.xml.crypto.dsig.spec.TransformParameterSpec; import org.w3c.dom.Document; /** * Unit test for javax.xml.crypto.dsig.Reference * * @author Valerie Peng */ public class ReferenceTest extends org.junit.Assert { private XMLSignatureFactory fac; private KeyInfoFactory kifac; private DigestMethod dmSHA1; private String uri = "http://www.ietf.org/rfc/rfc3275.txt"; private static final String[] CRYPTO_ALGS = { "RSA", "DSA" }; private static final String[] SIG_ALGS = { SignatureMethod.RSA_SHA1, SignatureMethod.DSA_SHA1 }; static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public ReferenceTest() throws Exception { fac = XMLSignatureFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); kifac = KeyInfoFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); dmSHA1 = fac.newDigestMethod(DigestMethod.SHA1, null); } @org.junit.Test public void testConstructor() throws Exception { Reference ref; // test XMLSignatureFactory.newReference(String uri, // DigestMethod dm) for generating Reference objects ref = fac.newReference(null, dmSHA1); assertNotNull(ref); ref = fac.newReference(uri, dmSHA1); assertNotNull(ref); try { ref = fac.newReference("illegal!@#$%" + uri, dmSHA1); fail("Should throw a IAE for non-RFC2396-compliant uri"); } catch (IllegalArgumentException iae) { } catch (Exception ex) { fail("Should throw a IAE instead of " + ex + " for non-RFC2396-compliant uri"); } try { ref = fac.newReference(uri, null); fail("Should throw a NPE for null dm"); } catch (NullPointerException npe) { } catch (Exception ex) { fail("Should throw a NPE instead of " + ex + " for null dm"); } // test XMLSignatureFactory.newReference(String uri, // DigestMethod dm, List transforms, String type, String id) // for generating Reference objects try { ref = fac.newReference(null, dmSHA1, null, null, null); assertEquals(ref.getDigestMethod(), dmSHA1); } catch(Exception ex) { fail("Unexpected Exception: " + ex); } try { ref = fac.newReference(null, null, null, null, null); fail("Should throw a NPE for null dm"); } catch (NullPointerException npe) { } catch(Exception ex) { fail("Should throw a NPE instead of " + ex + " for null dm"); } String id = "id"; String type = "type"; try { ref = fac.newReference(uri, dmSHA1, null, type, id); assertNotNull(ref.getDigestMethod()); assertEquals(uri, ref.getURI()); assertEquals(id, ref.getId()); assertEquals(type, ref.getType()); assertEquals(ref.getTransforms(), Collections.EMPTY_LIST); } catch(Exception ex) { fail("Unexpected Exception: " + ex); } List transforms = new Vector(); try { // try empty transforms list ref = fac.newReference(uri, dmSHA1, transforms, type, id); assertTrue(Arrays.equals(transforms.toArray(), ref.getTransforms().toArray())); } catch(Exception ex) { fail("Unexpected Exception: " + ex); } transforms.add(new Object()); try { // try a transforms list with an invalid object ref = fac.newReference(uri, dmSHA1, transforms, type, id); } catch (ClassCastException cce) { } catch (Exception ex) { fail("Should throw a ClassCastException instead of " + ex); } // Test with various composition of Transform list // 1. String only transforms.clear(); transforms.add(Transform.BASE64); try { // try a transforms list with a String object ref = fac.newReference(uri, dmSHA1, transforms, type, id); fail("Should throw a CCE for illegal transforms"); } catch (ClassCastException cce) { } catch(Exception ex) { fail("Should throw a CCE instead of " + ex + " for illegal transforms"); } // 2. Transform only transforms.clear(); Transform c14nWithComments = fac.newTransform (CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS, (TransformParameterSpec) null); transforms.add(c14nWithComments); try { // try a transforms list with a Transform object ref = fac.newReference(uri, dmSHA1, transforms, type, id); assertTrue(Arrays.equals(transforms.toArray(), ref.getTransforms().toArray())); } catch (Exception ex) { fail("Unexpected Exception: " + ex); } } @org.junit.Test public void testisFeatureSupported() throws Exception { Reference ref = fac.newReference(null, dmSHA1, null, null, null); try { ref.isFeatureSupported(null); fail("Should raise a NPE for null feature"); } catch (NullPointerException npe) {} assertTrue(!ref.isFeatureSupported("not supported")); } @org.junit.Test public void testvalidate() throws Exception { testvalidate(false); } @org.junit.Test public void testvalidateWithCaching() throws Exception { testvalidate(true); } private void testvalidate(boolean cache) throws Exception { Reference ref = null; String type = "http://www.w3.org/2000/09/xmldsig#Object"; byte[] in = new byte[200]; Random rand = new Random(); // Test XMLSignContext XMLSignContext signContext; XMLValidateContext validateContext; for (int i = 0; i < CRYPTO_ALGS.length; i++) { rand.nextBytes(in); URIDereferencer dereferrer = new TestUtils.OctetStreamURIDereferencer(in); Document doc = TestUtils.newDocument(); signContext = new DOMSignContext(TestUtils.getPrivateKey(CRYPTO_ALGS[i]), doc); signContext.setURIDereferencer(dereferrer); if (cache) { signContext.setProperty ("javax.xml.crypto.dsig.cacheReference", Boolean.TRUE); } ref = fac.newReference(null, dmSHA1, null, type, null); XMLSignature sig = fac.newXMLSignature(fac.newSignedInfo (fac.newCanonicalizationMethod (CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS, (C14NMethodParameterSpec) null), fac.newSignatureMethod(SIG_ALGS[i], null), Collections.singletonList(ref)), kifac.newKeyInfo(Collections.singletonList (kifac.newKeyValue(TestUtils.getPublicKey(CRYPTO_ALGS[i]))))); try { sig.sign(signContext); if (!cache) { assertNull(ref.getDereferencedData()); assertNull(ref.getDigestInputStream()); } else { assertNotNull(ref.getDereferencedData()); assertNotNull(ref.getDigestInputStream()); assertTrue(digestInputEqual(ref)); } validateContext = new DOMValidateContext (TestUtils.getPublicKey(CRYPTO_ALGS[i]), doc.getDocumentElement()); validateContext.setURIDereferencer(dereferrer); if (cache) { validateContext.setProperty ("javax.xml.crypto.dsig.cacheReference", Boolean.TRUE); } boolean result = sig.validate(validateContext); assertTrue(result); Iterator iter = sig.getSignedInfo().getReferences().iterator(); while (iter.hasNext()) { Reference validated_ref = (Reference) iter.next(); if (!cache) { assertNull(validated_ref.getDereferencedData()); assertNull(validated_ref.getDigestInputStream()); } else { assertNotNull(validated_ref.getDereferencedData()); assertNotNull(validated_ref.getDigestInputStream()); assertTrue(digestInputEqual(validated_ref)); } byte[] dv = validated_ref.getDigestValue(); byte[] cdv = validated_ref.getCalculatedDigestValue(); assertTrue(Arrays.equals(dv, cdv)); boolean valid = validated_ref.validate(validateContext); assertTrue(valid); } } catch (XMLSignatureException xse) { fail("Unexpected Exception: " + xse); } } } private boolean digestInputEqual(Reference ref) throws Exception { MessageDigest md = MessageDigest.getInstance("SHA1"); InputStream is = ref.getDigestInputStream(); int nbytes; byte[] buf = new byte[256]; while ((nbytes = is.read(buf, 0, buf.length)) != -1) { md.update(buf, 0, nbytes); } return Arrays.equals(md.digest(), ref.getDigestValue()); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/ValidateSignatureTest.java0000644000175000017500000001407211706027662031320 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package javax.xml.crypto.test.dsig; import java.io.File; import java.security.Security; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; import javax.xml.crypto.test.KeySelectors; import javax.xml.crypto.Data; import javax.xml.crypto.URIDereferencer; import javax.xml.crypto.URIReference; import javax.xml.crypto.URIReferenceException; import javax.xml.crypto.XMLCryptoContext; import javax.xml.crypto.dsig.XMLSignatureException; import javax.xml.crypto.dsig.XMLSignatureFactory; import javax.xml.crypto.dsig.dom.DOMValidateContext; /** * This is a testcase that validates various signatures * * @author Sean Mullan */ public class ValidateSignatureTest extends org.junit.Assert { private SignatureValidator validator; private File dir; static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public ValidateSignatureTest() { String fs = System.getProperty("file.separator"); String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); dir = new File(base + fs + "src/test/resources" + fs + "javax" + fs + "xml" + fs + "crypto", "dsig"); validator = new SignatureValidator(dir); } /** * Validates a signature that references an element with an ID attribute. * The element's ID needs to be registered so that it can be found. */ @org.junit.Test public void test_signature_with_ID() throws Exception { String file = "envelopingSignature.xml"; DOMValidateContext vc = validator.getValidateContext (file, new KeySelectors.KeyValueKeySelector()); Document doc = vc.getNode().getOwnerDocument(); NodeList nl = doc.getElementsByTagName("Assertion"); vc.setIdAttributeNS((Element) nl.item(0), null, "AssertionID"); boolean coreValidity = validator.validate(vc); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_external_c14n_xmlattrs() throws Exception { String file = "signature-external-c14n-xmlatrs.xml"; boolean coreValidity = validator.validate(file, new KeySelectors.SecretKeySelector("secret".getBytes("ASCII"))); assertTrue("Signature failed core validation", coreValidity); } /** * This test checks that the signature is verified before the references. */ @org.junit.Test public void test_invalid_signature() throws Exception { InvalidURIDereferencer ud = new InvalidURIDereferencer(); boolean coreValidity = validator.validate("invalid-signature.xml", new KeySelectors.KeyValueKeySelector(), ud); assertFalse("Invalid signature should fail!", coreValidity); assertTrue("References validated before signature", ud.dereferenced); } @org.junit.Test public void test_signature_enveloping_hmac_sha1_trunclen_0() throws Exception { try { validator.validate ("signature-enveloping-hmac-sha1-trunclen-0-attack.xml", new KeySelectors.SecretKeySelector("secret".getBytes("ASCII"))); fail("Expected HMACOutputLength exception"); } catch (XMLSignatureException xse) { // System.out.println(xse.getMessage()); // pass } } @org.junit.Test public void test_signature_enveloping_hmac_sha1_trunclen_8() throws Exception { try { validator.validate ("signature-enveloping-hmac-sha1-trunclen-8-attack.xml", new KeySelectors.SecretKeySelector("secret".getBytes("ASCII"))); fail("Expected HMACOutputLength exception"); } catch (XMLSignatureException xse) { // System.out.println(xse.getMessage()); // pass } } // Bug 47761: validates an xml signature containing a reference with // xmlns:xml attributes. C14n should not emit these attributes. @org.junit.Test public void test_signature_exclc14n_xmlnamespace() throws Exception { String file = "demo.signed.xml"; boolean coreValidity = validator.validate(file, new KeySelectors.RawX509KeySelector()); assertTrue("Signature failed core validation", coreValidity); } // Bug https://issues.apache.org/jira/browse/SANTUARIO-295 // Validates a signature with an XPathFilter2 Transform with an intersect // filter that produces an empty node-set. @org.junit.Test public void test_signature_xpathfilter2() throws Exception { String file = "xmldsig-xfilter2.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation", coreValidity); } /** * Set flag if called. */ static class InvalidURIDereferencer implements URIDereferencer { boolean dereferenced = false; private URIDereferencer ud = XMLSignatureFactory.getInstance().getURIDereferencer(); public Data dereference(final URIReference ref, XMLCryptoContext ctx) throws URIReferenceException { dereferenced = true; // fallback return ud.dereference(ref, ctx); } } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/XMLObjectTest.java0000644000175000017500000000703311737042662027474 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.util.*; import javax.xml.crypto.dsig.*; /** * Unit test for javax.xml.crypto.dsig.XMLObject * * @version $Id$ * @author Valerie Peng */ public class XMLObjectTest extends org.junit.Assert { private XMLSignatureFactory factory; private String id = "id"; private String mimeType = "mime"; private String encoding = "encoding"; public XMLObjectTest() throws Exception { factory = XMLSignatureFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); } @SuppressWarnings("unchecked") @org.junit.Test public void testConstructor() { // test XMLSignatureFactory.newXMLObject(List, String, String, String) XMLObject obj; obj = factory.newXMLObject(null, null, null, null); assertNotNull(obj); List list = new Vector(); obj = factory.newXMLObject(list, null, null, null); assertNotNull(obj); String strEntry = "wrong type"; list.add(strEntry); try { obj = factory.newXMLObject(list, null, null, null); fail("Should raise a CCE for content containing " + "invalid, i.e. non-XMLStructure, entries"); } catch (ClassCastException cce) { } catch (Exception ex) { fail("Should raise a CCE for content with invalid entries " + "instead of " + ex); } list.remove(strEntry); list.add(new TestUtils.MyOwnXMLStructure()); obj = factory.newXMLObject(list, id, mimeType, encoding); assertNotNull(obj); assertNotNull(obj.getContent()); assertTrue(Arrays.equals(obj.getContent().toArray(), list.toArray())); assertEquals(obj.getId(), id); assertEquals(obj.getMimeType(), mimeType); assertEquals(obj.getEncoding(), encoding); List unmodifiable = obj.getContent(); try { unmodifiable.add(new TestUtils.MyOwnXMLStructure()); fail("Should return an unmodifiable List object"); } catch (UnsupportedOperationException uoe) {} assertTrue(Arrays.equals(unmodifiable.toArray(), list.toArray())); } @org.junit.Test public void testisFeatureSupported() { List list = new Vector(); list.add(new TestUtils.MyOwnXMLStructure()); XMLObject obj = factory.newXMLObject(list, id, mimeType, encoding); try { obj.isFeatureSupported(null); fail("Should raise a NPE for null feature"); } catch (NullPointerException npe) {} assertTrue(!obj.isFeatureSupported("not supported")); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/XMLSignContextTest.java0000644000175000017500000000756511737042662030545 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import javax.xml.crypto.*; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.dom.DOMSignContext; import javax.xml.crypto.KeySelector; import java.security.*; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; import org.w3c.dom.Document; /** * Unit test for javax.xml.crypto.dsig.XMLSignContext * * @version $Id$ * @author Valerie Peng */ public class XMLSignContextTest extends org.junit.Assert { private XMLSignContext defContext; private Key[] KEYS; private Document doc; public XMLSignContextTest() throws Exception { // set up the signingKeys KEYS = new Key[3]; KEYS[0] = TestUtils.getPrivateKey("DSA"); KEYS[1] = TestUtils.getPrivateKey("RSA"); KEYS[2] = new SecretKeySpec(new byte[16], "HmacSHA1"); // set up the default XMLSignContext SecretKey sk = new SecretKeySpec(new byte[8], "DES"); doc = TestUtils.newDocument(); defContext = new DOMSignContext(sk, doc); } @org.junit.Test public void testsetngetBaseURI() throws Exception { assertNull(defContext.getBaseURI()); String uri = "http://www.w3.org/2000/09/xmldsig#"; defContext.setBaseURI(uri); assertEquals(defContext.getBaseURI(), uri); defContext.setBaseURI(null); assertNull(defContext.getBaseURI()); } @org.junit.Test public void testsetngetProperty() throws Exception { String name = "key"; assertNull(defContext.getProperty(name)); try { defContext.setProperty(null, null); fail("Should raise a NPE with a null name"); } catch (NullPointerException npe) { } catch (Exception ex) { fail("Should raise a NPE instead of " + ex); } String value1 = "value#1"; String value2 = "value#2"; assertNull(defContext.setProperty(name, value1)); assertEquals(defContext.getProperty(name), value1); assertEquals(defContext.setProperty(name, value2), value1); assertEquals(defContext.getProperty(name), value2); assertEquals(defContext.setProperty(name, null), value2); assertNull(defContext.getProperty(name)); } @org.junit.Test public void testsetngetURIDereferencer() throws Exception { assertNull(defContext.getURIDereferencer()); byte[] data = "simpleDereferencer".getBytes(); URIDereferencer deref = new TestUtils.OctetStreamURIDereferencer(data); defContext.setURIDereferencer(deref); assertEquals(defContext.getURIDereferencer(), deref); defContext.setURIDereferencer(null); assertNull(defContext.getURIDereferencer()); } @org.junit.Test public void testsetngetKeySelector() throws Exception { defContext.setKeySelector(null); assertNull(defContext.getKeySelector()); KeySelector ks = KeySelector.singletonKeySelector(KEYS[0]); defContext.setKeySelector(ks); assertEquals(defContext.getKeySelector(), ks); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/Baltimore18Test.java0000644000175000017500000000764011654523221027771 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.io.File; import java.security.Security; import javax.xml.crypto.KeySelector; import javax.xml.crypto.URIDereferencer; import javax.xml.crypto.test.KeySelectors; /** * This is a testcase to validate all "merlin-xmldsig-eighteen" * testcases from Baltimore * * @author Sean Mullan */ public class Baltimore18Test extends org.junit.Assert { private SignatureValidator validator; private File dir; private KeySelector cks; private URIDereferencer ud; static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public Baltimore18Test() { String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); String fs = System.getProperty("file.separator"); dir = new File(base + fs + "src/test/resources" + fs + "ie" + fs + "baltimore" + fs + "merlin-examples", "merlin-xmldsig-eighteen"); validator = new SignatureValidator(dir); cks = new KeySelectors.CollectionKeySelector(dir); ud = new LocalHttpCacheURIDereferencer(); } @org.junit.Test public void testSignatureKeyname() throws Exception { String file = "signature-keyname.xml"; boolean coreValidity = validator.validate(file, cks, ud); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void testSignatureRetrievalmethodRawx509crt() throws Exception { String file = "signature-retrievalmethod-rawx509crt.xml"; boolean coreValidity = validator.validate(file, cks, ud); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void testSignatureX509CrtCrl() throws Exception { String file = "signature-x509-crt-crl.xml"; boolean coreValidity = validator.validate(file, cks, ud); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void testSignatureX509Crt() throws Exception { String file = "signature-x509-crt.xml"; boolean coreValidity = validator.validate(file, cks, ud); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void testSignatureX509Is() throws Exception { String file = "signature-x509-is.xml"; boolean coreValidity = validator.validate(file, cks, ud); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void testSignatureX509Ski() throws Exception { String file = "signature-x509-ski.xml"; boolean coreValidity = validator.validate(file, cks, ud); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void testSignatureX509Sn() throws Exception { String file = "signature-x509-sn.xml"; boolean coreValidity = validator.validate(file, cks, ud); assertTrue("Signature failed core validation", coreValidity); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/SignedInfoTest.java0000644000175000017500000001131511654523221027721 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.security.Security; import java.util.*; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec; /** * Unit test for javax.xml.crypto.dsig.SignedInfo * * @author Valerie Peng */ public class SignedInfoTest extends org.junit.Assert { private XMLSignatureFactory fac; private CanonicalizationMethod cm; private SignatureMethod sm; private List references; static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public SignedInfoTest() throws Exception { fac = XMLSignatureFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); cm = fac.newCanonicalizationMethod (CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS, (C14NMethodParameterSpec) null); sm = fac.newSignatureMethod(SignatureMethod.DSA_SHA1, null); references = new Vector(); references.add(fac.newReference ("http://www.sun.com/index.html", fac.newDigestMethod(DigestMethod.SHA1, null))); } @org.junit.Test public void testConstructor() { // test XMLSignatureFactory.newSignedInfo( // CanonicalizationMethod cm, // SignatureMethod sm, List references) SignedInfo si; for (int i = 0; i < 3; i++) { try { switch (i) { case 0: si = fac.newSignedInfo(null, sm, references); break; case 1: si = fac.newSignedInfo(cm, null, references); break; case 2: si = fac.newSignedInfo(cm, sm, null); break; } fail("Should throw a NPE for null parameter"); } catch(NullPointerException npe) { } catch(Exception ex) { fail("Should throw a NPE instead of " + ex + " for null parameter"); } } List empty = new Vector(); try { si = fac.newSignedInfo(cm, sm, empty); fail("Should throw an IAE for empty references"); } catch(IllegalArgumentException iae) { } catch(Exception ex) { fail("Should throw an IAE instead of " + ex + " for empty references"); } empty.add("String"); try { si = fac.newSignedInfo(cm, sm, empty); fail("Should throw an CCE for illegal references"); } catch(ClassCastException cce) { } catch(Exception ex) { fail("Should throw an IAE instead of " + ex + " for empty references"); } si = fac.newSignedInfo(cm, sm, references); assertNotNull(si); assertEquals(si.getCanonicalizationMethod().getAlgorithm(), cm.getAlgorithm()); assertEquals(si.getCanonicalizationMethod().getParameterSpec(), cm.getParameterSpec()); assertEquals(si.getSignatureMethod().getAlgorithm(), sm.getAlgorithm()); assertEquals(si.getSignatureMethod().getParameterSpec(), sm.getParameterSpec()); assertTrue(Arrays.equals(si.getReferences().toArray(), references.toArray())); assertNull(si.getId()); // test XMLSignatureFactory.newSignedInfo( // CanonicalizationMethod cm, // SignatureMethod sm, List references, String id) si = fac.newSignedInfo(cm, sm, references, null); assertNotNull(si); si = fac.newSignedInfo(cm, sm, references, "id"); assertNotNull(si); assertEquals(si.getId(), "id"); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/DetachedTest.java0000644000175000017500000001545012214631242027375 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import javax.xml.crypto.URIDereferencer; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.dom.DOMSignContext; import javax.xml.crypto.dsig.dom.DOMValidateContext; import javax.xml.crypto.dsig.keyinfo.*; import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec; import java.security.*; import java.util.*; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; /** * This is a simple example of generating and validating a Detached XML * Signature using the JSR 105 API. The resulting signature will look * like (key and signature values will be different): * *

 * 
 *   
 *     
 *     
 *     
 *       
 *       60NvZvtdTB+7UnlLp/H24p7h4bs=
 *     
 *   
 *   
 *     DpEylhQoiUKBoKWmYfajXO7LZxiDYgVtUtCNyTgwZgoChzorA2nhkQ==
 *   
 *   
 *     
 *       
 *	   

* rFto8uPQM6y34FLPmDh40BLJ1rVrC8VeRquuhPZ6jYNFkQuwxnu/wCvIAMhukPBL * FET8bJf/b2ef+oqxZajEb+88zlZoyG8g/wMfDBHTxz+CnowLahnCCTYBp5kt7G8q * UobJuvjylwj1st7V9Lsu03iXMXtbiriUjFa5gURasN8= *

* * kEjAFpCe4lcUOdwphpzf+tBaUds= * * * oe14R2OtyKx+s+60O5BRNMOYpIg2TU/f15N3bsDErKOWtKXeNK9FS7dWStreDxo2 * SSgOonqAd4FuJ/4uva7GgNL4ULIqY7E+mW5iwJ7n/WTELh98mEocsLXkNh24HcH4 * BZfSCTruuzmCyjdV1KSqX/Eux04HfCWYmdxN3SQ/qqw= * * * pA5NnZvcd574WRXuOA7ZfC/7Lqt4cB0MRLWtHubtJoVOao9ib5ry4rTk0r6ddnOv * AIGKktutzK3ymvKleS3DOrwZQgJ+/BDWDW8kO9R66o6rdjiSobBi/0c2V1+dkqOg * jFmKz395mvCOZGhC7fqAVhHat2EjGPMfgSZyABa7+1k= * *
* *
*
* * @author Sean Mullan */ public class DetachedTest extends org.junit.Assert { static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public DetachedTest() { // } @org.junit.Test public void test() { try { // // PART 1 : Creating the detached signature // // Create a factory that will be used to generate the signature // structures XMLSignatureFactory fac = XMLSignatureFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); // Create a Reference to an external URI that will be digested Reference ref = fac.newReference ("http://www.w3.org/TR/xml-stylesheet", fac.newDigestMethod(DigestMethod.SHA1, null)); // Create a DSA KeyPair KeyPairGenerator kpg = KeyPairGenerator.getInstance("DSA"); kpg.initialize(1024, new SecureRandom("not so random bytes".getBytes())); KeyPair kp = kpg.generateKeyPair(); // Create a KeyValue containing the generated DSA PublicKey KeyInfoFactory kif = fac.getKeyInfoFactory(); KeyValue kv = kif.newKeyValue(kp.getPublic()); // Create a KeyInfo and add the KeyValue to it KeyInfo ki = kif.newKeyInfo(Collections.singletonList(kv)); // Create SignedInfo SignedInfo si = fac.newSignedInfo(fac.newCanonicalizationMethod( CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS, (C14NMethodParameterSpec) null), fac.newSignatureMethod(SignatureMethod.DSA_SHA1, null), Collections.singletonList(ref)); // Create XMLSignature XMLSignature signature = fac.newXMLSignature(si,ki,null,null,null); // Create an XMLSignContext and set the // DSA PrivateKey for signing Document doc = XMLUtils.createDocumentBuilder(false).newDocument(); DOMSignContext signContext = new DOMSignContext(kp.getPrivate(), doc); signContext.putNamespacePrefix(XMLSignature.XMLNS, "ds"); URIDereferencer ud = new LocalHttpCacheURIDereferencer(); signContext.setURIDereferencer(ud); // Generate (and sign) the XMLSignature signature.sign(signContext); // // PART 2 : Validating the detached signature // // Create a XMLValidateContext & set the DSAPublicKey for validating XMLValidateContext vc = new DOMValidateContext(kp.getPublic(), doc.getDocumentElement()); vc.setURIDereferencer(ud); // Validate the Signature (generated above) boolean coreValidity = signature.validate(vc); // Check core validation status if (coreValidity == false) { // check the validation status of each Reference Iterator i = signature.getSignedInfo().getReferences().iterator(); while (i.hasNext()) { Reference reference = (Reference) i.next(); reference.validate(vc); } fail("Signature failed core validation"); } // You can also validate an XML Signature which is in XML format. // Unmarshal and validate an XMLSignature from a DOMValidateContext signature = fac.unmarshalXMLSignature(vc); coreValidity = signature.validate(vc); assertTrue("Core validity of unmarshalled XMLSignature is false", coreValidity); } catch (Exception ex) { fail("Exception: " + ex); } } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/SignatureValidator.java0000644000175000017500000000677112234743735030666 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.io.*; import java.util.*; import javax.xml.crypto.*; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.dom.DOMValidateContext; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.Element; import org.w3c.dom.traversal.*; /** * This is a class which performs xml signature validation upon request * * @author Sean Mullan * @author Valerie Peng */ public class SignatureValidator { private File dir; public SignatureValidator(File base) { dir = base; } public boolean validate(String fn, KeySelector ks) throws Exception { return validate(fn, ks, null); } public DOMValidateContext getValidateContext(String fn, KeySelector ks) throws Exception { Document doc = XMLUtils.createDocumentBuilder(false, false).parse(new File(dir, fn)); Element sigElement = getSignatureElement(doc); if (sigElement == null) { throw new Exception("Couldn't find signature Element"); } DOMValidateContext vc = new DOMValidateContext(ks, sigElement); vc.setBaseURI(dir.toURI().toString()); return vc; } public boolean validate(String fn, KeySelector ks, URIDereferencer ud) throws Exception { DOMValidateContext vc = getValidateContext(fn, ks); if (ud != null) { vc.setURIDereferencer(ud); } return validate(vc); } public boolean validate(DOMValidateContext vc) throws Exception { XMLSignatureFactory factory = XMLSignatureFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); XMLSignature signature = factory.unmarshalXMLSignature(vc); boolean coreValidity = signature.validate(vc); // Check core validation status if (coreValidity == false) { // check the validation status of each Reference Iterator i = signature.getSignedInfo().getReferences().iterator(); while (i.hasNext()) { Reference reference = (Reference) i.next(); reference.validate(vc); } } return coreValidity; } public static Element getSignatureElement(Document doc) { NodeIterator ni = ((DocumentTraversal)doc).createNodeIterator( doc.getDocumentElement(), NodeFilter.SHOW_ELEMENT, null, false); for (Node n = ni.nextNode(); n != null; n = ni.nextNode() ) { if ("Signature".equals(n.getLocalName())) { return (Element) n; } } return null; } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/XMLSignatureFactoryTest.java0000644000175000017500000001566012234743735031566 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.io.File; import java.security.NoSuchProviderException; import java.security.Provider; import java.security.Security; import javax.xml.crypto.dsig.keyinfo.*; import javax.xml.crypto.*; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.dom.DOMValidateContext; import javax.xml.parsers.DocumentBuilder; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.NodeList; /** * Unit test for javax.xml.crypto.dsig.XMLSignatureFactory * * @version $Id$ * @author Valerie Peng */ public class XMLSignatureFactoryTest extends org.junit.Assert { XMLSignatureFactory factory; static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public XMLSignatureFactoryTest() throws Exception { factory = XMLSignatureFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); } @org.junit.Test public void testgetInstance() { try { XMLSignatureFactory.getInstance("non-existent"); fail("Should throw NoSuchMechanismException if no impl found"); } catch (NoSuchMechanismException ex) {} try { XMLSignatureFactory.getInstance(null); fail("Should raise a NPE for null mechanismType"); } catch (NullPointerException npe) {} try { XMLSignatureFactory.getInstance("DOM", "non-existent"); fail("Should throw NoSuchProviderException if specified " + "provider is not found"); } catch (NoSuchProviderException nspe) { } catch (NoSuchMechanismException nse) { fail("Should raise a NoSuchProviderException instead of " + nse + " if specified provider is not found"); } try { XMLSignatureFactory.getInstance(null); fail("Should raise a NPE for null mechanismType"); } catch (NullPointerException npe) {} try { XMLSignatureFactory.getInstance("DOM", (Provider) null); fail("Should raise a NPE for null provider"); } catch (NullPointerException npe) {} } @org.junit.Test public void testgetMechanismType() { assertNotNull(factory); assertEquals("DOM", factory.getMechanismType()); } @org.junit.Test public void testisFeatureSupported() { try { factory.isFeatureSupported(null); fail("Should raise a NPE for null feature"); } catch (NullPointerException npe) {} assertTrue(!factory.isFeatureSupported("not supported")); } @org.junit.Test public void testgetKeyInfoFactory() throws Exception { KeyInfoFactory kifac = factory.getKeyInfoFactory(); assertEquals(kifac.getMechanismType(), factory.getMechanismType()); assertEquals(kifac.getProvider(), factory.getProvider()); } @org.junit.Test public void testunmarshalXMLSignature() throws Exception { XMLSignature stuff; try { stuff = factory.unmarshalXMLSignature((XMLValidateContext) null); fail("Should raise an NPE for null inputs"); } catch (NullPointerException ex) { } catch (Exception ex) { fail("Should throw an NPE instead of " + ex + " for null inputs"); } try { stuff = factory.unmarshalXMLSignature( new XMLValidateContext() { public Object getProperty(String name) { return null; } public Object setProperty(String name, Object property) { return null; } public String getBaseURI() { return null; } public void setBaseURI(String uri) { return; } public KeySelector getKeySelector() { return null; } public void setKeySelector(KeySelector ks) { return; } public URIDereferencer getURIDereferencer() { return null; } public void setURIDereferencer(URIDereferencer ud) {return;} public Object get(Object key) {return null;} public Object put(Object key, Object value) {return null;} public void setDefaultNamespacePrefix(String defPrefix) {} public String getDefaultNamespacePrefix() {return null;} public String putNamespacePrefix (String nsURI, String prefix) {return null;} public String getNamespacePrefix (String nsURI, String defPrefix) {return null;} }); fail("Should throw a CCE for input of wrong type"); } catch (ClassCastException ex) { } catch (Exception ex) { fail("Should raise a CCE instead of " + ex + " for wrong inputs"); } DocumentBuilder docBuilder = XMLUtils.createDocumentBuilder(false, false); String fs = System.getProperty("file.separator"); String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); File dir = new File(base + fs + "src/test/resources" + fs + "ie" + fs + "baltimore" + fs + "merlin-examples", "merlin-xmldsig-twenty-three"); Document doc = docBuilder.parse(new File(dir, "signature.xml")); NodeList nl = doc.getElementsByTagName("KeyInfo"); try { stuff = factory.unmarshalXMLSignature (new DOMValidateContext(TestUtils.getPublicKey("RSA"), nl.item(0))); fail("Should throw a MarshalException for non-XMLSignature inputs"); } catch (MarshalException ex) {} nl = doc.getElementsByTagName("Signature"); try { stuff = factory.unmarshalXMLSignature (new DOMValidateContext(TestUtils.getPublicKey("DSA"), nl.item(0))); assertNotNull(stuff); } catch (MarshalException ex) { fail("Unmarshal failed: " + ex.getMessage()); ex.printStackTrace(); } } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/PhaosXMLDSig3Test.java0000644000175000017500000002723611654523221030172 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.io.File; import java.security.Security; import javax.xml.crypto.KeySelector; import javax.xml.crypto.URIDereferencer; import javax.xml.crypto.dsig.XMLSignatureException; import javax.xml.crypto.dsig.dom.DOMValidateContext; import javax.xml.crypto.test.KeySelectors; /** * This is a testcase to validate all "phaos-xmldsig-three" * testcases from Phaos * * @author Sean Mullan */ public class PhaosXMLDSig3Test extends org.junit.Assert { private SignatureValidator validator; private File base; private final URIDereferencer ud; static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public PhaosXMLDSig3Test() { String fs = System.getProperty("file.separator"); String basedir = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); base = new File(basedir + fs + "src/test/resources" + fs + "com" + fs + "phaos", "phaos-xmldsig-three"); validator = new SignatureValidator(base); ud = new LocalHttpCacheURIDereferencer(); } @org.junit.Test public void test_signature_dsa_detached() throws Exception { String file = "signature-dsa-detached.xml"; DOMValidateContext vc = validator.getValidateContext (file, new KeySelectors.RawX509KeySelector()); vc.setProperty("javax.xml.crypto.dsig.cacheReference", Boolean.TRUE); vc.setURIDereferencer(ud); boolean coreValidity = validator.validate(vc); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_dsa_enveloped() throws Exception { String file = "signature-dsa-enveloped.xml"; boolean coreValidity = validator.validate(file, new KeySelectors.RawX509KeySelector()); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_dsa_enveloping() throws Exception { String file = "signature-dsa-enveloping.xml"; boolean coreValidity = validator.validate(file, new KeySelectors.RawX509KeySelector()); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_dsa_manifest() throws Exception { String file = "signature-dsa-manifest.xml"; boolean coreValidity = validator.validate(file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_hmac_sha1_40_c14n_comments_detached() throws Exception { String file = "signature-hmac-sha1-40-c14n-comments-detached.xml"; KeySelector ks = new KeySelectors.SecretKeySelector ("test".getBytes("ASCII") ); try { validator.validate(file, ks); fail("Expected HMACOutputLength Exception"); } catch (XMLSignatureException xse) { //System.out.println(xse.getMessage()); // pass } } @org.junit.Test public void test_signature_hmac_sha1_40_exclusive_c14n_comments_detached() throws Exception { String file = "signature-hmac-sha1-40-exclusive-c14n-comments-detached.xml"; KeySelector ks = new KeySelectors.SecretKeySelector ("test".getBytes("ASCII") ); try { validator.validate(file, ks); fail("Expected HMACOutputLength Exception"); } catch (XMLSignatureException xse) { //System.out.println(xse.getMessage()); // pass } } @org.junit.Test public void test_signature_hmac_sha1_exclusive_c14n_comments_detached() throws Exception { String file = "signature-hmac-sha1-exclusive-c14n-comments-detached.xml"; KeySelector ks = new KeySelectors.SecretKeySelector ("test".getBytes("ASCII") ); boolean coreValidity = validator.validate(file, ks, ud); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_hmac_sha1_exclusive_c14n_enveloped() throws Exception { String file = "signature-hmac-sha1-exclusive-c14n-enveloped.xml"; KeySelector ks = new KeySelectors.SecretKeySelector ("test".getBytes("ASCII") ); boolean coreValidity = validator.validate(file, ks); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_rsa_detached_b64_transform() throws Exception { String file = "signature-rsa-detached-b64-transform.xml"; boolean coreValidity = validator.validate(file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_rsa_detached_xpath_transform() throws Exception { String file = "signature-rsa-detached-xpath-transform.xml"; boolean coreValidity = validator.validate(file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_rsa_detached_xslt_transform_bad_rm() throws Exception { String file = "signature-rsa-detached-xslt-transform-bad-retrieval-method.xml"; try { validator.validate(file, new KeySelectors.CollectionKeySelector(base)); fail("Should throw XMLSignatureException for using DSA key with " + "RSA algorithm"); } catch (XMLSignatureException xse) {} } @org.junit.Test public void test_signature_rsa_detached_xslt_transform_rm() throws Exception { String file = "signature-rsa-detached-xslt-transform-retrieval-method.xml"; boolean coreValidity = validator.validate(file, new KeySelectors.CollectionKeySelector(base)); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_rsa_detached_xslt_transform() throws Exception { String file = "signature-rsa-detached-xslt-transform.xml"; boolean coreValidity = validator.validate(file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_rsa_detached() throws Exception { String file = "signature-rsa-detached.xml"; DOMValidateContext vc = validator.getValidateContext (file, new KeySelectors.RawX509KeySelector()); vc.setProperty("javax.xml.crypto.dsig.cacheReference", Boolean.TRUE); vc.setURIDereferencer(ud); boolean coreValidity = validator.validate(vc); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_rsa_enveloped_bad_digest_val() throws Exception { String file = "signature-rsa-enveloped-bad-digest-val.xml"; boolean coreValidity = validator.validate(file, new KeySelectors.RawX509KeySelector()); assertFalse("Signature should fail core validation", coreValidity); } @org.junit.Test public void test_signature_rsa_enveloped() throws Exception { String file = "signature-rsa-enveloped.xml"; boolean coreValidity = validator.validate(file, new KeySelectors.RawX509KeySelector()); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_rsa_enveloping() throws Exception { String file = "signature-rsa-enveloping.xml"; boolean coreValidity = validator.validate(file, new KeySelectors.RawX509KeySelector()); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_rsa_manifest_x509_data_cert_chain() throws Exception { String file = "signature-rsa-manifest-x509-data-cert-chain.xml"; boolean coreValidity = validator.validate(file, new KeySelectors.RawX509KeySelector()); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_rsa_manifest_x509_data_cert() throws Exception { String file = "signature-rsa-manifest-x509-data-cert.xml"; boolean coreValidity = validator.validate(file, new KeySelectors.RawX509KeySelector()); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_rsa_manifest_x509_data_issuer_serial() throws Exception { String file = "signature-rsa-manifest-x509-data-issuer-serial.xml"; boolean coreValidity = validator.validate(file, new KeySelectors.CollectionKeySelector(base)); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_rsa_manifest_x509_data_ski() throws Exception { String file = "signature-rsa-manifest-x509-data-ski.xml"; boolean coreValidity = validator.validate(file, new KeySelectors.CollectionKeySelector(base)); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_rsa_manifest_x509_data_subject_name() throws Exception { String file = "signature-rsa-manifest-x509-data-subject-name.xml"; boolean coreValidity = validator.validate(file, new KeySelectors.CollectionKeySelector(base)); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_rsa_manifest_x509_data() throws Exception { String file = "signature-rsa-manifest-x509-data.xml"; boolean coreValidity = validator.validate(file, new KeySelectors.RawX509KeySelector()); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_rsa_manifest() throws Exception { String file = "signature-rsa-manifest.xml"; boolean coreValidity = validator.validate(file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_rsa_xpath_transform_enveloped() throws Exception { String file = "signature-rsa-xpath-transform-enveloped.xml"; boolean coreValidity = validator.validate(file, new KeySelectors.RawX509KeySelector()); assertTrue("Signature failed core validation", coreValidity); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/TransformTest.java0000644000175000017500000001277111654523221027656 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.util.Collections; import javax.xml.crypto.XMLStructure; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.spec.TransformParameterSpec; import javax.xml.crypto.dsig.spec.XPathType; import javax.xml.crypto.dsig.spec.XPathFilterParameterSpec; import javax.xml.crypto.dsig.spec.XPathFilter2ParameterSpec; import javax.xml.crypto.dsig.spec.XSLTTransformParameterSpec; import java.security.*; /** * Unit test for javax.xml.crypto.dsig.Transform * * @author Valerie Peng */ public class TransformTest extends org.junit.Assert { XMLSignatureFactory factory; private static final String TRANSFORM_ALGOS[] = { Transform.BASE64, Transform.ENVELOPED, Transform.XPATH, Transform.XPATH2, Transform.XSLT }; static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public TransformTest() throws Exception { factory = XMLSignatureFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); } @org.junit.Test public void testisFeatureSupported() throws Exception { Transform tm; for (int i = 0; i < TRANSFORM_ALGOS.length; i++) { String algo = TRANSFORM_ALGOS[i]; TransformParameterSpec params = null; if (algo.equals(Transform.XPATH)) { params = new XPathFilterParameterSpec("xPath"); } else if (algo.equals(Transform.XPATH2)) { params = new XPathFilter2ParameterSpec (Collections.singletonList(new XPathType ("xPath2", XPathType.Filter.INTERSECT))); } else if (algo.equals(Transform.XSLT)) { params = new XSLTTransformParameterSpec(new XSLTStructure()); } tm = factory.newTransform(algo, params); try { tm.isFeatureSupported(null); fail(TRANSFORM_ALGOS[i] + ": Should raise a NPE for null feature"); } catch (NullPointerException npe) {} assertTrue(!tm.isFeatureSupported("not supported")); } } @org.junit.Test public void testConstructor() throws Exception { // test newTransform(String algorithm, // AlgorithmParameterSpec params) // for generating Transform objects Transform tm; for (int i = 0; i < TRANSFORM_ALGOS.length; i++) { String algo = TRANSFORM_ALGOS[i]; TransformParameterSpec params = null; if (algo.equals(Transform.XPATH)) { params = new XPathFilterParameterSpec("xPath"); } else if (algo.equals(Transform.XPATH2)) { params = new XPathFilter2ParameterSpec (Collections.singletonList(new XPathType ("xPath2", XPathType.Filter.INTERSECT))); } else if (algo.equals(Transform.XSLT)) { params = new XSLTTransformParameterSpec(new XSLTStructure()); } try { tm = factory.newTransform(algo, params); assertNotNull(tm); assertEquals(tm.getAlgorithm(), algo); assertEquals(tm.getParameterSpec(), params); } catch (Exception ex) { fail(TRANSFORM_ALGOS[i] + ": Unexpected exception " + ex); } try { tm = factory.newTransform (algo, new TestUtils.MyOwnC14nParameterSpec()); fail(TRANSFORM_ALGOS[i] + ": Should raise an IAPE for invalid parameters"); } catch (InvalidAlgorithmParameterException iape) { } catch (Exception ex) { fail(TRANSFORM_ALGOS[i] + ": Should raise a IAPE instead of " + ex); } } try { tm = factory.newTransform(null, (TransformParameterSpec) null); fail("Should raise a NPE for null algo"); } catch (NullPointerException npe) { } catch (Exception ex) { fail("Should raise a NPE instead of " + ex); } try { tm = factory.newTransform ("non-existent", (TransformParameterSpec) null); fail("Should raise an NSAE for non-existent algos"); } catch (NoSuchAlgorithmException nsae) { } catch (Exception ex) { fail("Should raise an NSAE instead of " + ex); } } private static class XSLTStructure implements XMLStructure { public boolean isFeatureSupported(String feature) { return false; } } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/X509KeySelector.java0000644000175000017500000003676611654523221027674 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.io.IOException; import java.security.Key; import java.security.KeyStore; import java.security.KeyStoreException; import java.security.PublicKey; import java.security.cert.Certificate; import java.security.cert.CertificateFactory; import java.security.cert.CertSelector; import java.security.cert.X509Certificate; import java.security.cert.X509CertSelector; import java.util.*; import javax.security.auth.x500.X500Principal; import javax.xml.crypto.*; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.keyinfo.*; import org.apache.jcp.xml.dsig.internal.dom.DOMRetrievalMethod; /** * A KeySelector that returns {@link PublicKey}s. If the * selector is created as trusted, it only returns public keys of trusted * {@link X509Certificate}s stored in a {@link KeyStore}. Otherwise, it * returns trusted or untrusted public keys (it doesn't care as long * as it finds one). * *

This KeySelector uses the specified KeyStore * to find a trusted X509Certificate that matches information * specified in the {@link KeyInfo} passed to the {@link #select} method. * The public key from the first match is returned. If no match, * null is returned. See the select method for more * information. * *

NOTE!: This X509KeySelector requires J2SE 1.4 because it uses the * java.security.cert.X509CertSelector & javax.security.auth.x500.X500Principal * classes to parse X.500 DNs and match on certificate attributes. * * @author Sean Mullan */ public class X509KeySelector extends KeySelector { private KeyStore ks; private boolean trusted = true; /** * Creates a trusted X509KeySelector. * * @param keyStore the keystore * @throws KeyStoreException if the keystore has not been initialized * @throws NullPointerException if keyStore is * null */ public X509KeySelector(KeyStore keyStore) throws KeyStoreException { this(keyStore, true); } public X509KeySelector(KeyStore keyStore, boolean trusted) throws KeyStoreException { if (keyStore == null) { throw new NullPointerException("keyStore is null"); } this.trusted = trusted; this.ks = keyStore; // test to see if KeyStore has been initialized this.ks.size(); } /** * Finds a key from the keystore satisfying the specified constraints. * *

This method compares data contained in {@link KeyInfo} entries * with information stored in the KeyStore. The implementation * iterates over the KeyInfo types and returns the first {@link PublicKey} * of an X509Certificate in the keystore that is compatible with the * specified AlgorithmMethod according to the following rules for each * keyinfo type: * * X509Data X509Certificate: if it contains a KeyUsage * extension that asserts the digitalSignature bit and * matches an X509Certificate in the KeyStore. * X509Data X509IssuerSerial: if the serial number and issuer DN match an * X509Certificate in the KeyStore. * X509Data X509SubjectName: if the subject DN matches an * X509Certificate in the KeyStore. * X509Data X509SKI: if the subject key identifier matches an * X509Certificate in the KeyStore. * KeyName: if the keyname matches an alias in the KeyStore. * RetrievalMethod: supports rawX509Certificate and X509Data types. If * rawX509Certificate type, it must match an X509Certificate * in the KeyStore. * * @param keyInfo a KeyInfo (may be null) * @param purpose the key's purpose * @param method the algorithm method that this key is to be used for. * Only keys that are compatible with the algorithm and meet the * constraints of the specified algorithm should be returned. * @param an XMLCryptoContext that may contain additional * useful information for finding an appropriate key * @return a key selector result * @throws KeySelectorException if an exceptional condition occurs while * attempting to find a key. Note that an inability to find a key is not * considered an exception (null should be * returned in that case). However, an error condition (ex: network * communications failure) that prevented the KeySelector * from finding a potential key should be considered an exception. * @throws ClassCastException if the data type of method * is not supported by this key selector */ public KeySelectorResult select(KeyInfo keyInfo, KeySelector.Purpose purpose, AlgorithmMethod method, XMLCryptoContext context) throws KeySelectorException { SignatureMethod sm = (SignatureMethod) method; try { // return null if keyinfo is null or keystore is empty if (keyInfo == null || ks.size() == 0) { return new SimpleKeySelectorResult(null); } // Iterate through KeyInfo types Iterator i = keyInfo.getContent().iterator(); while (i.hasNext()) { XMLStructure kiType = (XMLStructure) i.next(); // check X509Data if (kiType instanceof X509Data) { X509Data xd = (X509Data) kiType; KeySelectorResult ksr = x509DataSelect(xd, sm); if (ksr != null) { return ksr; } // check KeyName } else if (kiType instanceof KeyName) { KeyName kn = (KeyName) kiType; Certificate cert = ks.getCertificate(kn.getName()); if (cert != null && algEquals(sm.getAlgorithm(), cert.getPublicKey().getAlgorithm())) { return new SimpleKeySelectorResult(cert.getPublicKey()); } // check RetrievalMethod } else if (kiType instanceof RetrievalMethod) { RetrievalMethod rm = (RetrievalMethod) kiType; try { KeySelectorResult ksr = null; if (rm.getType().equals (X509Data.RAW_X509_CERTIFICATE_TYPE)) { OctetStreamData data = (OctetStreamData) rm.dereference(context); CertificateFactory cf = CertificateFactory.getInstance("X.509"); X509Certificate cert = (X509Certificate) cf.generateCertificate(data.getOctetStream()); ksr = certSelect(cert, sm); } else if (rm.getType().equals(X509Data.TYPE)) { X509Data xd = (X509Data) ((DOMRetrievalMethod) rm). dereferenceAsXMLStructure(context); ksr = x509DataSelect(xd, sm); } else { // skip; keyinfo type is not supported continue; } if (ksr != null) { return ksr; } } catch (Exception e) { throw new KeySelectorException(e); } } } } catch (KeyStoreException kse) { // throw exception if keystore is uninitialized throw new KeySelectorException(kse); } // return null since no match could be found return new SimpleKeySelectorResult(null); } /** * Searches the specified keystore for a certificate that matches the * criteria specified in the CertSelector. * * @return a KeySelectorResult containing the cert's public key if there * is a match; otherwise null */ private KeySelectorResult keyStoreSelect(CertSelector cs) throws KeyStoreException { Enumeration aliases = ks.aliases(); while (aliases.hasMoreElements()) { String alias = aliases.nextElement(); Certificate cert = ks.getCertificate(alias); if (cert != null && cs.match(cert)) { return new SimpleKeySelectorResult(cert.getPublicKey()); } } return null; } /** * Searches the specified keystore for a certificate that matches the * specified X509Certificate and contains a public key that is compatible * with the specified SignatureMethod. * * @return a KeySelectorResult containing the cert's public key if there * is a match; otherwise null */ private KeySelectorResult certSelect(X509Certificate xcert, SignatureMethod sm) throws KeyStoreException { // skip non-signer certs boolean[] keyUsage = xcert.getKeyUsage(); if (keyUsage != null && keyUsage[0] == false) { return null; } String alias = ks.getCertificateAlias(xcert); if (alias != null) { PublicKey pk = ks.getCertificate(alias).getPublicKey(); // make sure algorithm is compatible with method if (algEquals(sm.getAlgorithm(), pk.getAlgorithm())) { return new SimpleKeySelectorResult(pk); } } return null; } /** * Returns an OID of a public-key algorithm compatible with the specified * signature algorithm URI. */ private String getPKAlgorithmOID(String algURI) { if (algURI.equalsIgnoreCase(SignatureMethod.DSA_SHA1)) { return "1.2.840.10040.4.1"; } else if (algURI.equalsIgnoreCase(SignatureMethod.RSA_SHA1)) { return "1.2.840.113549.1.1"; } else { return null; } } /** * A simple KeySelectorResult containing a public key. */ private static class SimpleKeySelectorResult implements KeySelectorResult { private final Key key; SimpleKeySelectorResult(Key key) { this.key = key; } public Key getKey() { return key; } } /** * Checks if a JCA/JCE public key algorithm name is compatible with * the specified signature algorithm URI. */ //@@@FIXME: this should also work for key types other than DSA/RSA private boolean algEquals(String algURI, String algName) { if (algName.equalsIgnoreCase("DSA") && algURI.equalsIgnoreCase(SignatureMethod.DSA_SHA1)) { return true; } else if (algName.equalsIgnoreCase("RSA") && algURI.equalsIgnoreCase(SignatureMethod.RSA_SHA1)) { return true; } else { return false; } } /** * Searches the specified keystore for a certificate that matches an * entry of the specified X509Data and contains a public key that is * compatible with the specified SignatureMethod. * * @return a KeySelectorResult containing the cert's public key if there * is a match; otherwise null */ private KeySelectorResult x509DataSelect(X509Data xd, SignatureMethod sm) throws KeyStoreException, KeySelectorException { // convert signature algorithm to compatible public-key alg OID String algOID = getPKAlgorithmOID(sm.getAlgorithm()); X509CertSelector subjectcs = new X509CertSelector(); try { subjectcs.setSubjectPublicKeyAlgID(algOID); } catch (IOException ioe) { throw new KeySelectorException(ioe); } Collection certs = new ArrayList(); Iterator xi = xd.getContent().iterator(); while (xi.hasNext()) { Object o = xi.next(); // check X509IssuerSerial if (o instanceof X509IssuerSerial) { X509IssuerSerial xis = (X509IssuerSerial) o; try { subjectcs.setSerialNumber(xis.getSerialNumber()); String issuer = new X500Principal(xis.getIssuerName()).getName(); // strip off newline if (issuer.endsWith("\n")) { issuer = new String (issuer.toCharArray(), 0, issuer.length()-1); } subjectcs.setIssuer(issuer); } catch (IOException ioe) { throw new KeySelectorException(ioe); } // check X509SubjectName } else if (o instanceof String) { String sn = (String) o; try { String subject = new X500Principal(sn).getName(); // strip off newline if (subject.endsWith("\n")) { subject = new String (subject.toCharArray(), 0, subject.length()-1); } subjectcs.setSubject(subject); } catch (IOException ioe) { throw new KeySelectorException(ioe); } // check X509SKI } else if (o instanceof byte[]) { byte[] ski = (byte[]) o; // DER-encode ski - required by X509CertSelector byte[] encodedSki = new byte[ski.length+2]; encodedSki[0] = 0x04; // OCTET STRING tag value encodedSki[1] = (byte) ski.length; // length System.arraycopy(ski, 0, encodedSki, 2, ski.length); subjectcs.setSubjectKeyIdentifier(encodedSki); } else if (o instanceof X509Certificate) { certs.add((X509Certificate) o); // check X509CRL // not supported: should use CertPath API } else { // skip all other entries continue; } } KeySelectorResult ksr = keyStoreSelect(subjectcs); if (ksr != null) { return ksr; } if (!certs.isEmpty() && !trusted) { // try to find public key in certs in X509Data Iterator i = certs.iterator(); while (i.hasNext()) { X509Certificate cert = i.next(); if (subjectcs.match(cert)) { return new SimpleKeySelectorResult(cert.getPublicKey()); } } } return null; } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/keyinfo/0000755000175000017500000000000012273503732025637 5ustar tonytonylibxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/keyinfo/RetrievalMethodTest.java0000644000175000017500000000657611654523221032453 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig.keyinfo; import javax.xml.crypto.dsig.keyinfo.*; /** * Unit test for javax.xml.crypto.dsig.keyinfo.RetrievalMethod * * @author Sean Mullan */ public class RetrievalMethodTest extends org.junit.Assert { private KeyInfoFactory fac; public RetrievalMethodTest() throws Exception { fac = KeyInfoFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); } @org.junit.Test public void testgetURI() { RetrievalMethod rm = fac.newRetrievalMethod("#X509Data"); assertNotNull(rm.getURI()); } @org.junit.Test public void testgetTransforms() { RetrievalMethod rm = fac.newRetrievalMethod("#X509Data"); assertNotNull(rm.getTransforms()); } @org.junit.Test public void testgetType() { RetrievalMethod rm = fac.newRetrievalMethod("#X509Data"); assertNull(rm.getType()); } @org.junit.Test public void testConstructors() { final String uri = "#X509CertChain"; // test RetrievalMethod(String) RetrievalMethod rm = fac.newRetrievalMethod(uri); assertEquals(uri, rm.getURI()); try { rm = fac.newRetrievalMethod(null); fail("Should raise a NullPointerException"); } catch (NullPointerException npe) {} // test RetrievalMethod(String, String, Transform[]) try { rm = fac.newRetrievalMethod(null, null, null); fail("Should raise a NullPointerException"); } catch (NullPointerException npe) {} final String type = "http://www.w3.org/2000/09/xmldsig#X509Data"; rm = fac.newRetrievalMethod(uri, type, null); assertEquals(uri, rm.getURI()); assertEquals(type, rm.getType()); } @org.junit.Test public void testisFeatureSupported() throws Exception { String uri = "#X509CertChain"; String type = "http://www.w3.org/2000/09/xmldsig#X509Data"; RetrievalMethod rm = null; for (int i = 0; i < 2; i++) { switch (i) { case 0: rm = fac.newRetrievalMethod(uri); break; case 1: rm = fac.newRetrievalMethod(uri, type, null); break; } try { rm.isFeatureSupported(null); fail("Should raise a NPE for null feature"); } catch (NullPointerException npe) {} assertTrue(!rm.isFeatureSupported("not supported")); } } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/keyinfo/KeyValueTest.java0000644000175000017500000000617011654523221031070 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig.keyinfo; import java.security.*; import javax.xml.crypto.dsig.keyinfo.*; /** * Unit test for javax.xml.crypto.dsig.keyinfo.KeyValue * * @author Valerie Peng */ public class KeyValueTest extends org.junit.Assert { private static final String[] ALGOS = { "DSA", "RSA" }; private KeyInfoFactory fac; private PublicKey keys[] = null; public KeyValueTest() throws Exception { fac = KeyInfoFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); // generate PublicKey(s) and XMLStructure(s) for DSA and RSA keys = new PublicKey[ALGOS.length]; for (int i = 0; i < ALGOS.length; i++) { keys[i] = genPublicKey(ALGOS[i], 512); } } @org.junit.Test public void testgetPublicKey() { try { KeyValue kv = fac.newKeyValue(keys[0]); assertNotNull(kv.getPublicKey()); } catch (KeyException ke) { fail("Should pass instead of throwing KeyException"); } } @org.junit.Test public void testConstructor() { // test newKeyValue(PublicKey pk) for (int i = 0; i < keys.length; i++) { try { KeyValue kv = fac.newKeyValue(keys[i]); assertEquals(keys[i], kv.getPublicKey()); } catch (KeyException ke) { fail("Should pass instead of throwing KeyException"); } } } @org.junit.Test public void testisFeatureSupported() { KeyValue kv = null; try { kv = fac.newKeyValue(keys[0]); kv.isFeatureSupported(null); fail("Should raise a NPE for null feature"); } catch (KeyException ke) { fail("Should raise a NPE for null feature"); } catch (NullPointerException npe) {} assertTrue(!kv.isFeatureSupported("not supported")); } private PublicKey genPublicKey(String algo, int keysize) throws Exception { KeyPairGenerator kpg = KeyPairGenerator.getInstance(algo); kpg.initialize(keysize, new SecureRandom(("Not so random bytes" + System.currentTimeMillis() ).getBytes() )); KeyPair kp = kpg.generateKeyPair(); return kp.getPublic(); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/keyinfo/PGPDataTest.java0000644000175000017500000001054611654523221030565 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig.keyinfo; import java.util.Arrays; import java.util.Collections; import java.util.List; import javax.xml.crypto.*; import javax.xml.crypto.dsig.keyinfo.*; /** * Unit test for javax.xml.crypto.dsig.keyinfo.PGPData * * @author Valerie Peng */ public class PGPDataTest extends org.junit.Assert { private KeyInfoFactory fac; private byte[][] values = { { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 }, { (byte)0xc6, (byte)0x01, (byte)0x00 } }; public PGPDataTest() throws Exception { fac = KeyInfoFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); } @org.junit.Test public void testgetExternalElements() { PGPData[] pds = { fac.newPGPData(values[0]), fac.newPGPData(values[0], values[1], null), fac.newPGPData(values[1], null) }; for (int i=0; i li = pds[i].getExternalElements(); assertNotNull(li); if (!li.isEmpty()) { Object[] types = li.toArray(); for (int j=0; j li = ki.getContent(); assertNotNull(ki.getContent()); if (!li.isEmpty()) { Object[] content = li.toArray(); for (int i = 0; i < content.length; i++) { if (!(content[i] instanceof XMLStructure)) { fail("KeyInfo element has the wrong type"); }; } } else { try { li.add(new Object()); fail("Added KeyInfo element of wrong type"); } catch (ClassCastException ex) { // expected } } } } @org.junit.Test public void testConstructor() { final String id = "keyId"; // test newKeyInfo(List, String id) KeyInfo ki = fac.newKeyInfo (Collections.singletonList(fac.newKeyName("foo")), id); assertEquals(id, ki.getId()); try { ki = fac.newKeyInfo(null, id); fail("Should raise a NullPointerException"); } catch (NullPointerException npe) {} // test newKeyInfo(List) ki = fac.newKeyInfo(Collections.singletonList(fac.newKeyName("foo"))); } @org.junit.Test public void testisFeatureSupported() { KeyInfo ki = fac.newKeyInfo (Collections.singletonList(fac.newKeyName("foo")), "keyid"); try { ki.isFeatureSupported(null); fail("Should raise a NPE for null feature"); } catch (NullPointerException npe) {} assertTrue(!ki.isFeatureSupported("not supported")); } @org.junit.Test public void testMarshal() throws Exception { KeyInfo ki = fac.newKeyInfo (Collections.singletonList(fac.newKeyName("foo")), "keyid"); try { ki.marshal(null, null); fail("Should raise a NullPointerException"); } catch (NullPointerException npe) {} Document doc = XMLUtils.createDocumentBuilder(false).newDocument(); Element elem = doc.createElementNS("http://acme.org", "parent"); doc.appendChild(elem); DOMStructure parent = new DOMStructure(elem); try { ki.marshal(parent, null); } catch (Exception e) { fail("Should not throw an exception: " + e); } Element kiElem = DOMUtils.getFirstChildElement(elem); if (!kiElem.getLocalName().equals("KeyInfo")) { fail("Should be KeyInfo element: " + kiElem.getLocalName()); } Element knElem = DOMUtils.getFirstChildElement(kiElem); if (!knElem.getLocalName().equals("KeyName")) { fail("Should be KeyName element: " + knElem.getLocalName()); } } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/keyinfo/KeyInfoFactoryTest.java0000644000175000017500000002165411654523221032243 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig.keyinfo; import java.math.BigInteger; import java.util.*; import java.security.KeyException; import java.security.PublicKey; import javax.xml.crypto.dsig.keyinfo.*; import javax.xml.crypto.*; /** * Unit test for javax.xml.crypto.dsig.keyinfo.KeyInfoFactory * * @version $Id$ * @author Valerie Peng */ public class KeyInfoFactoryTest extends org.junit.Assert { KeyInfoFactory factory; public KeyInfoFactoryTest() throws Exception { factory = KeyInfoFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); } @org.junit.Test public void testgetInstance() { try { KeyInfoFactory.getInstance("non-existent"); fail("Should throw NoSuchMechanismException if no impl found"); } catch (NoSuchMechanismException ex) {} try { KeyInfoFactory.getInstance(null); fail("Should raise a NPE for null xmltype"); } catch (NullPointerException npe) {} } @org.junit.Test public void testgetMechanismType() { assertNotNull(factory); assertEquals("DOM", factory.getMechanismType()); } @org.junit.Test public void testisFeatureSupported() { try { factory.isFeatureSupported(null); fail("Should raise a NPE for null feature"); } catch (NullPointerException npe) {} assertTrue(!factory.isFeatureSupported("not supported")); } @org.junit.Test public void testnewKeyInfo() { String id = "keyId"; // test newKeyInfo(List, String) KeyInfo ki = factory.newKeyInfo (Collections.singletonList(factory.newKeyName("foo")), id); assertEquals(id, ki.getId()); try { ki = factory.newKeyInfo(null, id); fail("Should raise a NPE for null key info types"); } catch (NullPointerException npe) {} } @org.junit.Test public void testnewKeyName() { final String name = "keyName"; KeyName kn = factory.newKeyName(name); assertEquals(name, kn.getName()); try { kn = factory.newKeyName(null); fail("Should raise a NPE for null key name"); } catch (NullPointerException npe) {} } @org.junit.Test public void testnewKeyValue() { // test newKeyValue(PublicKey pk) PublicKey myPubKey = new PublicKey() { private static final long serialVersionUID = 2756606866185189114L; public byte[] getEncoded() { return new byte[20]; } public String getFormat() { return "none"; } public String getAlgorithm() { return "test"; } }; try { KeyValue kv = factory.newKeyValue(myPubKey); assertEquals(myPubKey, kv.getPublicKey()); fail("Should throw a KeyException"); } catch (KeyException ke) { } try { factory.newKeyValue((PublicKey) null); fail("Should raise a NPE for null key"); } catch (KeyException ke) { fail("Should raise a NPE for null key"); } catch (NullPointerException npe) {} } @org.junit.Test public void testnewPGPKeyId() { byte[] valid_id = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 }; byte[] invalid_id = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09 }; byte[] valid_packet = { (byte)0xc6, (byte)0x01, (byte)0x00 }; byte[] invalid_packet = { (byte)0xc8, (byte)0x01, (byte)0x00 }; // test newPGPData(byte[]) PGPData pd = factory.newPGPData(valid_id); assertTrue(Arrays.equals(valid_id, pd.getKeyId())); try { pd = factory.newPGPData(invalid_id); fail("Should throw IAE for invalid key id values"); } catch (IllegalArgumentException ex) {} // test newPGPData(byte[], byte[], List) pd = factory.newPGPData(valid_id, valid_packet, null); assertTrue(Arrays.equals(valid_id, pd.getKeyId())); assertTrue(Arrays.equals(valid_packet, pd.getKeyPacket())); try { pd = factory.newPGPData(invalid_id, valid_packet, null); fail("Should throw IAE for invalid key id values"); } catch (IllegalArgumentException ex) {} try { pd = factory.newPGPData(valid_id, invalid_packet, null); fail("Should throw IAE for invalid key packet values"); } catch (IllegalArgumentException ex) {} try { pd = factory.newPGPData(invalid_id, invalid_packet, null); fail("Should throw IAE for invalid key id and packet values"); } catch (IllegalArgumentException ex) {} // test newPGPData(byte[], List) pd = factory.newPGPData(valid_packet, null); assertTrue(Arrays.equals(valid_packet, pd.getKeyPacket())); try { pd = factory.newPGPData(invalid_packet, null); fail("Should throw IAE for invalid key packet values"); } catch (IllegalArgumentException ex) {} } @org.junit.Test public void testnewRetrievalMethod() throws Exception { final String uri = "#X509CertChain"; // test RetrievalMethod(String) RetrievalMethod rm = factory.newRetrievalMethod(uri); assertEquals(uri, rm.getURI()); try { rm = factory.newRetrievalMethod(null); fail("Should raise a NPE for null URI"); } catch (NullPointerException npe) {} // test RetrievalMethod(String, String, List) try { rm = factory.newRetrievalMethod(null, null, null); fail("Should raise a NPE for null URI"); } catch (NullPointerException npe) {} String type = "http://www.w3.org/2000/09/xmldsig#X509Data"; try { rm = factory.newRetrievalMethod(null, type, null); fail("Should raise a NPE for null URI"); } catch (NullPointerException npe) {} rm = factory.newRetrievalMethod(uri, type, null); assertEquals(uri, rm.getURI()); assertEquals(type, rm.getType()); } @org.junit.Test public void testnewX509Data() { // test newX509Data(List) X509Data x509 = factory.newX509Data(Collections.singletonList("cn=foo")); assertNotNull(x509); } @org.junit.Test public void testnewX509IssuerSerial() { String name = "CN=valeriep"; // test newX509IssuerSerial(String, BigInteger) X509IssuerSerial x509is = factory.newX509IssuerSerial(name, BigInteger.ONE); assertEquals(name, x509is.getIssuerName()); assertEquals(BigInteger.ONE, x509is.getSerialNumber()); try { x509is = factory.newX509IssuerSerial(null, BigInteger.ZERO); fail("Should raise an NPE for null issuer names"); } catch (NullPointerException ex) { } catch (IllegalArgumentException ex2) { fail("Should throw NPE instead of IAE for null issuer names"); } try { x509is = factory.newX509IssuerSerial(name, null); fail("Should raise an NPE for null serial numbers"); } catch (NullPointerException ex) { } catch (IllegalArgumentException ex2) { fail("Should throw NPE instead of IAE for null serial numbers"); } try { x509is = factory.newX509IssuerSerial(null, null); fail("Should raise an NPE for null issuer names/serial numbers"); } catch (NullPointerException ex) { } catch (IllegalArgumentException ex2) { fail("Should throw NPE instead of IAE for null issuer " + "names/serial numbers"); } try { x509is = factory.newX509IssuerSerial("valeriep", BigInteger.ZERO); fail("Should throw IAE for invalid issuer names"); } catch (IllegalArgumentException ex) {} } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/keyinfo/X509DataTest.java0000644000175000017500000000620312030302102030555 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig.keyinfo; import java.util.*; import java.security.cert.X509Certificate; import java.security.cert.X509CRL; import javax.xml.crypto.*; import javax.xml.crypto.dsig.keyinfo.*; /** * Unit test for javax.xml.crypto.dsig.keyinfo.X509Data * * @version $Id$ * @author Valerie Peng */ public class X509DataTest extends org.junit.Assert { private KeyInfoFactory fac; public X509DataTest() throws Exception { fac = KeyInfoFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); } @org.junit.Test @SuppressWarnings("unchecked") public void testgetTypes() { X509Data x509 = fac.newX509Data(Collections.singletonList("cn=foo")); List li = x509.getContent(); assertNotNull(li); if (!li.isEmpty()) { Object[] content = li.toArray(); for (int j=0; j getTransforms() { return Collections.EMPTY_LIST; } public boolean validate(XMLValidateContext vCtx) throws XMLSignatureException { this.dis = new ByteArrayInputStream(id.getBytes()); this.derefData = new OctetStreamData(this.dis); return status; } public Data getDereferencedData() { return derefData; } public InputStream getDigestInputStream() { return dis; } } public static class MyOwnXMLStructure implements XMLStructure { public boolean isFeatureSupported(String feature) throws NullPointerException { if (feature == null) throw new NullPointerException(); return false; } } public static class OctetStreamURIDereferencer implements URIDereferencer { private byte[] data = null; public OctetStreamURIDereferencer(byte[] in) { data = (byte[]) in.clone(); } public Data dereference(URIReference ref, XMLCryptoContext ctxt) { return new OctetStreamData(new ByteArrayInputStream(data)); } public byte[] getData() { return data; } public boolean equals(Object obj) { if (obj instanceof OctetStreamURIDereferencer) { return Arrays.equals (((OctetStreamURIDereferencer) obj).getData(), data); } else { return false; } } public int hashCode() { return 5678; } } public static class NodeSetURIDereferencer implements URIDereferencer { private Node data = null; public NodeSetURIDereferencer(Node node) { data = node; } public Data dereference(URIReference ref, XMLCryptoContext ctxt) { return new NodeSetData() { public Iterator iterator() { return Collections.singletonList(data).iterator(); } }; } } public static void dumpDocument(Document doc, String outName) throws Exception { DOMSource source = new DOMSource(doc); File path = new File(System.getProperty("test.dir"), outName); Result result = new StreamResult(new FileOutputStream(path)); Transformer trans = TransformerFactory.newInstance().newTransformer(); trans.setOutputProperty(OutputKeys.INDENT, "yes"); trans.transform(source, result); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/DigestMethodTest.java0000644000175000017500000000630511654523221030257 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import javax.xml.crypto.dsig.*; import java.security.*; /** * Unit test for javax.xml.crypto.dsig.DigestMethod * * @author Valerie Peng */ public class DigestMethodTest extends org.junit.Assert { private XMLSignatureFactory factory; private static final String MD_ALGOS[] = { DigestMethod.SHA1 }; public DigestMethodTest() { factory = XMLSignatureFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); } @org.junit.Test public void testisFeatureSupported() throws Exception { DigestMethod dm; for (int i = 0; i < MD_ALGOS.length; i++) { String algo = MD_ALGOS[i]; dm = factory.newDigestMethod(algo, null); try { dm.isFeatureSupported(null); fail("Should raise a NPE for null feature"); } catch (NullPointerException npe) {} assertTrue(!dm.isFeatureSupported("not supported")); } } @org.junit.Test public void testConstructor() throws Exception { // test DSigStructureFactory.newDigestMethod // (String algorithm, AlgorithmParameterSpec params) // for generating DigestMethod objects DigestMethod dm; for (int i = 0; i < MD_ALGOS.length; i++) { String algo = MD_ALGOS[i]; dm = factory.newDigestMethod(algo, null); assertEquals(dm.getAlgorithm(), algo); assertNull(dm.getParameterSpec()); try { dm = factory.newDigestMethod(algo, new TestUtils.MyOwnDigestMethodParameterSpec()); fail("Should raise an IAPE for invalid parameters"); } catch (InvalidAlgorithmParameterException iape) { } catch (Exception ex) { fail("Should raise an IAPE instead of " + ex); } } try { dm = factory.newDigestMethod("non-existent", null); fail("Should raise an NSAE for non-existent algos"); } catch (NoSuchAlgorithmException nsae) {} try { dm = factory.newDigestMethod(null, null); fail("Should raise a NPE for null algo"); } catch (NullPointerException npe) { // } } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/CreatePhaosXMLDSig3Test.java0000644000175000017500000001420112214631242031276 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.security.*; import java.util.*; import javax.xml.crypto.URIDereferencer; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.dom.*; import javax.xml.crypto.dsig.spec.*; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.*; import javax.xml.crypto.test.KeySelectors; import javax.xml.parsers.DocumentBuilder; /** * Test that recreates Phaos XMLDSig-3 test vectors * but with different keys. For now we are just focusing on * the exc-c14n vectors. * * @author Sean Mullan */ public class CreatePhaosXMLDSig3Test extends org.junit.Assert { private XMLSignatureFactory fac; private DocumentBuilder db; static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public CreatePhaosXMLDSig3Test() throws Exception { fac = XMLSignatureFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); db = XMLUtils.createDocumentBuilder(false); } @org.junit.Test public void test_create_hmac_sha1_exclusive_c14n_comments_detached() throws Exception { test_create_hmac_sha1_exclusive_c14n_comments_detached(false); } @org.junit.Test public void test_create_hmac_sha1_40_exclusive_c14n_comments_detached() throws Exception { try { test_create_hmac_sha1_exclusive_c14n_comments_detached(true); fail("Expected HMACOutputLength Exception"); } catch (XMLSignatureException xse) { System.out.println(xse.getMessage()); // pass } } private void test_create_hmac_sha1_exclusive_c14n_comments_detached(boolean fortyBit) throws Exception { // create reference Reference ref = fac.newReference ("http://www.ietf.org/rfc/rfc3161.txt", fac.newDigestMethod(DigestMethod.SHA1, null)); // create SignedInfo HMACParameterSpec spec = null; if (fortyBit) { spec = new HMACParameterSpec(40); } SignedInfo si = fac.newSignedInfo( fac.newCanonicalizationMethod (CanonicalizationMethod.EXCLUSIVE_WITH_COMMENTS, (C14NMethodParameterSpec) null), fac.newSignatureMethod(SignatureMethod.HMAC_SHA1, spec), Collections.singletonList(ref)); // create XMLSignature XMLSignature sig = fac.newXMLSignature(si, null); Document doc = db.newDocument(); DOMSignContext dsc = new DOMSignContext (new KeySelectors.SecretKeySelector ("test".getBytes("ASCII")), doc); dsc.putNamespacePrefix(XMLSignature.XMLNS, "dsig"); URIDereferencer ud = new LocalHttpCacheURIDereferencer(); dsc.setURIDereferencer(ud); sig.sign(dsc); DOMValidateContext dvc = new DOMValidateContext (new KeySelectors.SecretKeySelector ("test".getBytes("ASCII")), doc); dvc.setURIDereferencer(ud); XMLSignature sig2 = fac.unmarshalXMLSignature(dvc); assertTrue(sig.equals(sig2)); assertTrue(sig2.validate(dvc)); } @org.junit.Test public void test_create_hmac_sha1_exclusive_c14n_enveloped() throws Exception { // create reference Reference ref = fac.newReference("", fac.newDigestMethod(DigestMethod.SHA1, null), Collections.singletonList(fac.newTransform(Transform.ENVELOPED, (TransformParameterSpec) null)), null, null); // create SignedInfo SignedInfo si = fac.newSignedInfo( fac.newCanonicalizationMethod(CanonicalizationMethod.EXCLUSIVE, (C14NMethodParameterSpec) null), fac.newSignatureMethod(SignatureMethod.HMAC_SHA1, null), Collections.singletonList(ref)); // create XMLSignature XMLSignature sig = fac.newXMLSignature(si, null); Document doc = db.newDocument(); Element player = doc.createElementNS(null, "player"); player.setAttributeNS(null, "bats", "left"); player.setAttributeNS(null, "id", "10012"); player.setAttributeNS(null, "throws", "right"); Element name = doc.createElementNS(null, "name"); name.appendChild(doc.createTextNode("Alfonso Soriano")); Element position = doc.createElementNS(null, "position"); position.appendChild(doc.createTextNode("2B")); Element team = doc.createElementNS(null, "team"); team.appendChild(doc.createTextNode("New York Yankees")); player.appendChild(doc.createComment(" Here's a comment ")); player.appendChild(name); player.appendChild(position); player.appendChild(team); doc.appendChild(player); DOMSignContext dsc = new DOMSignContext (new KeySelectors.SecretKeySelector ("test".getBytes("ASCII")), player); dsc.putNamespacePrefix(XMLSignature.XMLNS, "dsig"); sig.sign(dsc); DOMValidateContext dvc = new DOMValidateContext (new KeySelectors.SecretKeySelector ("test".getBytes("ASCII")), player.getLastChild()); XMLSignature sig2 = fac.unmarshalXMLSignature(dvc); assertTrue(sig.equals(sig2)); assertTrue(sig2.validate(dvc)); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/SignaturePropertiesTest.java0000644000175000017500000000761711654523221031724 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.util.*; import javax.xml.crypto.dsig.*; /** * Unit test for javax.xml.crypto.dsig.SignatureProperties * * @author Valerie Peng */ public class SignaturePropertiesTest extends org.junit.Assert { private XMLSignatureFactory factory; private String id = "id"; private SignatureProperty prop; public SignaturePropertiesTest() throws Exception { factory = XMLSignatureFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); prop = factory.newSignatureProperty (Collections.singletonList(new TestUtils.MyOwnXMLStructure()), "propTarget", "propId"); } @org.junit.Test @SuppressWarnings("unchecked") public void testConstructor() { // test XMLSignatureFactory.newSignatureProperties(List, String) SignatureProperties props; try { props = factory.newSignatureProperties(null, id); fail("Should raise a NPE for null content"); } catch (NullPointerException npe) { } catch (Exception ex) { fail("Should raise a NPE for null content instead of " + ex); } List list = new Vector(); try { props = factory.newSignatureProperties(list, id); fail("Should raise an IAE for empty content"); } catch (IllegalArgumentException iae) { } catch (Exception ex) { fail("Should raise an IAE for empty content instead of " + ex); } String strEntry = "wrong type"; list.add(strEntry); try { props = factory.newSignatureProperties(list, id); fail("Should raise a CCE for content containing " + "invalid, i.e. non-SignatureProperty, entries"); } catch (ClassCastException cce) { cce.printStackTrace(); } catch (Exception ex) { fail("Should raise a CCE for content with invalid entries " + "instead of " + ex); } list.remove(strEntry); list.add(prop); props = factory.newSignatureProperties(list, id); assertNotNull(props); List unmodifiable = props.getProperties(); assertNotNull(unmodifiable); try { unmodifiable.add(prop); fail("Should return an unmodifiable List object"); } catch (UnsupportedOperationException uoe) {} assertTrue(Arrays.equals(unmodifiable.toArray(), list.toArray())); assertNotNull(props); assertEquals(props.getId(), id); } @org.junit.Test public void testisFeatureSupported() { List list = new Vector(); list.add(prop); SignatureProperties props = factory.newSignatureProperties(list, id); try { props.isFeatureSupported(null); fail("Should raise a NPE for null feature"); } catch (NullPointerException npe) {} assertTrue(!props.isFeatureSupported("not supported")); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/InteropC14nTest.java0000644000175000017500000001122511654523221027742 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.io.File; import java.security.Security; import javax.xml.crypto.test.KeySelectors; /** * This is a testcase to validate all "c14n" testcases * under data/vectors/interop directory * * @author Sean Mullan */ public class InteropC14nTest extends org.junit.Assert { private SignatureValidator validator = null; private String base; static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public InteropC14nTest() { String fs = System.getProperty("file.separator"); base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); base = base + fs + "src/test/resources" + fs + "interop"; } @org.junit.Test public void test_y1_exc_signature() throws Exception { validator = new SignatureValidator(new File(base, "c14n/Y1")); String file = "exc-signature.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation", coreValidity); } /* COMMENTED OUT since this test requires MD5 support public void test_y2_signature_joseph_exc() throws Exception { validator = new SignatureValidator(new File(base, "c14n/Y2")); String file = "signature-joseph-exc.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation", coreValidity); } */ @org.junit.Test public void test_y3_signature() throws Exception { validator = new SignatureValidator(new File(base, "c14n/Y3")); String file = "signature.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation#1", coreValidity); coreValidity = validator.validate (file, new KeySelectors.RawX509KeySelector()); assertTrue("Signature failed core validation#2", coreValidity); } @org.junit.Test public void test_y4_signature() throws Exception { validator = new SignatureValidator(new File(base, "c14n/Y4")); String file = "signature.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation#1", coreValidity); coreValidity = validator.validate (file, new KeySelectors.RawX509KeySelector()); assertTrue("Signature failed core validation#2", coreValidity); } @org.junit.Test @org.junit.Ignore public void test_y5_signature() throws Exception { validator = new SignatureValidator(new File(base, "c14n/Y5")); String file = "signature.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation#1", coreValidity); coreValidity = validator.validate (file, new KeySelectors.RawX509KeySelector()); assertTrue("Signature failed core validation#2", coreValidity); } @org.junit.Test @org.junit.Ignore public void test_y5_signatureCommented() throws Exception { validator = new SignatureValidator(new File(base, "c14n/Y5")); String file = "signatureCommented.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation#1", coreValidity); coreValidity = validator.validate (file, new KeySelectors.RawX509KeySelector()); assertTrue("Signature failed core validation#2", coreValidity); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/Baltimore23Test.java0000644000175000017500000001777711654523221030001 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.io.File; import java.io.FileInputStream; import java.security.KeyStore; import java.security.Security; import javax.xml.crypto.KeySelector; import javax.xml.crypto.URIDereferencer; import javax.xml.crypto.dsig.XMLSignatureException; import javax.xml.crypto.test.KeySelectors; /** * This is a testcase to validate all "merlin-xmldsig-twenty-three" * testcases from Baltimore * * @author Sean Mullan */ public class Baltimore23Test extends org.junit.Assert { private SignatureValidator validator; private File dir; private final URIDereferencer ud; static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public Baltimore23Test() { String fs = System.getProperty("file.separator"); String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); dir = new File(base + fs + "src/test/resources" + fs + "ie" + fs + "baltimore" + fs + "merlin-examples", "merlin-xmldsig-twenty-three"); validator = new SignatureValidator(dir); ud = new LocalHttpCacheURIDereferencer(); } @org.junit.Test public void test_signature_enveloped_dsa() throws Exception { String file = "signature-enveloped-dsa.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_enveloping_b64_dsa() throws Exception { String file = "signature-enveloping-b64-dsa.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_enveloping_dsa() throws Exception { String file = "signature-enveloping-dsa.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_external_b64_dsa() throws Exception { String file = "signature-external-b64-dsa.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.KeyValueKeySelector(), ud); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_external_dsa() throws Exception { String file = "signature-external-dsa.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.KeyValueKeySelector(), ud); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_enveloping_rsa() throws Exception { String file = "signature-enveloping-rsa.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_enveloping_hmac_sha1() throws Exception { String file = "signature-enveloping-hmac-sha1.xml"; KeySelector ks = new KeySelectors.SecretKeySelector ("secret".getBytes("ASCII") ); boolean coreValidity = validator.validate(file, ks); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_enveloping_hmac_sha1_40() throws Exception { String file = "signature-enveloping-hmac-sha1-40.xml"; KeySelector ks = new KeySelectors.SecretKeySelector ("secret".getBytes("ASCII") ); try { validator.validate(file, ks); fail("Expected HMACOutputLength exception"); } catch (XMLSignatureException xse) { System.out.println(xse.getMessage()); // pass } } @org.junit.Test public void test_signature_keyname() throws Exception { String file = "signature-keyname.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.CollectionKeySelector(dir), ud); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_retrievalmethod_rawx509crt() throws Exception { String file = "signature-retrievalmethod-rawx509crt.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.CollectionKeySelector(dir), ud); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_x509_crt_crl() throws Exception { String file = "signature-x509-crt-crl.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.RawX509KeySelector(), ud); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_x509_crt() throws Exception { String file = "signature-x509-crt.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.RawX509KeySelector(), ud); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_x509_is() throws Exception { String file = "signature-x509-is.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.CollectionKeySelector(dir), ud); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_x509_ski() throws Exception { String file = "signature-x509-ski.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.CollectionKeySelector(dir), ud); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature_x509_sn() throws Exception { String file = "signature-x509-sn.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.CollectionKeySelector(dir), ud); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_signature() throws Exception { String file = "signature.xml"; String fs = System.getProperty("file.separator"); String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); String keystore = base + fs + "src/test/resources" + fs + "ie" + fs + "baltimore" + fs + "merlin-examples" + fs + "merlin-xmldsig-twenty-three" + fs + "certs" + fs + "xmldsig.jks"; KeyStore ks = KeyStore.getInstance("JKS"); ks.load(new FileInputStream(keystore), "changeit".toCharArray()); boolean cv = validator.validate(file, new X509KeySelector(ks, false), ud); assertTrue("Signature failed core validation", cv); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/dom/0000755000175000017500000000000012273503732024752 5ustar tonytonylibxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/dom/DOMValidateContextTest.java0000644000175000017500000000652311551333171032115 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig.dom; import java.io.*; import javax.xml.crypto.dsig.dom.DOMValidateContext; import javax.xml.crypto.test.dsig.TestUtils; /** * Unit test for javax.xml.crypto.dsig.dom.DOMValidateContext * * @author Valerie Peng */ public class DOMValidateContextTest extends org.junit.Assert { private DOMValidateContext domVC; public DOMValidateContextTest() throws Exception { String fs = System.getProperty("file.separator"); String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); File dir = new File(base + fs + "src/test/resources" + fs + "ie" + fs + "baltimore" + fs + "merlin-examples", "merlin-xmldsig-twenty-three"); File input = new File(dir, "signature.xml"); domVC = (DOMValidateContext) TestUtils.getXMLValidateContext("DOM", input, "Reference"); } @org.junit.Test public void testConstructor() throws Exception { assertNotNull(domVC); try { new DOMValidateContext(TestUtils.getPublicKey("RSA"), null); fail("Should throw a NPE for null node"); } catch (NullPointerException npe) { } catch (Exception ex) { fail("Should throw a NPE instead of " + ex + " for null node"); } } @org.junit.Test public void testSetGetProperty() throws Exception { try { domVC.setProperty(null, "value"); } catch (NullPointerException npe) { } catch (Exception ex) { fail("Should throw a NPE instead of " + ex + " for null name"); } try { domVC.getProperty(null); } catch (NullPointerException npe) { } catch (Exception ex) { fail("Should throw a NPE instead of " + ex + " for null name"); } String pname = "name"; String pvalue1 = "value"; String pvalue2 = "newvalue"; assertNull(domVC.setProperty(pname, pvalue1)); assertEquals((String)domVC.getProperty(pname), pvalue1); assertEquals(domVC.setProperty(pname, pvalue2), pvalue1); assertEquals((String)domVC.getProperty(pname), pvalue2); } @org.junit.Test public void testSetGetNode() throws Exception { try { domVC.setNode(null); } catch (NullPointerException npe) { } catch (Exception ex) { fail("Should throw a NPE instead of " + ex + " for null node"); } assertNotNull(domVC.getNode()); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/CreateBaltimore23Test.java0000644000175000017500000006517012214631242031107 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.io.*; import java.math.BigInteger; import java.security.Key; import java.security.KeyStore; import java.security.PublicKey; import java.security.Security; import java.security.cert.Certificate; import java.security.cert.CertificateFactory; import java.security.cert.X509CRL; import java.util.*; import org.w3c.dom.*; import org.xml.sax.InputSource; import org.xml.sax.SAXParseException; import javax.xml.crypto.KeySelector; import javax.xml.crypto.URIDereferencer; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dom.*; import javax.xml.crypto.dsig.dom.DOMSignContext; import javax.xml.crypto.dsig.dom.DOMValidateContext; import javax.xml.crypto.dsig.keyinfo.*; import javax.xml.crypto.dsig.spec.*; import javax.xml.parsers.DocumentBuilder; import javax.xml.transform.*; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import javax.xml.crypto.test.KeySelectors; /** * Test that recreates merlin-xmldsig-twenty-three test vectors but with * different keys and X.509 data. * * @author Sean Mullan */ public class CreateBaltimore23Test extends org.junit.Assert { private XMLSignatureFactory fac; private KeyInfoFactory kifac; private DocumentBuilder db; private CanonicalizationMethod withoutComments; private Transform withComments; private SignatureMethod dsaSha1, rsaSha1; private DigestMethod sha1; private KeyInfo dsa, rsa; private KeySelector kvks = new KeySelectors.KeyValueKeySelector(); private KeySelector sks; private Key signingKey; private PublicKey validatingKey; private Certificate signingCert; private KeyStore ks; private final URIDereferencer ud; static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public CreateBaltimore23Test() throws Exception { fac = XMLSignatureFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); kifac = fac.getKeyInfoFactory(); db = XMLUtils.createDocumentBuilder(false); // get key & self-signed certificate from keystore String fs = System.getProperty("file.separator"); String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); FileInputStream fis = new FileInputStream (base + fs + "src/test/resources" + fs + "test.jks"); ks = KeyStore.getInstance("JKS"); ks.load(fis, "changeit".toCharArray()); signingKey = ks.getKey("mullan", "changeit".toCharArray()); signingCert = ks.getCertificate("mullan"); validatingKey = signingCert.getPublicKey(); // create common objects withoutComments = fac.newCanonicalizationMethod (CanonicalizationMethod.INCLUSIVE, (C14NMethodParameterSpec) null); withComments = fac.newTransform (CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS, (TransformParameterSpec) null); dsaSha1 = fac.newSignatureMethod(SignatureMethod.DSA_SHA1, null); sha1 = fac.newDigestMethod(DigestMethod.SHA1, null); dsa = kifac.newKeyInfo(Collections.singletonList (kifac.newKeyValue(validatingKey))); rsa = kifac.newKeyInfo(Collections.singletonList (kifac.newKeyValue(TestUtils.getPublicKey("RSA")))); rsaSha1 = fac.newSignatureMethod(SignatureMethod.RSA_SHA1, null); sks = new KeySelectors.SecretKeySelector("secret".getBytes("ASCII")); ud = new LocalHttpCacheURIDereferencer(); } @org.junit.Test public void test_create_signature_enveloped_dsa() throws Exception { // create SignedInfo SignedInfo si = fac.newSignedInfo (withoutComments, dsaSha1, Collections.singletonList (fac.newReference ("", sha1, Collections.singletonList (fac.newTransform(Transform.ENVELOPED, (TransformParameterSpec) null)), null, null))); // create XMLSignature XMLSignature sig = fac.newXMLSignature(si, dsa); Document doc = db.newDocument(); Element envelope = doc.createElementNS ("http://example.org/envelope", "Envelope"); envelope.setAttributeNS (Constants.NamespaceSpecNS, "xmlns", "http://example.org/envelope"); doc.appendChild(envelope); DOMSignContext dsc = new DOMSignContext(signingKey, envelope); sig.sign(dsc); DOMValidateContext dvc = new DOMValidateContext (kvks, envelope.getFirstChild()); XMLSignature sig2 = fac.unmarshalXMLSignature(dvc); assertTrue(sig.equals(sig2)); assertTrue(sig2.validate(dvc)); } @org.junit.Test public void test_create_signature_enveloping_b64_dsa() throws Exception { test_create_signature_enveloping(dsaSha1, dsa, signingKey, kvks, true); } @org.junit.Test public void test_create_signature_enveloping_dsa() throws Exception { test_create_signature_enveloping(dsaSha1, dsa, signingKey, kvks, false); } @org.junit.Test public void test_create_signature_enveloping_hmac_sha1_40() throws Exception { SignatureMethod hmacSha1 = fac.newSignatureMethod (SignatureMethod.HMAC_SHA1, new HMACParameterSpec(40)); try { test_create_signature_enveloping(hmacSha1, null, TestUtils.getSecretKey("secret".getBytes("ASCII")), sks, false); fail("Expected HMACOutputLength Exception"); } catch (XMLSignatureException xse) { System.out.println(xse.getMessage()); // pass } } @org.junit.Test public void test_create_signature_enveloping_hmac_sha1() throws Exception { SignatureMethod hmacSha1 = fac.newSignatureMethod (SignatureMethod.HMAC_SHA1, null); test_create_signature_enveloping(hmacSha1, null, TestUtils.getSecretKey("secret".getBytes("ASCII")), sks, false); } @org.junit.Test public void test_create_signature_enveloping_rsa() throws Exception { test_create_signature_enveloping(rsaSha1, rsa, TestUtils.getPrivateKey("RSA"), kvks, false); } @org.junit.Test public void test_create_signature_external_b64_dsa() throws Exception { test_create_signature_external(dsaSha1, dsa, signingKey, kvks, true); } @org.junit.Test public void test_create_signature_external_dsa() throws Exception { test_create_signature_external(dsaSha1, dsa, signingKey, kvks, false); } @org.junit.Test public void test_create_signature_keyname() throws Exception { KeyInfo kn = kifac.newKeyInfo(Collections.singletonList (kifac.newKeyName("mullan"))); test_create_signature_external(dsaSha1, kn, signingKey, new X509KeySelector(ks), false); } @org.junit.Test public void test_create_signature_retrievalmethod_rawx509crt() throws Exception { KeyInfo rm = kifac.newKeyInfo(Collections.singletonList (kifac.newRetrievalMethod ("certs/mullan.crt", X509Data.RAW_X509_CERTIFICATE_TYPE, null))); test_create_signature_external(dsaSha1, rm, signingKey, new X509KeySelector(ks), false); } @org.junit.Test public void test_create_signature_x509_crt_crl() throws Exception { List xds = new ArrayList(); CertificateFactory cf = CertificateFactory.getInstance("X.509"); xds.add(signingCert); String fs = System.getProperty("file.separator"); String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); FileInputStream fis = new FileInputStream( base + fs + "src/test/resources" + fs + "ie" + fs + "baltimore" + fs + "merlin-examples" + fs + "merlin-xmldsig-twenty-three" + fs + "certs" + fs + "crl"); X509CRL crl = (X509CRL) cf.generateCRL(fis); fis.close(); xds.add(crl); KeyInfo crt_crl = kifac.newKeyInfo(Collections.singletonList (kifac.newX509Data(xds))); test_create_signature_external(dsaSha1, crt_crl, signingKey, new X509KeySelector(ks), false); } @org.junit.Test public void test_create_signature_x509_crt() throws Exception { KeyInfo crt = kifac.newKeyInfo(Collections.singletonList (kifac.newX509Data(Collections.singletonList(signingCert)))); test_create_signature_external(dsaSha1, crt, signingKey, new X509KeySelector(ks), false); } @org.junit.Test public void test_create_signature_x509_is() throws Exception { KeyInfo is = kifac.newKeyInfo(Collections.singletonList (kifac.newX509Data(Collections.singletonList (kifac.newX509IssuerSerial ("CN=Sean Mullan,DC=sun,DC=com", new BigInteger("47cdb772", 16)))))); test_create_signature_external(dsaSha1, is, signingKey, new X509KeySelector(ks), false); } @org.junit.Test public void test_create_signature_x509_ski() throws Exception { KeyInfo ski = kifac.newKeyInfo(Collections.singletonList (kifac.newX509Data(Collections.singletonList ("keyid".getBytes("ASCII"))))); test_create_signature_external(dsaSha1, ski, signingKey, KeySelector.singletonKeySelector(validatingKey), false); } @org.junit.Test public void test_create_signature_x509_sn() throws Exception { KeyInfo sn = kifac.newKeyInfo(Collections.singletonList (kifac.newX509Data(Collections.singletonList ("CN=Sean Mullan,DC=sun,DC=com")))); test_create_signature_external(dsaSha1, sn, signingKey, new X509KeySelector(ks), false); } @org.junit.Test public void test_create_signature() throws Exception { // set up reusable objects Transform env = fac.newTransform(Transform.ENVELOPED, (TransformParameterSpec) null); // create references List refs = new ArrayList(); // Reference 1 refs.add(fac.newReference("http://www.w3.org/TR/xml-stylesheet", sha1)); // Reference 2 refs.add(fac.newReference ("http://www.w3.org/Signature/2002/04/xml-stylesheet.b64", sha1, Collections.singletonList (fac.newTransform(Transform.BASE64, (TransformParameterSpec) null)), null, null)); // Reference 3 refs.add(fac.newReference("#object-1", sha1, Collections.singletonList (fac.newTransform(Transform.XPATH, new XPathFilterParameterSpec("self::text()"))), XMLObject.TYPE, null)); // Reference 4 String expr = "\n" + " ancestor-or-self::dsig:SignedInfo " + "\n" + " and " + "\n" + " count(ancestor-or-self::dsig:Reference | " + "\n" + " here()/ancestor::dsig:Reference[1]) > " + "\n" + " count(ancestor-or-self::dsig:Reference) " + "\n" + " or " + "\n" + " count(ancestor-or-self::node() | " + "\n" + " id('notaries')) = " + "\n" + " count(ancestor-or-self::node()) " + "\n"; new XPathFilterParameterSpec(expr, Collections.singletonMap("dsig", XMLSignature.XMLNS)); // refs.add(fac.newReference("", sha1, Collections.singletonList // (fac.newTransform(Transform.XPATH, xfp)), // XMLObject.TYPE, null)); // Reference 5 refs.add(fac.newReference("#object-2", sha1, Collections.singletonList (fac.newTransform(Transform.BASE64, (TransformParameterSpec) null)), XMLObject.TYPE, null)); // Reference 6 refs.add(fac.newReference ("#manifest-1", sha1, null, Manifest.TYPE, null)); // Reference 7 refs.add(fac.newReference("#signature-properties-1", sha1, null, SignatureProperties.TYPE, null)); // Reference 8 List transforms = new ArrayList(); transforms.add(env); refs.add(fac.newReference("", sha1, transforms, null, null)); // Reference 9 transforms.add(withComments); refs.add(fac.newReference("", sha1, transforms, null, null)); // Reference 10 refs.add(fac.newReference("#xpointer(/)", sha1, Collections.singletonList(env), null, null)); // Reference 11 refs.add(fac.newReference("#xpointer(/)", sha1, transforms, null, null)); // Reference 12 refs.add (fac.newReference("#object-3", sha1, null, XMLObject.TYPE, null)); // Reference 13 refs.add(fac.newReference("#object-3", sha1, Collections.singletonList(withComments), XMLObject.TYPE, null)); // Reference 14 refs.add(fac.newReference("#xpointer(id('object-3'))", sha1, null, XMLObject.TYPE, null)); // Reference 15 refs.add(fac.newReference("#xpointer(id('object-3'))", sha1, Collections.singletonList(withComments), XMLObject.TYPE, null)); // Reference 16 refs.add(fac.newReference("#reference-2", sha1)); // Reference 17 refs.add(fac.newReference("#manifest-reference-1", sha1, null, null, "reference-1")); // Reference 18 refs.add(fac.newReference("#reference-1", sha1, null, null, "reference-2")); // create SignedInfo SignedInfo si = fac.newSignedInfo(withoutComments, dsaSha1, refs); // create keyinfo XPathFilterParameterSpec xpf = new XPathFilterParameterSpec( "ancestor-or-self::dsig:X509Data", Collections.singletonMap("dsig", XMLSignature.XMLNS)); RetrievalMethod rm = kifac.newRetrievalMethod("#object-4", X509Data.TYPE, Collections.singletonList(fac.newTransform (Transform.XPATH, xpf))); KeyInfo ki = kifac.newKeyInfo(Collections.singletonList(rm), null); Document doc = db.newDocument(); // create objects List objs = new ArrayList(); // Object 1 objs.add(fac.newXMLObject(Collections.singletonList (new DOMStructure(doc.createTextNode("I am the text."))), "object-1", "text/plain", null)); // Object 2 objs.add(fac.newXMLObject(Collections.singletonList (new DOMStructure(doc.createTextNode("SSBhbSB0aGUgdGV4dC4="))), "object-2", "text/plain", Transform.BASE64)); // Object 3 Element nc = doc.createElementNS(null, "NonCommentandus"); nc.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns", ""); nc.appendChild(doc.createComment(" Commentandum ")); objs.add(fac.newXMLObject(Collections.singletonList (new DOMStructure(nc)), "object-3", null, null)); // Manifest List manRefs = new ArrayList(); // Manifest Reference 1 manRefs.add(fac.newReference("http://www.w3.org/TR/xml-stylesheet", sha1, null, null, "manifest-reference-1")); // Manifest Reference 2 manRefs.add(fac.newReference("#reference-1", sha1)); // Manifest Reference 3 List manTrans = new ArrayList(); String xslt = "" + "\n" + " \n" + " \n" + " \n" + " \n" + " Notaries\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "
\n" + " \n" + "
\n" + " \n" + " \n" + "
\n" + "
\n"; Document docxslt = db.parse(new ByteArrayInputStream(xslt.getBytes())); Node xslElem = docxslt.getDocumentElement(); manTrans.add(fac.newTransform(Transform.XSLT, new XSLTTransformParameterSpec(new DOMStructure(xslElem)))); manTrans.add(fac.newTransform(CanonicalizationMethod.INCLUSIVE, (TransformParameterSpec) null)); // Comment out Manifest Reference 3, for some reason xalan is throwing NPE // when Transform is processed. // manRefs.add(fac.newReference("#notaries", sha1, manTrans, null, null)); objs.add(fac.newXMLObject(Collections.singletonList (fac.newManifest(manRefs, "manifest-1")), null, null, null)); // SignatureProperties Element sa = doc.createElementNS("urn:demo", "SignerAddress"); sa.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns", "urn:demo"); Element ip = doc.createElementNS("urn:demo", "IP"); ip.appendChild(doc.createTextNode("192.168.21.138")); sa.appendChild(ip); SignatureProperty sp = fac.newSignatureProperty (Collections.singletonList(new DOMStructure(sa)), "#signature", null); SignatureProperties sps = fac.newSignatureProperties (Collections.singletonList(sp), "signature-properties-1"); objs.add(fac.newXMLObject(Collections.singletonList(sps), null, null, null)); // Object 4 List xds = new ArrayList(); xds.add("CN=Sean Mullan,DC=sun,DC=com"); xds.add(kifac.newX509IssuerSerial ("CN=Sean Mullan,DC=sun,DC=com", new BigInteger("47cdb772", 16))); xds.add(signingCert); objs.add(fac.newXMLObject(Collections.singletonList (kifac.newX509Data(xds)), "object-4", null, null)); // create XMLSignature XMLSignature sig = fac.newXMLSignature(si, ki, objs, "signature", null); // create envelope header Element envelope = doc.createElementNS ("http://example.org/usps", "Envelope"); envelope.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns", "http://example.org/usps"); envelope.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:foo", "http://example.org/foo"); doc.appendChild(envelope); Element dearSir = doc.createElementNS ("http://example.org/usps", "DearSir"); dearSir.appendChild(doc.createTextNode("foo")); envelope.appendChild(dearSir); Element body = doc.createElementNS("http://example.org/usps", "Body"); body.appendChild(doc.createTextNode("bar")); envelope.appendChild(body); Element ys = doc.createElementNS ("http://example.org/usps", "YoursSincerely"); envelope.appendChild(ys); // create envelope footer Element ps = doc.createElementNS ("http://example.org/usps", "PostScript"); ps.appendChild(doc.createTextNode("bar")); envelope.appendChild(ps); Element notaries = doc.createElementNS(null, "Notaries"); notaries.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns", ""); notaries.setAttributeNS(null, "Id", "notaries"); Element notary1 = doc.createElementNS(null, "Notary"); notary1.setAttributeNS(null, "name", "Great, A. T."); Element notary2 = doc.createElementNS(null, "Notary"); notary2.setAttributeNS(null, "name", "Hun, A. T."); notaries.appendChild(notary1); notaries.appendChild(notary2); envelope.appendChild(notaries); envelope.appendChild(doc.createComment(" Commentary ")); DOMSignContext dsc = new DOMSignContext(signingKey, ys); dsc.setIdAttributeNS(notaries, null, "Id"); dsc.setURIDereferencer(ud); sig.sign(dsc); // DOM L2 does not support the creation of DOCTYPEs, so instead // we insert it before the document using a StringWriter // String docType = // "\n" // + "\n" // + "\n" // + "\n" // + "\n" // + "]>\n"; StringWriter sw = new StringWriter(); // sw.write(docType); dumpDocument(doc, sw); // read document back into DOM tree try { doc = XMLUtils.createDocumentBuilder(false).parse (new InputSource(new StringReader(sw.toString()))); } catch (SAXParseException spe) { System.err.println("line:" + spe.getLineNumber()); System.err.println("xml:" + sw.toString()); } Element sigElement = SignatureValidator.getSignatureElement(doc); if (sigElement == null) { throw new Exception("Couldn't find signature Element"); } DOMValidateContext dvc = new DOMValidateContext (new X509KeySelector(ks), sigElement); File f = new File( System.getProperty("dir.test.vector.baltimore") + System.getProperty("file.separator") + "merlin-xmldsig-twenty-three" + System.getProperty("file.separator")); dvc.setBaseURI(f.toURI().toString()); dvc.setURIDereferencer(ud); // register Notaries ID // Element notariesElem = // (Element) doc.getElementsByTagName("Notaries").item(0); // dvc.setIdAttributeNS(notariesElem, "", "Id"); // notariesElem.setIdAttributeNS("", "Id", true); XMLSignature sig2 = fac.unmarshalXMLSignature(dvc); assertTrue(sig.equals(sig2)); assertTrue(sig2.validate(dvc)); } private void dumpDocument(Document doc, Writer w) throws Exception { TransformerFactory tf = TransformerFactory.newInstance(); Transformer trans = tf.newTransformer(); // trans.setOutputProperty(OutputKeys.INDENT, "yes"); trans.transform(new DOMSource(doc), new StreamResult(w)); } private void test_create_signature_external (SignatureMethod sm, KeyInfo ki, Key signingKey, KeySelector ks, boolean b64) throws Exception { // create reference Reference ref; if (b64) { ref = fac.newReference ("http://www.w3.org/Signature/2002/04/xml-stylesheet.b64", sha1, Collections.singletonList (fac.newTransform(Transform.BASE64, (TransformParameterSpec) null)), null, null); } else { ref = fac.newReference ("http://www.w3.org/Signature/2002/04/xml-stylesheet.b64",sha1); } // create SignedInfo SignedInfo si = fac.newSignedInfo(withoutComments, sm, Collections.singletonList(ref)); Document doc = db.newDocument(); // create XMLSignature XMLSignature sig = fac.newXMLSignature(si, ki); DOMSignContext dsc = new DOMSignContext(signingKey, doc); dsc.setURIDereferencer(ud); sig.sign(dsc); /* System.out.println("doc is:"); StringWriter sw = new StringWriter(); dumpDocument(doc, sw); System.out.println(sw.toString()); */ DOMValidateContext dvc = new DOMValidateContext (ks, doc.getDocumentElement()); String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); String fs = System.getProperty("file.separator"); File f = new File( base + fs + "src/test/resources" + fs + "ie" + fs + "baltimore" + fs + "merlin-examples" + fs + "merlin-xmldsig-twenty-three" + fs); dvc.setBaseURI(f.toURI().toString()); dvc.setURIDereferencer(ud); XMLSignature sig2 = fac.unmarshalXMLSignature(dvc); assertTrue(sig.equals(sig2)); assertTrue(sig2.validate(dvc)); } private void test_create_signature_enveloping (SignatureMethod sm, KeyInfo ki, Key signingKey, KeySelector ks, boolean b64) throws Exception { // create reference Reference ref; if (b64) { ref = fac.newReference("#object", sha1, Collections.singletonList (fac.newTransform(Transform.BASE64, (TransformParameterSpec) null)), null, null); } else { ref = fac.newReference("#object", sha1); } // create SignedInfo SignedInfo si = fac.newSignedInfo(withoutComments, sm, Collections.singletonList(ref)); Document doc = db.newDocument(); // create Objects XMLObject obj = fac.newXMLObject(Collections.singletonList (new DOMStructure(doc.createTextNode("some text"))), "object", null, null); // create XMLSignature XMLSignature sig = fac.newXMLSignature (si, ki, Collections.singletonList(obj), null, null); DOMSignContext dsc = new DOMSignContext(signingKey, doc); sig.sign(dsc); DOMValidateContext dvc = new DOMValidateContext (ks, doc.getDocumentElement()); XMLSignature sig2 = fac.unmarshalXMLSignature(dvc); assertTrue(sig.equals(sig2)); assertTrue(sig2.validate(dvc)); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/CreateInteropXFilter2Test.java0000644000175000017500000001462012214631242032016 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.io.*; import java.security.*; import java.security.cert.Certificate; import java.util.*; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.dom.*; import javax.xml.crypto.dsig.keyinfo.*; import javax.xml.crypto.dsig.spec.*; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.*; import javax.xml.crypto.test.KeySelectors; import javax.xml.parsers.DocumentBuilder; /** * Test that recreates merlin-xpath-filter2-three test vectors * but with different keys and X.509 data. * * @author Sean Mullan */ public class CreateInteropXFilter2Test extends org.junit.Assert { private XMLSignatureFactory fac; private KeyInfoFactory kifac; private DocumentBuilder db; private KeyStore ks; private Key signingKey; private PublicKey validatingKey; private Certificate signingCert; static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public CreateInteropXFilter2Test() throws Exception { fac = XMLSignatureFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); kifac = fac.getKeyInfoFactory(); db = XMLUtils.createDocumentBuilder(false); // get key & self-signed certificate from keystore String fs = System.getProperty("file.separator"); String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); FileInputStream fis = new FileInputStream (base + fs + "src/test/resources" + fs + "test.jks"); ks = KeyStore.getInstance("JKS"); ks.load(fis, "changeit".toCharArray()); signingKey = ks.getKey("mullan", "changeit".toCharArray()); signingCert = ks.getCertificate("mullan"); validatingKey = signingCert.getPublicKey(); } @org.junit.Test public void test_create_sign_spec() throws Exception { List refs = new ArrayList(2); // create reference 1 List types = new ArrayList(3); types.add(new XPathType(" //ToBeSigned ", XPathType.Filter.INTERSECT)); types.add(new XPathType(" //NotToBeSigned ", XPathType.Filter.SUBTRACT)); types.add(new XPathType(" //ReallyToBeSigned ", XPathType.Filter.UNION)); XPathFilter2ParameterSpec xp1 = new XPathFilter2ParameterSpec(types); refs.add(fac.newReference ("", fac.newDigestMethod(DigestMethod.SHA1, null), Collections.singletonList(fac.newTransform(Transform.XPATH2, xp1)), null, null)); // create reference 2 List trans2 = new ArrayList(2); trans2.add(fac.newTransform(Transform.ENVELOPED, (TransformParameterSpec) null)); XPathFilter2ParameterSpec xp2 = new XPathFilter2ParameterSpec (Collections.singletonList (new XPathType(" / ", XPathType.Filter.UNION))); trans2.add(fac.newTransform(Transform.XPATH2, xp2)); refs.add(fac.newReference("#signature-value", fac.newDigestMethod(DigestMethod.SHA1, null), trans2, null, null)); // create SignedInfo SignedInfo si = fac.newSignedInfo( fac.newCanonicalizationMethod (CanonicalizationMethod.INCLUSIVE, (C14NMethodParameterSpec) null), fac.newSignatureMethod(SignatureMethod.DSA_SHA1, null), refs); // create KeyInfo List kits = new ArrayList(2); kits.add(kifac.newKeyValue(validatingKey)); List xds = new ArrayList(2); xds.add("CN=Sean Mullan, DC=sun, DC=com"); xds.add(signingCert); kits.add(kifac.newX509Data(xds)); KeyInfo ki = kifac.newKeyInfo(kits); // create XMLSignature XMLSignature sig = fac.newXMLSignature (si, ki, null, null, "signature-value"); Document doc = db.newDocument(); Element tbs1 = doc.createElementNS(null, "ToBeSigned"); Comment tbs1Com = doc.createComment(" comment "); Element tbs1Data = doc.createElementNS(null, "Data"); Element tbs1ntbs = doc.createElementNS(null, "NotToBeSigned"); Element tbs1rtbs = doc.createElementNS(null, "ReallyToBeSigned"); Comment tbs1rtbsCom = doc.createComment(" comment "); Element tbs1rtbsData = doc.createElementNS(null, "Data"); tbs1rtbs.appendChild(tbs1rtbsCom); tbs1rtbs.appendChild(tbs1rtbsData); tbs1ntbs.appendChild(tbs1rtbs); tbs1.appendChild(tbs1Com); tbs1.appendChild(tbs1Data); tbs1.appendChild(tbs1ntbs); Element tbs2 = doc.createElementNS(null, "ToBeSigned"); Element tbs2Data = doc.createElementNS(null, "Data"); Element tbs2ntbs = doc.createElementNS(null, "NotToBeSigned"); Element tbs2ntbsData = doc.createElementNS(null, "Data"); tbs2ntbs.appendChild(tbs2ntbsData); tbs2.appendChild(tbs2Data); tbs2.appendChild(tbs2ntbs); Element document = doc.createElementNS(null, "Document"); document.appendChild(tbs1); document.appendChild(tbs2); doc.appendChild(document); DOMSignContext dsc = new DOMSignContext(signingKey, document); sig.sign(dsc); DOMValidateContext dvc = new DOMValidateContext (new KeySelectors.KeyValueKeySelector(), document.getLastChild()); XMLSignature sig2 = fac.unmarshalXMLSignature(dvc); assertTrue(sig.equals(sig2)); assertTrue(sig2.validate(dvc)); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/ManifestTest.java0000644000175000017500000001350711654523221027447 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.util.*; import javax.xml.crypto.dsig.*; /** * Unit test for javax.xml.crypto.dsig.Manifest * * @version $Id$ * @author Valerie Peng */ public class ManifestTest extends org.junit.Assert { private XMLSignatureFactory fac; private static Reference VALID_REF = new TestUtils.MyOwnDOMReference("ref#1", true); private static Reference INVALID_REF = new TestUtils.MyOwnDOMReference("ref#2", false); public ManifestTest() { fac = XMLSignatureFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); } @org.junit.Test public void testConstructor() throws Exception { Manifest man = null; String id = "manifest_id"; List refs = new Vector(); // test XMLSignatureFactory.newManifest(List references) // and XMLSignatureFactory.newManifest(List references, // String id) // for generating Manifest objects refs.add(VALID_REF); refs.add(INVALID_REF); for (int i = 0; i < 3; i++) { String expectedId = null; switch (i) { case 0: man = fac.newManifest(refs); break; case 1: man = fac.newManifest(refs, null); break; case 2: man = fac.newManifest(refs, id); expectedId = id; break; } assertNotNull(man); assertTrue(Arrays.equals(man.getReferences().toArray(), refs.toArray())); assertEquals(man.getId(), expectedId); } try { man = fac.newManifest(null); fail("Should throw a NPE for null references"); } catch (NullPointerException npe) { } catch (Exception ex) { fail("Should throw a NPE instead of " + ex + " for null references"); } try { man = fac.newManifest(null, id); fail("Should throw a NPE for null references"); } catch (NullPointerException npe) { } catch (Exception ex) { fail("Should throw a NPE instead of " + ex + " for null references"); } // Clear the references list content refs.clear(); try { man = fac.newManifest(refs); fail("Should throw a IAE for empty references"); } catch (IllegalArgumentException iae) { } catch (Exception ex) { fail("Should throw a IAE instead of " + ex + " for empty references"); } try { man = fac.newManifest(refs, id); fail("Should throw a IAE for empty references"); } catch (IllegalArgumentException iae) { } catch (Exception ex) { fail("Should throw a IAE instead of " + ex + " for empty references"); } refs.add("references"); try { man = fac.newManifest(refs); fail("Should throw a CCE for references containing " + "non-Reference objects"); } catch (ClassCastException cce) { } catch (Exception ex) { fail("Should throw a CCE instead of " + ex + " for references containing non-Reference objects"); } try { man = fac.newManifest(refs, id); fail("Should throw a CCE for references containing " + "non-Reference objects"); } catch (ClassCastException cce) { } catch (Exception ex) { fail("Should throw a CCE instead of " + ex + " for references containing non-Reference objects"); } } @org.junit.Test public void testisFeatureSupported() throws Exception { List refs = new Vector(); refs.add(VALID_REF); Manifest man = fac.newManifest(refs); try { man.isFeatureSupported(null); fail("Should raise a NPE for null feature"); } catch (NullPointerException npe) {} assertTrue(!man.isFeatureSupported("not supported")); } @org.junit.Test @SuppressWarnings("unchecked") public void testgetReferences() throws Exception { List refs = new Vector(); refs.add(VALID_REF); Manifest man = fac.newManifest(refs); List stored = man.getReferences(); try { stored.add(INVALID_REF); fail("Should not be able to modify the references directly"); } catch (UnsupportedOperationException ex) { } try { ListIterator li = stored.listIterator(); li.add(INVALID_REF); fail("Should not be able to modify the references indirectly"); } catch (UnsupportedOperationException ex) { } } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/IaikSignatureAlgosTest.java0000644000175000017500000000624011654523221031422 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.io.File; import java.security.Security; import javax.xml.crypto.dsig.XMLSignatureException; import javax.xml.crypto.test.KeySelectors; /** * This is a testcase to validate all "signatureAlgorithms" * testcases from IAIK * * @author Sean Mullan */ public class IaikSignatureAlgosTest extends org.junit.Assert { private SignatureValidator validator; static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public IaikSignatureAlgosTest() { String fs = System.getProperty("file.separator"); String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); base += fs + "src/test/resources" + fs + "at" + fs + "iaik" + fs + "ixsil"; validator = new SignatureValidator(new File (base, "signatureAlgorithms/signatures")); } @org.junit.Test public void test_dsaSignature() throws Exception { String file = "dSASignature.xml"; boolean coreValidity = validator.validate(file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_rsaSignature() throws Exception { String file = "rSASignature.xml"; boolean coreValidity = validator.validate(file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_hmacShortSignature() throws Exception { String file = "hMACShortSignature.xml"; try { validator.validate(file, new KeySelectors.SecretKeySelector("secret".getBytes("ASCII"))); fail("Expected HMACOutputLength Exception"); } catch (XMLSignatureException xse) { // System.out.println(xse.getMessage()); // pass } } @org.junit.Test public void test_hmacSignature() throws Exception { String file = "hMACSignature.xml"; boolean coreValidity = validator.validate(file, new KeySelectors.SecretKeySelector("secret".getBytes("ASCII"))); assertTrue("Signature failed core validation", coreValidity); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/Driver.java0000644000175000017500000000344011654523221026267 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package javax.xml.crypto.test.dsig; import javax.xml.crypto.dsig.CanonicalizationMethod; import javax.xml.crypto.dsig.XMLSignatureFactory; import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec; /** * Used by ClassLoaderTest */ public class Driver { private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Driver.class); public void dsig() throws Exception { XMLSignatureFactory fac = XMLSignatureFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); long start = System.currentTimeMillis(); for (int i = 0; i < 100; i++) { fac.newCanonicalizationMethod (CanonicalizationMethod.EXCLUSIVE, (C14NMethodParameterSpec) null); } long end = System.currentTimeMillis(); long elapsed = end - start; if (log.isDebugEnabled()) { log.debug("Elapsed: " + elapsed); log.debug("dsig succeeded"); } } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/AppA.java0000644000175000017500000000204711654523221025657 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package javax.xml.crypto.test.dsig; import java.security.Security; /** * Used by ClassLoaderTest */ public class AppA { public void dsig() throws Exception { Security.addProvider(new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/BaltimoreXPathFilter2ThreeTest.javalibxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/BaltimoreXPathFilter2ThreeTest.j0000644000175000017500000000540411654523221032311 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.io.File; import java.security.Security; import javax.xml.crypto.test.KeySelectors; /** * This is a testcase to validate the "merlin-xpath-filter2-three" testcases * under data/vectors/ie/baltimore/merlin-examples directory * * @author Sean Mullan */ public class BaltimoreXPathFilter2ThreeTest extends org.junit.Assert { private SignatureValidator validator = null; static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public BaltimoreXPathFilter2ThreeTest() { String fs = System.getProperty("file.separator"); String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); base += fs + "src/test/resources" + fs + "interop" + fs + "xfilter2"; validator = new SignatureValidator(new File (base, "merlin-xpath-filter2-three")); } @org.junit.Test public void testSignSpec() throws Exception { String file = "sign-spec.xml"; boolean coreValidity = validator.validate(file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation#1", coreValidity); coreValidity = validator.validate(file, new KeySelectors.RawX509KeySelector()); assertTrue("Signature failed core validation#2", coreValidity); } @org.junit.Test public void testSignXfdl() throws Exception { String file = "sign-xfdl.xml"; boolean coreValidity = validator.validate(file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation#1", coreValidity); coreValidity = validator.validate(file, new KeySelectors.RawX509KeySelector()); assertTrue("Signature failed core validation#2", coreValidity); } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/LocalHttpCacheURIDereferencer.javalibxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/LocalHttpCacheURIDereferencer.ja0000644000175000017500000000566311750472047032234 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package javax.xml.crypto.test.dsig; import java.io.File; import java.io.FileInputStream; import java.util.HashMap; import java.util.Map; import javax.xml.crypto.Data; import javax.xml.crypto.OctetStreamData; import javax.xml.crypto.URIDereferencer; import javax.xml.crypto.URIReference; import javax.xml.crypto.URIReferenceException; import javax.xml.crypto.XMLCryptoContext; import javax.xml.crypto.dsig.XMLSignatureFactory; /** * This URIDereferencer implementation retrieves http references used in * test signatures from local disk in order to avoid network requests. */ public class LocalHttpCacheURIDereferencer implements URIDereferencer { private final URIDereferencer ud; private static final String FS = System.getProperty("file.separator"); private static final String BASEDIR = System.getProperty("basedir"); private final Map uriMap; public LocalHttpCacheURIDereferencer() { ud = XMLSignatureFactory.getInstance().getURIDereferencer(); String base = BASEDIR == null ? "./": BASEDIR; File dir = new File(base + FS + "src/test/resources" + FS + "javax" + FS + "xml" + FS + "crypto" + FS + "dsig"); uriMap = new HashMap(); uriMap.put("http://www.w3.org/TR/xml-stylesheet", new File(dir, "xml-stylesheet")); uriMap.put("http://www.w3.org/Signature/2002/04/xml-stylesheet.b64", new File(dir, "xml-stylesheet.b64")); uriMap.put("http://www.ietf.org/rfc/rfc3161.txt", new File(dir, "rfc3161.txt")); } public Data dereference(URIReference uriReference, XMLCryptoContext context) throws URIReferenceException { String uri = uriReference.getURI(); if (uriMap.containsKey(uri)) { try { FileInputStream fis = new FileInputStream(uriMap.get(uri)); return new OctetStreamData( fis, uriReference.getURI(), uriReference.getType()); } catch (Exception e) { throw new URIReferenceException(e); } } // fallback on builtin deref return ud.dereference(uriReference, context); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/XMLValidateContextTest.java0000644000175000017500000001000211737042662031352 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import javax.xml.crypto.*; import javax.xml.crypto.dsig.dom.DOMValidateContext; import javax.xml.crypto.dsig.*; import java.security.*; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; /** * Unit test for javax.xml.crypto.dsig.XMLValidateContext * * @version $Id$ * @author Valerie Peng */ public class XMLValidateContextTest extends org.junit.Assert { private XMLValidateContext defContext; private Key[] KEYS; private KeySelector[] KEY_SELECTORS; public XMLValidateContextTest() throws Exception { // set up the validatingKeys KEYS = new Key[3]; KEYS[0] = TestUtils.getPublicKey("DSA"); KEYS[1] = TestUtils.getPublicKey("RSA"); KEYS[2] = new SecretKeySpec(new byte[16], "HmacSHA1"); // set up the default XMLValidateContext SecretKey sk = new SecretKeySpec(new byte[8], "DES"); defContext = new DOMValidateContext(sk, TestUtils.newDocument()); // set up the key selectors KEY_SELECTORS = new KeySelector[1]; KEY_SELECTORS[0] = KeySelector.singletonKeySelector(sk); } @org.junit.Test public void testsetngetKeySelector() throws Exception { defContext.setKeySelector(null); assertNull(defContext.getKeySelector()); for (int i = 0; i < KEY_SELECTORS.length; i++) { defContext.setKeySelector(KEY_SELECTORS[i]); assertEquals(defContext.getKeySelector(), KEY_SELECTORS[i]); } } @org.junit.Test public void testsetngetBaseURI() throws Exception { assertNull(defContext.getBaseURI()); String uri = "http://www.w3.org/2000/09/xmldsig#"; defContext.setBaseURI(uri); assertEquals(defContext.getBaseURI(), uri); defContext.setBaseURI(null); assertNull(defContext.getBaseURI()); } @org.junit.Test public void testsetngetProperty() throws Exception { String name = "key"; assertNull(defContext.getProperty(name)); try { defContext.setProperty(null, null); fail("Should raise a NPE with a null name"); } catch (NullPointerException npe) { } catch (Exception ex) { fail("Should raise a NPE instead of " + ex); } String value1 = "value#1"; String value2 = "value#2"; assertNull(defContext.setProperty(name, value1)); assertEquals(defContext.getProperty(name), value1); assertEquals(defContext.setProperty(name, value2), value1); assertEquals(defContext.getProperty(name), value2); assertEquals(defContext.setProperty(name, null), value2); assertNull(defContext.getProperty(name)); } @org.junit.Test public void testsetngetURIDereferencer() throws Exception { assertNull(defContext.getURIDereferencer()); byte[] data = "simpleDereferencer".getBytes(); URIDereferencer deref = new TestUtils.OctetStreamURIDereferencer(data); defContext.setURIDereferencer(deref); assertEquals(defContext.getURIDereferencer(), deref); defContext.setURIDereferencer(null); assertNull(defContext.getURIDereferencer()); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/ClassLoaderTest.java0000644000175000017500000001350312030302102030047 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package javax.xml.crypto.test.dsig; import java.lang.reflect.Method; import java.io.File; import java.net.URL; import java.net.URLClassLoader; import java.security.AccessController; import java.security.Provider; import java.security.Security; import javax.xml.crypto.dsig.CanonicalizationMethod; import org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI; /** * This test uses more than one classloader to load a class (Driver) that * invokes the XMLSignature API. It tests that there are not provider class * loading issues with more than one classloader (see 6380953). */ public class ClassLoaderTest extends org.junit.Assert { private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ClassLoaderTest.class); @org.junit.Test public void testMultipleLoaders() throws Exception { String baseDir = System.getProperty("basedir"); String fs = System.getProperty("file.separator"); File file0 = new File(baseDir + fs + "build" + fs + "classes" + fs); File file1 = new File(baseDir + fs + "build" + fs + "test" + fs); URL[] urls = new URL[2]; urls[0] = file0.toURI().toURL(); urls[1] = file1.toURI().toURL(); URLClassLoader uc1 = new URLClassLoader (urls, Thread.currentThread().getContextClassLoader()); URLClassLoader uc2 = new URLClassLoader (urls, Thread.currentThread().getContextClassLoader()); Class c1 = uc1.loadClass("javax.xml.crypto.test.dsig.Driver"); Class c2 = uc2.loadClass("javax.xml.crypto.test.dsig.Driver"); Object o1 = c1.newInstance(); Object o2 = c2.newInstance(); Method m1 = c1.getMethod("dsig", (Class[]) null); Method m2 = c2.getMethod("dsig", (Class[]) null); m1.invoke(o1, (Object[]) null); m2.invoke(o2, (Object[]) null); } @org.junit.Test public void testProviderMultipleLoaders() throws Exception { String baseDir = System.getProperty("basedir"); String fs = System.getProperty("file.separator"); File file0 = new File(baseDir + fs + "build" + fs + "classes" + fs); File file1 = new File(baseDir + fs + "build" + fs + "test" + fs); URL[] urls = new URL[2]; urls[0] = file0.toURI().toURL(); urls[1] = file1.toURI().toURL(); URLClassLoader uc1 = new URLClassLoader (urls, Thread.currentThread().getContextClassLoader()); //load security provider using current class loader final Provider provider = new XMLDSigRI(); AccessController.doPrivileged(new java.security.PrivilegedAction() { public Object run() { Security.addProvider(provider); return null; } }); // get the provider from java.security.Security using URLClassLoader. // Need to use introspection to invoke methods to avoid using the // current class loader String factoryName = "javax.xml.crypto.dsig.XMLSignatureFactory"; Class factoryClass = uc1.loadClass(factoryName); Method factoryMethod = factoryClass.getDeclaredMethod ("getInstance", new Class[]{String.class}); Class methodParameterClass = uc1.loadClass ("javax.xml.crypto.dsig.spec.C14NMethodParameterSpec"); Method canonicalizationMethod = factoryClass.getDeclaredMethod ("newCanonicalizationMethod", new Class[]{String.class,methodParameterClass}); Object factory = factoryMethod.invoke(null, new Object[]{"DOM"}); long start = System.currentTimeMillis(); for (int i = 0; i < 100; i++) { canonicalizationMethod.invoke (factory, new Object[]{CanonicalizationMethod.EXCLUSIVE,null}); } long end = System.currentTimeMillis(); long elapsed = end-start; if (log.isDebugEnabled()) { log.debug("Elapsed: " + elapsed); } } @org.junit.Test public void testProviderMultipleLoadersTwo() throws Exception { String baseDir = System.getProperty("basedir"); String fs = System.getProperty("file.separator"); File file0 = new File(baseDir + fs + "build" + fs + "classes" + fs); File file1 = new File(baseDir + fs + "build" + fs + "test" + fs); URL[] urls = new URL[2]; urls[0] = file0.toURI().toURL(); urls[1] = file1.toURI().toURL(); URLClassLoader uc1 = new URLClassLoader (urls, Thread.currentThread().getContextClassLoader()); URLClassLoader uc2 = new URLClassLoader (urls, Thread.currentThread().getContextClassLoader()); Class c1 = uc1.loadClass("javax.xml.crypto.test.dsig.AppA"); Class c2 = uc2.loadClass("javax.xml.crypto.test.dsig.AppB"); Object o1 = c1.newInstance(); Object o2 = c2.newInstance(); Method m1 = c1.getMethod("dsig", (Class[]) null); Method m2 = c2.getMethod("dsig", (Class[]) null); m1.invoke(o1, (Object[]) null); m2.invoke(o2, (Object[]) null); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/CanonicalizationMethodTest.java0000644000175000017500000001132011654523221032316 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.security.*; import java.security.spec.AlgorithmParameterSpec; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec; import javax.xml.crypto.dsig.spec.ExcC14NParameterSpec; /** * Unit test for javax.xml.crypto.dsig.CanonicalizationMethod * * @version $Id$ * @author Valerie Peng */ public class CanonicalizationMethodTest extends org.junit.Assert { XMLSignatureFactory factory; static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } private static final String C14N_ALGOS[] = { CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS, CanonicalizationMethod.INCLUSIVE, CanonicalizationMethod.EXCLUSIVE_WITH_COMMENTS, CanonicalizationMethod.EXCLUSIVE }; public CanonicalizationMethodTest() throws Exception { factory = XMLSignatureFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); } @org.junit.Test public void testIsFeatureSupported() throws Exception { CanonicalizationMethod cm; for (int i = 0; i < C14N_ALGOS.length; i++) { String algo = C14N_ALGOS[i]; ExcC14NParameterSpec params = null; if (i >= 2) { params = new ExcC14NParameterSpec(); } cm = factory.newCanonicalizationMethod(algo, params); try { cm.isFeatureSupported(null); fail("Should raise a NPE for null feature"); } catch (NullPointerException npe) {} assertTrue(!cm.isFeatureSupported("not supported")); } } @org.junit.Test public void testConstructor() throws Exception { // test newAlgorithmMethod(String algorithm, // AlgorithmParameterSpec params) // for generating CanonicalizationMethod objects CanonicalizationMethod cm; for (int i = 0; i < C14N_ALGOS.length; i++) { String algo = C14N_ALGOS[i]; cm = factory.newCanonicalizationMethod(algo, (C14NMethodParameterSpec) null); assertNotNull(cm); assertEquals(cm.getAlgorithm(), algo); assertNull(cm.getParameterSpec()); try { cm = factory.newCanonicalizationMethod (algo, new TestUtils.MyOwnC14nParameterSpec()); fail("Should raise an IAPE for invalid c14n parameters"); } catch (InvalidAlgorithmParameterException iape) { } catch (Exception ex) { fail("Should raise a IAPE instead of " + ex); } if (algo.equals(CanonicalizationMethod.EXCLUSIVE_WITH_COMMENTS) || algo.equals(CanonicalizationMethod.EXCLUSIVE)) { cm = factory.newCanonicalizationMethod (CanonicalizationMethod.EXCLUSIVE, new ExcC14NParameterSpec()); AlgorithmParameterSpec aps = cm.getParameterSpec(); assertNotNull(aps); assertTrue(aps instanceof ExcC14NParameterSpec); } } try { cm = factory.newCanonicalizationMethod(null, (C14NMethodParameterSpec) null); fail("Should raise a NPE for null algo"); } catch (NullPointerException npe) { } catch (Exception ex) { fail("Should raise a NPE instead of " + ex); } try { cm = factory.newCanonicalizationMethod("non-existent", (C14NMethodParameterSpec) null); fail("Should raise an NSAE for non-existent algos"); } catch (NoSuchAlgorithmException nsae) { } catch (Exception ex) { fail("Should raise an NSAE instead of " + ex); } } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/CreateInteropXMLDSig11Test.java0000644000175000017500000003111612214631242031727 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package javax.xml.crypto.test.dsig; import java.security.*; import java.security.spec.ECGenParameterSpec; import java.util.Collections; import javax.xml.crypto.KeySelector; import javax.xml.crypto.dom.*; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.dom.*; import javax.xml.crypto.dsig.keyinfo.*; import javax.xml.crypto.dsig.spec.*; import javax.xml.parsers.DocumentBuilder; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.*; import javax.xml.crypto.test.KeySelectors; /** * This is a testcase to generate all the W3C xmldsig XMLDSig11 testcases. * * @author Sean Mullan */ public class CreateInteropXMLDSig11Test extends org.junit.Assert { private KeySelector kvks, sks; private CanonicalizationMethod withoutComments; private DigestMethod sha1, sha256, sha384, sha512; private SignatureMethod ecdsaSha1, ecdsaSha256, ecdsaSha384, ecdsaSha512, rsaSha256, rsaSha384, rsaSha512, hmacSha256, hmacSha384, hmacSha512; private KeyInfo p256ki, p384ki, p521ki, rsaki, rsa2048ki; private XMLSignatureFactory fac; private DocumentBuilder db; private KeyPair p256, p384, p521, rsa2048; private boolean ecSupport = true; static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public CreateInteropXMLDSig11Test() throws Exception { // Create KeyPairs try { KeyPairGenerator kpg = KeyPairGenerator.getInstance("EC"); kpg.initialize(new ECGenParameterSpec("1.2.840.10045.3.1.7")); p256 = kpg.generateKeyPair(); kpg.initialize(new ECGenParameterSpec("1.3.132.0.34")); p384 = kpg.generateKeyPair(); kpg.initialize(new ECGenParameterSpec("1.3.132.0.35")); p521 = kpg.generateKeyPair(); } catch (NoSuchAlgorithmException nsae) { // EC not supported on this platform ecSupport = false; } KeyPairGenerator rsakpg = KeyPairGenerator.getInstance("RSA"); rsakpg.initialize(2048); rsa2048 = rsakpg.generateKeyPair(); db = XMLUtils.createDocumentBuilder(false); // create common objects fac = XMLSignatureFactory.getInstance(); KeyInfoFactory kifac = fac.getKeyInfoFactory(); withoutComments = fac.newCanonicalizationMethod (CanonicalizationMethod.INCLUSIVE, (C14NMethodParameterSpec) null); sha1 = fac.newDigestMethod(DigestMethod.SHA1, null); sha256 = fac.newDigestMethod(DigestMethod.SHA256, null); sha384 = fac.newDigestMethod( "http://www.w3.org/2001/04/xmldsig-more#sha384", null); sha512 = fac.newDigestMethod(DigestMethod.SHA512, null); if (ecSupport) { p256ki = kifac.newKeyInfo(Collections.singletonList( kifac.newKeyValue(p256.getPublic()))); p384ki = kifac.newKeyInfo(Collections.singletonList( kifac.newKeyValue(p384.getPublic()))); p521ki = kifac.newKeyInfo(Collections.singletonList( kifac.newKeyValue(p521.getPublic()))); ecdsaSha1 = fac.newSignatureMethod ("http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1", null); ecdsaSha256 = fac.newSignatureMethod ("http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256", null); ecdsaSha384 = fac.newSignatureMethod ("http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384", null); ecdsaSha512 = fac.newSignatureMethod ("http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512", null); } rsaki = kifac.newKeyInfo(Collections.singletonList (kifac.newKeyValue( TestUtils.getPublicKey("RSA")))); rsa2048ki = kifac.newKeyInfo(Collections.singletonList (kifac.newKeyValue(rsa2048.getPublic()))); rsaSha256 = fac.newSignatureMethod ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", null); rsaSha384 = fac.newSignatureMethod ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha384", null); rsaSha512 = fac.newSignatureMethod ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha512", null); hmacSha256 = fac.newSignatureMethod ("http://www.w3.org/2001/04/xmldsig-more#hmac-sha256", null); hmacSha384 = fac.newSignatureMethod ("http://www.w3.org/2001/04/xmldsig-more#hmac-sha384", null); hmacSha512 = fac.newSignatureMethod ("http://www.w3.org/2001/04/xmldsig-more#hmac-sha512", null); kvks = new KeySelectors.KeyValueKeySelector(); sks = new KeySelectors.SecretKeySelector("testkey".getBytes("ASCII")); } @org.junit.Test public void test_create_enveloping_p256_sha1() throws Exception { if (ecSupport) { test_create_signature_enveloping(ecdsaSha1, sha1, p256ki, p256.getPrivate(), kvks); } } @org.junit.Test public void test_create_enveloping_p256_sha256() throws Exception { if (ecSupport) { test_create_signature_enveloping(ecdsaSha256, sha256, p256ki, p256.getPrivate(), kvks); } } @org.junit.Test public void test_create_enveloping_p256_sha384() throws Exception { if (ecSupport) { test_create_signature_enveloping(ecdsaSha384, sha384, p256ki, p256.getPrivate(), kvks); } } @org.junit.Test public void test_create_enveloping_p256_sha512() throws Exception { if (ecSupport) { test_create_signature_enveloping(ecdsaSha512, sha512, p256ki, p256.getPrivate(), kvks); } } @org.junit.Test public void test_create_enveloping_p384_sha1() throws Exception { if (ecSupport) { test_create_signature_enveloping(ecdsaSha1, sha1, p384ki, p384.getPrivate(), kvks); } } @org.junit.Test public void test_create_enveloping_p384_sha256() throws Exception { if (ecSupport) { test_create_signature_enveloping(ecdsaSha256, sha256, p384ki, p384.getPrivate(), kvks); } } @org.junit.Test public void test_create_enveloping_p384_sha384() throws Exception { if (ecSupport) { test_create_signature_enveloping(ecdsaSha384, sha384, p384ki, p384.getPrivate(), kvks); } } @org.junit.Test public void test_create_enveloping_p384_sha512() throws Exception { if (ecSupport) { test_create_signature_enveloping(ecdsaSha512, sha512, p384ki, p384.getPrivate(), kvks); } } @org.junit.Test public void test_create_enveloping_p521_sha1() throws Exception { if (ecSupport) { test_create_signature_enveloping(ecdsaSha1, sha1, p521ki, p521.getPrivate(), kvks); } } @org.junit.Test public void test_create_enveloping_p521_sha256() throws Exception { if (ecSupport) { test_create_signature_enveloping(ecdsaSha256, sha256, p521ki, p521.getPrivate(), kvks); } } @org.junit.Test public void test_create_enveloping_p521_sha384() throws Exception { if (ecSupport) { test_create_signature_enveloping(ecdsaSha384, sha384, p521ki, p521.getPrivate(), kvks); } } @org.junit.Test public void test_create_enveloping_p521_sha512() throws Exception { if (ecSupport) { test_create_signature_enveloping(ecdsaSha512, sha512, p521ki, p521.getPrivate(), kvks); } } @org.junit.Test public void test_create_enveloping_rsa_sha256() throws Exception { test_create_signature_enveloping(rsaSha256, sha1, rsaki, TestUtils.getPrivateKey("RSA"), kvks); } @org.junit.Test public void test_create_enveloping_rsa_sha384() throws Exception { test_create_signature_enveloping(rsaSha384, sha1, rsa2048ki, rsa2048.getPrivate(), kvks); } @org.junit.Test public void test_create_enveloping_rsa_sha512() throws Exception { test_create_signature_enveloping(rsaSha512, sha1, rsa2048ki, rsa2048.getPrivate(), kvks); } @org.junit.Test public void test_create_enveloping_sha256_rsa_sha256() throws Exception { test_create_signature_enveloping(rsaSha256, sha256, rsaki, TestUtils.getPrivateKey("RSA"), kvks); } @org.junit.Test public void test_create_enveloping_sha384_rsa_sha256() throws Exception { test_create_signature_enveloping(rsaSha256, sha384, rsaki, TestUtils.getPrivateKey("RSA"), kvks); } @org.junit.Test public void test_create_enveloping_sha512_rsa_sha256() throws Exception { test_create_signature_enveloping(rsaSha256, sha512, rsaki, TestUtils.getPrivateKey("RSA"), kvks); } @org.junit.Test public void test_create_enveloping_hmac_sha256() throws Exception { test_create_signature_enveloping(hmacSha256, sha1, rsaki, TestUtils.getSecretKey ("testkey".getBytes("ASCII")), sks); } @org.junit.Test public void test_create_enveloping_hmac_sha384() throws Exception { test_create_signature_enveloping(hmacSha384, sha1, rsaki, TestUtils.getSecretKey ("testkey".getBytes("ASCII")), sks); } @org.junit.Test public void test_create_enveloping_hmac_sha512() throws Exception { test_create_signature_enveloping(hmacSha512, sha1, rsaki, TestUtils.getSecretKey ("testkey".getBytes("ASCII")), sks); } private void test_create_signature_enveloping( SignatureMethod sm, DigestMethod dm, KeyInfo ki, Key signingKey, KeySelector ks ) throws Exception { // create reference Reference ref = fac.newReference("#DSig.Object_1", dm, null, XMLObject.TYPE, null); // create SignedInfo SignedInfo si = fac.newSignedInfo(withoutComments, sm, Collections.singletonList(ref)); Document doc = db.newDocument(); // create Objects Element webElem = doc.createElementNS(null, "Web"); Text text = doc.createTextNode("up up and away"); webElem.appendChild(text); XMLObject obj = fac.newXMLObject(Collections.singletonList (new DOMStructure(webElem)), "DSig.Object_1", "text/xml", null); // create XMLSignature XMLSignature sig = fac.newXMLSignature (si, ki, Collections.singletonList(obj), null, null); DOMSignContext dsc = new DOMSignContext(signingKey, doc); dsc.setDefaultNamespacePrefix("dsig"); sig.sign(dsc); DOMValidateContext dvc = new DOMValidateContext (ks, doc.getDocumentElement()); XMLSignature sig2 = fac.unmarshalXMLSignature(dvc); assertTrue(sig.equals(sig2)); assertTrue(sig2.validate(dvc)); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/JSRWrappingAttackTest.java0000644000175000017500000000634212234743735031207 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package javax.xml.crypto.test.dsig; import java.io.File; import java.security.Security; import javax.xml.crypto.dsig.XMLSignatureException; import javax.xml.crypto.dsig.dom.DOMValidateContext; import javax.xml.crypto.test.KeySelectors; import javax.xml.crypto.test.dsig.SignatureValidator; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * This is a test for a wrapping attack. */ public class JSRWrappingAttackTest extends org.junit.Assert { private SignatureValidator validator; private File dir; static { Security.insertProviderAt(new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public JSRWrappingAttackTest() { String fs = System.getProperty("file.separator"); String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); dir = new File(base + fs + "src/test/resources" + fs + "at" + fs + "iaik" + fs + "ixsil" + fs + "coreFeatures", "signatures"); validator = new SignatureValidator(dir); } @org.junit.Test public void testWrappingAttack() throws Exception { String file = "manifestSignatureWrapping.xml"; Document doc = XMLUtils.createDocumentBuilder(false, false).parse(new File(dir, file)); Element sigElement = SignatureValidator.getSignatureElement(doc); if (sigElement == null) { throw new Exception("Couldn't find signature Element"); } DOMValidateContext vc = new DOMValidateContext(new KeySelectors.KeyValueKeySelector(), sigElement); vc.setBaseURI(dir.toURI().toString()); vc.setProperty("org.apache.jcp.xml.dsig.secureValidation", Boolean.FALSE); boolean coreValidity = validator.validate(vc); assertTrue("Signature failed core validation", coreValidity); vc.setProperty("org.apache.jcp.xml.dsig.secureValidation", Boolean.TRUE); Element manifestElement = (Element) doc.getElementsByTagName("Manifest").item(0); vc.setIdAttributeNS(manifestElement, null, "Id"); try { boolean valid = validator.validate(vc); System.out.println("Valid: " + valid); fail("Failure expected when secure validation is enabled"); } catch (XMLSignatureException ex) { assertTrue(ex.getMessage().contains("URIReferenceException")); } } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/JSRForbiddenReferenceTest.java0000644000175000017500000000523411670122756031777 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package javax.xml.crypto.test.dsig; import java.io.File; import java.security.Security; import javax.xml.crypto.dsig.XMLSignatureException; import javax.xml.crypto.dsig.dom.DOMValidateContext; import javax.xml.crypto.test.KeySelectors; import javax.xml.crypto.test.dsig.SignatureValidator; /** * This is a test for a forbidden Reference algorithm when secure validation is enabled. */ public class JSRForbiddenReferenceTest extends org.junit.Assert { private SignatureValidator validator; private File dir; static { Security.insertProviderAt(new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public JSRForbiddenReferenceTest() { String fs = System.getProperty("file.separator"); String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); dir = new File(base + fs + "src/test/resources" + fs + "javax" + fs + "xml" + fs + "crypto", "dsig"); validator = new SignatureValidator(dir); } @org.junit.Test public void testLocalFilesystem() throws Exception { String file = "signature-external-c14n-xmlatrs.xml"; DOMValidateContext vc = validator.getValidateContext( file, new KeySelectors.SecretKeySelector("secret".getBytes("ASCII")) ); vc.setProperty("org.apache.jcp.xml.dsig.secureValidation", Boolean.FALSE); boolean coreValidity = validator.validate(vc); assertTrue("Signature failed core validation", coreValidity); vc.setProperty("org.apache.jcp.xml.dsig.secureValidation", Boolean.TRUE); try { validator.validate(vc); fail("Failure expected when secure validation is enabled"); } catch (XMLSignatureException ex) { assertTrue(ex.getMessage().contains("URIReferenceException")); } } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/BaltimoreExcC14n1Test.java0000644000175000017500000000404411654523221030762 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.io.File; import java.security.Security; import javax.xml.crypto.test.KeySelectors; /** * This is a testcase to validate all "merlin-exc-c14n-one" * testcases from Baltimore * * @author Sean Mullan */ public class BaltimoreExcC14n1Test extends org.junit.Assert { private SignatureValidator validator; static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public BaltimoreExcC14n1Test() { String fs = System.getProperty("file.separator"); String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); base += fs + "src/test/resources" + fs + "ie" + fs + "baltimore" + fs + "merlin-examples"; validator = new SignatureValidator(new File (base, "merlin-exc-c14n-one")); } @org.junit.Test public void testExcSignature() throws Exception { String file = "exc-signature.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation", coreValidity); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/BaltimoreIaik2Test.java0000644000175000017500000000407311654523221030475 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.io.File; import java.security.Security; import javax.xml.crypto.test.KeySelectors; /** * This is a testcase to validate all "ec-merlin-iaikTests-two" * testcases from Baltimore * * @author Sean Mullan */ public class BaltimoreIaik2Test extends org.junit.Assert { private SignatureValidator validator; private File dir; static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public BaltimoreIaik2Test() { String fs = System.getProperty("file.separator"); String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); dir = new File(base + fs + "src/test/resources" + fs + "ie" + fs + "baltimore" + fs + "merlin-examples", "ec-merlin-iaikTests-two"); validator = new SignatureValidator(dir); } @org.junit.Test public void testSignature() throws Exception { String file = "signature.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation", coreValidity); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/ComRSASecurityTest.java0000644000175000017500000000446011654523221030513 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.io.File; import java.security.Security; import javax.xml.crypto.test.KeySelectors; /** * This is a testcase to validate all "bdournaee" * testcases from RSA * * @author Sean Mullan */ public class ComRSASecurityTest extends org.junit.Assert { private SignatureValidator validator; static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public ComRSASecurityTest() { String fs = System.getProperty("file.separator"); String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); base += fs + "src/test/resources" + fs + "com"; validator = new SignatureValidator(new File (base, "rsasecurity/bdournaee")); } @org.junit.Test public void test_certj201_enveloping() throws Exception { String file = "certj201_enveloping.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_certj201_enveloped() throws Exception { String file = "certj201_enveloped.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation", coreValidity); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/IaikTransformsTest.java0000644000175000017500000000573111654523221030635 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.io.File; import java.security.Security; import javax.xml.crypto.test.KeySelectors; /** * This is a testcase to validate all "transforms" * testcases from IAIK * * @author Sean Mullan */ public class IaikTransformsTest extends org.junit.Assert { private SignatureValidator validator; static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public IaikTransformsTest() { String fs = System.getProperty("file.separator"); String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); base += fs + "src/test/resources" + fs + "at" + fs + "iaik" + fs + "ixsil"; validator = new SignatureValidator(new File (base, "transforms/signatures")); } @org.junit.Test public void test_base64DecodeSignature() throws Exception { String file = "base64DecodeSignature.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_envelopedSignatureSignature() throws Exception { String file = "envelopedSignatureSignature.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_c14nSignature() throws Exception { String file = "c14nSignature.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation", coreValidity); } @org.junit.Test public void test_xPathSignature() throws Exception { String file = "xPathSignature.xml"; boolean coreValidity = validator.validate (file, new KeySelectors.KeyValueKeySelector()); assertTrue("Signature failed core validation", coreValidity); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/SecureXSLTTest.java0000644000175000017500000000702312214631242027632 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package javax.xml.crypto.test.dsig; import java.io.*; import java.security.Security; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.dom.*; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.*; import javax.xml.crypto.test.KeySelectors; public class SecureXSLTTest extends org.junit.Assert { static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } @org.junit.Test public void test() throws Exception { String fs = System.getProperty("file.separator"); String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); File baseDir = new File(base + fs + "src/test/resources" + fs + "javax" + fs + "xml" + fs + "crypto", "dsig"); String[] signatures = { "signature1.xml", "signature2.xml", "signature3.xml" }; XMLSignatureFactory fac = XMLSignatureFactory.getInstance("DOM"); File f = new File("doc.xml"); for (int i = 0; i < signatures.length; i++) { String signature = signatures[i]; // System.out.println("Validating " + signature); Document doc = XMLUtils.createDocumentBuilder(false).parse (new FileInputStream(new File(baseDir, signature))); NodeList nl = doc.getElementsByTagNameNS(XMLSignature.XMLNS, "Signature"); if (nl.getLength() == 0) { throw new Exception("Cannot find Signature element"); } DOMValidateContext valContext = new DOMValidateContext (new KeySelectors.KeyValueKeySelector(), nl.item(0)); // enable reference caching in your validation context valContext.setProperty ("javax.xml.crypto.dsig.cacheReference", Boolean.TRUE); // make sure file is not left over from previous run f.delete(); XMLSignature sig = fac.unmarshalXMLSignature(valContext); try { if (sig.validate(valContext)) { System.err.println("Signature UNEXPECTEDLY passed validation"); } sig.getSignedInfo().getReferences().get(0); } catch (XMLSignatureException xse) { // this is good, but still make sure attack was not successful // by falling through and checking if file was created // xse.printStackTrace(); } if (f.exists()) { f.delete(); // cleanup file. comment out when debugging throw new Exception ("Test FAILED: doc.xml was successfully created"); } } // System.out.println("Test PASSED"); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/AppB.java0000644000175000017500000000230611654523221025656 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package javax.xml.crypto.test.dsig; import java.security.Provider; import java.security.Security; import javax.xml.crypto.dsig.Transform; import javax.xml.crypto.dsig.TransformService; /** * Used by ClassLoaderTest */ public class AppB { public void dsig() throws Exception { Provider p = Security.getProvider("ApacheXMLDSig"); TransformService.getInstance(Transform.XPATH, "DOM", p); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/SignaturePropertyTest.java0000644000175000017500000001025411654523221031403 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.util.*; import javax.xml.crypto.XMLStructure; import javax.xml.crypto.dsig.*; /** * Unit test for javax.xml.crypto.dsig.SignatureProperty * * @author Valerie Peng */ public class SignaturePropertyTest extends org.junit.Assert { private XMLSignatureFactory factory; private String target = "target"; private String id = "id"; public SignaturePropertyTest() throws Exception { factory = XMLSignatureFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); } @org.junit.Test @SuppressWarnings("unchecked") public void testConstructor() { // test XMLSignatureFactory.newSignatureProperty(List, String, String) SignatureProperty prop; try { prop = factory.newSignatureProperty(null, target, id); fail("Should raise a NPE for null content"); } catch (NullPointerException npe) { } catch (Exception ex) { fail("Should raise a NPE for null content instead of " + ex); } List list = new Vector(); try { prop = factory.newSignatureProperty(list, target, id); fail("Should raise an IAE for empty content"); } catch (IllegalArgumentException iae) { } catch (Exception ex) { fail("Should raise an IAE for empty content instead of " + ex); } String strEntry = "wrong type"; list.add(strEntry); try { prop = factory.newSignatureProperty(list, target, id); fail("Should raise a CCE for content containing " + "invalid, i.e. non-XMLStructure, entries"); } catch (ClassCastException cce) { } catch (Exception ex) { fail("Should raise a CCE for content with invalid entries " + "instead of " + ex); } list.remove(strEntry); list.add(new TestUtils.MyOwnXMLStructure()); try { prop = factory.newSignatureProperty(list, null, id); fail("Should raise a NPE for null target"); } catch (NullPointerException npe) { } catch (Exception ex) { fail("Should raise a NPE for null target instead of " + ex); } prop = factory.newSignatureProperty(list, target, id); assertNotNull(prop); List unmodifiable = prop.getContent(); assertNotNull(unmodifiable); try { unmodifiable.add(new TestUtils.MyOwnXMLStructure()); fail("Should return an unmodifiable List object"); } catch (UnsupportedOperationException uoe) {} assertTrue(Arrays.equals(unmodifiable.toArray(), list.toArray())); assertEquals(prop.getTarget(), target); assertEquals(prop.getId(), id); assertNotNull(prop); } @org.junit.Test public void testisFeatureSupported() { List list = new Vector(); list.add(new TestUtils.MyOwnXMLStructure()); SignatureProperty prop = factory.newSignatureProperty (list, target, id); try { prop.isFeatureSupported(null); fail("Should raise a NPE for null feature"); } catch (NullPointerException npe) {} assertTrue(!prop.isFeatureSupported("not supported")); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/C14N11Test.java0000644000175000017500000001235011654523221026503 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package javax.xml.crypto.test.dsig; import java.io.File; import java.security.Security; import javax.xml.crypto.KeySelector; import javax.xml.crypto.test.KeySelectors; /** * This is a testcase to validate all the W3C xmldsig C14N11 testcases. * * @author Sean Mullan */ public class C14N11Test extends org.junit.Assert { private SignatureValidator validator; private File dir; private KeySelector sks; private static String[] vendors = { "IAIK", "IBM", "ORCL", "SUN", "UPC" }; static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public C14N11Test() throws Exception { String fs = System.getProperty("file.separator"); String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); dir = new File(base + fs + "src/test/resources" + fs + "org" + fs + "w3c" + fs + "www" + fs + "interop" + fs + "xmldsig" + fs + "c14n11"); validator = new SignatureValidator(dir); sks = new KeySelectors.SecretKeySelector("secret".getBytes("ASCII")); } @org.junit.Test public void test_xmlid_1() throws Exception { test_c14n11("xmlid-1"); } @org.junit.Test public void test_xmlid_2() throws Exception { test_c14n11("xmlid-2"); } @org.junit.Test public void test_xmlspace_1() throws Exception { test_c14n11("xmlspace-1"); } @org.junit.Test public void test_xmlspace_2() throws Exception { test_c14n11("xmlspace-2"); } @org.junit.Test public void test_xmlspace_3() throws Exception { test_c14n11("xmlspace-3"); } @org.junit.Test public void test_xmlspace_4() throws Exception { test_c14n11("xmlspace-4"); } @org.junit.Test public void test_xmllang_1() throws Exception { test_c14n11("xmllang-1"); } @org.junit.Test public void test_xmllang_2() throws Exception { test_c14n11("xmllang-2"); } @org.junit.Test public void test_xmllang_3() throws Exception { test_c14n11("xmllang-3"); } @org.junit.Test public void test_xmllang_4() throws Exception { test_c14n11("xmllang-4"); } @org.junit.Test public void test_xmlbase_prop_1() throws Exception { test_c14n11("xmlbase-prop-1"); } @org.junit.Test public void test_xmlbase_prop_2() throws Exception { test_c14n11("xmlbase-prop-2"); } @org.junit.Test public void test_xmlbase_prop_3() throws Exception { test_c14n11("xmlbase-prop-3"); } @org.junit.Test public void test_xmlbase_prop_4() throws Exception { test_c14n11("xmlbase-prop-4"); } @org.junit.Test public void test_xmlbase_prop_5() throws Exception { test_c14n11("xmlbase-prop-5"); } @org.junit.Test public void test_xmlbase_prop_6() throws Exception { test_c14n11("xmlbase-prop-6"); } @org.junit.Test public void test_xmlbase_prop_7() throws Exception { test_c14n11("xmlbase-prop-7"); } @org.junit.Test public void test_xmlbase_c14n11spec_102() throws Exception { String[] vendors = {"IAIK", "IBM", "ORCL", "SUN", "UPC"}; test_c14n11("xmlbase-c14n11spec-102", vendors); } @org.junit.Test public void test_xmlbase_c14n11spec2_102() throws Exception { String[] vendors = {"IAIK", "IBM", "ORCL", "SUN"}; test_c14n11("xmlbase-c14n11spec2-102", vendors); } @org.junit.Test public void test_xmlbase_c14n11spec3_103() throws Exception { String[] vendors = {"IAIK", "IBM", "ORCL", "SUN", "UPC"}; test_c14n11("xmlbase-c14n11spec3-103", vendors); } private void test_c14n11(String test) throws Exception { for (int i = 0; i < vendors.length; i++) { String file = test + "-" + vendors[i] + ".xml"; // System.out.println("Validating " + file); boolean coreValidity = validator.validate(file, sks); assertTrue(file + " failed core validation", coreValidity); } } private void test_c14n11(String test, String[] vendors) throws Exception { for (int i = 0; i < vendors.length; i++) { String file = test + "-" + vendors[i] + ".xml"; // System.out.println("Validating " + file); boolean coreValidity = validator.validate(file, sks); assertTrue(file + " failed core validation", coreValidity); } } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/XMLSignatureTest.java0000644000175000017500000003374312214631242030223 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.io.*; import java.util.*; import java.security.*; import javax.xml.crypto.URIDereferencer; import javax.xml.crypto.dom.DOMStructure; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.keyinfo.*; import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec; import javax.xml.crypto.dsig.dom.DOMSignContext; import javax.xml.crypto.dsig.dom.DOMValidateContext; import javax.crypto.spec.SecretKeySpec; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.*; /** * Unit test for javax.xml.crypto.dsig.XMLSignature * * @version $Id$ * @author Valerie Peng */ public class XMLSignatureTest extends org.junit.Assert { private XMLSignatureFactory fac; private KeyInfoFactory kifac; private SignedInfo defSi; private KeyInfo defKi; private List objs; private String id = "id"; private String sigValueId = "signatureValueId"; private Key[] SIGN_KEYS; private Key[] VALIDATE_KEYS; private SignatureMethod[] SIG_METHODS; private URIDereferencer ud; static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public XMLSignatureTest() throws Exception { fac = XMLSignatureFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); kifac = KeyInfoFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); // set up the corresponding SignatureMethod SIG_METHODS = new SignatureMethod[3]; SIG_METHODS[0] = fac.newSignatureMethod(SignatureMethod.DSA_SHA1, null); SIG_METHODS[1] = fac.newSignatureMethod(SignatureMethod.RSA_SHA1, null); SIG_METHODS[2] = fac.newSignatureMethod(SignatureMethod.HMAC_SHA1, null); // set up the signingKeys SIGN_KEYS = new Key[3]; SIGN_KEYS[0] = TestUtils.getPrivateKey("DSA"); SIGN_KEYS[1] = TestUtils.getPrivateKey("RSA"); SIGN_KEYS[2] = new SecretKeySpec(new byte[16], "HmacSHA1"); // set up the validatingKeys VALIDATE_KEYS = new Key[3]; VALIDATE_KEYS[0] = TestUtils.getPublicKey("DSA"); VALIDATE_KEYS[1] = TestUtils.getPublicKey("RSA"); VALIDATE_KEYS[2] = new SecretKeySpec(new byte[16], "HmacSHA1"); defSi = createSignedInfo(SIG_METHODS[0]); defKi = kifac.newKeyInfo (Collections.singletonList(kifac.newKeyName("Alice"))); objs = Collections.singletonList (fac.newXMLObject(null, null, null, null)); ud = new LocalHttpCacheURIDereferencer(); } @org.junit.Test public void testConstructor() throws Exception { XMLSignature sig = null; // test XMLSignatureFactory.newXMLSignature(SignedInfo, KeyInfo) // and XMLSignatureFactory.newXMLSignature(SignedInfo, // KeyInfo, List, String, String) // for generating XMLSignature objects for (int i = 0; i < 2; i++) { try { switch (i) { case 0: sig = fac.newXMLSignature(null, defKi); break; case 1: sig = fac.newXMLSignature(null, defKi, objs, id, sigValueId); break; } fail("Should throw a NPE for null references"); } catch (NullPointerException npe) { } catch (Exception ex) { fail("Should throw a NPE instead of " + ex + " for null references"); } } try { sig = fac.newXMLSignature(defSi, defKi, Collections.singletonList("wrongType"), id, sigValueId); fail("Should throw a CCE for invalid objects"); } catch (ClassCastException cce) { } catch (Exception ex) { fail("Should throw a CCE instead of " + ex + " for invalid objects"); } sig = fac.newXMLSignature(defSi, defKi, objs, id, sigValueId); assertEquals(sig.getId(), id); assertEquals(sig.getKeyInfo(), defKi); assertTrue(Arrays.equals(sig.getObjects().toArray(), objs.toArray())); assertNull(sig.getSignatureValue().getValue()); assertEquals(sig.getSignatureValue().getId(), sigValueId); assertEquals(sig.getSignedInfo(), defSi); sig = fac.newXMLSignature(defSi, defKi); assertNull(sig.getId()); assertEquals(sig.getKeyInfo(), defKi); assertTrue(sig.getObjects().size()==0); assertNull(sig.getSignatureValue().getValue()); assertNull(sig.getSignatureValue().getId()); assertEquals(sig.getSignedInfo(), defSi); } @org.junit.Test public void testisFeatureSupported() throws Exception { XMLSignature sig = fac.newXMLSignature(defSi, null); try { sig.isFeatureSupported(null); fail("Should raise a NPE for null feature"); } catch (NullPointerException npe) {} assertTrue(!sig.isFeatureSupported("not supported")); } @org.junit.Test public void testsignANDvalidate() throws Exception { XMLSignature sig; SignedInfo si; KeyInfo ki = null; XMLSignContext signContext; XMLValidateContext validateContext; boolean status = true; for (int i = SIGN_KEYS.length-1; i>=0 ; i--) { si = createSignedInfo(SIG_METHODS[i]); if (VALIDATE_KEYS[i] instanceof PublicKey) { ki = kifac.newKeyInfo(Collections.singletonList (kifac.newKeyValue((PublicKey) VALIDATE_KEYS[i]))); } else { ki = kifac.newKeyInfo(Collections.singletonList (kifac.newKeyName("testuser"))); } sig = fac.newXMLSignature(si, ki, objs, id, sigValueId); Document doc = TestUtils.newDocument(); signContext = new DOMSignContext(SIGN_KEYS[i], doc); signContext.setURIDereferencer(ud); sig.sign(signContext); validateContext = new DOMValidateContext (VALIDATE_KEYS[i], doc.getDocumentElement()); validateContext.setURIDereferencer(ud); if (sig.validate(validateContext) == false) { status = false; TestUtils.dumpDocument(doc, "signatureTest_out"+i+".xml"); } } assertTrue(status); } @org.junit.Test public void testsignWithProvider() throws Exception { XMLSignature sig; SignedInfo si; KeyInfo ki = null; XMLSignContext signContext; Provider p = new TestProvider(); for (int i = SIGN_KEYS.length-2; i>=0 ; i--) { si = createSignedInfo(SIG_METHODS[i]); if (VALIDATE_KEYS[i] instanceof PublicKey) { ki = kifac.newKeyInfo(Collections.singletonList (kifac.newKeyValue((PublicKey) VALIDATE_KEYS[i]))); } else { ki = kifac.newKeyInfo(Collections.singletonList (kifac.newKeyName("testuser"))); } sig = fac.newXMLSignature(si, ki, objs, id, sigValueId); Document doc = TestUtils.newDocument(); signContext = new DOMSignContext(SIGN_KEYS[i], doc); signContext.setProperty ("org.jcp.xml.dsig.internal.dom.SignatureProvider", p); signContext.setURIDereferencer(ud); try { sig.sign(signContext); fail("Should have failed because TestProvider does not " + "support " + SIGN_KEYS[i].getAlgorithm()); } catch (Exception e) { assertTrue(e.getMessage(), e.getCause() instanceof NoSuchAlgorithmException); } } } @org.junit.Test public void testSignWithEmptyNSPrefix() throws Exception { SignedInfo si = createSignedInfo(SIG_METHODS[1]); KeyInfo ki = kifac.newKeyInfo(Collections.singletonList (kifac.newKeyValue((PublicKey) VALIDATE_KEYS[1]))); XMLSignature sig = fac.newXMLSignature(si, ki, objs, id, sigValueId); Document doc = TestUtils.newDocument(); XMLSignContext signContext = new DOMSignContext(SIGN_KEYS[1], doc); signContext.putNamespacePrefix(XMLSignature.XMLNS, ""); signContext.setURIDereferencer(ud); sig.sign(signContext); /* StringWriter sw = new StringWriter(); dumpDocument(doc, sw); System.out.println(sw); */ } @org.junit.Test public void testSignWithReferenceManifestDependencies() throws Exception { // create references DigestMethod dm = fac.newDigestMethod(DigestMethod.SHA1, null); List refs = Collections.singletonList(fac.newReference("#object-1", dm)); // create SignedInfo CanonicalizationMethod cm = fac.newCanonicalizationMethod (CanonicalizationMethod.INCLUSIVE, (C14NMethodParameterSpec) null); SignedInfo si = fac.newSignedInfo(cm, SIG_METHODS[1], refs); // create objects List objs = new ArrayList(); // Object 1 List manRefs = Collections.singletonList (fac.newReference("#object-2", dm)); objs.add(fac.newXMLObject(Collections.singletonList (fac.newManifest(manRefs, "manifest-1")), "object-1", null, null)); // Object 2 Document doc = TestUtils.newDocument(); Element nc = doc.createElementNS(null, "NonCommentandus"); nc.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns", ""); nc.appendChild(doc.createComment(" Commentandum ")); objs.add(fac.newXMLObject(Collections.singletonList (new DOMStructure(nc)), "object-2", null, null)); KeyInfo ki = kifac.newKeyInfo(Collections.singletonList (kifac.newKeyValue((PublicKey) VALIDATE_KEYS[1]))); // create XMLSignature XMLSignature sig = fac.newXMLSignature(si, ki, objs, "signature", null); DOMSignContext dsc = new DOMSignContext(SIGN_KEYS[1], doc); sig.sign(dsc); /* StringWriter sw = new StringWriter(); dumpDocument(doc, sw); System.out.println(sw); */ DOMValidateContext dvc = new DOMValidateContext (VALIDATE_KEYS[1], doc.getDocumentElement()); XMLSignature sig2 = fac.unmarshalXMLSignature(dvc); if (sig.equals(sig2) == false) { throw new Exception ("Unmarshalled signature is not equal to generated signature"); } if (sig2.validate(dvc) == false) { throw new Exception("Validation of generated signature failed"); } } @org.junit.Test public void testSignTemplateWithObjectNSDefs() throws Exception { String base = System.getProperty("basedir") == null ? "./" : System.getProperty("basedir"); File f = new File(base + "/src/test/resources/javax/xml/crypto/dsig/" + "signature-enveloping-rsa-template.xml"); Document doc = XMLUtils.createDocumentBuilder(false).parse(new FileInputStream(f)); // Find Signature element NodeList nl = doc.getElementsByTagNameNS(XMLSignature.XMLNS, "Signature"); if (nl.getLength() == 0) { throw new Exception("Cannot find Signature element"); } DOMStructure domSignature = new DOMStructure(nl.item(0)); // unmarshal the XMLSignature XMLSignature signature = fac.unmarshalXMLSignature(domSignature); // create copy of Signature XMLSignature newSignature = fac.newXMLSignature (signature.getSignedInfo(), null, signature.getObjects(), signature.getId(), signature.getSignatureValue().getId()); // Sign the template Node parent = domSignature.getNode().getParentNode(); DOMSignContext signContext = new DOMSignContext(SIGN_KEYS[0], parent); // remove the signature node (since it will get recreated) parent.removeChild(domSignature.getNode()); newSignature.sign(signContext); // check that Object element retained namespace definitions Element objElem = (Element)parent.getFirstChild().getLastChild(); Attr a = objElem.getAttributeNode("xmlns:test"); if (!a.getValue().equals("http://www.example.org/ns")) throw new Exception("Object namespace definition not retained"); } private SignedInfo createSignedInfo(SignatureMethod sm) throws Exception { // set up the building blocks CanonicalizationMethod cm = fac.newCanonicalizationMethod (CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS, (C14NMethodParameterSpec) null); DigestMethod dm = fac.newDigestMethod(DigestMethod.SHA1, null); List refs = Collections.singletonList(fac.newReference ("http://www.w3.org/Signature/2002/04/xml-stylesheet.b64", dm)); return fac.newSignedInfo(cm, sm, refs); } static class TestProvider extends Provider { private static final long serialVersionUID = 1L; TestProvider() { super("TestProvider", 0, "TestProvider"); } } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/CreateInteropExcC14NTest.java0000644000175000017500000001430012214631242031457 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test.dsig; import java.io.*; import java.security.*; import java.security.cert.Certificate; import java.util.*; import javax.xml.crypto.dom.DOMStructure; import javax.xml.crypto.dsig.*; import javax.xml.crypto.dsig.dom.*; import javax.xml.crypto.dsig.keyinfo.*; import javax.xml.crypto.dsig.spec.*; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.*; import javax.xml.crypto.test.KeySelectors; import javax.xml.parsers.DocumentBuilder; /** * Test that recreates interop exc C14N test vectors * but with different keys. * * @author Sean Mullan */ public class CreateInteropExcC14NTest extends org.junit.Assert { private XMLSignatureFactory fac; private KeyInfoFactory kifac; private DocumentBuilder db; private KeyStore ks; private Key signingKey; private PublicKey validatingKey; static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public CreateInteropExcC14NTest() throws Exception { fac = XMLSignatureFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); kifac = fac.getKeyInfoFactory(); db = XMLUtils.createDocumentBuilder(false); // get key & self-signed certificate from keystore String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); String fs = System.getProperty("file.separator"); FileInputStream fis = new FileInputStream (base + fs + "src/test/resources" + fs + "test.jks"); ks = KeyStore.getInstance("JKS"); ks.load(fis, "changeit".toCharArray()); Certificate signingCert = ks.getCertificate("mullan"); signingKey = ks.getKey("mullan", "changeit".toCharArray()); validatingKey = signingCert.getPublicKey(); } @org.junit.Test public void test_create_Y1() throws Exception { List refs = new ArrayList(4); // create reference 1 refs.add(fac.newReference ("#xpointer(id('to-be-signed'))", fac.newDigestMethod(DigestMethod.SHA1, null), Collections.singletonList (fac.newTransform(CanonicalizationMethod.EXCLUSIVE, (TransformParameterSpec) null)), null, null)); // create reference 2 List prefixList = new ArrayList(2); prefixList.add("bar"); prefixList.add("#default"); ExcC14NParameterSpec params = new ExcC14NParameterSpec(prefixList); refs.add(fac.newReference ("#xpointer(id('to-be-signed'))", fac.newDigestMethod(DigestMethod.SHA1, null), Collections.singletonList (fac.newTransform(CanonicalizationMethod.EXCLUSIVE, params)), null, null)); // create reference 3 refs.add(fac.newReference ("#xpointer(id('to-be-signed'))", fac.newDigestMethod(DigestMethod.SHA1, null), Collections.singletonList(fac.newTransform (CanonicalizationMethod.EXCLUSIVE_WITH_COMMENTS, (TransformParameterSpec) null)), null, null)); // create reference 4 prefixList = new ArrayList(2); prefixList.add("bar"); prefixList.add("#default"); params = new ExcC14NParameterSpec(prefixList); refs.add(fac.newReference ("#xpointer(id('to-be-signed'))", fac.newDigestMethod(DigestMethod.SHA1, null), Collections.singletonList(fac.newTransform (CanonicalizationMethod.EXCLUSIVE_WITH_COMMENTS, (TransformParameterSpec) params)), null, null)); // create SignedInfo SignedInfo si = fac.newSignedInfo( fac.newCanonicalizationMethod (CanonicalizationMethod.EXCLUSIVE, (C14NMethodParameterSpec) null), fac.newSignatureMethod(SignatureMethod.DSA_SHA1, null), refs); // create KeyInfo List kits = new ArrayList(2); kits.add(kifac.newKeyValue(validatingKey)); KeyInfo ki = kifac.newKeyInfo(kits); // create Objects Document doc = db.newDocument(); Element baz = doc.createElementNS("urn:bar", "bar:Baz"); Comment com = doc.createComment(" comment "); baz.appendChild(com); XMLObject obj = fac.newXMLObject(Collections.singletonList (new DOMStructure(baz)), "to-be-signed", null, null); // create XMLSignature XMLSignature sig = fac.newXMLSignature (si, ki, Collections.singletonList(obj), null, null); Element foo = doc.createElementNS("urn:foo", "Foo"); foo.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns", "urn:foo"); foo.setAttributeNS ("http://www.w3.org/2000/xmlns/", "xmlns:bar", "urn:bar"); doc.appendChild(foo); DOMSignContext dsc = new DOMSignContext(signingKey, foo); dsc.putNamespacePrefix(XMLSignature.XMLNS, "dsig"); sig.sign(dsc); DOMValidateContext dvc = new DOMValidateContext (new KeySelectors.KeyValueKeySelector(), foo.getLastChild()); XMLSignature sig2 = fac.unmarshalXMLSignature(dvc); assertTrue(sig.equals(sig2)); assertTrue(sig2.validate(dvc)); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/dsig/InteropXMLDSig11Test.java0000644000175000017500000001523311654523221030611 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package javax.xml.crypto.test.dsig; import java.io.File; import java.security.KeyFactory; import java.security.NoSuchAlgorithmException; import java.security.Security; import javax.xml.crypto.KeySelector; import javax.xml.crypto.test.KeySelectors; /** * This is a testcase to validate all the W3C xmldsig XMLDSig11 testcases. * * @author Sean Mullan */ public class InteropXMLDSig11Test extends org.junit.Assert { private SignatureValidator validator; private File dir; private KeySelector kvks, sks; private boolean ecSupport = true; static { Security.insertProviderAt (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1); } public InteropXMLDSig11Test() throws Exception { // check if EC is supported try { KeyFactory.getInstance("EC"); } catch (NoSuchAlgorithmException nsae) { ecSupport = false; } String fs = File.separator; String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); dir = new File(base + fs + "src/test/resources" + fs + "org" + fs + "w3c" + fs + "www" + fs + "interop" + fs + "xmldsig11"); validator = new SignatureValidator(dir); kvks = new KeySelectors.KeyValueKeySelector(); sks = new KeySelectors.SecretKeySelector("testkey".getBytes("ASCII")); } @org.junit.Test public void test_enveloping_p256_sha1() throws Exception { if (ecSupport) { test_xmldsig11("signature-enveloping-p256_sha1", "oracle"); } } @org.junit.Test public void test_enveloping_p256_sha256() throws Exception { if (ecSupport) { test_xmldsig11("signature-enveloping-p256_sha256", "oracle"); } } @org.junit.Test public void test_enveloping_p256_sha384() throws Exception { if (ecSupport) { test_xmldsig11("signature-enveloping-p256_sha384", "oracle"); } } @org.junit.Test public void test_enveloping_p256_sha512() throws Exception { if (ecSupport) { test_xmldsig11("signature-enveloping-p256_sha512", "oracle"); } } @org.junit.Test public void test_enveloping_p384_sha1() throws Exception { if (ecSupport) { test_xmldsig11("signature-enveloping-p384_sha1", "oracle"); } } @org.junit.Test public void test_enveloping_p384_sha256() throws Exception { if (ecSupport) { test_xmldsig11("signature-enveloping-p384_sha256", "oracle"); } } @org.junit.Test public void test_enveloping_p384_sha384() throws Exception { if (ecSupport) { test_xmldsig11("signature-enveloping-p384_sha384", "oracle"); } } @org.junit.Test public void test_enveloping_p384_sha512() throws Exception { if (ecSupport) { test_xmldsig11("signature-enveloping-p384_sha512", "oracle"); } } @org.junit.Test public void test_enveloping_p521_sha1() throws Exception { if (ecSupport) { test_xmldsig11("signature-enveloping-p521_sha1", "oracle"); } } @org.junit.Test public void test_enveloping_p521_sha256() throws Exception { if (ecSupport) { test_xmldsig11("signature-enveloping-p521_sha256", "oracle"); } } @org.junit.Test public void test_enveloping_p521_sha384() throws Exception { if (ecSupport) { test_xmldsig11("signature-enveloping-p521_sha384", "oracle"); } } @org.junit.Test public void test_enveloping_p521_sha512() throws Exception { if (ecSupport) { test_xmldsig11("signature-enveloping-p521_sha512", "oracle"); } } @org.junit.Test public void test_enveloping_rsa_sha256() throws Exception { test_xmldsig11("signature-enveloping-rsa-sha256", "oracle"); } @org.junit.Test public void test_enveloping_rsa_sha384() throws Exception { test_xmldsig11("signature-enveloping-rsa_sha384", "oracle"); } @org.junit.Test public void test_enveloping_rsa_sha512() throws Exception { test_xmldsig11("signature-enveloping-rsa_sha512", "oracle"); } @org.junit.Test public void test_enveloping_sha256_rsa_sha256() throws Exception { test_xmldsig11("signature-enveloping-sha256-rsa-sha256", "oracle"); } @org.junit.Test public void test_enveloping_sha384_rsa_sha256() throws Exception { test_xmldsig11("signature-enveloping-sha384-rsa_sha256", "oracle"); } @org.junit.Test public void test_enveloping_sha512_rsa_sha256() throws Exception { test_xmldsig11("signature-enveloping-sha512-rsa_sha256", "oracle"); } @org.junit.Test public void test_enveloping_hmac_sha256() throws Exception { test_xmldsig11("signature-enveloping-hmac-sha256", sks, "oracle"); } @org.junit.Test public void test_enveloping_hmac_sha384() throws Exception { test_xmldsig11("signature-enveloping-hmac-sha384", sks, "oracle"); } @org.junit.Test public void test_enveloping_hmac_sha512() throws Exception { test_xmldsig11("signature-enveloping-hmac-sha512", sks, "oracle"); } private void test_xmldsig11(String test, String vendor) throws Exception { String file = vendor + File.separator + test + ".xml"; // System.out.println("Validating " + file); boolean coreValidity = validator.validate(file, kvks); assertTrue(file + " failed core validation", coreValidity); } private void test_xmldsig11(String test, KeySelector ks, String vendor) throws Exception { String file = vendor + File.separator + test + ".xml"; // System.out.println("Validating " + file); boolean coreValidity = validator.validate(file, ks); assertTrue(file + " failed core validation", coreValidity); } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/KeySelectorTest.java0000644000175000017500000000666211654523221027210 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test; import java.util.*; import java.security.Key; import java.security.cert.X509Certificate; import javax.xml.crypto.*; import javax.xml.crypto.dsig.keyinfo.*; import javax.xml.crypto.dsig.*; /** * Unit test for javax.xml.crypto.KeySelector * * @author Valerie Peng */ public class KeySelectorTest extends org.junit.Assert { private Key key; private KeySelector selector1; private class MyOwnKey implements Key { private static final long serialVersionUID = -3288147894137347920L; private String algo; private byte[] val; MyOwnKey(String algorithm, byte[] value) { algo = algorithm; val = (byte[]) value.clone(); } public String getAlgorithm() { return algo; } public byte[] getEncoded() { return val; } public String getFormat() { return "RAW"; } } public KeySelectorTest() throws Exception { // selector1: singletonKeySelector key = new MyOwnKey("test", new byte[16]); selector1 = KeySelector.singletonKeySelector(key); } @org.junit.Test public void testselect() throws Exception { KeyInfoFactory factory = KeyInfoFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); X509Data obj = factory.newX509Data(Collections.singletonList("CN=foo")); KeyInfo info = factory.newKeyInfo(Collections.singletonList(obj)); //@@@@@what about other types of X509Data, i.e. subject name String, // X509IssuerSerial objects, etc? XMLSignatureFactory dsigFac = XMLSignatureFactory.getInstance ("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); SignatureMethod sm1 = dsigFac.newSignatureMethod(SignatureMethod.DSA_SHA1, null); SignatureMethod sm2 = dsigFac.newSignatureMethod(SignatureMethod.RSA_SHA1, null); assertTrue(compareKey(key, selector1.select (info, KeySelector.Purpose.VERIFY, sm1, null).getKey())); assertTrue(compareKey(key, selector1.select (info, KeySelector.Purpose.VERIFY, sm2, null).getKey())); } private static boolean compareKey(Object answer, Key key) { boolean result = false; if (answer instanceof MyOwnKey) { result = ((MyOwnKey) answer == key); } else if (answer instanceof X509Certificate) { result = ((X509Certificate)answer).getPublicKey().equals(key); } return result; } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/OctetStreamDataTest.java0000644000175000017500000000544611551333171030001 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test; import java.io.*; import java.util.*; import javax.xml.crypto.*; /** * Unit test for javax.xml.crypto.OctetStreamData * * @author Valerie Peng */ public class OctetStreamDataTest extends org.junit.Assert { @org.junit.Test public void testConstructor() { // test OctetStreamData(InputStream) and // OctetStreamData(InputStream, String, String) OctetStreamData osdata; try { osdata = new OctetStreamData(null); fail("Should raise a NPE for null input stream"); } catch (NullPointerException npe) {} try { osdata = new OctetStreamData(null, "uri", "mimeType"); fail("Should raise a NPE for null input stream"); } catch (NullPointerException npe) {} int len = 300; byte[] in = new byte[len]; new Random().nextBytes(in); ByteArrayInputStream bais = new ByteArrayInputStream(in); try { osdata = new OctetStreamData(bais); assertNotNull(osdata); assertEquals(osdata.getOctetStream(), bais); assertNull(osdata.getURI()); assertNull(osdata.getMimeType()); osdata = new OctetStreamData(bais, null, null); assertNotNull(osdata); assertEquals(osdata.getOctetStream(), bais); assertNull(osdata.getURI()); assertNull(osdata.getMimeType()); } catch (Exception ex) { fail("Unexpected Exception: " + ex); } String uri="testUri"; String mimeType="test"; try { osdata = new OctetStreamData(bais, uri, mimeType); assertNotNull(osdata); assertEquals(osdata.getOctetStream(), bais); assertEquals(osdata.getURI(), uri); assertEquals(osdata.getMimeType(), mimeType); } catch (Exception ex) { fail("Unexpected Exception: " + ex); } } } libxml-security-java-1.5.6/src/test/java/javax/xml/crypto/test/KeySelectorExceptionTest.java0000644000175000017500000000626611551333171031066 0ustar tonytony/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ package javax.xml.crypto.test; import java.io.ByteArrayOutputStream; import java.io.PrintStream; import java.util.Arrays; import javax.xml.crypto.KeySelectorException; /** * Unit test for javax.xml.crypto.KeySelectorException * * @author Valerie Peng */ public class KeySelectorExceptionTest extends org.junit.Assert { @org.junit.Test public void testConstructor() { // test KeySelectorException() KeySelectorException kse = new KeySelectorException(); assertNull(kse.getMessage()); assertNull(kse.getCause()); // test KeySelectorException(String) kse = new KeySelectorException("test"); assertEquals("test", kse.getMessage()); assertNull(kse.getCause()); // test KeySelectorException(String, Throwable) IllegalArgumentException iae = new IllegalArgumentException("iae"); kse = new KeySelectorException("random", iae); assertEquals("random", kse.getMessage()); assertTrue(compareThrowable(iae, kse.getCause())); // test KeySelectorException(Throwable) kse = new KeySelectorException(iae); assertEquals(iae.toString(), kse.getMessage()); assertTrue(compareThrowable(iae, kse.getCause())); } private static boolean compareThrowable(Throwable t1, Throwable t2) { boolean result = false; // first compare their toString presentation if (t1.toString().equals(t2.toString())) { ByteArrayOutputStream baos1 = new ByteArrayOutputStream(); ByteArrayOutputStream baos2 = new ByteArrayOutputStream(); // then compare their StackTrace PrintStream ps = new PrintStream(baos1); t1.printStackTrace(ps); ps.close(); ps = new PrintStream(baos2); t2.printStackTrace(ps); ps.close(); if (Arrays.equals(baos1.toByteArray(), baos2.toByteArray())) { result = true; } else { System.out.println("StackTrace comparison failed"); t1.printStackTrace(System.out); t2.printStackTrace(System.out); } } else { System.out.println("ToString comparison failed"); System.out.println(t1); System.out.println(t2); } return result; } } libxml-security-java-1.5.6/pom.xml0000644000175000017500000003700512236156452015672 0ustar tonytony 4.0.0 org.apache.santuario xmlsec bundle Apache XML Security for Java 1.5.6 Apache XML Security for Java supports XML-Signature Syntax and Processing, W3C Recommendation 12 February 2002, and XML Encryption Syntax and Processing, W3C Recommendation 10 December 2002. As of version 1.4, the library supports the standard Java API JSR-105: XML Digital Signature APIs. http://santuario.apache.org/ JIRA https://issues.apache.org/jira/browse/SANTUARIO Apache Santuario Developer List dev-subscribe@santuario.apache.org dev-unsubscribe@santuario.apache.org dev@santuario.apache.org http://news.gmane.org/gmane.text.xml.security.devel 2000 The Apache Software License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.txt repo scm:svn:http://svn.apache.org/repos/asf/santuario/xml-security-java/tags/1.5.6 scm:svn:https://svn.apache.org/repos/asf/santuario/xml-security-java/tags/1.5.6 http://svn.apache.org/repos/asf/santuario/xml-security-java/tags/1.5.6 The Apache Software Foundation http://www.apache.org/ org.apache apache 11 ${basedir}/src/main/java ${basedir}/src/test/java src/main/java **/*.java src/test/java **/*.java src/test/resources **/*.java org.apache.maven.plugins maven-compiler-plugin 3.1 1.5 1.5 org.apache.maven.plugins maven-jar-plugin 2.4 test-compile jar test-jar ${project.build.directory} ${project.build.directory}/test-classes org.apache.felix maven-bundle-plugin 2.4.0 true Apache XML Security The Apache Software Foundation org.apache ${project.version} Apache XML Security The Apache Software Foundation ${project.version} org.apache.xml.security.*;version="${project.version}", javax.xml.crypto.*;version="${project.version}", org.apache.jcp.xml.dsig.internal.*;version="${project.version}", !org.apache.xml.security.*, !javax.xml.crypto.*, !org.apache.jcp.xml.dsig.internal.*, org.apache.commons.logging;resolution:=optional;version="[1.1,2)", org.apache.xml.dtm*;resolution:=optional;version="[2.7,3)", org.apache.xml.utils*;resolution:=optional;version="[2.7,3)", org.apache.xpath*;resolution:=optional;version="[2.7,3)", * org.apache.maven.plugins maven-release-plugin 2.3.2 false clean install deploy -Papache-release true org.apache.maven.plugins maven-source-plugin 2.1.2 jar true org.apache.maven.plugins maven-javadoc-plugin 2.9.1 jar true org.apache.maven.plugins maven-surefire-plugin 2.15 brief false pertest false **/*Test.java ${project.version} install jdk15 1.5 org.bouncycastle bcprov-jdk15on ${bcprov.version} test org.apache.maven.plugins maven-compiler-plugin jdk16 1.6 true org.bouncycastle bcprov-jdk15on ${bcprov.version} test release release org.apache.maven.plugins maven-javadoc-plugin org.apache.maven.plugins maven-source-plugin fastinstall true 1.3.04 1.1.1 2.7.1 2.9.1 4.8.2 1.2.17 1.47 commons-logging commons-logging ${commons.logging.version} compile junit junit ${junit.version} test log4j log4j ${log4j.version} test xalan xalan ${xalan.version} provided true xerces xercesImpl ${xerces.version} provided true xml-apis xml-apis ${xml.apis.version} provided true apache.releases.https Apache Release Distribution Repository https://repository.apache.org/service/local/staging/deploy/maven2 apache.snapshots.https Apache Development Snapshot Repository https://repository.apache.org/content/repositories/snapshots false