mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-28 07:46:14 +08:00
Merge remote-tracking branch 'origin/Ghidra_12.1'
This commit is contained in:
@@ -78,7 +78,8 @@ public class GhidraServer extends UnicastRemoteObject implements GhidraServerHan
|
||||
|
||||
private static String HELP_FILE = "ServerHelp.txt";
|
||||
private static String USAGE_ARGS =
|
||||
"[-ip <hostname>] [-i #.#.#.#] [-p#] [-n] [-a#] [-d<ad_domain>] [-e<days>] [-jaas <config_file>] [-u] [-autoProvision] [-anonymous] [-ssh] <repository_path>";
|
||||
"[-ip <hostname>] [-ipAlt <hostname>[,...]] [-i #.#.#.#] [-p#] [-n] [-a#] [-d<ad_domain>]" +
|
||||
" [-e<days>] [-jaas <config_file>] [-u] [-autoProvision] [-anonymous] [-ssh] <repository_path>";
|
||||
|
||||
private static final String RMI_SERVER_PROPERTY = "java.rmi.server.hostname";
|
||||
|
||||
@@ -539,6 +540,7 @@ public class GhidraServer extends UnicastRemoteObject implements GhidraServerHan
|
||||
int defaultPasswordExpiration = -1;
|
||||
boolean autoProvision = false;
|
||||
File jaasConfigFile = null;
|
||||
Set<String> altNames = new TreeSet<>();
|
||||
|
||||
// Network name resolution disabled by default
|
||||
InetNameLookup.setLookupEnabled(false);
|
||||
@@ -588,6 +590,23 @@ public class GhidraServer extends UnicastRemoteObject implements GhidraServerHan
|
||||
System.exit(-1);
|
||||
}
|
||||
}
|
||||
else if (s.startsWith("-ipAlt")) { // self-signed cert alt subject names
|
||||
int nextArgIndex = i + 1;
|
||||
String hostname;
|
||||
if (s.length() == 6 && nextArgIndex < args.length) {
|
||||
hostname = args[++i];
|
||||
}
|
||||
else {
|
||||
hostname = s.substring(6);
|
||||
}
|
||||
for (String h : hostname.trim().split(";")) {
|
||||
if (hostname.length() == 0 || hostname.startsWith("-")) {
|
||||
displayUsage("Missing -ipAlt altName");
|
||||
System.exit(-1);
|
||||
}
|
||||
altNames.add(h);
|
||||
}
|
||||
}
|
||||
else if (s.startsWith("-ip")) { // setting server remote access hostname
|
||||
int nextArgIndex = i + 1;
|
||||
String hostname;
|
||||
@@ -793,7 +812,6 @@ public class GhidraServer extends UnicastRemoteObject implements GhidraServerHan
|
||||
DefaultKeyManagerFactory.addSubjectAlternativeName(hostname);
|
||||
|
||||
// Collect alternate hostnames for inclusion in certificate
|
||||
Set<String> altNames = new TreeSet<>();
|
||||
Enumeration<NetworkInterface> nets = NetworkInterface.getNetworkInterfaces();
|
||||
while (nets.hasMoreElements()) {
|
||||
NetworkInterface netint = nets.nextElement();
|
||||
|
||||
Reference in New Issue
Block a user