Skip to content

Commit

Permalink
Merge pull request #832 from /issues/829-ica-npe
Browse files Browse the repository at this point in the history
Fix #829: Potential null pointer exception in ICACertificateParser
  • Loading branch information
romanstrobl authored Aug 28, 2020
2 parents c2ba484 + c171fec commit 9849eb0
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ public CertInfo parse(String certificatePem) throws CertificateException {
}
final ASN1Primitive qcStatementAsn1Primitive = JcaX509ExtensionUtils.parseExtensionValue(qcStatement);

if (qcStatementAsn1Primitive == null) {
throw new CertificateException("Unable to extract PSD2 mandates from extension value.");
}

final DLSequence it = ((DLSequence) qcStatementAsn1Primitive);

Set<CertInfo.PSD2> psd2Mandates = new HashSet<>();
Expand Down

0 comments on commit 9849eb0

Please sign in to comment.