|
From: Pelle B. <pe...@us...> - 2004-03-20 17:29:41
|
Update of /cvsroot/neuclear/neuclear-xmlsig/src/java/org/neuclear/xml/xmlsec In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19580/src/java/org/neuclear/xml/xmlsec Modified Files: InvalidSignatureException.java SignedInfo.java XMLSignature.java Log Message: The problem with Enveloped signatures has now been fixed. It was a problem in the way transforms work. I have bandaided it, but in the future if better support for transforms need to be made, we need to rethink it a bit. Perhaps using the new crypto channel's in neuclear-commons. Index: InvalidSignatureException.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-xmlsig/src/java/org/neuclear/xml/xmlsec/InvalidSignatureException.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** InvalidSignatureException.java 19 Mar 2004 22:21:51 -0000 1.5 --- InvalidSignatureException.java 20 Mar 2004 17:19:42 -0000 1.6 *************** *** 12,16 **** public class InvalidSignatureException extends Exception { public InvalidSignatureException(byte[] a, byte[] b) { ! super("Digest: '" + a + "' not equal to: " + b); } --- 12,16 ---- public class InvalidSignatureException extends Exception { public InvalidSignatureException(byte[] a, byte[] b) { ! super("Digest: '" + new String(a) + "' not equal to: " + new String(b)); } Index: SignedInfo.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-xmlsig/src/java/org/neuclear/xml/xmlsec/SignedInfo.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SignedInfo.java 19 Mar 2004 22:21:51 -0000 1.5 --- SignedInfo.java 20 Mar 2004 17:19:42 -0000 1.6 *************** *** 1,4 **** --- 1,7 ---- /* $Id$ * $Log$ + * Revision 1.6 2004/03/20 17:19:42 pelle + * The problem with Enveloped signatures has now been fixed. It was a problem in the way transforms work. I have bandaided it, but in the future if better support for transforms need to be made, we need to rethink it a bit. Perhaps using the new crypto channel's in neuclear-commons. + * * Revision 1.5 2004/03/19 22:21:51 pelle * Changes in the XMLSignature class, which is now Abstract there are currently 3 implementations for: *************** *** 279,285 **** try { final byte[] cansi = canonicalize(); ! System.out.println("Signing Canonicalized:"); ! System.out.println(new String(cansi)); ! System.out.println("------"); return CryptoTools.sign(key, cansi); --- 282,288 ---- try { final byte[] cansi = canonicalize(); ! // System.out.println("Signing Canonicalized:"); ! // System.out.println(new String(cansi)); ! // System.out.println("------"); return CryptoTools.sign(key, cansi); Index: XMLSignature.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-xmlsig/src/java/org/neuclear/xml/xmlsec/XMLSignature.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** XMLSignature.java 19 Mar 2004 23:38:25 -0000 1.17 --- XMLSignature.java 20 Mar 2004 17:19:42 -0000 1.18 *************** *** 1,4 **** --- 1,7 ---- /* $Id$ * $Log$ + * Revision 1.18 2004/03/20 17:19:42 pelle + * The problem with Enveloped signatures has now been fixed. It was a problem in the way transforms work. I have bandaided it, but in the future if better support for transforms need to be made, we need to rethink it a bit. Perhaps using the new crypto channel's in neuclear-commons. + * * Revision 1.17 2004/03/19 23:38:25 pelle * I now know the problem is in the Reference element *************** *** 276,282 **** final byte[] sig = getSignature(); final byte[] cansi = si.canonicalize(); ! System.out.println("Verifying Canonicalized: "); ! System.out.println(new String(cansi)); ! System.out.println("------"); try { --- 279,285 ---- final byte[] sig = getSignature(); final byte[] cansi = si.canonicalize(); ! // System.out.println("Verifying Canonicalized: "); ! // System.out.println(new String(cansi)); ! // System.out.println("------"); try { |