[libpdfbox-java] 01/02: patch for bc 1.51
Tony Mancill
tmancill at moszumanska.debian.org
Mon Dec 7 03:38:10 UTC 2015
This is an automated email from the git hooks/post-receive script.
tmancill pushed a commit to branch tmancill/bc151
in repository libpdfbox-java.
commit ca280afce5bbb92e94e1cd6e60e2ea76e7506396
Author: tony mancill <tmancill at debian.org>
Date: Sun Dec 6 15:32:22 2015 -0800
patch for bc 1.51
---
debian/patches/05_bc1.51.patch | 42 ++++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 43 insertions(+)
diff --git a/debian/patches/05_bc1.51.patch b/debian/patches/05_bc1.51.patch
new file mode 100644
index 0000000..73ef81e
--- /dev/null
+++ b/debian/patches/05_bc1.51.patch
@@ -0,0 +1,42 @@
+Description: patch for bouncycastle 1.51
+Author: tony mancill <tmancill at debian.org>
+Forwarded: no
+
+--- 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.MessageDigest;
+ import java.security.NoSuchAlgorithmException;
+ import java.security.NoSuchProviderException;
++import java.security.PrivateKey;
+ import java.security.SecureRandom;
+ import java.security.Security;
+ import java.security.cert.X509Certificate;
+@@ -57,6 +58,7 @@
+ import org.bouncycastle.cms.CMSEnvelopedData;
+ import org.bouncycastle.cms.CMSException;
+ import org.bouncycastle.cms.RecipientInformation;
++import org.bouncycastle.cms.jcajce.JceKeyTransEnvelopedRecipient;
+ import org.bouncycastle.jce.provider.BouncyCastleProvider;
+ import org.apache.pdfbox.cos.COSArray;
+ import org.apache.pdfbox.cos.COSString;
+@@ -187,7 +189,7 @@
+ if (ri.getRID().match(material.getCertificate()) && !foundRecipient)
+ {
+ foundRecipient = true;
+- envelopedData = ri.getContent(material.getPrivateKey(), "BC");
++ envelopedData = ri.getContent(new JceKeyTransEnvelopedRecipient((PrivateKey) material.getPrivateKey()).setProvider("BC"));
+ break;
+ }
+ }
+@@ -241,10 +243,6 @@
+ {
+ throw new CryptographyException(e);
+ }
+- catch (NoSuchProviderException e)
+- {
+- throw new CryptographyException(e);
+- }
+ catch (NoSuchAlgorithmException e)
+ {
+ throw new CryptographyException(e);
diff --git a/debian/patches/series b/debian/patches/series
index c13cc0f..8be8488 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ build.xml.patch
build-subproject-docs.patch
bc-1.47.patch
reproducible-build.patch
+05_bc1.51.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libpdfbox-java.git
More information about the pkg-java-commits
mailing list