• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1diff -Naur bcpkix-jdk15on-152.orig/org/bouncycastle/cms/CMSSignedData.java bcpkix-jdk15on-152/org/bouncycastle/cms/CMSSignedData.java
2--- bcpkix-jdk15on-152.orig/org/bouncycastle/cms/CMSSignedData.java	2015-03-01 12:03:46.000000000 +0000
3+++ bcpkix-jdk15on-152/org/bouncycastle/cms/CMSSignedData.java	2015-04-09 13:10:16.000000000 +0000
4@@ -287,18 +287,20 @@
5         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
37@@ -333,90 +335,92 @@
38         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-                        if (!verifyCounterSignature((SignerInformation)cIt.next(), verifierProvider))
89-                        {
90-                            return false;
91-                        }
92-                    }
93-                }
94-            }
95-            catch (OperatorCreationException e)
96-            {
97-                throw new CMSException("failure in verifier provider: " + e.getMessage(), e);
98-            }
99-        }
100-
101-        return true;
102-    }
103-
104-    private boolean verifyCounterSignature(SignerInformation counterSigner, SignerInformationVerifierProvider verifierProvider)
105-        throws OperatorCreationException, CMSException
106-    {
107-        SignerInformationVerifier counterVerifier = verifierProvider.get(counterSigner.getSID());
108-
109-        if (!counterSigner.verify(counterVerifier))
110-        {
111-            return false;
112-        }
113-
114-        Collection counterSigners = counterSigner.getCounterSignatures().getSigners();
115-        for  (Iterator cIt = counterSigners.iterator(); cIt.hasNext();)
116-        {
117-            if (!verifyCounterSignature((SignerInformation)cIt.next(), verifierProvider))
118-            {
119-                return false;
120-            }
121-        }
122-
123-        return true;
124-    }
125+    // BEGIN android-removed
126+    // /**
127+    //  * Verify all the SignerInformation objects and their associated counter signatures attached
128+    //  * to this CMS SignedData object.
129+    //  *
130+    //  * @param verifierProvider  a provider of SignerInformationVerifier objects.
131+    //  * @return true if all verify, false otherwise.
132+    //  * @throws CMSException  if an exception occurs during the verification process.
133+    //  */
134+    // public boolean verifySignatures(SignerInformationVerifierProvider verifierProvider)
135+    //     throws CMSException
136+    // {
137+    //     return verifySignatures(verifierProvider, false);
138+    // }
139+    //
140+    // /**
141+    //  * Verify all the SignerInformation objects and optionally their associated counter signatures attached
142+    //  * to this CMS SignedData object.
143+    //  *
144+    //  * @param verifierProvider  a provider of SignerInformationVerifier objects.
145+    //  * @param ignoreCounterSignatures if true don't check counter signatures. If false check counter signatures as well.
146+    //  * @return true if all verify, false otherwise.
147+    //  * @throws CMSException  if an exception occurs during the verification process.
148+    //  */
149+    // public boolean verifySignatures(SignerInformationVerifierProvider verifierProvider, boolean ignoreCounterSignatures)
150+    //     throws CMSException
151+    // {
152+    //     Collection signers = this.getSignerInfos().getSigners();
153+    //
154+    //     for (Iterator it = signers.iterator(); it.hasNext();)
155+    //     {
156+    //         SignerInformation signer = (SignerInformation)it.next();
157+    //
158+    //         try
159+    //         {
160+    //             SignerInformationVerifier verifier = verifierProvider.get(signer.getSID());
161+    //
162+    //             if (!signer.verify(verifier))
163+    //             {
164+    //                 return false;
165+    //             }
166+    //
167+    //             if (!ignoreCounterSignatures)
168+    //             {
169+    //                 Collection counterSigners = signer.getCounterSignatures().getSigners();
170+    //
171+    //                 for  (Iterator cIt = counterSigners.iterator(); cIt.hasNext();)
172+    //                 {
173+    //                     if (!verifyCounterSignature((SignerInformation)cIt.next(), verifierProvider))
174+    //                     {
175+    //                         return false;
176+    //                     }
177+    //                 }
178+    //             }
179+    //         }
180+    //         catch (OperatorCreationException e)
181+    //         {
182+    //             throw new CMSException("failure in verifier provider: " + e.getMessage(), e);
183+    //         }
184+    //     }
185+    //
186+    //     return true;
187+    // }
188+    //
189+    // private boolean verifyCounterSignature(SignerInformation counterSigner, SignerInformationVerifierProvider verifierProvider)
190+    //     throws OperatorCreationException, CMSException
191+    // {
192+    //     SignerInformationVerifier counterVerifier = verifierProvider.get(counterSigner.getSID());
193+    //
194+    //     if (!counterSigner.verify(counterVerifier))
195+    //     {
196+    //         return false;
197+    //     }
198+    //
199+    //     Collection counterSigners = counterSigner.getCounterSignatures().getSigners();
200+    //     for  (Iterator cIt = counterSigners.iterator(); cIt.hasNext();)
201+    //     {
202+    //         if (!verifyCounterSignature((SignerInformation)cIt.next(), verifierProvider))
203+    //         {
204+    //             return false;
205+    //         }
206+    //     }
207+    //
208+    //     return true;
209+    // }
210+    // END android-removed
211
212     /**
213      * Replace the SignerInformation store associated with this
214diff -Naur bcpkix-jdk15on-152.orig/org/bouncycastle/cms/CMSSignedGenerator.java bcpkix-jdk15on-152/org/bouncycastle/cms/CMSSignedGenerator.java
215--- bcpkix-jdk15on-152.orig/org/bouncycastle/cms/CMSSignedGenerator.java	2015-03-01 12:03:46.000000000 +0000
216+++ bcpkix-jdk15on-152/org/bouncycastle/cms/CMSSignedGenerator.java	2013-12-12 00:35:05.000000000 +0000
217@@ -12,8 +12,10 @@
218 import org.bouncycastle.asn1.ASN1ObjectIdentifier;
219 import org.bouncycastle.asn1.DERTaggedObject;
220 import org.bouncycastle.asn1.cms.CMSObjectIdentifiers;
221-import org.bouncycastle.asn1.cms.OtherRevocationInfoFormat;
222-import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
223+// BEGIN android-removed
224+// import org.bouncycastle.asn1.cms.OtherRevocationInfoFormat;
225+// import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
226+// END android-removed
227 import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
228 import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers;
229 import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
230@@ -39,17 +41,21 @@
231     public static final String  DIGEST_SHA384 = NISTObjectIdentifiers.id_sha384.getId();
232     public static final String  DIGEST_SHA512 = NISTObjectIdentifiers.id_sha512.getId();
233     public static final String  DIGEST_MD5 = PKCSObjectIdentifiers.md5.getId();
234-    public static final String  DIGEST_GOST3411 = CryptoProObjectIdentifiers.gostR3411.getId();
235-    public static final String  DIGEST_RIPEMD128 = TeleTrusTObjectIdentifiers.ripemd128.getId();
236-    public static final String  DIGEST_RIPEMD160 = TeleTrusTObjectIdentifiers.ripemd160.getId();
237-    public static final String  DIGEST_RIPEMD256 = TeleTrusTObjectIdentifiers.ripemd256.getId();
238+    // BEGIN android-removed
239+    // public static final String  DIGEST_GOST3411 = CryptoProObjectIdentifiers.gostR3411.getId();
240+    // public static final String  DIGEST_RIPEMD128 = TeleTrusTObjectIdentifiers.ripemd128.getId();
241+    // public static final String  DIGEST_RIPEMD160 = TeleTrusTObjectIdentifiers.ripemd160.getId();
242+    // public static final String  DIGEST_RIPEMD256 = TeleTrusTObjectIdentifiers.ripemd256.getId();
243+    // END android-removed
244
245     public static final String  ENCRYPTION_RSA = PKCSObjectIdentifiers.rsaEncryption.getId();
246     public static final String  ENCRYPTION_DSA = X9ObjectIdentifiers.id_dsa_with_sha1.getId();
247     public static final String  ENCRYPTION_ECDSA = X9ObjectIdentifiers.ecdsa_with_SHA1.getId();
248     public static final String  ENCRYPTION_RSA_PSS = PKCSObjectIdentifiers.id_RSASSA_PSS.getId();
249-    public static final String  ENCRYPTION_GOST3410 = CryptoProObjectIdentifiers.gostR3410_94.getId();
250-    public static final String  ENCRYPTION_ECGOST3410 = CryptoProObjectIdentifiers.gostR3410_2001.getId();
251+    // BEGIN android-removed
252+    // public static final String  ENCRYPTION_GOST3410 = CryptoProObjectIdentifiers.gostR3410_94.getId();
253+    // public static final String  ENCRYPTION_ECGOST3410 = CryptoProObjectIdentifiers.gostR3410_2001.getId();
254+    // END android-removed
255
256     private static final String  ENCRYPTION_ECDSA_WITH_SHA1 = X9ObjectIdentifiers.ecdsa_with_SHA1.getId();
257     private static final String  ENCRYPTION_ECDSA_WITH_SHA224 = X9ObjectIdentifiers.ecdsa_with_SHA224.getId();
258@@ -174,31 +180,33 @@
259         certs.addAll(CMSUtils.getAttributeCertificatesFromStore(attrStore));
260     }
261
262-    /**
263-     * Add a single instance of otherRevocationData to the CRL set to be included with the generated SignedData message.
264-     *
265-     * @param otherRevocationInfoFormat the OID specifying the format of the otherRevocationInfo data.
266-     * @param otherRevocationInfo the otherRevocationInfo ASN.1 structure.
267-     */
268-    public void addOtherRevocationInfo(
269-        ASN1ObjectIdentifier   otherRevocationInfoFormat,
270-        ASN1Encodable          otherRevocationInfo)
271-    {
272-        crls.add(new DERTaggedObject(false, 1, new OtherRevocationInfoFormat(otherRevocationInfoFormat, otherRevocationInfo)));
273-    }
274-
275-    /**
276-     * Add a Store of otherRevocationData to the CRL set to be included with the generated SignedData message.
277-     *
278-     * @param otherRevocationInfoFormat the OID specifying the format of the otherRevocationInfo data.
279-     * @param otherRevocationInfos a Store of otherRevocationInfo data to add.
280-     */
281-    public void addOtherRevocationInfo(
282-        ASN1ObjectIdentifier   otherRevocationInfoFormat,
283-        Store                  otherRevocationInfos)
284-    {
285-        crls.addAll(CMSUtils.getOthersFromStore(otherRevocationInfoFormat, otherRevocationInfos));
286-    }
287+    // BEGIN android-removed
288+    // /**
289+    //  * Add a single instance of otherRevocationData to the CRL set to be included with the generated SignedData message.
290+    //  *
291+    //  * @param otherRevocationInfoFormat the OID specifying the format of the otherRevocationInfo data.
292+    //  * @param otherRevocationInfo the otherRevocationInfo ASN.1 structure.
293+    //  */
294+    // public void addOtherRevocationInfo(
295+    //     ASN1ObjectIdentifier   otherRevocationInfoFormat,
296+    //     ASN1Encodable          otherRevocationInfo)
297+    // {
298+    //     crls.add(new DERTaggedObject(false, 1, new OtherRevocationInfoFormat(otherRevocationInfoFormat, otherRevocationInfo)));
299+    // }
300+    //
301+    // /**
302+    //  * Add a Store of otherRevocationData to the CRL set to be included with the generated SignedData message.
303+    //  *
304+    //  * @param otherRevocationInfoFormat the OID specifying the format of the otherRevocationInfo data.
305+    //  * @param otherRevocationInfos a Store of otherRevocationInfo data to add.
306+    //  */
307+    // public void addOtherRevocationInfo(
308+    //     ASN1ObjectIdentifier   otherRevocationInfoFormat,
309+    //     Store                  otherRevocationInfos)
310+    // {
311+    //     crls.addAll(CMSUtils.getOthersFromStore(otherRevocationInfoFormat, otherRevocationInfos));
312+    // }
313+    // END android-removed
314
315     /**
316      * Add a store of pre-calculated signers to the generator.
317diff -Naur bcpkix-jdk15on-152.orig/org/bouncycastle/cms/CMSSignedHelper.java bcpkix-jdk15on-152/org/bouncycastle/cms/CMSSignedHelper.java
318--- bcpkix-jdk15on-152.orig/org/bouncycastle/cms/CMSSignedHelper.java	2015-03-01 12:03:46.000000000 +0000
319+++ bcpkix-jdk15on-152/org/bouncycastle/cms/CMSSignedHelper.java	2013-12-12 00:35:05.000000000 +0000
320@@ -13,8 +13,10 @@
321 import org.bouncycastle.asn1.ASN1Set;
322 import org.bouncycastle.asn1.ASN1TaggedObject;
323 import org.bouncycastle.asn1.DERNull;
324-import org.bouncycastle.asn1.cms.OtherRevocationInfoFormat;
325-import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
326+// BEGIN android-removed
327+// import org.bouncycastle.asn1.cms.OtherRevocationInfoFormat;
328+// import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
329+// END android-removed
330 import org.bouncycastle.asn1.eac.EACObjectIdentifiers;
331 import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
332 import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers;
333@@ -53,12 +55,16 @@
334         addEntries(NISTObjectIdentifiers.dsa_with_sha384, "SHA384", "DSA");
335         addEntries(NISTObjectIdentifiers.dsa_with_sha512, "SHA512", "DSA");
336         addEntries(OIWObjectIdentifiers.dsaWithSHA1, "SHA1", "DSA");
337-        addEntries(OIWObjectIdentifiers.md4WithRSA, "MD4", "RSA");
338-        addEntries(OIWObjectIdentifiers.md4WithRSAEncryption, "MD4", "RSA");
339+        // BEGIN android-removed
340+        // addEntries(OIWObjectIdentifiers.md4WithRSA, "MD4", "RSA");
341+        // addEntries(OIWObjectIdentifiers.md4WithRSAEncryption, "MD4", "RSA");
342+        // END android-removed
343         addEntries(OIWObjectIdentifiers.md5WithRSA, "MD5", "RSA");
344         addEntries(OIWObjectIdentifiers.sha1WithRSA, "SHA1", "RSA");
345-        addEntries(PKCSObjectIdentifiers.md2WithRSAEncryption, "MD2", "RSA");
346-        addEntries(PKCSObjectIdentifiers.md4WithRSAEncryption, "MD4", "RSA");
347+        // BEGIN android-removed
348+        // addEntries(PKCSObjectIdentifiers.md2WithRSAEncryption, "MD2", "RSA");
349+        // addEntries(PKCSObjectIdentifiers.md4WithRSAEncryption, "MD4", "RSA");
350+        // END android-removed
351         addEntries(PKCSObjectIdentifiers.md5WithRSAEncryption, "MD5", "RSA");
352         addEntries(PKCSObjectIdentifiers.sha1WithRSAEncryption, "SHA1", "RSA");
353         addEntries(PKCSObjectIdentifiers.sha224WithRSAEncryption, "SHA224", "RSA");
354@@ -85,27 +91,31 @@
355         encryptionAlgs.put(PKCSObjectIdentifiers.rsaEncryption.getId(), "RSA");
356         encryptionAlgs.put(TeleTrusTObjectIdentifiers.teleTrusTRSAsignatureAlgorithm, "RSA");
357         encryptionAlgs.put(X509ObjectIdentifiers.id_ea_rsa.getId(), "RSA");
358-        encryptionAlgs.put(CMSSignedDataGenerator.ENCRYPTION_RSA_PSS, "RSAandMGF1");
359-        encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3410_94.getId(), "GOST3410");
360-        encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3410_2001.getId(), "ECGOST3410");
361-        encryptionAlgs.put("1.3.6.1.4.1.5849.1.6.2", "ECGOST3410");
362-        encryptionAlgs.put("1.3.6.1.4.1.5849.1.1.5", "GOST3410");
363-        encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001.getId(), "ECGOST3410");
364-        encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94.getId(), "GOST3410");
365-
366-        digestAlgs.put(PKCSObjectIdentifiers.md2.getId(), "MD2");
367-        digestAlgs.put(PKCSObjectIdentifiers.md4.getId(), "MD4");
368+        // BEGIN android-removed
369+        // encryptionAlgs.put(CMSSignedDataGenerator.ENCRYPTION_RSA_PSS, "RSAandMGF1");
370+        // encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3410_94.getId(), "GOST3410");
371+        // encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3410_2001.getId(), "ECGOST3410");
372+        // encryptionAlgs.put("1.3.6.1.4.1.5849.1.6.2", "ECGOST3410");
373+        // encryptionAlgs.put("1.3.6.1.4.1.5849.1.1.5", "GOST3410");
374+        // encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001.getId(), "ECGOST3410");
375+        // encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94.getId(), "GOST3410");
376+        //
377+        // digestAlgs.put(PKCSObjectIdentifiers.md2.getId(), "MD2");
378+        // digestAlgs.put(PKCSObjectIdentifiers.md4.getId(), "MD4");
379+        // END android-removed
380         digestAlgs.put(PKCSObjectIdentifiers.md5.getId(), "MD5");
381         digestAlgs.put(OIWObjectIdentifiers.idSHA1.getId(), "SHA1");
382         digestAlgs.put(NISTObjectIdentifiers.id_sha224.getId(), "SHA224");
383         digestAlgs.put(NISTObjectIdentifiers.id_sha256.getId(), "SHA256");
384         digestAlgs.put(NISTObjectIdentifiers.id_sha384.getId(), "SHA384");
385         digestAlgs.put(NISTObjectIdentifiers.id_sha512.getId(), "SHA512");
386-        digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd128.getId(), "RIPEMD128");
387-        digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd160.getId(), "RIPEMD160");
388-        digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd256.getId(), "RIPEMD256");
389-        digestAlgs.put(CryptoProObjectIdentifiers.gostR3411.getId(),  "GOST3411");
390-        digestAlgs.put("1.3.6.1.4.1.5849.1.2.1",  "GOST3411");
391+        // BEGIN android-removed
392+        // digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd128.getId(), "RIPEMD128");
393+        // digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd160.getId(), "RIPEMD160");
394+        // digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd256.getId(), "RIPEMD256");
395+        // digestAlgs.put(CryptoProObjectIdentifiers.gostR3411.getId(),  "GOST3411");
396+        // digestAlgs.put("1.3.6.1.4.1.5849.1.2.1",  "GOST3411");
397+        // END android-removed
398
399         digestAliases.put("SHA1", new String[] { "SHA-1" });
400         digestAliases.put("SHA224", new String[] { "SHA-224" });
401@@ -219,35 +229,35 @@
402         return new CollectionStore(new ArrayList());
403     }
404
405-    Store getOtherRevocationInfo(ASN1ObjectIdentifier otherRevocationInfoFormat, ASN1Set crlSet)
406-    {
407-        if (crlSet != null)
408-        {
409-            List    crlList = new ArrayList(crlSet.size());
410-
411-            for (Enumeration en = crlSet.getObjects(); en.hasMoreElements();)
412-            {
413-                ASN1Primitive obj = ((ASN1Encodable)en.nextElement()).toASN1Primitive();
414-
415-                if (obj instanceof ASN1TaggedObject)
416-                {
417-                    ASN1TaggedObject tObj = ASN1TaggedObject.getInstance(obj);
418-
419-                    if (tObj.getTagNo() == 1)
420-                    {
421-                        OtherRevocationInfoFormat other = OtherRevocationInfoFormat.getInstance(tObj, false);
422-
423-                        if (otherRevocationInfoFormat.equals(other.getInfoFormat()))
424-                        {
425-                            crlList.add(other.getInfo());
426-                        }
427-                    }
428-                }
429-            }
430-
431-            return new CollectionStore(crlList);
432-        }
433-
434-        return new CollectionStore(new ArrayList());
435-    }
436+    // Store getOtherRevocationInfo(ASN1ObjectIdentifier otherRevocationInfoFormat, ASN1Set crlSet)
437+    // {
438+    //     if (crlSet != null)
439+    //     {
440+    //         List    crlList = new ArrayList(crlSet.size());
441+    //
442+    //         for (Enumeration en = crlSet.getObjects(); en.hasMoreElements();)
443+    //         {
444+    //             ASN1Primitive obj = ((ASN1Encodable)en.nextElement()).toASN1Primitive();
445+    //
446+    //             if (obj instanceof ASN1TaggedObject)
447+    //             {
448+    //                 ASN1TaggedObject tObj = ASN1TaggedObject.getInstance(obj);
449+    //
450+    //                 if (tObj.getTagNo() == 1)
451+    //                 {
452+    //                     OtherRevocationInfoFormat other = OtherRevocationInfoFormat.getInstance(tObj, false);
453+    //
454+    //                     if (otherRevocationInfoFormat.equals(other.getInfoFormat()))
455+    //                     {
456+    //                         crlList.add(other.getInfo());
457+    //                     }
458+    //                 }
459+    //             }
460+    //         }
461+    //
462+    //         return new CollectionStore(crlList);
463+    //     }
464+    //
465+    //     return new CollectionStore(new ArrayList());
466+    // }
467 }
468diff -Naur bcpkix-jdk15on-152.orig/org/bouncycastle/cms/CMSUtils.java bcpkix-jdk15on-152/org/bouncycastle/cms/CMSUtils.java
469--- bcpkix-jdk15on-152.orig/org/bouncycastle/cms/CMSUtils.java	2015-03-01 12:03:46.000000000 +0000
470+++ bcpkix-jdk15on-152/org/bouncycastle/cms/CMSUtils.java	2014-07-28 19:51:54.000000000 +0000
471@@ -20,9 +20,11 @@
472 import org.bouncycastle.asn1.DERTaggedObject;
473 import org.bouncycastle.asn1.cms.CMSObjectIdentifiers;
474 import org.bouncycastle.asn1.cms.ContentInfo;
475-import org.bouncycastle.asn1.cms.OtherRevocationInfoFormat;
476-import org.bouncycastle.asn1.ocsp.OCSPResponse;
477-import org.bouncycastle.asn1.ocsp.OCSPResponseStatus;
478+// BEGIN android-removed
479+// import org.bouncycastle.asn1.cms.OtherRevocationInfoFormat;
480+// import org.bouncycastle.asn1.ocsp.OCSPResponse;
481+// import org.bouncycastle.asn1.ocsp.OCSPResponseStatus;
482+// END android-removed
483 import org.bouncycastle.cert.X509AttributeCertificateHolder;
484 import org.bouncycastle.cert.X509CRLHolder;
485 import org.bouncycastle.cert.X509CertificateHolder;
486@@ -113,14 +115,16 @@
487
488                     crls.add(c.toASN1Structure());
489                 }
490-                else if (rev instanceof OtherRevocationInfoFormat)
491-                {
492-                    OtherRevocationInfoFormat infoFormat = OtherRevocationInfoFormat.getInstance(rev);
493-
494-                    validateInfoFormat(infoFormat);
495-
496-                    crls.add(new DERTaggedObject(false, 1, infoFormat));
497-                }
498+                // BEGIN android-removed
499+                // else if (rev instanceof OtherRevocationInfoFormat)
500+                // {
501+                //     OtherRevocationInfoFormat infoFormat = OtherRevocationInfoFormat.getInstance(rev);
502+                //
503+                //     validateInfoFormat(infoFormat);
504+                //
505+                //     crls.add(new DERTaggedObject(false, 1, infoFormat));
506+                // }
507+                // END android-removed
508                 else if (rev instanceof ASN1TaggedObject)
509                 {
510                     crls.add(rev);
511@@ -135,35 +139,36 @@
512         }
513     }
514
515-    private static void validateInfoFormat(OtherRevocationInfoFormat infoFormat)
516-    {
517-        if (CMSObjectIdentifiers.id_ri_ocsp_response.equals(infoFormat.getInfoFormat()))
518-        {
519-            OCSPResponse resp = OCSPResponse.getInstance(infoFormat.getInfo());
520-
521-            if (resp.getResponseStatus().getValue().intValue() != OCSPResponseStatus.SUCCESSFUL)
522-            {
523-                throw new IllegalArgumentException("cannot add unsuccessful OCSP response to CMS SignedData");
524-            }
525-        }
526-    }
527-
528-    static Collection getOthersFromStore(ASN1ObjectIdentifier otherRevocationInfoFormat, Store otherRevocationInfos)
529-    {
530-        List others = new ArrayList();
531-
532-        for (Iterator it = otherRevocationInfos.getMatches(null).iterator(); it.hasNext();)
533-        {
534-            ASN1Encodable info = (ASN1Encodable)it.next();
535-            OtherRevocationInfoFormat infoFormat = new OtherRevocationInfoFormat(otherRevocationInfoFormat, info);
536-
537-            validateInfoFormat(infoFormat);
538-
539-            others.add(new DERTaggedObject(false, 1, infoFormat));
540-        }
541-
542-        return others;
543-    }
544+    // BEGIN android-removed
545+    // private static void validateInfoFormat(OtherRevocationInfoFormat infoFormat)
546+    // {
547+    //     if (CMSObjectIdentifiers.id_ri_ocsp_response.equals(infoFormat.getInfoFormat()))
548+    //     {
549+    //         OCSPResponse resp = OCSPResponse.getInstance(infoFormat.getInfo());
550+    //
551+    //         if (resp.getResponseStatus().getValue().intValue() != OCSPResponseStatus.SUCCESSFUL)
552+    //         {
553+    //             throw new IllegalArgumentException("cannot add unsuccessful OCSP response to CMS SignedData");
554+    //         }
555+    //     }
556+    // }
557+    //
558+    // static Collection getOthersFromStore(ASN1ObjectIdentifier otherRevocationInfoFormat, Store otherRevocationInfos)
559+    // {
560+    //     List others = new ArrayList();
561+    //
562+    //     for (Iterator it = otherRevocationInfos.getMatches(null).iterator(); it.hasNext();)
563+    //     {
564+    //         ASN1Encodable info = (ASN1Encodable)it.next();
565+    //         OtherRevocationInfoFormat infoFormat = new OtherRevocationInfoFormat(otherRevocationInfoFormat, info);
566+    //         validateInfoFormat(infoFormat);
567+    //
568+    //         others.add(new DERTaggedObject(false, 1, infoFormat));
569+    //     }
570+    //
571+    //     return others;
572+    // }
573+    // END android-removed
574
575     static ASN1Set createBerSetFromList(List derObjects)
576     {
577diff -Naur bcpkix-jdk15on-152.orig/org/bouncycastle/cms/DefaultCMSSignatureAlgorithmNameGenerator.java bcpkix-jdk15on-152/org/bouncycastle/cms/DefaultCMSSignatureAlgorithmNameGenerator.java
578--- bcpkix-jdk15on-152.orig/org/bouncycastle/cms/DefaultCMSSignatureAlgorithmNameGenerator.java	2015-03-01 12:03:46.000000000 +0000
579+++ bcpkix-jdk15on-152/org/bouncycastle/cms/DefaultCMSSignatureAlgorithmNameGenerator.java	2015-04-09 13:10:16.000000000 +0000
580@@ -4,8 +4,10 @@
581 import java.util.Map;
582
583 import org.bouncycastle.asn1.ASN1ObjectIdentifier;
584-import org.bouncycastle.asn1.bsi.BSIObjectIdentifiers;
585-import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
586+// BEGIN android-removed
587+// import org.bouncycastle.asn1.bsi.BSIObjectIdentifiers;
588+// import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
589+// END android-removed
590 import org.bouncycastle.asn1.eac.EACObjectIdentifiers;
591 import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
592 import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers;
593@@ -34,12 +36,16 @@
594         addEntries(NISTObjectIdentifiers.dsa_with_sha384, "SHA384", "DSA");
595         addEntries(NISTObjectIdentifiers.dsa_with_sha512, "SHA512", "DSA");
596         addEntries(OIWObjectIdentifiers.dsaWithSHA1, "SHA1", "DSA");
597-        addEntries(OIWObjectIdentifiers.md4WithRSA, "MD4", "RSA");
598-        addEntries(OIWObjectIdentifiers.md4WithRSAEncryption, "MD4", "RSA");
599+        // BEGIN android-removed
600+        // addEntries(OIWObjectIdentifiers.md4WithRSA, "MD4", "RSA");
601+        // addEntries(OIWObjectIdentifiers.md4WithRSAEncryption, "MD4", "RSA");
602+        // END android-removed
603         addEntries(OIWObjectIdentifiers.md5WithRSA, "MD5", "RSA");
604         addEntries(OIWObjectIdentifiers.sha1WithRSA, "SHA1", "RSA");
605-        addEntries(PKCSObjectIdentifiers.md2WithRSAEncryption, "MD2", "RSA");
606-        addEntries(PKCSObjectIdentifiers.md4WithRSAEncryption, "MD4", "RSA");
607+        // BEGIN android-removed
608+        // addEntries(PKCSObjectIdentifiers.md2WithRSAEncryption, "MD2", "RSA");
609+        // addEntries(PKCSObjectIdentifiers.md4WithRSAEncryption, "MD4", "RSA");
610+        // END android-removed
611         addEntries(PKCSObjectIdentifiers.md5WithRSAEncryption, "MD5", "RSA");
612         addEntries(PKCSObjectIdentifiers.sha1WithRSAEncryption, "SHA1", "RSA");
613         addEntries(PKCSObjectIdentifiers.sha224WithRSAEncryption, "SHA224", "RSA");
614@@ -66,38 +72,44 @@
615         addEntries(EACObjectIdentifiers.id_TA_RSA_v1_5_SHA_256, "SHA256", "RSA");
616         addEntries(EACObjectIdentifiers.id_TA_RSA_PSS_SHA_1, "SHA1", "RSAandMGF1");
617         addEntries(EACObjectIdentifiers.id_TA_RSA_PSS_SHA_256, "SHA256", "RSAandMGF1");
618-        addEntries(BSIObjectIdentifiers.ecdsa_plain_SHA1, "SHA1", "PLAIN-ECDSA");
619-        addEntries(BSIObjectIdentifiers.ecdsa_plain_SHA224, "SHA224", "PLAIN-ECDSA");
620-        addEntries(BSIObjectIdentifiers.ecdsa_plain_SHA256, "SHA256", "PLAIN-ECDSA");
621-        addEntries(BSIObjectIdentifiers.ecdsa_plain_SHA384, "SHA384", "PLAIN-ECDSA");
622-        addEntries(BSIObjectIdentifiers.ecdsa_plain_SHA512, "SHA512", "PLAIN-ECDSA");
623-        addEntries(BSIObjectIdentifiers.ecdsa_plain_RIPEMD160, "RIPEMD160", "PLAIN-ECDSA");
624+        // BEGIN android-removed
625+        // addEntries(BSIObjectIdentifiers.ecdsa_plain_SHA1, "SHA1", "PLAIN-ECDSA");
626+        // addEntries(BSIObjectIdentifiers.ecdsa_plain_SHA224, "SHA224", "PLAIN-ECDSA");
627+        // addEntries(BSIObjectIdentifiers.ecdsa_plain_SHA256, "SHA256", "PLAIN-ECDSA");
628+        // addEntries(BSIObjectIdentifiers.ecdsa_plain_SHA384, "SHA384", "PLAIN-ECDSA");
629+        // addEntries(BSIObjectIdentifiers.ecdsa_plain_SHA512, "SHA512", "PLAIN-ECDSA");
630+        // addEntries(BSIObjectIdentifiers.ecdsa_plain_RIPEMD160, "RIPEMD160", "PLAIN-ECDSA");
631+        // END android-removed
632
633         encryptionAlgs.put(X9ObjectIdentifiers.id_dsa, "DSA");
634         encryptionAlgs.put(PKCSObjectIdentifiers.rsaEncryption, "RSA");
635         encryptionAlgs.put(TeleTrusTObjectIdentifiers.teleTrusTRSAsignatureAlgorithm, "RSA");
636         encryptionAlgs.put(X509ObjectIdentifiers.id_ea_rsa, "RSA");
637         encryptionAlgs.put(PKCSObjectIdentifiers.id_RSASSA_PSS, "RSAandMGF1");
638-        encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3410_94, "GOST3410");
639-        encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3410_2001, "ECGOST3410");
640-        encryptionAlgs.put(new ASN1ObjectIdentifier("1.3.6.1.4.1.5849.1.6.2"), "ECGOST3410");
641-        encryptionAlgs.put(new ASN1ObjectIdentifier("1.3.6.1.4.1.5849.1.1.5"), "GOST3410");
642-        encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001, "ECGOST3410");
643-        encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94, "GOST3410");
644-
645-        digestAlgs.put(PKCSObjectIdentifiers.md2, "MD2");
646-        digestAlgs.put(PKCSObjectIdentifiers.md4, "MD4");
647+        // BEGIN android-removed
648+        // encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3410_94, "GOST3410");
649+        // encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3410_2001, "ECGOST3410");
650+        // encryptionAlgs.put(new ASN1ObjectIdentifier("1.3.6.1.4.1.5849.1.6.2"), "ECGOST3410");
651+        // encryptionAlgs.put(new ASN1ObjectIdentifier("1.3.6.1.4.1.5849.1.1.5"), "GOST3410");
652+        // encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001, "ECGOST3410");
653+        // encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94, "GOST3410");
654+        //
655+        // digestAlgs.put(PKCSObjectIdentifiers.md2, "MD2");
656+        // digestAlgs.put(PKCSObjectIdentifiers.md4, "MD4");
657+        // END android-removed
658         digestAlgs.put(PKCSObjectIdentifiers.md5, "MD5");
659         digestAlgs.put(OIWObjectIdentifiers.idSHA1, "SHA1");
660         digestAlgs.put(NISTObjectIdentifiers.id_sha224, "SHA224");
661         digestAlgs.put(NISTObjectIdentifiers.id_sha256, "SHA256");
662         digestAlgs.put(NISTObjectIdentifiers.id_sha384, "SHA384");
663         digestAlgs.put(NISTObjectIdentifiers.id_sha512, "SHA512");
664-        digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd128, "RIPEMD128");
665-        digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd160, "RIPEMD160");
666-        digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd256, "RIPEMD256");
667-        digestAlgs.put(CryptoProObjectIdentifiers.gostR3411,  "GOST3411");
668-        digestAlgs.put(new ASN1ObjectIdentifier("1.3.6.1.4.1.5849.1.2.1"),  "GOST3411");
669+        // BEGIN android-removed
670+        // digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd128, "RIPEMD128");
671+        // digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd160, "RIPEMD160");
672+        // digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd256, "RIPEMD256");
673+        // digestAlgs.put(CryptoProObjectIdentifiers.gostR3411,  "GOST3411");
674+        // digestAlgs.put(new ASN1ObjectIdentifier("1.3.6.1.4.1.5849.1.2.1"),  "GOST3411");
675+        // END android-removed
676     }
677
678     /**
679diff -Naur bcpkix-jdk15on-152.orig/org/bouncycastle/cms/DefaultCMSSignatureEncryptionAlgorithmFinder.java bcpkix-jdk15on-152/org/bouncycastle/cms/DefaultCMSSignatureEncryptionAlgorithmFinder.java
680--- bcpkix-jdk15on-152.orig/org/bouncycastle/cms/DefaultCMSSignatureEncryptionAlgorithmFinder.java	2015-03-01 12:03:46.000000000 +0000
681+++ bcpkix-jdk15on-152/org/bouncycastle/cms/DefaultCMSSignatureEncryptionAlgorithmFinder.java	2013-09-26 18:06:21.000000000 +0000
682@@ -16,21 +16,27 @@
683
684     static
685     {
686-        RSA_PKCS1d5.add(PKCSObjectIdentifiers.md2WithRSAEncryption);
687-        RSA_PKCS1d5.add(PKCSObjectIdentifiers.md4WithRSAEncryption);
688+        // BEGIN android-removed
689+        // RSA_PKCS1d5.add(PKCSObjectIdentifiers.md2WithRSAEncryption);
690+        // RSA_PKCS1d5.add(PKCSObjectIdentifiers.md4WithRSAEncryption);
691+        // END android-removed
692         RSA_PKCS1d5.add(PKCSObjectIdentifiers.md5WithRSAEncryption);
693         RSA_PKCS1d5.add(PKCSObjectIdentifiers.sha1WithRSAEncryption);
694         RSA_PKCS1d5.add(PKCSObjectIdentifiers.sha224WithRSAEncryption);
695         RSA_PKCS1d5.add(PKCSObjectIdentifiers.sha256WithRSAEncryption);
696         RSA_PKCS1d5.add(PKCSObjectIdentifiers.sha384WithRSAEncryption);
697         RSA_PKCS1d5.add(PKCSObjectIdentifiers.sha512WithRSAEncryption);
698-        RSA_PKCS1d5.add(OIWObjectIdentifiers.md4WithRSAEncryption);
699-        RSA_PKCS1d5.add(OIWObjectIdentifiers.md4WithRSA);
700+        // BEGIN android-removed
701+        // RSA_PKCS1d5.add(OIWObjectIdentifiers.md4WithRSAEncryption);
702+        // RSA_PKCS1d5.add(OIWObjectIdentifiers.md4WithRSA);
703+        // END android-removed
704         RSA_PKCS1d5.add(OIWObjectIdentifiers.md5WithRSA);
705         RSA_PKCS1d5.add(OIWObjectIdentifiers.sha1WithRSA);
706-        RSA_PKCS1d5.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128);
707-        RSA_PKCS1d5.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160);
708-        RSA_PKCS1d5.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256);
709+        // BEGIN android-removed
710+        // RSA_PKCS1d5.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128);
711+        // RSA_PKCS1d5.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160);
712+        // RSA_PKCS1d5.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256);
713+        // END android-removed
714     }
715
716     public AlgorithmIdentifier findEncryptionAlgorithm(AlgorithmIdentifier signatureAlgorithm)
717diff -Naur bcpkix-jdk15on-152.orig/org/bouncycastle/operator/DefaultDigestAlgorithmIdentifierFinder.java bcpkix-jdk15on-152/org/bouncycastle/operator/DefaultDigestAlgorithmIdentifierFinder.java
718--- bcpkix-jdk15on-152.orig/org/bouncycastle/operator/DefaultDigestAlgorithmIdentifierFinder.java	2015-03-01 12:03:46.000000000 +0000
719+++ bcpkix-jdk15on-152/org/bouncycastle/operator/DefaultDigestAlgorithmIdentifierFinder.java	2013-09-26 18:06:21.000000000 +0000
720@@ -5,7 +5,9 @@
721
722 import org.bouncycastle.asn1.ASN1ObjectIdentifier;
723 import org.bouncycastle.asn1.DERNull;
724-import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
725+// BEGIN android-removed
726+// import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
727+// END android-removed
728 import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
729 import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers;
730 import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
731@@ -25,16 +27,20 @@
732         //
733         // digests
734         //
735-        digestOids.put(OIWObjectIdentifiers.md4WithRSAEncryption, PKCSObjectIdentifiers.md4);
736-        digestOids.put(OIWObjectIdentifiers.md4WithRSA, PKCSObjectIdentifiers.md4);
737+        // BEGIN android-removed
738+        // digestOids.put(OIWObjectIdentifiers.md4WithRSAEncryption, PKCSObjectIdentifiers.md4);
739+        // digestOids.put(OIWObjectIdentifiers.md4WithRSA, PKCSObjectIdentifiers.md4);
740+        // END android-removed
741         digestOids.put(OIWObjectIdentifiers.sha1WithRSA, OIWObjectIdentifiers.idSHA1);
742
743         digestOids.put(PKCSObjectIdentifiers.sha224WithRSAEncryption, NISTObjectIdentifiers.id_sha224);
744         digestOids.put(PKCSObjectIdentifiers.sha256WithRSAEncryption, NISTObjectIdentifiers.id_sha256);
745         digestOids.put(PKCSObjectIdentifiers.sha384WithRSAEncryption, NISTObjectIdentifiers.id_sha384);
746         digestOids.put(PKCSObjectIdentifiers.sha512WithRSAEncryption, NISTObjectIdentifiers.id_sha512);
747-        digestOids.put(PKCSObjectIdentifiers.md2WithRSAEncryption, PKCSObjectIdentifiers.md2);
748-        digestOids.put(PKCSObjectIdentifiers.md4WithRSAEncryption, PKCSObjectIdentifiers.md4);
749+        // BEGIN android-removed
750+        // digestOids.put(PKCSObjectIdentifiers.md2WithRSAEncryption, PKCSObjectIdentifiers.md2);
751+        // digestOids.put(PKCSObjectIdentifiers.md4WithRSAEncryption, PKCSObjectIdentifiers.md4);
752+        // END android-removed
753         digestOids.put(PKCSObjectIdentifiers.md5WithRSAEncryption, PKCSObjectIdentifiers.md5);
754         digestOids.put(PKCSObjectIdentifiers.sha1WithRSAEncryption, OIWObjectIdentifiers.idSHA1);
755
756@@ -50,12 +56,14 @@
757         digestOids.put(NISTObjectIdentifiers.dsa_with_sha384, NISTObjectIdentifiers.id_sha384);
758         digestOids.put(NISTObjectIdentifiers.dsa_with_sha512, NISTObjectIdentifiers.id_sha512);
759
760-        digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128, TeleTrusTObjectIdentifiers.ripemd128);
761-        digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160, TeleTrusTObjectIdentifiers.ripemd160);
762-        digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256, TeleTrusTObjectIdentifiers.ripemd256);
763-
764-        digestOids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94, CryptoProObjectIdentifiers.gostR3411);
765-        digestOids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001, CryptoProObjectIdentifiers.gostR3411);
766+        // BEGIN android-removed
767+        // digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128, TeleTrusTObjectIdentifiers.ripemd128);
768+        // digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160, TeleTrusTObjectIdentifiers.ripemd160);
769+        // digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256, TeleTrusTObjectIdentifiers.ripemd256);
770+        //
771+        // digestOids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94, CryptoProObjectIdentifiers.gostR3411);
772+        // digestOids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001, CryptoProObjectIdentifiers.gostR3411);
773+        // END android-removed
774
775         digestNameToOids.put("SHA-1", OIWObjectIdentifiers.idSHA1);
776         digestNameToOids.put("SHA-224", NISTObjectIdentifiers.id_sha224);
777@@ -63,15 +71,19 @@
778         digestNameToOids.put("SHA-384", NISTObjectIdentifiers.id_sha384);
779         digestNameToOids.put("SHA-512", NISTObjectIdentifiers.id_sha512);
780
781-        digestNameToOids.put("GOST3411", CryptoProObjectIdentifiers.gostR3411);
782-
783-        digestNameToOids.put("MD2", PKCSObjectIdentifiers.md2);
784-        digestNameToOids.put("MD4", PKCSObjectIdentifiers.md4);
785+        // BEGIN android-removed
786+        // digestNameToOids.put("GOST3411", CryptoProObjectIdentifiers.gostR3411);
787+        //
788+        // digestNameToOids.put("MD2", PKCSObjectIdentifiers.md2);
789+        // digestNameToOids.put("MD4", PKCSObjectIdentifiers.md4);
790+        // END android-removed
791         digestNameToOids.put("MD5", PKCSObjectIdentifiers.md5);
792
793-        digestNameToOids.put("RIPEMD128", TeleTrusTObjectIdentifiers.ripemd128);
794-        digestNameToOids.put("RIPEMD160", TeleTrusTObjectIdentifiers.ripemd160);
795-        digestNameToOids.put("RIPEMD256", TeleTrusTObjectIdentifiers.ripemd256);
796+        // BEGIN android-removed
797+        // digestNameToOids.put("RIPEMD128", TeleTrusTObjectIdentifiers.ripemd128);
798+        // digestNameToOids.put("RIPEMD160", TeleTrusTObjectIdentifiers.ripemd160);
799+        // digestNameToOids.put("RIPEMD256", TeleTrusTObjectIdentifiers.ripemd256);
800+        // END android-removed
801     }
802
803     public AlgorithmIdentifier find(AlgorithmIdentifier sigAlgId)
804diff -Naur bcpkix-jdk15on-152.orig/org/bouncycastle/operator/DefaultSignatureAlgorithmIdentifierFinder.java bcpkix-jdk15on-152/org/bouncycastle/operator/DefaultSignatureAlgorithmIdentifierFinder.java
805--- bcpkix-jdk15on-152.orig/org/bouncycastle/operator/DefaultSignatureAlgorithmIdentifierFinder.java	2015-03-01 12:03:46.000000000 +0000
806+++ bcpkix-jdk15on-152/org/bouncycastle/operator/DefaultSignatureAlgorithmIdentifierFinder.java	2014-07-28 19:51:54.000000000 +0000
807@@ -9,9 +9,11 @@
808 import org.bouncycastle.asn1.ASN1Integer;
809 import org.bouncycastle.asn1.ASN1ObjectIdentifier;
810 import org.bouncycastle.asn1.DERNull;
811-import org.bouncycastle.asn1.bsi.BSIObjectIdentifiers;
812-import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
813-import org.bouncycastle.asn1.eac.EACObjectIdentifiers;
814+// BEGIN android-removed
815+// import org.bouncycastle.asn1.bsi.BSIObjectIdentifiers;
816+// import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
817+// import org.bouncycastle.asn1.eac.EACObjectIdentifiers;
818+// END android-removed
819 import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
820 import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers;
821 import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
822@@ -34,13 +36,17 @@
823     private static final ASN1ObjectIdentifier ENCRYPTION_DSA = X9ObjectIdentifiers.id_dsa_with_sha1;
824     private static final ASN1ObjectIdentifier ENCRYPTION_ECDSA = X9ObjectIdentifiers.ecdsa_with_SHA1;
825     private static final ASN1ObjectIdentifier ENCRYPTION_RSA_PSS = PKCSObjectIdentifiers.id_RSASSA_PSS;
826-    private static final ASN1ObjectIdentifier ENCRYPTION_GOST3410 = CryptoProObjectIdentifiers.gostR3410_94;
827-    private static final ASN1ObjectIdentifier ENCRYPTION_ECGOST3410 = CryptoProObjectIdentifiers.gostR3410_2001;
828+    // BEGIN android-removed
829+    // private static final ASN1ObjectIdentifier ENCRYPTION_GOST3410 = CryptoProObjectIdentifiers.gostR3410_94;
830+    // private static final ASN1ObjectIdentifier ENCRYPTION_ECGOST3410 = CryptoProObjectIdentifiers.gostR3410_2001;
831+    // END android-removed
832
833     static
834     {
835-        algorithms.put("MD2WITHRSAENCRYPTION", PKCSObjectIdentifiers.md2WithRSAEncryption);
836-        algorithms.put("MD2WITHRSA", PKCSObjectIdentifiers.md2WithRSAEncryption);
837+        // BEGIN android-removed
838+        // algorithms.put("MD2WITHRSAENCRYPTION", PKCSObjectIdentifiers.md2WithRSAEncryption);
839+        // algorithms.put("MD2WITHRSA", PKCSObjectIdentifiers.md2WithRSAEncryption);
840+        // END android-removed
841         algorithms.put("MD5WITHRSAENCRYPTION", PKCSObjectIdentifiers.md5WithRSAEncryption);
842         algorithms.put("MD5WITHRSA", PKCSObjectIdentifiers.md5WithRSAEncryption);
843         algorithms.put("SHA1WITHRSAENCRYPTION", PKCSObjectIdentifiers.sha1WithRSAEncryption);
844@@ -58,12 +64,14 @@
845         algorithms.put("SHA256WITHRSAANDMGF1", PKCSObjectIdentifiers.id_RSASSA_PSS);
846         algorithms.put("SHA384WITHRSAANDMGF1", PKCSObjectIdentifiers.id_RSASSA_PSS);
847         algorithms.put("SHA512WITHRSAANDMGF1", PKCSObjectIdentifiers.id_RSASSA_PSS);
848-        algorithms.put("RIPEMD160WITHRSAENCRYPTION", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160);
849-        algorithms.put("RIPEMD160WITHRSA", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160);
850-        algorithms.put("RIPEMD128WITHRSAENCRYPTION", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128);
851-        algorithms.put("RIPEMD128WITHRSA", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128);
852-        algorithms.put("RIPEMD256WITHRSAENCRYPTION", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256);
853-        algorithms.put("RIPEMD256WITHRSA", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256);
854+        // BEGIN android-removed
855+        // algorithms.put("RIPEMD160WITHRSAENCRYPTION", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160);
856+        // algorithms.put("RIPEMD160WITHRSA", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160);
857+        // algorithms.put("RIPEMD128WITHRSAENCRYPTION", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128);
858+        // algorithms.put("RIPEMD128WITHRSA", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128);
859+        // algorithms.put("RIPEMD256WITHRSAENCRYPTION", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256);
860+        // algorithms.put("RIPEMD256WITHRSA", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256);
861+        // END android-removed
862         algorithms.put("SHA1WITHDSA", X9ObjectIdentifiers.id_dsa_with_sha1);
863         algorithms.put("DSAWITHSHA1", X9ObjectIdentifiers.id_dsa_with_sha1);
864         algorithms.put("SHA224WITHDSA", NISTObjectIdentifiers.dsa_with_sha224);
865@@ -76,22 +84,24 @@
866         algorithms.put("SHA256WITHECDSA", X9ObjectIdentifiers.ecdsa_with_SHA256);
867         algorithms.put("SHA384WITHECDSA", X9ObjectIdentifiers.ecdsa_with_SHA384);
868         algorithms.put("SHA512WITHECDSA", X9ObjectIdentifiers.ecdsa_with_SHA512);
869-        algorithms.put("GOST3411WITHGOST3410", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94);
870-        algorithms.put("GOST3411WITHGOST3410-94", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94);
871-        algorithms.put("GOST3411WITHECGOST3410", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
872-        algorithms.put("GOST3411WITHECGOST3410-2001", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
873-        algorithms.put("GOST3411WITHGOST3410-2001", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
874-        algorithms.put("SHA1WITHPLAIN-ECDSA", BSIObjectIdentifiers.ecdsa_plain_SHA1);
875-        algorithms.put("SHA224WITHPLAIN-ECDSA", BSIObjectIdentifiers.ecdsa_plain_SHA224);
876-        algorithms.put("SHA256WITHPLAIN-ECDSA", BSIObjectIdentifiers.ecdsa_plain_SHA256);
877-        algorithms.put("SHA384WITHPLAIN-ECDSA", BSIObjectIdentifiers.ecdsa_plain_SHA384);
878-        algorithms.put("SHA512WITHPLAIN-ECDSA", BSIObjectIdentifiers.ecdsa_plain_SHA512);
879-        algorithms.put("RIPEMD160WITHPLAIN-ECDSA", BSIObjectIdentifiers.ecdsa_plain_RIPEMD160);
880-        algorithms.put("SHA1WITHCVC-ECDSA", EACObjectIdentifiers.id_TA_ECDSA_SHA_1);
881-        algorithms.put("SHA224WITHPCVC-ECDSA", EACObjectIdentifiers.id_TA_ECDSA_SHA_224);
882-        algorithms.put("SHA256WITHCVC-ECDSA", EACObjectIdentifiers.id_TA_ECDSA_SHA_256);
883-        algorithms.put("SHA384WITHCVC-ECDSA", EACObjectIdentifiers.id_TA_ECDSA_SHA_384);
884-        algorithms.put("SHA512WITHCVC-ECDSA", EACObjectIdentifiers.id_TA_ECDSA_SHA_512);
885+        // BEGIN android-removed
886+        // algorithms.put("GOST3411WITHGOST3410", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94);
887+        // algorithms.put("GOST3411WITHGOST3410-94", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94);
888+        // algorithms.put("GOST3411WITHECGOST3410", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
889+        // algorithms.put("GOST3411WITHECGOST3410-2001", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
890+        // algorithms.put("GOST3411WITHGOST3410-2001", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
891+        // algorithms.put("SHA1WITHPLAIN-ECDSA", BSIObjectIdentifiers.ecdsa_plain_SHA1);
892+        // algorithms.put("SHA224WITHPLAIN-ECDSA", BSIObjectIdentifiers.ecdsa_plain_SHA224);
893+        // algorithms.put("SHA256WITHPLAIN-ECDSA", BSIObjectIdentifiers.ecdsa_plain_SHA256);
894+        // algorithms.put("SHA384WITHPLAIN-ECDSA", BSIObjectIdentifiers.ecdsa_plain_SHA384);
895+        // algorithms.put("SHA512WITHPLAIN-ECDSA", BSIObjectIdentifiers.ecdsa_plain_SHA512);
896+        // algorithms.put("RIPEMD160WITHPLAIN-ECDSA", BSIObjectIdentifiers.ecdsa_plain_RIPEMD160);
897+        // algorithms.put("SHA1WITHCVC-ECDSA", EACObjectIdentifiers.id_TA_ECDSA_SHA_1);
898+        // algorithms.put("SHA224WITHPCVC-ECDSA", EACObjectIdentifiers.id_TA_ECDSA_SHA_224);
899+        // algorithms.put("SHA256WITHCVC-ECDSA", EACObjectIdentifiers.id_TA_ECDSA_SHA_256);
900+        // algorithms.put("SHA384WITHCVC-ECDSA", EACObjectIdentifiers.id_TA_ECDSA_SHA_384);
901+        // algorithms.put("SHA512WITHCVC-ECDSA", EACObjectIdentifiers.id_TA_ECDSA_SHA_512);
902+        // END android-removed
903         //
904         // According to RFC 3279, the ASN.1 encoding SHALL (id-dsa-with-sha1) or MUST (ecdsa-with-SHA*) omit the parameters field.
905         // The parameters field SHALL be NULL for RSA based signature algorithms.
906@@ -110,8 +120,10 @@
907         //
908         // RFC 4491
909         //
910-        noParams.add(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94);
911-        noParams.add(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
912+        // BEGIN android-removed
913+        // noParams.add(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94);
914+        // noParams.add(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
915+        // END android-removed
916
917         //
918         // PKCS 1.5 encrypted  algorithms
919@@ -121,9 +133,11 @@
920         pkcs15RsaEncryption.add(PKCSObjectIdentifiers.sha256WithRSAEncryption);
921         pkcs15RsaEncryption.add(PKCSObjectIdentifiers.sha384WithRSAEncryption);
922         pkcs15RsaEncryption.add(PKCSObjectIdentifiers.sha512WithRSAEncryption);
923-        pkcs15RsaEncryption.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128);
924-        pkcs15RsaEncryption.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160);
925-        pkcs15RsaEncryption.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256);
926+        // BEGIN android-removed
927+        // pkcs15RsaEncryption.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128);
928+        // pkcs15RsaEncryption.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160);
929+        // pkcs15RsaEncryption.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256);
930+        // END android-removed
931
932         //
933         // explicit params
934@@ -150,15 +164,19 @@
935         digestOids.put(PKCSObjectIdentifiers.sha256WithRSAEncryption, NISTObjectIdentifiers.id_sha256);
936         digestOids.put(PKCSObjectIdentifiers.sha384WithRSAEncryption, NISTObjectIdentifiers.id_sha384);
937         digestOids.put(PKCSObjectIdentifiers.sha512WithRSAEncryption, NISTObjectIdentifiers.id_sha512);
938-        digestOids.put(PKCSObjectIdentifiers.md2WithRSAEncryption, PKCSObjectIdentifiers.md2);
939-        digestOids.put(PKCSObjectIdentifiers.md4WithRSAEncryption, PKCSObjectIdentifiers.md4);
940+        // BEGIN android-removed
941+        // digestOids.put(PKCSObjectIdentifiers.md2WithRSAEncryption, PKCSObjectIdentifiers.md2);
942+        // digestOids.put(PKCSObjectIdentifiers.md4WithRSAEncryption, PKCSObjectIdentifiers.md4);
943+        // END android-removed
944         digestOids.put(PKCSObjectIdentifiers.md5WithRSAEncryption, PKCSObjectIdentifiers.md5);
945         digestOids.put(PKCSObjectIdentifiers.sha1WithRSAEncryption, OIWObjectIdentifiers.idSHA1);
946-        digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128, TeleTrusTObjectIdentifiers.ripemd128);
947-        digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160, TeleTrusTObjectIdentifiers.ripemd160);
948-        digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256, TeleTrusTObjectIdentifiers.ripemd256);
949-        digestOids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94, CryptoProObjectIdentifiers.gostR3411);
950-        digestOids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001, CryptoProObjectIdentifiers.gostR3411);
951+        // BEGIN android-removed
952+        // digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128, TeleTrusTObjectIdentifiers.ripemd128);
953+        // digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160, TeleTrusTObjectIdentifiers.ripemd160);
954+        // digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256, TeleTrusTObjectIdentifiers.ripemd256);
955+        // digestOids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94, CryptoProObjectIdentifiers.gostR3411);
956+        // digestOids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001, CryptoProObjectIdentifiers.gostR3411);
957+        // END android-removed
958     }
959
960     private static AlgorithmIdentifier generate(String signatureAlgorithm)
961@@ -221,4 +239,4 @@
962     {
963         return generate(sigAlgName);
964     }
965-}
966\ No newline at end of file
967+}
968diff -Naur bcpkix-jdk15on-152.orig/org/bouncycastle/operator/bc/BcDefaultDigestProvider.java bcpkix-jdk15on-152/org/bouncycastle/operator/bc/BcDefaultDigestProvider.java
969--- bcpkix-jdk15on-152.orig/org/bouncycastle/operator/bc/BcDefaultDigestProvider.java	2015-03-01 12:03:46.000000000 +0000
970+++ bcpkix-jdk15on-152/org/bouncycastle/operator/bc/BcDefaultDigestProvider.java	2013-09-26 18:06:21.000000000 +0000
971@@ -4,20 +4,26 @@
972 import java.util.HashMap;
973 import java.util.Map;
974
975-import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
976+// BEGIN android-removed
977+// import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
978+// END android-removed
979 import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
980 import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers;
981 import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
982 import org.bouncycastle.asn1.teletrust.TeleTrusTObjectIdentifiers;
983 import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
984 import org.bouncycastle.crypto.ExtendedDigest;
985-import org.bouncycastle.crypto.digests.GOST3411Digest;
986-import org.bouncycastle.crypto.digests.MD2Digest;
987-import org.bouncycastle.crypto.digests.MD4Digest;
988+// BEGIN android-removed
989+// import org.bouncycastle.crypto.digests.GOST3411Digest;
990+// import org.bouncycastle.crypto.digests.MD2Digest;
991+// import org.bouncycastle.crypto.digests.MD4Digest;
992+// END android-removed
993 import org.bouncycastle.crypto.digests.MD5Digest;
994-import org.bouncycastle.crypto.digests.RIPEMD128Digest;
995-import org.bouncycastle.crypto.digests.RIPEMD160Digest;
996-import org.bouncycastle.crypto.digests.RIPEMD256Digest;
997+// BEGIN android-removed
998+// import org.bouncycastle.crypto.digests.RIPEMD128Digest;
999+// import org.bouncycastle.crypto.digests.RIPEMD160Digest;
1000+// import org.bouncycastle.crypto.digests.RIPEMD256Digest;
1001+// END android-removed
1002 import org.bouncycastle.crypto.digests.SHA1Digest;
1003 import org.bouncycastle.crypto.digests.SHA224Digest;
1004 import org.bouncycastle.crypto.digests.SHA256Digest;
1005@@ -76,48 +82,50 @@
1006                 return new MD5Digest();
1007             }
1008         });
1009-        table.put(PKCSObjectIdentifiers.md4, new BcDigestProvider()
1010-        {
1011-            public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
1012-            {
1013-                return new MD4Digest();
1014-            }
1015-        });
1016-        table.put(PKCSObjectIdentifiers.md2, new BcDigestProvider()
1017-        {
1018-            public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
1019-            {
1020-                return new MD2Digest();
1021-            }
1022-        });
1023-        table.put(CryptoProObjectIdentifiers.gostR3411, new BcDigestProvider()
1024-        {
1025-            public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
1026-            {
1027-                return new GOST3411Digest();
1028-            }
1029-        });
1030-        table.put(TeleTrusTObjectIdentifiers.ripemd128, new BcDigestProvider()
1031-        {
1032-            public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
1033-            {
1034-                return new RIPEMD128Digest();
1035-            }
1036-        });
1037-        table.put(TeleTrusTObjectIdentifiers.ripemd160, new BcDigestProvider()
1038-        {
1039-            public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
1040-            {
1041-                return new RIPEMD160Digest();
1042-            }
1043-        });
1044-        table.put(TeleTrusTObjectIdentifiers.ripemd256, new BcDigestProvider()
1045-        {
1046-            public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
1047-            {
1048-                return new RIPEMD256Digest();
1049-            }
1050-        });
1051+        // BEGIN android-removed
1052+        // table.put(PKCSObjectIdentifiers.md4, new BcDigestProvider()
1053+        // {
1054+        //     public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
1055+        //     {
1056+        //         return new MD4Digest();
1057+        //     }
1058+        // });
1059+        // table.put(PKCSObjectIdentifiers.md2, new BcDigestProvider()
1060+        // {
1061+        //     public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
1062+        //     {
1063+        //         return new MD2Digest();
1064+        //     }
1065+        // });
1066+        // table.put(CryptoProObjectIdentifiers.gostR3411, new BcDigestProvider()
1067+        // {
1068+        //     public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
1069+        //     {
1070+        //         return new GOST3411Digest();
1071+        //     }
1072+        // });
1073+        // table.put(TeleTrusTObjectIdentifiers.ripemd128, new BcDigestProvider()
1074+        // {
1075+        //     public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
1076+        //     {
1077+        //         return new RIPEMD128Digest();
1078+        //     }
1079+        // });
1080+        // table.put(TeleTrusTObjectIdentifiers.ripemd160, new BcDigestProvider()
1081+        // {
1082+        //     public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
1083+        //     {
1084+        //         return new RIPEMD160Digest();
1085+        //     }
1086+        // });
1087+        // table.put(TeleTrusTObjectIdentifiers.ripemd256, new BcDigestProvider()
1088+        // {
1089+        //     public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
1090+        //     {
1091+        //         return new RIPEMD256Digest();
1092+        //     }
1093+        // });
1094+        // END android-removed
1095
1096         return Collections.unmodifiableMap(table);
1097     }
1098diff -Naur bcpkix-jdk15on-152.orig/org/bouncycastle/operator/jcajce/OperatorHelper.java bcpkix-jdk15on-152/org/bouncycastle/operator/jcajce/OperatorHelper.java
1099--- bcpkix-jdk15on-152.orig/org/bouncycastle/operator/jcajce/OperatorHelper.java	2015-03-01 12:03:46.000000000 +0000
1100+++ bcpkix-jdk15on-152/org/bouncycastle/operator/jcajce/OperatorHelper.java	2015-04-09 13:10:16.000000000 +0000
1101@@ -24,9 +24,11 @@
1102 import org.bouncycastle.asn1.ASN1Encodable;
1103 import org.bouncycastle.asn1.ASN1ObjectIdentifier;
1104 import org.bouncycastle.asn1.DERNull;
1105-import org.bouncycastle.asn1.bsi.BSIObjectIdentifiers;
1106-import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
1107-import org.bouncycastle.asn1.eac.EACObjectIdentifiers;
1108+// BEGIN android-removed
1109+// import org.bouncycastle.asn1.bsi.BSIObjectIdentifiers;
1110+// import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
1111+// import org.bouncycastle.asn1.eac.EACObjectIdentifiers;
1112+// END android-removed
1113 import org.bouncycastle.asn1.kisa.KISAObjectIdentifiers;
1114 import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
1115 import org.bouncycastle.asn1.ntt.NTTObjectIdentifiers;
1116@@ -59,22 +61,26 @@
1117         oids.put(PKCSObjectIdentifiers.sha256WithRSAEncryption, "SHA256WITHRSA");
1118         oids.put(PKCSObjectIdentifiers.sha384WithRSAEncryption, "SHA384WITHRSA");
1119         oids.put(PKCSObjectIdentifiers.sha512WithRSAEncryption, "SHA512WITHRSA");
1120-        oids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94, "GOST3411WITHGOST3410");
1121-        oids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001, "GOST3411WITHECGOST3410");
1122-        oids.put(BSIObjectIdentifiers.ecdsa_plain_SHA1, "SHA1WITHPLAIN-ECDSA");
1123-        oids.put(BSIObjectIdentifiers.ecdsa_plain_SHA224, "SHA224WITHPLAIN-ECDSA");
1124-        oids.put(BSIObjectIdentifiers.ecdsa_plain_SHA256, "SHA256WITHPLAIN-ECDSA");
1125-        oids.put(BSIObjectIdentifiers.ecdsa_plain_SHA384, "SHA384WITHPLAIN-ECDSA");
1126-        oids.put(BSIObjectIdentifiers.ecdsa_plain_SHA512, "SHA512WITHPLAIN-ECDSA");
1127-        oids.put(BSIObjectIdentifiers.ecdsa_plain_RIPEMD160, "RIPEMD160WITHPLAIN-ECDSA");
1128-        oids.put(EACObjectIdentifiers.id_TA_ECDSA_SHA_1, "SHA1WITHCVC-ECDSA");
1129-        oids.put(EACObjectIdentifiers.id_TA_ECDSA_SHA_224, "SHA224WITHCVC-ECDSA");
1130-        oids.put(EACObjectIdentifiers.id_TA_ECDSA_SHA_256, "SHA256WITHCVC-ECDSA");
1131-        oids.put(EACObjectIdentifiers.id_TA_ECDSA_SHA_384, "SHA384WITHCVC-ECDSA");
1132-        oids.put(EACObjectIdentifiers.id_TA_ECDSA_SHA_512, "SHA512WITHCVC-ECDSA");
1133+        // BEGIN android-removed
1134+        // oids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94, "GOST3411WITHGOST3410");
1135+        // oids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001, "GOST3411WITHECGOST3410");
1136+        // oids.put(BSIObjectIdentifiers.ecdsa_plain_SHA1, "SHA1WITHPLAIN-ECDSA");
1137+        // oids.put(BSIObjectIdentifiers.ecdsa_plain_SHA224, "SHA224WITHPLAIN-ECDSA");
1138+        // oids.put(BSIObjectIdentifiers.ecdsa_plain_SHA256, "SHA256WITHPLAIN-ECDSA");
1139+        // oids.put(BSIObjectIdentifiers.ecdsa_plain_SHA384, "SHA384WITHPLAIN-ECDSA");
1140+        // oids.put(BSIObjectIdentifiers.ecdsa_plain_SHA512, "SHA512WITHPLAIN-ECDSA");
1141+        // oids.put(BSIObjectIdentifiers.ecdsa_plain_RIPEMD160, "RIPEMD160WITHPLAIN-ECDSA");
1142+        // oids.put(EACObjectIdentifiers.id_TA_ECDSA_SHA_1, "SHA1WITHCVC-ECDSA");
1143+        // oids.put(EACObjectIdentifiers.id_TA_ECDSA_SHA_224, "SHA224WITHCVC-ECDSA");
1144+        // oids.put(EACObjectIdentifiers.id_TA_ECDSA_SHA_256, "SHA256WITHCVC-ECDSA");
1145+        // oids.put(EACObjectIdentifiers.id_TA_ECDSA_SHA_384, "SHA384WITHCVC-ECDSA");
1146+        // oids.put(EACObjectIdentifiers.id_TA_ECDSA_SHA_512, "SHA512WITHCVC-ECDSA");
1147+        // END android-removed
1148
1149         oids.put(new ASN1ObjectIdentifier("1.2.840.113549.1.1.4"), "MD5WITHRSA");
1150-        oids.put(new ASN1ObjectIdentifier("1.2.840.113549.1.1.2"), "MD2WITHRSA");
1151+        // BEGIN android-removed
1152+        // oids.put(new ASN1ObjectIdentifier("1.2.840.113549.1.1.2"), "MD2WITHRSA");
1153+        // END android-removed
1154         oids.put(new ASN1ObjectIdentifier("1.2.840.10040.4.3"), "SHA1WITHDSA");
1155         oids.put(X9ObjectIdentifiers.ecdsa_with_SHA1, "SHA1WITHECDSA");
1156         oids.put(X9ObjectIdentifiers.ecdsa_with_SHA224, "SHA224WITHECDSA");
1157