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

Jar Signing

This section details how to sign jar files using the JarSigner tool. Java must be installed for it to work. You can download and install Java from https://www.oracle.com/java/technologies/downloads.

We need to install the Signed certificate from CodeSignSecure platform in the Certificate Manager of your system.

  1. Click on the certificate from CodeSignSecure and then click on Install Certificate.

    Certificate Wizard

  2. Select “Current User” and click Next.

    Certificate Wizard

  3. Select “Place all certificates in the following store”.

    Certificate Store

  4. Click on Browse and select Personal. Then click Next.

    Personal Certificate Store

  5. Click Finish on “Completing the Certificate Import Wizard”.

    Personal Certificate Store

  6. The certificate will be successfully imported

    Successfull Certificate Import

After importing the certificate, we need to assign it a private key

  1. From Start, search “certmgr.msc”

    Cert Manager

  2. Click Personal and then click Certificates

    Cert Manager Personal Certificates

  3. You would be able to see your installed certificate. Click on the certificate and go to Details tab.

    Certificate Detail

  4. Copy the thumbprint of this certificate

    Certificate Thumbprint

  5. Open CMD and run this command. Modify the command with the thumbprint of your certificate.

    certutil -f -repairstore -csp "Encryption Consulting Key Storage Provider" -user "My" <thumbprint>

    Thumbprint Command

After successfully running the above command, we can now use this certificate for signing the files.

  • Navigate to Java's jdk installation and go inside the bin folder (usually located at C:\Program Files\Java\jdk-20\bin). There you will find JarSigner application “jarsigner.exe”.

  • You can drag the application to command line to get its path or simply navigate to that folder using the cmd.

  • In cmd, we will first specify our store type, we are doing so by using -storetype Windows-My. This is where our KSP comes into play.

  • Specify signing algorithm with: -sigalg SHA256withRSA. You can use whichever signing algorithm you choose.

  • Specify Time Stamp Server: -tsa http://timestamp.digicert.com

  • Specify the Jar File you wish to sign.

  • Specify the "Issued to" name of the certificate.

    Certificate Issued To Name

Altogether the command somewhat looks like the following. This needs to be executed from the directory where JarSigner Application is located.

<Enter jarsigner.exe file path> -storetype Windows-My -sigalg SHA256withRSA -tsa http://timestamp.digicert.com C:\Users\ja785\Desktop\test.jar "<Enter Issued to Name>"

Jar Signing with codesign secure kSP

We can run Jar Signer verifier to check if the Jar files has been signed or not.

It is done in the same directory as that of signer and with the command below.

jarsigner -verify -verbose <path to the signed jar file>

Jar Signer verifier

On this Page:
Support Privacy Policy Terms of Service

Copyright Encryption Consulting LLC. All rights reserved.