Examples of SslSocketConnector


Examples of org.mortbay.jetty.security.SslSocketConnector

        || EMPTY.equals(Monitor.getSystemConfiguration().get(Property.MONITOR_SSL_TRUSTSTORE))
        || EMPTY.equals(Monitor.getSystemConfiguration().get(Property.MONITOR_SSL_TRUSTSTOREPASS))) {
      sock = new SocketConnector();
      usingSsl = false;
    } else {
      sock = new SslSocketConnector();
      ((SslSocketConnector) sock).setKeystore(Monitor.getSystemConfiguration().get(Property.MONITOR_SSL_KEYSTORE));
      ((SslSocketConnector) sock).setKeyPassword(Monitor.getSystemConfiguration().get(Property.MONITOR_SSL_KEYSTOREPASS));
      ((SslSocketConnector) sock).setTruststore(Monitor.getSystemConfiguration().get(Property.MONITOR_SSL_TRUSTSTORE));
      ((SslSocketConnector) sock).setTrustPassword(Monitor.getSystemConfiguration().get(Property.MONITOR_SSL_TRUSTSTOREPASS));
      usingSsl = true;
View Full Code Here

Examples of org.mortbay.jetty.security.SslSocketConnector

    protected void addConnectors( Server server )
    {
        System.setProperty( "javax.net.ssl.trustStore",
                            getTestFile( "src/test/resources/ssl/keystore" ).getAbsolutePath() );

        SslSocketConnector connector = new SslSocketConnector();
        connector.setPort( server.getConnectors()[0].getPort() );
        connector.setKeystore( getTestPath( "src/test/resources/ssl/keystore" ) );
        connector.setPassword( "wagonhttp" );
        connector.setKeyPassword( "wagonhttp" );
        connector.setTruststore( getTestPath( "src/test/resources/ssl/keystore" ) );
        connector.setTrustPassword( "wagonhttp" );
        server.setConnectors( new Connector[] { connector } );
    }
View Full Code Here

Examples of org.mortbay.jetty.security.SslSocketConnector

  public void addSslListener(InetSocketAddress addr, String keystore,
      String storPass, String keyPass) throws IOException {
    if (webServer.isStarted()) {
      throw new IOException("Failed to add ssl listener");
    }
    SslSocketConnector sslListener = new SslSocketConnector();
    sslListener.setHost(addr.getHostName());
    sslListener.setPort(addr.getPort());
    sslListener.setKeystore(keystore);
    sslListener.setPassword(storPass);
    sslListener.setKeyPassword(keyPass);
    webServer.addConnector(sslListener);
  }
View Full Code Here

Examples of org.mortbay.jetty.security.SslSocketConnector

      System.setProperty("javax.net.ssl.trustStorePassword", sslConf.get(
          "ssl.server.truststore.password", ""));
      System.setProperty("javax.net.ssl.trustStoreType", sslConf.get(
          "ssl.server.truststore.type", "jks"));
    }
    SslSocketConnector sslListener = new SslSocketConnector();
    sslListener.setHost(addr.getHostName());
    sslListener.setPort(addr.getPort());
    sslListener.setKeystore(sslConf.get("ssl.server.keystore.location"));
    sslListener.setPassword(sslConf.get("ssl.server.keystore.password", ""));
    sslListener.setKeyPassword(sslConf.get("ssl.server.keystore.keypassword", ""));
    sslListener.setKeystoreType(sslConf.get("ssl.server.keystore.type", "jks"));
    sslListener.setNeedClientAuth(needClientAuth);
    webServer.addConnector(sslListener);
  }
View Full Code Here

