[pdfbox] update to 1.8.8

gil gil at fedoraproject.org
Sat Jan 17 00:00:11 UTC 2015


commit 19da99ed1e4d2b4a62211d495a40cc86736cf108
Author: gil <puntogil at libero.it>
Date:   Sat Jan 17 01:00:15 2015 +0100

    update to 1.8.8

 .gitignore                                         |    1 +
 ... => pdfbox-1.8.8-port-to-bouncycastle1.50.patch |   70 ++++++++++----------
 pdfbox.spec                                        |    9 ++-
 sources                                            |    2 +-
 4 files changed, 43 insertions(+), 39 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index c4fc1c9..ae2c37e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@
 /pdfbox-1.8.4-src.zip
 /pdfbox-1.8.5-src.zip
 /pdfbox-1.8.7-src.zip
+/pdfbox-1.8.8-src.zip
diff --git a/pdfbox-1.8.7-port-to-bouncycastle1.50.patch b/pdfbox-1.8.8-port-to-bouncycastle1.50.patch
similarity index 58%
rename from pdfbox-1.8.7-port-to-bouncycastle1.50.patch
rename to pdfbox-1.8.8-port-to-bouncycastle1.50.patch
index 0cd888b..22c287d 100644
--- a/pdfbox-1.8.7-port-to-bouncycastle1.50.patch
+++ b/pdfbox-1.8.8-port-to-bouncycastle1.50.patch
@@ -1,6 +1,6 @@
---- pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PublicKeySecurityHandler.java	2014-09-15 20:27:30.000000000 +0200
-+++ pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PublicKeySecurityHandler.java-gil	2014-09-26 01:31:09.514029829 +0200
-@@ -27,6 +27,7 @@
+--- pdfbox-1.8.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PublicKeySecurityHandler.java	2014-12-09 18:44:50.000000000 +0100
++++ pdfbox-1.8.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PublicKeySecurityHandler.java.bouncycastle1.50	2015-01-17 00:36:47.668219518 +0100
+@@ -27,6 +27,7 @@ import java.security.KeyStoreException;
  import java.security.MessageDigest;
  import java.security.NoSuchAlgorithmException;
  import java.security.NoSuchProviderException;
@@ -8,7 +8,7 @@
  import java.security.SecureRandom;
  import java.security.Security;
  import java.security.cert.X509Certificate;
-@@ -39,7 +40,8 @@
+@@ -39,7 +40,8 @@ import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  
  import org.bouncycastle.asn1.ASN1InputStream;
@@ -18,35 +18,35 @@
  import org.bouncycastle.asn1.DERObjectIdentifier;
  import org.bouncycastle.asn1.DEROctetString;
  import org.bouncycastle.asn1.DEROutputStream;
-@@ -51,6 +53,7 @@
- import org.bouncycastle.asn1.cms.KeyTransRecipientInfo;
- import org.bouncycastle.asn1.cms.RecipientIdentifier;
- import org.bouncycastle.asn1.cms.RecipientInfo;
+@@ -57,6 +59,7 @@ import org.bouncycastle.asn1.x509.TBSCer
+ import org.bouncycastle.cms.CMSEnvelopedData;
+ import org.bouncycastle.cms.CMSException;
+ import org.bouncycastle.cms.RecipientInformation;
 +import org.bouncycastle.cms.jcajce.JceKeyTransEnvelopedRecipient;
