Package org.eclipse.jetty.server.ssl

Examples of org.eclipse.jetty.server.ssl.SslConnector


        return startConnector(connector);
    }

    private boolean initializeHttps()
    {
        SslConnector connector = this.config.isUseHttpsNio() ? new SslSelectChannelConnector() : new SslSocketConnector();
        configureConnector(connector, this.config.getHttpsPort());
        configureSslConnector(connector);
        return startConnector(connector);
    }
View Full Code Here


        connector.setMaxIdleTime(maxIdleTime);
        return connector;
    }

    private static Connector buildSslConnector() {
        SslConnector sslConnector;
        if( usingNIO ) {
            sslConnector = new SslSelectChannelConnector();
        }
        else {
            sslConnector = new SslSocketConnector();
        }
        sslConnector.setPort(jettySSLPort);
        sslConnector.setMaxIdleTime(maxIdleTime);
        sslConnector.setKeyPassword(keyPassword);
        if (keyFileName != null && keyFileName.length() != 0 ) {
            sslConnector.setKeystore(keyFileName);
        }
        return sslConnector;
    }
View Full Code Here

        return startConnector(connector);
    }

    private boolean initializeHttps()
    {
        SslConnector connector = this.config.isUseHttpsNio() ? new SslSelectChannelConnector() : new SslSocketConnector();
        configureConnector(connector, this.config.getHttpsPort());
        configureSslConnector(connector);
        return startConnector(connector);
    }
View Full Code Here

    }

    @Override
    public Connector createConnector() throws Exception {
        IntrospectionSupport.setProperties(this, getTransportOptions());
        SslConnector sslConnector;
        if (Krb5AndCertsSslSocketConnector.isKrb(auth)) {
            sslConnector = new Krb5AndCertsSslSocketConnector();
            ((Krb5AndCertsSslSocketConnector)sslConnector).setMode(auth);
        } else {
            sslConnector = new SslSelectChannelConnector();
        }

        SSLContext sslContext = context == null ? null : context.getSSLContext();

        // Get a reference to the current ssl context factory...
        SslContextFactory factory = sslConnector.getSslContextFactory();

        if (context != null) {

            // Should not be using this method since it does not use all of the values
            // from the passed SslContext instance.....
View Full Code Here

    // TODO: make specific truststore too?
//    sslContextFactory.setTrustStore(keystorePath);
//    sslContextFactory.setTrustStorePassword(new String(keypass));
    sslContextFactory.setNeedClientAuth( false );
    sslContextFactory.setTrustAll( true );
    SslConnector sslConnector = new SslSelectChannelConnector( sslContextFactory );

    return sslConnector;
 
View Full Code Here

    // TODO: make specific truststore too?
//    sslContextFactory.setTrustStore(keystorePath);
//    sslContextFactory.setTrustStorePassword(new String(keypass));
    sslContextFactory.setNeedClientAuth( false );
    sslContextFactory.setTrustAll( true );
    SslConnector sslConnector = new SslSelectChannelConnector( sslContextFactory );

    return sslConnector;
 
View Full Code Here

    sslContext.setKeyManagerPassword( "horton" );
    sslContext.setTrustStore( "target/test-classes/server-truststore.jks" );
    sslContext.setTrustStorePassword( "horton" );
    sslContext.setNeedClientAuth( false );
    sslContext.setTrustAll( true );
    SslConnector sslConnector = new SslSelectChannelConnector( sslContext );

    ServletContextHandler context = new ServletContextHandler( ServletContextHandler.SESSIONS );
    context.setContextPath( "/" );
    ServletHolder servletHolder = new ServletHolder( new MockServlet() );
    context.addServlet( servletHolder, "/*" );
View Full Code Here

    sslContextFactory.setNeedClientAuth( false );
    sslContextFactory.setTrustAll( true );
    if (sslExcludeProtocols != null) {
      sslContextFactory.setExcludeProtocols((String[]) sslExcludeProtocols.toArray());
    }
    SslConnector sslConnector = new SslSelectChannelConnector( sslContextFactory );

    return sslConnector;
 
View Full Code Here

    }

    @Override
    public Connector createConnector() throws Exception {
        IntrospectionSupport.setProperties(this, getTransportOptions());
        SslConnector sslConnector;
        if (Krb5AndCertsSslSocketConnector.isKrb(auth)) {
            sslConnector = new Krb5AndCertsSslSocketConnector();
            ((Krb5AndCertsSslSocketConnector)sslConnector).setMode(auth);
        } else {
            sslConnector = new SslSelectChannelConnector();
        }

        SSLContext sslContext = context == null ? null : context.getSSLContext();

        // Get a reference to the current ssl context factory...
        SslContextFactory factory = sslConnector.getSslContextFactory();

        if (context != null) {

            // Should not be using this method since it does not use all of the values
            // from the passed SslContext instance.....
View Full Code Here

    // TODO: make specific truststore too?
//    sslContextFactory.setTrustStore(keystorePath);
//    sslContextFactory.setTrustStorePassword(new String(keypass));
    sslContextFactory.setNeedClientAuth( false );
    sslContextFactory.setTrustAll( true );
    SslConnector sslConnector = new SslSelectChannelConnector( sslContextFactory );

    return sslConnector;
 
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.server.ssl.SslConnector

Copyright © 2018 www.massapicom. 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.