summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2013-07-11 18:17:19 +0200
committerMarc-André Lureau <marcandre.lureau@gmail.com>2013-07-11 18:26:08 +0200
commit3d838b3c20ba8bdd18681452bc681d970d5777cd (patch)
treedef05b3e16b4ebc1452875e27da4a146cd9104ae /tools
parentb2a6eebf2060110effe3b9d0d87f5aba804ffdb5 (diff)
downloadmsitools-3d838b3c20ba8bdd18681452bc681d970d5777cd.zip
msitools-3d838b3c20ba8bdd18681452bc681d970d5777cd.tar.gz
msitools-3d838b3c20ba8bdd18681452bc681d970d5777cd.tar.xz
wixl: Add unused MsiFileHash
Wine implementation uses MD5, which is not FIPS compliant and apparently it's not even used to validate files: http://stackoverflow.com/questions/8203153/which-hash-function-is-used-by-windows-installer
Diffstat (limited to 'tools')
-rw-r--r--tools/wixl/msi.vala26
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/wixl/msi.vala b/tools/wixl/msi.vala
index e15e0f4..cf7d46f 100644
--- a/tools/wixl/msi.vala
+++ b/tools/wixl/msi.vala
@@ -20,6 +20,32 @@ namespace Wixl {
}
}
+#if 0
+ class MsiTableFileHash: MsiTable {
+ static construct {
+ name = "MsiFileHash";
+ sql_create = "CREATE TABLE `MsiFileHash` (`File_` CHAR(72) NOT NULL, `Options` INT NOT NULL, `HashPart1` LONG NOT NULL, `HashPart2` LONG NOT NULL, `HashPart3` LONG NOT NULL, `HashPart4` LONG NOT NULL PRIMARY KEY `File_`)";
+ sql_insert = "INSERT INTO `MsiFileHash` (`File_`, `Options`, `HashPart1`, `HashPart2`, `HashPart3`, `HashPart4`) VALUES (?, ?, ?, ?, ?, ?)";
+ }
+
+ public void add (string file,
+ int hash1, int hash2, int hash3, int hash4,
+ int? options = 0) throws GLib.Error {
+ var rec = new Libmsi.Record (6);
+
+ if (!rec.set_string (1, file) ||
+ !rec.set_int (2, options) ||
+ !rec.set_int (3, hash1) ||
+ !rec.set_int (4, hash2) ||
+ !rec.set_int (5, hash3) ||
+ !rec.set_int (6, hash4))
+ throw new Wixl.Error.FAILED ("failed to add record");
+
+ records.append (rec);
+ }
+ }
+#endif
+
class MsiTableIcon: MsiTable {
static construct {
name = "Icon";