跳到主要内容
证书选购指南

Cheap Code Signing Certificate: Costs, Commands, and Checks

cheap code signing certificate — Cheap Code Signing Certificate: Costs, Commands, and Checks
核心结论

A cheap code signing certificate typically costs $120–$350 per year for OV validation, plus $50–$150 for a FIPS 140-2 Level 2 token if your CA requires hardware key storage; EV certificates usually run $300–$700 per year and take 3–10 business days to validate. Per the CA/Browser Forum Code Signing Baseline Requirements, publicly trusted code signing private keys issued after June 1, 2021 must be stored in a hardware crypto module meeting FIPS 140-2 Level 2, Common Criteria EAL 4+, or equivalent. Let's Encrypt does not issue code signing certificates; per Let's Encrypt docs it issues TLS/SSL certificates only, so a free Let's Encrypt certificate cannot replace a commercial Authenticode certificate. On Windows, sign with SHA-256 and RFC 3161 timestamping: `signtool sign /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 /f codesign.pfx /p $env:PFX_PASS app.exe`, then verify with `signtool verify /pa /v app.exe`. SmartScreen reputation is not guaranteed by price: OV signatures build reputation over downloads and time, and EV is historically associated with faster reputation, but Microsoft's reputation system is proprietary.

What Makes a Cheap Code Signing Certificate Cheap, and Why Do Prices Vary?

Strip away the marketing and a cheap code signing certificate is almost always an OV (Organization Validation) Authenticode certificate — not a weaker cryptographic product. The signature still uses RSA-3072 or ECDSA P-256 with SHA-256; what the CA spends less on is identity proofing. That is the entire price delta.

Attribute OV code signing EV code signing
Typical list price (1 yr) $120–$350 $300–$700
Validation time 1–3 business days 3–10 business days
What the CA checks Legal existence + applicant authority Legal existence, phone call-back, physical address, often D-U-N-S or government registry
Key storage Hardware crypto module (required) Hardware crypto module (required)
Signature algorithm RSA-3072 / ECDSA P-256, SHA-256 RSA-3072 / ECDSA P-256, SHA-256
SmartScreen reputation Builds over downloads and time Historically faster, never guaranteed

So where does the real cost hide? In key protection. Per the CA/Browser Forum Code Signing Baseline Requirements (§6.2.7.4), private keys for publicly trusted code signing certificates issued after June 1, 2021 must live in a hardware crypto module meeting FIPS 140-2 Level 2, Common Criteria EAL 4+, or equivalent. That means a USB token typically adds $50–$150 plus $20–$60 shipping, while cloud HSM signing subscriptions often add $200–$600/year. A “$99 certificate” that ignores this is not usable for public trust.

Can I get free code signing like Let’s Encrypt? No. Per Let’s Encrypt’s own documentation, it issues TLS/SSL certificates only — it does not sell or issue code signing certificates. For public Windows Authenticode trust you need a commercial CA whose root is in Microsoft’s Trusted Root Program. Likewise, multi-year prepay discounts of 5–20% are common, but most CAs still issue the certificate itself on a 1-year term.

Is SmartScreen clearance included? It is not a line item you can buy with a cheap code signing certificate. Microsoft’s reputation system is proprietary; no CA can guarantee immediate clearance.

The signing algorithm is also the wrong place to economize — SHA-1 is deprecated, and SignTool defaults can surprise you if you omit the file digest flag. Always be explicit:

# Sign with SHA-256 file digest + RFC 3161 timestamp (required for long-term validity)
signtool sign /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 /a /f mycert.pfx MyApp.exe

# Verify the result against the machine store
signtool verify /pa /v MyApp.exe

If the token or PFX is not visible, SignTool fails with SignTool Error: No certificates were found that met all the given criteria. — almost always a missing /f path or an unplugged token, not a bad certificate.

How Do You Choose a Cheap Code Signing Certificate Without Breaking Trust?

Which platform are you actually signing for? A cheap code signing certificate sold as a Windows Authenticode certificate cannot sign a macOS app — Apple accepts only a Developer ID Application certificate issued through the Apple Developer Program ($99/year, per Apple’s developer program pricing), and Gatekeeper distribution additionally requires notarization. Budget that separately:

