Changeset c555bb6c for router


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
  • router/java/src/net/i2p/router/client/ClientMessageEventListener.java

    r1bb57c4 rc555bb6c  
    1313
    1414import net.i2p.CoreVersion;
     15import net.i2p.crypto.EncType;
    1516import net.i2p.crypto.SigType;
    1617import net.i2p.data.DatabaseEntry;
     
    269270        }
    270271        props.putAll(inProps);
     272        String senc = props.getProperty("i2cp.leaseSetEncType");
     273        if (senc != null) {
     274            String[] senca = DataHelper.split(senc, ",");
     275            for (String sencaa : senca) {
     276                EncType type = EncType.parseEncType(sencaa);
     277                if (type != null) {
     278                    if (!type.isAvailable()) {
     279                        String msg = "Unsupported crypto type: " + type;
     280                        _log.error(msg);
     281                        _runner.disconnectClient(msg);
     282                        return;
     283                    }
     284                } else {
     285                    String msg = "Unsupported crypto type: " + sencaa;
     286                    _log.error(msg);
     287                    _runner.disconnectClient(msg);
     288                    return;
     289                }
     290            }
     291        }
    271292        if ("7".equals(props.getProperty("i2cp.leaseSetType"))) {
    272293            // Prevent tunnel builds for Meta LS
Note: See TracChangeset for help on using the changeset viewer.