Package org.apache.xml.security.keys.storage

Examples of org.apache.xml.security.keys.storage.StorageResolver


         Node currentChild=this._constructionElement.getFirstChild();
         String uri=this.getBaseURI();
         while (currentChild!=null)      {   
            if (currentChild.getNodeType() == Node.ELEMENT_NODE) {              
               for (int k = 0; k < storageLength; k++) {
                   StorageResolver storage =
                      (StorageResolver) this._storageResolvers.get(k);
                   PublicKey pk = keyResolver
                           .engineLookupAndResolvePublicKey((Element) currentChild, uri, storage);

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


   private X509Certificate applyCurrentResolver(String uri, int storageLength, KeyResolverSpi keyResolver) throws KeyResolverException {
     Node currentChild=this._constructionElement.getFirstChild();
     while (currentChild!=null)      {      
       if (currentChild.getNodeType() == Node.ELEMENT_NODE) {
         for (int k = 0; k < storageLength; k++) {
             StorageResolver storage =
                (StorageResolver) this._storageResolvers.get(k);

             X509Certificate cert = keyResolver
                  .engineLookupResolveX509Certificate((Element) currentChild, uri,
                      storage);
View Full Code Here

         Node currentChild=this._constructionElement.getFirstChild();
         String uri=this.getBaseURI();
         while (currentChild!=null)      {   
            if (currentChild.getNodeType() == Node.ELEMENT_NODE) {  
                  for (int k = 0; k < storageLength; k++) {
                     StorageResolver storage =
                        (StorageResolver) this._storageResolvers.get(k);

                     SecretKey sk =
                           keyResolver.engineLookupAndResolveSecretKey((Element) currentChild,
                                                        uri,
View Full Code Here

         Node currentChild=this._constructionElement.getFirstChild();
         String uri=this.getBaseURI();
         while (currentChild!=null)      {   
            if (currentChild.getNodeType() == Node.ELEMENT_NODE) {
               for (int k = 0; k < storageLength; k++) {
                     StorageResolver storage =
                        (StorageResolver) this._storageResolvers.get(k);

                     SecretKey sk = keyResolver
                           .engineLookupAndResolveSecretKey((Element) currentChild, uri, storage);
View Full Code Here

         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
                StorageResolver storage = null;
                PrivateKey pk = keyResolver.engineLookupAndResolvePrivateKey(
                        (Element) currentChild,
                        uri,
                        storage);
View Full Code Here

         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
                StorageResolver storage = null;
                PrivateKey pk = keyResolver
                       .engineLookupAndResolvePrivateKey((Element) currentChild, uri, storage);

                if (pk != null) {
                   return pk;
View Full Code Here

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

            if (currentChild.getNodeType() == Node.ELEMENT_NODE) {
               if (this._storageResolvers.size() == 0) {

                  // if we do not have storage resolvers, we verify with null
                  StorageResolver storage = null;

                  if (keyResolver.canResolve((Element) currentChild,
                                             this.getBaseURI(), storage)) {
                     PublicKey pk =
                        keyResolver.resolvePublicKey((Element) currentChild,
                                                     this.getBaseURI(),
                                                     storage);

                     if (pk != null) {
                        return pk;
                     }
                  }
               } else {
                  for (int k = 0; k < this._storageResolvers.size(); k++) {
                     StorageResolver storage =
                        (StorageResolver) this._storageResolvers.elementAt(k);

                     if (keyResolver.canResolve((Element) currentChild,
                                                this.getBaseURI(), storage)) {
                        PublicKey pk =
View Full Code Here

            if (currentChild.getNodeType() == Node.ELEMENT_NODE) {
               if (this._storageResolvers.size() == 0) {

                  // if we do not have storage resolvers, we verify with null
                  StorageResolver storage = null;

                  if (keyResolver.engineCanResolve((Element) currentChild,
                                                   this.getBaseURI(),
                                                   storage)) {
                     PublicKey pk =
                        keyResolver
                           .engineResolvePublicKey((Element) currentChild, this
                              .getBaseURI(), storage);

                     if (pk != null) {
                        return pk;
                     }
                  }
               } else {
                  for (int k = 0; k < this._storageResolvers.size(); k++) {
                     StorageResolver storage =
                        (StorageResolver) this._storageResolvers.elementAt(k);

                     if (keyResolver.engineCanResolve((Element) currentChild,
                                                      this.getBaseURI(),
                                                      storage)) {
View Full Code Here

            if (currentChild.getNodeType() == Node.ELEMENT_NODE) {
               if (this._storageResolvers.size() == 0) {

                  // if we do not have storage resolvers, we verify with null
                  StorageResolver storage = null;

                  if (keyResolver.canResolve((Element) currentChild,
                                             this.getBaseURI(), storage)) {
                     X509Certificate cert =
                        keyResolver
                           .resolveX509Certificate((Element) currentChild, this
                              .getBaseURI(), storage);

                     if (cert != null) {
                        return cert;
                     }
                  }
               } else {
                  for (int k = 0; k < this._storageResolvers.size(); k++) {
                     StorageResolver storage =
                        (StorageResolver) this._storageResolvers.elementAt(k);

                     if (keyResolver.canResolve((Element) currentChild,
                                                this.getBaseURI(), storage)) {
                        X509Certificate cert = keyResolver
View Full Code Here

TOP

Related Classes of org.apache.xml.security.keys.storage.StorageResolver

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.