From b8a728bdb923e0fd2e4f7f485905e41ab5e03b69 Mon Sep 17 00:00:00 2001 From: rfc2822 Date: Fri, 31 Oct 2014 15:39:12 +0100 Subject: [PATCH] Add TLS cipher info to tests (see #344) --- .../webdav/TlsSniSocketFactoryTest.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 test/src/at/bitfire/davdroid/webdav/TlsSniSocketFactoryTest.java diff --git a/test/src/at/bitfire/davdroid/webdav/TlsSniSocketFactoryTest.java b/test/src/at/bitfire/davdroid/webdav/TlsSniSocketFactoryTest.java new file mode 100644 index 00000000..f00844d5 --- /dev/null +++ b/test/src/at/bitfire/davdroid/webdav/TlsSniSocketFactoryTest.java @@ -0,0 +1,27 @@ +package at.bitfire.davdroid.webdav; + +import java.io.IOException; + +import javax.net.ssl.SSLSocket; + +import android.util.Log; +import junit.framework.TestCase; + +public class TlsSniSocketFactoryTest extends TestCase { + private static final String TAG = "davdroid.TlsSniSocketFactoryTest"; + + public void testCiphers() throws IOException { + SSLSocket socket = (SSLSocket)TlsSniSocketFactory.INSTANCE.createSocket(null); + + Log.i(TAG, "Enabled:"); + for (String cipher : socket.getEnabledCipherSuites()) + Log.i(TAG, cipher); + + Log.i(TAG, "Supported:"); + for (String cipher : socket.getSupportedCipherSuites()) + Log.i(TAG, cipher); + + assert(true); + } + +}