Mercurial Hosting > luan
diff src/goodjava/lucene/backup/BackupServer.java @ 1506:d80395468b4e
ssl security in code
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 15 May 2020 18:29:47 -0600 |
parents | 8a7b6b32c691 |
children | 0ba144491a42 |
line wrap: on
line diff
--- a/src/goodjava/lucene/backup/BackupServer.java Thu May 14 15:49:45 2020 -0600 +++ b/src/goodjava/lucene/backup/BackupServer.java Fri May 15 18:29:47 2020 -0600 @@ -7,7 +7,6 @@ import java.net.ServerSocket; import java.util.concurrent.Executors; import java.util.concurrent.ExecutorService; -import javax.net.ssl.SSLServerSocketFactory; import javax.net.ssl.SSLServerSocket; import goodjava.util.SoftCacheMap; import goodjava.io.IoUtils; @@ -34,9 +33,6 @@ "SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA", "SSL_DH_anon_EXPORT_WITH_RC4_40_MD5", }; - static { - cipherSuites = null; // for now, until I figure out disgusting java security - } private final File backupDir; private static final ExecutorService threadPool = Executors.newCachedThreadPool(); @@ -52,7 +48,7 @@ if( cipherSuites == null ) { ss = new ServerSocket(port); } else { - ss = SSLServerSocketFactory.getDefault().createServerSocket(port); + ss = IoUtils.getSSLServerSocketFactory().createServerSocket(port); ((SSLServerSocket)ss).setEnabledCipherSuites(cipherSuites); } threadPool.execute(new Runnable(){public void run() {