How to Troubleshoot Code Signing Errors

Diagnose code signing failures across Windows, Java, macOS and CI/CD by isolating the failing stage, checking certificate trust and key access, and verifying the final release artifact.

Find the failing stageSeparate signing, verification and application launch issues.
Use targeted checksMatch commands and fixes to the platform and error.
Verify before releasePublish only the exact artifact that passes verification.

Code signing errors can occur when signing software, verifying a digital signature, validating a certificate chain, or running a signed application on a target system. A failure may come from an expired certificate, an inaccessible private key, an invalid timestamp, a missing intermediate certificate, an unsupported signing algorithm, or a platform specific trust requirement.

The fastest way to troubleshoot a code signing error is to identify where the failure occurs, capture the exact error message, and verify the certificate, signature and signing environment separately. Replacing a certificate or repeating the signing command without identifying the cause can waste time and leave the underlying problem unresolved.

This guide covers a practical troubleshooting process for Windows Authenticode, Java JAR signing, macOS code signing and automated release pipelines.

Identify Where the Error Occurs

Start by identifying the stage at which the code signing process fails. This narrows the possible causes before you change certificates, permissions or signing settings.

Signing fails

Check key access

Review certificate selection, permissions, token or HSM connectivity, and signing tool configuration.

Verification fails

Check trust and integrity

Inspect file integrity, signature format, certificate chain, trust policy, revocation status and timestamp.

Application is blocked

Check platform policy

Review publisher identity, operating system security policy, reputation, notarization and packaging.

Before sharing logs: Keep the full error text, tool version, operating system, certificate details and command output. Redact passwords, private keys, access tokens and other secrets.

Common Code Signing Errors and Their Solutions

Error or symptomLikely causeWhat to check
No certificates were foundCertificate missing, unsuitable for signing, or unavailable to the toolCertificate store, key association and code signing usage
Access denied or private key unavailableInsufficient permissions, locked token, unavailable HSM or signing serviceKey permissions, device status and authentication
Certificate chain could not be builtMissing intermediate certificate or untrusted issuerCertificate chain and trust store
Certificate has expiredCertificate is outside its validity periodExpiry, timestamp and signing history
The signature is invalidFile changed after signing or signature data is damagedArtifact integrity and signature verification
Timestamp server errorTimestamp URL unavailable, unsupported protocol or request failureTimestamp endpoint, connectivity and digest algorithm
Unsupported digest or algorithmTool, policy or platform does not support the selected algorithmSigning tool version and algorithm settings
Unknown publisher warningSignature may be absent, invalid or untrusted, or reputation is insufficientSignature validity, publisher identity and platform reputation
CI/CD signing fails but local signing worksDifferent identity, certificate store, permissions or environmentPipeline credentials, agent configuration and service connectivity

Error wording varies by tool and platform. These are diagnostic categories, not exact messages guaranteed to appear in every environment.

Compare code signing certificate options

Choose a certificate based on your publisher identity, software platform and distribution needs.

Explore the certificate buying guide

Step by Step Code Signing Troubleshooting

Check the Certificate and Private Key

First, confirm that the certificate is available and associated with the correct private key.

  • The certificate is within its validity period.
  • The certificate includes the appropriate Code Signing Extended Key Usage where required.
  • The corresponding private key is available to the signing tool.
  • The certificate has not been revoked.
  • The token, HSM or cloud signing service is accessible.
  • The account running the signing process has permission to use the key.

On Windows, open the current user's personal certificate store with:

certmgr.msc

For machine level certificates, use the Certificates snap in for the local computer. A certificate visible to an interactive user may not be available to a CI/CD service running under another account.

Keep the key protected. Do not export or expose the private key just to test whether it works. Use the signing provider's supported diagnostic tools.

Verify the Certificate Chain

A code signing certificate is normally validated through a chain of certificates leading to a trusted root. A missing intermediate certificate, an untrusted root, or a revocation checking failure can cause verification problems.

  • Confirm the issuing intermediate certificate is available.
  • Check that the root certificate is trusted by the target system.
  • Confirm the certificate chain is valid for the intended use.
  • Check whether revocation services are reachable.
  • Verify that the machine's date and time are correct.

