Skip to content
Snippets Groups Projects
Commit 2affd9f6 authored by Emmanuel Bruno's avatar Emmanuel Bruno
Browse files

fixes certs.

parent ff779090
Branches
No related tags found
No related merge requests found
...@@ -42,3 +42,5 @@ proguard/ ...@@ -42,3 +42,5 @@ proguard/
*.ear% *.ear%
.DS_Store .DS_Store
/websocketClient/src/main/resources/localhost.der
/websocketClient/src/main/resources/mycert-pub.jks
...@@ -14,8 +14,9 @@ ...@@ -14,8 +14,9 @@
http://localhost:8080/restApp/sample/persons http://localhost:8080/restApp/sample/persons
6. curl http://localhost:8080/restApp-1.0-SNAPSHOT/resources/sample/persons/843c8236-6c6b-450e-9aa3-211a9b897403 6. curl http://localhost:8080/restApp-1.0-SNAPSHOT/resources/sample/persons/843c8236-6c6b-450e-9aa3-211a9b897403
7. curl -H "Accept: text/xml" http://localhost:8080/restApp-1.0-SNAPSHOT/resources/sample/persons 7. curl -H "Accept: text/xml" http://localhost:8080/restApp-1.0-SNAPSHOT/resources/sample/persons
## Import "real" certificate ## Import "real" certificate
openssl x509 -outform der -in localhost.pem -out localhost.der openssl s_client -showcerts -servername localhost -connect localhost:8181 </dev/null | openssl x509 -outform DER > localhost.der
keytool -import -noprompt -trustcacerts -storepass storepass -alias localhost -keystore mycert-pub.jks -file localhost.der keytool -import -noprompt -trustcacerts -storepass storepass -alias localhost -keystore mycert-pub.jks -file localhost.der
...@@ -41,7 +41,7 @@ public class WsClient { ...@@ -41,7 +41,7 @@ public class WsClient {
public static void main(String[] args) { public static void main(String[] args) {
try { try {
final WsClient clientEndPoint = new WsClient(new URI("ws://localhost:8686/wsApp/hellows")); final WsClient clientEndPoint = new WsClient(new URI("wss://localhost:8181/wsApp/hellows"));
clientEndPoint.sendMessage("Hello 1 !"); clientEndPoint.sendMessage("Hello 1 !");
Thread.sleep(5000); Thread.sleep(5000);
clientEndPoint.sendMessage("Hello 2 !"); clientEndPoint.sendMessage("Hello 2 !");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment