16913
|
1 |
/*
|
|
2 |
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
4 |
*
|
|
5 |
* This code is free software; you can redistribute it and/or modify it
|
|
6 |
* under the terms of the GNU General Public License version 2 only, as
|
|
7 |
* published by the Free Software Foundation. Oracle designates this
|
|
8 |
* particular file as subject to the "Classpath" exception as provided
|
|
9 |
* by Oracle in the LICENSE file that accompanied this code.
|
|
10 |
*
|
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that
|
|
15 |
* accompanied this code).
|
|
16 |
*
|
|
17 |
* You should have received a copy of the GNU General Public License version
|
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
20 |
*
|
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
22 |
* or visit www.oracle.com if you need additional information or have any
|
|
23 |
* questions.
|
|
24 |
*/
|
|
25 |
|
|
26 |
//
|
|
27 |
// SunJSSE does not support dynamic system properties, no way to re-use
|
|
28 |
// system properties in samevm/agentvm mode.
|
|
29 |
//
|
|
30 |
|
|
31 |
/*
|
|
32 |
* @test
|
|
33 |
* @bug 7030966
|
|
34 |
* @summary Support AEAD CipherSuites
|
|
35 |
* @run main/othervm ShortRSAKeyGCM PKIX TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
|
|
36 |
* @run main/othervm ShortRSAKeyGCM PKIX TLS_RSA_WITH_AES_128_GCM_SHA256
|
|
37 |
* @run main/othervm ShortRSAKeyGCM PKIX TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
|
|
38 |
* @run main/othervm ShortRSAKeyGCM PKIX TLS_DH_anon_WITH_AES_128_GCM_SHA256
|
|
39 |
*/
|
|
40 |
|
|
41 |
/*
|
|
42 |
* Need additional key materials to run the following cases.
|
|
43 |
*
|
|
44 |
* @run main/othervm ShortRSAKeyGCM PKIX TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
|
|
45 |
* @run main/othervm ShortRSAKeyGCM PKIX TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
|
|
46 |
* @run main/othervm ShortRSAKeyGCM PKIX TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
|
|
47 |
*
|
|
48 |
* Need unlimited JCE Unlimited Strength Jurisdiction Policy to run the
|
|
49 |
* following cases.
|
|
50 |
*
|
|
51 |
* @run main/othervm ShortRSAKeyGCM PKIX TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
|
|
52 |
* @run main/othervm ShortRSAKeyGCM PKIX TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
|
|
53 |
* @run main/othervm ShortRSAKeyGCM PKIX TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
|
|
54 |
* @run main/othervm ShortRSAKeyGCM PKIX TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
|
|
55 |
* @run main/othervm ShortRSAKeyGCM PKIX TLS_RSA_WITH_AES_256_GCM_SHA384
|
|
56 |
* @run main/othervm ShortRSAKeyGCM PKIX TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
|
|
57 |
* @run main/othervm ShortRSAKeyGCM PKIX TLS_DH_anon_WITH_AES_256_GCM_SHA384
|
|
58 |
*/
|
|
59 |
|
|
60 |
import java.net.*;
|
|
61 |
import java.util.*;
|
|
62 |
import java.io.*;
|
|
63 |
import javax.net.ssl.*;
|
|
64 |
import java.security.Security;
|
|
65 |
import java.security.KeyStore;
|
|
66 |
import java.security.KeyFactory;
|
|
67 |
import java.security.cert.Certificate;
|
|
68 |
import java.security.cert.CertificateFactory;
|
|
69 |
import java.security.spec.*;
|
|
70 |
import java.security.interfaces.*;
|
|
71 |
import sun.misc.BASE64Decoder;
|
|
72 |
|
|
73 |
|
|
74 |
public class ShortRSAKeyGCM {
|
|
75 |
|
|
76 |
/*
|
|
77 |
* =============================================================
|
|
78 |
* Set the various variables needed for the tests, then
|
|
79 |
* specify what tests to run on each side.
|
|
80 |
*/
|
|
81 |
|
|
82 |
/*
|
|
83 |
* Should we run the client or server in a separate thread?
|
|
84 |
* Both sides can throw exceptions, but do you have a preference
|
|
85 |
* as to which side should be the main thread.
|
|
86 |
*/
|
|
87 |
static boolean separateServerThread = true;
|
|
88 |
|
|
89 |
/*
|
|
90 |
* Where do we find the keystores?
|
|
91 |
*/
|
|
92 |
// Certificates and key used in the test.
|
|
93 |
static String trustedCertStr =
|
|
94 |
"-----BEGIN CERTIFICATE-----\n" +
|
|
95 |
"MIICkjCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADA7MQswCQYDVQQGEwJVUzEN\n" +
|
|
96 |
"MAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UwHhcN\n" +
|
|
97 |
"MTEwODE5MDE1MjE5WhcNMzIwNzI5MDE1MjE5WjA7MQswCQYDVQQGEwJVUzENMAsG\n" +
|
|
98 |
"A1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UwgZ8wDQYJ\n" +
|
|
99 |
"KoZIhvcNAQEBBQADgY0AMIGJAoGBAM8orG08DtF98TMSscjGsidd1ZoN4jiDpi8U\n" +
|
|
100 |
"ICz+9dMm1qM1d7O2T+KH3/mxyox7Rc2ZVSCaUD0a3CkhPMnlAx8V4u0H+E9sqso6\n" +
|
|
101 |
"iDW3JpOyzMExvZiRgRG/3nvp55RMIUV4vEHOZ1QbhuqG4ebN0Vz2DkRft7+flthf\n" +
|
|
102 |
"vDld6f5JAgMBAAGjgaUwgaIwHQYDVR0OBBYEFLl81dnfp0wDrv0OJ1sxlWzH83Xh\n" +
|
|
103 |
"MGMGA1UdIwRcMFqAFLl81dnfp0wDrv0OJ1sxlWzH83XhoT+kPTA7MQswCQYDVQQG\n" +
|
|
104 |
"EwJVUzENMAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2\n" +
|
|
105 |
"Y2WCAQAwDwYDVR0TAQH/BAUwAwEB/zALBgNVHQ8EBAMCAQYwDQYJKoZIhvcNAQEE\n" +
|
|
106 |
"BQADgYEALlgaH1gWtoBZ84EW8Hu6YtGLQ/L9zIFmHonUPZwn3Pr//icR9Sqhc3/l\n" +
|
|
107 |
"pVTxOINuFHLRz4BBtEylzRIOPzK3tg8XwuLb1zd0db90x3KBCiAL6E6cklGEPwLe\n" +
|
|
108 |
"XYMHDn9eDsaq861Tzn6ZwzMgw04zotPMoZN0mVd/3Qca8UJFucE=\n" +
|
|
109 |
"-----END CERTIFICATE-----";
|
|
110 |
|
|
111 |
static String targetCertStr =
|
|
112 |
"-----BEGIN CERTIFICATE-----\n" +
|
|
113 |
"MIICNDCCAZ2gAwIBAgIBDDANBgkqhkiG9w0BAQQFADA7MQswCQYDVQQGEwJVUzEN\n" +
|
|
114 |
"MAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UwHhcN\n" +
|
|
115 |
"MTExMTA3MTM1NTUyWhcNMzEwNzI1MTM1NTUyWjBPMQswCQYDVQQGEwJVUzENMAsG\n" +
|
|
116 |
"A1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UxEjAQBgNV\n" +
|
|
117 |
"BAMTCWxvY2FsaG9zdDBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQC3Pb49OSPfOD2G\n" +
|
|
118 |
"HSXFCFx1GJEZfqG9ZUf7xuIi/ra5dLjPGAaoY5QF2QOa8VnOriQCXDfyXHxsuRnE\n" +
|
|
119 |
"OomxL7EVAgMBAAGjeDB2MAsGA1UdDwQEAwID6DAdBgNVHQ4EFgQUXNCJK3/dtCIc\n" +
|
|
120 |
"xb+zlA/JINlvs/MwHwYDVR0jBBgwFoAUuXzV2d+nTAOu/Q4nWzGVbMfzdeEwJwYD\n" +
|
|
121 |
"VR0lBCAwHgYIKwYBBQUHAwEGCCsGAQUFBwMCBggrBgEFBQcDAzANBgkqhkiG9w0B\n" +
|
|
122 |
"AQQFAAOBgQB2qIDUxA2caMPpGtUACZAPRUtrGssCINIfItETXJZCx/cRuZ5sP4D9\n" +
|
|
123 |
"N1acoNDn0hCULe3lhXAeTC9NZ97680yJzregQMV5wATjo1FGsKY30Ma+sc/nfzQW\n" +
|
|
124 |
"+h/7RhYtoG0OTsiaDCvyhI6swkNJzSzrAccPY4+ZgU8HiDLzZTmM3Q==\n" +
|
|
125 |
"-----END CERTIFICATE-----";
|
|
126 |
|
|
127 |
// Private key in the format of PKCS#8, key size is 512 bits.
|
|
128 |
static String targetPrivateKey =
|
|
129 |
"MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAtz2+PTkj3zg9hh0l\n" +
|
|
130 |
"xQhcdRiRGX6hvWVH+8biIv62uXS4zxgGqGOUBdkDmvFZzq4kAlw38lx8bLkZxDqJ\n" +
|
|
131 |
"sS+xFQIDAQABAkByx/5Oo2hQ/w2q4L8z+NTRlJ3vdl8iIDtC/4XPnfYfnGptnpG6\n" +
|
|
132 |
"ZThQRvbMZiai0xHQPQMszvAHjZVme1eDl3EBAiEA3aKJHynPVCEJhpfCLWuMwX5J\n" +
|
|
133 |
"1LntwJO7NTOyU5m8rPECIQDTpzn5X44r2rzWBDna/Sx7HW9IWCxNgUD2Eyi2nA7W\n" +
|
|
134 |
"ZQIgJerEorw4aCAuzQPxiGu57PB6GRamAihEAtoRTBQlH0ECIQDN08FgTtnesgCU\n" +
|
|
135 |
"DFYLLcw1CiHvc7fZw4neBDHCrC8NtQIgA8TOUkGnpCZlQ0KaI8KfKWI+vxFcgFnH\n" +
|
|
136 |
"3fnqsTgaUs4=";
|
|
137 |
|
|
138 |
static char passphrase[] = "passphrase".toCharArray();
|
|
139 |
|
|
140 |
/*
|
|
141 |
* Is the server ready to serve?
|
|
142 |
*/
|
|
143 |
volatile static boolean serverReady = false;
|
|
144 |
|
|
145 |
/*
|
|
146 |
* Turn on SSL debugging?
|
|
147 |
*/
|
|
148 |
static boolean debug = false;
|
|
149 |
|
|
150 |
/*
|
|
151 |
* Define the server side of the test.
|
|
152 |
*
|
|
153 |
* If the server prematurely exits, serverReady will be set to true
|
|
154 |
* to avoid infinite hangs.
|
|
155 |
*/
|
|
156 |
void doServerSide() throws Exception {
|
|
157 |
SSLContext context = generateSSLContext(null, targetCertStr,
|
|
158 |
targetPrivateKey);
|
|
159 |
SSLServerSocketFactory sslssf = context.getServerSocketFactory();
|
|
160 |
SSLServerSocket sslServerSocket =
|
|
161 |
(SSLServerSocket)sslssf.createServerSocket(serverPort);
|
|
162 |
serverPort = sslServerSocket.getLocalPort();
|
|
163 |
|
|
164 |
/*
|
|
165 |
* Signal Client, we're ready for his connect.
|
|
166 |
*/
|
|
167 |
serverReady = true;
|
|
168 |
|
|
169 |
SSLSocket sslSocket = (SSLSocket)sslServerSocket.accept();
|
|
170 |
sslSocket.setEnabledCipherSuites(sslSocket.getSupportedCipherSuites());
|
|
171 |
InputStream sslIS = sslSocket.getInputStream();
|
|
172 |
OutputStream sslOS = sslSocket.getOutputStream();
|
|
173 |
|
|
174 |
sslIS.read();
|
|
175 |
sslOS.write('A');
|
|
176 |
sslOS.flush();
|
|
177 |
|
|
178 |
sslSocket.close();
|
|
179 |
}
|
|
180 |
|
|
181 |
/*
|
|
182 |
* Define the client side of the test.
|
|
183 |
*
|
|
184 |
* If the server prematurely exits, serverReady will be set to true
|
|
185 |
* to avoid infinite hangs.
|
|
186 |
*/
|
|
187 |
void doClientSide() throws Exception {
|
|
188 |
|
|
189 |
/*
|
|
190 |
* Wait for server to get started.
|
|
191 |
*/
|
|
192 |
while (!serverReady) {
|
|
193 |
Thread.sleep(50);
|
|
194 |
}
|
|
195 |
|
|
196 |
SSLContext context = generateSSLContext(trustedCertStr, null, null);
|
|
197 |
SSLSocketFactory sslsf = context.getSocketFactory();
|
|
198 |
|
|
199 |
SSLSocket sslSocket =
|
|
200 |
(SSLSocket)sslsf.createSocket("localhost", serverPort);
|
|
201 |
|
|
202 |
// enable TLSv1.2 only
|
|
203 |
sslSocket.setEnabledProtocols(new String[] {"TLSv1.2"});
|
|
204 |
|
|
205 |
// enable a block cipher
|
|
206 |
sslSocket.setEnabledCipherSuites(new String[] {cipherSuite});
|
|
207 |
|
|
208 |
InputStream sslIS = sslSocket.getInputStream();
|
|
209 |
OutputStream sslOS = sslSocket.getOutputStream();
|
|
210 |
|
|
211 |
sslOS.write('B');
|
|
212 |
sslOS.flush();
|
|
213 |
sslIS.read();
|
|
214 |
|
|
215 |
sslSocket.close();
|
|
216 |
}
|
|
217 |
|
|
218 |
/*
|
|
219 |
* =============================================================
|
|
220 |
* The remainder is just support stuff
|
|
221 |
*/
|
|
222 |
private static String tmAlgorithm; // trust manager
|
|
223 |
private static String cipherSuite; // cipher suite
|
|
224 |
|
|
225 |
private static void parseArguments(String[] args) {
|
|
226 |
tmAlgorithm = args[0];
|
|
227 |
cipherSuite = args[1];
|
|
228 |
}
|
|
229 |
|
|
230 |
private static SSLContext generateSSLContext(String trustedCertStr,
|
|
231 |
String keyCertStr, String keySpecStr) throws Exception {
|
|
232 |
|
|
233 |
// generate certificate from cert string
|
|
234 |
CertificateFactory cf = CertificateFactory.getInstance("X.509");
|
|
235 |
|
|
236 |
// create a key store
|
|
237 |
KeyStore ks = KeyStore.getInstance("JKS");
|
|
238 |
ks.load(null, null);
|
|
239 |
|
|
240 |
// import the trused cert
|
|
241 |
Certificate trusedCert = null;
|
|
242 |
ByteArrayInputStream is = null;
|
|
243 |
if (trustedCertStr != null) {
|
|
244 |
is = new ByteArrayInputStream(trustedCertStr.getBytes());
|
|
245 |
trusedCert = cf.generateCertificate(is);
|
|
246 |
is.close();
|
|
247 |
|
|
248 |
ks.setCertificateEntry("RSA Export Signer", trusedCert);
|
|
249 |
}
|
|
250 |
|
|
251 |
if (keyCertStr != null) {
|
|
252 |
// generate the private key.
|
|
253 |
PKCS8EncodedKeySpec priKeySpec = new PKCS8EncodedKeySpec(
|
|
254 |
new BASE64Decoder().decodeBuffer(keySpecStr));
|
|
255 |
KeyFactory kf = KeyFactory.getInstance("RSA");
|
|
256 |
RSAPrivateKey priKey =
|
|
257 |
(RSAPrivateKey)kf.generatePrivate(priKeySpec);
|
|
258 |
|
|
259 |
// generate certificate chain
|
|
260 |
is = new ByteArrayInputStream(keyCertStr.getBytes());
|
|
261 |
Certificate keyCert = cf.generateCertificate(is);
|
|
262 |
is.close();
|
|
263 |
|
|
264 |
Certificate[] chain = null;
|
|
265 |
if (trusedCert != null) {
|
|
266 |
chain = new Certificate[2];
|
|
267 |
chain[0] = keyCert;
|
|
268 |
chain[1] = trusedCert;
|
|
269 |
} else {
|
|
270 |
chain = new Certificate[1];
|
|
271 |
chain[0] = keyCert;
|
|
272 |
}
|
|
273 |
|
|
274 |
// import the key entry.
|
|
275 |
ks.setKeyEntry("Whatever", priKey, passphrase, chain);
|
|
276 |
}
|
|
277 |
|
|
278 |
// create SSL context
|
|
279 |
TrustManagerFactory tmf = TrustManagerFactory.getInstance(tmAlgorithm);
|
|
280 |
tmf.init(ks);
|
|
281 |
|
|
282 |
SSLContext ctx = SSLContext.getInstance("TLS");
|
|
283 |
if (keyCertStr != null && !keyCertStr.isEmpty()) {
|
|
284 |
KeyManagerFactory kmf = KeyManagerFactory.getInstance("NewSunX509");
|
|
285 |
kmf.init(ks, passphrase);
|
|
286 |
|
|
287 |
ctx.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
|
|
288 |
ks = null;
|
|
289 |
} else {
|
|
290 |
ctx.init(null, tmf.getTrustManagers(), null);
|
|
291 |
}
|
|
292 |
|
|
293 |
return ctx;
|
|
294 |
}
|
|
295 |
|
|
296 |
|
|
297 |
// use any free port by default
|
|
298 |
volatile int serverPort = 0;
|
|
299 |
|
|
300 |
volatile Exception serverException = null;
|
|
301 |
volatile Exception clientException = null;
|
|
302 |
|
|
303 |
public static void main(String[] args) throws Exception {
|
|
304 |
// reset the security property to make sure that the algorithms
|
|
305 |
// and keys used in this test are not disabled.
|
|
306 |
Security.setProperty("jdk.certpath.disabledAlgorithms", "MD2");
|
|
307 |
|
|
308 |
if (debug) {
|
|
309 |
System.setProperty("javax.net.debug", "all");
|
|
310 |
}
|
|
311 |
|
|
312 |
/*
|
|
313 |
* Get the customized arguments.
|
|
314 |
*/
|
|
315 |
parseArguments(args);
|
|
316 |
|
|
317 |
/*
|
|
318 |
* Start the tests.
|
|
319 |
*/
|
|
320 |
new ShortRSAKeyGCM();
|
|
321 |
}
|
|
322 |
|
|
323 |
Thread clientThread = null;
|
|
324 |
Thread serverThread = null;
|
|
325 |
|
|
326 |
/*
|
|
327 |
* Primary constructor, used to drive remainder of the test.
|
|
328 |
*
|
|
329 |
* Fork off the other side, then do your work.
|
|
330 |
*/
|
|
331 |
ShortRSAKeyGCM() throws Exception {
|
|
332 |
try {
|
|
333 |
if (separateServerThread) {
|
|
334 |
startServer(true);
|
|
335 |
startClient(false);
|
|
336 |
} else {
|
|
337 |
startClient(true);
|
|
338 |
startServer(false);
|
|
339 |
}
|
|
340 |
} catch (Exception e) {
|
|
341 |
// swallow for now. Show later
|
|
342 |
}
|
|
343 |
|
|
344 |
/*
|
|
345 |
* Wait for other side to close down.
|
|
346 |
*/
|
|
347 |
if (separateServerThread) {
|
|
348 |
serverThread.join();
|
|
349 |
} else {
|
|
350 |
clientThread.join();
|
|
351 |
}
|
|
352 |
|
|
353 |
/*
|
|
354 |
* When we get here, the test is pretty much over.
|
|
355 |
* Which side threw the error?
|
|
356 |
*/
|
|
357 |
Exception local;
|
|
358 |
Exception remote;
|
|
359 |
String whichRemote;
|
|
360 |
|
|
361 |
if (separateServerThread) {
|
|
362 |
remote = serverException;
|
|
363 |
local = clientException;
|
|
364 |
whichRemote = "server";
|
|
365 |
} else {
|
|
366 |
remote = clientException;
|
|
367 |
local = serverException;
|
|
368 |
whichRemote = "client";
|
|
369 |
}
|
|
370 |
|
|
371 |
/*
|
|
372 |
* If both failed, return the curthread's exception, but also
|
|
373 |
* print the remote side Exception
|
|
374 |
*/
|
|
375 |
if ((local != null) && (remote != null)) {
|
|
376 |
System.out.println(whichRemote + " also threw:");
|
|
377 |
remote.printStackTrace();
|
|
378 |
System.out.println();
|
|
379 |
throw local;
|
|
380 |
}
|
|
381 |
|
|
382 |
if (remote != null) {
|
|
383 |
throw remote;
|
|
384 |
}
|
|
385 |
|
|
386 |
if (local != null) {
|
|
387 |
throw local;
|
|
388 |
}
|
|
389 |
}
|
|
390 |
|
|
391 |
void startServer(boolean newThread) throws Exception {
|
|
392 |
if (newThread) {
|
|
393 |
serverThread = new Thread() {
|
|
394 |
public void run() {
|
|
395 |
try {
|
|
396 |
doServerSide();
|
|
397 |
} catch (Exception e) {
|
|
398 |
/*
|
|
399 |
* Our server thread just died.
|
|
400 |
*
|
|
401 |
* Release the client, if not active already...
|
|
402 |
*/
|
|
403 |
System.err.println("Server died..." + e);
|
|
404 |
serverReady = true;
|
|
405 |
serverException = e;
|
|
406 |
}
|
|
407 |
}
|
|
408 |
};
|
|
409 |
serverThread.start();
|
|
410 |
} else {
|
|
411 |
try {
|
|
412 |
doServerSide();
|
|
413 |
} catch (Exception e) {
|
|
414 |
serverException = e;
|
|
415 |
} finally {
|
|
416 |
serverReady = true;
|
|
417 |
}
|
|
418 |
}
|
|
419 |
}
|
|
420 |
|
|
421 |
void startClient(boolean newThread) throws Exception {
|
|
422 |
if (newThread) {
|
|
423 |
clientThread = new Thread() {
|
|
424 |
public void run() {
|
|
425 |
try {
|
|
426 |
doClientSide();
|
|
427 |
} catch (Exception e) {
|
|
428 |
/*
|
|
429 |
* Our client thread just died.
|
|
430 |
*/
|
|
431 |
System.err.println("Client died..." + e);
|
|
432 |
clientException = e;
|
|
433 |
}
|
|
434 |
}
|
|
435 |
};
|
|
436 |
clientThread.start();
|
|
437 |
} else {
|
|
438 |
try {
|
|
439 |
doClientSide();
|
|
440 |
} catch (Exception e) {
|
|
441 |
clientException = e;
|
|
442 |
}
|
|
443 |
}
|
|
444 |
}
|
|
445 |
}
|