From b7262aa592e7b51bf3dce2aa3bb79ad66c7fa12c Mon Sep 17 00:00:00 2001
From: zzz <zzz@i2pmail.org>
Date: Fri, 22 Jan 2021 08:43:47 -0500
Subject: [PATCH] Console: Drop old proof page

---
 .../i2p/router/web/helpers/ProofHelper.java   |  38 -----------
 .../web/helpers/SummaryBarRenderer.java       |   9 ---
 apps/routerconsole/jsp/proof.jsp              |  14 ----
 .../jsp/themes/console/dark/console.css       |  39 -----------
 .../themes/console/images/info/rosette.png    | Bin 1083 -> 0 bytes
 .../jsp/themes/console/light/console.css      |  64 +-----------------
 .../jsp/themes/console/light/console_ar.css   |   2 +-
 7 files changed, 4 insertions(+), 162 deletions(-)
 delete mode 100644 apps/routerconsole/java/src/net/i2p/router/web/helpers/ProofHelper.java
 delete mode 100644 apps/routerconsole/jsp/proof.jsp
 delete mode 100644 apps/routerconsole/jsp/themes/console/images/info/rosette.png

diff --git a/apps/routerconsole/java/src/net/i2p/router/web/helpers/ProofHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/helpers/ProofHelper.java
deleted file mode 100644
index 47d3f55cc8..0000000000
--- a/apps/routerconsole/java/src/net/i2p/router/web/helpers/ProofHelper.java
+++ /dev/null
@@ -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();
-    }
-}
diff --git a/apps/routerconsole/java/src/net/i2p/router/web/helpers/SummaryBarRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/helpers/SummaryBarRenderer.java
index 085ea15dd7..61446bbe93 100644
--- a/apps/routerconsole/java/src/net/i2p/router/web/helpers/SummaryBarRenderer.java
+++ b/apps/routerconsole/java/src/net/i2p/router/web/helpers/SummaryBarRenderer.java
@@ -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=\"")
diff --git a/apps/routerconsole/jsp/proof.jsp b/apps/routerconsole/jsp/proof.jsp
deleted file mode 100644
index 7f74b6a06c..0000000000
--- a/apps/routerconsole/jsp/proof.jsp
+++ /dev/null
@@ -1,14 +0,0 @@
-<%@page contentType="text/html"%>
-<%@page pageEncoding="UTF-8"%>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head>
-<%@include file="css.jsi" %>
-<%=intl.title("Proof")%>
-<%@include file="summaryajax.jsi" %>
-</head><body>
-<%@include file="summary.jsi" %><h1>Proof of Ownership</h1>
-<div class="main" id="proof"><p>
-<jsp:useBean class="net.i2p.router.web.helpers.ProofHelper" id="proofHelper" scope="request" />
-<jsp:setProperty name="proofHelper" property="contextId" value="<%=i2pcontextId%>" />
-<textarea cols="70" rows="15" wrap="off" readonly="readonly" spellcheck="false"><jsp:getProperty name="proofHelper" property="proof" /></textarea>
-</p></div></body></html>
diff --git a/apps/routerconsole/jsp/themes/console/dark/console.css b/apps/routerconsole/jsp/themes/console/dark/console.css
index 67c355d358..6d4e80be35 100644
--- a/apps/routerconsole/jsp/themes/console/dark/console.css
+++ b/apps/routerconsole/jsp/themes/console/dark/console.css
@@ -4994,30 +4994,6 @@ ul#banlist + hr {
      margin-right: 5px;
 }
 
-#proof p {
-     margin: 15px;
-     padding: 30px 5px 0;
-     border: 1px solid #000;
-     border-radius: 2px;
-     box-shadow: inset 0 0 0 1px #020, 0 0 1px #000;
-     background: url(/themes/console/images/info/rosette.png) right 8px top 8px no-repeat #001900;
-     background: url(/themes/console/images/info/rosette.png) right 8px top 8px no-repeat rgba(0,32,0,0.4);
-     background-blend-mode: color-burn;
-}
-
-#proof textarea {
-     line-height: 160%;
-     font-size: 9pt;
-     overflow: hidden;
-     word-break: break-all;
-     white-space: pre-wrap;
-     height: 200px;
-}
-
-#proof textarea:focus {
-     outline: none;
-}
-
 #oldconsole p {
      margin: 15px 0 10px;
      padding: 10px 20px;
@@ -5445,21 +5421,6 @@ table#leasesetdebug th a:hover, table#leasesetsummary th a:hover {
      width: 100%;
 }
 
-.main#proof {
-     padding: 0;
-}
-
-.main#proof textarea, .main#proof textarea:focus {
-     padding: 5px 20px;
-     margin: 0;
-     width: 100%;
-     border: none;
-     background: none !important;
-     box-shadow: none;
-     color: #e6e6e7 !important;
-     filter: none;
-}
-
 #leasesetdebug, #leasesetsummary {
      margin-bottom: 14px;
 }
diff --git a/apps/routerconsole/jsp/themes/console/images/info/rosette.png b/apps/routerconsole/jsp/themes/console/images/info/rosette.png
deleted file mode 100644
index 2884f873d4fe4973f182543f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!yNZ9zRk>wm|3sm(ruyFq&x
zo3*~$2rNd*B0R*ouelw;-BO!v2zSVOxg)?gz;6WGZZq&vSbGO>4EPzi4A_*_reDBd
z6>)@)kZT;yzJW`nHa`$ttr~;lV_Q&n0!VGjB;A1Gv0#1G37ibh0$tqO6gfCsP>)3e
z>#GrhkCjHTM&?T+5NyM%1Y%DUlR>z{z!z1Kuc&gjhTz;VaE-`nb5Oug6H^z%MKoIz
zUoW-!o~Axx#KDZf^)*3`6K;PDIl!C~?!{($f$I~%Mgs2_z$t?5A*41>0Gn!NoD3Jw
zLPEzi;bOkLCjND3N{-;0;gaz8RGJg6+NRBZ2fLzx_0=fw+%k_fDz$m0G7`eGUhf0p
z!!->73`=bmvbyvM^?N!F?Q+0ON^KT^VV1G`e*qsbKIS+k^UMGM002ovPDHLkV1m<t
B^)&zh

diff --git a/apps/routerconsole/jsp/themes/console/light/console.css b/apps/routerconsole/jsp/themes/console/light/console.css
index 90c3db2d34..531b6571b2 100644
--- a/apps/routerconsole/jsp/themes/console/light/console.css
+++ b/apps/routerconsole/jsp/themes/console/light/console.css
@@ -1270,7 +1270,7 @@ p:empty + .sb_notice {
      box-shadow: inset 0 0 0 1px #dee2e6;
 }
 
-.news, .main#news, .main#proof, .main#oldconsole, #warning2 {
+.news, .main#news, .main#oldconsole, #warning2 {
      background: #f6f6fa;
      background-size: 100% 100%, auto 160px, 100% 100% !important;
 }
@@ -1292,7 +1292,7 @@ p:empty + .sb_notice {
      min-width: 546px;
 }
 
-.main#proof, .main#oldconsole {
+.main#oldconsole {
      background-size: 100% 100%, auto 70%, 100% 100% !important;
 }
 
@@ -6423,7 +6423,7 @@ h3#ntcpcon, h3#udpcon {
      margin-bottom: 1px;
 }
 
-#oldconsole p, #proof p {
+#oldconsole p {
      margin: 20px 5px 10px;
      padding: 10px 0;
      line-height: 180%;
@@ -6441,39 +6441,6 @@ h3#ntcpcon, h3#udpcon {
      text-align: right;
 }
 
-#proof textarea, #proof textarea:focus, #proof p {
-     margin: 0 !important;
-     padding: 0 !important;
-}
-
-#proof p {
-     margin: 15px 0 5px !important;
-     padding: 15px 0 0 20px !important;
-     width: calc(100% - 22px);
-}
-
-#proof p::before {
-     content: "";
-     display: inline-block;
-     background: url(/themes/console/images/info/rosette.png) right 5px top no-repeat !important;
-     background-size: 24px 24px;
-     height: 32px;
-     width: 100%;
-     margin: -8px 0 -10px;
-     opacity: 0.7;
-}
-
-#proof textarea, #proof textarea:focus {
-     background: none;
-     border: none;
-     box-shadow: none;
-     color: #33333f !important;
-     filter: none;
-     outline: none;
-     line-height: 160%;
-     height: 200px;
-}
-
 .homelinkedit th:first-child, #sidebarconf th:first-child, #consolepass th:first-child {
      text-align: center;
      background: #f6f6ff url(/themes/console/images/buttons/delete.png) center center no-repeat !important;
@@ -7429,17 +7396,6 @@ input[name="pluginURL"] {
      padding-left: 8px;
 }
 
-.main#proof {
-     padding: 0;
-     min-width: 576px;
-}
-
-.main#proof textarea {
-     margin: -5px 10px !important;
-     word-break: break-all;
-     white-space: pre-wrap;
-}
-
 .cells {
      padding: 3px 2px !important;
 }
@@ -7502,20 +7458,6 @@ input[name="pluginURL"] {
      width: 100px;
      overflow: auto;
 }
-
-#proof p {
-     border: none;
-     box-shadow: none;
-     background: none;
-}
-
-#proof p::before {
-     display: inline;
-}
-
-#proof textarea {
-     padding-right: 15px !important;
-}
 }
 
 @media screen and (max-width: 1500px) {
diff --git a/apps/routerconsole/jsp/themes/console/light/console_ar.css b/apps/routerconsole/jsp/themes/console/light/console_ar.css
index 10d89082f1..05aa63db6d 100644
--- a/apps/routerconsole/jsp/themes/console/light/console_ar.css
+++ b/apps/routerconsole/jsp/themes/console/light/console_ar.css
@@ -10,7 +10,7 @@ pre {
      text-align: right;
 }
 
-#help pre, #logs li, #proof textarea {
+#help pre, #logs li {
      text-align: left;
      direction: ltr;
 }
-- 
GitLab