8315042: NPE in PKCS7.parseOldSignedData

Reviewed-by: valeriep, weijun
This commit is contained in:
Mark Powers 2023-10-04 00:23:42 +00:00 committed by Valerie Peng
parent f7deaf4bef
commit 8c0d026d0f
2 changed files with 29 additions and 38 deletions

View file

@ -152,6 +152,10 @@ public class PKCS7 {
ObjectIdentifier contentType = block.contentType;
DerValue content = block.getContent();
if (content == null) {
throw new ParsingException("content is null");
}
if (contentType.equals(ContentInfo.SIGNED_DATA_OID)) {
parseSignedData(content);
} else if (contentType.equals(ContentInfo.OLD_SIGNED_DATA_OID)) {