Author: spouliot
Date: 2006-06-14 11:28:24 -0400 (Wed, 14 Jun 2006)
New Revision: 61699
Modified:
Log:
2006-06-14 Sebastien Pouliot <sebastien (AT) ximian (DOT) com>
* AuthenticodeBase.cs: Fix destination offset. Note that this works
under MS but not under Mono.
* AuthenticodeDeformatter.cs: Report a more useful error if the file
hash doesn't match the signed hash.
Modified:
2006-06-14 15:27:32 UTC (rev 61698)
2006-06-14 15:28:24 UTC (rev 61699)
@@ -182,7 +182,7 @@
}
else {
// hash the last part of the first (already in memory) block
-hash.TransformBlock (fileblock, pe, blockLength - pe, fileblock, 0);
+hash.TransformBlock (fileblock, pe, blockLength - pe, fileblock, pe);
// hash by blocks of 4096 bytes
long blocks = (n >12);
Modified:
2006-06-14 15:27:32 UTC (rev 61698)
2006-06-14 15:28:24 UTC (rev 61699)
@@ -210,8 +210,10 @@
}
base.Close ();
-if (!signedHash.CompareValue (hash))
+if (!signedHash.CompareValue (hash)) {
+reason = 2;
return false;
+}
// messageDigest is a hash of spcIndirectDataContext (which includes the file hash)
byte[] spcIDC = spc [0].Value;
Modified:
2006-06-14 15:27:32 UTC (rev 61698)
2006-06-14 15:28:24 UTC (rev 61699)
@@ -1,3 +1,10 @@
+2006-06-14 Sebastien Pouliot <sebastien (AT) ximian (DOT) com>
+
+* AuthenticodeBase.cs: Fix destination offset. Note that this works
+under MS but not under Mono.
+* AuthenticodeDeformatter.cs: Report a more useful error if the file
+hash doesn't match the signed hash.
+
2005-03-24 Sebastien Pouliot <sebastien (AT) ximian (DOT) com>
* AuthenticodeDeformatter.cs: Don't hide the SecurityException (e.g.
Mono-patches maillist - Mono-patches (AT) lists (DOT) ximian.com