forked from I2P_Developers/i2p.i2p
Console: Show SAM cert on /certs
Stub for jetty cert
This commit is contained in:
@ -20,6 +20,8 @@ public class CertHelper extends HelperBase {
|
|||||||
private static final String I2CP = "i2cp/i2cp.local.crt";
|
private static final String I2CP = "i2cp/i2cp.local.crt";
|
||||||
private static final String CONSOLE = "console/console.local.crt";
|
private static final String CONSOLE = "console/console.local.crt";
|
||||||
private static final String I2PTUNNEL_DIR = "i2ptunnel";
|
private static final String I2PTUNNEL_DIR = "i2ptunnel";
|
||||||
|
private static final String SAM_DIR = "sam";
|
||||||
|
private static final String EEPSITE = "eepsite/etc/keystore.ks";
|
||||||
|
|
||||||
public String getSummary() {
|
public String getSummary() {
|
||||||
File dir = new File(_context.getConfigDir(), DIR);
|
File dir = new File(_context.getConfigDir(), DIR);
|
||||||
@ -31,6 +33,7 @@ public class CertHelper extends HelperBase {
|
|||||||
output("Console", new File(dir, CONSOLE));
|
output("Console", new File(dir, CONSOLE));
|
||||||
// I2CP
|
// I2CP
|
||||||
output("I2CP", new File(dir, I2CP));
|
output("I2CP", new File(dir, I2CP));
|
||||||
|
|
||||||
// i2ptunnel clients
|
// i2ptunnel clients
|
||||||
File tunnelDir = new File(_context.getConfigDir(), I2PTUNNEL_DIR);
|
File tunnelDir = new File(_context.getConfigDir(), I2PTUNNEL_DIR);
|
||||||
boolean hasTunnels = false;
|
boolean hasTunnels = false;
|
||||||
@ -53,6 +56,28 @@ public class CertHelper extends HelperBase {
|
|||||||
if (!hasTunnels)
|
if (!hasTunnels)
|
||||||
output(_t("I2PTunnel"), null);
|
output(_t("I2PTunnel"), null);
|
||||||
|
|
||||||
|
// SAM
|
||||||
|
tunnelDir = new File(dir, SAM_DIR);
|
||||||
|
hasTunnels = false;
|
||||||
|
tunnels = tunnelDir.listFiles();
|
||||||
|
if (tunnels != null) {
|
||||||
|
for (int i = 0; i < tunnels.length; i++) {
|
||||||
|
File f = tunnels[i];
|
||||||
|
if (!f.isFile())
|
||||||
|
continue;
|
||||||
|
String name = f.getName();
|
||||||
|
if (!name.endsWith(".local.crt"))
|
||||||
|
continue;
|
||||||
|
if (!name.startsWith("sam-"))
|
||||||
|
continue;
|
||||||
|
output("SAM", f);
|
||||||
|
hasTunnels = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!hasTunnels)
|
||||||
|
output(_t("SAM"), null);
|
||||||
|
|
||||||
|
// Family
|
||||||
_out.write("<h3>");
|
_out.write("<h3>");
|
||||||
_out.write(_t("Local Router Family Certificate"));
|
_out.write(_t("Local Router Family Certificate"));
|
||||||
_out.write("</h3>\n");
|
_out.write("</h3>\n");
|
||||||
@ -67,6 +92,19 @@ public class CertHelper extends HelperBase {
|
|||||||
_out.write("</p>\n");
|
_out.write("</p>\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Eepsite
|
||||||
|
_out.write("<h3>");
|
||||||
|
_out.write(_t("Website"));
|
||||||
|
_out.write("</h3>\n");
|
||||||
|
File ks = new File(_context.getConfigDir(), EEPSITE);
|
||||||
|
if (ks.exists()) {
|
||||||
|
// TODO
|
||||||
|
} else {
|
||||||
|
_out.write("<p>");
|
||||||
|
_out.write(_t("none"));
|
||||||
|
_out.write("</p>\n");
|
||||||
|
}
|
||||||
|
|
||||||
// anything else? plugins?
|
// anything else? plugins?
|
||||||
|
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2018-03-04 zzz
|
||||||
|
* i2ptunnel: Fix multipart config for /register
|
||||||
|
* KeyStore: Log expiration of self-signed certs
|
||||||
|
|
||||||
2018-03-03 zzz
|
2018-03-03 zzz
|
||||||
* Utils:
|
* Utils:
|
||||||
- Skip IPs of down interfaces on Windows
|
- Skip IPs of down interfaces on Windows
|
||||||
|
@ -18,7 +18,7 @@ public class RouterVersion {
|
|||||||
/** deprecated */
|
/** deprecated */
|
||||||
public final static String ID = "Monotone";
|
public final static String ID = "Monotone";
|
||||||
public final static String VERSION = CoreVersion.VERSION;
|
public final static String VERSION = CoreVersion.VERSION;
|
||||||
public final static long BUILD = 11;
|
public final static long BUILD = 12;
|
||||||
|
|
||||||
/** for example "-test" */
|
/** for example "-test" */
|
||||||
public final static String EXTRA = "";
|
public final static String EXTRA = "";
|
||||||
|
Reference in New Issue
Block a user