summaryrefslogtreecommitdiff
path: root/src/wixext
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2021-04-12 07:43:04 -0700
committerRob Mensching <rob@firegiant.com>2021-04-12 15:34:06 -0700
commita20bee47c43861dd9f38adb88e74a6417292732b (patch)
tree0e02edc74c989813e6e70fa4b7d5e29a003744de /src/wixext
parent7a855a54687d638c6717e3cf9bda1affc76f48ed (diff)
downloadwix-a20bee47c43861dd9f38adb88e74a6417292732b.tar.gz
wix-a20bee47c43861dd9f38adb88e74a6417292732b.tar.bz2
wix-a20bee47c43861dd9f38adb88e74a6417292732b.zip
Add Wix4 prefix Http CA binary and make HandleExisting an enum
Diffstat (limited to 'src/wixext')
-rw-r--r--src/wixext/HttpCompiler.cs8
-rw-r--r--src/wixext/HttpConstants.cs4
-rw-r--r--src/wixext/Symbols/HandleExisting.cs14
-rw-r--r--src/wixext/Symbols/WixHttpUrlReservationSymbol.cs6
4 files changed, 21 insertions, 11 deletions
diff --git a/src/wixext/HttpCompiler.cs b/src/wixext/HttpCompiler.cs
index e6246619..cb217147 100644
--- a/src/wixext/HttpCompiler.cs
+++ b/src/wixext/HttpCompiler.cs
@@ -72,7 +72,7 @@ namespace WixToolset.Http
72 { 72 {
73 var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); 73 var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node);
74 Identifier id = null; 74 Identifier id = null;
75 var handleExisting = HttpConstants.heReplace; 75 var handleExisting = HandleExisting.Replace;
76 string sddl = null; 76 string sddl = null;
77 string url = null; 77 string url = null;
78 var foundACE = false; 78 var foundACE = false;
@@ -91,13 +91,13 @@ namespace WixToolset.Http
91 switch (handleExistingValue) 91 switch (handleExistingValue)
92 { 92 {
93 case "replace": 93 case "replace":
94 handleExisting = HttpConstants.heReplace; 94 handleExisting = HandleExisting.Replace;
95 break; 95 break;
96 case "ignore": 96 case "ignore":
97 handleExisting = HttpConstants.heIgnore; 97 handleExisting = HandleExisting.Ignore;
98 break; 98 break;
99 case "fail": 99 case "fail":
100 handleExisting = HttpConstants.heFail; 100 handleExisting = HandleExisting.Fail;
101 break; 101 break;
102 default: 102 default:
103 this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "HandleExisting", handleExistingValue, "replace", "ignore", "fail")); 103 this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "HandleExisting", handleExistingValue, "replace", "ignore", "fail"));
diff --git a/src/wixext/HttpConstants.cs b/src/wixext/HttpConstants.cs
index 1c96f278..5fb42d86 100644
--- a/src/wixext/HttpConstants.cs
+++ b/src/wixext/HttpConstants.cs
@@ -11,9 +11,5 @@ namespace WixToolset.Http
11 public const int GENERIC_EXECUTE = 0x20000000; 11 public const int GENERIC_EXECUTE = 0x20000000;
12 public const int GENERIC_WRITE = 0x40000000; 12 public const int GENERIC_WRITE = 0x40000000;
13 13
14 // from wixhttpca.cpp
15 public const int heReplace = 0;
16 public const int heIgnore = 1;
17 public const int heFail = 2;
18 } 14 }
19} 15}
diff --git a/src/wixext/Symbols/HandleExisting.cs b/src/wixext/Symbols/HandleExisting.cs
new file mode 100644
index 00000000..0d70cebc
--- /dev/null
+++ b/src/wixext/Symbols/HandleExisting.cs
@@ -0,0 +1,14 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3namespace WixToolset.Http.Symbols
4{
5 /// <summary>
6 /// Must match constants in wixhttpca.cpp
7 /// </summary>
8 public enum HandleExisting
9 {
10 Replace = 0,
11 Ignore = 1,
12 Fail = 2,
13 }
14}
diff --git a/src/wixext/Symbols/WixHttpUrlReservationSymbol.cs b/src/wixext/Symbols/WixHttpUrlReservationSymbol.cs
index 4bdc2fee..4aa4a5da 100644
--- a/src/wixext/Symbols/WixHttpUrlReservationSymbol.cs
+++ b/src/wixext/Symbols/WixHttpUrlReservationSymbol.cs
@@ -44,10 +44,10 @@ namespace WixToolset.Http.Symbols
44 44
45 public IntermediateField this[WixHttpUrlReservationSymbolFields index] => this.Fields[(int)index]; 45 public IntermediateField this[WixHttpUrlReservationSymbolFields index] => this.Fields[(int)index];
46 46
47 public int HandleExisting 47 public HandleExisting HandleExisting
48 { 48 {
49 get => this.Fields[(int)WixHttpUrlReservationSymbolFields.HandleExisting].AsNumber(); 49 get => (HandleExisting)this.Fields[(int)WixHttpUrlReservationSymbolFields.HandleExisting].AsNumber();
50 set => this.Set((int)WixHttpUrlReservationSymbolFields.HandleExisting, value); 50 set => this.Set((int)WixHttpUrlReservationSymbolFields.HandleExisting, (int)value);
51 } 51 }
52 52
53 public string Sddl 53 public string Sddl