tyrus
  1. tyrus
  2. TYRUS-146

Support request from client to secured services ("wss")

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 1.3
    • Component/s: None
    • Labels:
      None

      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"));
      

        Activity

          People

          • Assignee:
            Pavel Bucek
            Reporter:
            Pavel Bucek
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: