Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/SoftEtherVPN/SoftEtherVPN_Stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordnobori <da.git@softether.co.jp>2015-09-15 08:22:53 +0300
committerdnobori <da.git@softether.co.jp>2015-09-15 08:22:53 +0300
commit9a82b3c65c9d9b323dc9150077e7ff51c01b4a58 (patch)
tree5144a8405b464cad246b08bcded583e32ce38255 /src/BuildUtil
parent4b65e251f240d0b36c704acd598f4ceb07c41413 (diff)
v4.19-9577-beta
Diffstat (limited to 'src/BuildUtil')
-rw-r--r--src/BuildUtil/BuildUtilCommands.cs7
-rw-r--r--src/BuildUtil/CodeSign.cs11
-rw-r--r--src/BuildUtil/Win32BuildUtil.cs12
3 files changed, 19 insertions, 11 deletions
diff --git a/src/BuildUtil/BuildUtilCommands.cs b/src/BuildUtil/BuildUtilCommands.cs
index 4e0c3644..78d19edd 100644
--- a/src/BuildUtil/BuildUtilCommands.cs
+++ b/src/BuildUtil/BuildUtilCommands.cs
@@ -1322,6 +1322,8 @@ namespace BuildUtil
new ConsoleParam("DEST"),
new ConsoleParam("COMMENT", ConsoleService.Prompt, "Comment: ", ConsoleService.EvalNotEmpty, null),
new ConsoleParam("KERNEL"),
+ new ConsoleParam("CERTID"),
+ new ConsoleParam("SHAMODE"),
};
ConsoleParamValueList vl = c.ParseCommandList(cmdName, str, args);
@@ -1334,7 +1336,10 @@ namespace BuildUtil
string comment = vl["COMMENT"].StrValue;
bool kernel = vl["KERNEL"].BoolValue;
- CodeSign.SignFile(destFileName, srcFileName, comment, kernel);
+ int certid = vl["CERTID"].IntValue;
+ int shamode = vl["SHAMODE"].IntValue;
+
+ CodeSign.SignFile(destFileName, srcFileName, comment, kernel, certid, shamode);
return 0;
}
diff --git a/src/BuildUtil/CodeSign.cs b/src/BuildUtil/CodeSign.cs
index 0ae698df..0f1dcc34 100644
--- a/src/BuildUtil/CodeSign.cs
+++ b/src/BuildUtil/CodeSign.cs
@@ -260,16 +260,19 @@ namespace BuildUtil
{
int cert_id = UsingCertId;
- SignFile(destFileName, srcFileName, comment, kernelModeDriver, cert_id);
+ SignFile(destFileName, srcFileName, comment, kernelModeDriver, cert_id, 0);
}
- public static void SignFile(string destFileName, string srcFileName, string comment, bool kernelModeDriver, int cert_id)
+ public static void SignFile(string destFileName, string srcFileName, string comment, bool kernelModeDriver, int cert_id, int sha_mode)
{
#if !BU_OSS
+ if (cert_id == 0)
+ {
+ cert_id = UsingCertId;
+ }
+
Con.WriteLine("Signing for '{0}'...", Path.GetFileName(destFileName));
byte[] srcData = File.ReadAllBytes(srcFileName);
- int sha_mode = 0;
-
if (srcFileName.EndsWith(".msi", StringComparison.InvariantCultureIgnoreCase))
{
sha_mode = 1;
diff --git a/src/BuildUtil/Win32BuildUtil.cs b/src/BuildUtil/Win32BuildUtil.cs
index 4766684c..54f987a6 100644
--- a/src/BuildUtil/Win32BuildUtil.cs
+++ b/src/BuildUtil/Win32BuildUtil.cs
@@ -1249,7 +1249,7 @@ namespace BuildUtil
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Neo6_Win10\x86\Neo6_x86_" + name + ".inf"),
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo6\x86\Neo6_x86.inf")), build, version, date, sys_name, name, string.Format("Neo6_x86_{0}.cat", name), true), Str.ShiftJisEncoding, false);
cat_src_filename.Add("Neo6_x86_" + name + ".inf");
- IO.FileCopy(Path.Combine(src_dir, @"Neo6\x86\Neo6_x86.sys"), Path.Combine(dst_dir, @"Neo6_Win10\x86\Neo6_x86_" + name + ".sys"));
+ IO.FileCopy(Path.Combine(src_dir, @"Neo6\x86\Neo6_x86_win10.sys"), Path.Combine(dst_dir, @"Neo6_Win10\x86\Neo6_x86_" + name + ".sys"));
make_cat_file(Path.Combine(dst_dir, @"Neo6_Win10\x86"), cat_src_filename.ToArray(), "Neo6_x86_" + name + ".cat", true, true);
}
@@ -1268,7 +1268,7 @@ namespace BuildUtil
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Neo6_Win10\x64\Neo6_x64_" + name + ".inf"),
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo6\x64\Neo6_x64.inf")), build, version, date, sys_name, name, string.Format("Neo6_x64_{0}.cat", name), true), Str.ShiftJisEncoding, false);
cat_src_filename.Add("Neo6_x64_" + name + ".inf");
- IO.FileCopy(Path.Combine(src_dir, @"Neo6\x64\Neo6_x64.sys"), Path.Combine(dst_dir, @"Neo6_Win10\x64\Neo6_x64_" + name + ".sys"));
+ IO.FileCopy(Path.Combine(src_dir, @"Neo6\x64\Neo6_x64_win10.sys"), Path.Combine(dst_dir, @"Neo6_Win10\x64\Neo6_x64_" + name + ".sys"));
make_cat_file(Path.Combine(dst_dir, @"Neo6_Win10\x64"), cat_src_filename.ToArray(), "Neo6_x64_" + name + ".cat", true, true);
}
@@ -1303,7 +1303,7 @@ namespace BuildUtil
cat_src_filename.Add("SeLow_x86.inf");
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"SeLow_Win10\x86\SeLow_x86.inf"),
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"SeLow\x86\SeLow_x86.inf")), build, version, date, null, null, "SeLow_Win10_x86.cat", false), Str.ShiftJisEncoding, false);
- IO.FileCopy(Path.Combine(src_dir, @"SeLow\x86\SeLow_x86.sys"), Path.Combine(dst_dir, @"SeLow_Win10\x86\SeLow_x86.sys"));
+ IO.FileCopy(Path.Combine(src_dir, @"SeLow\x86\SeLow_x86_win10.sys"), Path.Combine(dst_dir, @"SeLow_Win10\x86\SeLow_x86.sys"));
make_cat_file(Path.Combine(dst_dir, @"SeLow_Win10\x86"), cat_src_filename.ToArray(), "SeLow_Win10_x86.cat", true, false);
// SeLow x64 for Windows 10
@@ -1313,7 +1313,7 @@ namespace BuildUtil
cat_src_filename.Add("SeLow_x64.inf");
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"SeLow_Win10\x64\SeLow_x64.inf"),
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"SeLow\x64\SeLow_x64.inf")), build, version, date, null, null, "SeLow_Win10_x64.cat", false), Str.ShiftJisEncoding, false);
- IO.FileCopy(Path.Combine(src_dir, @"SeLow\x64\SeLow_x64.sys"), Path.Combine(dst_dir, @"SeLow_Win10\x64\SeLow_x64.sys"));
+ IO.FileCopy(Path.Combine(src_dir, @"SeLow\x64\SeLow_x64_win10.sys"), Path.Combine(dst_dir, @"SeLow_Win10\x64\SeLow_x64.sys"));
make_cat_file(Path.Combine(dst_dir, @"SeLow_Win10\x64"), cat_src_filename.ToArray(), "SeLow_Win10_x64.cat", true, false);
// Wfp x86
@@ -1345,7 +1345,7 @@ namespace BuildUtil
cat_src_filename.Add("pxwfp_x86.inf");
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Wfp_Win10\x86\pxwfp_x86.inf"),
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Wfp\x86\pxwfp_x86.inf")), build, version, date, null, null, "pxwfp_Win10_x86.cat", false), Str.ShiftJisEncoding, false);
- IO.FileCopy(Path.Combine(src_dir, @"Wfp\x86\pxwfp_x86.sys"), Path.Combine(dst_dir, @"Wfp_Win10\x86\pxwfp_x86.sys"));
+ IO.FileCopy(Path.Combine(src_dir, @"Wfp\x86\pxwfp_x86_win10.sys"), Path.Combine(dst_dir, @"Wfp_Win10\x86\pxwfp_x86.sys"));
make_cat_file(Path.Combine(dst_dir, @"Wfp_Win10\x86"), cat_src_filename.ToArray(), "pxwfp_Win10_x86.cat", true, false);
// Wfp x64 for Windows 10
@@ -1355,7 +1355,7 @@ namespace BuildUtil
cat_src_filename.Add("pxwfp_x64.inf");
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Wfp_Win10\x64\pxwfp_x64.inf"),
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Wfp\x64\pxwfp_x64.inf")), build, version, date, null, null, "pxwfp_Win10_x64.cat", false), Str.ShiftJisEncoding, false);
- IO.FileCopy(Path.Combine(src_dir, @"Wfp\x64\pxwfp_x64.sys"), Path.Combine(dst_dir, @"Wfp_Win10\x64\pxwfp_x64.sys"));
+ IO.FileCopy(Path.Combine(src_dir, @"Wfp\x64\pxwfp_x64_win10.sys"), Path.Combine(dst_dir, @"Wfp_Win10\x64\pxwfp_x64.sys"));
make_cat_file(Path.Combine(dst_dir, @"Wfp_Win10\x64"), cat_src_filename.ToArray(), "pxwfp_Win10_x64.cat", true, false);
string tmp_body = IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, "make_whql_submission.cm_"));