Hi,

My application currently works using non-secured xml-rpc communication.
I would like to adapt it to use SSL but I'm having some problems, namely the 
connection hangs when I try to execute any remote procedure.
The keystores were created with the java keytool and signed using OpenSSL, I've used 
them before as testkeys for secure communication using RMI and sockets.

Below are parts of my code for both server and client.

Thanks in advance and kind regards,

Wouter



This is a part of the server code:

        public XMLRPCServer(int port, String root, String keyStore, String keyPass) {
                this.port = port;
                
                // set the security parameters
                SecurityTool.setKeyStore(keyStore);
                SecurityTool.setKeyStorePassword(keyPass);
                SecurityTool.setKeyStoreType("JKS");
                SecurityTool.setKeyManagerType("SunX509");
                SecurityTool.setSecurityProtocol("TLS");
                
                SecureWebServer web = new SecureWebServer(port);
                web.addHandler("xmlhandler", new XMLHandler(web, root));
                
                web.start();
                System.out.println("Secure XML-RPC server listening op port " + port + 
"\n");
        }

And this is the code for the client:

        public void connect() throws Exception {
                // set the security parameters
                SecurityTool.setKeyStore(keyStore);
                SecurityTool.setKeyStorePassword(keyPass);
                SecurityTool.setKeyStoreType(keyStoreType);
                SecurityTool.setKeyManagerType(keyManager);
                SecurityTool.setSecurityProtocol("TLS");

                xmlrpc = new SecureXmlRpcClient(server, port);
                xmlrpc.setup();
                
                System.out.println("connected to " + xmlrpc.getURL());
        }       

Reply via email to