adorsys / xs2a

Open Source NextGenPSD2 XS2A Implementation from adorsys.
https://adorsys.com/en/products/
GNU Affero General Public License v3.0
132 stars 62 forks source link

A certificate can contain multiple qcStatements in a sequence #15

Closed spark404 closed 5 years ago

spark404 commented 5 years ago

As far as i understand the certificate specs, multiple qcStatements can be present in a certificate. This patch changes the validator behaviour to account for this (and at the same time support the current test certificate)

guymoyo commented 5 years ago

You are right, I make a review on the spec ("The PSD2 specific attributes shall be included in a QCStatement within the qcStatements extension as specified in clause 3.2.6 of IETF RFC 3739 [6].")

Thanks for the contribution, it will be merged.

DG0lden commented 5 years ago

Hello Hugo,

could you please swap lines 40-43 of de.adorsys.psd2.validator.common.PSD2QCStatement, so that our quality checks pass: "Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes.."

DG0lden commented 5 years ago

Tests in error: CertificateExtractorUtilTest.testExtractCertDataValidCert:46 » ArrayIndexOutOfBounds