added tests for TLS Authentication

This commit is contained in:
Aidan Hahn 2019-05-21 13:25:50 -07:00
parent 5724953e9d
commit 77e0cb3450
No known key found for this signature in database
GPG key ID: 327711E983899316
3 changed files with 212 additions and 1 deletions

View file

@ -105,6 +105,8 @@ public class JobServClient {
* sendNewJobMessage()
* sends a shell command to the api server
* returns new pid of job
* or -1 if server failed to create job
* or -2 if failed to connect to API
*/
public int sendNewJobMessage(String command) {
// thought of escaping this, but the vulnerability is only client side, from client user input.
@ -120,7 +122,7 @@ public class JobServClient {
response = blockingStub.newJob(request);
} catch (StatusRuntimeException e) {
logger.log(Level.WARNING, "(API Failure) Request for new job failed: " + e.getStatus());
return -1;
return -2;
}
if(response.getPid() == -1) {