You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by ra...@apache.org on 2005/04/02 20:48:37 UTC

cvs commit: xml-security/src/org/apache/xml/security/signature XMLSignature.java

raul        2005/04/02 10:48:37

  Modified:    src/org/apache/xml/security/algorithms/implementations
                        IntegrityHmac.java
               src/org/apache/xml/security/signature XMLSignature.java
  Removed:     src/org/apache/xml/security/utils HexDump.java
  Log:
  Removed HexDump funcionality.
  
  Revision  Changes    Path
  1.13      +14 -25    xml-security/src/org/apache/xml/security/algorithms/implementations/IntegrityHmac.java
  
  Index: IntegrityHmac.java
  ===================================================================
  RCS file: /home/cvs/xml-security/src/org/apache/xml/security/algorithms/implementations/IntegrityHmac.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- IntegrityHmac.java	6 Oct 2004 14:42:22 -0000	1.12
  +++ IntegrityHmac.java	2 Apr 2005 18:48:37 -0000	1.13
  @@ -33,7 +33,6 @@
   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.HexDump;
   import org.apache.xml.security.utils.XMLUtils;
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
  @@ -110,21 +109,11 @@
         try {
            byte[] completeResult = this._macAlgorithm.doFinal();
   
  -         if (log.isDebugEnabled()) {
  -         log.debug("completeResult = "
  -                      + HexDump.byteArrayToHexString(completeResult));
  -         log.debug("signature      = "
  -                      + HexDump.byteArrayToHexString(signature));
  -         }
            if ((this._HMACOutputLength == 0) || (this._HMACOutputLength >= 160)) {
               return MessageDigestAlgorithm.isEqual(completeResult, signature);
            }
            byte[] stripped = IntegrityHmac.reduceBitLength(completeResult,
                                    this._HMACOutputLength);
  -         if (log.isDebugEnabled()) {
  -         log.debug("stripped       = "
  -                      + HexDump.byteArrayToHexString(stripped));
  -         }
            return MessageDigestAlgorithm.isEqual(stripped, signature);         
         } catch (IllegalStateException ex) {
            throw new XMLSignatureException("empty", ex);
  @@ -380,7 +369,7 @@
       *
       * @param element
       */
  -   protected void engineAddContextToElement(Element element)
  +   public void engineAddContextToElement(Element element)
              {
   
         if (element == null) {
  
  
  
  1.42      +0 -5      xml-security/src/org/apache/xml/security/signature/XMLSignature.java
  
  Index: XMLSignature.java
  ===================================================================
  RCS file: /home/cvs/xml-security/src/org/apache/xml/security/signature/XMLSignature.java,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- XMLSignature.java	25 Sep 2004 15:10:15 -0000	1.41
  +++ XMLSignature.java	2 Apr 2005 18:48:37 -0000	1.42
  @@ -38,7 +38,6 @@
   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.HexDump;
   import org.apache.xml.security.utils.I18n;
   import org.apache.xml.security.utils.IdResolver;
   import org.apache.xml.security.utils.SignatureElementProxy;
  @@ -619,10 +618,6 @@
            //retrieve the byte[] from the stored signature
            byte sigBytes[] = this.getSignatureValue();
   
  -         if (log.isDebugEnabled()) {
  -         	log.debug("SignatureValue = "
  -                   + HexDump.byteArrayToHexString(sigBytes));
  -         };
   
            //Have SignatureAlgorithm sign the input bytes and compare them to the
            //bytes that were stored in the signature.