summaryrefslogtreecommitdiffstats
path: root/tests/CoreTests
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2010-09-14 00:11:14 -0700
committerBrian Carlstrom <bdc@google.com>2010-09-14 00:11:14 -0700
commit2c42c8fbaf02be1f3ea6298077128d0c419526f0 (patch)
treeaf2c6a0081efc6b0519ec2b71cb61ab5618498cf /tests/CoreTests
parent5251c800c93c6f6fd473475c36b8ab3b360c1e4d (diff)
downloadframeworks_base-2c42c8fbaf02be1f3ea6298077128d0c419526f0.zip
frameworks_base-2c42c8fbaf02be1f3ea6298077128d0c419526f0.tar.gz
frameworks_base-2c42c8fbaf02be1f3ea6298077128d0c419526f0.tar.bz2
Remove SSLContextImpl.engineInit(..) that takes persistent cache arguments
Bug: 2672817 Change-Id: If5f10fa16eaf5676a0c1540463759cd4e0e837de
Diffstat (limited to 'tests/CoreTests')
-rw-r--r--tests/CoreTests/android/core/SSLPerformanceTest.java12
-rw-r--r--tests/CoreTests/android/core/SSLSocketTest.java15
2 files changed, 16 insertions, 11 deletions
diff --git a/tests/CoreTests/android/core/SSLPerformanceTest.java b/tests/CoreTests/android/core/SSLPerformanceTest.java
index fd87e89..5b5be0a 100644
--- a/tests/CoreTests/android/core/SSLPerformanceTest.java
+++ b/tests/CoreTests/android/core/SSLPerformanceTest.java
@@ -211,17 +211,17 @@ public class SSLPerformanceTest extends AndroidTestCase {
deleteDirectory();
OpenSSLContextImpl sslContext = new OpenSSLContextImpl();
- sslContext.engineInit(null, null, null,
- FileClientSessionCache.usingDirectory(getCacheDirectory()),
- null);
+ sslContext.engineInit(null, null, null);
+ sslContext.engineGetClientSessionContext().setPersistentCache(
+ FileClientSessionCache.usingDirectory(getCacheDirectory()));
// Make sure www.google.com is in the cache.
getVerisignDotCom(sslContext);
// Re-initialize so we hit the file cache.
- sslContext.engineInit(null, null, null,
- FileClientSessionCache.usingDirectory(getCacheDirectory()),
- null);
+ sslContext.engineInit(null, null, null);
+ sslContext.engineGetClientSessionContext().setPersistentCache(
+ FileClientSessionCache.usingDirectory(getCacheDirectory()));
Stopwatch stopwatch = new Stopwatch();
diff --git a/tests/CoreTests/android/core/SSLSocketTest.java b/tests/CoreTests/android/core/SSLSocketTest.java
index 021df80..03905e1 100644
--- a/tests/CoreTests/android/core/SSLSocketTest.java
+++ b/tests/CoreTests/android/core/SSLSocketTest.java
@@ -911,7 +911,8 @@ public class SSLSocketTest extends TestCase {
// Cache size = 2.
FakeClientSessionCache fakeCache = new FakeClientSessionCache();
- context.engineInit(null, null, null, fakeCache, null);
+ context.engineInit(null, null, null);
+ context.engineGetClientSessionContext().setPersistentCache(fakeCache);
SSLSocketFactory socketFactory = context.engineGetSocketFactory();
context.engineGetClientSessionContext().setSessionCacheSize(2);
makeRequests(socketFactory);
@@ -933,7 +934,8 @@ public class SSLSocketTest extends TestCase {
// Cache size = 3.
fakeCache = new FakeClientSessionCache();
- context.engineInit(null, null, null, fakeCache, null);
+ context.engineInit(null, null, null);
+ context.engineGetClientSessionContext().setPersistentCache(fakeCache);
socketFactory = context.engineGetSocketFactory();
context.engineGetClientSessionContext().setSessionCacheSize(3);
makeRequests(socketFactory);
@@ -952,7 +954,8 @@ public class SSLSocketTest extends TestCase {
// Cache size = 4.
fakeCache = new FakeClientSessionCache();
- context.engineInit(null, null, null, fakeCache, null);
+ context.engineInit(null, null, null);
+ context.engineGetClientSessionContext().setPersistentCache(fakeCache);
socketFactory = context.engineGetSocketFactory();
context.engineGetClientSessionContext().setSessionCacheSize(4);
makeRequests(socketFactory);
@@ -1010,7 +1013,8 @@ public class SSLSocketTest extends TestCase {
try {
ClientSessionCacheProxy cacheProxy
= new ClientSessionCacheProxy(fileCache);
- context.engineInit(null, null, null, cacheProxy, null);
+ context.engineInit(null, null, null);
+ context.engineGetClientSessionContext().setPersistentCache(cacheProxy);
SSLSocketFactory socketFactory = context.engineGetSocketFactory();
context.engineGetClientSessionContext().setSessionCacheSize(1);
makeRequests(socketFactory);
@@ -1033,7 +1037,8 @@ public class SSLSocketTest extends TestCase {
// Try again now that file-based cache is populated.
fileCache = FileClientSessionCache.usingDirectory(cacheDir);
cacheProxy = new ClientSessionCacheProxy(fileCache);
- context.engineInit(null, null, null, cacheProxy, null);
+ context.engineInit(null, null, null);
+ context.engineGetClientSessionContext().setPersistentCache(cacheProxy);
socketFactory = context.engineGetSocketFactory();
context.engineGetClientSessionContext().setSessionCacheSize(1);
makeRequests(socketFactory);