diff options
author | Brian Carlstrom <bdc@google.com> | 2012-09-04 23:01:09 -0700 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2012-09-12 10:05:17 -0700 |
commit | fe8b870db2b374e21c69c2ff0050e6a34e0d8d94 (patch) | |
tree | bf11241b9e9315e77693249e29dbabcbfd47a95a | |
parent | f0993272562ebc6e8d77024b985c45fae9f92ed4 (diff) | |
download | libcore-fe8b870db2b374e21c69c2ff0050e6a34e0d8d94.zip libcore-fe8b870db2b374e21c69c2ff0050e6a34e0d8d94.tar.gz libcore-fe8b870db2b374e21c69c2ff0050e6a34e0d8d94.tar.bz2 |
Tracking upgrade to bouncycastle 1.47
Change-Id: Ie1f2ae92638e81ccd7e4ec2459199e6eecdac75f
3 files changed, 25 insertions, 29 deletions
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLProvider.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLProvider.java index e1d0fb0..fd9be17 100644 --- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLProvider.java +++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLProvider.java @@ -80,26 +80,26 @@ public final class OpenSSLProvider extends Provider { put("Alg.Alias.Signature.1.2.840.113549.2.5with1.2.840.113549.1.1.1", "MD5WithRSAEncryption"); - put("Signature.SHA1WithRSAEncryption", OpenSSLSignature.SHA1RSA.class.getName()); - put("Alg.Alias.Signature.SHA1WithRSA", "SHA1WithRSAEncryption"); - put("Alg.Alias.Signature.SHA1/RSA", "SHA1WithRSAEncryption"); - put("Alg.Alias.Signature.SHA-1/RSA", "SHA1WithRSAEncryption"); - put("Alg.Alias.Signature.1.2.840.113549.1.1.5", "SHA1WithRSAEncryption"); - put("Alg.Alias.Signature.1.3.14.3.2.26with1.2.840.113549.1.1.1", "SHA1WithRSAEncryption"); - put("Alg.Alias.Signature.1.3.14.3.2.26with1.2.840.113549.1.1.5", "SHA1WithRSAEncryption"); - put("Alg.Alias.Signature.1.3.14.3.2.29", "SHA1WithRSAEncryption"); - - put("Signature.SHA256WithRSAEncryption", OpenSSLSignature.SHA256RSA.class.getName()); - put("Alg.Alias.Signature.SHA256WithRSA", "SHA256WithRSAEncryption"); - put("Alg.Alias.Signature.1.2.840.113549.1.1.11", "SHA256WithRSAEncryption"); - - put("Signature.SHA384WithRSAEncryption", OpenSSLSignature.SHA384RSA.class.getName()); - put("Alg.Alias.Signature.SHA384WithRSA", "SHA384WithRSAEncryption"); - put("Alg.Alias.Signature.1.2.840.113549.1.1.12", "SHA384WithRSAEncryption"); - - put("Signature.SHA512WithRSAEncryption", OpenSSLSignature.SHA512RSA.class.getName()); - put("Alg.Alias.Signature.SHA512WithRSA", "SHA512WithRSAEncryption"); - put("Alg.Alias.Signature.1.2.840.113549.1.1.13", "SHA512WithRSAEncryption"); + put("Signature.SHA1WithRSA", OpenSSLSignature.SHA1RSA.class.getName()); + put("Alg.Alias.Signature.SHA1WithRSA", "SHA1WithRSA"); + put("Alg.Alias.Signature.SHA1/RSA", "SHA1WithRSA"); + put("Alg.Alias.Signature.SHA-1/RSA", "SHA1WithRSA"); + put("Alg.Alias.Signature.1.2.840.113549.1.1.5", "SHA1WithRSA"); + put("Alg.Alias.Signature.1.3.14.3.2.26with1.2.840.113549.1.1.1", "SHA1WithRSA"); + put("Alg.Alias.Signature.1.3.14.3.2.26with1.2.840.113549.1.1.5", "SHA1WithRSA"); + put("Alg.Alias.Signature.1.3.14.3.2.29", "SHA1WithRSA"); + + put("Signature.SHA256WithRSA", OpenSSLSignature.SHA256RSA.class.getName()); + put("Alg.Alias.Signature.SHA256WithRSAEncryption", "SHA256WithRSA"); + put("Alg.Alias.Signature.1.2.840.113549.1.1.11", "SHA256WithRSA"); + + put("Signature.SHA384WithRSA", OpenSSLSignature.SHA384RSA.class.getName()); + put("Alg.Alias.Signature.SHA384WithRSAEncryption", "SHA384WithRSA"); + put("Alg.Alias.Signature.1.2.840.113549.1.1.12", "SHA384WithRSA"); + + put("Signature.SHA512WithRSA", OpenSSLSignature.SHA512RSA.class.getName()); + put("Alg.Alias.Signature.SHA512WithRSAEncryption", "SHA512WithRSA"); + put("Alg.Alias.Signature.1.2.840.113549.1.1.13", "SHA512WithRSA"); put("Signature.SHA1withDSA", OpenSSLSignature.SHA1DSA.class.getName()); put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA"); diff --git a/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/CipherTest.java b/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/CipherTest.java index 7442210..c07b180 100644 --- a/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/CipherTest.java +++ b/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/CipherTest.java @@ -47,6 +47,7 @@ import javax.crypto.ShortBufferException; import javax.crypto.spec.DESedeKeySpec; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; +import libcore.java.security.StandardNames; import org.apache.harmony.crypto.tests.support.MyCipher; import tests.support.resource.Support_Resources; @@ -545,7 +546,10 @@ public class CipherTest extends junit.framework.TestCase { try { c.doFinal(b, 3, 6, b1, 5); fail(); - } catch (ShortBufferException expected) { + } catch (IllegalBlockSizeException maybeExpected) { + assertTrue(StandardNames.IS_RI); + } catch (ShortBufferException maybeExpected) { + assertFalse(StandardNames.IS_RI); } } diff --git a/support/src/test/java/libcore/java/security/StandardNames.java b/support/src/test/java/libcore/java/security/StandardNames.java index 793fd4b..dc57086 100644 --- a/support/src/test/java/libcore/java/security/StandardNames.java +++ b/support/src/test/java/libcore/java/security/StandardNames.java @@ -325,14 +325,6 @@ public final class StandardNames extends Assert { // different names: added "Encryption" suffix unprovide("Signature", "MD5withRSA"); provide("Signature", "MD5WithRSAEncryption"); - unprovide("Signature", "SHA1withRSA"); - provide("Signature", "SHA1WithRSAEncryption"); - unprovide("Signature", "SHA256WithRSA"); - provide("Signature", "SHA256WithRSAEncryption"); - unprovide("Signature", "SHA384WithRSA"); - provide("Signature", "SHA384WithRSAEncryption"); - unprovide("Signature", "SHA512WithRSA"); - provide("Signature", "SHA512WithRSAEncryption"); // Added to support Android KeyStore operations provide("Signature", "NONEwithRSA"); |