Skip to content

Commit

Permalink
Fix #829: Potential null pointer exception in ICACertificateParser
Browse files Browse the repository at this point in the history
  • Loading branch information
romanstrobl committed Aug 27, 2020
1 parent 565e0f4 commit c171fec
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 c171fec

Please sign in to comment.