Repository navigation
Releases
openSzigno 0.9.0
openSzigno 0.9.0 adds the timestamp command (a container timestamp without a signature), csc login with interactive credential authorisation so an OAuth2-mode remote qualified certificate can sign, TLv6 trusted lists (the live EU and Hungarian lists already are), ECDSA P-521, trusted-list signer checks per TS 119 612 clause 5.7.1, reporting of the XAdES properties AVDH-authenticated documents carry, and the verifier follow-ups from the review round. The reported enums are now non-exhaustive: a downstream match needs a wildcard arm, which is the breaking change behind the minor bump. The JSON envelope contract is unchanged at schema_version 1. Private corpus: 53 valid, unchanged.
Added
-
The certificate that signed a trusted list is now checked against what the
list itself says and against ETSI TS 119 612 clause 5.7.1. When a list
carries a signedxades:SigningCertificateV2(or the older
xades:SigningCertificate), which a TLv6 list signed as XAdES-B-B does, the
certificate the caller supplied through--trust-list-signeror through a
LOTL pointer must be the one that property designates; if it is not, the new
trust_list_signer_mismatch(unknown) blocks, because the caller and the
list disagree about who signed and this build does not pick a winner. The
property is read only where the list's own signature covers it. The
clause 5.7.1 restrictions on a scheme operator's certificate are reported as
trust_list_signer_unqualified(info), one check per rule, naming which
requirement failed: theid-tsl-kp-tslSigningextended key usage
(0.4.0.2231.3.0), akeyUsageincludingdigitalSignatureor
nonRepudiation,basicConstraintsnot sayingCA=true, and an issuer that
is either the scheme operator itself or a certificate the list names. None of
those blocks: the clause makes the extended key usage a "should", and the
European Commission's own LOTL signing certificate carries no
id-tsl-kp-tslSigningat all, so blocking on it would refuse the one list
every national list is bootstrapped from. Both new codes are additive and
schema_versionstays1; no golden changes. -
AVDH-authenticated documents keep being recognised for what they are. AVDH
(azonositasra visszavezetett dokumentumhitelesites) was the Hungarian
state service that sealed a document on behalf of an identified citizen;
citizen AVDH ended on 2025-01-01 and the service was withdrawn after
2025-10-31, but section 634(15) of the Code of Civil Procedure grandfathers
every document authenticated up to 2024-12-31 indefinitely, so a reader
keeps meeting these structures. Nothing on the read path may treat one as
obsolete or unsupported, and three signed claims such a signature carries
are now reported instead of being dropped or named only in passing:
signatures[].xades.signature_policy_digest(theSigPolicyHashan
explicit signature policy declares, asalgorithmandvalue),
signatures[].xades.claimed_roles(thexades:ClaimedRolevalues of
SignerRoleandSignerRoleV2, which is where AVDH states the identified
citizen), andsignatures[].xades.commitment_type_ids. The unverified
signature inventoryinspectandlistprint gains the same roles as
signature_inventory.signatures[].claimed_roles, bounded to 8 values of
128 displayable characters, and the human inventory line names them.
Every one of these is a claim, reported and applied to nothing: the
signature policy stays informational, no policy document is fetched, and
no role is looked up anywhere. None of them may cost a signature its
verdict, and unknown qualifying properties stayxades_not_validated
(info). A PAdES signature inside a PDF payload is still out of scope for
verify, andinspect,listandvalidate-structuredescribe such a
document and warn about nothing whileextractsniffs it aspdf. Every
new JSON member is additive and appears only when the signature carries the
property, soschema_versionstays1and no golden changes.
docs/architecture.mdgains an "AVDH-authenticated documents" subsection,
docs/trust.mdrecords what could and could not be established about the
seal's issuer, anddocs/references.mdcites the sources. -
ECDSA over NIST P-521 with SHA-512
(http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512) is inside the pinned
algorithm policy, for a trusted list's own signature and for a dossier
signature alike, and the matching X.509 and CMS OID
(1.2.840.10045.4.3.4) is accepted where a certificate, CRL, OCSP response
or timestamp token is signed with it. ETSI TS 119 612 annex B.1.2 permits any
ETSI TS 119 312 algorithm for a list's signature, so a member state may sign
a TLv6 list withecdsa-sha512; such a list was refused as
trust_list_signature_invalidfor naming "a signature method outside the
allowlist". Curve and digest stay strictly paired: a P-521 key under a
method naming SHA-256 is stillalgorithm_rejected.verifyonly:
sign --keystill takes an RSA or NIST P-256 key, and there is no
--algorithmvalue for P-384 or P-521.policy.signature_algorithmsin the
JSON report gainsecdsa-sha512; additive,schema_versionstays1. -
Trusted lists are read in both published versions of ETSI TS 119 612.
The EU cut over from TLv5 to TLv6 on 2026-04-29 with no transition period,
so a verifier needs both: TLv6 for anything published from that date, TLv5
for every archived snapshot taken before it.SchemeInformation's
TSLVersionIdentifierdecides,5or6load, anything else and a list
that states no version at all are refused astrust_list_invalid(exit 3)
with a message naming what the file stated. Clause 5.3.1 says the field is
incremented exactly when the parsing rules change, so guessing at an
unknown one would be guessing about trust anchors. The version read is
reported aspolicy.trust_lists[].version, a new field alongside the
territory/sequence_number/issue_datea report already cited, and named
in thetrust_list_loadedcheck message. Nothing else about TLv6
needed branching: V2.3.1 and V2.4.1 keep thehttp://uri.etsi.org/02231/v2#
namespace, theServiceDigitalIdentityforms,PointersToOtherTSL, and
the registered service-status URIs unchanged, and both the live EU LOTL
(rsa-sha512) and the Hungarian list (ecdsa-sha256) sign with algorithms
already inside the pinned allowlist.docs/trust.mdgains a "TLv5 and
TLv6" section with what changed, what did not, and a "TLv6 caveats" note.
Additive;schema_versionstays1. -
A trusted list whose
ds:Referencenames theTrustServiceStatusList
element by a same-document#Id, rather than with the emptyURI, now
counts as covering the whole list. TS 119 612 annex B.1.0 rule 2 allows
either; both live EU lists write the empty URI, but a list using theId
form was refused as partially covered. The "the signature must cover
everything" rule itself is unchanged, and the enveloped-signature transform
is still required in both forms. -
openszigno timestamp FILE --output OUT --tsa URLwrites a copy of a
dossier carrying a containeres:TimeStamp: one RFC 3161 token over the
elements the e-dossier format says a timestamp at that placement protects,
and no signature at all. It needs no key, no certificate and no passphrase.
--scope dossier(the default) writes one timestamp over the dossier;
--scope document, with--document SELECTOR, writes one inside each
selected document.--tsa-certputs the authority's issuing certificates in
the timestamp's ownxades:CertificateValues, and--online-allow-private
and--online-proxyare the transport flagssign --tsaalready has: the
request, the destination policy, the pinned resolution, the timeouts and the
size cap are the same code. The element written is the one
openszigno verifyalready checked, so a timestamped dossier reports
dossier_timestamp_verifiedordocument_timestamp_verifiedagainst trust
material the caller supplies, anddossier_timestamp_invalidonce the
container is edited. The envelope iscommand: "timestamp"withdata
fieldsoutput,bytesandtimestamps[](id,scope,
document_index,gen_time). Every successful run warns
timestamped_dossier_unverified: obtaining a token is not evidence about
it.schema_versionstays1. See
The timestamp command. -
timestamp_exists(exit 4), a new stable error code:timestampwas asked
to write anes:TimeStampwhere the dossier already carries one. Adding a
timestamp where an existing signature or timestamp covers the insertion
point isdocument_already_signed, the refusalsignalready makes,
applied by the same code. -
openszigno csc login CONFIG.toml: the OAuth 2.0 authorization-code round
a Cloud Signature Consortium service needs, so a token no longer has to be
obtained out of band. It is RFC 8252 in shape (a loopback listener on
127.0.0.1, an ephemeral port unlessredirect_uripins one) with RFC 7636
PKCES256, checks thestatebefore it reads the code, and prints the
authorization URL rather than opening a browser unless--openis given.
The token it obtains is written to the fileaccess_token_filenames, mode
0600on Unix, with its expiry, its refresh token and its token endpoint in
<access_token_file>.record.jsonbeside it; none of them is ever printed,
and none is ever taken from or put intoargv.--credential IDalso
reports that credential's authorisation mode. New flags on the command:
--credential,--open,--json,--online-allow-private,
--online-proxy. -
sign --csccan now sign with anoauth2-mode credential. It runs the
scope=credentialauthorization round itsel...
openSzigno 0.8.0
openSzigno 0.8.0 is a security and correctness release built from two review rounds on 0.7.0. The verifier now weighs every revocation source instead of trusting the first embedded answer, enforces trusted-list service status at the validation time, can end a path at a listed issuing-CA service, and binds XAdES properties to what the signature actually references. sign refuses or escapes every dossier-derived value before it reaches the signed XML, fills signatures in inside their own bytes, and supports co-signing. The online transport refuses redirect downgrades and plaintext hops for credentialed requests; every caller-named file is read through one bounded reader; dossier and service strings are sanitised before display; the release workflow verifies its tooling against pinned checksums. Adds public API (new check codes, declared_encoding, sanitize_display), hence the minor bump; the JSON envelope contract is unchanged at schema_version 1. Private corpus: 53 valid, unchanged from 0.7.0.
Added
openszigno_core::declared_encoding, which reads the XML declaration's
encodingpseudo-attribute and reports the label together with the byte
range holding it, so a writer restating the declaration agrees with the
decoder byte for byte. Additive;schema_versionstays1.- Two fuzz targets for code that had none.
extract_plandrives the CLI's
extraction planner with arbitrary document titles and declared extensions
and asserts that no planned name is a path, that no two names in one
directory collide, and that planning is idempotent;destination_url
drives the--onlinedestination policy and asserts that it never hands
the fetcher an address its own verdict refuses, that a non-HTTP scheme and
userinfo are refused whatever--online-allow-privatesays, and that a
relative redirect stays on the base URL's authority. Both include the
shipped module by#[path], because theopenszignobinary crate has no
library target to depend on, so what is fuzzed is the real source.
decode_payloadnow also drives the twoencryptchains with no
decryption key, throughdecode_document_with. - The golden output contract captures stderr.
scripts/golden.pykept only
stdout, so every human-mode golden for a fixture that fails was an empty
file: the wording of every error and warning an operator actually reads was
pinned nowhere, and the "no golden may carry a machine-local path" check
never looked at the stream those messages go to. Each case now writes a
<case>.stderr.txtbeside its stdout golden and its.exit, the leak check
runs over both streams, and anextract --stdoutcase pins the one output
that is not an envelope at all. This adds files and changes none: every
golden committed before this ran is byte-identical after it. The matrix is
run by both the CIgoldenjob and the release smoke test, unchanged. openszigno_core::declared_encoding, which reads the XML declaration's
encodingpseudo-attribute and reports the label together with the byte
range holding it, so a writer restating the declaration agrees with the
decoder byte for byte. Additive;schema_versionstays1.
Fixed
- A delegated OCSP responder's certificate is checked for validity at the
response'sproducedAtrather than at the validation time, matching the
trusted-responder model beside it and the documented rule. Asking at the
validation time discarded every archived response whose responder
certificate has since expired — the certificate was in force when the
responder spoke, which is what RFC 6960's delegation is about — and it
admitted one that was not yet in force then.schema_versionstays1. - A container
es:TimeStampselects its data only through anxades:Include
in a recognised XAdES namespace. The element was matched on its local name
alone, so an element another vocabulary happens to callIncludeadded its
target to the imprint and changed what the timestamp was taken to cover.
Every other XAdES element in the crate was already read this way.
schema_versionstays1. - An OCSP
unknownstatus is no longer reported as stale revocation data.
RFC 6960 section 2.2 gives it its own meaning — the responder does not know
about this certificate — and calling that staleness told an operator to
fetch something newer when the responder they asked does not serve the
certificate at all. It now reports the new check code
revocation_status_unknown_by_responder(unknown), which blocks exactly as
revocation_data_staledid. Additive: a new code keepsschema_versionat
1, and no committed fixture emits it, so no golden file changed. - A certificate whose outer
signatureAlgorithmdiffers from
tbsCertificate.signatureis refused withcert_malformed. RFC 5280
section 4.1.1.2 requires the two to be the same algorithm identifier, and
only the inner one is covered by the CA's signature, so a reader that
consults the outer field was verifying under an algorithm the CA never
attested to. An absentparametersfield and an explicitNULLstill count
as agreeing, which is the difference real CAs actually emit.
schema_versionstays1. --allow-legacy-algorithmsno longer lets an RFC 3161 timestamp token
report itself as verified on SHA-1. A SHA-1messageImprintemitted
timestamp_imprint_ok(passed) and a SHA-1SignerInfodigest emitted
timestamp_signature_ok(passed), so the token reachedverified: true
and itsgenTimebecame the validation time — under a flag that exists for
diagnosis and everywhere else caps the verdict. Both now emit
algorithm_legacy_allowed(unknown) instead, so the token stays
unverified and the verdict staysindeterminate. Without the flag both are
refused exactly as before.schema_versionstays1.- Document coverage finds the payload
ds:Objectwhatever the dossier spells
its identifier attribute. The parser, the reference resolver and the XAdES
reader acceptId,IDandid; coverage read onlyId, so a document
whose payload object used one of the other two spellings was reported
uncoveredby the very signature that digests it, and the dossier's verdict
was capped atindeterminate.schema_versionstays1. - An OCSP response can no longer make
verifydo unbounded work. Thecerts
field of aBasicOCSPResponseis attacker-supplied and was read in full, and
every certificate in it naming the responder drove a signature verification
and, under the trusted-responder model, a whole certification-path search.
At mostmax_certificatescertificates are now read from a response, the
list is deduplicated by DER, and the path search runs at most once per
distinct responder public key. No verdict changes: the same responses are
authorised by the same models, andschema_versionstays1. - A certification path may now end at any trusted-list service digital
identity, not only at a self-signed one. In a real national list the CA/QC
identities are the issuing CAs: the Hungarian list records NetLock's
qualified issuing CAs as CA/QC services withundersupervisionfrom 2003 and
grantedfrom 2016-06-30, and records the root that signed them only as a
QTST service granted from 2018. A path had to climb past the issuing CA to
the self-signed root and was then judged by that timestamping entry, so a
2014 signature under a plainly listed qualified CA was refused with
trust_list_service_not_granted. Following ETSI TS 119 615, the nearest
listed certificate along a chain is now the trust anchor for that path,
self-signed or not, when its service was granted at the validation time —
nothing above it is validated, it is the chain's last entry with
trust_anchor_origin: "trust_list", andqualifiedderives from that
service as before. When the nearest one's service was not granted then, the
search still climbs upward and refuses only if no listed certificate and no
--trust-storeanchor above it will end the path.--trust-storeanchors
and self-signed list entries are unchanged, no field names change, and
schema_versionstays1. - Text a dossier chose no longer reaches a terminal or the JSON envelope
unfiltered. The dossier title, document titles, MIME type halves, the
declared extension and character set, object references, transform names and
signature ids were printed and serialised exactly as the input wrote them, so
a title ofOK<U+202E>txt.exedisplayed asOKexe.txtin alistand
inspect --jsoncarried the override through to whatever read it, and a
subtype— which nothing in the format bounds — printed in full at any
length. The C0 and C1 controls were never reachable, because the bounded XML
parser refuses them; the UnicodeCfclass and length were. Every command
that reads a dossier now runs one pass over its finisheddatavalue, and
the human summary is rendered from that same value, so both channels are
covered by the same filter:CcandCfcharacters are dropped, titles are
bounded to 256 characters and every other dossier-derived value to 128, each
cut short value ending in...inside its cap. Warnings and errors go
through the filter too, andverifyreports a certificate's subject and
issuer common names the same way. Field names and types are unchanged,
schema_versionstays1, and no golden file changed: no committed fixture
carries such a character or exceeds a bound. An extracted file'spathis
deliberately untouched — the extraction name rules already refuse a control,
invisible or formatting character in a title and bound the result, and the
envelope has to keep naming the file that was written. signrefuses, withdocument_already_signed, to write a signature into an
element an existing signature already covers. Only aURI=""reference and
dossier-level...
openSzigno 0.7.0
openSzigno 0.7.0 adds authoring. create assembles a dossier from files (optionally ZIP-under-Base64, nested dossiers, and CMS encryption for recipient certificates), and sign produces XAdES signatures our own verify accepts: per document or over the whole dossier, with a software key (RSA, RSA-PSS or ECDSA P-256), an RFC 3161 timestamp from --tsa, or a qualified certificate held at a Cloud Signature Consortium API v2 remote signing service through --csc, so only the digest leaves the machine. New crate openszigno-author. The agent skill covers the new commands; docs/remote-signing.md records the research behind the remote backend. Creating and signing assert nothing about validity: verify remains the only judge, and reaching valid still needs a timestamp and revocation data.
Added
docs/remote-signing.md, the research behind this milestone's authoring
commands: the Cloud Signature Consortium API versions and the hash-signing
flow a client would run, the EUDI Wallet rQES reference components and how
to run one locally, a remote QSCD provider table, RFC 3161 timestamp
authorities and whether they need an account, what Hungarian courts and the
company registry accept, a recommended first backend, and everything that
could not be verified. Indexed indocs/index.mdanddocs/references.md.
Documentation only; no behaviour changes.openszigno create, the first command that writes a dossier: it builds one
new, unsignedes:Dossierfrom files on disk, with
--document PATH[::TITLE[::MIME]],--zip,--embed,--created, and
--json. Output is deterministic (fixed element order, positional
obj<n>/profile<n>identifiers, a pinned ZIP modification time), so the
same inputs with the same--createdproduce a byte-identical file; the
one exception is--encrypt-forbelow, which must draw on a random source.
Every
parser limit bounds it, every document title is checked against the rules
extractapplies to a filename, an existing output file isoutput_exists
rather than an overwrite, and every run warnscreated_dossier_unsigned.
See The create command.openszigno-author, a new published crate holding that writer. It reads no
file, opens no socket, and calls no clock;openszigno-corestays
read-only. It depends onopenszigno-verifyfor canonicalisation and
openszigno-clidepends on it, so it is published after
openszigno-verifyand beforeopenszigno-cli.- Stable codes for authoring: the errors
no_documents,
unsafe_document_title,invalid_dossier_title,unknown_mime_type,
invalid_mime_type,zip_failed, andinvalid_output_path, and the
warningcreated_dossier_unsigned.too_many_documents,
decoded_too_large,total_size_limit, andzip_ratio_limitare reused
with their existing meanings. Additive:schema_versionstays1. tests/fixtures/created.es3, the dossiercreatebuilds from the two new
synthetic inputs undertests/fixtures/create/, plus acreatecase in
the golden matrix.openszigno create --encrypt-for CERT, repeatable, which writes every
--documentpayload as a CMSEnvelopedDataaddressed to each recipient
certificate (PEM or DER), the forward direction of
extract --decrypt-key. AES-256-CBC content encryption with a fresh
content key and initialisation vector per document, and RSAES-OAEP with
SHA-256 and MGF1-SHA-256 key transport per recipient, named by
issuerAndSerialNumber;--legacy-key-transportwrites RSAES-PKCS1-v1_5
instead. DES-EDE3-CBC is never written.--zipunder encryption makes the
ZIP the plaintext (zip -> encrypt -> base64); an--embeddossier stays
in the clear.createoutput is not deterministic with--encrypt-for,
because a content key must be unpredictable. Eachcreatedocument now
reportsencryptedin the JSON envelope, the human summary marks such a
document| encrypted, and the new codes are the errors
invalid_recipient_certificate,unsupported_recipient_key,
no_recipients, andencrypt_failed(exit 4) and the warning
recipient_certificate_expired. Additive:schema_versionstays1.
See Encrypting for a recipient.openszigno sign, which writes a signed copy of a dossier: one enveloped
XMLDSig/XAdES signature per document, or one over the dossier with
--scope dossier. It writes the reference set the e-dossier scope rules
mandate, exclusive canonicalization and SHA-256 throughout,
xades:SigningTimeandxades:SigningCertificateV2in the signed
properties,xades:CertificateValuesfrom--chainand--tsa-cert, and
the signer certificate inds:KeyInfo. Flags:--output,--key,
--cert,--passphrase-file,--chain,--scope,--document,--tsa,
--tsa-cert,--signing-time,--algorithm,--online-allow-private,
--online-proxy, and--json. RSA PKCS#1 v1.5 with SHA-256 is the default
and is deterministic given the same key, time and inputs;rsa-pss-sha256
andecdsa-p256-sha256are offered and are randomised. The key, its
certificate and its passphrase come from files or from the existing
OPENSZIGNO_DECRYPT_PASSPHRASE, never fromargv. Signing verifies
nothing, and every successful run warnssigned_dossier_unverified. See
The sign command.--tsa URLonsign, which posts an RFC 3161TimeStampReqand embeds the
token as anxades:SignatureTimeStamp. It is the only thing that makes
signopen a socket, and it goes through the same transport, destination
policy, address pinning, timeouts and size capsverify --onlineuses;
--online-allow-privateand--online-proxymean there what they mean
there.- The signing library in
openszigno-author(signmodule): theSigner
trait a later remote backend implements,SoftwareSignerfor a local
PKCS#8 key, the XMLDSig and XAdES rendering, and RFC 3161 requests and
responses as bytes in and bytes out. The crate still reads no file and
opens no socket. - Stable codes for signing:
invalid_signing_key,
invalid_signing_certificate,signing_certificate_required,
signing_key_mismatch,document_not_signable,document_already_signed,
tsa_failed, andsign_failed, plus the warning
signed_dossier_unverified.document_not_found,invalid_output_path,
output_exists,unsafe_output_directoryandio_errorare reused with
their existing meanings. Additive:schema_versionstays1. - A
signrefusal in the golden matrix. A successful signing run cannot be a
golden: it needs a private key, and this repository commits none. openszigno sign --csc CONFIG.toml, a second signing backend: the digest of
the canonicalisedds:SignedInfois signed by a Cloud Signature Consortium
API v2 service, so a qualified certificate held by a remote signature
creation device, or in an EUDI Wallet, produces the same XAdES structure the
software signer does. Only the digest ever leaves the machine. The run does
info,credentials/listwhen no credential is named,credentials/info
withcertificates: "chain", then per signaturecredentials/authorize
with the real hash andnumSignatures: 1andsignatures/signHash; the
returned signature is verified locally against the returned certificate
before anything is written. Discovery is read frominforather than
compiled in, the algorithm comes from the credential's ownkey/algolist,
and the chain the service publishes becomesxades:CertificateValuesso
--chainstays optional.--csc-credential IDpicks one credential; the
requests go through the same bounded transportverify --onlineuses, and
the bearer token travels in theAuthorizationheader and nowhere else.
This round is non-interactive: anoauth2-mode credential is
csc_authorization_required, and the OAuth 2.0 rounds it needs are the
follow-upopenszigno csc login. See
Signing through a CSC service.- Stable codes for that backend: the errors
csc_config_invalid,
csc_unreachable,csc_rejected,csc_credential_ambiguous,
csc_credential_unusable,csc_authorization_requiredand
csc_signature_invalid, and the warningscsc_config_permissiveand
csc_key_unused.sign's JSONdata.signatures[]entries gainsigner
(softwareorcsc), and acscentry also carriescredential_idand
csc_specs.
Changed
- The extraction title sanitizer takes its rules from
openszigno-author, so
a titlecreaterefuses is exactly a titleextractwould refuse. No
behaviour ofextractchanged. authoris an accepted Conventional Commits scope
(scripts/commit-msg.sh,CONTRIBUTING.md).
openSzigno 0.6.0
openSzigno 0.6.0 adds openszigno skill, which prints the agent skill embedded in the binary: an Agent Skills document that teaches an AI agent how to inspect, extract, decrypt and verify dossiers with this CLI and how to report the result without overstating it. Install it with mkdir -p .claude/skills/openszigno && openszigno skill > .claude/skills/openszigno/SKILL.md. No JSON contract change.
Added
crates/openszigno-cli/skills/openszigno/SKILL.md, an Agent Skills
document that tells an AI agent how to drive the CLI on a dossier: the
always---jsonrule, exit statuses, the inspect, list, extract, decrypt
and verify workflow, the trust-material recipe, the check codes behind
mostindeterminateverdicts, and how to report a result without
overstating it. Linked from the README and the documentation index.openszigno skill, which writes that document to stdout byte for byte
and nothing else, so the single distributed binary carries the skill:
openszigno skill > .claude/skills/openszigno/SKILL.mdinstalls it with
no checkout. It takes noFILEand no--json, and emits no JSON
envelope.
A.gitattributesrule keeps Markdown at LF on every checkout, so the
embedded bytes are the same whichever host built the binary.
openSzigno 0.5.1
openSzigno 0.5.1 is a security patch release. verify now enforces the cardinality and order the XMLDSig schema fixes for the core signature structures, so a signature with a duplicate or out-of-order critical child fails sig_structure_invalid instead of being read by first match. CMS decryption applies implicit rejection to PKCS#1 v1.5 key transport, removing the padding oracle through outcome, error and coarse timing. No public API or JSON contract change.
Fixed
- The CI
hygienejob no longer re-checks commits that are already on
developwhen a release pull request promotesdeveloptomaster;
those passed the check on the pull request that landed them, and two
older commits predate the rule.
Security
verifystage A1 now enforces the cardinality and order the XMLDSig
schema fixes fords:Signature,ds:SignedInfoand eachds:Reference
before any critical child is read by name. Previously each child was
located by a first-match lookup, so a signature carrying a second
ds:SignatureValue,ds:SignedInfo, canonicalization or signature
method,ds:Transforms,ds:DigestMethodords:DigestValue, or one
whose children appeared out of order, was accepted: openSzigno read the
first copy and reported a passedsignature_value_okwhile another
consumer could read the other. Such a signature now fails
sig_structure_invalid, with a message naming the element and whether it
is a duplicate, out of order, or a child the schema does not allow there,
and the verdict isinvalid. The schema's extension points stay open:
ds:Objectandds:KeyInfocontent is unconstrained, so XAdES
qualifying properties are unaffected, and whitespace and comments between
children are ignored. See
docs/architecture.md.extract --decrypt-keyno longer reports that a PKCS#1 v1.5 wrapped
content-encryption key failed to unpad. The RSA key transport now rejects
implicitly, the mitigation OpenSSL 3.2+ ships as
RSA_PKCS1_IMPLICIT_REJECTIONand RFC 5246 section 7.4.7.1 prescribes: the
blinded private operation runs once, the block is unpadded in constant time
against the announced content cipher's key length, and any fault is answered
with a deterministic synthetic key derived from a per-key secret over the
ciphertext, after which content decryption runs unconditionally. A bad
wrapped key now fails as the content cipher does, with the same
decrypt_failedcode anddecryption failedmessage as a tampered body, so
a caller who submits chosen dossiers can no longer read a
Bleichenbacher/Marvin padding oracle (RUSTSEC-2023-0071) off the outcome,
the error, or the coarse timing. RSAES-OAEP takes the same shape. What
remains isrsa0.9's non-constant-time private exponentiation, which
blinding masks andrsa0.10 will retire; thedeny.tomlignore now covers
only that. See
SECURITY.md
and
docs/architecture.md.
One consequence: an unusable wrapped key is decrypted under the synthetic
key, so the failure surfaces further down. Almost always that is the content
cipher's padding, asdecrypt_failed; roughly once in 256 the padding of
garbage is valid by chance and the answer issource_size_mismatchinstead.
Decryption never asserted authenticity.
openSzigno 0.5.0
openSzigno 0.5.0 hardens --online (trust-gated fetching, destination policy, pinned DNS, bounded fetch rounds), tightens the verify contract (effective node set, strict RFC 3339 dates), and adds the quality gates that now guard every change: coverage floors, golden JSON contract tests, nightly mutation testing and fuzzing, semver checks, commit hygiene, and unused-dependency checks. Every source file is under 800 lines after two refactor rounds, and the docs were audited against the binary.
The openszigno-verify public API changed since 0.4.0 (new fields on SignatureCoverage and ChainEntry, a new RevocationPolicy variant, a renamed field); the minor bump covers it. The JSON envelope stays at schema_version 1.
Added
- The CI
semverjob runscargo-semver-checksforopenszigno-coreand
openszigno-verifyagainst the version already published on crates.io,
failing on a breaking API change unless the crate'sCargo.tomlversion
was bumped to cover it. See
docs/releasing.md for how this applies
to the pre-1.00.xcrates here. Theopenszigno-verifystep ran as
advisory until this release, becausedevelopcarried breaking API
changes relative to the published0.4.0(new public fields on
SignatureCoverageandChainEntry, a newRevocationPolicyvariant,
and a renamedSignatureCoveragefield); the0.5.0bump covers them
and both steps block again. - The CI
hygienejob, on pull requests only, runsscripts/commit-msg.sh
(now reusable with a file path or-for stdin, in addition to its
original hook mode) over every commit subject in the pull request's
range, skipping merge commits anddependabot[bot]/github-actions[bot]
commits, and requires the pull request body to contain a
Fixes/Closes/Refs LAB-<n>line unless the pull request is
bot-authored or labelledno-ticket. See
CONTRIBUTING.md. - The CI
lintjob now runscargo macheteto catch dependencies declared
in a manifest but never used. See
CONTRIBUTING.md for how to reproduce it
locally and how to record a dependency that is only reachable through a
macro or a feature. - Nightly fuzzing of the parsers with
cargo-fuzz: afuzz/package (LAB-268,
excluded from the workspace so it never touches the stable MSRV build) with
ten targets covering dossier parsing, payload decoding, CMS decryption,
C14N canonicalization, and CRL, OCSP, RFC 3161 timestamp, trusted-list, and
certificate parsing, each asserting only that the function under it never
panics..github/workflows/fuzz.ymlruns every target nightly and on
manual dispatch; a crash uploads the minimised reproducer and opens or
refreshes a tracking issue. See
docs/testing.md. - Golden output contract tests under
tests/golden/: the stdout and exit
status ofinspect,list,validate-structure,verifyandextract
over every fixture intests/fixtures/, in--jsonand human mode, plus
two trustedverifyruns over the signed XMLDSig vector.
scripts/golden.py check --bin <binary>diffs the built binary against
them andupdateregenerates them; the new CIgoldenjob and the release
smoke test both runcheck. Only two clock-dependent times are masked. A
diff is a change to the JSON envelope contract and is reviewed under the
schema_versionrule; see
tests/golden/README.md. --online-allow-privateonverify, which permits--onlineto contact
loopback, private, link-local and unique-local destinations and the name
localhost. It requires--online, waives the address rules and nothing
else, and exists for an internal CA that really does publish on the
operator's own network.policy.revocationhas a fourth value,online_no_anchors, for a run given
--onlinewith no trust anchor configured: nothing was fetched, and both the
revocation_policycheck and everyrevocation_status_unknownmessage now
say why rather than leaving the caller with an unexplained gap.scripts/check-file-length.py, run in CI's Documentation job, fails a
trackedcrates/*/src/*.rsfile over 800 physical lines or a
crates/*/tests/*.rsfile over 1500, with a shrink-only allowlist in
scripts/file-length-allowlist.txtfor files that already exceeded the
limit before the guardrail was added. See
CONTRIBUTING.md.clippy::too_many_linesis now a workspace lint, withclippy.toml
settingtoo-many-lines-threshold. See
CONTRIBUTING.md for the current
threshold and the plan to lower it.scripts/coverage_gate.py, run in CI's Coverage job, enforces a 90%
per-crate line-coverage floor, 80% patch coverage on lines a pull
request adds or modifies undercrates/*/src/(when at least 20
instrumentable lines changed), and a ratchet against
scripts/coverage-floors.txtso a crate cannot silently drop more than
1.0 point below its recorded coverage. The job posts and refreshes a
single PR comment with the summary. See
CONTRIBUTING.md..github/workflows/mutants.yml, a nightly (and manually dispatchable)
cargo-mutantsrun overopenszigno-coreandopenszigno-verify.
scripts/mutants_gate.pyenforces a ratchet against
scripts/mutants-floors.txt, the same model as the coverage floors: a
crate's caught-mutant percentage cannot drop more than 2.0 points below
its recorded value. It is not a required pull-request check; a gate
failure opens or refreshes a single "Mutation testing: survivors" issue
instead. See docs/testing.md.
Tests
- Behavioural tests for the first batch of
cargo-mutantssurvivors from the
LAB-267 seeding pass:decode.rs's compression-ratio boundary and ZIP
symlink guard,scan.rs's depth/node-limit and self-closing-tag
arithmetic,inventory.rs's first-occurrence match guards,
trust.rs'sTrustSource/RevocationSourceaccessors and further
parse_rfc3339boundaries, andscope.rs's signature-profile
node-ownership guard. Raised theopenszigno-coremutation floor from
89.46% to 91.12% (full-crate run) andopenszigno-verifyfrom 70.59% to
78.99% (the same--shard 1/4slice it was seeded from). See
docs/testing.md.
Changed
README.mdrestructured from 536 lines to a scannable front door. "Why and
for whom" now sits directly under the security boundary instead of behind
the installation block, and states what the tool offers agents, people, and
anyone handling hostile input. Installation is one block per channel, the
quick start is one human, one--json, and oneverifyexample, and the
command reference is a single table with each command's exit statuses. The
reference material moved out of it, deduplicated: the flag tables, the
global andextractflags, and the fullverifyflag table are now in
docs/architecture.md, which already held the JSON
envelope, the stable codes, the exit statuses, and the limits; the
"what is not supported yet" list is now a "Not yet implemented" section in
docs/roadmap.md, refreshed because M2 phase 2, M2 phase 3,
and M3 have all shipped since it was written. The README's LEGAL section no
longer claims that verification can report "onlyinvalidor
indeterminate", which stopped being true when revocation checking landed.- Internal module split of the CLI crate:
crates/openszigno-cli/src/main.rs
becameargs,input,response,render/,commands/,extract/, and
trust, and each unit test moved next to the code it covers. No behaviour
change — every flag, help text, message, stable code, exit status, and byte
of JSON and human output is what it was. See
docs/architecture.md. openszigno-verifywas split into one module per pipeline stage: internal
module split, no behaviour change.dsig.rsbecamereferences,scope,
countersign,signatureandcoverage;lib.rsnow reads as the
documented stages A to F with oneContextthreaded through them. Every
check code, status, message, ordering and JSON field is unchanged, and the
crate's public API keeps the paths it had. See
docs/architecture.md.- Second-round internal split of the five remaining oversized
openszigno-verifysources, moving code verbatim with no behaviour change:
certs.rsbecamecerts/(extensions,purpose,names,path),
revocation.rsbecamerevocation/(crl,ocsp,tiers),tsa.rs
becametsa/(token,imprint,path,tests),signature.rsgained
signed_infoandcollect, andtrustlist.rsbecametrustlist/
(parse,services,qualified). Every check code, status, message,
ordering and JSON field is unchanged, and every public item keeps its old
path throughpub usere-exports. Noopenszigno-verifysource file is
named in `scripts/file-l...
openSzigno 0.4.0
Added (M4: decryption of encrypted payloads)
-
extract --decrypt-key FILEdecrypts documents whose transform chain
containsencrypt. The specification calls that transform "S/MIME
encryption" and names no algorithm; Microsec's owneszigno3reference CLI
documents itscm_decryptas RFC 5652 CMS and exports per-recipient
encrypted keys, so the decoded payload is read as a DERContentInfo
carryingid-envelopedData. The supported subset is
KeyTransRecipientInforecipients named byissuerAndSerialNumberor
subjectKeyIdentifier, RSAES-PKCS1-v1_5 and RSAES-OAEP (MGF1 with
SHA-1/256/384/512) key transport, and AES-128/192/256-CBC content
encryption. See
docs/architecture.md.openszigno extract encrypted.es3 --output ./out \ --decrypt-key recipient.key.pem --decrypt-cert recipient.cert.pem
-
--decrypt-cert FILE, PEM or DER, is the certificate that makes a CMS
recipient recognisable; it may be omitted when a PEM key file carries the
certificate alongside the key. It is checked against the key, and a
certificate that does not belong to it isdecryption_key_mismatch. -
--decrypt-passphrase-file FILEand the environment variable
OPENSZIGNO_DECRYPT_PASSPHRASEsupply the passphrase of an encrypted
PKCS#8 key; the file wins when both are set, and one trailing newline is
stripped from the file. No flag takes a key or a passphrase as an argument
value, becauseargvis readable by other processes and lands in shell
history. All three of key, certificate, and passphrase files are capped at
1 MiB. -
--allow-legacy-ciphersadditionally decrypts DES-EDE3-CBC content.
It is off by default because 3DES is weak, and available because it is what
the Microsec reference tool encrypted with by default; without the flag such
a document isdocument_skipped_legacy_cipher, with the OID named. -
New JSON. Each
extractextractedentry gainsdecrypted, and
extract --stdoutgains the same field in itsdata. It istruewhen an
encrypttransform was reversed.schema_versionstays1; both are
additive. -
New error codes.
invalid_decryption_key,
invalid_decryption_certificate,decryption_certificate_required, and
decryption_key_mismatch(exit 4, raised before the dossier is decoded);
invalid_cmsanddecrypt_failed(exit 5).decrypt_failedcarries the
fixed messagedecryption failedand never says which step failed, because
telling a bad RSA unwrap from bad padding is what a padding oracle is made
of. -
New warning codes.
document_skipped_no_matching_recipient,
document_skipped_unsupported_cipher, and
document_skipped_legacy_cipher. All three are skips at exit 0: a dossier
may legitimately hold documents addressed to several people, andextract
gives the caller the ones they can read. -
Key handling guarantees, stated in
SECURITY.md and covered by a test:
key bytes, the passphrase, and anything derived from them appear on neither
stdout nor stderr nor in the JSON envelope, on a successful or a failing run;
key and passphrase buffers are zeroed on drop; nothing is ever transmitted.
Changed (M4)
capabilities.encrypted_extractionininspect --jsonis now the string
"with_key", notfalse.inspectis never given a key, so it can only
report that the tool can decrypt whenextractis given one. A consumer that
tested the field for truthiness now sees a truthy value, which is the correct
answer; one that compared it tofalsemust compare it to"with_key".
schema_versionstays1: the field kept its name and its meaning, and the
other capability fields stay boolean.encryptis now only recognised in the position the specification puts
it. The forward chain is fixed aszip? -> encrypt? -> base64, so
encrypt -> base64andzip -> encrypt -> base64are encrypted documents
andencryptanywhere else isunsupported_transform_chain/
document_skipped_unsupported_transformrather than
encrypted_document_unsupported/document_skipped_encrypted. Nothing
becomes extractable that was not before.encrypted_document_unsupportedis not emitted by a run that holds a
decryption key, because it would be untrue; what happened to each document
is reported per document instead. Its message now points at
extract --decrypt-keyrather than saying the document cannot be extracted.- The
RUSTSEC-2023-0071note indeny.tomlwas rewritten: the tool now
does perform an RSA private-key operation, locally, with a key the operator
supplied, for the length of oneextractrun. Exploiting the advisory needs
an attacker who can time that run on the operator's own machine, which is
outside the threat model; the ignore is still to be revisited whenrsa0.10
is stable. - New dependencies, all MIT OR Apache-2.0:
aes,cbc,cipher,cms
(already used byopenszigno-verify),des,pkcs8withencryption
(which bringspkcs5,pbkdf2,scrypt,salsa20), andzeroize.
rand_chachaandrand_coreare test-only.cargo deny checkpasses. - The decryption tests generate their RSA keys at run time, from a fixed
seed throughChaCha20Rng, once per test binary. No private key, in any
encoding, is committed to this repository, and no line of it spells a
complete PEM private-key armour header: a secret scanner cannot tell a
synthetic key from a real one, so the project stores none and allowlists no
scanner rule. rsa,num-bigint-dig,scrypt,salsa20, andsha2are built at
opt-level = 3in the dev profile. Generating an RSA key and running a
PKCS#8 key derivation unoptimized costs seconds each, which is what
generating test keys at run time would otherwise have added to every test
run. The code under test is not optimized, and release builds are unchanged.
Not implemented, deliberately (M4)
- PKCS#12 (
.p12/.pfx) keystores. Convert withopensslfirst; the
commands are in
docs/architecture.md. A keystore parser
is attack surface for a step the operator does once. - PKCS#11. A key on a smart card or HSM cannot be used.
RecipientInfoforms other thanktri. A key-agreement (kari)
recipient reads as no matching recipient rather than as a named unsupported
algorithm.- RFC 5083
AuthEnvelopedData(AES-GCM). Recognised only to be skipped.
Nothing in the specification or the reference CLI suggests it is produced. - MIME-wrapped CMS. No available source says whether any producer wraps the
message in MIME headers instead of emitting bare DER under the Base64
transform. Bare DER is what is read; anything else isinvalid_cmsrather
than a guess. es:RecipientCertificateList. The element is optional and advisory; the
authoritative recipient list is the CMSRecipientInfos, which is what the
matching uses.
Added (M3: container timestamps, online revocation, trusted-list identities)
- Unverified signature inventory in
inspectandlist. The structural
model now describes everyds:Signatureand containeres:TimeStampa
dossier carries, built at parse time from the XML alone. Per signature:
id,placement(document,dossier,nested_in_signature,other),
document_index,parent_signature_id,canonicalization_method,
signature_method,digest_methods,reference_count,reference_uris
(same-document fragments, at most 16),xades_namespace,
xades_properties(at most 32),evidence(element counts of certificates,
CRLs, OCSP responses, signature timestamps, and archive timestamps),
claimed_signing_time, andkey_info_certificates. Per container
timestamp:placement,document_index,include_count, andhas_token.
It appears asdossier.signature_inventoryin both commands' JSON, always
beside"verified": false, and humaninspectprints one(unverified)
line per entry. None of it is verified: no cryptography is performed,
nothing is decoded, no certificate value is read, and no reference is
resolved. It reports what a dossier claims, never whether the claim is true;
verifyremains the only command that answers that.signatures_present
andtimestamps_presentare unchanged, andverifyis untouched. The
inventory describes at most 64 signatures and 64 container timestamps; a
dossier with more produces the new structural warning
signature_inventory_truncated, which, like every structural warning,
changes no exit status. extract --document <SELECTOR>, repeatable, extracts only the documents
it names. A selector is either#<index>in source XML order or an exact
object_ref— theds:ObjectIdtheDocumentProfileOBJREFpoints at.
Matching is exact; a prefix matches nothing, so a selector cannot change
meaning as a dossier grows. An unmatched selector isdocument_not_found
(exit 4) and one matching several documents isdocument_ambiguous
(exit 4). Selectors never reach into an embedded dossier: a selector shaped
like adossier_path(2/0) is refused with a message saying to extract
the embedded dossier and runextracton the resulting file. Everything
else is unchanged for the selected documents — the limits, naming and
deduplication, no-clobber semantics, all-or-nothing rollback, and recursion
into a selected embedded dossier.skipped_countcounts only documents
skipped for capability reasons among the selection.extract --stdoutwrites one document's decoded payload bytes to
standard output, byte for byte, with nothing else on the stream and every
diagnostic on stderr; no file is written. It needs exactly one resolved,
decodable document: anything else is `stdout_requires_singl...
openSzigno 0.3.0
Added (M2 phase 3: revocation and EU trusted lists)
verifycan now report a signaturevalid, and exits0when it does.
Reaching it needs all of: a structurally sound signature whose references and
signature value verify under the pinned policy, a signed
SigningCertificatebinding, a path to a configured anchor at the validation
time, a fully verifiedxades:SignatureTimeStamp, and fresh non-revoked
status for every non-anchor certificate on both the signer's and each
timestamp authority's chain.validmeans every check this build makes
passed at the stated validation time; it is not a legal opinion. See
SECURITY.mdanddocs/architecture.md.- Offline revocation checking (stage E). Data is taken from the signature's own
xades:RevocationValues(CRLValues/EncapsulatedCRLValueand
OCSPValues/EncapsulatedOCSPValue, in every recognised XAdES namespace)
and from--revocation-store DIR, in that order, with OCSP asked before CRLs
within each tier. Embedded data is untrusted input: every CRL and every OCSP
response is signature-checked against an authorised issuer before it is
believed.- CRLs per RFC 5280 section 6.3: issuer match, signature by the issuing CA or
by a delegate that CA issued which assertscRLSign,thisUpdateand
nextUpdateagainst the validation time with no grace period, and
scope viaissuingDistributionPoint. Delta CRLs, indirect CRLs, scopes
restricted to reasons or attribute certificates, partitioned CRLs the
certificate does not name, entries carryingcertificateIssuer, and any
other critical CRL extension all fail closed.certificateHoldcounts as
revoked. - OCSP per RFC 6960: response status, responder identity
byNameorbyKey,
authorisation as the issuing CA or a delegate carryingid-kp-OCSPSigning,
signature under the pinned allowlist,certIDmatching, and freshness. The
nonce is deliberately ignored, because offline validation replays a
response produced for someone else's request. SHA-1 is accepted in the
certIDand nowhere else, documented indocs/architecture.md. - A revocation dated after the validation time yields the distinct
cert_revoked_after_validation_time(unknown), notcert_revoked. - New codes:
revocation_policy(info),revocation_ok(passed),
cert_revoked(failed),cert_revoked_after_validation_time,
revocation_status_unknown,revocation_data_stale,
revocation_data_invalid(allunknown).revocation_not_checkednow
means only "the caller passed--no-revocation".
- CRLs per RFC 5280 section 6.3: issuer match, signature by the issuing CA or
- ETSI TS 119 612 trusted lists via
--trust-list FILE(repeatable). Every
X509Certificatein the service digital identity of a granted CA/QC or
TSA/QTST service becomes a trust anchor carrying the service's status
timeline, and the status in force at the validation time decides whether
a path ending there is trusted.--trust-list-signer CERTverifies the
list's own enveloped XMLDSig signature with the same core, backend and
allowlists a dossier gets; without ittrust_list_unverified(unknown)
blocks avalidverdict. Nothing is fetched. New codes:
trust_list_loaded,trust_list_unverified,trust_list_signature_ok,
trust_list_signature_invalid,certificate_qualified,
certificate_not_qualified,certificate_qualified_unknown. --lotl FILEreads the EU list of trusted lists and takes the national
lists' signing certificates from itsPointersToOtherTSLentries, so one
out-of-band certificate bootstraps the verification of every--trust-list.
The LOTL is verified against--trust-list-signerfirst, and only then are
its pointers trusted; its owntrust_list_unverifiedcheck still blocks when
it could not be verified. The LOTL contributes no trust anchors of its own.- Qualified status is determined over the whole validated chain, not over
its anchor: a chain is qualified when some certificate in it is, or was
issued by, the service digital identity of a granted CA/QC service. Real
trusted lists name the issuing CAs, which are intermediates, while the root
is usually a certificate the operator pinned into--trust-store, so an
anchor-only rule answers "not determined" for every real dossier. The signer's
QCStatementsmay then contradict the list: a post-eIDAS certificate whose
extension is present but omitsQcCompliance, or will not parse, yields
false; one carrying no such extension denies nothing and rests on the list.
qualified_servicenames the service that matched.null, neverfalse,
when no trusted list was consulted. - New flags:
--trust-list FILE,--lotl FILE,--trust-list-signer CERT,
--revocation-store DIR,--no-revocation. New error codes
trust_list_invalidandrevocation_store_invalid(exit 3). - New JSON fields:
policy.trust_lists[](territory, sequence number, issue
date, next update, anchor count, whether the list's signature was verified);
signatures[].qualifiedandsignatures[].qualified_signature_device;
signatures[].qualified_service;chain[].trust_anchor_origin
(trust_storeortrust_list, preferringtrust_listwhen a certificate is
both); andchain[].revocationwithstatus,code,source(embedded_crl,
embedded_ocsp,store_crl,store_ocsp),revocation_time,reason,
this_update,next_update, andproduced_at.schema_versionstays1:
these are additions, and no existing field's contract changed. docs/trust.md: how to obtain, pin and lay out trust anchors, trusted lists,
CRLs and OCSP responses, how qualified status is decided, and what makes
revocation data unusable.
Changed (M2 phase 3)
- New check status
info, for checks that report rather than decide. It is
the only non-blocking status, which makes "unknownalways blocks" true
without exception. Consumers must treat an unrecognised code as blocking
unless its status ispassedorinfo. Moved fromunknownorskippedto
info:signing_time_present,cert_key_usage_advisory,
signature_timestamp_present,xades_signature_policy_implied,
xades_signature_policy_explicit,xades_not_validated,
archive_timestamp_presentanddossier_timestamp_not_validated. skippednow means only "a check the policy requires was not performed",
and nothing else is filed under it. A property this build reads but does not
act on, and evidence it declines to re-verify, areinfo: they did not fail
to answer a required question. Blocking on them capped a signature at
indeterminatefor carrying more evidence than the minimum, which is
precisely backwards — an unsigned qualifying property cannot change what a
signature says, an archive timestamp is laid on top of one, and a
dossier-leveles:TimeStampis a statement about the container rather than
about any signature in it. The three remainingskippedemitters are
xades_absent,timestamp_not_checkedandrevocation_not_checked.
xades_not_validatedandarchive_timestamp_presentare omitted entirely
when there is nothing to report.cert_revoked_after_validation_timeisinfowhen the validation time was
proven by a fully verifiedxades:SignatureTimeStamp, andunknownwhen
it was merely asserted by--ator the clock. This is the ETSI EN 319 102-1
best-signature-time rule: a signature that demonstrably existed at an instant
is not undone by a certificate being withdrawn afterwards, whereas a caller
can pass any--atthey like. Neverpassedeither way; the time and reason
are always reported, and the chain entry's own status reads
revoked_after_validation_time. A timestamp authority's chain is always
treated as asserted, because the instant it is validated at is thegenTime
the token itself claims.- Revocation summary messages now name which chain they are about — the
signer's or a timestamp authority's — since a signature emits one per chain
under the same code. - Embedded validation data is now harvested from
xades141:TimeStampValidationDataas well as from a plain
xades:RevocationValues/xades:CertificateValues, for both CRLs, OCSP
responses and certificates. Real long-term Microsec dossiers file almost all
of their embedded OCSP responses in the former, so the previous reader found
nothing in most real material. - The revocation coverage message now names which certificate lacks data, by
role and by the public CA names around it, and repeats that certificate's CRL
distribution point when it publishes one. The end-entity certificate's own
subject is still never repeated. timestamp_verifiednow summarises a token's checks excluding its
revocation checks, which are folded into the signature's verdict separately
so they are counted once. An unobtainable revocation answer for a TSA no
longer stops itsgenTimefrom becoming the validation time; a TSA
certificate that was actually revoked still sinks the signature.TrustSource::anchorsnow yieldsTrustAnchorvalues carrying their origin
and any trusted-list service record, andRevocationSourcegainedcrls
andocsp_responses. Both are breaking changes to theopenszigno-verify
public API.
Added (M2 phase 2: XAdES signed properties and RFC 3161 timestamps)
crates/openszigno-verify/tests/vectors.rsand
tests/fixtures/xmldsig/: verification vectors this project did not
produce. Canonical forms transcribed from Canonical XML 1.0 (sections 3.2,
3.4, 3.6) and Exclusive XML Canonicalization 1.0 (section 2.2) with the
section cited at each, plus a complete signed dossier whose reference
digests andds:SignatureValuewere computed by OpenSSL and Python over
canonical octets written out by hand. The in-tests signer shares the
canonicalizer under test, so a shared mistake cancels out the...
openSzigno 0.2.0
Added (M2 phase 1: verify for XMLDSig signatures)
- New crate
openszigno-verify: canonicalization, the XMLDSig core, the pinned
algorithm policy, and RFC 5280 certificate-path validation. Pure Rust,
forbid(unsafe_code), no network, and no I/O except through the injected
Clock,TrustSource, andRevocationSourcetraits. openszigno verify FILE [--json] [--trust-store DIR] [--at RFC3339] [--allow-namespace URI]. It verifies everyds:Signature: canonicalization,
reference digests,ds:SignatureValue, the mandated e-dossier reference
scope, and the certificate path to a configured anchor.- This release can never report a signature as
valid. Revocation and
timestamps are emitted as blockingskippedchecks
(revocation_not_checked,timestamp_not_checked), which caps every verdict
atindeterminate.invalidis reachable and meaningful;indeterminate
means "nothing that was checked failed", not "trustworthy". The human output
says so on every run, and a test asserts it. - Canonical XML 1.0 and Exclusive XML Canonicalization 1.0, each with and
without comments, implemented in-tree behind aC14nBackendtrait over the
roxmltreetreeopenszigno-corealready builds. Canonical XML 1.1 and any
other algorithm are refused withc14n_unsupportedrather than approximated. - Pinned algorithm policy: SHA-256/384/512 digests; RSA PKCS#1 v1.5 and RSA-PSS
with those digests and a modulus of at least 2048 bits; ECDSA P-256 with
SHA-256 and P-384 with SHA-384. SHA-1, MD5, DSA, every HMAC method, short RSA
keys, and a curve that does not match the named digest are rejected rather
than warned about (algorithm_rejected). - Transform allowlist: enveloped-signature, the four canonicalization
algorithms, and base64. XSLT, XPath, and XPath Filter 2.0 are refused
unconditionally (transform_not_allowed). - Strictly same-document reference resolution through the ID space
openszigno-corevalidates, so a duplicate ID stays a parse error and no
reference can reach the network or the filesystem (reference_external,
reference_unresolved). - Reference-scope enforcement against the e-dossier placement rules
(reference_scope_complete/reference_scope_incomplete/
reference_scope_unknown), the container-aware defence against XML signature
wrapping. Each reference's resolved location is reported as a path of element
names inresolved_to. - Hand-written certificate-path validation on
x509-cert: bounded path
building, link signatures under the algorithm allowlist, validity at the
validation time,basicConstraints,pathLenConstraint,keyUsage, name
constraints, and rejection of unrecognised critical extensions. With no trust
store the answer iscert_path_unknown(statusunknown), never
untrusted. --trust-store DIRreadinganchors/*and optionalintermediates/*as PEM
or DER; a directory of certificates with noanchorssubdirectory is read as
anchors. A file that does not parse, or a store with no anchor, is
trust_store_invalid(exit 3) rather than a silently partial store.--at <RFC3339>sets the validation time; both the requested and the
effective time are reported.- Exit statuses
6(at least one signature isinvalid) and7(nothing
invalid, overall verdictindeterminate). A structural failure during
verifystill exits 4. --allow-legacy-algorithmsadmits SHA-1 digests and RSA-SHA1 signature
methods for diagnosis only, because Hungarian dossiers span 2007 to today.
They emitalgorithm_legacy_allowedwith statusunknownrather than a
passed check, so the verdict stays capped atindeterminateand the flag can
only ever lower a verdict. MD5, DSA, every HMAC method, and RSA keys below
2048 bits stay refused whatever it is set to, and certificate-path validation
is not loosened at all.- Reference-scope matching follows what real dossiers contain: the signature's
own profile object is located by content and satisfied by a reference to
either theds:Objectholding anes:SignatureProfile(in any allowed
dossier namespace) or to that element itself, in either object order; and
xades:SignedPropertiescoverage is decided by what a reference resolves
to — the element in any recognised XAdES namespace (1.1.1, 1.2.2, 1.3.2,
1.4.1) or an ancestor of it — with theTypeattribute as corroboration
only, since an attacker controls it. A reference that declares the
SignedPropertiesTypewithout resolving to one is named in the failure
message. references[].resolved_tois populated by the resolution stage, so a caller
sees what every URI pointed at even when the run stopped at a policy failure
before any digest was recomputed.- Candidate certificates are harvested from
xades:CertificateValues(and any
otherxades:EncapsulatedX509Certificateunder the signature's XAdES
properties, in every recognised namespace) as well asds:KeyInfo, which is
what real dossiers need: they carry only the signer inds:KeyInfoand the
intermediates and root inCertificateValues. Only the trust store can
supply an anchor — a self-signed root found inside a dossier is an
untrusted candidate like any other. A non-self-signed file in the trust store
is an extra untrusted intermediate; theanchors/andintermediates/split
is a convention, and the verifier classifies what it is given. - Each
chainentry now reportssubject_cn,issuer_cn,serial_hex,
not_before,not_after,is_trust_anchor, andsource(key_info,
certificate_values, ortrust_store). Acert_path_untrustedfailure says
how many candidates were considered and names the issuer CN that could not be
chained, which is the public CA name a caller needs to add to their store. - The signing certificate is selected as the
ds:KeyInfocandidate whose key
actually verifiesds:SignatureValue, not the first one listed: XMLDSig
imposes no order and real material lists the issuer first, which used to
cause a falsesignature_value_invalid. The choice is reported as
signing_certificate_index, and a total failure says how many were tried. xades:SigningTimeis extracted intosignatures[].signing_time, normalised
to RFC 3339 UTC, with the newsigning_time_presentcheck. It is a claim:
it never becomes the validation time, which stays--ator the clock, and it
is unauthenticated until phase 2 binds it to a timestamp.- Same-document reference dereferencing now removes comments before transforms
run, as XMLDSig 4.4.3.3 requires, so a with-comments transform cannot let an
inserted comment change a digest. - Path building is bounded by a hard budget of 256 total search expansions, not
just by completed paths: a bag of same-named certificates that never reaches
an anchor used to be explored exponentially. Hitting the budget is the new
cert_path_search_exhausted, which says the tool stopped looking rather than
that no path exists. - Name constraints follow RFC 5280 section 4.2.1.10 and fail closed. URI
subtrees are matched against the URI's host rather than by substring, so
https://evil.test/example.comno longer satisfiesexample.com; dNSName
and rfc822Name match on label boundaries;iPAddresssubtrees are evaluated
as address and mask instead of ignored; and an unimplemented constraint form,
an unevaluable name, or a permitted subtree of a type the certificate carries
but does not match are all violations. - Critical extensions are accepted only where their semantics are implemented:
basicConstraints,keyUsage,nameConstraints,subjectAltName, and
extendedKeyUsage.certificatePolicies, QCStatements,
cRLDistributionPoints, andauthorityInfoAccessmarked critical now fail
closed. A criticalextendedKeyUsagemust containanyExtendedKeyUsage,
since no standard EKU authorises document signing. - A malformed extension is
cert_malformedrather than an absent one: a
corruptkeyUsageornameConstraintsno longer silently vanishes. - Trust-store entries are parsed as X.509 certificates at load time, so one
malformed entry among good ones fails the whole store, matching the
documented all-or-nothing behaviour. The message names the entry's ordinal,
never the file. openszigno-core:XmlSourceandid_mapare public, androxmltreeis
re-exported, so the verifier resolves references in exactly the tree the
structural parser saw.parseis refactored onto the same entry point with
no behaviour change.
Changed (M2)
AGENTS.md,README.md,SECURITY.md,docs/architecture.md, and
docs/roadmap.mdstate the new boundary:verifymay reportinvalidbut
nevervalid. The warningcryptographic_verification_not_performedkeeps
its meaning forinspect,list,extract, andvalidate-structure, and
is deliberately not emitted byverify.deny.tomlignores RUSTSEC-2023-0071 with a written reason: the Marvin-attack
advisory coversrsa's non-constant-time private-key operation, no fixed
release exists, and openSzigno never holds an RSA private key — signing is a
permanent non-goal and only the public-key verification path is shipped. No
license allowlist change was needed; every new dependency is MIT, Apache-2.0,
BSD-3-Clause, ISC, Unicode-3.0, or Zlib.
Added
- Distribution channels for the CLI: a shell installer, a PowerShell
installer, a Homebrew formula in thewatt-mind/homebrew-taptap,
cargo binstallsupport through[package.metadata.binstall], and a
ghcr.io/watt-mind/openszignocontainer image builtFROM scratchfor
linux/amd64andlinux/arm64with a build-provenance attestation. docs/releasing.md, describing how a release is cut, what each workflow
produces, the required secrets, and how to rehearse a release with a
prerelease tag.- crates.io metadata (
readme, ...
v0.1.0
What's Changed
- chore: close factory-audit gaps and fix macOS-only test failures by @hdkiller in #7
- feat: M1 compatible namespaces, nested dossiers, content sniffing by @hdkiller in #8
- ci: stop Dependabot from bumping the MSRV toolchain pin by @hdkiller in #9
- chore(deps): bump actions/upload-artifact from 4 to 7 by @dependabot[bot] in #1
- chore(deps): bump actions/checkout from 4 to 7 by @dependabot[bot] in #4
- chore(deps): bump softprops/action-gh-release from 2 to 3 by @dependabot[bot] in #5
- chore(deps): bump actions/download-artifact from 4 to 8 by @dependabot[bot] in #6
- chore(deps): bump base64 from 0.22.1 to 0.23.1 by @dependabot[bot] in #3
- chore: add public GitHub issue templates and intake rule by @hdkiller in #10
- docs: add the reference library index by @hdkiller in #12
- chore: cut the 0.1.0 changelog and ignore the local refs cache by @hdkiller in #11
- release: 0.1.0 by @hdkiller in #13
New Contributors
- @hdkiller made their first contribution in #7
- @dependabot[bot] made their first contribution in #1
Full Changelog: https://github.com/watt-mind/openSzigno/commits/v0.1.0