CodeSign Secure Documentation
  • Overview
    • About CodeSign Secure
    • Getting Started
    • Documentation Guide
    • Portal Overview
    • Troubleshooting
      • FAQ
    • Glossary
  • Reference Guide
    • Header Bar
      • CodeSign Secure Documentation
      • Swagger API
      • Profile Section
    • Dashboard
      • Key Performance Indicators
      • Issued Certificates
      • Signatures Generated
      • HSM Health Check
    • Keys and Certificates
      • Key and Certificate Lifecycle
    • App Management
    • Signing Requests
      • Approval Workflows
    • Signing Tools
    • Reports
      • Signing Request Report
      • Audit Trail
      • Certificate Report
      • Client Report
    • Logs
    • System Setup
      • Identity Store
      • Backup
      • User
      • Roles and Permissions
      • Email
      • Signing Projects
      • SSL/TLS Management
      • Environment
      • Plugins
  • Setup & Architecture
    • Identity and Access Control
    • Architecture and Concepts
    • Installation
      • Windows
        • Installing the Server
        • Ports and Protocols
        • High Availability and Backup
        • Upgrades and Compatibility
    • Security
      • Security Hardening Checklist
      • Client Authentication
      • Designing Signing Policies
  • Release Notes
    • Releases for 2026
      • v3.2.1
    • Releases for 2025
      • v3.2.0
    • Releases for 2024
      • v3.1.0
  • API Reference
    • Getting Started
    • Authorizing Requests
    • Securing API Access
    • Request and Response Conventions
    • Endpoint Reference
      • Signing
      • Signing Requests
      • Certificates
      • Applications and Environments
      • User Management
      • Permissions
      • Email
      • System Setup
      • Reports
      • Dashboard
      • License
  • Integration Guides
    • Signing Capabilities
      • Supported Formats and Platforms
      • Timestamping
      • Windows Signing - SignTool
        • Signing
        • Macro Signing
      • Apple Signing
      • AppX & MSIX Signing
      • Visual Studio ClickOnce
      • Jar Signing
      • Sign HLK/HCK using CodeSign Secure
      • NuGet Signing
      • Mage Signing
      • Sign OVA/OVF using Encryption Consulting’s Utility Tool
      • Utility Tool for code signing
      • Container Signing
      • PKCS11 Wrapper
        • APK Signing
        • OpenSSL Signing
        • XML Signing
        • JSign Tool Signing
        • Jarsigner Signing
        • GPG2, Debian & RPM Signing
      • Reproducible Build
        • Automated Hash Validation
        • Reproducible Build Process Flow
        • Pipeline Script Components
        • Hash Validation
    • CI/CD Integration
      • GitHub Actions
      • Jenkins
      • GitLab
      • Azure DevOps
      • TeamCity
      • Bamboo
      • Securing CI/CD Credentials

Appx and Msix Signing

  1. Signing Appx and Msix files can be done using the Windows Signtool which comes along the Windows SDK setup.

    Microsoft Windows SDK includes an executable named “makeappx.exe” located in the "C:\Program Files (x86)\Windows Kits\10\bin<build number><architecture>\makeappx.exe" directory.

    If you are not able to see the "makeappx.exe" file, you would need to re-configure your Windows SDK with the following settings.

    Signtool Configuration
  2. Here we are using the example of an Appx File. Similar steps can be followed for Msix files as well. Use the command prompt to run the following command:

    "C:\Program Files (x86)\Windows Kits\10\bin\<build number>\<architecture>\makeappx.exe" unpack /p “<the path to your .appx file>” /d “<Your desired new target directory>"

    Unpack Command Output
  3. Now locate the certificate you wish to use for signing. The certificate must have the .pem extension. You can change the extension by renaming the certificate.

    Renaming Certificate
  4. Navigate to the target directory specified in the previous command and find the file AppxManifest.xml. Inside, two lines must be modified.

    appxmanifest.xml File
  5. Replace the Publisher line in the AppxManifest.xml with the subject line from the .pem certificate as shown below:

    Certificate Subject Line in .pem

    If you can see the content in .pem format, you can open the certificate in .crt format, open details section and look at the subject field.

    Certificate Subject Line in .crt

    The final AppxManifest.xml file line should look similar to the signing certificate.

    Replacing Subject Line

    The subject line may be in reverse order depending on your settings and certificate. To check, see if the Publisher line in AppxManifest.xml file begins with CN as the first entry. If it does not, make sure the order is switched such that it does.

    Check that the Publisher line in the AppxManifest.xml file contains S instead of ST, if you see ST as a field, replace it with S.

  6. Replace the PublisherDisplayName line with your organization's name if it is currently incorrect.

    Replacing Publisher Name
  7. Repack the file using the following command:

    "C:\Program Files (x86)\Windows Kits\10\bin\<build number>\<architecture>\makeappx.exe" pack /d “<target directory>” /p “<target location with package name and extension(.appx)>”

    Repack Appx File
  8. View the file properties, and confirm “read only” is NOT checked or the signing will fail.

    Read Only Property
  9. Proceed with Windows signing using the .crt certificate you used to modify the manifest and the following signtool command:

    signtool sign /csp "Encryption Consulting Key Storage Provider" /kc <key name of private key associated with the certificate> /fd <the desired signing algorithm to be used when signing> /f <The location of the certificate to be used for signing>.crt /tr <The URL of the time stamping server to be used> /td <The signing algorithm to be used with the time stamping server> <The path to the new .appx file>

    An example command is as below:

    signtool sign /csp "Encryption Consulting Key Storage provider" /kc "DemoCert1" /fd "SHA256" /f "C:\Users\riley\Desktop\demo files\Signing Certificates\DemoCert1.crt" /tr http://timestamp.digicert.com /td SHA256 "C:\Users\riley\Desktop\demo files\Test Files\HelloWorld-new.appx"

    Signing Appx File command

    A successful signing will show an output as below:

    Signing Appx File Success
  10. To verify the signed package, run:

    signtool verify /pa "<The path to the signed .appx file>"

    NOTE: If installing the signed package fails, the most common cause is a mismatch between the signing certificate's Subject and the Publisher line in the package manifest — they must match exactly.

On this Page:
Support Privacy Policy Terms of Service

Copyright Encryption Consulting LLC. All rights reserved.