# macOS 13+, Xcode 13+ ships notarytool (altool is retired)
codesign --sign "Developer ID Application: Acme Ltd (TEAMID)" 
  --options runtime --timestamp MyApp.app          # hardened runtime is mandatory for notarization
ditto -c -k --keepParent MyApp.app MyApp.zip
xcrun notarytool submit MyApp.zip --apple-id you@example.com 
  --team-id TEAMID --password "app-specific-pw" --wait   # --wait blocks; default is async
xcrun stapler staple MyApp.app

On Windows, choose OV unless a procurement or enterprise customer explicitly demands EV. OV satisfies ordinary Authenticode validation for most independent apps. Kernel-mode drivers are the exception: they need Microsoft Hardware Dev Center attestation signing or WHQL, not a generic cheap code signing certificate — no CA-issued certificate substitutes for that portal submission.

Before paying, confirm the CA participates in the CA/Browser Forum Code Signing Baseline Requirements and the Microsoft root program. Verify on a clean Windows 11 VM rather than your dev box, whose trust store may already cache the root:

# Windows SDK 10.0.22621 signtool; /fd defaults to SHA1 on pre-1607 SDKs, so set it explicitly
signtool sign /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 /a MyApp.exe
signtool verify /pa /v /tw MyApp.exe
certutil -urlfetch -verify MyApp.cer    # pulls AIA/CRL, reports chain errors

A root outside the Microsoft program produces SignTool Error: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider. — a $99 certificate that triggers that is not cheap.

Ask what the price covers. Since June 2023 the Code Signing Baseline Requirements require private keys in FIPS 140-2 Level 2 (or CC EAL4+) hardware, so a token is mandatory, not a perk; replacement tokens run $50–$150. Reissue after revocation is free at some CAs and $50–$200 at others. Compare three-year totals:

Option Typical year-1 cost Key storage Best for Hidden cost
OV Authenticode $80–$250 USB token Independent Windows apps Token replacement $50–$150
EV Authenticode $250–$500 USB token Procurement mandates Slower identity vetting
Apple Developer ID $99 Keychain / cloud macOS apps Notarization pipeline work
Cloud signing $200–$600 + per-signature CA-hosted HSM CI/CD at scale Per-signature fees dominate

For CI/CD, model the per-signature math: 100 builds/day is ~36,500 signatures a year, so a $0.05 fee adds ~$1,825 — more than the subscription. Cloud signing removes USB tokens from build agents and yields audit logs, which is why it often wins despite the sticker price. Finally, read the subscriber agreement: validation SLAs of 1–3 business days are common, but revocation and reissue can take 1–2 business days — the difference between shipping and missing a release window.

How Do You Order a Cheap Code Signing Certificate Step by Step?

Ordering a cheap code signing certificate is 20% shopping and 80% identity hygiene: every mismatch between your order form and registry records restarts the CA’s validation clock. The CA/Browser Forum Baseline Requirements (§3.2.2) oblige the CA to verify legal name, address and phone against an independent source before issuance, so fix those first — it costs nothing and saves days.

Step 1 — Build the signing identity. Use the legal organization name exactly as registered (don’t drop “Inc.”, don’t substitute a DBA unless it is filed), the registered address, a phone number a human answers, and a technical contact who replies within a day. Mismatches typically add 1–3 business days to OV validation and 3–10 days to EV.

Check OV code signing EV code signing
Street price, 1 year, token included ~$80–$250 ~$250–$600
Validation after complete documents 1–3 business days 3–10 business days
Evidence the CA checks D-U-N-S or tax/company registry, phone callback, domain control All of the above plus legal-existence review, sometimes notarized documents
Key storage FIPS 140-2 Level 2 token/HSM (mandatory since 1 June 2023, ballot CSC-17) Same, usually a higher-assurance token
Best fit Independent software vendors; CI using a cloud signing service Enterprises shipping drivers/firmware to regulated customers

Step 2 — Generate the key on the token, never as an exportable file. With a PIV token (ykcs11 module, OpenSC 0.23+):

