[pkg-java] r16455 - in trunk/libitext-java/debian: . patches

Emmanuel Bourg ebourg-guest at alioth.debian.org
Fri Mar 29 16:40:58 UTC 2013


Author: ebourg-guest
Date: 2013-03-29 16:40:58 +0000 (Fri, 29 Mar 2013)
New Revision: 16455

Added:
   trunk/libitext-java/debian/patches/02_bouncycastle_1.47_port.patch
Modified:
   trunk/libitext-java/debian/changelog
   trunk/libitext-java/debian/control
   trunk/libitext-java/debian/patches/series
   trunk/libitext-java/debian/rules
Log:
Added a patch to compile against Bouncy Castle 1.47 or later

Modified: trunk/libitext-java/debian/changelog
===================================================================
--- trunk/libitext-java/debian/changelog	2013-03-29 16:09:14 UTC (rev 16454)
+++ trunk/libitext-java/debian/changelog	2013-03-29 16:40:58 UTC (rev 16455)
@@ -1,3 +1,11 @@
+libitext-java (2.1.7-5) experimental; urgency=low
+
+  * Team upload.
+  * Update to Standards-Version to 3.9.4 (no change required)
+  * Added a patch to compile against Bouncy Castle 1.47 or later.
+
+ -- Emmanuel Bourg <ebourg at apache.org>  Fri, 29 Mar 2013 16:14:26 +0100
+
 libitext-java (2.1.7-4) unstable; urgency=low
 
   * Team upload.

Modified: trunk/libitext-java/debian/control
===================================================================
--- trunk/libitext-java/debian/control	2013-03-29 16:09:14 UTC (rev 16454)
+++ trunk/libitext-java/debian/control	2013-03-29 16:40:58 UTC (rev 16455)
@@ -2,18 +2,19 @@
 Section: java
 Priority: optional
 Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
-Uploaders: Adriaan Peeters <apeeters at lashout.net>, Torsten Werner <twerner at debian.org>
-Build-Depends: debhelper (>= 9), cdbs, default-jdk, ant, libbcprov-java (>= 1.46),
- libbcmail-java, libbctsp-java, libdom4j-java, libpdfrenderer-java, gcj-native-helper,
+Uploaders: Adriaan Peeters <apeeters at lashout.net>, Torsten Werner <twerner at debian.org>,
+ Emmanuel Bourg <ebourg at apache.org>
+Build-Depends: debhelper (>= 9), cdbs, default-jdk, ant, libbcprov-java (>= 1.48),
+ libbcmail-java, libbcpkix-java, libdom4j-java, libpdfrenderer-java, gcj-native-helper,
  javahelper (>= 0.43)
-Standards-Version: 3.9.3
+Standards-Version: 3.9.4
 Homepage: http://www.lowagie.com/iText/
 Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/libitext-java
 Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/libitext-java
 
 Package: libitext-java
 Architecture: all
-Depends: ${misc:Depends}, libbcprov-java (>= 1.46), ${java:Depends}
+Depends: ${misc:Depends}, libbcprov-java (>= 1.48), ${java:Depends}
 Suggests: libitext-java-gcj
 Description: Java Library to create and manipulate PDF on the fly
  iText is a library that allows you to generate PDF files on the fly.