- import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
- import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
- import org.bouncycastle.asn1.x509.TBSCertificateStructure;
-@@ -191,7 +194,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;
- 	                  }
- 	              }
-@@ -247,10 +250,6 @@
- 	      {
- 	          throw new CryptographyException(e);
- 	      }
--	      catch(NoSuchProviderException e)
--	      {
--	          throw new CryptographyException(e);
--	      }
- 	      catch(NoSuchAlgorithmException e)
- 	      {
- 	          throw new CryptographyException(e);
-@@ -317,7 +316,7 @@
+ import org.bouncycastle.jce.provider.BouncyCastleProvider;
+ import org.apache.pdfbox.cos.COSArray;
+ import org.apache.pdfbox.cos.COSString;
+@@ -187,7 +190,7 @@ public class PublicKeySecurityHandler ex
+                     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 +244,6 @@ public class PublicKeySecurityHandler ex
+         {
+             throw new CryptographyException(e);
+         }
+-        catch (NoSuchProviderException e)
+-        {
+-            throw new CryptographyException(e);
+-        }
+         catch (NoSuchAlgorithmException e)
+         {
+             throw new CryptographyException(e);
+@@ -311,7 +310,7 @@ public class PublicKeySecurityHandler ex
                  pkcs7input[22] = two;
                  pkcs7input[23] = one;
  
@@ -55,7 +55,7 @@
  
                  ByteArrayOutputStream baos = new ByteArrayOutputStream();
  
-@@ -384,7 +383,7 @@
+@@ -378,7 +377,7 @@ public class PublicKeySecurityHandler ex
  
      }
  
@@ -64,7 +64,7 @@
          throws IOException,
                 GeneralSecurityException
      {
-@@ -395,7 +394,7 @@
+@@ -389,7 +388,7 @@ public class PublicKeySecurityHandler ex
          AlgorithmParameters algorithmparameters = algorithmparametergenerator.generateParameters();
          ByteArrayInputStream bytearrayinputstream = new ByteArrayInputStream(algorithmparameters.getEncoded("ASN.1"));
          ASN1InputStream asn1inputstream = new ASN1InputStream(bytearrayinputstream);
@@ -73,7 +73,7 @@
          KeyGenerator keygenerator = KeyGenerator.getInstance(s);
          keygenerator.init(128);
          SecretKey secretkey = keygenerator.generateKey();
-@@ -408,10 +407,10 @@
+@@ -402,10 +401,10 @@ public class PublicKeySecurityHandler ex
          AlgorithmIdentifier algorithmidentifier = new AlgorithmIdentifier(new DERObjectIdentifier(s), derobject);
          EncryptedContentInfo encryptedcontentinfo =
              new EncryptedContentInfo(PKCSObjectIdentifiers.data, algorithmidentifier, deroctetstring);
diff --git a/pdfbox.spec b/pdfbox.spec
index d70d34b..b8853b9 100644
--- a/pdfbox.spec
+++ b/pdfbox.spec
@@ -1,5 +1,5 @@
 Name:           pdfbox
-Version:        1.8.7
+Version:        1.8.8
 Release:        1%{?dist}
 Summary:        Java library for working with PDF documents
 License:        ASL 2.0
@@ -10,7 +10,7 @@ Patch0:         %{name}-nodownload.patch
 #Use sysytem bitream-vera-sans-fonts instead of bundled fonts
 Patch1:         %{name}-1.2.0-bitstream.patch
 
-Patch2:         pdfbox-1.8.7-port-to-bouncycastle1.50.patch
+Patch2:         pdfbox-1.8.8-port-to-bouncycastle1.50.patch
 
 BuildRequires:  ant
 BuildRequires:  maven-local
@@ -143,7 +143,7 @@ sed -i -e '/META-INF/d' pdfbox/pom.xml
 rm -r pdfbox/src/main/resources/org/apache/pdfbox/resources/ttf
 
 %pom_add_dep org.bouncycastle:bcpkix-jdk15on:1.50 %{name}
-%patch2 -p0 -b .bouncycastle1.50
+%patch2 -p1 -b .bouncycastle1.50
 
 # TODO
 rm -rf examples/src/main/java/org/apache/pdfbox/examples/signature/CreateSignature.java \
@@ -205,6 +205,9 @@ sed -i -e /filtering/d examples/pom.xml
 %doc LICENSE.txt NOTICE.txt
 
 %changelog
+* Sat Jan 17 2015 gil cattaneo <puntogil at libero.it> 1.8.8-1
+- update to 1.8.8
+
 * Thu Oct 30 2014 gil cattaneo <puntogil at libero.it> 1.8.7-1
 - update to 1.8.7
 
diff --git a/sources b/sources
index 747dee1..628ee5d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-d37651d71f5814133a05b1fc229ae6d6  pdfbox-1.8.7-src.zip
+f835b86e2d2237589a59450394cbd877  pdfbox-1.8.8-src.zip


More information about the scm-commits mailing list