@@ -398,12 +398,12 @@ else if (isCades && idSeq2.equals(SecurityIDs.ID_AA_SIGNING_CERTIFICATE_V2)) {
398
398
if (ts != null && ts .getAttrValues ().size () > 0 ) {
399
399
ASN1Set attributeValues = ts .getAttrValues ();
400
400
ASN1Sequence tokenSequence = ASN1Sequence .getInstance (attributeValues .getObjectAt (0 ));
401
- ContentInfo contentInfo = new ContentInfo (tokenSequence );
401
+ ContentInfo contentInfo = ContentInfo . getInstance (tokenSequence );
402
402
this .timeStampToken = new TimeStampToken (contentInfo );
403
403
}
404
404
}
405
405
if (isTsp ) {
406
- ContentInfo contentInfoTsp = new ContentInfo (signedData );
406
+ ContentInfo contentInfoTsp = ContentInfo . getInstance (signedData );
407
407
this .timeStampToken = new TimeStampToken (contentInfoTsp );
408
408
TimeStampTokenInfo info = timeStampToken .getTimeStampInfo ();
409
409
String algOID = info .getMessageImprintAlgOID ().getId ();
@@ -704,7 +704,7 @@ public byte[] getEncodedPKCS1() {
704
704
digest = sig .sign ();
705
705
ByteArrayOutputStream bOut = new ByteArrayOutputStream ();
706
706
707
- ASN1OutputStream dout = new ASN1OutputStream (bOut );
707
+ ASN1OutputStream dout = ASN1OutputStream . create (bOut );
708
708
dout .writeObject (new DEROctetString (digest ));
709
709
dout .close ();
710
710
@@ -855,7 +855,7 @@ else if (externalRSAdata != null && RSAdata != null) {
855
855
856
856
ByteArrayOutputStream bOut = new ByteArrayOutputStream ();
857
857
858
- ASN1OutputStream dout = new ASN1OutputStream (bOut );
858
+ ASN1OutputStream dout = ASN1OutputStream . create (bOut );
859
859
dout .writeObject (new DERSequence (whole ));
860
860
dout .close ();
861
861
0 commit comments