blob: b18c53cf18b83513a659fb18554e012d3dfb3ad3 [file] [log] [blame]
Kenny Root5db505e2013-12-11 16:35:05 -08001diff -Naur bcpkix-jdk15on-150.orig/org/bouncycastle/cms/CMSSignedData.java bcpkix-jdk15on-150/org/bouncycastle/cms/CMSSignedData.java
2--- bcpkix-jdk15on-150.orig/org/bouncycastle/cms/CMSSignedData.java 2013-12-03 20:18:54.000000000 +0000
3+++ bcpkix-jdk15on-150/org/bouncycastle/cms/CMSSignedData.java 2013-12-12 00:35:05.000000000 +0000
4@@ -285,18 +285,20 @@
Brian Carlstroma198e1e2013-05-24 19:14:15 -07005 return HELPER.getAttributeCertificates(signedData.getCertificates());
6 }
7
8- /**
9- * Return any OtherRevocationInfo OtherRevInfo objects of the type indicated by otherRevocationInfoFormat in
10- * this SignedData structure.
11- *
12- * @param otherRevocationInfoFormat OID of the format type been looked for.
13- *
14- * @return a Store of ASN1Encodable objects representing any objects of otherRevocationInfoFormat found.
15- */
16- public Store getOtherRevocationInfo(ASN1ObjectIdentifier otherRevocationInfoFormat)
17- {
18- return HELPER.getOtherRevocationInfo(otherRevocationInfoFormat, signedData.getCRLs());
19- }
20+ // BEGIN android-removed
21+ // /**
22+ // * Return any OtherRevocationInfo OtherRevInfo objects of the type indicated by otherRevocationInfoFormat in
23+ // * this SignedData structure.
24+ // *
25+ // * @param otherRevocationInfoFormat OID of the format type been looked for.
26+ // *
27+ // * @return a Store of ASN1Encodable objects representing any objects of otherRevocationInfoFormat found.
28+ // */
29+ // public Store getOtherRevocationInfo(ASN1ObjectIdentifier otherRevocationInfoFormat)
30+ // {
31+ // return HELPER.getOtherRevocationInfo(otherRevocationInfoFormat, signedData.getCRLs());
32+ // }
33+ // END android-removed
34
35 /**
36 * Return the a string representation of the OID associated with the
Kenny Root5db505e2013-12-11 16:35:05 -080037@@ -331,71 +333,73 @@
Brian Carlstroma198e1e2013-05-24 19:14:15 -070038 return contentInfo.getEncoded();
39 }
40
41- /**
42- * Verify all the SignerInformation objects and their associated counter signatures attached
43- * to this CMS SignedData object.
44- *
45- * @param verifierProvider a provider of SignerInformationVerifier objects.
46- * @return true if all verify, false otherwise.
47- * @throws CMSException if an exception occurs during the verification process.
48- */
49- public boolean verifySignatures(SignerInformationVerifierProvider verifierProvider)
50- throws CMSException
51- {
52- return verifySignatures(verifierProvider, false);
53- }
54-
55- /**
56- * Verify all the SignerInformation objects and optionally their associated counter signatures attached
57- * to this CMS SignedData object.
58- *
59- * @param verifierProvider a provider of SignerInformationVerifier objects.
60- * @param ignoreCounterSignatures if true don't check counter signatures. If false check counter signatures as well.
61- * @return true if all verify, false otherwise.
62- * @throws CMSException if an exception occurs during the verification process.
63- */
64- public boolean verifySignatures(SignerInformationVerifierProvider verifierProvider, boolean ignoreCounterSignatures)
65- throws CMSException
66- {
67- Collection signers = this.getSignerInfos().getSigners();
68-
69- for (Iterator it = signers.iterator(); it.hasNext();)
70- {
71- SignerInformation signer = (SignerInformation)it.next();
72-
73- try
74- {
75- SignerInformationVerifier verifier = verifierProvider.get(signer.getSID());
76-
77- if (!signer.verify(verifier))
78- {
79- return false;
80- }
81-
82- if (!ignoreCounterSignatures)
83- {
84- Collection counterSigners = signer.getCounterSignatures().getSigners();
85-
86- for (Iterator cIt = counterSigners.iterator(); cIt.hasNext();)
87- {
88- SignerInformation counterSigner = (SignerInformation)cIt.next();
89- SignerInformationVerifier counterVerifier = verifierProvider.get(signer.getSID());
90-
91- if (!counterSigner.verify(counterVerifier))
92- {
93- return false;
94- }
95- }
96- }
97- }
98- catch (OperatorCreationException e)
99- {
100- throw new CMSException("failure in verifier provider: " + e.getMessage(), e);
101- }
102- }
103-
104- return true;
105- }
106+ // BEGIN android-removed
107+ // /**
108+ // * Verify all the SignerInformation objects and their associated counter signatures attached
109+ // * to this CMS SignedData object.
110+ // *
111+ // * @param verifierProvider a provider of SignerInformationVerifier objects.
112+ // * @return true if all verify, false otherwise.
113+ // * @throws CMSException if an exception occurs during the verification process.
114+ // */
115+ // public boolean verifySignatures(SignerInformationVerifierProvider verifierProvider)
116+ // throws CMSException
117+ // {
118+ // return verifySignatures(verifierProvider, false);
119+ // }
120+ //
121+ // /**
122+ // * Verify all the SignerInformation objects and optionally their associated counter signatures attached
123+ // * to this CMS SignedData object.
124+ // *
125+ // * @param verifierProvider a provider of SignerInformationVerifier objects.
126+ // * @param ignoreCounterSignatures if true don't check counter signatures. If false check counter signatures as well.
127+ // * @return true if all verify, false otherwise.
128+ // * @throws CMSException if an exception occurs during the verification process.
129+ // */
130+ // public boolean verifySignatures(SignerInformationVerifierProvider verifierProvider, boolean ignoreCounterSignatures)
131+ // throws CMSException
132+ // {
133+ // Collection signers = this.getSignerInfos().getSigners();
134+ //
135+ // for (Iterator it = signers.iterator(); it.hasNext();)
136+ // {
137+ // SignerInformation signer = (SignerInformation)it.next();
138+ //
139+ // try
140+ // {
141+ // SignerInformationVerifier verifier = verifierProvider.get(signer.getSID());
142+ //
143+ // if (!signer.verify(verifier))
144+ // {
145+ // return false;
146+ // }
147+ //
148+ // if (!ignoreCounterSignatures)
149+ // {
150+ // Collection counterSigners = signer.getCounterSignatures().getSigners();
151+ //
152+ // for (Iterator cIt = counterSigners.iterator(); cIt.hasNext();)
153+ // {
154+ // SignerInformation counterSigner = (SignerInformation)cIt.next();
155+ // SignerInformationVerifier counterVerifier = verifierProvider.get(signer.getSID());
156+ //
157+ // if (!counterSigner.verify(counterVerifier))
158+ // {
159+ // return false;
160+ // }
161+ // }
162+ // }
163+ // }
164+ // catch (OperatorCreationException e)
165+ // {
166+ // throw new CMSException("failure in verifier provider: " + e.getMessage(), e);
167+ // }
168+ // }
169+ //
170+ // return true;
171+ // }
172+ // END android-removed
173
174 /**
175 * Replace the SignerInformation store associated with this
Kenny Root5db505e2013-12-11 16:35:05 -0800176diff -Naur bcpkix-jdk15on-150.orig/org/bouncycastle/cms/CMSSignedGenerator.java bcpkix-jdk15on-150/org/bouncycastle/cms/CMSSignedGenerator.java
177--- bcpkix-jdk15on-150.orig/org/bouncycastle/cms/CMSSignedGenerator.java 2013-12-03 20:18:54.000000000 +0000
178+++ bcpkix-jdk15on-150/org/bouncycastle/cms/CMSSignedGenerator.java 2013-12-12 00:35:05.000000000 +0000
179@@ -12,8 +12,10 @@
180 import org.bouncycastle.asn1.ASN1ObjectIdentifier;
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700181 import org.bouncycastle.asn1.DERTaggedObject;
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700182 import org.bouncycastle.asn1.cms.CMSObjectIdentifiers;
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700183-import org.bouncycastle.asn1.cms.OtherRevocationInfoFormat;
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700184-import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
185+// BEGIN android-removed
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700186+// import org.bouncycastle.asn1.cms.OtherRevocationInfoFormat;
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700187+// import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
188+// END android-removed
189 import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
190 import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers;
191 import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
Kenny Root5db505e2013-12-11 16:35:05 -0800192@@ -39,17 +41,21 @@
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700193 public static final String DIGEST_SHA384 = NISTObjectIdentifiers.id_sha384.getId();
194 public static final String DIGEST_SHA512 = NISTObjectIdentifiers.id_sha512.getId();
195 public static final String DIGEST_MD5 = PKCSObjectIdentifiers.md5.getId();
196- public static final String DIGEST_GOST3411 = CryptoProObjectIdentifiers.gostR3411.getId();
197- public static final String DIGEST_RIPEMD128 = TeleTrusTObjectIdentifiers.ripemd128.getId();
198- public static final String DIGEST_RIPEMD160 = TeleTrusTObjectIdentifiers.ripemd160.getId();
199- public static final String DIGEST_RIPEMD256 = TeleTrusTObjectIdentifiers.ripemd256.getId();
200+ // BEGIN android-removed
201+ // public static final String DIGEST_GOST3411 = CryptoProObjectIdentifiers.gostR3411.getId();
202+ // public static final String DIGEST_RIPEMD128 = TeleTrusTObjectIdentifiers.ripemd128.getId();
203+ // public static final String DIGEST_RIPEMD160 = TeleTrusTObjectIdentifiers.ripemd160.getId();
204+ // public static final String DIGEST_RIPEMD256 = TeleTrusTObjectIdentifiers.ripemd256.getId();
205+ // END android-removed
206
207 public static final String ENCRYPTION_RSA = PKCSObjectIdentifiers.rsaEncryption.getId();
208 public static final String ENCRYPTION_DSA = X9ObjectIdentifiers.id_dsa_with_sha1.getId();
209 public static final String ENCRYPTION_ECDSA = X9ObjectIdentifiers.ecdsa_with_SHA1.getId();
210 public static final String ENCRYPTION_RSA_PSS = PKCSObjectIdentifiers.id_RSASSA_PSS.getId();
211- public static final String ENCRYPTION_GOST3410 = CryptoProObjectIdentifiers.gostR3410_94.getId();
212- public static final String ENCRYPTION_ECGOST3410 = CryptoProObjectIdentifiers.gostR3410_2001.getId();
213+ // BEGIN android-removed
214+ // public static final String ENCRYPTION_GOST3410 = CryptoProObjectIdentifiers.gostR3410_94.getId();
215+ // public static final String ENCRYPTION_ECGOST3410 = CryptoProObjectIdentifiers.gostR3410_2001.getId();
216+ // END android-removed
217
218 private static final String ENCRYPTION_ECDSA_WITH_SHA1 = X9ObjectIdentifiers.ecdsa_with_SHA1.getId();
Kenny Root87490ac2013-09-26 11:06:21 -0700219 private static final String ENCRYPTION_ECDSA_WITH_SHA224 = X9ObjectIdentifiers.ecdsa_with_SHA224.getId();
Kenny Root5db505e2013-12-11 16:35:05 -0800220@@ -174,31 +180,33 @@
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700221 certs.addAll(CMSUtils.getAttributeCertificatesFromStore(attrStore));
222 }
223
224- /**
225- * Add a single instance of otherRevocationData to the CRL set to be included with the generated SignedData message.
226- *
227- * @param otherRevocationInfoFormat the OID specifying the format of the otherRevocationInfo data.
228- * @param otherRevocationInfo the otherRevocationInfo ASN.1 structure.
229- */
230- public void addOtherRevocationInfo(
231- ASN1ObjectIdentifier otherRevocationInfoFormat,
232- ASN1Encodable otherRevocationInfo)
233- {
234- crls.add(new DERTaggedObject(false, 1, new OtherRevocationInfoFormat(otherRevocationInfoFormat, otherRevocationInfo)));
235- }
236-
237- /**
238- * Add a Store of otherRevocationData to the CRL set to be included with the generated SignedData message.
239- *
240- * @param otherRevocationInfoFormat the OID specifying the format of the otherRevocationInfo data.
241- * @param otherRevocationInfos a Store of otherRevocationInfo data to add.
242- */
243- public void addOtherRevocationInfo(
244- ASN1ObjectIdentifier otherRevocationInfoFormat,
245- Store otherRevocationInfos)
246- {
247- crls.addAll(CMSUtils.getOthersFromStore(otherRevocationInfoFormat, otherRevocationInfos));
248- }
249+ // BEGIN android-removed
250+ // /**
251+ // * Add a single instance of otherRevocationData to the CRL set to be included with the generated SignedData message.
252+ // *
253+ // * @param otherRevocationInfoFormat the OID specifying the format of the otherRevocationInfo data.
254+ // * @param otherRevocationInfo the otherRevocationInfo ASN.1 structure.
255+ // */
256+ // public void addOtherRevocationInfo(
257+ // ASN1ObjectIdentifier otherRevocationInfoFormat,
258+ // ASN1Encodable otherRevocationInfo)
259+ // {
260+ // crls.add(new DERTaggedObject(false, 1, new OtherRevocationInfoFormat(otherRevocationInfoFormat, otherRevocationInfo)));
261+ // }
262+ //
263+ // /**
264+ // * Add a Store of otherRevocationData to the CRL set to be included with the generated SignedData message.
265+ // *
266+ // * @param otherRevocationInfoFormat the OID specifying the format of the otherRevocationInfo data.
267+ // * @param otherRevocationInfos a Store of otherRevocationInfo data to add.
268+ // */
269+ // public void addOtherRevocationInfo(
270+ // ASN1ObjectIdentifier otherRevocationInfoFormat,
271+ // Store otherRevocationInfos)
272+ // {
273+ // crls.addAll(CMSUtils.getOthersFromStore(otherRevocationInfoFormat, otherRevocationInfos));
274+ // }
275+ // END android-removed
276
277 /**
Kenny Root5db505e2013-12-11 16:35:05 -0800278 * Add a store of pre-calculated signers to the generator.
279diff -Naur bcpkix-jdk15on-150.orig/org/bouncycastle/cms/CMSSignedHelper.java bcpkix-jdk15on-150/org/bouncycastle/cms/CMSSignedHelper.java
280--- bcpkix-jdk15on-150.orig/org/bouncycastle/cms/CMSSignedHelper.java 2013-12-03 20:18:54.000000000 +0000
281+++ bcpkix-jdk15on-150/org/bouncycastle/cms/CMSSignedHelper.java 2013-12-12 00:35:05.000000000 +0000
282@@ -13,8 +13,10 @@
Brian Carlstrome1142c12013-01-30 18:26:40 -0800283 import org.bouncycastle.asn1.ASN1Set;
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700284 import org.bouncycastle.asn1.ASN1TaggedObject;
285 import org.bouncycastle.asn1.DERNull;
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700286-import org.bouncycastle.asn1.cms.OtherRevocationInfoFormat;
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700287-import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
288+// BEGIN android-removed
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700289+// import org.bouncycastle.asn1.cms.OtherRevocationInfoFormat;
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700290+// import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
291+// END android-removed
292 import org.bouncycastle.asn1.eac.EACObjectIdentifiers;
293 import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
294 import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers;
Kenny Root5db505e2013-12-11 16:35:05 -0800295@@ -53,12 +55,16 @@
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700296 addEntries(NISTObjectIdentifiers.dsa_with_sha384, "SHA384", "DSA");
297 addEntries(NISTObjectIdentifiers.dsa_with_sha512, "SHA512", "DSA");
298 addEntries(OIWObjectIdentifiers.dsaWithSHA1, "SHA1", "DSA");
299- addEntries(OIWObjectIdentifiers.md4WithRSA, "MD4", "RSA");
300- addEntries(OIWObjectIdentifiers.md4WithRSAEncryption, "MD4", "RSA");
301+ // BEGIN android-removed
302+ // addEntries(OIWObjectIdentifiers.md4WithRSA, "MD4", "RSA");
303+ // addEntries(OIWObjectIdentifiers.md4WithRSAEncryption, "MD4", "RSA");
304+ // END android-removed
305 addEntries(OIWObjectIdentifiers.md5WithRSA, "MD5", "RSA");
306 addEntries(OIWObjectIdentifiers.sha1WithRSA, "SHA1", "RSA");
307- addEntries(PKCSObjectIdentifiers.md2WithRSAEncryption, "MD2", "RSA");
308- addEntries(PKCSObjectIdentifiers.md4WithRSAEncryption, "MD4", "RSA");
309+ // BEGIN android-removed
310+ // addEntries(PKCSObjectIdentifiers.md2WithRSAEncryption, "MD2", "RSA");
311+ // addEntries(PKCSObjectIdentifiers.md4WithRSAEncryption, "MD4", "RSA");
312+ // END android-removed
313 addEntries(PKCSObjectIdentifiers.md5WithRSAEncryption, "MD5", "RSA");
314 addEntries(PKCSObjectIdentifiers.sha1WithRSAEncryption, "SHA1", "RSA");
Kenny Root87490ac2013-09-26 11:06:21 -0700315 addEntries(PKCSObjectIdentifiers.sha224WithRSAEncryption, "SHA224", "RSA");
Kenny Root5db505e2013-12-11 16:35:05 -0800316@@ -85,27 +91,31 @@
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700317 encryptionAlgs.put(PKCSObjectIdentifiers.rsaEncryption.getId(), "RSA");
318 encryptionAlgs.put(TeleTrusTObjectIdentifiers.teleTrusTRSAsignatureAlgorithm, "RSA");
319 encryptionAlgs.put(X509ObjectIdentifiers.id_ea_rsa.getId(), "RSA");
320- encryptionAlgs.put(CMSSignedDataGenerator.ENCRYPTION_RSA_PSS, "RSAandMGF1");
321- encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3410_94.getId(), "GOST3410");
322- encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3410_2001.getId(), "ECGOST3410");
323- encryptionAlgs.put("1.3.6.1.4.1.5849.1.6.2", "ECGOST3410");
324- encryptionAlgs.put("1.3.6.1.4.1.5849.1.1.5", "GOST3410");
325- encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001.getId(), "ECGOST3410");
326- encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94.getId(), "GOST3410");
327-
328- digestAlgs.put(PKCSObjectIdentifiers.md2.getId(), "MD2");
329- digestAlgs.put(PKCSObjectIdentifiers.md4.getId(), "MD4");
330+ // BEGIN android-removed
331+ // encryptionAlgs.put(CMSSignedDataGenerator.ENCRYPTION_RSA_PSS, "RSAandMGF1");
332+ // encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3410_94.getId(), "GOST3410");
333+ // encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3410_2001.getId(), "ECGOST3410");
334+ // encryptionAlgs.put("1.3.6.1.4.1.5849.1.6.2", "ECGOST3410");
335+ // encryptionAlgs.put("1.3.6.1.4.1.5849.1.1.5", "GOST3410");
336+ // encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001.getId(), "ECGOST3410");
337+ // encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94.getId(), "GOST3410");
338+ //
339+ // digestAlgs.put(PKCSObjectIdentifiers.md2.getId(), "MD2");
340+ // digestAlgs.put(PKCSObjectIdentifiers.md4.getId(), "MD4");
341+ // END android-removed
342 digestAlgs.put(PKCSObjectIdentifiers.md5.getId(), "MD5");
343 digestAlgs.put(OIWObjectIdentifiers.idSHA1.getId(), "SHA1");
Kenny Root87490ac2013-09-26 11:06:21 -0700344 digestAlgs.put(NISTObjectIdentifiers.id_sha224.getId(), "SHA224");
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700345 digestAlgs.put(NISTObjectIdentifiers.id_sha256.getId(), "SHA256");
346 digestAlgs.put(NISTObjectIdentifiers.id_sha384.getId(), "SHA384");
347 digestAlgs.put(NISTObjectIdentifiers.id_sha512.getId(), "SHA512");
348- digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd128.getId(), "RIPEMD128");
349- digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd160.getId(), "RIPEMD160");
350- digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd256.getId(), "RIPEMD256");
351- digestAlgs.put(CryptoProObjectIdentifiers.gostR3411.getId(), "GOST3411");
352- digestAlgs.put("1.3.6.1.4.1.5849.1.2.1", "GOST3411");
353+ // BEGIN android-removed
354+ // digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd128.getId(), "RIPEMD128");
355+ // digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd160.getId(), "RIPEMD160");
356+ // digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd256.getId(), "RIPEMD256");
357+ // digestAlgs.put(CryptoProObjectIdentifiers.gostR3411.getId(), "GOST3411");
358+ // digestAlgs.put("1.3.6.1.4.1.5849.1.2.1", "GOST3411");
359+ // END android-removed
360
361 digestAliases.put("SHA1", new String[] { "SHA-1" });
Kenny Root87490ac2013-09-26 11:06:21 -0700362 digestAliases.put("SHA224", new String[] { "SHA-224" });
Kenny Root5db505e2013-12-11 16:35:05 -0800363@@ -219,35 +229,35 @@
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700364 return new CollectionStore(new ArrayList());
365 }
366
367- Store getOtherRevocationInfo(ASN1ObjectIdentifier otherRevocationInfoFormat, ASN1Set crlSet)
368- {
369- if (crlSet != null)
370- {
371- List crlList = new ArrayList(crlSet.size());
372-
373- for (Enumeration en = crlSet.getObjects(); en.hasMoreElements();)
374- {
375- ASN1Primitive obj = ((ASN1Encodable)en.nextElement()).toASN1Primitive();
376-
377- if (obj instanceof ASN1TaggedObject)
378- {
379- ASN1TaggedObject tObj = ASN1TaggedObject.getInstance(obj);
380-
381- if (tObj.getTagNo() == 1)
382- {
383- OtherRevocationInfoFormat other = OtherRevocationInfoFormat.getInstance(tObj, false);
384-
385- if (otherRevocationInfoFormat.equals(other.getInfoFormat()))
386- {
387- crlList.add(other.getInfo());
388- }
389- }
390- }
391- }
392-
393- return new CollectionStore(crlList);
394- }
395-
396- return new CollectionStore(new ArrayList());
397- }
398+ // Store getOtherRevocationInfo(ASN1ObjectIdentifier otherRevocationInfoFormat, ASN1Set crlSet)
399+ // {
400+ // if (crlSet != null)
401+ // {
402+ // List crlList = new ArrayList(crlSet.size());
403+ //
404+ // for (Enumeration en = crlSet.getObjects(); en.hasMoreElements();)
405+ // {
406+ // ASN1Primitive obj = ((ASN1Encodable)en.nextElement()).toASN1Primitive();
407+ //
408+ // if (obj instanceof ASN1TaggedObject)
409+ // {
410+ // ASN1TaggedObject tObj = ASN1TaggedObject.getInstance(obj);
411+ //
412+ // if (tObj.getTagNo() == 1)
413+ // {
414+ // OtherRevocationInfoFormat other = OtherRevocationInfoFormat.getInstance(tObj, false);
415+ //
416+ // if (otherRevocationInfoFormat.equals(other.getInfoFormat()))
417+ // {
418+ // crlList.add(other.getInfo());
419+ // }
420+ // }
421+ // }
422+ // }
423+ //
424+ // return new CollectionStore(crlList);
425+ // }
426+ //
427+ // return new CollectionStore(new ArrayList());
428+ // }
429 }
Kenny Root5db505e2013-12-11 16:35:05 -0800430diff -Naur bcpkix-jdk15on-150.orig/org/bouncycastle/cms/CMSUtils.java bcpkix-jdk15on-150/org/bouncycastle/cms/CMSUtils.java
431--- bcpkix-jdk15on-150.orig/org/bouncycastle/cms/CMSUtils.java 2013-12-03 20:18:54.000000000 +0000
432+++ bcpkix-jdk15on-150/org/bouncycastle/cms/CMSUtils.java 2013-12-12 00:35:05.000000000 +0000
433@@ -19,9 +19,11 @@
434 import org.bouncycastle.asn1.DERTaggedObject;
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700435 import org.bouncycastle.asn1.cms.CMSObjectIdentifiers;
436 import org.bouncycastle.asn1.cms.ContentInfo;
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700437-import org.bouncycastle.asn1.cms.OtherRevocationInfoFormat;
438-import org.bouncycastle.asn1.ocsp.OCSPResponse;
439-import org.bouncycastle.asn1.ocsp.OCSPResponseStatus;
440+// BEGIN android-removed
441+// import org.bouncycastle.asn1.cms.OtherRevocationInfoFormat;
442+// import org.bouncycastle.asn1.ocsp.OCSPResponse;
443+// import org.bouncycastle.asn1.ocsp.OCSPResponseStatus;
444+// END android-removed
Kenny Root5db505e2013-12-11 16:35:05 -0800445 import org.bouncycastle.cert.X509AttributeCertificateHolder;
446 import org.bouncycastle.cert.X509CRLHolder;
447 import org.bouncycastle.cert.X509CertificateHolder;
448@@ -116,29 +118,31 @@
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700449 }
450 }
451
452- static Collection getOthersFromStore(ASN1ObjectIdentifier otherRevocationInfoFormat, Store otherRevocationInfos)
453- {
454- List others = new ArrayList();
455-
456- for (Iterator it = otherRevocationInfos.getMatches(null).iterator(); it.hasNext();)
457- {
458- ASN1Encodable info = (ASN1Encodable)it.next();
459-
460- if (CMSObjectIdentifiers.id_ri_ocsp_response.equals(otherRevocationInfoFormat))
461- {
462- OCSPResponse resp = OCSPResponse.getInstance(info);
463-
464- if (resp.getResponseStatus().getValue().intValue() != OCSPResponseStatus.SUCCESSFUL)
465- {
466- throw new IllegalArgumentException("cannot add unsuccessful OCSP response to CMS SignedData");
467- }
468- }
469-
470- others.add(new DERTaggedObject(false, 1, new OtherRevocationInfoFormat(otherRevocationInfoFormat, info)));
471- }
472-
473- return others;
474- }
475+ // BEGIN android-removed
476+ // static Collection getOthersFromStore(ASN1ObjectIdentifier otherRevocationInfoFormat, Store otherRevocationInfos)
477+ // {
478+ // List others = new ArrayList();
479+ //
480+ // for (Iterator it = otherRevocationInfos.getMatches(null).iterator(); it.hasNext();)
481+ // {
482+ // ASN1Encodable info = (ASN1Encodable)it.next();
483+ //
484+ // if (CMSObjectIdentifiers.id_ri_ocsp_response.equals(otherRevocationInfoFormat))
485+ // {
486+ // OCSPResponse resp = OCSPResponse.getInstance(info);
487+ //
488+ // if (resp.getResponseStatus().getValue().intValue() != OCSPResponseStatus.SUCCESSFUL)
489+ // {
490+ // throw new IllegalArgumentException("cannot add unsuccessful OCSP response to CMS SignedData");
491+ // }
492+ // }
493+ //
494+ // others.add(new DERTaggedObject(false, 1, new OtherRevocationInfoFormat(otherRevocationInfoFormat, info)));
495+ // }
496+ //
497+ // return others;
498+ // }
499+ // END android-removed
500
501 static ASN1Set createBerSetFromList(List derObjects)
502 {
Kenny Root5db505e2013-12-11 16:35:05 -0800503diff -Naur bcpkix-jdk15on-150.orig/org/bouncycastle/cms/DefaultCMSSignatureAlgorithmNameGenerator.java bcpkix-jdk15on-150/org/bouncycastle/cms/DefaultCMSSignatureAlgorithmNameGenerator.java
504--- bcpkix-jdk15on-150.orig/org/bouncycastle/cms/DefaultCMSSignatureAlgorithmNameGenerator.java 2013-12-03 20:18:54.000000000 +0000
505+++ bcpkix-jdk15on-150/org/bouncycastle/cms/DefaultCMSSignatureAlgorithmNameGenerator.java 2013-09-26 18:06:21.000000000 +0000
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700506@@ -4,7 +4,9 @@
507 import java.util.Map;
508
509 import org.bouncycastle.asn1.ASN1ObjectIdentifier;
510-import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
511+// BEGIN android-removed
512+// import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
513+// END android-removed
514 import org.bouncycastle.asn1.eac.EACObjectIdentifiers;
515 import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
516 import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers;
Kenny Root87490ac2013-09-26 11:06:21 -0700517@@ -33,12 +35,16 @@
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700518 addEntries(NISTObjectIdentifiers.dsa_with_sha384, "SHA384", "DSA");
519 addEntries(NISTObjectIdentifiers.dsa_with_sha512, "SHA512", "DSA");
520 addEntries(OIWObjectIdentifiers.dsaWithSHA1, "SHA1", "DSA");
521- addEntries(OIWObjectIdentifiers.md4WithRSA, "MD4", "RSA");
522- addEntries(OIWObjectIdentifiers.md4WithRSAEncryption, "MD4", "RSA");
523+ // BEGIN android-removed
524+ // addEntries(OIWObjectIdentifiers.md4WithRSA, "MD4", "RSA");
525+ // addEntries(OIWObjectIdentifiers.md4WithRSAEncryption, "MD4", "RSA");
526+ // END android-removed
527 addEntries(OIWObjectIdentifiers.md5WithRSA, "MD5", "RSA");
528 addEntries(OIWObjectIdentifiers.sha1WithRSA, "SHA1", "RSA");
529- addEntries(PKCSObjectIdentifiers.md2WithRSAEncryption, "MD2", "RSA");
530- addEntries(PKCSObjectIdentifiers.md4WithRSAEncryption, "MD4", "RSA");
531+ // BEGIN android-removed
532+ // addEntries(PKCSObjectIdentifiers.md2WithRSAEncryption, "MD2", "RSA");
533+ // addEntries(PKCSObjectIdentifiers.md4WithRSAEncryption, "MD4", "RSA");
534+ // END android-removed
535 addEntries(PKCSObjectIdentifiers.md5WithRSAEncryption, "MD5", "RSA");
536 addEntries(PKCSObjectIdentifiers.sha1WithRSAEncryption, "SHA1", "RSA");
Kenny Root87490ac2013-09-26 11:06:21 -0700537 addEntries(PKCSObjectIdentifiers.sha224WithRSAEncryption, "SHA224", "RSA");
538@@ -66,26 +72,30 @@
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700539 encryptionAlgs.put(TeleTrusTObjectIdentifiers.teleTrusTRSAsignatureAlgorithm, "RSA");
540 encryptionAlgs.put(X509ObjectIdentifiers.id_ea_rsa, "RSA");
541 encryptionAlgs.put(PKCSObjectIdentifiers.id_RSASSA_PSS, "RSAandMGF1");
542- encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3410_94, "GOST3410");
543- encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3410_2001, "ECGOST3410");
544- encryptionAlgs.put(new ASN1ObjectIdentifier("1.3.6.1.4.1.5849.1.6.2"), "ECGOST3410");
545- encryptionAlgs.put(new ASN1ObjectIdentifier("1.3.6.1.4.1.5849.1.1.5"), "GOST3410");
546- encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001, "ECGOST3410");
547- encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94, "GOST3410");
548-
549- digestAlgs.put(PKCSObjectIdentifiers.md2, "MD2");
550- digestAlgs.put(PKCSObjectIdentifiers.md4, "MD4");
551+ // BEGIN android-removed
552+ // encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3410_94, "GOST3410");
553+ // encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3410_2001, "ECGOST3410");
554+ // encryptionAlgs.put(new ASN1ObjectIdentifier("1.3.6.1.4.1.5849.1.6.2"), "ECGOST3410");
555+ // encryptionAlgs.put(new ASN1ObjectIdentifier("1.3.6.1.4.1.5849.1.1.5"), "GOST3410");
556+ // encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001, "ECGOST3410");
557+ // encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94, "GOST3410");
558+ //
559+ // digestAlgs.put(PKCSObjectIdentifiers.md2, "MD2");
560+ // digestAlgs.put(PKCSObjectIdentifiers.md4, "MD4");
561+ // END android-removed
562 digestAlgs.put(PKCSObjectIdentifiers.md5, "MD5");
563 digestAlgs.put(OIWObjectIdentifiers.idSHA1, "SHA1");
Kenny Root87490ac2013-09-26 11:06:21 -0700564 digestAlgs.put(NISTObjectIdentifiers.id_sha224, "SHA224");
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700565 digestAlgs.put(NISTObjectIdentifiers.id_sha256, "SHA256");
566 digestAlgs.put(NISTObjectIdentifiers.id_sha384, "SHA384");
567 digestAlgs.put(NISTObjectIdentifiers.id_sha512, "SHA512");
568- digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd128, "RIPEMD128");
569- digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd160, "RIPEMD160");
570- digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd256, "RIPEMD256");
571- digestAlgs.put(CryptoProObjectIdentifiers.gostR3411, "GOST3411");
572- digestAlgs.put(new ASN1ObjectIdentifier("1.3.6.1.4.1.5849.1.2.1"), "GOST3411");
573+ // BEGIN android-removed
574+ // digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd128, "RIPEMD128");
575+ // digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd160, "RIPEMD160");
576+ // digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd256, "RIPEMD256");
577+ // digestAlgs.put(CryptoProObjectIdentifiers.gostR3411, "GOST3411");
578+ // digestAlgs.put(new ASN1ObjectIdentifier("1.3.6.1.4.1.5849.1.2.1"), "GOST3411");
579+ // END android-removed
580 }
581
582 /**
Kenny Root5db505e2013-12-11 16:35:05 -0800583diff -Naur bcpkix-jdk15on-150.orig/org/bouncycastle/cms/DefaultCMSSignatureEncryptionAlgorithmFinder.java bcpkix-jdk15on-150/org/bouncycastle/cms/DefaultCMSSignatureEncryptionAlgorithmFinder.java
584--- bcpkix-jdk15on-150.orig/org/bouncycastle/cms/DefaultCMSSignatureEncryptionAlgorithmFinder.java 2013-12-03 20:18:54.000000000 +0000
585+++ bcpkix-jdk15on-150/org/bouncycastle/cms/DefaultCMSSignatureEncryptionAlgorithmFinder.java 2013-09-26 18:06:21.000000000 +0000
Kenny Root87490ac2013-09-26 11:06:21 -0700586@@ -16,21 +16,27 @@
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700587
588 static
589 {
590- RSA_PKCS1d5.add(PKCSObjectIdentifiers.md2WithRSAEncryption);
591- RSA_PKCS1d5.add(PKCSObjectIdentifiers.md4WithRSAEncryption);
592+ // BEGIN android-removed
593+ // RSA_PKCS1d5.add(PKCSObjectIdentifiers.md2WithRSAEncryption);
594+ // RSA_PKCS1d5.add(PKCSObjectIdentifiers.md4WithRSAEncryption);
595+ // END android-removed
596 RSA_PKCS1d5.add(PKCSObjectIdentifiers.md5WithRSAEncryption);
597 RSA_PKCS1d5.add(PKCSObjectIdentifiers.sha1WithRSAEncryption);
Kenny Root87490ac2013-09-26 11:06:21 -0700598 RSA_PKCS1d5.add(PKCSObjectIdentifiers.sha224WithRSAEncryption);
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700599 RSA_PKCS1d5.add(PKCSObjectIdentifiers.sha256WithRSAEncryption);
600 RSA_PKCS1d5.add(PKCSObjectIdentifiers.sha384WithRSAEncryption);
601 RSA_PKCS1d5.add(PKCSObjectIdentifiers.sha512WithRSAEncryption);
602- RSA_PKCS1d5.add(OIWObjectIdentifiers.md4WithRSAEncryption);
603- RSA_PKCS1d5.add(OIWObjectIdentifiers.md4WithRSA);
604+ // BEGIN android-removed
605+ // RSA_PKCS1d5.add(OIWObjectIdentifiers.md4WithRSAEncryption);
606+ // RSA_PKCS1d5.add(OIWObjectIdentifiers.md4WithRSA);
607+ // END android-removed
608 RSA_PKCS1d5.add(OIWObjectIdentifiers.md5WithRSA);
609 RSA_PKCS1d5.add(OIWObjectIdentifiers.sha1WithRSA);
610- RSA_PKCS1d5.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128);
611- RSA_PKCS1d5.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160);
612- RSA_PKCS1d5.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256);
613+ // BEGIN android-removed
614+ // RSA_PKCS1d5.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128);
615+ // RSA_PKCS1d5.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160);
616+ // RSA_PKCS1d5.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256);
617+ // END android-removed
618 }
619
620 public AlgorithmIdentifier findEncryptionAlgorithm(AlgorithmIdentifier signatureAlgorithm)
Kenny Root5db505e2013-12-11 16:35:05 -0800621diff -Naur bcpkix-jdk15on-150.orig/org/bouncycastle/operator/DefaultDigestAlgorithmIdentifierFinder.java bcpkix-jdk15on-150/org/bouncycastle/operator/DefaultDigestAlgorithmIdentifierFinder.java
622--- bcpkix-jdk15on-150.orig/org/bouncycastle/operator/DefaultDigestAlgorithmIdentifierFinder.java 2013-12-03 20:18:54.000000000 +0000
623+++ bcpkix-jdk15on-150/org/bouncycastle/operator/DefaultDigestAlgorithmIdentifierFinder.java 2013-09-26 18:06:21.000000000 +0000
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700624@@ -5,7 +5,9 @@
625
626 import org.bouncycastle.asn1.ASN1ObjectIdentifier;
627 import org.bouncycastle.asn1.DERNull;
628-import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
629+// BEGIN android-removed
630+// import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
631+// END android-removed
632 import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
633 import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers;
634 import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
Kenny Root87490ac2013-09-26 11:06:21 -0700635@@ -25,16 +27,20 @@
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700636 //
637 // digests
638 //
639- digestOids.put(OIWObjectIdentifiers.md4WithRSAEncryption, PKCSObjectIdentifiers.md4);
640- digestOids.put(OIWObjectIdentifiers.md4WithRSA, PKCSObjectIdentifiers.md4);
641+ // BEGIN android-removed
642+ // digestOids.put(OIWObjectIdentifiers.md4WithRSAEncryption, PKCSObjectIdentifiers.md4);
643+ // digestOids.put(OIWObjectIdentifiers.md4WithRSA, PKCSObjectIdentifiers.md4);
644+ // END android-removed
645 digestOids.put(OIWObjectIdentifiers.sha1WithRSA, OIWObjectIdentifiers.idSHA1);
646
Kenny Root87490ac2013-09-26 11:06:21 -0700647 digestOids.put(PKCSObjectIdentifiers.sha224WithRSAEncryption, NISTObjectIdentifiers.id_sha224);
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700648 digestOids.put(PKCSObjectIdentifiers.sha256WithRSAEncryption, NISTObjectIdentifiers.id_sha256);
649 digestOids.put(PKCSObjectIdentifiers.sha384WithRSAEncryption, NISTObjectIdentifiers.id_sha384);
650 digestOids.put(PKCSObjectIdentifiers.sha512WithRSAEncryption, NISTObjectIdentifiers.id_sha512);
651- digestOids.put(PKCSObjectIdentifiers.md2WithRSAEncryption, PKCSObjectIdentifiers.md2);
652- digestOids.put(PKCSObjectIdentifiers.md4WithRSAEncryption, PKCSObjectIdentifiers.md4);
653+ // BEGIN android-removed
654+ // digestOids.put(PKCSObjectIdentifiers.md2WithRSAEncryption, PKCSObjectIdentifiers.md2);
655+ // digestOids.put(PKCSObjectIdentifiers.md4WithRSAEncryption, PKCSObjectIdentifiers.md4);
656+ // END android-removed
657 digestOids.put(PKCSObjectIdentifiers.md5WithRSAEncryption, PKCSObjectIdentifiers.md5);
658 digestOids.put(PKCSObjectIdentifiers.sha1WithRSAEncryption, OIWObjectIdentifiers.idSHA1);
659
Kenny Root87490ac2013-09-26 11:06:21 -0700660@@ -50,12 +56,14 @@
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700661 digestOids.put(NISTObjectIdentifiers.dsa_with_sha384, NISTObjectIdentifiers.id_sha384);
662 digestOids.put(NISTObjectIdentifiers.dsa_with_sha512, NISTObjectIdentifiers.id_sha512);
663
664- digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128, TeleTrusTObjectIdentifiers.ripemd128);
665- digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160, TeleTrusTObjectIdentifiers.ripemd160);
666- digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256, TeleTrusTObjectIdentifiers.ripemd256);
667-
668- digestOids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94, CryptoProObjectIdentifiers.gostR3411);
669- digestOids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001, CryptoProObjectIdentifiers.gostR3411);
670+ // BEGIN android-removed
671+ // digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128, TeleTrusTObjectIdentifiers.ripemd128);
672+ // digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160, TeleTrusTObjectIdentifiers.ripemd160);
673+ // digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256, TeleTrusTObjectIdentifiers.ripemd256);
674+ //
675+ // digestOids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94, CryptoProObjectIdentifiers.gostR3411);
676+ // digestOids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001, CryptoProObjectIdentifiers.gostR3411);
677+ // END android-removed
678
679 digestNameToOids.put("SHA-1", OIWObjectIdentifiers.idSHA1);
Kenny Root87490ac2013-09-26 11:06:21 -0700680 digestNameToOids.put("SHA-224", NISTObjectIdentifiers.id_sha224);
681@@ -63,15 +71,19 @@
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700682 digestNameToOids.put("SHA-384", NISTObjectIdentifiers.id_sha384);
683 digestNameToOids.put("SHA-512", NISTObjectIdentifiers.id_sha512);
684
685- digestNameToOids.put("GOST3411", CryptoProObjectIdentifiers.gostR3411);
686-
687- digestNameToOids.put("MD2", PKCSObjectIdentifiers.md2);
688- digestNameToOids.put("MD4", PKCSObjectIdentifiers.md4);
689+ // BEGIN android-removed
690+ // digestNameToOids.put("GOST3411", CryptoProObjectIdentifiers.gostR3411);
691+ //
692+ // digestNameToOids.put("MD2", PKCSObjectIdentifiers.md2);
693+ // digestNameToOids.put("MD4", PKCSObjectIdentifiers.md4);
694+ // END android-removed
695 digestNameToOids.put("MD5", PKCSObjectIdentifiers.md5);
696
697- digestNameToOids.put("RIPEMD128", TeleTrusTObjectIdentifiers.ripemd128);
698- digestNameToOids.put("RIPEMD160", TeleTrusTObjectIdentifiers.ripemd160);
699- digestNameToOids.put("RIPEMD256", TeleTrusTObjectIdentifiers.ripemd256);
700+ // BEGIN android-removed
701+ // digestNameToOids.put("RIPEMD128", TeleTrusTObjectIdentifiers.ripemd128);
702+ // digestNameToOids.put("RIPEMD160", TeleTrusTObjectIdentifiers.ripemd160);
703+ // digestNameToOids.put("RIPEMD256", TeleTrusTObjectIdentifiers.ripemd256);
704+ // END android-removed
705 }
706
707 public AlgorithmIdentifier find(AlgorithmIdentifier sigAlgId)
Kenny Root5db505e2013-12-11 16:35:05 -0800708diff -Naur bcpkix-jdk15on-150.orig/org/bouncycastle/operator/DefaultSignatureAlgorithmIdentifierFinder.java bcpkix-jdk15on-150/org/bouncycastle/operator/DefaultSignatureAlgorithmIdentifierFinder.java
709--- bcpkix-jdk15on-150.orig/org/bouncycastle/operator/DefaultSignatureAlgorithmIdentifierFinder.java 2013-12-03 20:18:54.000000000 +0000
710+++ bcpkix-jdk15on-150/org/bouncycastle/operator/DefaultSignatureAlgorithmIdentifierFinder.java 2013-09-26 18:06:21.000000000 +0000
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700711@@ -9,7 +9,9 @@
712 import org.bouncycastle.asn1.ASN1Integer;
713 import org.bouncycastle.asn1.ASN1ObjectIdentifier;
714 import org.bouncycastle.asn1.DERNull;
715-import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
716+// BEGIN android-removed
717+// import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
718+// END android-removed
719 import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
720 import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers;
721 import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
Kenny Root87490ac2013-09-26 11:06:21 -0700722@@ -32,13 +34,17 @@
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700723 private static final ASN1ObjectIdentifier ENCRYPTION_DSA = X9ObjectIdentifiers.id_dsa_with_sha1;
724 private static final ASN1ObjectIdentifier ENCRYPTION_ECDSA = X9ObjectIdentifiers.ecdsa_with_SHA1;
725 private static final ASN1ObjectIdentifier ENCRYPTION_RSA_PSS = PKCSObjectIdentifiers.id_RSASSA_PSS;
726- private static final ASN1ObjectIdentifier ENCRYPTION_GOST3410 = CryptoProObjectIdentifiers.gostR3410_94;
727- private static final ASN1ObjectIdentifier ENCRYPTION_ECGOST3410 = CryptoProObjectIdentifiers.gostR3410_2001;
728+ // BEGIN android-removed
729+ // private static final ASN1ObjectIdentifier ENCRYPTION_GOST3410 = CryptoProObjectIdentifiers.gostR3410_94;
730+ // private static final ASN1ObjectIdentifier ENCRYPTION_ECGOST3410 = CryptoProObjectIdentifiers.gostR3410_2001;
731+ // END android-removed
732
733 static
734 {
735- algorithms.put("MD2WITHRSAENCRYPTION", PKCSObjectIdentifiers.md2WithRSAEncryption);
736- algorithms.put("MD2WITHRSA", PKCSObjectIdentifiers.md2WithRSAEncryption);
737+ // BEGIN android-removed
738+ // algorithms.put("MD2WITHRSAENCRYPTION", PKCSObjectIdentifiers.md2WithRSAEncryption);
739+ // algorithms.put("MD2WITHRSA", PKCSObjectIdentifiers.md2WithRSAEncryption);
740+ // END android-removed
741 algorithms.put("MD5WITHRSAENCRYPTION", PKCSObjectIdentifiers.md5WithRSAEncryption);
742 algorithms.put("MD5WITHRSA", PKCSObjectIdentifiers.md5WithRSAEncryption);
743 algorithms.put("SHA1WITHRSAENCRYPTION", PKCSObjectIdentifiers.sha1WithRSAEncryption);
Kenny Root87490ac2013-09-26 11:06:21 -0700744@@ -56,12 +62,14 @@
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700745 algorithms.put("SHA256WITHRSAANDMGF1", PKCSObjectIdentifiers.id_RSASSA_PSS);
746 algorithms.put("SHA384WITHRSAANDMGF1", PKCSObjectIdentifiers.id_RSASSA_PSS);
747 algorithms.put("SHA512WITHRSAANDMGF1", PKCSObjectIdentifiers.id_RSASSA_PSS);
748- algorithms.put("RIPEMD160WITHRSAENCRYPTION", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160);
749- algorithms.put("RIPEMD160WITHRSA", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160);
750- algorithms.put("RIPEMD128WITHRSAENCRYPTION", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128);
751- algorithms.put("RIPEMD128WITHRSA", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128);
752- algorithms.put("RIPEMD256WITHRSAENCRYPTION", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256);
753- algorithms.put("RIPEMD256WITHRSA", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256);
754+ // BEGIN android-removed
755+ // algorithms.put("RIPEMD160WITHRSAENCRYPTION", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160);
756+ // algorithms.put("RIPEMD160WITHRSA", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160);
757+ // algorithms.put("RIPEMD128WITHRSAENCRYPTION", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128);
758+ // algorithms.put("RIPEMD128WITHRSA", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128);
759+ // algorithms.put("RIPEMD256WITHRSAENCRYPTION", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256);
760+ // algorithms.put("RIPEMD256WITHRSA", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256);
761+ // END android-removed
762 algorithms.put("SHA1WITHDSA", X9ObjectIdentifiers.id_dsa_with_sha1);
763 algorithms.put("DSAWITHSHA1", X9ObjectIdentifiers.id_dsa_with_sha1);
Kenny Root87490ac2013-09-26 11:06:21 -0700764 algorithms.put("SHA224WITHDSA", NISTObjectIdentifiers.dsa_with_sha224);
765@@ -74,11 +82,13 @@
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700766 algorithms.put("SHA256WITHECDSA", X9ObjectIdentifiers.ecdsa_with_SHA256);
767 algorithms.put("SHA384WITHECDSA", X9ObjectIdentifiers.ecdsa_with_SHA384);
768 algorithms.put("SHA512WITHECDSA", X9ObjectIdentifiers.ecdsa_with_SHA512);
769- algorithms.put("GOST3411WITHGOST3410", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94);
770- algorithms.put("GOST3411WITHGOST3410-94", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94);
771- algorithms.put("GOST3411WITHECGOST3410", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
772- algorithms.put("GOST3411WITHECGOST3410-2001", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
773- algorithms.put("GOST3411WITHGOST3410-2001", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
774+ // BEGIN android-removed
775+ // algorithms.put("GOST3411WITHGOST3410", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94);
776+ // algorithms.put("GOST3411WITHGOST3410-94", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94);
777+ // algorithms.put("GOST3411WITHECGOST3410", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
778+ // algorithms.put("GOST3411WITHECGOST3410-2001", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
779+ // algorithms.put("GOST3411WITHGOST3410-2001", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
780+ // END android-removed
781
782 //
783 // According to RFC 3279, the ASN.1 encoding SHALL (id-dsa-with-sha1) or MUST (ecdsa-with-SHA*) omit the parameters field.
Kenny Root87490ac2013-09-26 11:06:21 -0700784@@ -98,8 +108,10 @@
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700785 //
786 // RFC 4491
787 //
788- noParams.add(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94);
789- noParams.add(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
790+ // BEGIN android-removed
791+ // noParams.add(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94);
792+ // noParams.add(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
793+ // END android-removed
794
795 //
796 // PKCS 1.5 encrypted algorithms
Kenny Root87490ac2013-09-26 11:06:21 -0700797@@ -109,9 +121,11 @@
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700798 pkcs15RsaEncryption.add(PKCSObjectIdentifiers.sha256WithRSAEncryption);
799 pkcs15RsaEncryption.add(PKCSObjectIdentifiers.sha384WithRSAEncryption);
800 pkcs15RsaEncryption.add(PKCSObjectIdentifiers.sha512WithRSAEncryption);
801- pkcs15RsaEncryption.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128);
802- pkcs15RsaEncryption.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160);
803- pkcs15RsaEncryption.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256);
804+ // BEGIN android-removed
805+ // pkcs15RsaEncryption.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128);
806+ // pkcs15RsaEncryption.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160);
807+ // pkcs15RsaEncryption.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256);
808+ // END android-removed
809
810 //
811 // explicit params
Kenny Root87490ac2013-09-26 11:06:21 -0700812@@ -138,15 +152,19 @@
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700813 digestOids.put(PKCSObjectIdentifiers.sha256WithRSAEncryption, NISTObjectIdentifiers.id_sha256);
814 digestOids.put(PKCSObjectIdentifiers.sha384WithRSAEncryption, NISTObjectIdentifiers.id_sha384);
815 digestOids.put(PKCSObjectIdentifiers.sha512WithRSAEncryption, NISTObjectIdentifiers.id_sha512);
816- digestOids.put(PKCSObjectIdentifiers.md2WithRSAEncryption, PKCSObjectIdentifiers.md2);
817- digestOids.put(PKCSObjectIdentifiers.md4WithRSAEncryption, PKCSObjectIdentifiers.md4);
818+ // BEGIN android-removed
819+ // digestOids.put(PKCSObjectIdentifiers.md2WithRSAEncryption, PKCSObjectIdentifiers.md2);
820+ // digestOids.put(PKCSObjectIdentifiers.md4WithRSAEncryption, PKCSObjectIdentifiers.md4);
821+ // END android-removed
822 digestOids.put(PKCSObjectIdentifiers.md5WithRSAEncryption, PKCSObjectIdentifiers.md5);
823 digestOids.put(PKCSObjectIdentifiers.sha1WithRSAEncryption, OIWObjectIdentifiers.idSHA1);
824- digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128, TeleTrusTObjectIdentifiers.ripemd128);
825- digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160, TeleTrusTObjectIdentifiers.ripemd160);
826- digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256, TeleTrusTObjectIdentifiers.ripemd256);
827- digestOids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94, CryptoProObjectIdentifiers.gostR3411);
828- digestOids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001, CryptoProObjectIdentifiers.gostR3411);
829+ // BEGIN android-removed
830+ // digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128, TeleTrusTObjectIdentifiers.ripemd128);
831+ // digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160, TeleTrusTObjectIdentifiers.ripemd160);
832+ // digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256, TeleTrusTObjectIdentifiers.ripemd256);
833+ // digestOids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94, CryptoProObjectIdentifiers.gostR3411);
834+ // digestOids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001, CryptoProObjectIdentifiers.gostR3411);
835+ // END android-removed
836 }
837
838 private static AlgorithmIdentifier generate(String signatureAlgorithm)
Kenny Root5db505e2013-12-11 16:35:05 -0800839diff -Naur bcpkix-jdk15on-150.orig/org/bouncycastle/operator/bc/BcDefaultDigestProvider.java bcpkix-jdk15on-150/org/bouncycastle/operator/bc/BcDefaultDigestProvider.java
840--- bcpkix-jdk15on-150.orig/org/bouncycastle/operator/bc/BcDefaultDigestProvider.java 2013-12-03 20:18:54.000000000 +0000
841+++ bcpkix-jdk15on-150/org/bouncycastle/operator/bc/BcDefaultDigestProvider.java 2013-09-26 18:06:21.000000000 +0000
Kenny Root87490ac2013-09-26 11:06:21 -0700842@@ -4,20 +4,26 @@
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700843 import java.util.HashMap;
844 import java.util.Map;
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700845
846-import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
847+// BEGIN android-removed
848+// import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
849+// END android-removed
850 import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
851 import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers;
852 import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
853 import org.bouncycastle.asn1.teletrust.TeleTrusTObjectIdentifiers;
854 import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700855 import org.bouncycastle.crypto.ExtendedDigest;
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700856-import org.bouncycastle.crypto.digests.GOST3411Digest;
857-import org.bouncycastle.crypto.digests.MD2Digest;
858-import org.bouncycastle.crypto.digests.MD4Digest;
859+// BEGIN android-removed
860+// import org.bouncycastle.crypto.digests.GOST3411Digest;
861+// import org.bouncycastle.crypto.digests.MD2Digest;
862+// import org.bouncycastle.crypto.digests.MD4Digest;
863+// END android-removed
864 import org.bouncycastle.crypto.digests.MD5Digest;
865-import org.bouncycastle.crypto.digests.RIPEMD128Digest;
866-import org.bouncycastle.crypto.digests.RIPEMD160Digest;
867-import org.bouncycastle.crypto.digests.RIPEMD256Digest;
868+// BEGIN android-removed
869+// import org.bouncycastle.crypto.digests.RIPEMD128Digest;
870+// import org.bouncycastle.crypto.digests.RIPEMD160Digest;
871+// import org.bouncycastle.crypto.digests.RIPEMD256Digest;
872+// END android-removed
873 import org.bouncycastle.crypto.digests.SHA1Digest;
Kenny Root87490ac2013-09-26 11:06:21 -0700874 import org.bouncycastle.crypto.digests.SHA224Digest;
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700875 import org.bouncycastle.crypto.digests.SHA256Digest;
Kenny Root87490ac2013-09-26 11:06:21 -0700876@@ -76,48 +82,50 @@
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700877 return new MD5Digest();
878 }
879 });
880- table.put(PKCSObjectIdentifiers.md4, new BcDigestProvider()
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700881- {
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700882- public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
883- {
884- return new MD4Digest();
885- }
886- });
887- table.put(PKCSObjectIdentifiers.md2, new BcDigestProvider()
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700888- {
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700889- public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
890- {
891- return new MD2Digest();
892- }
893- });
894- table.put(CryptoProObjectIdentifiers.gostR3411, new BcDigestProvider()
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700895- {
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700896- public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
897- {
898- return new GOST3411Digest();
899- }
900- });
901- table.put(TeleTrusTObjectIdentifiers.ripemd128, new BcDigestProvider()
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700902- {
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700903- public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
904- {
905- return new RIPEMD128Digest();
906- }
907- });
908- table.put(TeleTrusTObjectIdentifiers.ripemd160, new BcDigestProvider()
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700909- {
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700910- public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
911- {
912- return new RIPEMD160Digest();
913- }
914- });
915- table.put(TeleTrusTObjectIdentifiers.ripemd256, new BcDigestProvider()
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700916- {
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700917- public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
918- {
919- return new RIPEMD256Digest();
920- }
921- });
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700922+ // BEGIN android-removed
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700923+ // table.put(PKCSObjectIdentifiers.md4, new BcDigestProvider()
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700924+ // {
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700925+ // public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
926+ // {
927+ // return new MD4Digest();
928+ // }
929+ // });
930+ // table.put(PKCSObjectIdentifiers.md2, new BcDigestProvider()
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700931+ // {
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700932+ // public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
933+ // {
934+ // return new MD2Digest();
935+ // }
936+ // });
937+ // table.put(CryptoProObjectIdentifiers.gostR3411, new BcDigestProvider()
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700938+ // {
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700939+ // public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
940+ // {
941+ // return new GOST3411Digest();
942+ // }
943+ // });
944+ // table.put(TeleTrusTObjectIdentifiers.ripemd128, new BcDigestProvider()
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700945+ // {
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700946+ // public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
947+ // {
948+ // return new RIPEMD128Digest();
949+ // }
950+ // });
951+ // table.put(TeleTrusTObjectIdentifiers.ripemd160, new BcDigestProvider()
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700952+ // {
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700953+ // public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
954+ // {
955+ // return new RIPEMD160Digest();
956+ // }
957+ // });
958+ // table.put(TeleTrusTObjectIdentifiers.ripemd256, new BcDigestProvider()
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700959+ // {
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700960+ // public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
961+ // {
962+ // return new RIPEMD256Digest();
963+ // }
964+ // });
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700965+ // END android-removed
Brian Carlstroma198e1e2013-05-24 19:14:15 -0700966
967 return Collections.unmodifiableMap(table);
968 }
Kenny Root5db505e2013-12-11 16:35:05 -0800969diff -Naur bcpkix-jdk15on-150.orig/org/bouncycastle/operator/jcajce/OperatorHelper.java bcpkix-jdk15on-150/org/bouncycastle/operator/jcajce/OperatorHelper.java
970--- bcpkix-jdk15on-150.orig/org/bouncycastle/operator/jcajce/OperatorHelper.java 2013-12-03 20:18:54.000000000 +0000
971+++ bcpkix-jdk15on-150/org/bouncycastle/operator/jcajce/OperatorHelper.java 2013-12-12 00:35:05.000000000 +0000
972@@ -24,7 +24,9 @@
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700973 import org.bouncycastle.asn1.ASN1Encodable;
974 import org.bouncycastle.asn1.ASN1ObjectIdentifier;
975 import org.bouncycastle.asn1.DERNull;
976-import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
977+// BEGIN android-removed
978+// import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
979+// END android-removed
980 import org.bouncycastle.asn1.kisa.KISAObjectIdentifiers;
981 import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
982 import org.bouncycastle.asn1.ntt.NTTObjectIdentifiers;
Kenny Root5db505e2013-12-11 16:35:05 -0800983@@ -57,11 +59,15 @@
Brian Carlstrome6bf3e82012-09-17 16:04:47 -0700984 oids.put(PKCSObjectIdentifiers.sha256WithRSAEncryption, "SHA256WITHRSA");
985 oids.put(PKCSObjectIdentifiers.sha384WithRSAEncryption, "SHA384WITHRSA");
986 oids.put(PKCSObjectIdentifiers.sha512WithRSAEncryption, "SHA512WITHRSA");
987- oids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94, "GOST3411WITHGOST3410");
988- oids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001, "GOST3411WITHECGOST3410");
989+ // BEGIN android-removed
990+ // oids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94, "GOST3411WITHGOST3410");
991+ // oids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001, "GOST3411WITHECGOST3410");
992+ // END android-removed
993
994 oids.put(new ASN1ObjectIdentifier("1.2.840.113549.1.1.4"), "MD5WITHRSA");
995- oids.put(new ASN1ObjectIdentifier("1.2.840.113549.1.1.2"), "MD2WITHRSA");
996+ // BEGIN android-removed
997+ // oids.put(new ASN1ObjectIdentifier("1.2.840.113549.1.1.2"), "MD2WITHRSA");
998+ // END android-removed
999 oids.put(new ASN1ObjectIdentifier("1.2.840.10040.4.3"), "SHA1WITHDSA");
1000 oids.put(X9ObjectIdentifiers.ecdsa_with_SHA1, "SHA1WITHECDSA");
Kenny Root87490ac2013-09-26 11:06:21 -07001001 oids.put(X9ObjectIdentifiers.ecdsa_with_SHA224, "SHA224WITHECDSA");
Kenny Root5db505e2013-12-11 16:35:05 -08001002@@ -362,22 +368,24 @@
Brian Carlstrome6bf3e82012-09-17 16:04:47 -07001003 {
1004 return "SHA512";
1005 }
1006- else if (TeleTrusTObjectIdentifiers.ripemd128.equals(digestAlgOID))
1007- {
1008- return "RIPEMD128";
1009- }
1010- else if (TeleTrusTObjectIdentifiers.ripemd160.equals(digestAlgOID))
1011- {
1012- return "RIPEMD160";
1013- }
1014- else if (TeleTrusTObjectIdentifiers.ripemd256.equals(digestAlgOID))
1015- {
1016- return "RIPEMD256";
1017- }
1018- else if (CryptoProObjectIdentifiers.gostR3411.equals(digestAlgOID))
1019- {
1020- return "GOST3411";
1021- }
1022+ // BEGIN android-removed
1023+ // else if (TeleTrusTObjectIdentifiers.ripemd128.equals(digestAlgOID))
1024+ // {
1025+ // return "RIPEMD128";
1026+ // }
1027+ // else if (TeleTrusTObjectIdentifiers.ripemd160.equals(digestAlgOID))
1028+ // {
1029+ // return "RIPEMD160";
1030+ // }
1031+ // else if (TeleTrusTObjectIdentifiers.ripemd256.equals(digestAlgOID))
1032+ // {
1033+ // return "RIPEMD256";
1034+ // }
1035+ // else if (CryptoProObjectIdentifiers.gostR3411.equals(digestAlgOID))
1036+ // {
1037+ // return "GOST3411";
1038+ // }
1039+ // END android-removed
1040 else
1041 {
1042 return digestAlgOID.getId();