aboutsummaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorritchie <ritchie@gmx.at>2015-09-27 07:12:16 +0200
committerritchie <ritchie@gmx.at>2015-09-27 07:12:16 +0200
commitdb16e41167bafd9db385af0cd9c4b027b9222403 (patch)
tree87ba020ba2b9399987ffc32ae61a1f22b56f883e /core/src
parented02162dc4b43886e23b2b6888d03bf1f3801d6e (diff)
downloadnanohttpd-db16e41167bafd9db385af0cd9c4b027b9222403.tar.gz
add requested options to the ssl connection #209
Diffstat (limited to 'core/src')
-rw-r--r--core/src/main/java/fi/iki/elonen/NanoHTTPD.java8
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();