Examples of XmlSignatureException


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

         if (this._HMACOutputLengthSet && this._HMACOutputLength < getDigestLength()) {
            if (log.isLoggable(java.util.logging.Level.FINE)) {
                log.log(java.util.logging.Level.FINE,
                    "HMACOutputLength must not be less than " + getDigestLength());
            }
            throw new XMLSignatureException("errorMessages.XMLSignatureException");
         } else {
            byte[] completeResult = this._macAlgorithm.doFinal();
            return MessageDigestAlgorithm.isEqual(completeResult, signature);
         }
      } catch (IllegalStateException ex) {
         throw new XMLSignatureException("empty", ex);
      }
   }
View Full Code Here

Examples of com.sun.org.apache.xml.internal.security.signature.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);
      }
   }
View Full Code Here

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

         if (this._HMACOutputLengthSet && this._HMACOutputLength < getDigestLength()) {
            if (log.isLoggable(java.util.logging.Level.FINE)) {
                log.log(java.util.logging.Level.FINE,
                    "HMACOutputLength must not be less than " + getDigestLength());
            }
            throw new XMLSignatureException("errorMessages.XMLSignatureException");
         } else {
            return this._macAlgorithm.doFinal();
         }
      } catch (IllegalStateException ex) {
         throw new XMLSignatureException("empty", ex);
      }
   }
View Full Code Here

Examples of com.sun.org.apache.xml.internal.security.signature.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);
      }
   }
View Full Code Here

Examples of com.sun.org.apache.xml.internal.security.signature.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);
      }
   }
View Full Code Here

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

    * @param secureRandom
    * @throws XMLSignatureException
    */
   protected void engineInitSign(Key secretKey, SecureRandom secureRandom)
           throws XMLSignatureException {
      throw new XMLSignatureException("algorithms.CannotUseSecureRandomOnMAC");
   }
View Full Code Here

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

   protected void engineUpdate(byte[] input) throws XMLSignatureException {

      try {
         this._macAlgorithm.update(input);
      } catch (IllegalStateException ex) {
         throw new XMLSignatureException("empty", ex);
      }
   }
View Full Code Here

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

   protected void engineUpdate(byte input) throws XMLSignatureException {

      try {
         this._macAlgorithm.update(input);
      } catch (IllegalStateException ex) {
         throw new XMLSignatureException("empty", ex);
      }
   }
View Full Code Here

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

           throws XMLSignatureException {

      try {
         this._macAlgorithm.update(buf, offset, len);
      } catch (IllegalStateException ex) {
         throw new XMLSignatureException("empty", ex);
      }
   }
View Full Code Here

Examples of javax.xml.crypto.dsig.XMLSignatureException

        return search;
    }

    protected void checkSearchValueOfType(Class<?> cl, Input input) throws Exception { //NOPMD
        if (!cl.isAssignableFrom(input.getOutputNodeSearch().getClass())) {
            throw new XMLSignatureException(String.format(
                    "Wrong configruation: Search value is of class %s, the output node search %s requires class %s.", input
                            .getOutputNodeSearch().getClass().getName(), input.getOutputNodeSearchType(), cl.getName()));
        }

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.