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