diff options
author | Brian Carlstrom <bdc@google.com> | 2012-10-29 17:17:20 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-10-29 17:17:20 -0700 |
commit | 9fb84f4bee364d44b1d0d425109c98e964b23ae4 (patch) | |
tree | 27f50d26cb9eefd432a63b5d3ea23a5b8946017e /support | |
parent | b5563f7923913abc0acfaa76332dce0943e0465d (diff) | |
parent | adcea0bf53b5b932013d8290619f17715b33f139 (diff) | |
download | libcore-9fb84f4bee364d44b1d0d425109c98e964b23ae4.zip libcore-9fb84f4bee364d44b1d0d425109c98e964b23ae4.tar.gz libcore-9fb84f4bee364d44b1d0d425109c98e964b23ae4.tar.bz2 |
am adcea0bf: Merge "Prefer PKIX algorithm name for TrustManagerFactory and KeyManagerFactory"
* commit 'adcea0bf53b5b932013d8290619f17715b33f139':
Prefer PKIX algorithm name for TrustManagerFactory and KeyManagerFactory
Diffstat (limited to 'support')
-rw-r--r-- | support/src/test/java/libcore/java/security/StandardNames.java | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/support/src/test/java/libcore/java/security/StandardNames.java b/support/src/test/java/libcore/java/security/StandardNames.java index 7778896..d02eca7 100644 --- a/support/src/test/java/libcore/java/security/StandardNames.java +++ b/support/src/test/java/libcore/java/security/StandardNames.java @@ -69,8 +69,8 @@ public final class StandardNames extends Assert { public static final String JSSE_PROVIDER_NAME = (IS_RI) ? "SunJSSE" : "AndroidOpenSSL"; public static final String SECURITY_PROVIDER_NAME = (IS_RI) ? "SUN" : "BC"; - public static final String KEY_MANAGER_FACTORY_DEFAULT = (IS_RI) ? "SunX509" : "X509"; - public static final String TRUST_MANAGER_FACTORY_DEFAULT = (IS_RI) ? "PKIX" : "X509"; + public static final String KEY_MANAGER_FACTORY_DEFAULT = (IS_RI) ? "SunX509" : "PKIX"; + public static final String TRUST_MANAGER_FACTORY_DEFAULT = "PKIX"; public static final String KEY_STORE_ALGORITHM = (IS_RI) ? "JKS" : "BKS"; @@ -178,7 +178,7 @@ public final class StandardNames extends Assert { provide("KeyGenerator", "HmacSHA512"); provide("KeyGenerator", "RC2"); provide("KeyInfoFactory", "DOM"); - provide("KeyManagerFactory", "SunX509"); + provide("KeyManagerFactory", "PKIX"); provide("KeyPairGenerator", "DSA"); provide("KeyPairGenerator", "DiffieHellman"); provide("KeyPairGenerator", "RSA"); @@ -263,7 +263,6 @@ public final class StandardNames extends Assert { provide("KeyGenerator", "SunTlsMasterSecret"); provide("KeyGenerator", "SunTlsPrf"); provide("KeyGenerator", "SunTlsRsaPremasterSecret"); - provide("KeyManagerFactory", "NewSunX509"); provide("KeyStore", "CaseExactJKS"); provide("Mac", "HmacPBESHA1"); provide("Mac", "SslMacMD5"); @@ -307,6 +306,14 @@ public final class StandardNames extends Assert { unprovide("SSLContext", "TLSv1.2"); } + // Fixups for the RI + if (IS_RI) { + // different names: Standard Names says PKIX, JSSE Reference Guide says SunX509 or NewSunX509 + unprovide("KeyManagerFactory", "PKIX"); + provide("KeyManagerFactory", "SunX509"); + provide("KeyManagerFactory", "NewSunX509"); + } + // Fixups for dalvik if (!IS_RI) { @@ -341,10 +348,6 @@ public final class StandardNames extends Assert { provide("Cipher", "PBEWithSHAAnd3-KEYTripleDES-CBC"); provide("SecretKeyFactory", "PBEWithSHAAnd3-KEYTripleDES-CBC"); - // different names: dropped Sun - unprovide("KeyManagerFactory", "SunX509"); - provide("KeyManagerFactory", "X509"); - // different names: BouncyCastle actually uses the Standard name of SHA-1 vs SHA unprovide("MessageDigest", "SHA"); provide("MessageDigest", "SHA-1"); @@ -358,10 +361,6 @@ public final class StandardNames extends Assert { provide("Cipher", "RSA/ECB/NOPADDING"); provide("Cipher", "RSA/ECB/PKCS1PADDING"); - // different names: JSSE Reference Guide says PKIX aka X509 - unprovide("TrustManagerFactory", "PKIX"); - provide("TrustManagerFactory", "X509"); - // different names: ARCFOUR vs ARC4 unprovide("Cipher", "ARCFOUR"); provide("Cipher", "ARC4"); |