[TYRUS-146] Support request from client to secured services ("wss") Created: 19/Mar/13  Updated: 05/Aug/13  Resolved: 05/Aug/13

Status: Resolved
Project: tyrus
Component/s: None
Affects Version/s: 1.0
Fix Version/s: 1.3

Type: Bug Priority: Major
Reporter: Pavel Bucek Assignee: Pavel Bucek
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

there is a way how to register custom SSLEngineConfigurator (grizzly class), so it should be possible to make requests to secured services:

        final ClientManager client = ClientManager.createClient();

        System.getProperties().put("javax.net.debug", "all");
        System.getProperties().put(SSLContextConfigurator.KEY_STORE_FILE, "...");
        System.getProperties().put(SSLContextConfigurator.TRUST_STORE_FILE, "...");
        System.getProperties().put(SSLContextConfigurator.KEY_STORE_PASSWORD, "...");
        System.getProperties().put(SSLContextConfigurator.TRUST_STORE_PASSWORD, "...");

        final SSLContextConfigurator defaultConfig = new SSLContextConfigurator();
        defaultConfig.retrieve(System.getProperties());

        // or setup SSLContextConfigurator using its API.

        SSLEngineConfigurator sslEngineConfigurator = new SSLEngineConfigurator(defaultConfig, true, false, false);

        client.getProperties().put(GrizzlyEngine.SSL_ENGINE_CONFIGURATOR, sslEngineConfigurator);

        client.connectToServer(... , ClientEndpointConfig.Builder.create().build(), new URI("wss://localhost:8181/sample-echo/echo"));


 Comments   
Comment by Pavel Bucek [ 05/Aug/13 ]

Currently client supports picking up JVM-wide set SSL properties as well as using custom per-client properties set via Tyrus-specific property.

This might be updated in next WebSocket spec release, closing for now.

Generated at Sat Feb 13 11:07:19 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.