Skip to main content

Crate ssign_core

Crate ssign_core 

Source
Expand description

ssign — sign Windows binaries with a Certum SimplySign cloud certificate.

The whole signing pipeline is plain HTTPS against Certum’s cloud plus local Authenticode/PKCS#7 assembly, so it runs on Linux, macOS and Windows alike — you do NOT need Windows to sign a Windows binary.

This is the reusable library behind both the ssign binary and the ssign-pkcs11 module: the binary drives the full PE pipeline itself, while the PKCS#11 module reuses only the cloud half (auth, card, sign) to expose the cloud key to osslsigncode/signtool for every Authenticode format.

Modules§

asn1
A tiny DER (TLV) encoder — just enough to hand-build the Microsoft Authenticode structures that no general CMS crate models directly.
auth
Step 1 — OAuth2 authorization-code login against Certum’s CAS IdP (cloudsign.webnotarius.pl), driven entirely over HTTP.
authenticode
Step 3b — the local Authenticode work, all cross-platform (no Windows APIs).
card
Step 2 — materialize the cloud “card”: list cards (→ serial) and fetch the signing certificate (DER), each as an async SCS task with a bearer token.
client
Shared HTTP client and the SCS async-task helper.
msi
MSI (and other OLE2 Compound File installers) Authenticode digest, replicating osslsigncode’s msi_hash_dir: walk the directory, sort each storage’s children by their raw UTF-16LE name, hash each non-empty stream’s content (skipping the signature streams at the root), recurse storages, then append the storage CLSID.
otp
TOTP code generation for the --otp (seed) path.
session
A live cloud signing session — the auth → card → sign steps bundled behind one object.
sign
Step 3a — the remote signature (SCS1_ATOM async protocol).
timestamp
RFC 3161 timestamping: hash the signature, ask the TSA to countersign it, and return the TimeStampToken to embed as an unauthenticated attribute.