Azure Trusted Signing | CodeSign | InnoSetup | Docker | jsign
Are you distributing Windows Software outside of the Microsoft Store? For your users best experience and confidence, your applications should shipped as a windows installer and be codesigned.
This example shows how to codesign using
- Azure Trusted Signing
- a codesigning certificate
.pfx
Codesigning is using jsign in a Docker Container jotools/codesign. This allows codesigning to be performed on a host machine running on either Windows, macOS or Linux.
-
Set up Codesigning with one of the following
- Azure Trusted Signing
To get you started have a look at the included docs.
You'll find some useful links and archived Web content there. - Codesign certificate
.pfx
- Azure Trusted Signing
-
Codesigning
.jsonconfiguration files -
Have Docker up and running
This example shows how build a (codesigned) windows installer using InnoSetup.
Creating the windows installer is being done in a Docker Container jotools/innosetup. This allows creating the windows installer on a host machine running on either Windows, macOS or Linux.
- Optional: Set up Codesigning
- Have Docker up and running
While the included example project is written with Xojo you can use this approach with any other development environment.
Please refer to the Documentation for the provided Docker Image jotools/codesign. It includes information about how to set it all up, along with a codesigning example.
Please refer to the Documentation for the provided Docker Image jotools/innosetup. It includes information about how to set it all up, along with an example to create a (codesigned) Windows installer.
This repository includes a Xojo Example Project ATS CodeSign InnoSetup.xojo_project which uses
- a Post Build Script
CodeSignto codesign the Windows builds using Azure Trusted Signing (or a codesign certificate.pfx)- using the Docker Container
jotools/codesignto perform the codesigning using jsign
- using the Docker Container
- a Post Build Script
CreateZIPto package the built and codesigned application in a.zip - a Post Build Script
InnoSetupto build a (codesigned) windows installer- using the Docker Container
jotools/innosetupto create the windows installer with InnoSetup
- using the Docker Container
This allows the Windows application to be built and codesigned with the Xojo IDE running on all Windows, macOS or Linux.
Xojo Example Project: ATS CodeSign | InnoSetup | Docker

Code Signature (Codesigned with Xojo IDE running on macOS)

Codesigned Windows Installer (Created and codesigned with Xojo IDE running on macOS)

Xojo is a rapid application development for Desktop, Web, Mobile & Raspberry Pi.
The Desktop application Xojo example project ATS CodeSign InnoSetup.xojo_project and its Post Build Scripts are using:
- Xojo 2025r1.1
- API 2
CodeSign (Azure Trusted Signing | PFX)
- Set up the local configuration files for CodeSign.
The Post Build Script(s) expect the following.jsonconfiguration file(s): - Create a Post Build Script in your project and copy-and-paste the example Post Build Script
CodeSignprovided inATS CodeSign InnoSetup.xojo_project - Make sure the Post Build Script
CodeSignruns after the Step 'Windows: Build' - Read the comments in the provided Post Build Script, modify it according to your needs
The default settings are:- use the Docker Container
jotools/codesign- if you're using the
InnoSetupstep as well, then change it to use the Docker Containerjotools/innosetupso that you don't need having two different Docker Images taking up space on your machine
- if you're using the
- Codesign Final and Beta Builds
- no Codesigning for Alpha- and Development Builds
- Codesign all
.exeand.dllfiles for Final Builds- Codesign just all
.exe, but not the.dllfiles for Beta/Alpha/Development Builds
- Codesign just all
- use the Docker Container
CreateZIP
- Create a Post Build Script in your project and copy-and-paste the example Post Build Script
CreateZIPprovided inATS CodeSign InnoSetup.xojo_project - Make sure this Post Build Script runs after the Step 'Windows: Build' (and after
AzureTrustedSigningto ensure you zip the codesigned application) - Read the comments in the provided Post Build Script, modify it according to your needs
InnoSetup
- Copy the folder and file
_build/innosetup_universal.issto your project location- this is a universal InnoSetup script which should fit basic Xojo built applications
- it's prepared for all Windows Build Targets (WIN32, WIN64, ARM64)
- it uses parameters so that it can be configured from within the Post Build Script
- or use your own InnoSetup script
- this is a universal InnoSetup script which should fit basic Xojo built applications
- Optional (only if you want to codesign the Windows Installers):
Set up the local configuration files for CodeSign.
The Post Build Script(s) expect the following.jsonconfiguration file(s): - Create a Post Build Script in your project and copy-and-paste the example Post Build Script
InnoSetupprovided inATS CodeSign InnoSetup.xojo_project - Make sure this Post Build Script runs after the Step 'Windows: Build' (and after
CodeSignto ensure you include the codesigned application in the windows installer) - Read the comments in the provided Post Build Script, modify it according to your needs, e.g.:
- change the value of
sAPP_PUBLISHER_URLto your own website - change the value of
bCODESIGN_ENABLEDtoFalseif you want to create a Windows Installer without CodeSigning. If this value isTrue, the Post Build Script will expect Codesigning to be available and print an Information Message if it's configuration is not found.
- change the value of
- The example Post Build Script is designed to be quite generic and using the provided Universal InnoSetup Script will:
- use the Docker Container
jotools/innosetup - create a Windows Installer for Final and Beta Builds
- no Windows Installer for Alpha- and Development Builds
- pick up necessary information from the Xojo Project (so make sure you've filled out the values in the Xojo IDE under 'Build Settings: Windows), e.g.
App.ProductName,App.CompanyName- Filename of the application's
.exe
- pick up the configuration of
CodeSign(ifbCODESIGN_ENABLED = True)- if available, it codesigns the (Un)Installer
- if not found, it outputs an Info, proceeds with ignoring codesigning and just creates an installer
- use the Docker Container
The Post Build Scripts in the example project are intended as an example to demonstrate the functionality. They allow to retrieve sensitive information (such as a Client Secret or Certificate Password) from a plaintext .json configuration file, which is not secure.
However, the provided Post Build Scripts also support retrieving credentials from a Secret Storage and run the Docker Container with the corresponding Environment Variables, omitting the secrets in the .json configuration files. It's highly recommended to use that approach.
If using similar logic in a production environment, make sure to implement a secure method for managing secrets to protect sensitive information.
Security Risks
Storing secrets in plaintext files poses significant security risks, including:
- Exposure to unauthorized users if file permissions are not properly set.
- Inclusion in backups or version control (e.g., Git), leading to unintentional leaks.
- Easy access for malware or attackers on a compromised system.
Secure Alternatives
Instead of storing secrets in a .json configuration file, consider these more secure approaches:
-
Use OS-Level Secret Storage
- macOS: Store secrets in Keychain Access and retrieve them using the
securityCLI tool. - Linux: Use GNOME Keyring or KWallet to securely store and retrieve secrets.
- Windows: Store credentials in Windows Credential Manager and access them via PowerShell.
- macOS: Store secrets in Keychain Access and retrieve them using the
-
Use a Secrets Manager
- Cloud providers like AWS Secrets Manager, Azure Key Vault, or GCP Secret Manager offer secure, centralized secret storage with access control.
- Local alternatives like 1Password CLI, Bitwarden CLI, or HashiCorp Vault allow secure retrieval of secrets at runtime.
Juerg Otter is a long term user of Xojo and working for CM Informatik AG. Their Application CMI LehrerOffice is a Xojo Design Award Winner 2018. In his leisure time Juerg provides some bits and pieces for Xojo Developers.
Do you like this project? Does it help you? Has it saved you time and money?
You're welcome - it's free... If you want to say thanks I'd appreciate a message or a small donation via PayPal.