Add e_qcstatem_psd2_valid: structural encoding check for PSD2 QCStatements - #1073
Open
christopher-henderson wants to merge 8 commits into
Open
Add e_qcstatem_psd2_valid: structural encoding check for PSD2 QCStatements#1073christopher-henderson wants to merge 8 commits into
christopher-henderson wants to merge 8 commits into
Conversation
- Assert the exact Details string for the Error case in TestEtsiQcStatemPsd2Valid so the test still catches a regression in the ASN.1 re-encoding check, not just a change in lint status. - Add TestParseQcStatemPsd2UnmarshalFailure to cover the previously untested "asn1.Unmarshal fails outright" branch of the PSD2 case in ParseQcStatem, using truncated statementInfo bytes. - Rename EtsiTS119495_V1_1_2_Date to EtsiTs119495_V1_1_2_Date to match the mixed-case naming convention used by sibling ETSI date constants.
This was referenced Aug 9, 2026
This was referenced Aug 9, 2026
Open
… ETSI edition Annex A of ETSI TS 119 495 declares NCAName, NCAId, and RoleOfPspName as UTF8String (SIZE(1..256)), and clause 5.1's GEN-5.1-3 makes ASN.1 conformance with Annex A mandatory. util.ParseQcStatem only checked ASN.1 re-encoding round-trip for the PSD2 statement, never field length, so a QCStatement with an empty or oversized NCAName/NCAId/ RoleOfPspName incorrectly passed e_qcstatem_psd2_valid. Also repoint the lint's Citation and embedded ASN.1/GEN-5.1-3 text at V1.8.1 (2026-04), the current edition, instead of V1.1.2. The requirement text is unchanged across every edition checked (V1.1.2 through V1.8.1), so EffectiveDate stays at V1.1.2's 2018-07-01 -- that's still when the requirement first became binding on certificates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
e_qcstatem_psd2_validthat checks a PSD2 QCStatement (ETSI TS 119 495 Annex A, embedded in a certificate's QcStatements extension) is structurally well-formed ASN.1.