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

JSign Tool Signing

JSign is a versatile, platform-independent tool used for code signing of Windows executable files, installers, and scripts.

For Linux - Ubuntu

To perform Signing using JSign Tool and our PKCS11 Wrapper in Linux (Ubuntu) machine, you would need to follow the below steps:

  • Go to EC CodeSign Secure’s v3.02’s Signing Tools section and download the PKCS11 Wrapper for Ubuntu.

    PKCS11 Wrapper Linux

  • After that, generate a P12 Authentication certificate from the System Setup > User > Generate Authentication Certificate dropdown.

    Authentication Certificate

  • Go to your Ubuntu client system and edit the configuration files (ec_pkcs11client.ini and pkcs11properties.cfg) downloaded in the PKCS11 Wrapper.

    APK configuration setup Linux

    NOTE: When using Luna HSM, add the slot number in the pkcs11properties.cfg file as shown below:

    Configuration setup Linux in Luna

  • Now we need to add the environment variable for the pkcs11 client library.

    Run the below command to open the bashrc file:

    nano ~/.bashrc
                      

    Open Nano File

    Now add the EC_INI_FILE_PATH variable with the path of the .ini at the end of the bashrc file, like:

    export EC_INI_FILE_PATH=/home/administrator/PKCS11_Wrapper-Ubuntu/ec_pkcs11client.ini
                      

    Set Variable

    Press Ctrl+X, then enter Y, and then press Enter to save.

    Reload the environment variables

    source ~/.bashrc
                      

    Reload Nano File

    Check whether the variable has been set correctly

    echo $EC_INI_FILE_PATH
                      

    Check Variable

    NOTE: If you can't see the file location from echo commands, open a new terminal and try again.

  • Now, you will need to download the latest version of JSign tool (DEB package) in your ubuntu machine using this link.

    Downloading JSign in Ubuntu

    Downloading JSign in Ubuntu

  • Install the debian package using the below command:

    sudo dpkg --install jsign_7.0_all.deb
                      

    Installing JSign in Ubuntu

  • To check whether JSign has been properly installed or not, run the following command:

    jsign
                      

    Check JSign in Ubuntu

  • You will also need to install Java (Java 17 or lower) on your Ubuntu machine for JSign to work with our PKCS11 Wrapper.

    Run the following command to install Java 17 on your Ubuntu machine

    sudo apt install openjdk-17-jdk
                      

    Install JAVA17

  • To use Java 17, you will need to set it as the active version.

    sudo update-alternatives --config java
                      

    Set JAVA17

  • Now to check whether Java has been installed properly or not, run:

    java -version
                      

    Check JAVA17

  • You would also need to install some other pre-requisite packages to perform signing using JSign.
    • sudo apt-get install curl
    • sudo apt-get install liblog4cxx-dev
    • sudo apt-get install liblog4cxx12

    NOTE: If "sudo apt-get install liblog4cxx12" command gives error, run the following steps to install this package

    For amd architecture:

    • wget http://archive.ubuntu.com/ubuntu/pool/universe/l/log4cxx/liblog4cxx12_0.12.1-4_amd64.deb
    • sudo dpkg -i liblog4cxx12_0.12.1-4_amd64.deb

    For arm architecture:

    • wget http://ports.ubuntu.com/pool/universe/l/log4cxx/liblog4cxx12_0.12.1-4_arm64.deb
    • sudo dpkg -i liblog4cxx12_0.12.1-4_arm64.deb

    We are now ready with our Ubuntu environment to perform the signing using JSign tool and PKCS11 Wrapper

    Signing

    For Signing, change the working directory of the terminal to that folder which contains your "ec_pkcs11client.ini" file.


    Change Working Directory

    Now, run the signing command from this directory.

    <Path of JSign tool> --keystore <Path of pkcs11properties.cfg> --storepass NONE --storetype PKCS11 --alias <Key alias of the signing certificate> <Path of the file to be signed>
                    

    A sample command is provided below:

    jsign --keystore pkcs11properties.cfg --storepass NONE --storetype PKCS11 --alias EC-Cert-020 build_project.ps1
                    

    Signing using JSign

    NOTE: There is no verification command for JSign tool.

For MacOS

