• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1diff -Naur bcpkix-jdk15on-148.orig/org/bouncycastle/cms/CMSSignedGenerator.java bcpkix-jdk15on-148/org/bouncycastle/cms/CMSSignedGenerator.java
2--- bcpkix-jdk15on-148.orig/org/bouncycastle/cms/CMSSignedGenerator.java	2013-02-08 17:54:18.000000000 +0000
3+++ bcpkix-jdk15on-148/org/bouncycastle/cms/CMSSignedGenerator.java	2013-01-31 02:26:40.000000000 +0000
4@@ -22,7 +22,9 @@
5 import org.bouncycastle.asn1.DERTaggedObject;
6 import org.bouncycastle.asn1.cms.AttributeTable;
7 import org.bouncycastle.asn1.cms.CMSObjectIdentifiers;
8-import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
9+// BEGIN android-removed
10+// import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
11+// END android-removed
12 import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
13 import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers;
14 import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
15@@ -30,7 +32,9 @@
16 import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
17 import org.bouncycastle.asn1.x509.AttributeCertificate;
18 import org.bouncycastle.asn1.x9.X9ObjectIdentifiers;
19-import org.bouncycastle.jce.interfaces.GOST3410PrivateKey;
20+// BEGIN android-removed
21+// import org.bouncycastle.jce.interfaces.GOST3410PrivateKey;
22+// END android-removed
23 import org.bouncycastle.util.Store;
24 import org.bouncycastle.x509.X509AttributeCertificate;
25 import org.bouncycastle.x509.X509Store;
26@@ -43,25 +47,33 @@
27     public static final String  DATA = CMSObjectIdentifiers.data.getId();
28
29     public static final String  DIGEST_SHA1 = OIWObjectIdentifiers.idSHA1.getId();
30-    public static final String  DIGEST_SHA224 = NISTObjectIdentifiers.id_sha224.getId();
31+    // BEGIN android-removed
32+    // public static final String  DIGEST_SHA224 = NISTObjectIdentifiers.id_sha224.getId();
33+    // END android-removed
34     public static final String  DIGEST_SHA256 = NISTObjectIdentifiers.id_sha256.getId();
35     public static final String  DIGEST_SHA384 = NISTObjectIdentifiers.id_sha384.getId();
36     public static final String  DIGEST_SHA512 = NISTObjectIdentifiers.id_sha512.getId();
37     public static final String  DIGEST_MD5 = PKCSObjectIdentifiers.md5.getId();
38-    public static final String  DIGEST_GOST3411 = CryptoProObjectIdentifiers.gostR3411.getId();
39-    public static final String  DIGEST_RIPEMD128 = TeleTrusTObjectIdentifiers.ripemd128.getId();
40-    public static final String  DIGEST_RIPEMD160 = TeleTrusTObjectIdentifiers.ripemd160.getId();
41-    public static final String  DIGEST_RIPEMD256 = TeleTrusTObjectIdentifiers.ripemd256.getId();
42+    // BEGIN android-removed
43+    // public static final String  DIGEST_GOST3411 = CryptoProObjectIdentifiers.gostR3411.getId();
44+    // public static final String  DIGEST_RIPEMD128 = TeleTrusTObjectIdentifiers.ripemd128.getId();
45+    // public static final String  DIGEST_RIPEMD160 = TeleTrusTObjectIdentifiers.ripemd160.getId();
46+    // public static final String  DIGEST_RIPEMD256 = TeleTrusTObjectIdentifiers.ripemd256.getId();
47+    // END android-removed
48
49     public static final String  ENCRYPTION_RSA = PKCSObjectIdentifiers.rsaEncryption.getId();
50     public static final String  ENCRYPTION_DSA = X9ObjectIdentifiers.id_dsa_with_sha1.getId();
51     public static final String  ENCRYPTION_ECDSA = X9ObjectIdentifiers.ecdsa_with_SHA1.getId();
52     public static final String  ENCRYPTION_RSA_PSS = PKCSObjectIdentifiers.id_RSASSA_PSS.getId();
53-    public static final String  ENCRYPTION_GOST3410 = CryptoProObjectIdentifiers.gostR3410_94.getId();
54-    public static final String  ENCRYPTION_ECGOST3410 = CryptoProObjectIdentifiers.gostR3410_2001.getId();
55+    // BEGIN android-removed
56+    // public static final String  ENCRYPTION_GOST3410 = CryptoProObjectIdentifiers.gostR3410_94.getId();
57+    // public static final String  ENCRYPTION_ECGOST3410 = CryptoProObjectIdentifiers.gostR3410_2001.getId();
58+    // END android-removed
59
60     private static final String  ENCRYPTION_ECDSA_WITH_SHA1 = X9ObjectIdentifiers.ecdsa_with_SHA1.getId();
61-    private static final String  ENCRYPTION_ECDSA_WITH_SHA224 = X9ObjectIdentifiers.ecdsa_with_SHA224.getId();
62+    // BEGIN android-removed
63+    // private static final String  ENCRYPTION_ECDSA_WITH_SHA224 = X9ObjectIdentifiers.ecdsa_with_SHA224.getId();
64+    // END android-removed
65     private static final String  ENCRYPTION_ECDSA_WITH_SHA256 = X9ObjectIdentifiers.ecdsa_with_SHA256.getId();
66     private static final String  ENCRYPTION_ECDSA_WITH_SHA384 = X9ObjectIdentifiers.ecdsa_with_SHA384.getId();
67     private static final String  ENCRYPTION_ECDSA_WITH_SHA512 = X9ObjectIdentifiers.ecdsa_with_SHA512.getId();
68@@ -74,13 +86,17 @@
69         NO_PARAMS.add(ENCRYPTION_DSA);
70         NO_PARAMS.add(ENCRYPTION_ECDSA);
71         NO_PARAMS.add(ENCRYPTION_ECDSA_WITH_SHA1);
72-        NO_PARAMS.add(ENCRYPTION_ECDSA_WITH_SHA224);
73+        // BEGIN android-removed
74+        // NO_PARAMS.add(ENCRYPTION_ECDSA_WITH_SHA224);
75+        // END android-removed
76         NO_PARAMS.add(ENCRYPTION_ECDSA_WITH_SHA256);
77         NO_PARAMS.add(ENCRYPTION_ECDSA_WITH_SHA384);
78         NO_PARAMS.add(ENCRYPTION_ECDSA_WITH_SHA512);
79
80         EC_ALGORITHMS.put(DIGEST_SHA1, ENCRYPTION_ECDSA_WITH_SHA1);
81-        EC_ALGORITHMS.put(DIGEST_SHA224, ENCRYPTION_ECDSA_WITH_SHA224);
82+        // BEGIN android-removed
83+        // EC_ALGORITHMS.put(DIGEST_SHA224, ENCRYPTION_ECDSA_WITH_SHA224);
84+        // END android-removed
85         EC_ALGORITHMS.put(DIGEST_SHA256, ENCRYPTION_ECDSA_WITH_SHA256);
86         EC_ALGORITHMS.put(DIGEST_SHA384, ENCRYPTION_ECDSA_WITH_SHA384);
87         EC_ALGORITHMS.put(DIGEST_SHA512, ENCRYPTION_ECDSA_WITH_SHA512);
88@@ -138,14 +154,16 @@
89                 throw new IllegalArgumentException("can't mix ECDSA with anything but SHA family digests");
90             }
91         }
92-        else if (key instanceof GOST3410PrivateKey || "GOST3410".equalsIgnoreCase(key.getAlgorithm()))
93-        {
94-            encOID = ENCRYPTION_GOST3410;
95-        }
96-        else if ("ECGOST3410".equalsIgnoreCase(key.getAlgorithm()))
97-        {
98-            encOID = ENCRYPTION_ECGOST3410;
99-        }
100+        // BEGIN android-removed
101+        // else if (key instanceof GOST3410PrivateKey || "GOST3410".equalsIgnoreCase(key.getAlgorithm()))
102+        // {
103+        //     encOID = ENCRYPTION_GOST3410;
104+        // }
105+        // else if ("ECGOST3410".equalsIgnoreCase(key.getAlgorithm()))
106+        // {
107+        //     encOID = ENCRYPTION_ECGOST3410;
108+        // }
109+        // END android-removed
110
111         return encOID;
112     }
113diff -Naur bcpkix-jdk15on-148.orig/org/bouncycastle/cms/CMSSignedHelper.java bcpkix-jdk15on-148/org/bouncycastle/cms/CMSSignedHelper.java
114--- bcpkix-jdk15on-148.orig/org/bouncycastle/cms/CMSSignedHelper.java	2013-02-08 17:54:18.000000000 +0000
115+++ bcpkix-jdk15on-148/org/bouncycastle/cms/CMSSignedHelper.java	2013-01-31 02:26:40.000000000 +0000
116@@ -23,7 +23,9 @@
117 import org.bouncycastle.asn1.ASN1Set;
118 import org.bouncycastle.asn1.ASN1TaggedObject;
119 import org.bouncycastle.asn1.DERNull;
120-import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
121+// BEGIN android-removed
122+// import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
123+// END android-removed
124 import org.bouncycastle.asn1.eac.EACObjectIdentifiers;
125 import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
126 import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers;
127@@ -53,31 +55,43 @@
128
129     static
130     {
131-        addEntries(NISTObjectIdentifiers.dsa_with_sha224, "SHA224", "DSA");
132+        // BEGIN android-removed
133+        // addEntries(NISTObjectIdentifiers.dsa_with_sha224, "SHA224", "DSA");
134+        // END android-removed
135         addEntries(NISTObjectIdentifiers.dsa_with_sha256, "SHA256", "DSA");
136         addEntries(NISTObjectIdentifiers.dsa_with_sha384, "SHA384", "DSA");
137         addEntries(NISTObjectIdentifiers.dsa_with_sha512, "SHA512", "DSA");
138         addEntries(OIWObjectIdentifiers.dsaWithSHA1, "SHA1", "DSA");
139-        addEntries(OIWObjectIdentifiers.md4WithRSA, "MD4", "RSA");
140-        addEntries(OIWObjectIdentifiers.md4WithRSAEncryption, "MD4", "RSA");
141+        // BEGIN android-removed
142+        // addEntries(OIWObjectIdentifiers.md4WithRSA, "MD4", "RSA");
143+        // addEntries(OIWObjectIdentifiers.md4WithRSAEncryption, "MD4", "RSA");
144+        // END android-removed
145         addEntries(OIWObjectIdentifiers.md5WithRSA, "MD5", "RSA");
146         addEntries(OIWObjectIdentifiers.sha1WithRSA, "SHA1", "RSA");
147-        addEntries(PKCSObjectIdentifiers.md2WithRSAEncryption, "MD2", "RSA");
148-        addEntries(PKCSObjectIdentifiers.md4WithRSAEncryption, "MD4", "RSA");
149+        // BEGIN android-removed
150+        // addEntries(PKCSObjectIdentifiers.md2WithRSAEncryption, "MD2", "RSA");
151+        // addEntries(PKCSObjectIdentifiers.md4WithRSAEncryption, "MD4", "RSA");
152+        // END android-removed
153         addEntries(PKCSObjectIdentifiers.md5WithRSAEncryption, "MD5", "RSA");
154         addEntries(PKCSObjectIdentifiers.sha1WithRSAEncryption, "SHA1", "RSA");
155-        addEntries(PKCSObjectIdentifiers.sha224WithRSAEncryption, "SHA224", "RSA");
156+        // BEGIN android-removed
157+        // addEntries(PKCSObjectIdentifiers.sha224WithRSAEncryption, "SHA224", "RSA");
158+        // END android-removed
159         addEntries(PKCSObjectIdentifiers.sha256WithRSAEncryption, "SHA256", "RSA");
160         addEntries(PKCSObjectIdentifiers.sha384WithRSAEncryption, "SHA384", "RSA");
161         addEntries(PKCSObjectIdentifiers.sha512WithRSAEncryption, "SHA512", "RSA");
162         addEntries(X9ObjectIdentifiers.ecdsa_with_SHA1, "SHA1", "ECDSA");
163-        addEntries(X9ObjectIdentifiers.ecdsa_with_SHA224, "SHA224", "ECDSA");
164+        // BEGIN android-removed
165+        // addEntries(X9ObjectIdentifiers.ecdsa_with_SHA224, "SHA224", "ECDSA");
166+        // END android-removed
167         addEntries(X9ObjectIdentifiers.ecdsa_with_SHA256, "SHA256", "ECDSA");
168         addEntries(X9ObjectIdentifiers.ecdsa_with_SHA384, "SHA384", "ECDSA");
169         addEntries(X9ObjectIdentifiers.ecdsa_with_SHA512, "SHA512", "ECDSA");
170         addEntries(X9ObjectIdentifiers.id_dsa_with_sha1, "SHA1", "DSA");
171         addEntries(EACObjectIdentifiers.id_TA_ECDSA_SHA_1, "SHA1", "ECDSA");
172-        addEntries(EACObjectIdentifiers.id_TA_ECDSA_SHA_224, "SHA224", "ECDSA");
173+        // BEGIN android-removed
174+        // addEntries(EACObjectIdentifiers.id_TA_ECDSA_SHA_224, "SHA224", "ECDSA");
175+        // END android-removed
176         addEntries(EACObjectIdentifiers.id_TA_ECDSA_SHA_256, "SHA256", "ECDSA");
177         addEntries(EACObjectIdentifiers.id_TA_ECDSA_SHA_384, "SHA384", "ECDSA");
178         addEntries(EACObjectIdentifiers.id_TA_ECDSA_SHA_512, "SHA512", "ECDSA");
179@@ -90,30 +104,38 @@
180         encryptionAlgs.put(PKCSObjectIdentifiers.rsaEncryption.getId(), "RSA");
181         encryptionAlgs.put(TeleTrusTObjectIdentifiers.teleTrusTRSAsignatureAlgorithm, "RSA");
182         encryptionAlgs.put(X509ObjectIdentifiers.id_ea_rsa.getId(), "RSA");
183-        encryptionAlgs.put(CMSSignedDataGenerator.ENCRYPTION_RSA_PSS, "RSAandMGF1");
184-        encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3410_94.getId(), "GOST3410");
185-        encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3410_2001.getId(), "ECGOST3410");
186-        encryptionAlgs.put("1.3.6.1.4.1.5849.1.6.2", "ECGOST3410");
187-        encryptionAlgs.put("1.3.6.1.4.1.5849.1.1.5", "GOST3410");
188-        encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001.getId(), "ECGOST3410");
189-        encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94.getId(), "GOST3410");
190-
191-        digestAlgs.put(PKCSObjectIdentifiers.md2.getId(), "MD2");
192-        digestAlgs.put(PKCSObjectIdentifiers.md4.getId(), "MD4");
193+        // BEGIN android-removed
194+        // encryptionAlgs.put(CMSSignedDataGenerator.ENCRYPTION_RSA_PSS, "RSAandMGF1");
195+        // encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3410_94.getId(), "GOST3410");
196+        // encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3410_2001.getId(), "ECGOST3410");
197+        // encryptionAlgs.put("1.3.6.1.4.1.5849.1.6.2", "ECGOST3410");
198+        // encryptionAlgs.put("1.3.6.1.4.1.5849.1.1.5", "GOST3410");
199+        // encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001.getId(), "ECGOST3410");
200+        // encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94.getId(), "GOST3410");
201+        //
202+        // digestAlgs.put(PKCSObjectIdentifiers.md2.getId(), "MD2");
203+        // digestAlgs.put(PKCSObjectIdentifiers.md4.getId(), "MD4");
204+        // END android-removed
205         digestAlgs.put(PKCSObjectIdentifiers.md5.getId(), "MD5");
206         digestAlgs.put(OIWObjectIdentifiers.idSHA1.getId(), "SHA1");
207-        digestAlgs.put(NISTObjectIdentifiers.id_sha224.getId(), "SHA224");
208+        // BEGIN android-removed
209+        // digestAlgs.put(NISTObjectIdentifiers.id_sha224.getId(), "SHA224");
210+        // END android-removed
211         digestAlgs.put(NISTObjectIdentifiers.id_sha256.getId(), "SHA256");
212         digestAlgs.put(NISTObjectIdentifiers.id_sha384.getId(), "SHA384");
213         digestAlgs.put(NISTObjectIdentifiers.id_sha512.getId(), "SHA512");
214-        digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd128.getId(), "RIPEMD128");
215-        digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd160.getId(), "RIPEMD160");
216-        digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd256.getId(), "RIPEMD256");
217-        digestAlgs.put(CryptoProObjectIdentifiers.gostR3411.getId(),  "GOST3411");
218-        digestAlgs.put("1.3.6.1.4.1.5849.1.2.1",  "GOST3411");
219+        // BEGIN android-removed
220+        // digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd128.getId(), "RIPEMD128");
221+        // digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd160.getId(), "RIPEMD160");
222+        // digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd256.getId(), "RIPEMD256");
223+        // digestAlgs.put(CryptoProObjectIdentifiers.gostR3411.getId(),  "GOST3411");
224+        // digestAlgs.put("1.3.6.1.4.1.5849.1.2.1",  "GOST3411");
225+        // END android-removed
226
227         digestAliases.put("SHA1", new String[] { "SHA-1" });
228-        digestAliases.put("SHA224", new String[] { "SHA-224" });
229+        // BEGIN android-removed
230+        // digestAliases.put("SHA224", new String[] { "SHA-224" });
231+        // END android-removed
232         digestAliases.put("SHA256", new String[] { "SHA-256" });
233         digestAliases.put("SHA384", new String[] { "SHA-384" });
234         digestAliases.put("SHA512", new String[] { "SHA-512" });
235diff -Naur bcpkix-jdk15on-148.orig/org/bouncycastle/cms/DefaultCMSSignatureAlgorithmNameGenerator.java bcpkix-jdk15on-148/org/bouncycastle/cms/DefaultCMSSignatureAlgorithmNameGenerator.java
236--- bcpkix-jdk15on-148.orig/org/bouncycastle/cms/DefaultCMSSignatureAlgorithmNameGenerator.java	2013-02-08 17:54:18.000000000 +0000
237+++ bcpkix-jdk15on-148/org/bouncycastle/cms/DefaultCMSSignatureAlgorithmNameGenerator.java	2012-09-17 23:04:47.000000000 +0000
238@@ -4,7 +4,9 @@
239 import java.util.Map;
240
241 import org.bouncycastle.asn1.ASN1ObjectIdentifier;
242-import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
243+// BEGIN android-removed
244+// import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
245+// END android-removed
246 import org.bouncycastle.asn1.eac.EACObjectIdentifiers;
247 import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
248 import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers;
249@@ -28,31 +30,43 @@
250
251     public DefaultCMSSignatureAlgorithmNameGenerator()
252     {
253-        addEntries(NISTObjectIdentifiers.dsa_with_sha224, "SHA224", "DSA");
254+        // BEGIN android-removed
255+        // addEntries(NISTObjectIdentifiers.dsa_with_sha224, "SHA224", "DSA");
256+        // END android-removed
257         addEntries(NISTObjectIdentifiers.dsa_with_sha256, "SHA256", "DSA");
258         addEntries(NISTObjectIdentifiers.dsa_with_sha384, "SHA384", "DSA");
259         addEntries(NISTObjectIdentifiers.dsa_with_sha512, "SHA512", "DSA");
260         addEntries(OIWObjectIdentifiers.dsaWithSHA1, "SHA1", "DSA");
261-        addEntries(OIWObjectIdentifiers.md4WithRSA, "MD4", "RSA");
262-        addEntries(OIWObjectIdentifiers.md4WithRSAEncryption, "MD4", "RSA");
263+        // BEGIN android-removed
264+        // addEntries(OIWObjectIdentifiers.md4WithRSA, "MD4", "RSA");
265+        // addEntries(OIWObjectIdentifiers.md4WithRSAEncryption, "MD4", "RSA");
266+        // END android-removed
267         addEntries(OIWObjectIdentifiers.md5WithRSA, "MD5", "RSA");
268         addEntries(OIWObjectIdentifiers.sha1WithRSA, "SHA1", "RSA");
269-        addEntries(PKCSObjectIdentifiers.md2WithRSAEncryption, "MD2", "RSA");
270-        addEntries(PKCSObjectIdentifiers.md4WithRSAEncryption, "MD4", "RSA");
271+        // BEGIN android-removed
272+        // addEntries(PKCSObjectIdentifiers.md2WithRSAEncryption, "MD2", "RSA");
273+        // addEntries(PKCSObjectIdentifiers.md4WithRSAEncryption, "MD4", "RSA");
274+        // END android-removed
275         addEntries(PKCSObjectIdentifiers.md5WithRSAEncryption, "MD5", "RSA");
276         addEntries(PKCSObjectIdentifiers.sha1WithRSAEncryption, "SHA1", "RSA");
277-        addEntries(PKCSObjectIdentifiers.sha224WithRSAEncryption, "SHA224", "RSA");
278+        // BEGIN android-removed
279+        // addEntries(PKCSObjectIdentifiers.sha224WithRSAEncryption, "SHA224", "RSA");
280+        // END android-removed
281         addEntries(PKCSObjectIdentifiers.sha256WithRSAEncryption, "SHA256", "RSA");
282         addEntries(PKCSObjectIdentifiers.sha384WithRSAEncryption, "SHA384", "RSA");
283         addEntries(PKCSObjectIdentifiers.sha512WithRSAEncryption, "SHA512", "RSA");
284         addEntries(X9ObjectIdentifiers.ecdsa_with_SHA1, "SHA1", "ECDSA");
285-        addEntries(X9ObjectIdentifiers.ecdsa_with_SHA224, "SHA224", "ECDSA");
286+        // BEGIN android-removed
287+        // addEntries(X9ObjectIdentifiers.ecdsa_with_SHA224, "SHA224", "ECDSA");
288+        // END android-removed
289         addEntries(X9ObjectIdentifiers.ecdsa_with_SHA256, "SHA256", "ECDSA");
290         addEntries(X9ObjectIdentifiers.ecdsa_with_SHA384, "SHA384", "ECDSA");
291         addEntries(X9ObjectIdentifiers.ecdsa_with_SHA512, "SHA512", "ECDSA");
292         addEntries(X9ObjectIdentifiers.id_dsa_with_sha1, "SHA1", "DSA");
293         addEntries(EACObjectIdentifiers.id_TA_ECDSA_SHA_1, "SHA1", "ECDSA");
294-        addEntries(EACObjectIdentifiers.id_TA_ECDSA_SHA_224, "SHA224", "ECDSA");
295+        // BEGIN android-removed
296+        // addEntries(EACObjectIdentifiers.id_TA_ECDSA_SHA_224, "SHA224", "ECDSA");
297+        // END android-removed
298         addEntries(EACObjectIdentifiers.id_TA_ECDSA_SHA_256, "SHA256", "ECDSA");
299         addEntries(EACObjectIdentifiers.id_TA_ECDSA_SHA_384, "SHA384", "ECDSA");
300         addEntries(EACObjectIdentifiers.id_TA_ECDSA_SHA_512, "SHA512", "ECDSA");
301@@ -66,26 +80,32 @@
302         encryptionAlgs.put(TeleTrusTObjectIdentifiers.teleTrusTRSAsignatureAlgorithm, "RSA");
303         encryptionAlgs.put(X509ObjectIdentifiers.id_ea_rsa, "RSA");
304         encryptionAlgs.put(PKCSObjectIdentifiers.id_RSASSA_PSS, "RSAandMGF1");
305-        encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3410_94, "GOST3410");
306-        encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3410_2001, "ECGOST3410");
307-        encryptionAlgs.put(new ASN1ObjectIdentifier("1.3.6.1.4.1.5849.1.6.2"), "ECGOST3410");
308-        encryptionAlgs.put(new ASN1ObjectIdentifier("1.3.6.1.4.1.5849.1.1.5"), "GOST3410");
309-        encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001, "ECGOST3410");
310-        encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94, "GOST3410");
311-
312-        digestAlgs.put(PKCSObjectIdentifiers.md2, "MD2");
313-        digestAlgs.put(PKCSObjectIdentifiers.md4, "MD4");
314+        // BEGIN android-removed
315+        // encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3410_94, "GOST3410");
316+        // encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3410_2001, "ECGOST3410");
317+        // encryptionAlgs.put(new ASN1ObjectIdentifier("1.3.6.1.4.1.5849.1.6.2"), "ECGOST3410");
318+        // encryptionAlgs.put(new ASN1ObjectIdentifier("1.3.6.1.4.1.5849.1.1.5"), "GOST3410");
319+        // encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001, "ECGOST3410");
320+        // encryptionAlgs.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94, "GOST3410");
321+        //
322+        // digestAlgs.put(PKCSObjectIdentifiers.md2, "MD2");
323+        // digestAlgs.put(PKCSObjectIdentifiers.md4, "MD4");
324+        // END android-removed
325         digestAlgs.put(PKCSObjectIdentifiers.md5, "MD5");
326         digestAlgs.put(OIWObjectIdentifiers.idSHA1, "SHA1");
327-        digestAlgs.put(NISTObjectIdentifiers.id_sha224, "SHA224");
328+        // BEGIN android-removed
329+        // digestAlgs.put(NISTObjectIdentifiers.id_sha224, "SHA224");
330+        // END android-removed
331         digestAlgs.put(NISTObjectIdentifiers.id_sha256, "SHA256");
332         digestAlgs.put(NISTObjectIdentifiers.id_sha384, "SHA384");
333         digestAlgs.put(NISTObjectIdentifiers.id_sha512, "SHA512");
334-        digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd128, "RIPEMD128");
335-        digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd160, "RIPEMD160");
336-        digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd256, "RIPEMD256");
337-        digestAlgs.put(CryptoProObjectIdentifiers.gostR3411,  "GOST3411");
338-        digestAlgs.put(new ASN1ObjectIdentifier("1.3.6.1.4.1.5849.1.2.1"),  "GOST3411");
339+        // BEGIN android-removed
340+        // digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd128, "RIPEMD128");
341+        // digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd160, "RIPEMD160");
342+        // digestAlgs.put(TeleTrusTObjectIdentifiers.ripemd256, "RIPEMD256");
343+        // digestAlgs.put(CryptoProObjectIdentifiers.gostR3411,  "GOST3411");
344+        // digestAlgs.put(new ASN1ObjectIdentifier("1.3.6.1.4.1.5849.1.2.1"),  "GOST3411");
345+        // END android-removed
346     }
347
348     /**
349diff -Naur bcpkix-jdk15on-148.orig/org/bouncycastle/cms/DefaultCMSSignatureEncryptionAlgorithmFinder.java bcpkix-jdk15on-148/org/bouncycastle/cms/DefaultCMSSignatureEncryptionAlgorithmFinder.java
350--- bcpkix-jdk15on-148.orig/org/bouncycastle/cms/DefaultCMSSignatureEncryptionAlgorithmFinder.java	2013-02-08 17:54:18.000000000 +0000
351+++ bcpkix-jdk15on-148/org/bouncycastle/cms/DefaultCMSSignatureEncryptionAlgorithmFinder.java	2012-09-17 23:04:47.000000000 +0000
352@@ -16,21 +16,29 @@
353
354     static
355     {
356-        RSA_PKCS1d5.add(PKCSObjectIdentifiers.md2WithRSAEncryption);
357-        RSA_PKCS1d5.add(PKCSObjectIdentifiers.md4WithRSAEncryption);
358+        // BEGIN android-removed
359+        // RSA_PKCS1d5.add(PKCSObjectIdentifiers.md2WithRSAEncryption);
360+        // RSA_PKCS1d5.add(PKCSObjectIdentifiers.md4WithRSAEncryption);
361+        // END android-removed
362         RSA_PKCS1d5.add(PKCSObjectIdentifiers.md5WithRSAEncryption);
363         RSA_PKCS1d5.add(PKCSObjectIdentifiers.sha1WithRSAEncryption);
364-        RSA_PKCS1d5.add(PKCSObjectIdentifiers.sha224WithRSAEncryption);
365+        // BEGIN android-removed
366+        // RSA_PKCS1d5.add(PKCSObjectIdentifiers.sha224WithRSAEncryption);
367+        // END android-removed
368         RSA_PKCS1d5.add(PKCSObjectIdentifiers.sha256WithRSAEncryption);
369         RSA_PKCS1d5.add(PKCSObjectIdentifiers.sha384WithRSAEncryption);
370         RSA_PKCS1d5.add(PKCSObjectIdentifiers.sha512WithRSAEncryption);
371-        RSA_PKCS1d5.add(OIWObjectIdentifiers.md4WithRSAEncryption);
372-        RSA_PKCS1d5.add(OIWObjectIdentifiers.md4WithRSA);
373+        // BEGIN android-removed
374+        // RSA_PKCS1d5.add(OIWObjectIdentifiers.md4WithRSAEncryption);
375+        // RSA_PKCS1d5.add(OIWObjectIdentifiers.md4WithRSA);
376+        // END android-removed
377         RSA_PKCS1d5.add(OIWObjectIdentifiers.md5WithRSA);
378         RSA_PKCS1d5.add(OIWObjectIdentifiers.sha1WithRSA);
379-        RSA_PKCS1d5.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128);
380-        RSA_PKCS1d5.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160);
381-        RSA_PKCS1d5.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256);
382+        // BEGIN android-removed
383+        // RSA_PKCS1d5.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128);
384+        // RSA_PKCS1d5.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160);
385+        // RSA_PKCS1d5.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256);
386+        // END android-removed
387     }
388
389     public AlgorithmIdentifier findEncryptionAlgorithm(AlgorithmIdentifier signatureAlgorithm)
390diff -Naur bcpkix-jdk15on-148.orig/org/bouncycastle/operator/DefaultDigestAlgorithmIdentifierFinder.java bcpkix-jdk15on-148/org/bouncycastle/operator/DefaultDigestAlgorithmIdentifierFinder.java
391--- bcpkix-jdk15on-148.orig/org/bouncycastle/operator/DefaultDigestAlgorithmIdentifierFinder.java	2013-02-08 17:54:18.000000000 +0000
392+++ bcpkix-jdk15on-148/org/bouncycastle/operator/DefaultDigestAlgorithmIdentifierFinder.java	2013-01-31 02:26:40.000000000 +0000
393@@ -5,7 +5,9 @@
394
395 import org.bouncycastle.asn1.ASN1ObjectIdentifier;
396 import org.bouncycastle.asn1.DERNull;
397-import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
398+// BEGIN android-removed
399+// import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
400+// END android-removed
401 import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
402 import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers;
403 import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
404@@ -25,53 +27,71 @@
405         //
406         // digests
407         //
408-        digestOids.put(OIWObjectIdentifiers.md4WithRSAEncryption, PKCSObjectIdentifiers.md4);
409-        digestOids.put(OIWObjectIdentifiers.md4WithRSA, PKCSObjectIdentifiers.md4);
410+        // BEGIN android-removed
411+        // digestOids.put(OIWObjectIdentifiers.md4WithRSAEncryption, PKCSObjectIdentifiers.md4);
412+        // digestOids.put(OIWObjectIdentifiers.md4WithRSA, PKCSObjectIdentifiers.md4);
413+        // END android-removed
414         digestOids.put(OIWObjectIdentifiers.sha1WithRSA, OIWObjectIdentifiers.idSHA1);
415
416-        digestOids.put(PKCSObjectIdentifiers.sha224WithRSAEncryption, NISTObjectIdentifiers.id_sha224);
417+        // BEGIN android-removed
418+        // digestOids.put(PKCSObjectIdentifiers.sha224WithRSAEncryption, NISTObjectIdentifiers.id_sha224);
419+        // END android-removed
420         digestOids.put(PKCSObjectIdentifiers.sha256WithRSAEncryption, NISTObjectIdentifiers.id_sha256);
421         digestOids.put(PKCSObjectIdentifiers.sha384WithRSAEncryption, NISTObjectIdentifiers.id_sha384);
422         digestOids.put(PKCSObjectIdentifiers.sha512WithRSAEncryption, NISTObjectIdentifiers.id_sha512);
423-        digestOids.put(PKCSObjectIdentifiers.md2WithRSAEncryption, PKCSObjectIdentifiers.md2);
424-        digestOids.put(PKCSObjectIdentifiers.md4WithRSAEncryption, PKCSObjectIdentifiers.md4);
425+        // BEGIN android-removed
426+        // digestOids.put(PKCSObjectIdentifiers.md2WithRSAEncryption, PKCSObjectIdentifiers.md2);
427+        // digestOids.put(PKCSObjectIdentifiers.md4WithRSAEncryption, PKCSObjectIdentifiers.md4);
428+        // END android-removed
429         digestOids.put(PKCSObjectIdentifiers.md5WithRSAEncryption, PKCSObjectIdentifiers.md5);
430         digestOids.put(PKCSObjectIdentifiers.sha1WithRSAEncryption, OIWObjectIdentifiers.idSHA1);
431
432         digestOids.put(X9ObjectIdentifiers.ecdsa_with_SHA1, OIWObjectIdentifiers.idSHA1);
433-        digestOids.put(X9ObjectIdentifiers.ecdsa_with_SHA224, NISTObjectIdentifiers.id_sha224);
434+        // BEGIN android-removed
435+        // digestOids.put(X9ObjectIdentifiers.ecdsa_with_SHA224, NISTObjectIdentifiers.id_sha224);
436+        // END android-removed
437         digestOids.put(X9ObjectIdentifiers.ecdsa_with_SHA256, NISTObjectIdentifiers.id_sha256);
438         digestOids.put(X9ObjectIdentifiers.ecdsa_with_SHA384, NISTObjectIdentifiers.id_sha384);
439         digestOids.put(X9ObjectIdentifiers.ecdsa_with_SHA512, NISTObjectIdentifiers.id_sha512);
440         digestOids.put(X9ObjectIdentifiers.id_dsa_with_sha1, OIWObjectIdentifiers.idSHA1);
441
442-        digestOids.put(NISTObjectIdentifiers.dsa_with_sha224, NISTObjectIdentifiers.id_sha224);
443+        // BEGIN android-removed
444+        // digestOids.put(NISTObjectIdentifiers.dsa_with_sha224, NISTObjectIdentifiers.id_sha224);
445+        // END android-removed
446         digestOids.put(NISTObjectIdentifiers.dsa_with_sha256, NISTObjectIdentifiers.id_sha256);
447         digestOids.put(NISTObjectIdentifiers.dsa_with_sha384, NISTObjectIdentifiers.id_sha384);
448         digestOids.put(NISTObjectIdentifiers.dsa_with_sha512, NISTObjectIdentifiers.id_sha512);
449
450-        digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128, TeleTrusTObjectIdentifiers.ripemd128);
451-        digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160, TeleTrusTObjectIdentifiers.ripemd160);
452-        digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256, TeleTrusTObjectIdentifiers.ripemd256);
453-
454-        digestOids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94, CryptoProObjectIdentifiers.gostR3411);
455-        digestOids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001, CryptoProObjectIdentifiers.gostR3411);
456+        // BEGIN android-removed
457+        // digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128, TeleTrusTObjectIdentifiers.ripemd128);
458+        // digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160, TeleTrusTObjectIdentifiers.ripemd160);
459+        // digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256, TeleTrusTObjectIdentifiers.ripemd256);
460+        //
461+        // digestOids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94, CryptoProObjectIdentifiers.gostR3411);
462+        // digestOids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001, CryptoProObjectIdentifiers.gostR3411);
463+        // END android-removed
464
465         digestNameToOids.put("SHA-1", OIWObjectIdentifiers.idSHA1);
466-        digestNameToOids.put("SHA-224", NISTObjectIdentifiers.id_sha224);
467+        // BEGIN android-removed
468+        // digestNameToOids.put("SHA-224", NISTObjectIdentifiers.id_sha224);
469+        // END android-removed
470         digestNameToOids.put("SHA-256", NISTObjectIdentifiers.id_sha256);
471         digestNameToOids.put("SHA-384", NISTObjectIdentifiers.id_sha384);
472         digestNameToOids.put("SHA-512", NISTObjectIdentifiers.id_sha512);
473
474-        digestNameToOids.put("GOST3411", CryptoProObjectIdentifiers.gostR3411);
475-
476-        digestNameToOids.put("MD2", PKCSObjectIdentifiers.md2);
477-        digestNameToOids.put("MD4", PKCSObjectIdentifiers.md4);
478+        // BEGIN android-removed
479+        // digestNameToOids.put("GOST3411", CryptoProObjectIdentifiers.gostR3411);
480+        //
481+        // digestNameToOids.put("MD2", PKCSObjectIdentifiers.md2);
482+        // digestNameToOids.put("MD4", PKCSObjectIdentifiers.md4);
483+        // END android-removed
484         digestNameToOids.put("MD5", PKCSObjectIdentifiers.md5);
485
486-        digestNameToOids.put("RIPEMD128", TeleTrusTObjectIdentifiers.ripemd128);
487-        digestNameToOids.put("RIPEMD160", TeleTrusTObjectIdentifiers.ripemd160);
488-        digestNameToOids.put("RIPEMD256", TeleTrusTObjectIdentifiers.ripemd256);
489+        // BEGIN android-removed
490+        // digestNameToOids.put("RIPEMD128", TeleTrusTObjectIdentifiers.ripemd128);
491+        // digestNameToOids.put("RIPEMD160", TeleTrusTObjectIdentifiers.ripemd160);
492+        // digestNameToOids.put("RIPEMD256", TeleTrusTObjectIdentifiers.ripemd256);
493+        // END android-removed
494     }
495
496     public AlgorithmIdentifier find(AlgorithmIdentifier sigAlgId)
497diff -Naur bcpkix-jdk15on-148.orig/org/bouncycastle/operator/DefaultSignatureAlgorithmIdentifierFinder.java bcpkix-jdk15on-148/org/bouncycastle/operator/DefaultSignatureAlgorithmIdentifierFinder.java
498--- bcpkix-jdk15on-148.orig/org/bouncycastle/operator/DefaultSignatureAlgorithmIdentifierFinder.java	2013-02-08 17:54:18.000000000 +0000
499+++ bcpkix-jdk15on-148/org/bouncycastle/operator/DefaultSignatureAlgorithmIdentifierFinder.java	2013-01-31 02:26:40.000000000 +0000
500@@ -9,7 +9,9 @@
501 import org.bouncycastle.asn1.ASN1Integer;
502 import org.bouncycastle.asn1.ASN1ObjectIdentifier;
503 import org.bouncycastle.asn1.DERNull;
504-import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
505+// BEGIN android-removed
506+// import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
507+// END android-removed
508 import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
509 import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers;
510 import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
511@@ -32,19 +34,25 @@
512     private static final ASN1ObjectIdentifier ENCRYPTION_DSA = X9ObjectIdentifiers.id_dsa_with_sha1;
513     private static final ASN1ObjectIdentifier ENCRYPTION_ECDSA = X9ObjectIdentifiers.ecdsa_with_SHA1;
514     private static final ASN1ObjectIdentifier ENCRYPTION_RSA_PSS = PKCSObjectIdentifiers.id_RSASSA_PSS;
515-    private static final ASN1ObjectIdentifier ENCRYPTION_GOST3410 = CryptoProObjectIdentifiers.gostR3410_94;
516-    private static final ASN1ObjectIdentifier ENCRYPTION_ECGOST3410 = CryptoProObjectIdentifiers.gostR3410_2001;
517+    // BEGIN android-removed
518+    // private static final ASN1ObjectIdentifier ENCRYPTION_GOST3410 = CryptoProObjectIdentifiers.gostR3410_94;
519+    // private static final ASN1ObjectIdentifier ENCRYPTION_ECGOST3410 = CryptoProObjectIdentifiers.gostR3410_2001;
520+    // END android-removed
521
522     static
523     {
524-        algorithms.put("MD2WITHRSAENCRYPTION", PKCSObjectIdentifiers.md2WithRSAEncryption);
525-        algorithms.put("MD2WITHRSA", PKCSObjectIdentifiers.md2WithRSAEncryption);
526+        // BEGIN android-removed
527+        // algorithms.put("MD2WITHRSAENCRYPTION", PKCSObjectIdentifiers.md2WithRSAEncryption);
528+        // algorithms.put("MD2WITHRSA", PKCSObjectIdentifiers.md2WithRSAEncryption);
529+        // END android-removed
530         algorithms.put("MD5WITHRSAENCRYPTION", PKCSObjectIdentifiers.md5WithRSAEncryption);
531         algorithms.put("MD5WITHRSA", PKCSObjectIdentifiers.md5WithRSAEncryption);
532         algorithms.put("SHA1WITHRSAENCRYPTION", PKCSObjectIdentifiers.sha1WithRSAEncryption);
533         algorithms.put("SHA1WITHRSA", PKCSObjectIdentifiers.sha1WithRSAEncryption);
534-        algorithms.put("SHA224WITHRSAENCRYPTION", PKCSObjectIdentifiers.sha224WithRSAEncryption);
535-        algorithms.put("SHA224WITHRSA", PKCSObjectIdentifiers.sha224WithRSAEncryption);
536+        // BEGIN android-removed
537+        // algorithms.put("SHA224WITHRSAENCRYPTION", PKCSObjectIdentifiers.sha224WithRSAEncryption);
538+        // algorithms.put("SHA224WITHRSA", PKCSObjectIdentifiers.sha224WithRSAEncryption);
539+        // END android-removed
540         algorithms.put("SHA256WITHRSAENCRYPTION", PKCSObjectIdentifiers.sha256WithRSAEncryption);
541         algorithms.put("SHA256WITHRSA", PKCSObjectIdentifiers.sha256WithRSAEncryption);
542         algorithms.put("SHA384WITHRSAENCRYPTION", PKCSObjectIdentifiers.sha384WithRSAEncryption);
543@@ -52,45 +60,59 @@
544         algorithms.put("SHA512WITHRSAENCRYPTION", PKCSObjectIdentifiers.sha512WithRSAEncryption);
545         algorithms.put("SHA512WITHRSA", PKCSObjectIdentifiers.sha512WithRSAEncryption);
546         algorithms.put("SHA1WITHRSAANDMGF1", PKCSObjectIdentifiers.id_RSASSA_PSS);
547-        algorithms.put("SHA224WITHRSAANDMGF1", PKCSObjectIdentifiers.id_RSASSA_PSS);
548+        // BEGIN android-removed
549+        // algorithms.put("SHA224WITHRSAANDMGF1", PKCSObjectIdentifiers.id_RSASSA_PSS);
550+        // END android-removed
551         algorithms.put("SHA256WITHRSAANDMGF1", PKCSObjectIdentifiers.id_RSASSA_PSS);
552         algorithms.put("SHA384WITHRSAANDMGF1", PKCSObjectIdentifiers.id_RSASSA_PSS);
553         algorithms.put("SHA512WITHRSAANDMGF1", PKCSObjectIdentifiers.id_RSASSA_PSS);
554-        algorithms.put("RIPEMD160WITHRSAENCRYPTION", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160);
555-        algorithms.put("RIPEMD160WITHRSA", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160);
556-        algorithms.put("RIPEMD128WITHRSAENCRYPTION", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128);
557-        algorithms.put("RIPEMD128WITHRSA", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128);
558-        algorithms.put("RIPEMD256WITHRSAENCRYPTION", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256);
559-        algorithms.put("RIPEMD256WITHRSA", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256);
560+        // BEGIN android-removed
561+        // algorithms.put("RIPEMD160WITHRSAENCRYPTION", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160);
562+        // algorithms.put("RIPEMD160WITHRSA", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160);
563+        // algorithms.put("RIPEMD128WITHRSAENCRYPTION", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128);
564+        // algorithms.put("RIPEMD128WITHRSA", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128);
565+        // algorithms.put("RIPEMD256WITHRSAENCRYPTION", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256);
566+        // algorithms.put("RIPEMD256WITHRSA", TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256);
567+        // END android-removed
568         algorithms.put("SHA1WITHDSA", X9ObjectIdentifiers.id_dsa_with_sha1);
569         algorithms.put("DSAWITHSHA1", X9ObjectIdentifiers.id_dsa_with_sha1);
570-        algorithms.put("SHA224WITHDSA", NISTObjectIdentifiers.dsa_with_sha224);
571+        // BEGIN android-removed
572+        // algorithms.put("SHA224WITHDSA", NISTObjectIdentifiers.dsa_with_sha224);
573+        // END android-removed
574         algorithms.put("SHA256WITHDSA", NISTObjectIdentifiers.dsa_with_sha256);
575         algorithms.put("SHA384WITHDSA", NISTObjectIdentifiers.dsa_with_sha384);
576         algorithms.put("SHA512WITHDSA", NISTObjectIdentifiers.dsa_with_sha512);
577         algorithms.put("SHA1WITHECDSA", X9ObjectIdentifiers.ecdsa_with_SHA1);
578         algorithms.put("ECDSAWITHSHA1", X9ObjectIdentifiers.ecdsa_with_SHA1);
579-        algorithms.put("SHA224WITHECDSA", X9ObjectIdentifiers.ecdsa_with_SHA224);
580+        // BEGIN android-removed
581+        // algorithms.put("SHA224WITHECDSA", X9ObjectIdentifiers.ecdsa_with_SHA224);
582+        // END android-removed
583         algorithms.put("SHA256WITHECDSA", X9ObjectIdentifiers.ecdsa_with_SHA256);
584         algorithms.put("SHA384WITHECDSA", X9ObjectIdentifiers.ecdsa_with_SHA384);
585         algorithms.put("SHA512WITHECDSA", X9ObjectIdentifiers.ecdsa_with_SHA512);
586-        algorithms.put("GOST3411WITHGOST3410", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94);
587-        algorithms.put("GOST3411WITHGOST3410-94", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94);
588-        algorithms.put("GOST3411WITHECGOST3410", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
589-        algorithms.put("GOST3411WITHECGOST3410-2001", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
590-        algorithms.put("GOST3411WITHGOST3410-2001", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
591+        // BEGIN android-removed
592+        // algorithms.put("GOST3411WITHGOST3410", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94);
593+        // algorithms.put("GOST3411WITHGOST3410-94", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94);
594+        // algorithms.put("GOST3411WITHECGOST3410", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
595+        // algorithms.put("GOST3411WITHECGOST3410-2001", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
596+        // algorithms.put("GOST3411WITHGOST3410-2001", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
597+        // END android-removed
598
599         //
600         // According to RFC 3279, the ASN.1 encoding SHALL (id-dsa-with-sha1) or MUST (ecdsa-with-SHA*) omit the parameters field.
601         // The parameters field SHALL be NULL for RSA based signature algorithms.
602         //
603         noParams.add(X9ObjectIdentifiers.ecdsa_with_SHA1);
604-        noParams.add(X9ObjectIdentifiers.ecdsa_with_SHA224);
605+        // BEGIN android-removed
606+        // noParams.add(X9ObjectIdentifiers.ecdsa_with_SHA224);
607+        // END android-removed
608         noParams.add(X9ObjectIdentifiers.ecdsa_with_SHA256);
609         noParams.add(X9ObjectIdentifiers.ecdsa_with_SHA384);
610         noParams.add(X9ObjectIdentifiers.ecdsa_with_SHA512);
611         noParams.add(X9ObjectIdentifiers.id_dsa_with_sha1);
612-        noParams.add(NISTObjectIdentifiers.dsa_with_sha224);
613+        // BEGIN android-removed
614+        // noParams.add(NISTObjectIdentifiers.dsa_with_sha224);
615+        // END android-removed
616         noParams.add(NISTObjectIdentifiers.dsa_with_sha256);
617         noParams.add(NISTObjectIdentifiers.dsa_with_sha384);
618         noParams.add(NISTObjectIdentifiers.dsa_with_sha512);
619@@ -98,20 +120,26 @@
620         //
621         // RFC 4491
622         //
623-        noParams.add(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94);
624-        noParams.add(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
625+        // BEGIN android-removed
626+        // noParams.add(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94);
627+        // noParams.add(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
628+        // END android-removed
629
630         //
631         // PKCS 1.5 encrypted  algorithms
632         //
633         pkcs15RsaEncryption.add(PKCSObjectIdentifiers.sha1WithRSAEncryption);
634-        pkcs15RsaEncryption.add(PKCSObjectIdentifiers.sha224WithRSAEncryption);
635+        // BEGIN android-removed
636+        // pkcs15RsaEncryption.add(PKCSObjectIdentifiers.sha224WithRSAEncryption);
637+        // END android-removed
638         pkcs15RsaEncryption.add(PKCSObjectIdentifiers.sha256WithRSAEncryption);
639         pkcs15RsaEncryption.add(PKCSObjectIdentifiers.sha384WithRSAEncryption);
640         pkcs15RsaEncryption.add(PKCSObjectIdentifiers.sha512WithRSAEncryption);
641-        pkcs15RsaEncryption.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128);
642-        pkcs15RsaEncryption.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160);
643-        pkcs15RsaEncryption.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256);
644+        // BEGIN android-removed
645+        // pkcs15RsaEncryption.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128);
646+        // pkcs15RsaEncryption.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160);
647+        // pkcs15RsaEncryption.add(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256);
648+        // END android-removed
649
650         //
651         // explicit params
652@@ -119,8 +147,10 @@
653         AlgorithmIdentifier sha1AlgId = new AlgorithmIdentifier(OIWObjectIdentifiers.idSHA1, DERNull.INSTANCE);
654         params.put("SHA1WITHRSAANDMGF1", createPSSParams(sha1AlgId, 20));
655
656-        AlgorithmIdentifier sha224AlgId = new AlgorithmIdentifier(NISTObjectIdentifiers.id_sha224, DERNull.INSTANCE);
657-        params.put("SHA224WITHRSAANDMGF1", createPSSParams(sha224AlgId, 28));
658+        // BEGIN android-removed
659+        // AlgorithmIdentifier sha224AlgId = new AlgorithmIdentifier(NISTObjectIdentifiers.id_sha224, DERNull.INSTANCE);
660+        // params.put("SHA224WITHRSAANDMGF1", createPSSParams(sha224AlgId, 28));
661+        // END android-removed
662
663         AlgorithmIdentifier sha256AlgId = new AlgorithmIdentifier(NISTObjectIdentifiers.id_sha256, DERNull.INSTANCE);
664         params.put("SHA256WITHRSAANDMGF1", createPSSParams(sha256AlgId, 32));
665@@ -134,19 +164,25 @@
666         //
667         // digests
668         //
669-        digestOids.put(PKCSObjectIdentifiers.sha224WithRSAEncryption, NISTObjectIdentifiers.id_sha224);
670+        // BEGIN android-removed
671+        // digestOids.put(PKCSObjectIdentifiers.sha224WithRSAEncryption, NISTObjectIdentifiers.id_sha224);
672+        // END android-removed
673         digestOids.put(PKCSObjectIdentifiers.sha256WithRSAEncryption, NISTObjectIdentifiers.id_sha256);
674         digestOids.put(PKCSObjectIdentifiers.sha384WithRSAEncryption, NISTObjectIdentifiers.id_sha384);
675         digestOids.put(PKCSObjectIdentifiers.sha512WithRSAEncryption, NISTObjectIdentifiers.id_sha512);
676-        digestOids.put(PKCSObjectIdentifiers.md2WithRSAEncryption, PKCSObjectIdentifiers.md2);
677-        digestOids.put(PKCSObjectIdentifiers.md4WithRSAEncryption, PKCSObjectIdentifiers.md4);
678+        // BEGIN android-removed
679+        // digestOids.put(PKCSObjectIdentifiers.md2WithRSAEncryption, PKCSObjectIdentifiers.md2);
680+        // digestOids.put(PKCSObjectIdentifiers.md4WithRSAEncryption, PKCSObjectIdentifiers.md4);
681+        // END android-removed
682         digestOids.put(PKCSObjectIdentifiers.md5WithRSAEncryption, PKCSObjectIdentifiers.md5);
683         digestOids.put(PKCSObjectIdentifiers.sha1WithRSAEncryption, OIWObjectIdentifiers.idSHA1);
684-        digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128, TeleTrusTObjectIdentifiers.ripemd128);
685-        digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160, TeleTrusTObjectIdentifiers.ripemd160);
686-        digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256, TeleTrusTObjectIdentifiers.ripemd256);
687-        digestOids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94, CryptoProObjectIdentifiers.gostR3411);
688-        digestOids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001, CryptoProObjectIdentifiers.gostR3411);
689+        // BEGIN android-removed
690+        // digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd128, TeleTrusTObjectIdentifiers.ripemd128);
691+        // digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd160, TeleTrusTObjectIdentifiers.ripemd160);
692+        // digestOids.put(TeleTrusTObjectIdentifiers.rsaSignatureWithripemd256, TeleTrusTObjectIdentifiers.ripemd256);
693+        // digestOids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94, CryptoProObjectIdentifiers.gostR3411);
694+        // digestOids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001, CryptoProObjectIdentifiers.gostR3411);
695+        // END android-removed
696     }
697
698     private static AlgorithmIdentifier generate(String signatureAlgorithm)
699diff -Naur bcpkix-jdk15on-148.orig/org/bouncycastle/operator/bc/BcUtil.java bcpkix-jdk15on-148/org/bouncycastle/operator/bc/BcUtil.java
700--- bcpkix-jdk15on-148.orig/org/bouncycastle/operator/bc/BcUtil.java	2013-02-08 17:54:18.000000000 +0000
701+++ bcpkix-jdk15on-148/org/bouncycastle/operator/bc/BcUtil.java	2012-09-17 23:04:47.000000000 +0000
702@@ -1,21 +1,29 @@
703 package org.bouncycastle.operator.bc;
704
705-import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
706+// BEGIN android-removed
707+// import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
708+// END android-removed
709 import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
710 import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers;
711 import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
712 import org.bouncycastle.asn1.teletrust.TeleTrusTObjectIdentifiers;
713 import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
714 import org.bouncycastle.crypto.Digest;
715-import org.bouncycastle.crypto.digests.GOST3411Digest;
716-import org.bouncycastle.crypto.digests.MD2Digest;
717-import org.bouncycastle.crypto.digests.MD4Digest;
718+// BEGIN android-removed
719+// import org.bouncycastle.crypto.digests.GOST3411Digest;
720+// import org.bouncycastle.crypto.digests.MD2Digest;
721+// import org.bouncycastle.crypto.digests.MD4Digest;
722+// END android-removed
723 import org.bouncycastle.crypto.digests.MD5Digest;
724-import org.bouncycastle.crypto.digests.RIPEMD128Digest;
725-import org.bouncycastle.crypto.digests.RIPEMD160Digest;
726-import org.bouncycastle.crypto.digests.RIPEMD256Digest;
727+// BEGIN android-removed
728+// import org.bouncycastle.crypto.digests.RIPEMD128Digest;
729+// import org.bouncycastle.crypto.digests.RIPEMD160Digest;
730+// import org.bouncycastle.crypto.digests.RIPEMD256Digest;
731+// END android-removed
732 import org.bouncycastle.crypto.digests.SHA1Digest;
733-import org.bouncycastle.crypto.digests.SHA224Digest;
734+// BEGIN android-removed
735+// import org.bouncycastle.crypto.digests.SHA224Digest;
736+// END android-removed
737 import org.bouncycastle.crypto.digests.SHA256Digest;
738 import org.bouncycastle.crypto.digests.SHA384Digest;
739 import org.bouncycastle.crypto.digests.SHA512Digest;
740@@ -32,10 +40,12 @@
741         {
742             dig = new SHA1Digest();
743         }
744-        else if (digAlg.getAlgorithm().equals(NISTObjectIdentifiers.id_sha224))
745-        {
746-            dig = new SHA224Digest();
747-        }
748+        // BEGIN android-removed
749+        // else if (digAlg.getAlgorithm().equals(NISTObjectIdentifiers.id_sha224))
750+        // {
751+        //     dig = new SHA224Digest();
752+        // }
753+        // END android-removed
754         else if (digAlg.getAlgorithm().equals(NISTObjectIdentifiers.id_sha256))
755         {
756             dig = new SHA256Digest();
757@@ -52,30 +62,32 @@
758         {
759             dig = new MD5Digest();
760         }
761-        else if (digAlg.getAlgorithm().equals(PKCSObjectIdentifiers.md4))
762-        {
763-            dig = new MD4Digest();
764-        }
765-        else if (digAlg.getAlgorithm().equals(PKCSObjectIdentifiers.md2))
766-        {
767-            dig = new MD2Digest();
768-        }
769-        else if (digAlg.getAlgorithm().equals(CryptoProObjectIdentifiers.gostR3411))
770-        {
771-            dig = new GOST3411Digest();
772-        }
773-        else if (digAlg.getAlgorithm().equals(TeleTrusTObjectIdentifiers.ripemd128))
774-        {
775-            dig = new RIPEMD128Digest();
776-        }
777-        else if (digAlg.getAlgorithm().equals(TeleTrusTObjectIdentifiers.ripemd160))
778-        {
779-            dig = new RIPEMD160Digest();
780-        }
781-        else if (digAlg.getAlgorithm().equals(TeleTrusTObjectIdentifiers.ripemd256))
782-        {
783-            dig = new RIPEMD256Digest();
784-        }
785+        // BEGIN android-removed
786+        // else if (digAlg.getAlgorithm().equals(PKCSObjectIdentifiers.md4))
787+        // {
788+        //     dig = new MD4Digest();
789+        // }
790+        // else if (digAlg.getAlgorithm().equals(PKCSObjectIdentifiers.md2))
791+        // {
792+        //     dig = new MD2Digest();
793+        // }
794+        // else if (digAlg.getAlgorithm().equals(CryptoProObjectIdentifiers.gostR3411))
795+        // {
796+        //     dig = new GOST3411Digest();
797+        // }
798+        // else if (digAlg.getAlgorithm().equals(TeleTrusTObjectIdentifiers.ripemd128))
799+        // {
800+        //     dig = new RIPEMD128Digest();
801+        // }
802+        // else if (digAlg.getAlgorithm().equals(TeleTrusTObjectIdentifiers.ripemd160))
803+        // {
804+        //     dig = new RIPEMD160Digest();
805+        // }
806+        // else if (digAlg.getAlgorithm().equals(TeleTrusTObjectIdentifiers.ripemd256))
807+        // {
808+        //     dig = new RIPEMD256Digest();
809+        // }
810+        // END android-removed
811         else
812         {
813             throw new OperatorCreationException("cannot recognise digest");
814diff -Naur bcpkix-jdk15on-148.orig/org/bouncycastle/operator/jcajce/OperatorHelper.java bcpkix-jdk15on-148/org/bouncycastle/operator/jcajce/OperatorHelper.java
815--- bcpkix-jdk15on-148.orig/org/bouncycastle/operator/jcajce/OperatorHelper.java	2013-02-08 17:54:18.000000000 +0000
816+++ bcpkix-jdk15on-148/org/bouncycastle/operator/jcajce/OperatorHelper.java	2013-01-31 02:26:40.000000000 +0000
817@@ -20,7 +20,9 @@
818 import org.bouncycastle.asn1.ASN1Encodable;
819 import org.bouncycastle.asn1.ASN1ObjectIdentifier;
820 import org.bouncycastle.asn1.DERNull;
821-import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
822+// BEGIN android-removed
823+// import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
824+// END android-removed
825 import org.bouncycastle.asn1.kisa.KISAObjectIdentifiers;
826 import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
827 import org.bouncycastle.asn1.ntt.NTTObjectIdentifiers;
828@@ -47,24 +49,34 @@
829         // reverse mappings
830         //
831         oids.put(new ASN1ObjectIdentifier("1.2.840.113549.1.1.5"), "SHA1WITHRSA");
832-        oids.put(PKCSObjectIdentifiers.sha224WithRSAEncryption, "SHA224WITHRSA");
833+        // BEGIN android-removed
834+        // oids.put(PKCSObjectIdentifiers.sha224WithRSAEncryption, "SHA224WITHRSA");
835+        // END android-removed
836         oids.put(PKCSObjectIdentifiers.sha256WithRSAEncryption, "SHA256WITHRSA");
837         oids.put(PKCSObjectIdentifiers.sha384WithRSAEncryption, "SHA384WITHRSA");
838         oids.put(PKCSObjectIdentifiers.sha512WithRSAEncryption, "SHA512WITHRSA");
839-        oids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94, "GOST3411WITHGOST3410");
840-        oids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001, "GOST3411WITHECGOST3410");
841+        // BEGIN android-removed
842+        // oids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94, "GOST3411WITHGOST3410");
843+        // oids.put(CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001, "GOST3411WITHECGOST3410");
844+        // END android-removed
845
846         oids.put(new ASN1ObjectIdentifier("1.2.840.113549.1.1.4"), "MD5WITHRSA");
847-        oids.put(new ASN1ObjectIdentifier("1.2.840.113549.1.1.2"), "MD2WITHRSA");
848+        // BEGIN android-removed
849+        // oids.put(new ASN1ObjectIdentifier("1.2.840.113549.1.1.2"), "MD2WITHRSA");
850+        // END android-removed
851         oids.put(new ASN1ObjectIdentifier("1.2.840.10040.4.3"), "SHA1WITHDSA");
852         oids.put(X9ObjectIdentifiers.ecdsa_with_SHA1, "SHA1WITHECDSA");
853-        oids.put(X9ObjectIdentifiers.ecdsa_with_SHA224, "SHA224WITHECDSA");
854+        // BEGIN android-removed
855+        // oids.put(X9ObjectIdentifiers.ecdsa_with_SHA224, "SHA224WITHECDSA");
856+        // END android-removed
857         oids.put(X9ObjectIdentifiers.ecdsa_with_SHA256, "SHA256WITHECDSA");
858         oids.put(X9ObjectIdentifiers.ecdsa_with_SHA384, "SHA384WITHECDSA");
859         oids.put(X9ObjectIdentifiers.ecdsa_with_SHA512, "SHA512WITHECDSA");
860         oids.put(OIWObjectIdentifiers.sha1WithRSA, "SHA1WITHRSA");
861         oids.put(OIWObjectIdentifiers.dsaWithSHA1, "SHA1WITHDSA");
862-        oids.put(NISTObjectIdentifiers.dsa_with_sha224, "SHA224WITHDSA");
863+        // BEGIN android-removed
864+        // oids.put(NISTObjectIdentifiers.dsa_with_sha224, "SHA224WITHDSA");
865+        // END android-removed
866         oids.put(NISTObjectIdentifiers.dsa_with_sha256, "SHA256WITHDSA");
867
868         oids.put(OIWObjectIdentifiers.idSHA1, "SHA-1");
869@@ -305,10 +317,12 @@
870         {
871             return "SHA1";
872         }
873-        else if (NISTObjectIdentifiers.id_sha224.equals(digestAlgOID))
874-        {
875-            return "SHA224";
876-        }
877+        // BEGIN android-removed
878+        // else if (NISTObjectIdentifiers.id_sha224.equals(digestAlgOID))
879+        // {
880+        //     return "SHA224";
881+        // }
882+        // END android-removed
883         else if (NISTObjectIdentifiers.id_sha256.equals(digestAlgOID))
884         {
885             return "SHA256";
886@@ -321,22 +335,24 @@
887         {
888             return "SHA512";
889         }
890-        else if (TeleTrusTObjectIdentifiers.ripemd128.equals(digestAlgOID))
891-        {
892-            return "RIPEMD128";
893-        }
894-        else if (TeleTrusTObjectIdentifiers.ripemd160.equals(digestAlgOID))
895-        {
896-            return "RIPEMD160";
897-        }
898-        else if (TeleTrusTObjectIdentifiers.ripemd256.equals(digestAlgOID))
899-        {
900-            return "RIPEMD256";
901-        }
902-        else if (CryptoProObjectIdentifiers.gostR3411.equals(digestAlgOID))
903-        {
904-            return "GOST3411";
905-        }
906+        // BEGIN android-removed
907+        // else if (TeleTrusTObjectIdentifiers.ripemd128.equals(digestAlgOID))
908+        // {
909+        //     return "RIPEMD128";
910+        // }
911+        // else if (TeleTrusTObjectIdentifiers.ripemd160.equals(digestAlgOID))
912+        // {
913+        //     return "RIPEMD160";
914+        // }
915+        // else if (TeleTrusTObjectIdentifiers.ripemd256.equals(digestAlgOID))
916+        // {
917+        //     return "RIPEMD256";
918+        // }
919+        // else if (CryptoProObjectIdentifiers.gostR3411.equals(digestAlgOID))
920+        // {
921+        //     return "GOST3411";
922+        // }
923+        // END android-removed
924         else
925         {
926             return digestAlgOID.getId();
927