Skip to content

"Extra data detected in stream" - pls make it easier to handle #2364

Description

@ralfhauser

As per #2360 , please add a "@deprecated" with the explanation to use an InputStream instead as constructor argument

 public CMSSignedData(
        byte[] sigBlock)
        throws CMSException

or clean it by

    asn1In = new ASN1InputStream(is)
   ASN1Primitive asn1Object = asn1In.readObject()
   byte[] encoded = asn1Object.getEncoded();
   return encoded

for example with a static
public static CMSSignedData getCMSSignedDataByCleandBA(byte[] sigBlock) {

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions