Changeset c555bb6c for apps


Ignore:
Timestamp:
Jan 30, 2019 7:33:15 PM (16 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
4eb9368
Parents:
1bb57c4
Message:

i2cp.leaseSetEncType param:
Support comma-separated values,
check param in session config,
support stored EncTypes? in private keys.
Show types and multiple keys on LS debug page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/helpers/NetDbRenderer.java

    r1bb57c4 rc555bb6c  
    2626import java.util.TreeSet;
    2727
     28import net.i2p.crypto.EncType;
    2829import net.i2p.crypto.SigType;
    2930import net.i2p.data.DatabaseEntry;
     
    3435import net.i2p.data.LeaseSet;
    3536import net.i2p.data.LeaseSet2;
     37import net.i2p.data.PublicKey;
    3638import net.i2p.data.router.RouterAddress;
    3739import net.i2p.data.router.RouterInfo;
     
    534536                //buf.append(dest.toBase32()).append("<br>");
    535537                buf.append("<b>Signature type:</b> ").append(dest.getSigningPublicKey().getType());
    536                 if (type != DatabaseEntry.KEY_TYPE_META_LS2)
    537                     buf.append("&nbsp;&nbsp;<b>Encryption Key:</b> ").append(ls.getEncryptionKey().toBase64().substring(0, 20)).append("&hellip;");
     538                if (type == DatabaseEntry.KEY_TYPE_LEASESET) {
     539                    buf.append("</td></tr>\n<tr><td colspan=\"2\"><b>Encryption Key:</b> ELGAMAL_2048 ")
     540                       .append(ls.getEncryptionKey().toBase64().substring(0, 20))
     541                       .append("&hellip;");
     542                } else if (type == DatabaseEntry.KEY_TYPE_LS2) {
     543                    LeaseSet2 ls2 = (LeaseSet2) ls;
     544                    for (PublicKey pk : ls2.getEncryptionKeys()) {
     545                        buf.append("</td></tr>\n<tr><td colspan=\"2\"><b>Encryption Key:</b> ");
     546                        EncType etype = pk.getType();
     547                        if (etype != null)
     548                            buf.append(etype);
     549                        else
     550                            buf.append("Unsupported type ").append(pk.getUnknownTypeCode());
     551                        buf.append(' ')
     552                           .append(pk.toBase64().substring(0, 20))
     553                           .append("&hellip;");
     554                    }
     555                }
    538556                buf.append("</td></tr>\n<tr><td colspan=\"2\">");
    539557                buf.append("<b>Routing Key:</b> ").append(ls.getRoutingKey().toBase64());
Note: See TracChangeset for help on using the changeset viewer.