Whole file

wbond/asn1crypto

The author described this change as Fix Clearance type definition. It counts as a record because the check below fails on the code as it stood at 9ae350f21 and passes on a16a146a1, with nothing else changed between the two runs.

Fix saved2021-12-05
Sharing licenceMIT · LICENSE
Change size+3 3

What the code was meant to do, written into the code itself as a save note

Fix Clearance type definition

The change

347347
348348 class Clearance(Sequence):
349349 _fields = [
350- ('policy_id', ObjectIdentifier, {'implicit': 0}),
351- ('class_list', ClassList, {'implicit': 1, 'default': 'unclassified'}),
352- ('security_categories', SetOfSecurityCategory, {'implicit': 2, 'optional': True}),
350+ ('policy_id', ObjectIdentifier),
351+ ('class_list', ClassList, {'default': set(['unclassified'])}),
352+ ('security_categories', SetOfSecurityCategory, {'optional': True}),
353353 ]
354354
355355

The check that tells the two apart

failpass·tests/test_cms.py::ClearanceTests::test_clearance_decode_bad_tagging

Check file tests/test_cms.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before it9ae350f212532dfee7f185f6b3eda24753249cf3
Broken version dated2021-10-15
Moduleasn1crypto.cms
Units changedClearance
Fingerprintcbb3f98865790214
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in wbond/asn1crypto