Skip to content

Commit

Permalink
Add Null Check at Certificate Download
Browse files Browse the repository at this point in the history
  • Loading branch information
f11h committed May 11, 2021
1 parent 8bd9504 commit 8b5608a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ private boolean checkUploadCertificate(TrustListItemDto trustListItem) {
new SignedCertificateMessageParser(trustListItem.getSignature(), trustListItem.getRawData());
X509CertificateHolder uploadCertificate = parser.getSigningCertificate();

if (uploadCertificate == null) {
return false;
}

return trustedUploadCertificates
.stream()
.anyMatch(uploadCertificate::equals);
Expand Down

0 comments on commit 8b5608a

Please sign in to comment.