[SCM] libpdfbox-java packaging branch, master, updated. debian/1%1.7.0+dfsg-4-16-gfdfcf69
gregor herrmann
gregoa at debian.org
Sun Jun 2 17:23:04 UTC 2013
The following commit has been merged in the master branch:
commit f6cdd9cb7f7efd53eee363877d8aff5e5c1b8345
Author: gregor herrmann <gregoa at debian.org>
Date: Sun Jun 2 18:48:13 2013 +0200
Adjust to newer Bouncy Castle:
- add patch bc-1.47.patch to handle changed method names
- add build dependency on libbcpkix-java
- make build dependencies on libbc.*-java versioned
- add /usr/share/java/bcpkix.jar to CLASSPATH in debian/rules
diff --git a/debian/control b/debian/control
index 2dc4b60..ed57285 100644
--- a/debian/control
+++ b/debian/control
@@ -11,8 +11,9 @@ Build-Depends-Indep: default-jdk,
htmldoc-common,
junit4,
lcdf-typetools,
- libbcmail-java,
- libbcprov-java,
+ libbcmail-java (>= 1.47),
+ libbcprov-java (>= 1.47),
+ libbcpkix-java (>= 1.47),
libcommons-beanutils-java,
libcommons-logging-java,
libicu4j-java,
diff --git a/debian/patches/bc-1.47.patch b/debian/patches/bc-1.47.patch
new file mode 100644
index 0000000..a2a0834
--- /dev/null
+++ b/debian/patches/bc-1.47.patch
@@ -0,0 +1,63 @@
+Description: adjust to Bouncy Castle >= 1.47
+ cf. http://www.bouncycastle.org/wiki/display/JA1/Porting+from+earlier+BC+releases+to+1.47+and+later
+Origin: vendor
+Forwarded: no
+Author: gregor herrmann <gregoa at debian.org>
+Last-Update: 2013-06-02
+
+--- a/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PublicKeySecurityHandler.java
++++ b/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PublicKeySecurityHandler.java
+@@ -37,8 +37,8 @@
+ import javax.crypto.SecretKey;
+
+ import org.bouncycastle.asn1.ASN1InputStream;
+-import org.bouncycastle.asn1.DERObject;
+-import org.bouncycastle.asn1.DERObjectIdentifier;
++import org.bouncycastle.asn1.ASN1Primitive;
++import org.bouncycastle.asn1.ASN1ObjectIdentifier;
+ import org.bouncycastle.asn1.DEROctetString;
+ import org.bouncycastle.asn1.DEROutputStream;
+ import org.bouncycastle.asn1.DERSet;
+@@ -309,7 +309,7 @@
+ pkcs7input[22] = two;
+ pkcs7input[23] = one;
+
+- DERObject obj = createDERForRecipient(pkcs7input, certificate);
++ ASN1Primitive obj = createDERForRecipient(pkcs7input, certificate);
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+@@ -376,7 +376,7 @@
+
+ }
+
+- private DERObject createDERForRecipient(byte[] in, X509Certificate cert)
++ private ASN1Primitive createDERForRecipient(byte[] in, X509Certificate cert)
+ throws IOException,
+ GeneralSecurityException
+ {
+@@ -387,7 +387,7 @@
+ AlgorithmParameters algorithmparameters = algorithmparametergenerator.generateParameters();
+ ByteArrayInputStream bytearrayinputstream = new ByteArrayInputStream(algorithmparameters.getEncoded("ASN.1"));
+ ASN1InputStream asn1inputstream = new ASN1InputStream(bytearrayinputstream);
+- DERObject derobject = asn1inputstream.readObject();
++ ASN1Primitive derobject = asn1inputstream.readObject();
+ KeyGenerator keygenerator = KeyGenerator.getInstance(s);
+ keygenerator.init(128);
+ SecretKey secretkey = keygenerator.generateKey();
+@@ -397,13 +397,13 @@
+ DEROctetString deroctetstring = new DEROctetString(abyte1);
+ KeyTransRecipientInfo keytransrecipientinfo = computeRecipientInfo(cert, secretkey.getEncoded());
+ DERSet derset = new DERSet(new RecipientInfo(keytransrecipientinfo));
+- AlgorithmIdentifier algorithmidentifier = new AlgorithmIdentifier(new DERObjectIdentifier(s), derobject);
++ AlgorithmIdentifier algorithmidentifier = new AlgorithmIdentifier(new ASN1ObjectIdentifier(s), derobject);
+ EncryptedContentInfo encryptedcontentinfo =
+ new EncryptedContentInfo(PKCSObjectIdentifiers.data, algorithmidentifier, deroctetstring);
+ EnvelopedData env = new EnvelopedData(null, derset, encryptedcontentinfo, null);
+ ContentInfo contentinfo =
+ new ContentInfo(PKCSObjectIdentifiers.envelopedData, env);
+- return contentinfo.getDERObject();
++ return contentinfo.toASN1Primitive();
+ }
+
+ private KeyTransRecipientInfo computeRecipientInfo(X509Certificate x509certificate, byte[] abyte0)
diff --git a/debian/patches/series b/debian/patches/series
index bfb7354..46e094f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
build.xml.patch
build-subproject-docs.patch
+bc-1.47.patch
diff --git a/debian/rules b/debian/rules
index 15edea2..19bca3c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,7 +4,7 @@
# 20100806/tm convert to javahelper
export JAVA_HOME=/usr/lib/jvm/default-java
-export CLASSPATH=/usr/share/java/lucene2.jar:/usr/share/java/bcmail.jar:/usr/share/java/bcprov.jar:/usr/share/java/checkstyle.jar:/usr/share/java/junit4.jar:/usr/share/java/commons-logging.jar:/usr/share/java/icu4j.jar:/usr/share/java/commons-beanutils.jar
+export CLASSPATH=/usr/share/java/lucene2.jar:/usr/share/java/bcmail.jar:/usr/share/java/bcprov.jar:/usr/share/java/bcpkix.jar:/usr/share/java/checkstyle.jar:/usr/share/java/junit4.jar:/usr/share/java/commons-logging.jar:/usr/share/java/icu4j.jar:/usr/share/java/commons-beanutils.jar
%:
dh $@ --buildsystem ant
--
libpdfbox-java packaging
More information about the pkg-java-commits
mailing list