• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to tell a web socket client to use SSL?  RSS feed

 
Colm Dickson
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all.

I have been trying to find out exactly how I can set up a configurator instance to tell the client end point that I wish to connect using SSL.

I think I have to set the properties with a Map of type String, ArrayList<String> but I am struggling knowing what exactly to pass when it comes to SSL.


Does anyone know or have an example of this?

Thanks,

C.
 
Stephan van Hulst
Saloon Keeper
Posts: 7928
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, we can't really help you unless we know what you're using to setup websockets.

Can you show us some of your code so far?
 
Colm Dickson
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi .

Thanks for replying. I have included some of my test class below as a sample.

I can connect to a local websocket running on my machine using thsi test class (and replacing the URI of course) but I have a requirement to connect to another websocket which requires SSL.
I don't know what I have to do in order to do this so I only have my attempt below in the "this.config= section". I don't know what approach to take using the standard javax.websocket api. I hope someone can point me in the right direction.

Thanks.
C

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!