[Git][java-team/libpdfbox-java][master] 3 commits: Update BouncyCastle patch for BC 1.77 (Closes: #1057683)
Tony Mancill (@tmancill)
gitlab at salsa.debian.org
Fri Dec 15 06:05:27 GMT 2023
Tony Mancill pushed to branch master at Debian Java Maintainers / libpdfbox-java
Commits:
c45215e7 by tony mancill at 2023-12-14T21:49:36-08:00
Update BouncyCastle patch for BC 1.77 (Closes: #1057683)
- - - - -
0b154e5b by tony mancill at 2023-12-14T21:52:13-08:00
Freshen debian/copyright
- - - - -
3d6bc111 by tony mancill at 2023-12-14T21:53:09-08:00
Prepare changelog for upload
- - - - -
3 changed files:
- debian/changelog
- debian/copyright
- debian/patches/01-bouncycastle-compatibility.patch
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+libpdfbox-java (1:1.8.16-5) unstable; urgency=medium
+
+ * Update BouncyCastle patch for BC 1.77 (Closes: #1057683)
+ * Freshen debian/copyright
+
+ -- tony mancill <tmancill at debian.org> Thu, 14 Dec 2023 21:52:17 -0800
+
libpdfbox-java (1:1.8.16-4) unstable; urgency=medium
* Drop examples from libpdfbox-java to avoid overwriting files in
=====================================
debian/copyright
=====================================
@@ -75,8 +75,8 @@ License: Apache-2.0
Files: debian/*
Copyright:
- 2007-2019, gregor herrmann <gregoa at debian.org>
- 2007-2019, tony mancill <tmancill at debian.org>
+ 2007-2023, gregor herrmann <gregoa at debian.org>
+ 2007-2023, tony mancill <tmancill at debian.org>
License: GPL-2+
License: Apache-2.0
=====================================
debian/patches/01-bouncycastle-compatibility.patch
=====================================
@@ -3,9 +3,11 @@ Origin: vendor
Bug: https://issues.apache.org/jira/browse/PDFBOX-1587
https://issues.apache.org/jira/browse/PDFBOX-1669
Author: Gregor Herrmann <gregoa at debian.org>, Tony Mancill <tmancill at debian.org>
+Last-Update: 2023-12-14
+
--- a/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PublicKeySecurityHandler.java
+++ b/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PublicKeySecurityHandler.java
-@@ -27,6 +27,7 @@ import java.security.KeyStoreException;
+@@ -27,6 +27,7 @@
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
@@ -13,7 +15,7 @@ Author: Gregor Herrmann <gregoa at debian.org>, Tony Mancill <tmancill at debian.org>
import java.security.SecureRandom;
import java.security.cert.X509Certificate;
import java.util.Iterator;
-@@ -38,8 +39,8 @@ import org.apache.commons.logging.Log;
+@@ -38,10 +39,10 @@
import org.apache.commons.logging.LogFactory;
import org.bouncycastle.asn1.ASN1InputStream;
@@ -21,10 +23,13 @@ Author: Gregor Herrmann <gregoa at debian.org>, Tony Mancill <tmancill at debian.org>
-import org.bouncycastle.asn1.DERObjectIdentifier;
+import org.bouncycastle.asn1.ASN1Primitive;
+import org.bouncycastle.asn1.ASN1ObjectIdentifier;
++import org.bouncycastle.asn1.ASN1OutputStream;
import org.bouncycastle.asn1.DEROctetString;
- import org.bouncycastle.asn1.DEROutputStream;
+-import org.bouncycastle.asn1.DEROutputStream;
import org.bouncycastle.asn1.DERSet;
-@@ -56,6 +57,7 @@ import org.bouncycastle.asn1.x509.TBSCer
+ import org.bouncycastle.asn1.cms.ContentInfo;
+ import org.bouncycastle.asn1.cms.EncryptedContentInfo;
+@@ -56,6 +57,7 @@
import org.bouncycastle.cms.CMSEnvelopedData;
import org.bouncycastle.cms.CMSException;
import org.bouncycastle.cms.RecipientInformation;
@@ -32,7 +37,7 @@ Author: Gregor Herrmann <gregoa at debian.org>, Tony Mancill <tmancill at debian.org>
import org.apache.pdfbox.cos.COSArray;
import org.apache.pdfbox.cos.COSString;
import org.apache.pdfbox.exceptions.CryptographyException;
-@@ -185,7 +187,7 @@ public class PublicKeySecurityHandler ex
+@@ -185,7 +187,7 @@
if (ri.getRID().match(material.getCertificate()) && !foundRecipient)
{
foundRecipient = true;
@@ -41,7 +46,7 @@ Author: Gregor Herrmann <gregoa at debian.org>, Tony Mancill <tmancill at debian.org>
break;
}
}
-@@ -239,10 +241,6 @@ public class PublicKeySecurityHandler ex
+@@ -239,10 +241,6 @@
{
throw new CryptographyException(e);
}
@@ -52,7 +57,7 @@ Author: Gregor Herrmann <gregoa at debian.org>, Tony Mancill <tmancill at debian.org>
catch (NoSuchAlgorithmException e)
{
throw new CryptographyException(e);
-@@ -311,7 +309,7 @@ public class PublicKeySecurityHandler ex
+@@ -311,11 +309,11 @@
pkcs7input[22] = two;
pkcs7input[23] = one;
@@ -61,7 +66,12 @@ Author: Gregor Herrmann <gregoa at debian.org>, Tony Mancill <tmancill at debian.org>
ByteArrayOutputStream baos = new ByteArrayOutputStream();
-@@ -378,7 +376,7 @@ public class PublicKeySecurityHandler ex
+- DEROutputStream k = new DEROutputStream(baos);
++ ASN1OutputStream k = ASN1OutputStream.create(baos);
+
+ k.writeObject(obj);
+
+@@ -378,7 +376,7 @@
}
@@ -70,7 +80,7 @@ Author: Gregor Herrmann <gregoa at debian.org>, Tony Mancill <tmancill at debian.org>
throws IOException,
GeneralSecurityException
{
-@@ -389,7 +387,7 @@ public class PublicKeySecurityHandler ex
+@@ -389,7 +387,7 @@
AlgorithmParameters algorithmparameters = algorithmparametergenerator.generateParameters();
ByteArrayInputStream bytearrayinputstream = new ByteArrayInputStream(algorithmparameters.getEncoded("ASN.1"));
ASN1InputStream asn1inputstream = new ASN1InputStream(bytearrayinputstream);
@@ -79,7 +89,7 @@ Author: Gregor Herrmann <gregoa at debian.org>, Tony Mancill <tmancill at debian.org>
KeyGenerator keygenerator;
try
{
-@@ -409,13 +407,13 @@ public class PublicKeySecurityHandler ex
+@@ -409,13 +407,13 @@
DEROctetString deroctetstring = new DEROctetString(abyte1);
KeyTransRecipientInfo keytransrecipientinfo = computeRecipientInfo(cert, secretkey.getEncoded());
DERSet derset = new DERSet(new RecipientInfo(keytransrecipientinfo));
@@ -96,3 +106,12 @@ Author: Gregor Herrmann <gregoa at debian.org>, Tony Mancill <tmancill at debian.org>
}
private KeyTransRecipientInfo computeRecipientInfo(X509Certificate x509certificate, byte[] abyte0)
+@@ -430,7 +428,7 @@
+ new IssuerAndSerialNumber(
+ tbscertificatestructure.getIssuer(),
+ tbscertificatestructure.getSerialNumber().getValue());
+- Cipher cipher = Cipher.getInstance(algorithmidentifier.getObjectId().getId());
++ Cipher cipher = Cipher.getInstance(algorithmidentifier.getAlgorithm().getId());
+ cipher.init(1, x509certificate.getPublicKey());
+ DEROctetString deroctetstring = new DEROctetString(cipher.doFinal(abyte0));
+ RecipientIdentifier recipId = new RecipientIdentifier(issuerandserialnumber);
View it on GitLab: https://salsa.debian.org/java-team/libpdfbox-java/-/compare/90e586dc1e1380bda572824bd38cc1e0cf4e78fb...3d6bc111c1e0b56c941d0b63561f81f2d8af64be
--
View it on GitLab: https://salsa.debian.org/java-team/libpdfbox-java/-/compare/90e586dc1e1380bda572824bd38cc1e0cf4e78fb...3d6bc111c1e0b56c941d0b63561f81f2d8af64be
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20231215/5a0f5ae8/attachment.htm>
More information about the pkg-java-commits
mailing list