Package javax.net.ssl

Examples of javax.net.ssl.SSLParameters


      final PrivateKey privateKey) {
    try {
      final SSLContext context = SSLContext.getInstance("SSL");// or
                                    // "TLSv1"
      context.init(null, null, null);
      SSLParameters parameters = context.getDefaultSSLParameters();
      UGateUtil.PLAIN_LOGGER
          .info("======================================================");
      UGateUtil.PLAIN_LOGGER.info("Supported Cipher Suites:");
      for (final String s : parameters.getCipherSuites()) {
        UGateUtil.PLAIN_LOGGER.info(s);
      }
      UGateUtil.PLAIN_LOGGER
          .info("======================================================");
      UGateUtil.PLAIN_LOGGER.info("CERTIFICATE INFO");
View Full Code Here


    private void configureEngine(HttpsConfigurator cfg, InetSocketAddress addr){
        if (cfg != null) {
            Parameters params = new Parameters (cfg, addr);
            cfg.configure (params);
            SSLParameters sslParams = params.getSSLParameters();
            if (sslParams != null) {
                engine.setSSLParameters (sslParams);
            } else {
                /* tiger compatibility */
                if (params.getCipherSuites() != null) {
View Full Code Here

    private void configureEngine(HttpsConfigurator cfg, InetSocketAddress addr){
        if (cfg != null) {
            Parameters params = new Parameters (cfg, addr);
//BEGIN_TIGER_EXCLUDE
            cfg.configure (params);
            SSLParameters sslParams = params.getSSLParameters();
            if (sslParams != null) {
                engine.setSSLParameters (sslParams);
            } else
//END_TIGER_EXCLUDE
            {
View Full Code Here

            if (context != null) {
                secureHttpServer.setHttpsConfigurator(new HttpsConfigurator(context) {

                    @Override
                    public void configure(HttpsParameters params) {
                        SSLParameters sslparams = context.getDefaultSSLParameters();

                        switch (certAuthMode) {
                            case NEED:
                                sslparams.setNeedClientAuth(true);
                                break;
                            case WANT:
                                sslparams.setWantClientAuth(true);
                                break;
                        }

                        params.setSSLParameters(sslparams);
View Full Code Here

            if (context != null) {
                secureHttpServer.setHttpsConfigurator(new HttpsConfigurator(context) {

                    @Override
                    public void configure(HttpsParameters params) {
                        SSLParameters sslparams = context.getDefaultSSLParameters();

                        switch (certAuthMode) {
                            case NEED:
                                sslparams.setNeedClientAuth(true);
                                break;
                            case WANT:
                                sslparams.setWantClientAuth(true);
                                break;
                        }

                        params.setSSLParameters(sslparams);
View Full Code Here

    private void configureEngine(HttpsConfigurator cfg, InetSocketAddress addr){
        if (cfg != null) {
            Parameters params = new Parameters (cfg, addr);
//BEGIN_TIGER_EXCLUDE
            cfg.configure (params);
            SSLParameters sslParams = params.getSSLParameters();
            if (sslParams != null) {
                engine.setSSLParameters (sslParams);
            } else
//END_TIGER_EXCLUDE
            {
View Full Code Here

    private void configureEngine(HttpsConfigurator cfg, InetSocketAddress addr){
        if (cfg != null) {
            Parameters params = new Parameters (cfg, addr);
//BEGIN_TIGER_EXCLUDE
            cfg.configure (params);
            SSLParameters sslParams = params.getSSLParameters();
            if (sslParams != null) {
                engine.setSSLParameters (sslParams);
            } else
//END_TIGER_EXCLUDE
            {
View Full Code Here

            final SSLContext context = securityRealm.getSSLContext();
            secureHttpServer.setHttpsConfigurator(new HttpsConfigurator(context) {

                @Override
                public void configure(HttpsParameters params) {
                    SSLParameters sslparams = context.getDefaultSSLParameters();

                    switch (certAuthMode) {
                        case NEED:
                            sslparams.setNeedClientAuth(true);
                            break;
                        case WANT:
                            sslparams.setWantClientAuth(true);
                            break;
                    }

                    params.setSSLParameters(sslparams);
View Full Code Here

  private HttpsConfigurator getConfigurator(final SSLContext sslContext) {
    return new HttpsConfigurator(sslContext) {
          @Override
          public void configure (HttpsParameters params) {
            final SSLContext context = getSSLContext();
            final SSLParameters sslParams = context.getDefaultSSLParameters();
            params.setNeedClientAuth(false);
            params.setSSLParameters(sslParams);
          }
        };
  }
View Full Code Here

        return newSSLEngine(hostName, address.getPort());
    }

    public void customize(SSLEngine sslEngine)
    {
        SSLParameters sslParams = sslEngine.getSSLParameters();
        sslParams.setEndpointIdentificationAlgorithm(_endpointIdentificationAlgorithm);
        sslEngine.setSSLParameters(sslParams);

        if (getWantClientAuth())
            sslEngine.setWantClientAuth(getWantClientAuth());
        if (getNeedClientAuth())
View Full Code Here

TOP

Related Classes of javax.net.ssl.SSLParameters

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.