On Windows, open the certificate and inspect the Certification Path tab. Select each certificate in the chain and review its status. A chain that validates on the developer's machine may fail on another computer because the systems have different trust stores, network access or certificate policies.

Check Whether the File Changed After Signing

A signature can become invalid if signed content is modified afterward. This may happen when an executable is patched, an installer is rebuilt, or a packaging step modifies a signed artifact.

  1. Build the final software artifact.
  2. Complete modifications that must occur before signing.
  3. Sign the artifact.
  4. Apply a trusted timestamp where appropriate.
  5. Verify the signed artifact.
  6. Publish that exact verified artifact.

For nested applications, installers and packages, follow the platform's signing order and packaging requirements. Some formats require inner components to be signed before the outer package.

Installers and packaged releases can contain nested binaries with their own signing requirements, so the packaging sequence needs to preserve the signatures on each component. How to Sign Software Packages and Installers describes the signing considerations for nested files and packaged artifacts.

Troubleshoot Windows Authenticode Errors

Windows code signing commonly uses Authenticode and Microsoft's SignTool. The right diagnostic command depends on whether you are signing a file or verifying an existing signature.

Verify an Existing Signature

signtool verify /pa /v "MyApplication.exe"

The /pa option uses the default Authenticode verification policy, while /v requests verbose output.

For a Windows driver or another artifact governed by a specialized policy, use the verification policy appropriate to that artifact rather than assuming /pa covers every requirement.

Check the Signing Certificate

If you receive an error indicating that no suitable certificate was found, confirm that the certificate is installed in the expected certificate store and has access to its private key. If you use a hardware token, check that the device is connected, unlocked and supported by the required middleware. For an HSM or cloud signing service, verify connectivity and authentication separately.

Diagnose an Invalid Signature

If SignTool reports an invalid signature, investigate whether the file changed after signing, whether the signature format is supported, and whether the correct verification policy was used. Do not immediately assume the certificate itself is defective. A valid certificate cannot make a modified or corrupted signature valid.

Investigate Publisher Warnings

A valid code signing certificate does not guarantee that Windows SmartScreen will stop displaying warnings. Reputation and other platform security signals can influence warnings independently of signature validity.

When Windows is the target platform, How to Verify Code Signed Software on Windows covers the Windows-specific checks for publisher identity and signature trust.

Troubleshoot Java JAR Signing Errors

Java applications may report signature verification errors when a JAR file has been modified, contains inconsistent signing information, or uses certificate or algorithm settings that conflict with the runtime's security policy.

Verify the JAR Signature

jarsigner -verify -verbose -certs application.jar

Review the output for verification failures, certificate details and warnings. A verification result alone does not establish that the signer is trusted by every Java runtime or deployment environment.

Check Common Java Problems

  • JAR content was modified: Rebuild the archive and sign it after all content changes are complete.
  • Certificate chain problems: Check the signing certificate, intermediate certificates and trust configuration used by the target environment.
  • Algorithm restrictions: Older signature algorithms may be rejected by newer Java security policies. Check the runtime version and its security configuration before changing the algorithm.
  • Mixed or inconsistent signing: Inspect how the JAR was assembled and whether its signed entries and manifest are consistent.

Avoid disabling Java security checks as a permanent workaround. Correct the signing or trust problem instead.

Troubleshoot macOS Code Signing Errors

macOS signing and application acceptance involve several separate checks. A valid code signature does not necessarily mean an application satisfies Apple's distribution and notarization requirements.

Verify the Code Signature

codesign --verify --deep --strict --verbose=2 "/Applications/MyApp.app"

Use --deep with care. It can help inspect nested code, but it is not a substitute for signing each component correctly or following the recommended signing order.

Inspect the Signing Identity

codesign -dv --verbose=4 "/Applications/MyApp.app"

Review the identifier, authority and other reported signature details. If verification fails, inspect nested frameworks, helpers and executable components for missing or invalid signatures.

Check Gatekeeper and Notarization

spctl --assess --type execute --verbose=4 "/Applications/MyApp.app"

This assesses whether the application is accepted under the local Gatekeeper policy. Its result may differ from the result of basic signature verification.

For distribution workflows that require notarization, also check the notarization result, Hardened Runtime configuration where applicable, and whether the required ticket has been stapled.

