Package javax.net.ssl

Examples of javax.net.ssl.SSLContext.createSSLEngine()


        // set the SSLContext parameters
        params.add("sslContextFactory",
            "org.restlet.engine.ssl.DefaultSslContextFactory");
       
        SSLContext context = scp.createSSLContext();
        SSLEngine engine = context.createSSLEngine();
       
        params.add("enabledProtocols", stringArrayToString(engine.getEnabledProtocols()));
        params.add("enabledCipherSuites", stringArrayToString(engine.getEnabledCipherSuites()));
       
        if (scp.getSecureSocketProtocol() != null) {
View Full Code Here


        final String[] enabledProtocols;
        try {
            // use default SSP to create supported non-SSL protocols list
            final SSLContext sslContext = new SSLContextParameters().createSSLContext();
            enabledProtocols = sslContext.createSSLEngine().getEnabledProtocols();
        } catch (GeneralSecurityException e) {
            throw ObjectHelper.wrapRuntimeCamelException(e);
        } catch (IOException e) {
            throw ObjectHelper.wrapRuntimeCamelException(e);
        }
View Full Code Here

         public void initChannel(Channel channel) throws Exception
         {
            final ChannelPipeline pipeline = channel.pipeline();
            if (sslEnabled && !useServlet)
            {
               SSLEngine engine = context.createSSLEngine();

               engine.setUseClientMode(true);

               engine.setWantClientAuth(true);
View Full Code Here

            managers = tmf.getTrustManagers();
          }

          SSLContext sslContext = SSLContext.getInstance("TLS");
          sslContext.init(null, managers, null);
          SSLEngine sslEngine = sslContext.createSSLEngine();
          sslEngine.setUseClientMode(true);
          // addFirst() will make SSL handling the first stage of decoding
          // and the last stage of encoding this must be added after
          // adding compression handling above
          pipeline.addFirst("ssl", new SslHandler(sslEngine));
View Full Code Here

                } else {
                    sslContext.init(null, null, null);
                }
            }

            SSLEngine engine = sslContext.createSSLEngine();

            String sslProtocolsValue =
                    (String) userProperties.get(SSL_PROTOCOLS_PROPERTY);
            if (sslProtocolsValue != null) {
                engine.setEnabledProtocols(sslProtocolsValue.split(","));
View Full Code Here

         {
            Map<String, ChannelHandler> handlers = new LinkedHashMap<String, ChannelHandler>();

            if (sslEnabled)
            {
               SSLEngine engine = context.createSSLEngine();

               engine.setUseClientMode(false);

               if (needClientAuth)
                  engine.setNeedClientAuth(true);
View Full Code Here

         public void initChannel(Channel channel) throws Exception
         {
            ChannelPipeline pipeline = channel.pipeline();
            if (sslEnabled)
            {
               SSLEngine engine = context.createSSLEngine();

               engine.setUseClientMode(false);

               if (needClientAuth)
                  engine.setNeedClientAuth(true);
View Full Code Here

         public void initChannel(Channel channel) throws Exception
         {
            ChannelPipeline pipeline = channel.pipeline();
            if (sslEnabled)
            {
               SSLEngine engine = context.createSSLEngine();

               engine.setUseClientMode(false);

               if (needClientAuth)
                  engine.setNeedClientAuth(true);
View Full Code Here

         {
            List<ChannelHandler> handlers = new ArrayList<ChannelHandler>();

            if (sslEnabled)
            {
               SSLEngine engine = context.createSSLEngine();

               engine.setUseClientMode(true);

               engine.setWantClientAuth(true);
View Full Code Here

         {
            Map<String, ChannelHandler> handlers = new LinkedHashMap<String, ChannelHandler>();

            if (sslEnabled)
            {
               SSLEngine engine = context.createSSLEngine();

               engine.setUseClientMode(false);

               SslHandler handler = new SslHandler(engine);
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.