Examples of org.mortbay.jetty.security.SslSocketConnector

        super(port, path);
    }

    protected Connector getConnector(int port) {
        Properties properties = StartupProperties.get();
        SslSocketConnector connector = new SslSocketConnector();
        connector.setPort(port);
        connector.setHost("0.0.0.0");
        connector.setKeystore(properties.getProperty("keystore.file",
                System.getProperty("keystore.file", "conf/prism.keystore")));
        connector.setKeyPassword(properties.getProperty("keystore.password",
                System.getProperty("keystore.password", "falcon-prism-passwd")));
        connector.setTruststore(properties.getProperty("truststore.file",
                System.getProperty("truststore.file", "conf/prism.keystore")));
        connector.setTrustPassword(properties.getProperty("truststore.password",
                System.getProperty("truststore.password", "falcon-prism-passwd")));
        connector.setPassword(properties.getProperty("password",
                System.getProperty("password", "falcon-prism-passwd")));
        connector.setWantClientAuth(true);
        return connector;
    }
View Full Code Here

Examples of org.mortbay.jetty.security.SslSocketConnector

        Connector listener = null;
        String scheme = ep.getScheme();
        if ("http".equals(scheme)) {
          listener = HttpServer2.createDefaultChannelConnector();
        } else if ("https".equals(scheme)) {
          SslSocketConnector c = new SslSocketConnector();
          c.setNeedClientAuth(needsClientAuth);
          c.setKeyPassword(keyPassword);

          if (keyStore != null) {
            c.setKeystore(keyStore);
            c.setKeystoreType(keyStoreType);
            c.setPassword(keyStorePassword);
          }

          if (trustStore != null) {
            c.setTruststore(trustStore);
            c.setTruststoreType(trustStoreType);
            c.setTrustPassword(trustStorePassword);
          }
          listener = c;

        } else {
          throw new HadoopIllegalArgumentException(
View Full Code Here

Examples of org.mortbay.jetty.security.SslSocketConnector

        try {
          sslFactory.init();
        } catch (GeneralSecurityException ex) {
          throw new IOException(ex);
        }
        SslSocketConnector sslListener = new SslSocketConnector() {
          @Override
          protected SSLServerSocketFactory createFactory() throws Exception {
            return sslFactory.createSSLServerSocketFactory();
          }
        };
View Full Code Here

Examples of org.mortbay.jetty.security.SslSocketConnector

  public void addSslListener(InetSocketAddress addr, String keystore,
      String storPass, String keyPass) throws IOException {
    if (webServer.isStarted()) {
      throw new IOException("Failed to add ssl listener");
    }
    SslSocketConnector sslListener = new SslSocketConnector();
    sslListener.setHost(addr.getHostName());
    sslListener.setPort(addr.getPort());
    sslListener.setKeystore(keystore);
    sslListener.setPassword(storPass);
    sslListener.setKeyPassword(keyPass);
    webServer.addConnector(sslListener);
  }
View Full Code Here

Examples of org.mortbay.jetty.security.SslSocketConnector

      System.setProperty("javax.net.ssl.trustStorePassword", sslConf.get(
          "ssl.server.truststore.password", ""));
      System.setProperty("javax.net.ssl.trustStoreType", sslConf.get(
          "ssl.server.truststore.type", "jks"));
    }
    SslSocketConnector sslListener = new SslSocketConnector();
    sslListener.setHost(addr.getHostName());
    sslListener.setPort(addr.getPort());
    sslListener.setKeystore(sslConf.get("ssl.server.keystore.location"));
    sslListener.setPassword(sslConf.get("ssl.server.keystore.password", ""));
    sslListener.setKeyPassword(sslConf.get("ssl.server.keystore.keypassword", ""));
    sslListener.setKeystoreType(sslConf.get("ssl.server.keystore.type", "jks"));
    sslListener.setNeedClientAuth(needCertsAuth);
    webServer.addConnector(sslListener);
  }
View Full Code Here

Examples of org.mortbay.jetty.security.SslSocketConnector

  public void addSslListener(InetSocketAddress addr, String keystore,
      String storPass, String keyPass) throws IOException {
    if (webServer.isStarted()) {
      throw new IOException("Failed to add ssl listener");
    }
    SslSocketConnector sslListener = new SslSocketConnector();
    sslListener.setHost(addr.getHostName());
    sslListener.setPort(addr.getPort());
    sslListener.setKeystore(keystore);
    sslListener.setPassword(storPass);
    sslListener.setKeyPassword(keyPass);
    webServer.addConnector(sslListener);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.