usr/src/test/java/src/client/ConnectTest.java
changeset 862 f20f2afa6263
parent 838 82fe4c8f2260
equal deleted inserted replaced
861:98a84e2ccca6 862:f20f2afa6263
   173 	String[] auxargs = new String[] { "-t",
   173 	String[] auxargs = new String[] { "-t",
   174 	    "tcp:localonly=false,port=" + port
   174 	    "tcp:localonly=false,port=" + port
   175 	};
   175 	};
   176 
   176 
   177 	// Set up server.
   177 	// Set up server.
   178 	setUpCommon(auxargs, "/usr/lib/rad/transport/mod_xport_tcp.so");
   178 	setUpCommon(auxargs, "/usr/lib/rad/transport/mod_tcp.so");
   179 	testConnection(getMBSC());
   179 	testConnection(getMBSC());
   180 
   180 
   181 	// Perform test.
   181 	// Perform test.
   182 	JMXConnector conn = JMXConnectorFactory.connect(new JMXServiceURL(
   182 	JMXConnector conn = JMXConnectorFactory.connect(new JMXServiceURL(
   183 	    "service:jmx:" + RadConnector.PROTOCOL_TCP + "://" + host + ":" +
   183 	    "service:jmx:" + RadConnector.PROTOCOL_TCP + "://" + host + ":" +
   200 	    ",generate=true"
   200 	    ",generate=true"
   201 	};
   201 	};
   202 
   202 
   203 	// Set up server.
   203 	// Set up server.
   204 	setUpTestDir();
   204 	setUpTestDir();
   205 	setUpCommon(auxargs, "/usr/lib/rad/transport/mod_xport_tls.so");
   205 	setUpCommon(auxargs, "/usr/lib/rad/transport/mod_tls.so");
   206 	MBeanServerConnection xxx = getMBSC();
   206 	MBeanServerConnection xxx = getMBSC();
   207 	// testConnection(xxx);
   207 	// testConnection(xxx);
   208 
   208 
   209 	// Set up trust store.
   209 	// Set up trust store.
   210 	File trustStore = getTrustStoreFile();
   210 	File trustStore = getTrustStoreFile();
   235 	    ",peercred=" + auth
   235 	    ",peercred=" + auth
   236 	};
   236 	};
   237 
   237 
   238 	// Set up server.
   238 	// Set up server.
   239 	setUpTestDir();
   239 	setUpTestDir();
   240 	setUpCommon(auxargs, "/usr/lib/rad/transport/mod_xport_unix.so");
   240 	setUpCommon(auxargs, "/usr/lib/rad/transport/mod_unix.so");
   241 
   241 
   242         testConnection(getMBSC());
   242         testConnection(getMBSC());
   243 
   243 
   244 	// Perform test.
   244 	// Perform test.
   245         JMXConnector conn = JMXConnectorFactory.connect(new JMXServiceURL(
   245         JMXConnector conn = JMXConnectorFactory.connect(new JMXServiceURL(
   258     protected void connectRemoteTCP(String host, int port) throws Exception {
   258     protected void connectRemoteTCP(String host, int port) throws Exception {
   259 	String[] auxargs = new String[] { "-t",
   259 	String[] auxargs = new String[] { "-t",
   260 	    "tcp:localonly=false,port=" + port
   260 	    "tcp:localonly=false,port=" + port
   261 	};
   261 	};
   262 	String[] modules = new String[] {
   262 	String[] modules = new String[] {
   263 	    "/usr/lib/rad/transport/mod_xport_tcp.so"
   263 	    "/usr/lib/rad/transport/mod_tcp.so"
   264 	};
   264 	};
   265 
   265 
   266 	// Set up server.
   266 	// Set up server.
   267 	setUpCommon("service:jmx:" +
   267 	setUpCommon("service:jmx:" +
   268 	    RadJMXSSHPrivateConnector.PROTOCOL_SSH_PRIVATE +
   268 	    RadJMXSSHPrivateConnector.PROTOCOL_SSH_PRIVATE +
   290 	    "tls:localonly=false,port=" + port +
   290 	    "tls:localonly=false,port=" + port +
   291 	    ",certificate=" + getRemoteCertificateFile().getAbsolutePath() +
   291 	    ",certificate=" + getRemoteCertificateFile().getAbsolutePath() +
   292 	    ",privatekey=" + getRemotePrivateKeyFile().getAbsolutePath()
   292 	    ",privatekey=" + getRemotePrivateKeyFile().getAbsolutePath()
   293 	};
   293 	};
   294 	String[] modules = new String[] {
   294 	String[] modules = new String[] {
   295 	    "/usr/lib/rad/transport/mod_xport_tls.so"
   295 	    "/usr/lib/rad/transport/mod_tls.so"
   296 	};
   296 	};
   297 
   297 
   298 	// Set up server.
   298 	// Set up server.
   299 	setUpCommon("service:jmx:" +
   299 	setUpCommon("service:jmx:" +
   300 	    RadJMXSSHPrivateConnector.PROTOCOL_SSH_PRIVATE +
   300 	    RadJMXSSHPrivateConnector.PROTOCOL_SSH_PRIVATE +
   346 	    "tls:localonly=false,port=" + port +
   346 	    "tls:localonly=false,port=" + port +
   347 	    ",certificate=" + getRemoteCertificateFile().getAbsolutePath() +
   347 	    ",certificate=" + getRemoteCertificateFile().getAbsolutePath() +
   348 	    ",privatekey=" + getRemotePrivateKeyFile().getAbsolutePath()
   348 	    ",privatekey=" + getRemotePrivateKeyFile().getAbsolutePath()
   349 	};
   349 	};
   350 	String[] modules = new String[] {
   350 	String[] modules = new String[] {
   351 	    "/usr/lib/rad/transport/mod_xport_tls.so"
   351 	    "/usr/lib/rad/transport/mod_tls.so"
   352 	};
   352 	};
   353 
   353 
   354 	// Set up server.
   354 	// Set up server.
   355 	setUpCommon("service:jmx:" +
   355 	setUpCommon("service:jmx:" +
   356 	    RadJMXSSHPrivateConnector.PROTOCOL_SSH_PRIVATE +
   356 	    RadJMXSSHPrivateConnector.PROTOCOL_SSH_PRIVATE +