diff options
Diffstat (limited to 'src/WixToolset.Converters/WixConverter.cs')
-rw-r--r-- | src/WixToolset.Converters/WixConverter.cs | 42 |
1 files changed, 31 insertions, 11 deletions
diff --git a/src/WixToolset.Converters/WixConverter.cs b/src/WixToolset.Converters/WixConverter.cs index c78e2245..be3e6b70 100644 --- a/src/WixToolset.Converters/WixConverter.cs +++ b/src/WixToolset.Converters/WixConverter.cs | |||
@@ -44,6 +44,7 @@ namespace WixToolset.Converters | |||
44 | private static readonly XName BootstrapperApplicationDllElementName = WixNamespace + "BootstrapperApplicationDll"; | 44 | private static readonly XName BootstrapperApplicationDllElementName = WixNamespace + "BootstrapperApplicationDll"; |
45 | private static readonly XName BootstrapperApplicationRefElementName = WixNamespace + "BootstrapperApplicationRef"; | 45 | private static readonly XName BootstrapperApplicationRefElementName = WixNamespace + "BootstrapperApplicationRef"; |
46 | private static readonly XName EmbeddedChainerElementName = WixNamespace + "EmbeddedChainer"; | 46 | private static readonly XName EmbeddedChainerElementName = WixNamespace + "EmbeddedChainer"; |
47 | private static readonly XName CatalogElementName = WixNamespace + "Catalog"; | ||
47 | private static readonly XName ColumnElementName = WixNamespace + "Column"; | 48 | private static readonly XName ColumnElementName = WixNamespace + "Column"; |
48 | private static readonly XName ComponentElementName = WixNamespace + "Component"; | 49 | private static readonly XName ComponentElementName = WixNamespace + "Component"; |
49 | private static readonly XName ControlElementName = WixNamespace + "Control"; | 50 | private static readonly XName ControlElementName = WixNamespace + "Control"; |
@@ -71,6 +72,7 @@ namespace WixToolset.Converters | |||
71 | private static readonly XName ProgressTextElementName = WixNamespace + "ProgressText"; | 72 | private static readonly XName ProgressTextElementName = WixNamespace + "ProgressText"; |
72 | private static readonly XName PublishElementName = WixNamespace + "Publish"; | 73 | private static readonly XName PublishElementName = WixNamespace + "Publish"; |
73 | private static readonly XName MultiStringValueElementName = WixNamespace + "MultiStringValue"; | 74 | private static readonly XName MultiStringValueElementName = WixNamespace + "MultiStringValue"; |
75 | private static readonly XName RemotePayloadElementName = WixNamespace + "RemotePayload"; | ||
74 | private static readonly XName RequiredPrivilegeElementName = WixNamespace + "RequiredPrivilege"; | 76 | private static readonly XName RequiredPrivilegeElementName = WixNamespace + "RequiredPrivilege"; |
75 | private static readonly XName ServiceArgumentElementName = WixNamespace + "ServiceArgument"; | 77 | private static readonly XName ServiceArgumentElementName = WixNamespace + "ServiceArgument"; |
76 | private static readonly XName SetDirectoryElementName = WixNamespace + "SetDirectory"; | 78 | private static readonly XName SetDirectoryElementName = WixNamespace + "SetDirectory"; |
@@ -149,6 +151,7 @@ namespace WixToolset.Converters | |||
149 | { WixConverter.InstallExecuteSequenceElementName, this.ConvertSequenceElement }, | 151 | { WixConverter.InstallExecuteSequenceElementName, this.ConvertSequenceElement }, |
150 | { WixConverter.BootstrapperApplicationElementName, this.ConvertBootstrapperApplicationElement }, | 152 | { WixConverter.BootstrapperApplicationElementName, this.ConvertBootstrapperApplicationElement }, |
151 | { WixConverter.BootstrapperApplicationRefElementName, this.ConvertBootstrapperApplicationRefElement }, | 153 | { WixConverter.BootstrapperApplicationRefElementName, this.ConvertBootstrapperApplicationRefElement }, |
154 | { WixConverter.CatalogElementName, this.ConvertCatalogElement }, | ||
152 | { WixConverter.ColumnElementName, this.ConvertColumnElement }, | 155 | { WixConverter.ColumnElementName, this.ConvertColumnElement }, |
153 | { WixConverter.CustomTableElementName, this.ConvertCustomTableElement }, | 156 | { WixConverter.CustomTableElementName, this.ConvertCustomTableElement }, |
154 | { WixConverter.ControlElementName, this.ConvertControlElement }, | 157 | { WixConverter.ControlElementName, this.ConvertControlElement }, |
@@ -172,6 +175,7 @@ namespace WixToolset.Converters | |||
172 | { WixConverter.ProgressTextElementName, this.ConvertProgressTextElement }, | 175 | { WixConverter.ProgressTextElementName, this.ConvertProgressTextElement }, |
173 | { WixConverter.PublishElementName, this.ConvertPublishElement }, | 176 | { WixConverter.PublishElementName, this.ConvertPublishElement }, |
174 | { WixConverter.MultiStringValueElementName, this.ConvertMultiStringValueElement }, | 177 | { WixConverter.MultiStringValueElementName, this.ConvertMultiStringValueElement }, |
178 | { WixConverter.RemotePayloadElementName, this.ConvertRemotePayloadElement }, | ||
175 | { WixConverter.RequiredPrivilegeElementName, this.ConvertRequiredPrivilegeElement }, | 179 | { WixConverter.RequiredPrivilegeElementName, this.ConvertRequiredPrivilegeElement }, |
176 | { WixConverter.CustomActionElementName, this.ConvertCustomActionElement }, | 180 | { WixConverter.CustomActionElementName, this.ConvertCustomActionElement }, |
177 | { WixConverter.ServiceArgumentElementName, this.ConvertServiceArgumentElement }, | 181 | { WixConverter.ServiceArgumentElementName, this.ConvertServiceArgumentElement }, |
@@ -642,6 +646,14 @@ namespace WixToolset.Converters | |||
642 | } | 646 | } |
643 | } | 647 | } |
644 | 648 | ||
649 | private void ConvertCatalogElement(XElement element) | ||
650 | { | ||
651 | if (this.OnError(ConverterTestType.BundleSignatureValidationObsolete, element, "The Catalog element is obsolete. Signature validation is no longer supported. The elkement will be removed.")) | ||
652 | { | ||
653 | element.Remove(); | ||
654 | } | ||
655 | } | ||
656 | |||
645 | private void ConvertColumnElement(XElement element) | 657 | private void ConvertColumnElement(XElement element) |
646 | { | 658 | { |
647 | var category = element.Attribute("Category"); | 659 | var category = element.Attribute("Category"); |
@@ -1044,6 +1056,21 @@ namespace WixToolset.Converters | |||
1044 | 1056 | ||
1045 | private void ConvertMultiStringValueElement(XElement element) => this.ConvertInnerTextToAttribute(element, "Value"); | 1057 | private void ConvertMultiStringValueElement(XElement element) => this.ConvertInnerTextToAttribute(element, "Value"); |
1046 | 1058 | ||
1059 | private void ConvertRemotePayloadElement(XElement element) | ||
1060 | { | ||
1061 | RemoveIfPresent(element.Attribute("CertificatePublicKey")); | ||
1062 | RemoveIfPresent(element.Attribute("CertificateThumbprint")); | ||
1063 | |||
1064 | void RemoveIfPresent(XAttribute xAttribute) | ||
1065 | { | ||
1066 | if (null != xAttribute | ||
1067 | && this.OnError(ConverterTestType.BundleSignatureValidationObsolete, element, "The chain package element contains obsolete '{0}' attribute. Signature validation is no longer supported. The attribute will be removed.", xAttribute.Name)) | ||
1068 | { | ||
1069 | xAttribute.Remove(); | ||
1070 | } | ||
1071 | } | ||
1072 | } | ||
1073 | |||
1047 | private void ConvertRequiredPrivilegeElement(XElement element) => this.ConvertInnerTextToAttribute(element, "Name"); | 1074 | private void ConvertRequiredPrivilegeElement(XElement element) => this.ConvertInnerTextToAttribute(element, "Name"); |
1048 | 1075 | ||
1049 | private void ConvertRowElement(XElement element) => this.ConvertInnerTextToAttribute(element, "Value"); | 1076 | private void ConvertRowElement(XElement element) => this.ConvertInnerTextToAttribute(element, "Value"); |
@@ -1070,16 +1097,9 @@ namespace WixToolset.Converters | |||
1070 | { | 1097 | { |
1071 | var suppressSignatureValidation = element.Attribute("SuppressSignatureValidation"); | 1098 | var suppressSignatureValidation = element.Attribute("SuppressSignatureValidation"); |
1072 | 1099 | ||
1073 | if (null != suppressSignatureValidation) | 1100 | if (null != suppressSignatureValidation |
1101 | && this.OnError(ConverterTestType.BundleSignatureValidationObsolete, element, "The chain package element contains obsolete '{0}' attribute. Signature validation is no longer supported. The attribute will be removed.", suppressSignatureValidation.Name)) | ||
1074 | { | 1102 | { |
1075 | if (this.OnError(ConverterTestType.SuppressSignatureValidationDeprecated, element, "The chain package element contains deprecated '{0}' attribute. Use the 'EnableSignatureValidation' attribute instead.", suppressSignatureValidation.Name)) | ||
1076 | { | ||
1077 | if ("no" == suppressSignatureValidation.Value) | ||
1078 | { | ||
1079 | element.Add(new XAttribute("EnableSignatureValidation", "yes")); | ||
1080 | } | ||
1081 | } | ||
1082 | |||
1083 | suppressSignatureValidation.Remove(); | 1103 | suppressSignatureValidation.Remove(); |
1084 | } | 1104 | } |
1085 | } | 1105 | } |
@@ -1579,9 +1599,9 @@ namespace WixToolset.Converters | |||
1579 | AssignAnonymousFileId, | 1599 | AssignAnonymousFileId, |
1580 | 1600 | ||
1581 | /// <summary> | 1601 | /// <summary> |
1582 | /// SuppressSignatureValidation attribute is deprecated and replaced with EnableSignatureValidation. | 1602 | /// SuppressSignatureValidation attribute is obsolete and corresponding functionality removed. |
1583 | /// </summary> | 1603 | /// </summary> |
1584 | SuppressSignatureValidationDeprecated, | 1604 | BundleSignatureValidationObsolete, |
1585 | 1605 | ||
1586 | /// <summary> | 1606 | /// <summary> |
1587 | /// WixCA Binary/@Id has been renamed to UtilCA. | 1607 | /// WixCA Binary/@Id has been renamed to UtilCA. |