Skip to content

Commit 465f48f

Browse files
Upgrade BouncyCastle to 1.70
DEV-2005
1 parent 5654206 commit 465f48f

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

itext/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,13 @@
7575
<dependency>
7676
<groupId>org.bouncycastle</groupId>
7777
<artifactId>bcprov-jdk15to18</artifactId>
78-
<version>1.67</version>
78+
<version>1.70</version>
7979
<optional>true</optional>
8080
</dependency>
8181
<dependency>
8282
<groupId>org.bouncycastle</groupId>
8383
<artifactId>bcpkix-jdk15on</artifactId>
84-
<version>1.67</version>
84+
<version>1.70</version>
8585
<optional>true</optional>
8686
</dependency>
8787
<dependency>

itext/src/main/java/com/itextpdf/text/pdf/security/PdfPKCS7.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -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

pdfa/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
<dependency>
8181
<groupId>org.bouncycastle</groupId>
8282
<artifactId>bcprov-jdk15to18</artifactId>
83-
<version>1.67</version>
83+
<version>1.70</version>
8484
<optional>true</optional>
8585
</dependency>
8686
<dependency>

0 commit comments

Comments
 (0)