Merge "Track change to Conscrypt"
diff --git a/core/java/android/net/SSLCertificateSocketFactory.java b/core/java/android/net/SSLCertificateSocketFactory.java
index b0278d3..69be4fd 100644
--- a/core/java/android/net/SSLCertificateSocketFactory.java
+++ b/core/java/android/net/SSLCertificateSocketFactory.java
@@ -202,7 +202,7 @@
private SSLSocketFactory makeSocketFactory(
KeyManager[] keyManagers, TrustManager[] trustManagers) {
try {
- OpenSSLContextImpl sslContext = new OpenSSLContextImpl();
+ OpenSSLContextImpl sslContext = OpenSSLContextImpl.getPreferred();
sslContext.engineInit(keyManagers, trustManagers, null);
sslContext.engineGetClientSessionContext().setPersistentCache(mSessionCache);
return sslContext.engineGetSocketFactory();
diff --git a/core/java/android/net/http/HttpsConnection.java b/core/java/android/net/http/HttpsConnection.java
index 7a12e53..e637eea 100644
--- a/core/java/android/net/http/HttpsConnection.java
+++ b/core/java/android/net/http/HttpsConnection.java
@@ -80,7 +80,7 @@
cache = FileClientSessionCache.usingDirectory(sessionDir);
}
- OpenSSLContextImpl sslContext = new OpenSSLContextImpl();
+ OpenSSLContextImpl sslContext = OpenSSLContextImpl.getPreferred();
// here, trust managers is a single trust-all manager
TrustManager[] trustManagers = new TrustManager[] {
diff --git a/tests/CoreTests/android/core/SSLSocketTest.java b/tests/CoreTests/android/core/SSLSocketTest.java
index b06790b..65062c2 100644
--- a/tests/CoreTests/android/core/SSLSocketTest.java
+++ b/tests/CoreTests/android/core/SSLSocketTest.java
@@ -907,7 +907,7 @@
*/
public void testClientSessionCaching() throws IOException,
KeyManagementException {
- OpenSSLContextImpl context = new OpenSSLContextImpl();
+ OpenSSLContextImpl context = OpenSSLContextImpl.getPreferred();
// Cache size = 2.
FakeClientSessionCache fakeCache = new FakeClientSessionCache();
@@ -1000,7 +1000,7 @@
public void testFileBasedClientSessionCache() throws IOException,
KeyManagementException {
- OpenSSLContextImpl context = new OpenSSLContextImpl();
+ OpenSSLContextImpl context = OpenSSLContextImpl.getPreferred();
String tmpDir = System.getProperty("java.io.tmpdir");
if (tmpDir == null) {
fail("Please set 'java.io.tmpdir' system property.");