diff options
author | Alex Klyubin <klyubin@google.com> | 2013-12-13 16:33:12 -0800 |
---|---|---|
committer | Alex Klyubin <klyubin@google.com> | 2013-12-16 11:27:28 -0800 |
commit | 2cca77af136c57106bd9a1652e54a0ee99154d89 (patch) | |
tree | e20fcd022d4eb496e54d628c86ca3292025602aa /benchmarks | |
parent | 62bc43a334b79a8df1c81aed0b96061cf5f9f1d9 (diff) | |
download | libcore-2cca77af136c57106bd9a1652e54a0ee99154d89.zip libcore-2cca77af136c57106bd9a1652e54a0ee99154d89.tar.gz libcore-2cca77af136c57106bd9a1652e54a0ee99154d89.tar.bz2 |
Remove HarmonyJSSE SSLContext, SSLSocket and SSLServerSocket.
Change-Id: I3c939e9275ba8f1d00342d1f83c6fdaf110f2317
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/src/benchmarks/regression/SSLLoopbackBenchmark.java | 16 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/SSLSocketBenchmark.java | 16 |
2 files changed, 2 insertions, 30 deletions
diff --git a/benchmarks/src/benchmarks/regression/SSLLoopbackBenchmark.java b/benchmarks/src/benchmarks/regression/SSLLoopbackBenchmark.java index 5533f0f..0d9a792 100644 --- a/benchmarks/src/benchmarks/regression/SSLLoopbackBenchmark.java +++ b/benchmarks/src/benchmarks/regression/SSLLoopbackBenchmark.java @@ -16,7 +16,6 @@ package benchmarks.regression; -import com.google.caliper.Param; import com.google.caliper.SimpleBenchmark; import java.io.IOException; import java.io.InputStream; @@ -34,24 +33,11 @@ import libcore.javax.net.ssl.TestSSLContext; import libcore.javax.net.ssl.TestSSLSocketPair; public class SSLLoopbackBenchmark extends SimpleBenchmark { - @Param private Implementation implementation; - - public enum Implementation { - OPENSSL("AndroidOpenSSL"), - HARMONY("HarmonyJSSE"); - - final String providerName; - - Implementation(String providerName) { - this.providerName = providerName; - } - }; public void time(int reps) throws Exception { for (int i = 0; i < reps; ++i) { TestSSLContext context = TestSSLContext.create( - TestKeyStore.getClient(), TestKeyStore.getServer(), - implementation.providerName, implementation.providerName); + TestKeyStore.getClient(), TestKeyStore.getServer()); SSLSocket[] sockets = TestSSLSocketPair.connect(context, null, null); context.close(); sockets[0].close(); diff --git a/benchmarks/src/benchmarks/regression/SSLSocketBenchmark.java b/benchmarks/src/benchmarks/regression/SSLSocketBenchmark.java index fd72a79..5be890e 100644 --- a/benchmarks/src/benchmarks/regression/SSLSocketBenchmark.java +++ b/benchmarks/src/benchmarks/regression/SSLSocketBenchmark.java @@ -69,24 +69,10 @@ public class SSLSocketBenchmark extends SimpleBenchmark { } } - @Param private Implementation implementation; - - public enum Implementation { OPENSSL, HARMONY }; - private SocketFactory sf; @Override protected void setUp() throws Exception { - SSLContext sslContext; - switch (implementation) { - case OPENSSL: - sslContext = SSLContext.getInstance("SSL", "AndroidOpenSSL"); - break; - case HARMONY: - sslContext = SSLContext.getInstance("SSL", "HarmonyJSSE"); - break; - default: - throw new RuntimeException(implementation.toString()); - } + SSLContext sslContext = SSLContext.getInstance("SSL"); sslContext.init(null, null, null); this.sf = sslContext.getSocketFactory(); } |