Examples of SslRMIClientSocketFactory


Examples of javax.rmi.ssl.SslRMIClientSocketFactory

    }

    protected void bind() throws RemoteException, NamingException {
        final Remote stub;
        if (RMI_PROTOCOL.equals(ServerConstants.RMI_PROTOCOL_JRMP_SSL)) {
            stub = (Remote) UnicastRemoteObject.exportObject(this, _exportPort, new SslRMIClientSocketFactory(), new SslRMIServerSocketFactory());
        } else {
            assert (RMI_PROTOCOL.equals("jrmp"));
            stub = (Remote) UnicastRemoteObject.exportObject(this, _exportPort);
        }
        // Bind the remote object's stub in the registry
View Full Code Here

Examples of javax.rmi.ssl.SslRMIClientSocketFactory

        //if(System.getSecurityManager() == null) {// create and install a security manager
        //    System.setSecurityManager(new RMISecurityManager());
        //}
        final Remote stub;
        if(rmiProtocol.equals(RMI_PROTOCOL_JRMP_SSL)) {
            stub = UnicastRemoteObject.exportObject(this, exportPort, new SslRMIClientSocketFactory(), new SslRMIServerSocketFactory());
        } else {
            assert (rmiProtocol.equals(RMI_PROTOCOL_JRMP));
            stub = UnicastRemoteObject.exportObject(this, exportPort, TimeoutSocketProdiver.createClientSocketFactory(), null);
        }
        try {// bind the remote object's stub in the registry
View Full Code Here

Examples of javax.rmi.ssl.SslRMIClientSocketFactory

            log.warn("Using unsecured JMX remote access!");
        }

        if (jmxInformation.isRemoteSSL()) {
            log.info("Activated SSL communication");
            env.put("jmx.remote.rmi.client.socket.factory", new SslRMIClientSocketFactory());
            env.put("jmx.remote.rmi.server.socket.factory", new SslRMIServerSocketFactory());
        }
       
        return env;
    }
View Full Code Here

Examples of javax.rmi.ssl.SslRMIClientSocketFactory

            }

            CurrentActor.get().message(ManagementConsoleMessages.SSL_KEYSTORE(keyStore.getName()));

            //create the SSL RMI socket factories
            csf = new SslRMIClientSocketFactory();
            ssf = new QpidSslRMIServerSocketFactory(sslContext);
        }
        else
        {
            //Do not specify any specific RMI socket factories, resulting in use of the defaults.
View Full Code Here

Examples of javax.rmi.ssl.SslRMIClientSocketFactory

    }

    private void setupSsl() throws GeneralSecurityException {
        SSLServerSocketFactory sslServerSocketFactory = keystoreManager.createSSLServerFactory(null, secureProtocol, algorithm, keyStore, keyAlias, trustStore, keyStoreAvailabilityTimeout);
        RMIServerSocketFactory rmiServerSocketFactory = new KarafSslRMIServerSocketFactory(sslServerSocketFactory, this.isClientAuth());
        RMIClientSocketFactory rmiClientSocketFactory = new SslRMIClientSocketFactory();
        environment.put(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE, rmiServerSocketFactory);
        environment.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, rmiClientSocketFactory);
        // TODO secure RMI connector as well ?
        // environment.put("com.sun.jndi.rmi.factory.socket", rmiClientSocketFactory);
    }
View Full Code Here

Examples of javax.rmi.ssl.SslRMIClientSocketFactory

            RMIClientSocketFactory csf = null;
            RMIServerSocketFactory ssf = null;

            // Configure SSL for RMI connection if required
            if (rmiSSL) {
                csf = new SslRMIClientSocketFactory();
                ssf = new SslRMIServerSocketFactory(ciphers, protocols,
                            clientAuth);
            }
           
            // Force the use of local ports if required
View Full Code Here

Examples of javax.rmi.ssl.SslRMIClientSocketFactory

       
        this.url = new JMXServiceURL(url);
        this.environment = new HashMap();
        this.environment.put(JMXConnector.CREDENTIALS, new String[] {username, password});
        if (secure) {
            SslRMIClientSocketFactory csf = new SslRMIClientSocketFactory();
            this.environment.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, csf);
        }

        log.debug("Initialized with URL: " + url + ", environment: " + environment);
    }
View Full Code Here

Examples of javax.rmi.ssl.SslRMIClientSocketFactory

            log.warn("Starting unauthenticating JMXConnector for " + jmxServiceURL);
        }
       
        SSLServerSocketFactory sssf = keystoreManager.createSSLServerFactory(null, secureProtocol, algorithm, keyStore, keyAlias, trustStore, classLoader);
        RMIServerSocketFactory rssf = new GeronimoSslRMIServerSocketFactory(sssf, clientAuth);
        RMIClientSocketFactory rcsf = new SslRMIClientSocketFactory();
        env.put(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE, rssf);
        env.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, rcsf);
       
        server = JMXConnectorServerFactory.newJMXConnectorServer(jmxServiceURL, env, mbeanServer);
        NotificationFilterSupport filter = new NotificationFilterSupport();
View Full Code Here

Examples of javax.rmi.ssl.SslRMIClientSocketFactory

               System.setProperty("javax.net.ssl.keyStorePassword",
                       _serverConfiguration.getManagementKeyStorePassword());
            }

            //create the SSL RMI socket factories
            csf = new SslRMIClientSocketFactory();
            ssf = new SslRMIServerSocketFactory();
        }
        else
        {
            //Do not specify any specific RMI socket factories, resulting in use of the defaults.
View Full Code Here

Examples of javax.rmi.ssl.SslRMIClientSocketFactory

    Map map = new HashMap();
    map.put(JMXConnector.CREDENTIALS, new String[] { user, password });
        String connectorName = "/JMXConnector";
        if (secure) {
            connectorName = "/JMXSecureConnector";
            SslRMIClientSocketFactory csf = new SslRMIClientSocketFactory();
            map.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, csf);
        }
    Kernel kernel = null;
    try {
      JMXServiceURL address = new JMXServiceURL(
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.