diff options
author | ritchie <ritchie@gmx.at> | 2015-09-13 09:18:09 +0200 |
---|---|---|
committer | ritchie <ritchie@gmx.at> | 2015-09-13 09:18:09 +0200 |
commit | 3ea79cfc3ef8447430e6fcc9570c1551831ff9c4 (patch) | |
tree | f7f71ec03206af97984ce4ab13afd8fc003c0b0e /README.md | |
parent | b7c544cefdb659bc78bfc57fd505fd45b5f1d1ff (diff) | |
download | nanohttpd-3ea79cfc3ef8447430e6fcc9570c1551831ff9c4.tar.gz |
unit tests for ssl support #197
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -211,7 +211,19 @@ The latest Github master version can be fetched through sonatype.org: </repository> </repositories> +### generating an self signed ssl certificate +Just a hint how to generate a certificate for localhost. + + keytool -genkey -keyalg RSA -alias selfsigned -keystore keystore.jks -storepass password -validity 360 -keysize 2048 -ext SAN=DNS:localhost,IP:127.0.0.1 -validity 9999 + +This will generate a keystore file named 'keystore.jks' with a self signed certificate for a host named localhost with the ip adress 127.0.0.1 . Now +you can use: + + server.makeSecure(NanoHTTPD.makeSSLSocketFactory("/keystore.jks", "password".toCharArray())); + +Before you start the server to make Nanohttpd serve https connections, when you make sure 'keystore.jks' is in your classpath . + ----- *Thank you to everyone who has reported bugs and suggested fixes.* |