Added: trunk/libitext-java/debian/patches/02_bouncycastle_1.47_port.patch
===================================================================
--- trunk/libitext-java/debian/patches/02_bouncycastle_1.47_port.patch	                        (rev 0)
+++ trunk/libitext-java/debian/patches/02_bouncycastle_1.47_port.patch	2013-03-29 16:40:58 UTC (rev 16455)
@@ -0,0 +1,198 @@
+Index: src/ant/.ant.properties
+===================================================================
+--- src/ant/.ant.properties	(revision 5738)
++++ src/ant/.ant.properties	(working copy)
+@@ -13,12 +13,12 @@
+ jcommon.jar=${itext.lib}/jcommon.jar
+ servlet.jar=${itext.lib}/servlet.jar
+ 
+-bc.jdk=jdk14
+-bc.version=138
++bc.jdk=jdk15on
++bc.version=1.48
+ 
+ lib.bcmail=bcmail-${bc.jdk}-${bc.version}.jar
+ lib.bcprov=bcprov-${bc.jdk}-${bc.version}.jar
+-lib.bctsp=bctsp-${bc.jdk}-${bc.version}.jar
++lib.bctsp=bcpkix-${bc.jdk}-${bc.version}.jar
+ lib.dom4j=pdf-renderer.jar
+ lib.pdf-renderer=dom4j-1.6.1.jar
+ 
+Index: src/core/com/lowagie/text/pdf/PdfPKCS7.java
+===================================================================
+--- src/core/com/lowagie/text/pdf/PdfPKCS7.java	(revision 5738)
++++ src/core/com/lowagie/text/pdf/PdfPKCS7.java	(working copy)
+@@ -77,21 +77,22 @@
+ 
+ import org.bouncycastle.asn1.ASN1Encodable;
+ import org.bouncycastle.asn1.ASN1EncodableVector;
++import org.bouncycastle.asn1.ASN1Encoding;
+ import org.bouncycastle.asn1.ASN1InputStream;
+ import org.bouncycastle.asn1.ASN1OutputStream;
++import org.bouncycastle.asn1.ASN1Primitive;
+ import org.bouncycastle.asn1.ASN1Sequence;
+ import org.bouncycastle.asn1.ASN1Set;
++import org.bouncycastle.asn1.ASN1String;
+ import org.bouncycastle.asn1.ASN1TaggedObject;
+ import org.bouncycastle.asn1.DEREnumerated;
+ import org.bouncycastle.asn1.DERInteger;
+ import org.bouncycastle.asn1.DERNull;
+-import org.bouncycastle.asn1.DERObject;
+ import org.bouncycastle.asn1.DERObjectIdentifier;
+ import org.bouncycastle.asn1.DEROctetString;
+ import org.bouncycastle.asn1.DEROutputStream;
+ import org.bouncycastle.asn1.DERSequence;
+ import org.bouncycastle.asn1.DERSet;
+-import org.bouncycastle.asn1.DERString;
+ import org.bouncycastle.asn1.DERTaggedObject;
+ import org.bouncycastle.asn1.DERUTCTime;
+ import org.bouncycastle.asn1.cms.AttributeTable;
+@@ -379,7 +380,7 @@
+             //
+             // Basic checks to make sure it's a PKCS#7 SignedData Object
+             //
+-            DERObject pkcs;
++            ASN1Primitive pkcs;
+ 
+             try {
+                 pkcs = din.readObject();
+@@ -464,7 +465,7 @@
+             if (signerInfo.getObjectAt(next) instanceof ASN1TaggedObject) {
+                 ASN1TaggedObject tagsig = (ASN1TaggedObject)signerInfo.getObjectAt(next);
+                 ASN1Set sseq = ASN1Set.getInstance(tagsig, false);
+-                sigAttr = sseq.getEncoded(ASN1Encodable.DER);
++                sigAttr = sseq.getEncoded(ASN1Encoding.DER);
+ 
+                 for (int k = 0; k < sseq.size(); ++k) {
+                     ASN1Sequence seq2 = (ASN1Sequence)sseq.getObjectAt(k);
+@@ -949,7 +950,7 @@
+      */
+     public static String getOCSPURL(X509Certificate certificate) throws CertificateParsingException {
+         try {
+-            DERObject obj = getExtensionValue(certificate, X509Extensions.AuthorityInfoAccess.getId());
++            ASN1Primitive obj = getExtensionValue(certificate, X509Extensions.AuthorityInfoAccess.getId());
+             if (obj == null) {
+                 return null;
+             }
+@@ -961,7 +962,7 @@
+                     continue;
+                 } else {
+                     if ((AccessDescription.getObjectAt(0) instanceof DERObjectIdentifier) && ((DERObjectIdentifier)AccessDescription.getObjectAt(0)).getId().equals("1.3.6.1.5.5.7.48.1")) {
+-                        String AccessLocation =  getStringFromGeneralName((DERObject)AccessDescription.getObjectAt(1));
++                        String AccessLocation =  getStringFromGeneralName((ASN1Primitive)AccessDescription.getObjectAt(1));
+                         if ( AccessLocation == null ) {
+                             return "" ;
+                         } else {
+@@ -999,7 +1000,7 @@
+         return false;
+     }
+     
+-    private static DERObject getExtensionValue(X509Certificate cert, String oid) throws IOException {
++    private static ASN1Primitive getExtensionValue(X509Certificate cert, String oid) throws IOException {
+         byte[] bytes = cert.getExtensionValue(oid);
+         if (bytes == null) {
+             return null;
+@@ -1010,7 +1011,7 @@
+         return aIn.readObject();
+     }
+     
+-    private static String getStringFromGeneralName(DERObject names) throws IOException {
++    private static String getStringFromGeneralName(ASN1Primitive names) throws IOException {
+         DERTaggedObject taggedObject = (DERTaggedObject) names ;
+         return new String(ASN1OctetString.getInstance(taggedObject, false).getOctets(), "ISO-8859-1");
+     }
+@@ -1020,11 +1021,11 @@
+      * @param enc a TBSCertificate in a byte array
+      * @return a DERObject
+      */
+-    private static DERObject getIssuer(byte[] enc) {
++    private static ASN1Primitive getIssuer(byte[] enc) {
+         try {
+             ASN1InputStream in = new ASN1InputStream(new ByteArrayInputStream(enc));
+             ASN1Sequence seq = (ASN1Sequence)in.readObject();
+-            return (DERObject)seq.getObjectAt(seq.getObjectAt(0) instanceof DERTaggedObject ? 3 : 2);
++            return (ASN1Primitive)seq.getObjectAt(seq.getObjectAt(0) instanceof DERTaggedObject ? 3 : 2);
+         }
+         catch (IOException e) {
+             throw new ExceptionConverter(e);
+@@ -1036,11 +1037,11 @@
+      * @param enc A TBSCertificate in a byte array
+      * @return a DERObject
+      */
+-    private static DERObject getSubject(byte[] enc) {
++    private static ASN1Primitive getSubject(byte[] enc) {
+         try {
+             ASN1InputStream in = new ASN1InputStream(new ByteArrayInputStream(enc));
+             ASN1Sequence seq = (ASN1Sequence)in.readObject();
+-            return (DERObject)seq.getObjectAt(seq.getObjectAt(0) instanceof DERTaggedObject ? 5 : 4);
++            return (ASN1Primitive)seq.getObjectAt(seq.getObjectAt(0) instanceof DERTaggedObject ? 5 : 4);
+         }
+         catch (IOException e) {
+             throw new ExceptionConverter(e);
+@@ -1340,7 +1341,7 @@
+      */    
+     public byte[] getAuthenticatedAttributeBytes(byte secondDigest[], Calendar signingTime, byte[] ocsp) {
+         try {
+-            return getAuthenticatedAttributeSet(secondDigest, signingTime, ocsp).getEncoded(ASN1Encodable.DER);
++            return getAuthenticatedAttributeSet(secondDigest, signingTime, ocsp).getEncoded(ASN1Encoding.DER);
+         }
+         catch (Exception e) {
+             throw new ExceptionConverter(e);
+@@ -1575,7 +1576,7 @@
+                         vs = new ArrayList();
+                         values.put(id, vs);
+                     }
+-                    vs.add(((DERString)s.getObjectAt(1)).getString());
++                    vs.add(((ASN1String)s.getObjectAt(1)).getString());
+                 }
+             }
+         }
+Index: src/core/com/lowagie/text/pdf/PdfPublicKeySecurityHandler.java
+===================================================================
+--- src/core/com/lowagie/text/pdf/PdfPublicKeySecurityHandler.java	(revision 5738)
++++ src/core/com/lowagie/text/pdf/PdfPublicKeySecurityHandler.java	(working copy)
+@@ -108,7 +108,7 @@
+ import javax.crypto.SecretKey;
+ 
+ import org.bouncycastle.asn1.ASN1InputStream;
+-import org.bouncycastle.asn1.DERObject;
++import org.bouncycastle.asn1.ASN1Primitive;
+ import org.bouncycastle.asn1.DERObjectIdentifier;
+ import org.bouncycastle.asn1.DEROctetString;
+ import org.bouncycastle.asn1.DEROutputStream;
+@@ -244,7 +244,7 @@
+         pkcs7input[22] = two;
+         pkcs7input[23] = one;
+         
+-        DERObject obj = createDERForRecipient(pkcs7input, (X509Certificate)certificate);
++        ASN1Primitive obj = createDERForRecipient(pkcs7input, (X509Certificate)certificate);
+             
+         ByteArrayOutputStream baos = new ByteArrayOutputStream();
+             
+@@ -276,7 +276,7 @@
+         return EncodedRecipients;
+     }
+     
+-    private DERObject createDERForRecipient(byte[] in, X509Certificate cert) 
++    private ASN1Primitive createDERForRecipient(byte[] in, X509Certificate cert) 
+         throws IOException,  
+                GeneralSecurityException 
+     {
+@@ -287,7 +287,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();
+@@ -303,7 +303,7 @@
+         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)

Modified: trunk/libitext-java/debian/patches/series
===================================================================
--- trunk/libitext-java/debian/patches/series	2013-03-29 16:09:14 UTC (rev 16454)
+++ trunk/libitext-java/debian/patches/series	2013-03-29 16:40:58 UTC (rev 16455)
@@ -1 +1,2 @@
 01_allow_standard_input.patch
+02_bouncycastle_1.47_port.patch

Modified: trunk/libitext-java/debian/rules
===================================================================
--- trunk/libitext-java/debian/rules	2013-03-29 16:09:14 UTC (rev 16454)
+++ trunk/libitext-java/debian/rules	2013-03-29 16:40:58 UTC (rev 16455)
@@ -8,8 +8,8 @@
 DEB_ANT_BUILD_TARGET := jar jar.rtf jar.rups
 DEB_ANT_CLEAN_TARGET :=
 DEB_ANT_BUILDFILE    := src/build.xml
-DEB_JARS             := bcprov bcmail bctsp dom4j pdfrenderer
-CORE_CLASS_PATH      := /usr/share/java/bcprov.jar /usr/share/java/bcmail.jar /usr/share/java/bctsp.jar 
+DEB_JARS             := bcprov bcmail bcpkix dom4j pdfrenderer
+CORE_CLASS_PATH      := /usr/share/java/bcprov.jar /usr/share/java/bcmail.jar /usr/share/java/bcpkix.jar 
 RTF_CLASS_PATH       := /usr/share/java/itext.jar /usr/share/java/pdfrenderer.jar /usr/share/java/dom4j.jar
 RUPS_CLASS_PATH      := /usr/share/java/itext.jar
 




More information about the pkg-java-commits mailing list