For macOS releases, signing, nested-code validation and notarization each have distinct requirements; How to Sign macOS Applications covers the platform workflow and its distribution checks.

Troubleshoot Timestamp Errors

A timestamp allows a verifier to establish that a signature was created during the certificate's validity period, subject to applicable validation rules. Timestamping does not repair an invalid signature or automatically make an untrusted certificate trusted.

When timestamping fails, check:

  • Whether the timestamp service URL is correct and reachable.
  • Whether the service supports the configured timestamp protocol.
  • Whether the timestamp request uses a supported digest algorithm.
  • Whether the build agent can establish the required network connection.
  • Whether the signing tool reports a timestamp failure separately from the signature result.

If a timestamp service is unavailable, follow your release policy before retrying or publishing. Do not silently publish an artifact that failed a mandatory timestamping step.

If a timestamp request fails, How to Timestamp Signed Software explains timestamp validation and its role in signature verification.

Troubleshoot CI/CD Code Signing Failures

A signing workflow may work on a developer's computer but fail in an automated pipeline because the two environments differ. Compare the local and pipeline environments systematically.

CheckWhat to investigate
Execution identityWhich user or service account runs the signing command?
Certificate accessIs the expected certificate available to that identity?
Key accessCan the workflow invoke the protected key?
Tool versionsAre signing tools and SDKs compatible?
NetworkCan the agent reach the HSM, cloud signing service and timestamp server?
Artifact pathIs the pipeline signing the intended file?
Pipeline policyAre protected branches, approvals and release permissions satisfied?
VerificationDoes the final published artifact pass signature verification?

Do not resolve a pipeline failure by granting every build agent unrestricted access to the production signing key. Fix the identity, permissions or integration causing the failure.

When the same signing operation must run consistently for every approved build, How to Sign Software in a CI/CD Pipeline shows how to control signing access and verify the resulting artifact in an automated pipeline.

Troubleshoot by Exact Error Message

Choose the error closest to the message you received. The suggested step is a starting point for diagnosis, not a guarantee that the listed cause is responsible.

Recommended next step Check whether the expected certificate is installed in the correct store, is suitable for code signing, and is associated with the required private key.

Code Signing Troubleshooting Checklist

Use this checklist before retrying a failed signing operation or publishing a release.

Troubleshooting review

0 of 10 completed

Frequently Asked Questions

Why does code signing fail even when the certificate is valid?

A valid certificate is only one part of the process. Signing may still fail because the private key is unavailable, the certificate is unsuitable for the operation, the signing tool is misconfigured, or a token, HSM or signing service cannot be reached. Verification may also fail because of file changes, trust problems or policy restrictions.

How do I know whether the problem is the certificate or the signing tool?

Check the exact error and test the certificate and signing environment separately using supported diagnostic tools. Confirm key access, certificate usage and validity, then verify the resulting artifact. A tool error does not necessarily indicate that the certificate is defective.

Why does a signed application still show an unknown publisher warning?

The application may have an invalid or untrusted signature, or the operating system may lack sufficient publisher reputation information. A valid signature does not guarantee that every warning will disappear immediately.

Can an expired code signing certificate still validate a signature?

In some circumstances, yes. A valid trusted timestamp can help establish that signing occurred while the certificate was valid. The final outcome depends on timestamp validity, revocation status, certificate policy and the verifier's rules.

Why does code signing work on my computer but fail on another system?

The systems may have different trusted root stores, intermediate certificates, revocation access, security policies, operating system versions or signing tool configurations. Compare the environments and reproduce the failure on the affected system.

Should I disable certificate validation to fix a signing error?

No, not as a permanent solution. Disabling validation can conceal trust or integrity problems and expose users to unsafe software. Identify and correct the underlying issue instead.

What information should I collect when asking for help with a code signing error?

Provide the exact error message, operating system and version, signing tool and version, certificate type, signing or verification command, and relevant diagnostic output. Remove private keys, passwords, access tokens and other sensitive information before sharing logs.

Related Code Signing Guides

Use these guides for the next step when the problem is tied to a specific signing workflow or verification task.

Choose the right signing certificate

Compare available code signing options for your software, signing workflow and distribution requirements.

Browse code signing certificates