@@ -46,6 +46,7 @@ public class ClientServerTLSTest {
46
46
private static final int PROGNUM = 100017 ;
47
47
private static final int PROGVER = 1 ;
48
48
49
+ private static final int NULL = 0 ;
49
50
private static final int ECHO = 1 ;
50
51
private static final int UPPER = 2 ;
51
52
@@ -71,7 +72,7 @@ public class ClientServerTLSTest {
71
72
call .reply (s );
72
73
break ;
73
74
}
74
- case 0 : {
75
+ case NULL : {
75
76
call .reply (XdrVoid .XDR_VOID );
76
77
}
77
78
}
@@ -272,7 +273,7 @@ public void shouldFailWhenNoTLSOnClient() throws IOException {
272
273
RpcTransport t = clnt .connect (svc .getInetSocketAddress (IpProtocolType .TCP ));
273
274
clntCall = new RpcCall (PROGNUM , PROGVER , new RpcAuthTypeNone (), t );
274
275
// poke server to start tls
275
- clntCall .call (0 , XdrVoid .XDR_VOID , XdrVoid .XDR_VOID , new RpcAuthTypeTls ());
276
+ clntCall .call (NULL , XdrVoid .XDR_VOID , XdrVoid .XDR_VOID , new RpcAuthTypeTls ());
276
277
clntCall .getTransport ().startTLS ();
277
278
}
278
279
@@ -309,7 +310,7 @@ public void shouldFailSecondStartTLS() throws IOException {
309
310
RpcTransport t = clnt .connect (svc .getInetSocketAddress (IpProtocolType .TCP ));
310
311
clntCall = new RpcCall (PROGNUM , PROGVER , new RpcAuthTypeNone (), t );
311
312
// poke server to start tls
312
- clntCall .call (0 , XdrVoid .XDR_VOID , XdrVoid .XDR_VOID , new RpcAuthTypeTls ());
313
+ clntCall .call (NULL , XdrVoid .XDR_VOID , XdrVoid .XDR_VOID , new RpcAuthTypeTls ());
313
314
clntCall .getTransport ().startTLS ();
314
315
clntCall .getTransport ().startTLS ();
315
316
}
@@ -345,7 +346,7 @@ public void shouldRejectStartTlsWhenNotConfigured() throws IOException {
345
346
RpcTransport t = clnt .connect (svc .getInetSocketAddress (IpProtocolType .TCP ));
346
347
// poke server to start tls
347
348
clntCall = new RpcCall (PROGNUM , PROGVER , new RpcAuthTypeNone (), t );
348
- clntCall .call (0 , XdrVoid .XDR_VOID , XdrVoid .XDR_VOID , new RpcAuthTypeTls ());
349
+ clntCall .call (NULL , XdrVoid .XDR_VOID , XdrVoid .XDR_VOID , new RpcAuthTypeTls ());
349
350
}
350
351
351
352
@@ -385,9 +386,7 @@ public void shouldRejectTlsWhenClientCertRequired() throws IOException, Exceptio
385
386
RpcTransport t = clnt .connect (svc .getInetSocketAddress (IpProtocolType .TCP ));
386
387
clntCall = new RpcCall (PROGNUM , PROGVER , new RpcAuthTypeNone (), t );
387
388
388
- XdrString s = new XdrString ("hello" );
389
- XdrString reply = new XdrString ();
390
- clntCall .call (ECHO , s , reply );
389
+ clntCall .call (NULL , XdrVoid .XDR_VOID , new XdrVoid ());
391
390
}
392
391
393
392
public static SSLContext createClientSslContext (Certificate certificate ) throws Exception {
0 commit comments