step-examples/12-1b-header/Lh042.stp
Sources
- 16-iso-spec ISO 10303-21 Ed.3 §9 (SIGNATURE position)
Description
Edition-3 places SIGNATURE near end-of-file by convention so the signed content is fully known at signature time. A producer placing SIGNATURE before DATA either signed an empty file or computed the signature over content not yet emitted. Receivers must reject as inconsistent or warn that the signature does not cover the full payload.
Reproducer recipe
HEADER → SIGNATURE → DATA → END (SIGNATURE before DATA).
Expected kernel behavior
reject section ordering where SIGNATURE precedes DATA, or, in tolerant mode, document that the signature covers only the prefix.
Notes
Cross-oracle: pure-Python Part-21 validator accepts (`accept`); OCCT rejects (`reject`). OCC enforces stricter framing than the spec text requires. Synonyms: "SIGNATURE before DATA section", "STEP signed empty content", "SIGNATURE at top of file", "signature over zero-content STEP", "STEP signature placement wrong".
Expected validation
occt=reject/reject gmsh=reject ifc=schema_n/a
Byte assertions
matches(rb'(?s)SIGNATURE;.*DATA;')contains(b'SIGNATURE') and contains(b'DATA')
Tier-3 assertions
load != "ok"
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Lh042 - SIGNATURE section appearing BEFORE the DATA section it 3 * is supposedly signing (order ambiguity) 4 * Defect: Edition-3 places SIGNATURE near end-of-file by convention 5 * (so the signed content is fully known at signature time). A 6 * producer placing SIGNATURE before DATA either signed an empty 7 * file or computed the signature over content not yet emitted. 8 * Receivers must reject as inconsistent or warn. */ 9HEADER; 10FILE_DESCRIPTION(('Lh042 - SIGNATURE before DATA'),'2;1'); 11FILE_NAME('Lh042.stp','2026-04-26T00:00:00',(''),(''), 12 'cad-research-suite','',''); 13FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 14ENDSEC; 15SIGNATURE; 16'algo=sha-256; payload=DEADBEEF00000000000000000000000000000000000000000000000000000000;'; 17ENDSEC; 18DATA; 19#1=APPLICATION_CONTEXT('automotive_design'); 20#10=CARTESIAN_POINT('origin',(0.0,0.0,0.0)); 21ENDSEC; 22END-ISO-10303-21;