* Console: Show unavailable crypto on /logs

* Router: Log warnings for unavailable crypto at startup
This commit is contained in:
zzz
2014-08-30 19:00:57 +00:00
parent 8a7c3390f5
commit fa1c077fdd
6 changed files with 109 additions and 4 deletions

View File

@ -9,6 +9,7 @@ import java.util.ArrayList;
import java.util.List;
import net.i2p.I2PAppContext;
import net.i2p.crypto.SigType;
import net.i2p.util.FileUtil;
import net.i2p.util.VersionComparator;
@ -29,6 +30,17 @@ public class LogsHelper extends HelperBase {
return Server.getVersion();
}
/** @since 0.9.15 */
public String getUnavailableCrypto() {
StringBuilder buf = new StringBuilder(128);
for (SigType t : SigType.values()) {
if (!t.isAvailable()) {
buf.append("<b>Crypto:</b> ").append(t.toString()).append(" unavailable<br>");
}
}
return buf.toString();
}
/**
* Does not call logManager.flush(); call getCriticalLogs() first to flush
*/