Skip to content

Add e_qcstatem_psd2_ncaid_format: NCAId syntax check for PSD2 QCStatements - #1074

Open
christopher-henderson wants to merge 9 commits into
e_qcstatem_psd2_validfrom
e_qcstatem_psd2_ncaid_format-pr
Open

Add e_qcstatem_psd2_ncaid_format: NCAId syntax check for PSD2 QCStatements#1074
christopher-henderson wants to merge 9 commits into
e_qcstatem_psd2_validfrom
e_qcstatem_psd2_ncaid_format-pr

Conversation

@christopher-henderson

@christopher-henderson christopher-henderson commented Aug 9, 2026

Copy link
Copy Markdown
Member

Adds e_qcstatem_psd2_ncaid_format that checks a PSD2 QCStatement's NCAId matches the required <country>-<identifier> syntax (ETSI TS 119 495, GEN-5.2.3-2/GEN-5.2.3-5).

Integration corpus (789,896 certs) found 2 real-world errors: same issuer/subject (Firmaprofesional, eurobits.es), NCAId "BE" missing its country prefix (should be "ES-BE"). Recorded as expected.

- Add QcStmtEtsiPsd2NcaIdPspCbValidCert01.pem fixture and Pass case to
  cover the previously-untested IdEtsiPsd2RolePspCb carve-out branch.
- Assert out.Details (not just out.Status) for the three Error fixtures.
- Add QcStmtEtsiPsd2WrongEncodingCert01.pem as an Error case to cover the
  structural-deferral branch (GetErrorInfo() != "") in Execute.
Full integration corpus (789,896 certs): 2 certificates from the same
issuer/subject (Firmaprofesional, eurobits.es, PSD2 role PSP_AI) have
NCAId = "BE" -- missing the required <country>-<identifier> structure
(should be "ES-BE", per the same cert's subject:organizationIdentifier
of PSDES-BE-6887). A genuine pre-existing issuer error, not a false
positive.
Repoint Citation and the embedded clause text at V1.8.1 (2026-04), and
add GEN-5.2.3-5 (the NCAId "NA" carve-out) to the formal Citation field
-- it was only mentioned in the comment before. The block comment had
also been quoting V1.8.1's wording ("ISO 3166-1", "Competent Authority")
while labeled as V1.1.2, which actually reads "ISO 3166", "NCA country".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant