forked from I2P_Developers/i2p.i2p
Console: Drop old proof page
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
package net.i2p.router.web.helpers;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import net.i2p.data.DataHelper;
|
||||
import net.i2p.data.router.RouterAddress;
|
||||
import net.i2p.data.router.RouterInfo;
|
||||
import net.i2p.data.Signature;
|
||||
import net.i2p.router.web.HelperBase;
|
||||
|
||||
/**
|
||||
* Sign a statement about this router.
|
||||
* @since 0.9.8
|
||||
*/
|
||||
public class ProofHelper extends HelperBase {
|
||||
|
||||
public String getProof() {
|
||||
StringBuilder buf = new StringBuilder(512);
|
||||
RouterInfo us = _context.router().getRouterInfo();
|
||||
buf.append("Hash: ").append(us.getIdentity().calculateHash().toBase64()).append('\n');
|
||||
//buf.append("Ident: ").append(us.getIdentity().toBase64()).append('\n');
|
||||
for (RouterAddress addr : us.getAddresses()) {
|
||||
buf.append(addr.getTransportStyle()).append(": ").append(addr.getHost()).append('\n');
|
||||
}
|
||||
buf.append("Caps: ").append(us.getCapabilities()).append('\n');
|
||||
buf.append("Date: ").append(new Date()); // no trailing newline
|
||||
String msg = buf.toString();
|
||||
byte[] data = DataHelper.getUTF8(msg);
|
||||
Signature sig = _context.dsa().sign(data, _context.keyManager().getSigningPrivateKey());
|
||||
buf.setLength(0);
|
||||
buf.append("---BEGIN I2P SIGNED MESSAGE---\n");
|
||||
buf.append(msg);
|
||||
buf.append("\n---BEGIN I2P SIGNATURE---\n");
|
||||
buf.append(sig.toBase64());
|
||||
buf.append("\n---END I2P SIGNATURE---");
|
||||
return buf.toString();
|
||||
}
|
||||
}
|
||||
@@ -531,15 +531,6 @@ class SummaryBarRenderer {
|
||||
.append("</a>\n");
|
||||
svcs.put(tx, rbuf.toString());
|
||||
|
||||
tx = _t("Proof");
|
||||
rbuf.setLength(0);
|
||||
rbuf.append("<a title=\"")
|
||||
.append(_t("Signed proof of ownership of this router"))
|
||||
.append("\" href=\"/proof\" target=\"_top\">")
|
||||
.append(nbsp(tx))
|
||||
.append("</a>\n");
|
||||
svcs.put(tx, rbuf.toString());
|
||||
|
||||
tx = _t("Stats");
|
||||
rbuf.setLength(0);
|
||||
rbuf.append("<a href=\"/stats\" target=\"_top\" title=\"")
|
||||
|
||||
Reference in New Issue
Block a user