server: add trace to display SSL ciphers
[nikiroo-utils.git] / src / be / nikiroo / utils / serial / server / Server.java
index afceaf95323ec349825372c858b65fc95f185761..f6dd7d86a13cbf94c4c08279458ae3724b8b2f5b 100644 (file)
@@ -194,6 +194,15 @@ abstract class Server implements Runnable {
                        tracer.trace(name + ": server starting on port " + port + " ("
                                        + (ssl ? "SSL" : "plain text") + ")");
 
+                       String ciphers = "";
+                       for (String cipher : getAnonCiphers()) {
+                               if (!ciphers.isEmpty()) {
+                                       ciphers += ", ";
+                               }
+                               ciphers += cipher;
+                       }
+                       tracer.trace("Available SSL ciphers: " + ciphers);
+
                        while (started && !exiting) {
                                count(1);
                                final Socket s = ss.accept();
@@ -407,7 +416,7 @@ abstract class Server implements Runnable {
         * 
         * @return the list of such supported ciphers
         */
-       private static String[] getAnonCiphers() {
+       public static String[] getAnonCiphers() {
                List<String> anonCiphers = new ArrayList<String>();
                for (String cipher : ((SSLSocketFactory) SSLSocketFactory.getDefault())
                                .getSupportedCipherSuites()) {