Skip to content

Commit

Permalink
Fully replace [Content_Types].xml in signed APPX files
Browse files Browse the repository at this point in the history
  • Loading branch information
ebourg committed Jun 11, 2024
1 parent 5638169 commit 7117d6c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ See https://ebourg.github.io/jsign for more information.
* RSA 4096 keys are supported with the `PIV` storetype (for Yubikeys with firmware version 5.7 or higher)
* Certificates using an Ed25519 or Ed448 key are now supported (experimental)
* The APPX/MSIX bundles are now signed with the correct Authenticode UUID
* The signed APPX/MSIX files no longer contain a `[Content_Types].old` entry
* The error message displayed when the password of a PKCS#12 keystore is missing has been fixed
* The log4j configuration warning displayed when signing a MSI file has been fixed (contributed by Pascal Davoust)
* The value of the `storetype` parameter is now case insensitive
Expand Down
2 changes: 1 addition & 1 deletion jsign-core/src/main/java/net/jsign/appx/APPXFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ void addContentType(String partName, String contentType) throws IOException {
if (!contentTypes.contains(override)) {
contentTypes = contentTypes.replace("</Types>", "<Override PartName=\"" + partName + "\" ContentType=\"" + contentType + "\"/></Types>");

renameEntry("[Content_Types].xml", "[Content_Types].old");
removeEntry("[Content_Types].xml");
addEntry("[Content_Types].xml", contentTypes.getBytes(), true);
}
}
Expand Down

0 comments on commit 7117d6c

Please sign in to comment.