To perform Signing using JSign Tool and our PKCS11 Wrapper in MacOS machine, you would need to follow the below steps:

  • Download our PKCS11 Wrapper Tool from CodeSign Secure portal in the Signing Tools section in your MacOS.
  • PKCS11 Wrapper MAC

  • Go to your PKCS11 Wrapper directory (../PKCS11_Wrapper-Mac) and update the "pkcs11properties.cfg" and "ec_pkcs11client.ini" with the required details.

  • For "pkcs11properties.cfg", update the library path.

    NOTE: When using Luna HSM, add the slot number in the pkcs11properties.cfg file as shown below:

    Configuration setup in Luna

    For "ec_pkcs11client.ini" file, update the following fields:

    1. name - provide the path location of the Log xml file you downloaded with the PKCS11 Wrapper tool. (EC_PKCS11_CLIENT-LogConfig.xml)
    2. url - verify the server url of your CodeSign Secure portal.
    3. username - provide the username of CodeSign Secure account
    4. passcode - provide the secret passcode which was used to setup CodeSign Secure portal
    5. path - Provide the path location of your SSL Authentication certificate.
    6. passwd - Provide the password of your SSL Authentication certificate.
      • NOTE: To create the SSL Auth Certificate, go to the CodeSign Secure Portal -> System Setup -> User. From the right drop down, select the "Generate Authentication Certificate" option.

      Generate Authentication Certificate


  • The initialization and configuration files should look like this with all the correct file paths and settings.

  • PKCS11 Initialization MAC

  • You will also need to install Java (Java 17 or lower) on your MacOS machine for JSign to work with our PKCS11 Wrapper.

    To install Java 17 on your MacOS machine, run the following command:

    brew install openjdk@17
                      
  • Find the location where Java 17 is installed on your machine:

    brew info openjdk@17
                      
  • Now set Java 17 as the active version.

    For Zsh: nano ~/.zshrc

    For Bash: nano ~/.bash_profile

    After running the above command, add these lines:

    1. export PATH=<Path of Java 17 bin folder>:$PATH
    2. export JAVA_HOME=<Path of Java 17 bin folder>

    Bash Profile MAC

  • Reload the environment variables using the below commands:

    For Zsh: source ~/.zshrc

    For Bash: source ~/.bash_profile

  • You would also need to install some other pre-requisite packages to perform signing using JSign.
    • brew install log4cxx
    • brew install curl

  • Now, you will need to download the latest version of JSign tool (JAR package) in your MacOS machine using this link.

    Downloading JSign in MacOS

  • To check whether JSign has been properly installed or not, run the following command:

    java -jar <Path of JSign Jar Package>
                      
  • We are now ready with our MacOS environment to perform the signing using JSign tool and PKCS11 Wrapper

    Signing

    For Signing, change the working directory of the terminal to that folder which contains your "ec_pkcs11client.ini" file.

    Now, run the signing command from this directory.

    java -jar <Path of JSign tool> --keystore <Path of pkcs11properties.cfg> --storepass NONE --storetype PKCS11 --alias <Key alias of the signing certificate> <Path of the file to be signed>
                    

    A sample command is provided below:

    java -jar jsign-7.0.jar --keystore pkcs11properties.cfg --storepass NONE --storetype PKCS11 --alias EC-Cert-020 build_project.ps1
                    

    Signing using JSign

    NOTE: There is no verification command for JSign tool.

For Windows

To perform signing using JSign Tool and our PKCS11 Wrapper in Windows machine, you would need to follow the below steps:

  • Go to EC CodeSign Secure’s v3.02’s Signing Tools section and download the PKCS11 Wrapper for Windows.

    PKCS Wrapper Windows

  • After that, generate a P12 Authentication certificate from the System Setup > User > Generate Authentication Certificate dropdown.

    Authentication Certificate

  • Go to your Windows client system and edit the configuration files (ec_pkcs11client.ini and pkcs11properties.cfg) downloaded in the PKCS11 Wrapper.

    APK configuration setup Windows

    APK configuration setup Windows

    APK configuration setup Windows

    NOTE: When using Luna HSM, add the slot number in the pkcs11properties.cfg file as shown below:

    Configuration setup in Luna

  • Now, let’s install some prerequisites in your client system to run the PKCS11 Wrapper.

    NOTE: Windows requires Java 22, unlike the Linux and macOS tracks above which use Java 17 or lower.

    • Install Java 22 from Oracle’s official site, and follow the instructions in the msi file.

      Install JDK 22 on Windows

      Install JDK 22 on Windows

      Install JDK 22 on Windows

    • Set Java 22 as the active version by storing the bin path in the PATH variable.

      APK Set JDK 22 on Windows

  • Now, you will need to download the latest version of JSign tool (JAR package) in your Windows machine using this link.

    Downloading JSign in Windows

  • To check whether JSign has been properly installed or not, run the following command:

    java -jar <Path of JSign Jar Package>
                      
  • We are now ready with our Windows environment to perform the signing using JSign tool and PKCS11 Wrapper

    Signing

    For Signing, change the working directory of the terminal to that folder which contains your "ec_pkcs11client.ini" file.


    Change Working Directory

    Now, run the signing command from this directory.

    java -jar <Path of JSign tool> --keystore <Path of pkcs11properties.cfg> --storepass NONE --storetype PKCS11 --alias <Key alias of the signing certificate> <Path of the file to be signed>
                    

    A sample command is provided below:

    java -jar jsign-7.0.jar --keystore pkcs11properties.cfg --storepass NONE --storetype PKCS11 --alias EC-Cert-020 build_project.ps1
                    

    Signing using JSign

    NOTE: There is no verification command for JSign tool.

On this Page:
Support Privacy Policy Terms of Service

Copyright Encryption Consulting LLC. All rights reserved.