# -l prompts for the PIV PIN; change the 123456 default first: ykman piv access change-pin
pkcs11-tool --module /usr/lib/x86_64-linux-gnu/libykcs11.so -l 
  --keypairgen --key-type rsa:3072 --id 01 --label codesign

Step 3 — Create the CSR. RSA-3072 or ECDSA P-256; RSA-2048 still validates but buys you no discount. OpenSSL 3.x’s default provider has no PKCS#11 support, so install the third-party pkcs11-provider:

openssl req -new -provider pkcs11 -key 'pkcs11:object=codesign;type=private' 
  -subj '/C=US/ST=CA/L=San Jose/O=Example Inc/CN=Example Inc Code Signing' 
  -sha256 -out codesign.csr

# Confirm what the CA will hash — expect: Signature Algorithm: sha256WithRSAEncryption
openssl req -in codesign.csr -noout -text | grep 'Signature Algorithm'

Step 4 — Submit, pay, validate, import the full chain. Keep the order ID and validation case number. The certificate arrives as .cer/.crt plus intermediates; importing only the leaf makes signtool fail with “A certificate chain could not be built to a trusted root authority (0x800B0109)”.

Step 5 — Test before rollout. signtool defaults to a SHA-1 file digest on older Windows SDKs, so pass /fd SHA256 explicitly:

signtool sign /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 /n "Example Inc" test.exe
signtool verify /pa /v test.exe
# Good output: "Successfully verified" plus a "Timestamp Verified by:" line

Step 6 — Automate expiry checks. openssl x509 -checkend exits 0 when the certificate is still valid beyond the given seconds, so invert it in CI to alert at 30 days:

openssl x509 -in codesign.crt -noout -enddate          # notAfter=...
openssl x509 -checkend 2592000 -noout -in codesign.crt; echo $?   # 0 = valid 30+ days

Which Commands Sign Code with a Cheap Code Signing Certificate?

SignTool’s defaults are the usual source of broken signatures: if you omit /fd, SignTool falls back to SHA-1 for the file digest (per Microsoft’s SignTool reference), and if you pass /tr without /td, the timestamp digest also defaults to SHA-1 — both rejected by modern Windows SmartScreen and by Microsoft’s SHA-1 deprecation policy. Always pin /fd SHA256 /td SHA256 and use /tr (RFC 3161) rather than the legacy /t. A cheap code signing certificate is only as good as the flags you wrap around it.

# Windows: sign from a PFX file, RFC 3161 timestamp, SHA-256 throughout
signtool sign /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 `
  /f codesign.pfx /p $env:PFX_PASS app.exe
# /pa = Authenticode policy (not driver policy); /v = verbose
signtool verify /pa /v app.exe

When the key lives on a USB token or HSM, skip /f and select by subject; add /csp and /kc only if the middleware exposes a named CSP container:

signtool sign /n "Example Inc" /fd SHA256 /tr http://timestamp.sectigo.com /td SHA256 app.exe
signtool sign /csp "eToken Base Cryptographic Provider" /kc "[{{PIN}}]=ContainerName" `
  /fd SHA256 /tr http://timestamp.sectigo.com /td SHA256 app.exe
certutil -user -store My   # lists exact subject + container names

On Linux CI, osslsigncode 2.5+ produces equivalent PE signatures — note -t is the legacy Authenticode timestamp while -ts requests RFC 3161:

osslsigncode sign -certs codesign.crt -key codesign.key -n "Example App" 
  -i https://example.com -h sha256 -t http://timestamp.digicert.com 
  -in app.exe -out app-signed.exe
osslsigncode verify -in app-signed.exe

-key needs a readable private key file, so token/HSM holders must use PKCS#11 (-pkcs11) or a cloud signing API instead of exporting the key.

