Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 701191 Details for
Bug 806262
bouncycastle-1.48 is available
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
incomplete patch for itext using bc-1.47
itext-bc147.patch (text/plain), 32.76 KB, created by
Orcan Ogetbil
on 2013-02-22 13:18:08 UTC
(
hide
)
Description:
incomplete patch for itext using bc-1.47
Filename:
MIME Type:
Creator:
Orcan Ogetbil
Created:
2013-02-22 13:18:08 UTC
Size:
32.76 KB
patch
obsolete
>diff -rupN src.old/ant/compile.xml src/ant/compile.xml >--- src.old/ant/compile.xml 2012-05-28 12:44:17.971405686 -0400 >+++ src/ant/compile.xml 2012-05-28 12:44:45.026298108 -0400 >@@ -15,7 +15,7 @@ > <!-- jars needed for iText (core) --> > <pathelement path="${itext.lib}/${lib.bcmail}"/> > <pathelement path="${itext.lib}/${lib.bcprov}"/> >- <pathelement path="${itext.lib}/${lib.bctsp}"/> >+ <pathelement path="${itext.lib}/${lib.bcpkix}"/> > <!-- jars needed for RUPS --> > <pathelement path="${itext.lib}/${lib.pdf-renderer}"/> > <pathelement path="${itext.lib}/${lib.dom4j}"/> >@@ -128,7 +128,7 @@ > <jar destfile="${itext.rups.jar}" basedir="${itext.rups.bin}" includes="**/*.class, **/*.png"> > <manifest> > <attribute name="Main-Class" value="com.lowagie.rups.Rups"/> >- <attribute name="Class-Path" value="iText-${releasenumber}.jar ${lib.pdf-renderer} ${lib.bcmail} ${lib.bcprov} ${lib.bctsp} ${lib.dom4j}"/> >+ <attribute name="Class-Path" value="iText-${releasenumber}.jar ${lib.pdf-renderer} ${lib.bcmail} ${lib.bcprov} ${lib.bcpkix} ${lib.dom4j}"/> > </manifest> > </jar> > </target> >@@ -148,7 +148,7 @@ > <jar destfile="${itext.toolbox.jar}" basedir="${itext.toolbox.bin}" includes="**/*.class, **/*.png, **/*.txt, **/*.gif"> > <manifest> > <attribute name="Main-Class" value="com.lowagie.toolbox.Toolbox"/> >- <attribute name="Class-Path" value="iText-${releasenumber}.jar ${lib.bcmail} ${lib.bctsp} ${lib.bcprov}"/> >+ <attribute name="Class-Path" value="iText-${releasenumber}.jar ${lib.bcmail} ${lib.bcpkix} ${lib.bcprov}"/> > </manifest> > </jar> > </target> >diff -rupN src.old/ant/pom.xml src/ant/pom.xml >--- src.old/ant/pom.xml 2009-06-09 01:16:39.000000000 -0400 >+++ src/ant/pom.xml 2012-05-28 12:40:23.014339711 -0400 >@@ -78,7 +78,7 @@ > </dependency> > <dependency> > <groupId>bouncycastle</groupId> >- <artifactId>bctsp-bc.jdk</artifactId> >+ <artifactId>bcpkix-bc.jdk</artifactId> > <version>bc.version</version> > </dependency> > </dependencies> >diff -rupN src.old/ant/release.xml src/ant/release.xml >--- src.old/ant/release.xml 2009-06-09 01:16:39.000000000 -0400 >+++ src/ant/release.xml 2012-05-28 12:40:23.017339699 -0400 >@@ -44,7 +44,7 @@ > <zipfileset prefix="lib" dir="${itext.lib}"> > <include name="bcmail-${bc.jdk}-${bc.version}.jar" /> > <include name="bcprov-${bc.jdk}-${bc.version}.jar" /> >- <include name="bctsp-${bc.jdk}-${bc.version}.jar" /> >+ <include name="bcpkix-${bc.jdk}-${bc.version}.jar" /> > <!-- jars needed for RUPS --> > <include name="pdf-renderer.jar" /> > <include name="dom4j-1.6.1.jar" /> >@@ -59,7 +59,7 @@ > <tarfileset prefix="lib" dir="${itext.lib}"> > <include name="bcmail-${bc.jdk}-${bc.version}.jar" /> > <include name="bcprov-${bc.jdk}-${bc.version}.jar" /> >- <include name="bctsp-${bc.jdk}-${bc.version}.jar" /> >+ <include name="bcpkix-${bc.jdk}-${bc.version}.jar" /> > <!-- jars needed for RUPS --> > <include name="pdf-renderer.jar" /> > <include name="dom4j-1.6.1.jar" /> >@@ -179,11 +179,11 @@ > <delete dir="${itext.bin.temp}" /> > </target> > >- <target name="unsign.bctsp"> >+ <target name="unsign.bcpkix"> > <mkdir dir="${itext.jnlp}" /> > <mkdir dir="${itext.bin.temp}" /> >- <unjar src="${itext.lib}/bctsp-${bc.jdk}-${bc.version}.jar" dest="${itext.bin.temp}" /> >- <jar destfile="${itext.jnlp}/bctsp-${bc.jdk}-${bc.version}.jar" basedir="${itext.bin.temp}" includes="**/*.class" /> >+ <unjar src="${itext.lib}/bcpkix-${bc.jdk}-${bc.version}.jar" dest="${itext.bin.temp}" /> >+ <jar destfile="${itext.jnlp}/bcpkix-${bc.jdk}-${bc.version}.jar" basedir="${itext.bin.temp}" includes="**/*.class" /> > <delete dir="${itext.bin.temp}" /> > </target> > >@@ -203,7 +203,7 @@ > /> > </target> > >- <target name="release.jnlp" depends="unsign.bcmail, unsign.bcprov, unsign.bctsp, keystore"> >+ <target name="release.jnlp" depends="unsign.bcmail, unsign.bcprov, unsign.bcpkix, keystore"> > <copy file="${itext.src}/jnlp/rups.jnlp" tofile="${itext.jnlp}/rups.jnlp" overwrite="yes"/> > <copy file="${itext.src}/jnlp/toolbox.jnlp" tofile="${itext.jnlp}/toolbox.jnlp" overwrite="yes"/> > <copy file="${itext.rups.jar}" tofile="${itext.jnlp}/iText-rups.jar" overwrite="yes"/> >@@ -226,7 +226,7 @@ > storetype="${itext.keystore.storetype}" > /> > <signjar >- jar="${itext.jnlp}/bctsp-${bc.jdk}-${bc.version}.jar" >+ jar="${itext.jnlp}/bcpkix-${bc.jdk}-${bc.version}.jar" > keystore="${itext.keystore.filename}" > storepass="${itext.keystore.password}" > alias="${itext.keystore.alias}" >diff -rupN src.old/ant/site.xml src/ant/site.xml >--- src.old/ant/site.xml 2009-06-09 01:16:39.000000000 -0400 >+++ src/ant/site.xml 2012-05-28 12:40:23.019339691 -0400 >@@ -15,7 +15,7 @@ > <pathelement location="${itext.bin}"/> > <pathelement path="${itext.lib}/bcmail-${bc.jdk}-${bc.version}.jar"/> > <pathelement path="${itext.lib}/bcprov-${bc.jdk}-${bc.version}.jar"/> >- <pathelement path="${itext.lib}/bctsp-${bc.jdk}-${bc.version}.jar"/> >+ <pathelement path="${itext.lib}/bcpkix-${bc.jdk}-${bc.version}.jar"/> > <pathelement path="${itext.lib}/dom4j-1.6.1.jar"/> > <pathelement path="${itext.lib}/pdf-renderer.jar"/> > </path> >diff -rupN src.old/core/com/lowagie/text/pdf/PdfPKCS7.java src/core/com/lowagie/text/pdf/PdfPKCS7.java >--- src.old/core/com/lowagie/text/pdf/PdfPKCS7.java 2009-07-07 02:57:52.000000000 -0400 >+++ src/core/com/lowagie/text/pdf/PdfPKCS7.java 2012-05-28 12:22:29.441601700 -0400 >@@ -75,7 +75,7 @@ import java.util.HashSet; > import java.util.Iterator; > import java.util.Set; > >-import org.bouncycastle.asn1.ASN1Encodable; >+import org.bouncycastle.asn1.ASN1Encoding; > import org.bouncycastle.asn1.ASN1EncodableVector; > import org.bouncycastle.asn1.ASN1InputStream; > import org.bouncycastle.asn1.ASN1OutputStream; >@@ -85,13 +85,13 @@ import org.bouncycastle.asn1.ASN1TaggedO > 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.ASN1Primitive; >+import org.bouncycastle.asn1.ASN1ObjectIdentifier; > 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.ASN1String; > import org.bouncycastle.asn1.DERTaggedObject; > import org.bouncycastle.asn1.DERUTCTime; > import org.bouncycastle.asn1.cms.AttributeTable; >@@ -334,8 +334,8 @@ public class PdfPKCS7 { > basicResp = null; > boolean ret = false; > while (true) { >- if ((seq.getObjectAt(0) instanceof DERObjectIdentifier) >- && ((DERObjectIdentifier)seq.getObjectAt(0)).getId().equals(OCSPObjectIdentifiers.id_pkix_ocsp_basic.getId())) { >+ if ((seq.getObjectAt(0) instanceof ASN1ObjectIdentifier) >+ && ((ASN1ObjectIdentifier)seq.getObjectAt(0)).getId().equals(OCSPObjectIdentifiers.id_pkix_ocsp_basic.getId())) { > break; > } > ret = true; >@@ -379,7 +379,7 @@ public class PdfPKCS7 { > // > // Basic checks to make sure it's a PKCS#7 SignedData Object > // >- DERObject pkcs; >+ ASN1Primitive pkcs; > > try { > pkcs = din.readObject(); >@@ -391,7 +391,7 @@ public class PdfPKCS7 { > throw new IllegalArgumentException("Not a valid PKCS#7 object - not a sequence"); > } > ASN1Sequence signedData = (ASN1Sequence)pkcs; >- DERObjectIdentifier objId = (DERObjectIdentifier)signedData.getObjectAt(0); >+ ASN1ObjectIdentifier objId = (ASN1ObjectIdentifier)signedData.getObjectAt(0); > if (!objId.getId().equals(ID_PKCS7_SIGNED_DATA)) > throw new IllegalArgumentException("Not a valid PKCS#7 object - not signed data"); > ASN1Sequence content = (ASN1Sequence)((DERTaggedObject)signedData.getObjectAt(1)).getObject(); >@@ -411,7 +411,7 @@ public class PdfPKCS7 { > while (e.hasMoreElements()) > { > ASN1Sequence s = (ASN1Sequence)e.nextElement(); >- DERObjectIdentifier o = (DERObjectIdentifier)s.getObjectAt(0); >+ ASN1ObjectIdentifier o = (ASN1ObjectIdentifier)s.getObjectAt(0); > digestalgos.add(o.getId()); > } > >@@ -459,20 +459,20 @@ public class PdfPKCS7 { > throw new IllegalArgumentException("Can't find signing certificate with serial " + serialNumber.toString(16)); > } > signCertificateChain(); >- digestAlgorithm = ((DERObjectIdentifier)((ASN1Sequence)signerInfo.getObjectAt(2)).getObjectAt(0)).getId(); >+ digestAlgorithm = ((ASN1ObjectIdentifier)((ASN1Sequence)signerInfo.getObjectAt(2)).getObjectAt(0)).getId(); > next = 3; > 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); >- if (((DERObjectIdentifier)seq2.getObjectAt(0)).getId().equals(ID_MESSAGE_DIGEST)) { >+ if (((ASN1ObjectIdentifier)seq2.getObjectAt(0)).getId().equals(ID_MESSAGE_DIGEST)) { > ASN1Set set = (ASN1Set)seq2.getObjectAt(1); > digestAttr = ((DEROctetString)set.getObjectAt(0)).getOctets(); > } >- else if (((DERObjectIdentifier)seq2.getObjectAt(0)).getId().equals(ID_ADBE_REVOCATION)) { >+ else if (((ASN1ObjectIdentifier)seq2.getObjectAt(0)).getId().equals(ID_ADBE_REVOCATION)) { > ASN1Set setout = (ASN1Set)seq2.getObjectAt(1); > ASN1Sequence seqout = (ASN1Sequence)setout.getObjectAt(0); > for (int j = 0; j < seqout.size(); ++j) { >@@ -488,7 +488,7 @@ public class PdfPKCS7 { > throw new IllegalArgumentException("Authenticated attribute is missing the digest."); > ++next; > } >- digestEncryptionAlgorithm = ((DERObjectIdentifier)((ASN1Sequence)signerInfo.getObjectAt(next++)).getObjectAt(0)).getId(); >+ digestEncryptionAlgorithm = ((ASN1ObjectIdentifier)((ASN1Sequence)signerInfo.getObjectAt(next++)).getObjectAt(0)).getId(); > digest = ((DEROctetString)signerInfo.getObjectAt(next++)).getOctets(); > if (next < signerInfo.size() && (signerInfo.getObjectAt(next) instanceof DERTaggedObject)) { > DERTaggedObject taggedObject = (DERTaggedObject) signerInfo.getObjectAt(next); >@@ -949,7 +949,7 @@ public class PdfPKCS7 { > */ > 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; > } >@@ -960,8 +960,8 @@ public class PdfPKCS7 { > if ( AccessDescription.size() != 2 ) { > 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)); >+ if ((AccessDescription.getObjectAt(0) instanceof ASN1ObjectIdentifier) && ((ASN1ObjectIdentifier)AccessDescription.getObjectAt(0)).getId().equals("1.3.6.1.5.5.7.48.1")) { >+ String AccessLocation = getStringFromGeneralName((ASN1Primitive)AccessDescription.getObjectAt(1)); > if ( AccessLocation == null ) { > return "" ; > } else { >@@ -999,7 +999,7 @@ public class PdfPKCS7 { > 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 +1010,7 @@ public class PdfPKCS7 { > 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"); > } >@@ -1018,13 +1018,13 @@ public class PdfPKCS7 { > /** > * Get the "issuer" from the TBSCertificate bytes that are passed in > * @param enc a TBSCertificate in a byte array >- * @return a DERObject >+ * @return a ASN1Primitive > */ >- 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); >@@ -1034,13 +1034,13 @@ public class PdfPKCS7 { > /** > * Get the "subject" from the TBSCertificate bytes that are passed in > * @param enc A TBSCertificate in a byte array >- * @return a DERObject >+ * @return a ASN1Primitive > */ >- 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); >@@ -1174,14 +1174,14 @@ public class PdfPKCS7 { > ASN1EncodableVector digestAlgorithms = new ASN1EncodableVector(); > for(Iterator it = digestalgos.iterator(); it.hasNext();) { > ASN1EncodableVector algos = new ASN1EncodableVector(); >- algos.add(new DERObjectIdentifier((String)it.next())); >+ algos.add(new ASN1ObjectIdentifier((String)it.next())); > algos.add(DERNull.INSTANCE); > digestAlgorithms.add(new DERSequence(algos)); > } > > // Create the contentInfo. > ASN1EncodableVector v = new ASN1EncodableVector(); >- v.add(new DERObjectIdentifier(ID_PKCS7_DATA)); >+ v.add(new ASN1ObjectIdentifier(ID_PKCS7_DATA)); > if (RSAdata != null) > v.add(new DERTaggedObject(0, new DEROctetString(RSAdata))); > DERSequence contentinfo = new DERSequence(v); >@@ -1211,7 +1211,7 @@ public class PdfPKCS7 { > > // Add the digestAlgorithm > v = new ASN1EncodableVector(); >- v.add(new DERObjectIdentifier(digestAlgorithm)); >+ v.add(new ASN1ObjectIdentifier(digestAlgorithm)); > v.add(new DERNull()); > signerinfo.add(new DERSequence(v)); > >@@ -1221,7 +1221,7 @@ public class PdfPKCS7 { > } > // Add the digestEncryptionAlgorithm > v = new ASN1EncodableVector(); >- v.add(new DERObjectIdentifier(digestEncryptionAlgorithm)); >+ v.add(new ASN1ObjectIdentifier(digestEncryptionAlgorithm)); > v.add(new DERNull()); > signerinfo.add(new DERSequence(v)); > >@@ -1266,7 +1266,7 @@ public class PdfPKCS7 { > // and return it > // > ASN1EncodableVector whole = new ASN1EncodableVector(); >- whole.add(new DERObjectIdentifier(ID_PKCS7_SIGNED_DATA)); >+ whole.add(new ASN1ObjectIdentifier(ID_PKCS7_SIGNED_DATA)); > whole.add(new DERTaggedObject(0, new DERSequence(body))); > > ByteArrayOutputStream bOut = new ByteArrayOutputStream(); >@@ -1302,7 +1302,7 @@ public class PdfPKCS7 { > ASN1EncodableVector unauthAttributes = new ASN1EncodableVector(); > > ASN1EncodableVector v = new ASN1EncodableVector(); >- v.add(new DERObjectIdentifier(ID_TIME_STAMP_TOKEN)); // id-aa-timeStampToken >+ v.add(new ASN1ObjectIdentifier(ID_TIME_STAMP_TOKEN)); // id-aa-timeStampToken > ASN1Sequence seq = (ASN1Sequence) tempstream.readObject(); > v.add(new DERSet(seq)); > >@@ -1340,7 +1340,7 @@ public class PdfPKCS7 { > */ > 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); >@@ -1351,20 +1351,20 @@ public class PdfPKCS7 { > try { > ASN1EncodableVector attribute = new ASN1EncodableVector(); > ASN1EncodableVector v = new ASN1EncodableVector(); >- v.add(new DERObjectIdentifier(ID_CONTENT_TYPE)); >- v.add(new DERSet(new DERObjectIdentifier(ID_PKCS7_DATA))); >+ v.add(new ASN1ObjectIdentifier(ID_CONTENT_TYPE)); >+ v.add(new DERSet(new ASN1ObjectIdentifier(ID_PKCS7_DATA))); > attribute.add(new DERSequence(v)); > v = new ASN1EncodableVector(); >- v.add(new DERObjectIdentifier(ID_SIGNING_TIME)); >+ v.add(new ASN1ObjectIdentifier(ID_SIGNING_TIME)); > v.add(new DERSet(new DERUTCTime(signingTime.getTime()))); > attribute.add(new DERSequence(v)); > v = new ASN1EncodableVector(); >- v.add(new DERObjectIdentifier(ID_MESSAGE_DIGEST)); >+ v.add(new ASN1ObjectIdentifier(ID_MESSAGE_DIGEST)); > v.add(new DERSet(new DEROctetString(secondDigest))); > attribute.add(new DERSequence(v)); > if (ocsp != null) { > v = new ASN1EncodableVector(); >- v.add(new DERObjectIdentifier(ID_ADBE_REVOCATION)); >+ v.add(new ASN1ObjectIdentifier(ID_ADBE_REVOCATION)); > DEROctetString doctet = new DEROctetString(ocsp); > ASN1EncodableVector vo1 = new ASN1EncodableVector(); > ASN1EncodableVector v2 = new ASN1EncodableVector(); >@@ -1380,7 +1380,7 @@ public class PdfPKCS7 { > } > else if (!crls.isEmpty()) { > v = new ASN1EncodableVector(); >- v.add(new DERObjectIdentifier(ID_ADBE_REVOCATION)); >+ v.add(new ASN1ObjectIdentifier(ID_ADBE_REVOCATION)); > ASN1EncodableVector v2 = new ASN1EncodableVector(); > for (Iterator i = crls.iterator();i.hasNext();) { > ASN1InputStream t = new ASN1InputStream(new ByteArrayInputStream(((X509CRL)i.next()).getEncoded())); >@@ -1467,70 +1467,70 @@ public class PdfPKCS7 { > /** > * country code - StringType(SIZE(2)) > */ >- public static final DERObjectIdentifier C = new DERObjectIdentifier("2.5.4.6"); >+ public static final ASN1ObjectIdentifier C = new ASN1ObjectIdentifier("2.5.4.6"); > > /** > * organization - StringType(SIZE(1..64)) > */ >- public static final DERObjectIdentifier O = new DERObjectIdentifier("2.5.4.10"); >+ public static final ASN1ObjectIdentifier O = new ASN1ObjectIdentifier("2.5.4.10"); > > /** > * organizational unit name - StringType(SIZE(1..64)) > */ >- public static final DERObjectIdentifier OU = new DERObjectIdentifier("2.5.4.11"); >+ public static final ASN1ObjectIdentifier OU = new ASN1ObjectIdentifier("2.5.4.11"); > > /** > * Title > */ >- public static final DERObjectIdentifier T = new DERObjectIdentifier("2.5.4.12"); >+ public static final ASN1ObjectIdentifier T = new ASN1ObjectIdentifier("2.5.4.12"); > > /** > * common name - StringType(SIZE(1..64)) > */ >- public static final DERObjectIdentifier CN = new DERObjectIdentifier("2.5.4.3"); >+ public static final ASN1ObjectIdentifier CN = new ASN1ObjectIdentifier("2.5.4.3"); > > /** > * device serial number name - StringType(SIZE(1..64)) > */ >- public static final DERObjectIdentifier SN = new DERObjectIdentifier("2.5.4.5"); >+ public static final ASN1ObjectIdentifier SN = new ASN1ObjectIdentifier("2.5.4.5"); > > /** > * locality name - StringType(SIZE(1..64)) > */ >- public static final DERObjectIdentifier L = new DERObjectIdentifier("2.5.4.7"); >+ public static final ASN1ObjectIdentifier L = new ASN1ObjectIdentifier("2.5.4.7"); > > /** > * state, or province name - StringType(SIZE(1..64)) > */ >- public static final DERObjectIdentifier ST = new DERObjectIdentifier("2.5.4.8"); >+ public static final ASN1ObjectIdentifier ST = new ASN1ObjectIdentifier("2.5.4.8"); > > /** Naming attribute of type X520name */ >- public static final DERObjectIdentifier SURNAME = new DERObjectIdentifier("2.5.4.4"); >+ public static final ASN1ObjectIdentifier SURNAME = new ASN1ObjectIdentifier("2.5.4.4"); > /** Naming attribute of type X520name */ >- public static final DERObjectIdentifier GIVENNAME = new DERObjectIdentifier("2.5.4.42"); >+ public static final ASN1ObjectIdentifier GIVENNAME = new ASN1ObjectIdentifier("2.5.4.42"); > /** Naming attribute of type X520name */ >- public static final DERObjectIdentifier INITIALS = new DERObjectIdentifier("2.5.4.43"); >+ public static final ASN1ObjectIdentifier INITIALS = new ASN1ObjectIdentifier("2.5.4.43"); > /** Naming attribute of type X520name */ >- public static final DERObjectIdentifier GENERATION = new DERObjectIdentifier("2.5.4.44"); >+ public static final ASN1ObjectIdentifier GENERATION = new ASN1ObjectIdentifier("2.5.4.44"); > /** Naming attribute of type X520name */ >- public static final DERObjectIdentifier UNIQUE_IDENTIFIER = new DERObjectIdentifier("2.5.4.45"); >+ public static final ASN1ObjectIdentifier UNIQUE_IDENTIFIER = new ASN1ObjectIdentifier("2.5.4.45"); > > /** > * Email address (RSA PKCS#9 extension) - IA5String. > * <p>Note: if you're trying to be ultra orthodox, don't use this! It shouldn't be in here. > */ >- public static final DERObjectIdentifier EmailAddress = new DERObjectIdentifier("1.2.840.113549.1.9.1"); >+ public static final ASN1ObjectIdentifier EmailAddress = new ASN1ObjectIdentifier("1.2.840.113549.1.9.1"); > > /** > * email address in Verisign certificates > */ >- public static final DERObjectIdentifier E = EmailAddress; >+ public static final ASN1ObjectIdentifier E = EmailAddress; > > /** object identifier */ >- public static final DERObjectIdentifier DC = new DERObjectIdentifier("0.9.2342.19200300.100.1.25"); >+ public static final ASN1ObjectIdentifier DC = new ASN1ObjectIdentifier("0.9.2342.19200300.100.1.25"); > > /** LDAP User id. */ >- public static final DERObjectIdentifier UID = new DERObjectIdentifier("0.9.2342.19200300.100.1.1"); >+ public static final ASN1ObjectIdentifier UID = new ASN1ObjectIdentifier("0.9.2342.19200300.100.1.1"); > > /** A HashMap with default symbols */ > public static HashMap DefaultSymbols = new HashMap(); >@@ -1575,7 +1575,7 @@ public class PdfPKCS7 { > vs = new ArrayList(); > values.put(id, vs); > } >- vs.add(((DERString)s.getObjectAt(1)).getString()); >+ vs.add(((ASN1String)s.getObjectAt(1)).getString()); > } > } > } >diff -rupN src.old/core/com/lowagie/text/pdf/PdfPublicKeySecurityHandler.java src/core/com/lowagie/text/pdf/PdfPublicKeySecurityHandler.java >--- src.old/core/com/lowagie/text/pdf/PdfPublicKeySecurityHandler.java 2008-05-14 09:10:19.000000000 -0400 >+++ src/core/com/lowagie/text/pdf/PdfPublicKeySecurityHandler.java 2012-05-28 12:22:29.426601760 -0400 >@@ -50,7 +50,7 @@ > /** > * The below 2 methods are from pdfbox. > * >- * private DERObject createDERForRecipient(byte[] in, X509Certificate cert) ; >+ * private ASN1Primitive createDERForRecipient(byte[] in, X509Certificate cert) ; > * private KeyTransRecipientInfo computeRecipientInfo(X509Certificate x509certificate, byte[] abyte0); > * > * 2006-11-22 Aiken Sam. >@@ -108,8 +108,8 @@ import javax.crypto.KeyGenerator; > 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; >@@ -244,7 +244,7 @@ public class PdfPublicKeySecurityHandler > 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 @@ public class PdfPublicKeySecurityHandler > return EncodedRecipients; > } > >- private DERObject createDERForRecipient(byte[] in, X509Certificate cert) >+ private ASN1Primitive createDERForRecipient(byte[] in, X509Certificate cert) > throws IOException, > GeneralSecurityException > { >@@ -287,7 +287,7 @@ public class PdfPublicKeySecurityHandler > 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(); >@@ -297,13 +297,13 @@ public class PdfPublicKeySecurityHandler > 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 -rupN src.old/test.xml src/test.xml >--- src.old/test.xml 2009-06-09 01:16:40.000000000 -0400 >+++ src/test.xml 2012-05-28 12:39:43.396497162 -0400 >@@ -19,7 +19,7 @@ > <pathelement location="${servlet.jar}"/> > <pathelement path="${itext.lib}/bcmail-${bc.jdk}-${bc.version}.jar"/> > <pathelement path="${itext.lib}/bcprov-${bc.jdk}-${bc.version}.jar"/> >- <pathelement path="${itext.lib}/bctsp-${bc.jdk}-${bc.version}.jar"/> >+ <pathelement path="${itext.lib}/bcpkix-${bc.jdk}-${bc.version}.jar"/> > </path> > > <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> >@@ -61,7 +61,7 @@ > <pathelement location="${junit.jar}"/> > <pathelement path="${itext.lib}/bcmail-${bc.jdk}-${bc.version}.jar"/> > <pathelement path="${itext.lib}/bcprov-${bc.jdk}-${bc.version}.jar"/> >- <pathelement path="${itext.lib}/bctsp-${bc.jdk}-${bc.version}.jar"/> >+ <pathelement path="${itext.lib}/bcpkix-${bc.jdk}-${bc.version}.jar"/> > </path> > > <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> >@@ -192,19 +192,19 @@ > <javadoc version="true" author="true" source="${itext.jdk.rups}" private="true" maxmemory="128m" > destdir="${itext.reports}/jdiff/${itext.previous.version}" > sourcepath="${itext.previous.location}/core:${itext.previous.location}/rtf:${itext.previous.location}/rups:${itext.previous.location}/toolbox" >- classpath="${itext.lib}/bcmail-${bc.jdk}-${bc.version}.jar:${itext.lib}/bcprov-${bc.jdk}-${bc.version}.jar:${itext.lib}/bctsp-${bc.jdk}-${bc.version}.jar:${itext.lib}/pdf-renderer.jar:${itext.lib}/dom4j-1.6.1.jar" > >+ classpath="${itext.lib}/bcmail-${bc.jdk}-${bc.version}.jar:${itext.lib}/bcprov-${bc.jdk}-${bc.version}.jar:${itext.lib}/bcpkix-${bc.jdk}-${bc.version}.jar:${itext.lib}/pdf-renderer.jar:${itext.lib}/dom4j-1.6.1.jar" > > </javadoc> > > <javadoc version="true" author="true" source="${itext.jdk.rups}" private="true" maxmemory="128m" > destdir="${itext.reports}/jdiff/${releasenumber}" > sourcepath="${itext.src}/core:${itext.src}/rtf:${itext.src}/rups:${itext.src}/toolbox" >- classpath="${itext.lib}/bcmail-${bc.jdk}-${bc.version}.jar:${itext.lib}/bcprov-${bc.jdk}-${bc.version}.jar:${itext.lib}/bctsp-${bc.jdk}-${bc.version}.jar:${itext.lib}/pdf-renderer.jar:${itext.lib}/dom4j-1.6.1.jar" > >+ classpath="${itext.lib}/bcmail-${bc.jdk}-${bc.version}.jar:${itext.lib}/bcprov-${bc.jdk}-${bc.version}.jar:${itext.lib}/bcpkix-${bc.jdk}-${bc.version}.jar:${itext.lib}/pdf-renderer.jar:${itext.lib}/dom4j-1.6.1.jar" > > </javadoc> > > <javadoc version="true" author="true" source="${itext.jdk.rups}" private="true" maxmemory="128m" > destdir="${itext.reports}/jdiff" > sourcepath="${itext.previous.location}/core:${itext.previous.location}/rtf:${itext.previous.location}/rups:${itext.previous.location}/toolbox" >- classpath="${itext.lib}/bcmail-${bc.jdk}-${bc.version}.jar:${itext.lib}/bcprov-${bc.jdk}-${bc.version}.jar:${itext.lib}/bctsp-${bc.jdk}-${bc.version}.jar:${itext.lib}/pdf-renderer.jar:${itext.lib}/dom4j-1.6.1.jar" > >+ classpath="${itext.lib}/bcmail-${bc.jdk}-${bc.version}.jar:${itext.lib}/bcprov-${bc.jdk}-${bc.version}.jar:${itext.lib}/bcpkix-${bc.jdk}-${bc.version}.jar:${itext.lib}/pdf-renderer.jar:${itext.lib}/dom4j-1.6.1.jar" > > <doclet name="jdiff.JDiff" path="${JDIFF_HOME}/jdiff.jar:${JDIFF_HOME}/xerces.jar"> > <param name="-apiname" value="${itext.previous.version}"/> > <param name="-baseURI" value="http://www.w3.org"/> >@@ -215,7 +215,7 @@ > <javadoc version="true" author="true" source="${itext.jdk.rups}" private="true" maxmemory="128m" > destdir="${itext.reports}/jdiff" > sourcepath="${itext.src}/core:${itext.src}/rtf:${itext.src}/rups:${itext.src}/toolbox" >- classpath="${itext.lib}/bcmail-${bc.jdk}-${bc.version}.jar:${itext.lib}/bcprov-${bc.jdk}-${bc.version}.jar:${itext.lib}/bctsp-${bc.jdk}-${bc.version}.jar:${itext.lib}/pdf-renderer.jar:${itext.lib}/dom4j-1.6.1.jar" > >+ classpath="${itext.lib}/bcmail-${bc.jdk}-${bc.version}.jar:${itext.lib}/bcprov-${bc.jdk}-${bc.version}.jar:${itext.lib}/bcpkix-${bc.jdk}-${bc.version}.jar:${itext.lib}/pdf-renderer.jar:${itext.lib}/dom4j-1.6.1.jar" > > <doclet name="jdiff.JDiff" path="${JDIFF_HOME}/jdiff.jar:${JDIFF_HOME}/xerces.jar"> > <param name="-apiname" value="${releasenumber}"/> > <param name="-baseURI" value="http://www.w3.org"/>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 806262
: 701191