diff options
author | ritchie <ritchie@gmx.at> | 2015-09-27 07:12:16 +0200 |
---|---|---|
committer | ritchie <ritchie@gmx.at> | 2015-09-27 07:12:16 +0200 |
commit | db16e41167bafd9db385af0cd9c4b027b9222403 (patch) | |
tree | 87ba020ba2b9399987ffc32ae61a1f22b56f883e /core/src/main | |
parent | ed02162dc4b43886e23b2b6888d03bf1f3801d6e (diff) | |
download | nanohttpd-db16e41167bafd9db385af0cd9c4b027b9222403.tar.gz |
add requested options to the ssl connection #209
Diffstat (limited to 'core/src/main')
-rw-r--r-- | core/src/main/java/fi/iki/elonen/NanoHTTPD.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/src/main/java/fi/iki/elonen/NanoHTTPD.java b/core/src/main/java/fi/iki/elonen/NanoHTTPD.java index 4da8c58..8a92874 100644 --- a/core/src/main/java/fi/iki/elonen/NanoHTTPD.java +++ b/core/src/main/java/fi/iki/elonen/NanoHTTPD.java @@ -1941,7 +1941,15 @@ public abstract class NanoHTTPD { public void start(final int timeout, boolean daemon) throws IOException { if (this.sslServerSocketFactory != null) { SSLServerSocket ss = (SSLServerSocket) this.sslServerSocketFactory.createServerSocket(); + ss.setEnabledProtocols(new String[]{ + "TLSv1", + "TLSv1.1", + "SSLv3" + }); + ss.setUseClientMode(false); + ss.setWantClientAuth(false); ss.setNeedClientAuth(false); + ss.setSoTimeout(timeout); this.myServerSocket = ss; } else { this.myServerSocket = new ServerSocket(); |