Set-AuthenticodeSignature -FilePath .deploy.ps1 -Certificate $cert `
  -TimestampServer http://timestamp.digicert.com -HashAlgorithm SHA256
Get-AuthenticodeSignature .deploy.ps1 | Format-List Status,StatusMessage,SignerCertificate,TimeStamperCertificate

macOS is a different trust chain entirely — a cheap Windows code signing certificate cannot sign a .app; you need an Apple Developer ID and notarization:

codesign --sign "Developer ID Application: Example Inc (TEAMID)" --options runtime --timestamp --deep MyApp.app
codesign --verify --deep --strict --verbose=2 MyApp.app
spctl --assess --type execute --verbose=4 MyApp.app
jarsigner -keystore codesign.p12 -storetype PKCS12 -tsa http://timestamp.digicert.com app.jar "code-signing"
jarsigner -verify -verbose -certs app.jar
Tool Target RFC 3161 switch Verification
signtool (Windows SDK) PE, MSI, PS1, CAB /tr + /td SHA256 signtool verify /pa /v
osslsigncode 2.5+ PE, MSI, CAB -ts (legacy: -t) osslsigncode verify
Set-AuthenticodeSignature PS1, PSMO, binaries -TimestampServer Get-AuthenticodeSignature
codesign Mach-O, .app, .dmg --timestamp (default with Developer ID) codesign --verify, spctl
jarsigner (JDK 17/21) JAR, APK -tsa (keep URL reachable) jarsigner -verify -certs

Failures are verbose but specific: SignTool Error: No certificates were found that meet all the given criteria means the subject or container name is wrong; Error: A certificate chain processed, but terminated in a root certificate which is not trusted means the intermediate CA is missing from the store — install it before re-signing.

Cheap Code Signing Certificate Comparison: OV, EV, and Cloud Signing

A cheap code signing certificate is only cheap on the invoice. Compare the real shape of each option before you buy:

Option Typical annual price Validation time Key storage Best fit Watch-outs
OV code signing certificate $120–$350 1–3 business days FIPS 140-2 Level 2 token or HSM Independent Windows apps, internal tools SmartScreen reputation still builds over time
EV code signing certificate $300–$700 3–10 business days Token or HSM Enterprise procurement, higher-assurance workflows Higher price and more documents; no guaranteed SmartScreen bypass
Cloud code signing $200–$600 + per-signature 1–5 business days Cloud HSM CI/CD, ephemeral build agents API latency, per-signature cost, vendor lock-in
Self-signed certificate $0 Minutes Any Internal testing only Not trusted by public Windows/macOS
Let’s Encrypt $0 N/A N/A TLS/SSL only Per Let’s Encrypt docs, it does not issue code signing certificates

Why is first-year price misleading? Because the token and shipping are not optional. A $120 OV certificate plus a $100 token plus $40 shipping is about $260 in year one, while a $300 cloud plan may already include the HSM and audit logs. Per the CA/Browser Forum Code Signing Baseline Requirements, private keys must live in FIPS 140-2 Level 2 (or Common Criteria EAL4+) hardware, so “certificate only” pricing is fiction for OV and EV. Model three years, including one lost-token reissue:

# Year-one and 3-year TCO, OV token vs cloud plan
OV_CERT=120; TOKEN=100; SHIPPING=40
echo $((OV_CERT+TOKEN+SHIPPING))          # 260 year one
echo $((260 + 120 + 120 + 75))            # 575 with one $75 reissue
# Cloud: $300/yr base + 50 builds/day at $0.02/signature
python3 -c "print(300 + 50*365*0.02)"     # 665.0 per year

Does validation time count as cost? Yes. A $150 certificate that takes 5 business days and blocks a release can cost more than a $300 certificate with a 1-day SLA. Ask the CA for written OV and EV turnaround ranges before you buy a cheap code signing certificate — “1–3 days” in marketing copy is often 3–5 in practice.

What does cloud signing cost at volume? At 50 builds/day and $0.02 per signature, per-signature fees add about $365/year on top of the base plan; at 500 builds/day, about $3,650/year, at which point a token plus a self-hosted signer is usually cheaper. Sign with a timestamp so signatures outlive the certificate, per RFC 3161:

# Windows SDK 10.0.22621 signtool; /fd defaults to SHA1 on old SDKs, so pin SHA256
signtool sign /n "Contoso Ltd" /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 /v MyApp.exe

# DigiCert Software Trust Manager cloud signing from CI
smctl sign --keypair-alias codesign-prod --input MyApp.exe --config-file smctl.cfg

What breaks after purchase? Revocation and reissue. Some plans charge $50–$200 to reissue after a lost token; others include one replacement per year. Verify the chain and revocation path before shipping, and record the token serial and CA revocation contact in your runbook (certutil -scinfo lists the inserted token and certificates):

signtool verify /pa /all /v MyApp.exe
# SignTool Error: A certificate chain processed, but terminated in a root
# certificate which is not trusted by the trust provider.

That error usually means a missing intermediate or an untrusted root, not a bad signature. Self-signed certificates are fine for internal testing but will trigger the same chain error on public Windows and macOS. And despite the $0 price, Let’s Encrypt is a TLS/SSL CA only — its FAQ states it does not issue code signing certificates, so it belongs in your HTTPS stack, not your signing pipeline.

What Common Errors Break a Cheap Code Signing Certificate Setup?

Which errors actually break a cheap code signing certificate setup? Price is rarely the cause: store selection, missing intermediates, timestamp protocol, token middleware, SmartScreen reputation, and post-sign file edits are. These are the exact strings to grep in CI logs.

Error text Usual cause First check Fix
SignTool Error: No certificates were found that meet all the given criteria Cert not in CurrentUserMy, or /n subject filter/typo certutil -user -store My Copy exact Subject CN; for tokens start middleware
A certificate chain could not be built to a trusted root authority Intermediate missing or root untrusted certutil -verify -urlfetch codesign.cer Add intermediate to CA store or pass /ac
The specified timestamp server either could not be reached or returned an invalid response Legacy /t used with RFC 3161 URL, or port 80/443 blocked curl -I http://timestamp.digicert.com Use /tr ... /td SHA256
private key not available / token locked Wrong PIN, middleware/driver issue Vendor token tool; certutil -scinfo Correct PIN; do not retry blindly
SmartScreen warning Reputation, not crypto signtool verify /pa /v No bypass; EV may help but no guarantee
The signature is invalid File modified after signing signtool verify /pa /v Sign last; re-sign and re-timestamp

Start with the store. SignTool 10.0.22621.0 (Windows SDK) defaults to the user store; /n is a subject-name filter, so a typo or a machine-store cert still yields the first error. Use the exact CN, or /sha1 if subjects collide; pass /fd SHA256 because older SignTool defaults to SHA1.

:: List CurrentUserMy certs (Windows 10/11 certutil); copy exact Subject CN
certutil -user -store My

:: Sign with exact subject filter and RFC 3161 timestamp; /fd SHA256 is explicit
signtool sign /fd SHA256 /n "Contoso Ltd" /tr http://timestamp.digicert.com /td SHA256 /v app.exe

Chain failures on a cheap code signing certificate are still X.509 failures. Per CA/B Forum Code Signing Baseline Requirements, the leaf must carry AIA/CRL; per OpenSSL verify docs, intermediates are untrusted input. Install the intermediate or scope it with /ac, then fetch AIA/CRL.

:: Add to CurrentUserCA; omit -user to change the machine store
certutil -user -addstore CA intermediate.crt

:: Scope the intermediate to this signature only
signtool sign /fd SHA256 /n "Contoso Ltd" /ac intermediate.crt /tr http://timestamp.digicert.com /td SHA256 app.exe

:: Validate chain and fetch AIA/CRL; codesign.cer is the exported leaf
certutil -verify -urlfetch codesign.cer

:: OpenSSL expects PEM; convert the DER leaf first
openssl x509 -inform DER -in codesign.cer -out codesign.pem
openssl verify -CAfile root.pem -untrusted intermediate.pem codesign.pem

Timestamping: /t is legacy Authenticode; /tr is RFC 3161, as DigiCert’s timestamp docs describe. DigiCert’s endpoint accepts HTTP on port 80, so proxy allowlists must include it; expect HTTP 200 from curl -I, while 403/407 points to proxy policy. Always pair /tr with /td SHA256.

private key not available is middleware, driver, or PIN. certutil -scinfo enumerates readers but may prompt for a PIN; do not loop—most middleware locks after 3–15 bad attempts. Store the PIN in a secrets manager, not the build script, and test on a spare token.

A SmartScreen warning after buying a cheap code signing certificate is reputation, not necessarily a broken signature. Microsoft’s SmartScreen reputation is proprietary and tied to signer/download history; new OV certs often warn, and EV is associated with faster reputation but is not a guaranteed bypass.

The signature is invalid after a successful build means post-sign modification—resource editing, installer patching, or compression. Sign as the last step; re-sign and re-timestamp after any change, then verify:

:: /pa applies the default Authenticode policy; /v shows chain and timestamp
signtool verify /pa /v app.exe
osslsigncode verify -in app.exe

How Do You Verify a Cheap Code Signing Certificate and Its Signatures?

Verifying a cheap code signing certificate uses the same chain, Extended Key Usage (EKU), timestamp, and revocation checks as a premium one — price changes issuance checks and support, not the cryptography. Start on Windows with the Windows SDK signtool (10.0.22621 or later); /pa selects the default Authenticode policy, while /kp would apply the kernel-mode policy.

signtool verify /pa /v app.exe
:: Expected: "Successfully verified"
:: Shows "Issued to: ..." and a timestamp certificate ("Issued to: DigiCert Timestamp Responder")

A chain error such as SignTool Error: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider. means the intermediate/root is missing or untrusted, not that the file was altered. Cross-check in PowerShell:

Get-AuthenticodeSignature .app.exe | Format-List Status, StatusMessage, SignerCertificate
# Status : Valid  -> signature and hash are intact
# NotSigned       -> signature stripped
# HashMismatch    -> file modified after signing

On Linux or in CI, osslsigncode 2.9 verifies PE and MSI signatures. Require exit code 0 and inspect both signature and timestamp lines; the CI gate must fail the build explicitly:

osslsigncode verify -in app-signed.exe
# Signature verification: ok
# Timestamp verification: ok
osslsigncode verify -in app-signed.exe || exit 1  # fail pipeline on bad signature

Inspect the certificate itself with OpenSSL 3.x. The EKU extension must contain Code Signing, and path validation must return OK:

openssl x509 -in codesign.crt -noout -text | grep -A1 'Extended Key Usage'
# X509v3 Extended Key Usage: critical
#     Code Signing
openssl verify -purpose codesign -CAfile chain.pem codesign.crt
# codesign.crt: OK

Per RFC 5280 §6.1, path validation also enforces validity dates, key usage, basic constraints, and revocation. Check revocation on Windows or via OCSP (RFC 6960):

certutil -verify -urlfetch codesign.cer
# Look for "Verified "Certificate" successfully" and a successful revocation check
openssl ocsp -issuer intermediate.pem -cert codesign.crt 
  -url http://ocsp.example.com -resp_text
# Response verify OK
# codesign.crt: good

A revoked certificate can still carry a valid timestamp — the timestamp proves the signature existed before revocation, so new signatures must fail while old ones may remain acceptable. For macOS artifacts, use Apple Developer ID certificates, not a cheap Windows code signing certificate:

codesign --verify --deep --strict --verbose=2 MyApp.app
spctl --assess --type execute --verbose=4 MyApp.app  # Gatekeeper assessment

Add an expiry gate that logs identity data and alerts 30 days ahead (2592000 seconds):

openssl x509 -in codesign.crt -noout -serial -subject -enddate
openssl x509 -checkend 2592000 -noout -in codesign.crt || echo "Renew within 30 days"
Tool / platform Command Pass signal
signtool (Windows) signtool verify /pa /v app.exe Successfully verified + timestamp cert
PowerShell Get-AuthenticodeSignature .app.exe Status : Valid
osslsigncode (Linux/CI) osslsigncode verify -in app-signed.exe Exit 0, signature and timestamp verified
OpenSSL openssl verify -purpose codesign -CAfile chain.pem codesign.crt codesign.crt: OK

How Do You Operate and Renew a Cheap Code Signing Certificate Safely?

Treat a cheap code signing certificate as an asset with a named owner, not a USB token rattling around in a drawer. Start by regenerating the inventory straight from the artifact so it can never drift from reality:

# 1) Pull identity, serial, and validity out of the PFX you actually sign with
openssl pkcs12 -in codesign.pfx -nokeys -clcerts -passin env:PFX_PASS 
  | openssl x509 -noout -subject -serial -dates -fingerprint -sha256

# 2) Confirm the shipped binary carries a valid Authenticode + timestamp chain
#    /pa = default Authenticode policy, /all = every signature (dual SHA-1/SHA-256)
signtool verify /pa /all /v MyApp.exe

# 3) Prove the RFC 3161 timestamp authority is reachable before you need it
openssl ts -query -data MyApp.exe -cert -sha256 -no_nonce -out req.tsq
curl -sS -H "Content-Type: application/timestamp-query" 
     --data-binary @req.tsq https://timestamp.digicert.com -o resp.tsr
openssl ts -reply -in resp.tsr -text | head -n 20   # expect "Status: Granted"

Log the certificate serial, subject DN, token serial or cloud key ID, CA account, validation contact, TSA URL, and expiry in the same repo as your build config. That single file is what turns a cheap code signing certificate into something an auditor can trace.

Renew early, because issuance is still human-gated under the CA/Browser Forum Baseline Requirements:

Step OV lead time EV lead time Blocker to plan for
CA validation 1–3 business days 3–10 business days Callback to a published number
Physical token +3–7 days +3–7 days Courier shipping, $20–$60
Cloud key policy +1–5 days +1–5 days Security team approval

Order 30–60 days out. If a token is lost or a cloud API key leaks, revoke immediately and request reissue — but assume a lag, since per RFC 6960 OCSP responders and clients each keep their own refresh intervals. Verify your own status rather than trusting a cached answer:

openssl ocsp -issuer ca-chain.pem -cert codesign.pem 
  -url http://ocsp.digicert.com -resp_text -no_nonce

Enforce dual control: one engineer approves the release, another unlocks the token or assumes the cloud signing role. Keep PINs in a secrets manager with rotation and audit logging. Timestamp every production signature — the RFC 3161 token proves the code existed while the certificate was valid, so installers stay verifiable after expiry.

Cost line Typical range
Certificate $120–$700/yr
Token + shipping $50–$150 + $20–$60
Cloud signing $200–$600/yr + per-signature fees
Engineering 1–3 hours per renewal

A cheap code signing certificate stays cheap only when renewal dates, TSA URLs, and CI integration are budgeted up front.

Yes, if it comes from a CA/Browser Forum-compliant CA and the private key is stored on a FIPS 140-2 Level 2 token, Common Criteria EAL 4+ module, or approved cloud HSM. 'Cheap' usually means OV rather than EV, not a weaker signature algorithm. It still uses SHA-256 and RSA-3072 or ECDSA P-256, and it can be verified with signtool or osslsigncode.

Typical OV pricing is $120–$350/year, EV is $300–$700/year, and cloud signing is $200–$600/year plus per-signature fees. Add $50–$150 for a hardware token and $20–$60 for shipping if you use a token. A realistic OV year-one total is often $200–$500 before engineering time.

No. Per Let's Encrypt docs, Let's Encrypt issues TLS/SSL certificates for websites, not code signing certificates. A self-signed certificate is free, but public Windows and macOS systems will not trust it for Authenticode or Gatekeeper. For public code signing you need a commercial CA.

EV usually costs $300–$700/year versus $120–$350/year for OV and takes 3–10 business days to validate. EV can help with enterprise procurement and has historically been associated with faster SmartScreen reputation, but Microsoft's reputation system is proprietary and no CA guarantees immediate clearance. Choose EV when a customer or policy requires it.

The certificate is usually in a different store, the `/n` subject does not match exactly, or the token middleware is not running. Run `certutil -user -store My` and copy the exact CN. For token-based signing, confirm the container name and CSP with `certutil -user -store My` and the token vendor's middleware.

OV validation often takes 1–3 business days, while EV validation often takes 3–10 business days because the CA checks legal existence, phone, address, and registry records. Start renewal 30–60 days before expiry so validation delays do not block a release.

Yes, code signing certificates expire, and many CAs issue them on 1-year terms. An RFC 3161 timestamp proves the code was signed while the certificate was valid, so old installers can remain verifiable after expiry. New builds still need a valid certificate, so renew before the expiry date.


本文由 sslgood.com 安全团队基于生产环境实战经验撰写,关键结论均经过技术复核。

内容审核

长期从事 SSL/TLS 证书部署与 HTTPS 运维,负责本站证书选型、安装配置与故障排查内容的编写与审核。