* Message, I2PSession, SessionKeyManager, Console:

Prep for SessionKeyManager work in the router -
      Fix up SKM renderStatusHTML(); add debug.jsp to see it;
      Redefine getClientSessionKeyManager();
      More cleanups
This commit is contained in:
zzz
2009-08-23 16:12:09 +00:00
parent 7e547743c7
commit 5a4c2de425
8 changed files with 115 additions and 45 deletions

View File

@ -0,0 +1,30 @@
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>DEBUG</title>
<%@include file="css.jsp" %>
</head><body>
<%@include file="summary.jsp" %>
<div class="main" id="main">
<%
/*
* Quick and easy place to put debugging stuff
*/
net.i2p.router.RouterContext ctx = (net.i2p.router.RouterContext) net.i2p.I2PAppContext.getGlobalContext();
/*
* Print out the status for all the SessionKeyManagers
*/
out.print("<h1>Router SKM</h1>");
ctx.sessionKeyManager().renderStatusHTML(out);
java.util.Set<net.i2p.data.Destination> clients = ctx.clientManager().listClients();
for (net.i2p.data.Destination dest : clients) {
net.i2p.data.Hash h = dest.calculateHash();
net.i2p.crypto.SessionKeyManager skm = ctx.clientManager().getClientSessionKeyManager(h);
if (skm != null) {
out.print("<h1>" + h.toBase64().substring(0,6) + " SKM</h1>");
skm.renderStatusHTML(out);
}
}
%>
</div></body></html>