forked from I2P_Developers/i2p.i2p
Console: Change selfsigned cert cname to localhost (ticket #2160)
This commit is contained in:
@ -861,8 +861,7 @@ public class RouterConsoleRunner implements RouterApp {
|
|||||||
private boolean createKeyStore(File ks) {
|
private boolean createKeyStore(File ks) {
|
||||||
// make a random 48 character password (30 * 8 / 5)
|
// make a random 48 character password (30 * 8 / 5)
|
||||||
String keyPassword = KeyStoreUtil.randomString();
|
String keyPassword = KeyStoreUtil.randomString();
|
||||||
// and one for the cname
|
String cname = "localhost";
|
||||||
String cname = KeyStoreUtil.randomString() + ".console.i2p.net";
|
|
||||||
boolean success = KeyStoreUtil.createKeys(ks, "console", cname, "Console", keyPassword);
|
boolean success = KeyStoreUtil.createKeys(ks, "console", cname, "Console", keyPassword);
|
||||||
if (success) {
|
if (success) {
|
||||||
success = ks.exists();
|
success = ks.exists();
|
||||||
@ -884,7 +883,7 @@ public class RouterConsoleRunner implements RouterApp {
|
|||||||
}
|
}
|
||||||
if (success) {
|
if (success) {
|
||||||
System.err.println("Created self-signed certificate for " + cname + " in keystore: " + ks.getAbsolutePath() + "\n" +
|
System.err.println("Created self-signed certificate for " + cname + " in keystore: " + ks.getAbsolutePath() + "\n" +
|
||||||
"The certificate name was generated randomly, and is not associated with your " +
|
"The certificate was generated randomly, and is not associated with your " +
|
||||||
"IP address, host name, router identity, or destination keys.");
|
"IP address, host name, router identity, or destination keys.");
|
||||||
} else {
|
} else {
|
||||||
System.err.println("Failed to create console SSL keystore.\n" +
|
System.err.println("Failed to create console SSL keystore.\n" +
|
||||||
|
Reference in New Issue
Block a user