@@ -398,12 +398,12 @@ else if (isCades && idSeq2.equals(SecurityIDs.ID_AA_SIGNING_CERTIFICATE_V2)) {
398398 if (ts != null && ts .getAttrValues ().size () > 0 ) {
399399 ASN1Set attributeValues = ts .getAttrValues ();
400400 ASN1Sequence tokenSequence = ASN1Sequence .getInstance (attributeValues .getObjectAt (0 ));
401- ContentInfo contentInfo = new ContentInfo (tokenSequence );
401+ ContentInfo contentInfo = ContentInfo . getInstance (tokenSequence );
402402 this .timeStampToken = new TimeStampToken (contentInfo );
403403 }
404404 }
405405 if (isTsp ) {
406- ContentInfo contentInfoTsp = new ContentInfo (signedData );
406+ ContentInfo contentInfoTsp = ContentInfo . getInstance (signedData );
407407 this .timeStampToken = new TimeStampToken (contentInfoTsp );
408408 TimeStampTokenInfo info = timeStampToken .getTimeStampInfo ();
409409 String algOID = info .getMessageImprintAlgOID ().getId ();
@@ -704,7 +704,7 @@ public byte[] getEncodedPKCS1() {
704704 digest = sig .sign ();
705705 ByteArrayOutputStream bOut = new ByteArrayOutputStream ();
706706
707- ASN1OutputStream dout = new ASN1OutputStream (bOut );
707+ ASN1OutputStream dout = ASN1OutputStream . create (bOut );
708708 dout .writeObject (new DEROctetString (digest ));
709709 dout .close ();
710710
@@ -855,7 +855,7 @@ else if (externalRSAdata != null && RSAdata != null) {
855855
856856 ByteArrayOutputStream bOut = new ByteArrayOutputStream ();
857857
858- ASN1OutputStream dout = new ASN1OutputStream (bOut );
858+ ASN1OutputStream dout = ASN1OutputStream . create (bOut );
859859 dout .writeObject (new DERSequence (whole ));
860860 dout .close ();
861861
0 commit comments