Package org.apache.xml.security.samples.utils.resolver

Examples of org.apache.xml.security.samples.utils.resolver.OfflineResolver


   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);
View Full Code Here


         Element sigElement = (Element) XPathAPI.selectSingleNode(doc,
                                 "//ds:Signature[1]", nscontext);
         XMLSignature signature = new XMLSignature(sigElement,
                                                   f.toURL().toString());

         signature.addResourceResolver(new OfflineResolver());

         // XMLUtils.outputDOMc14nWithComments(signature.getElement(), System.out);
         KeyInfo ki = signature.getKeyInfo();

         if (ki != null) {
View Full Code Here

   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);
View Full Code Here

            //the baseURI. That URI is prepended to all relative URIs.
            XMLSignature signature =
               new XMLSignature(sigElement,
                                (new File(filename)).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();
View Full Code Here

   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);
View Full Code Here

    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);
View Full Code Here

    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);
View Full Code Here

    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);
View Full Code Here

                //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();
View Full Code Here

    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);
View Full Code Here

TOP

Related Classes of org.apache.xml.security.samples.utils.resolver.OfflineResolver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.