Skip to content
Snippets Groups Projects
Commit 98f40260 authored by Rob Adams's avatar Rob Adams
Browse files

Prompt for key store password when not given on command line

parent 4d63e68c
No related branches found
No related tags found
No related merge requests found
package org.sdnplatform.sync.client;
import java.io.BufferedReader;
import java.io.Console;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
......@@ -491,6 +492,12 @@ public class SyncClient {
}
SyncClient client = new SyncClient(settings);
if (settings.keyStorePath != null &&
settings.keyStorePassword == null) {
Console con = System.console();
char[] password = con.readPassword("Enter key store password: ");
settings.keyStorePassword = new String(password);
}
try {
if (false == client.connect()) {
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment