Package com.sun.org.apache.xml.internal.security.signature

Examples of com.sun.org.apache.xml.internal.security.signature.XMLSignatureException


         this._signatureAlgorithm =
            (SignatureAlgorithmSpi) 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);
      }
   }
View Full Code Here


         this._signatureAlgorithm
            .engineGetContextFromElement(this._constructionElement);
      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);
      }
   }
View Full Code Here

     try {                      
       SignatureAlgorithm._algorithmHash.put(algorithmURI, Class.forName(implementingClass));
        } catch (ClassNotFoundException 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);
        }
        
      }
   }
View Full Code Here

      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 new MessageDigestAlgorithm(doc, md, algorithmURI);
   }
View Full Code Here

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

           throws XMLSignatureException {

      try {
         this._signatureAlgorithm.setParameter(params);
      } catch (InvalidAlgorithmParameterException ex) {
         throw new XMLSignatureException("empty", ex);
      }
   }
View Full Code Here

           throws XMLSignatureException {

      try {
         return this._signatureAlgorithm.verify(signature);
      } catch (SignatureException ex) {
         throw new XMLSignatureException("empty", ex);
      }
   }
View Full Code Here

      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) {
         throw new XMLSignatureException("empty", ex);
      }
   }
View Full Code Here

   protected byte[] engineSign() throws XMLSignatureException {

      try {
         return this._signatureAlgorithm.sign();
      } catch (SignatureException ex) {
         throw new XMLSignatureException("empty", ex);
      }
   }
View Full Code Here

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

TOP

Related Classes of com.sun.org.apache.xml.internal.security.signature.XMLSignatureException

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.