I2CP: Don't put ECIES first in LS2

This commit is contained in:
zzz
2019-11-20 15:01:22 +00:00
parent 5e67f4232a
commit 7b391fa17a
3 changed files with 37 additions and 3 deletions

View File

@ -73,6 +73,8 @@ class RequestLeaseSetMessageHandler extends HandlerImpl {
private static final String PROP_DH = "i2cp.leaseSetClient.dh."; private static final String PROP_DH = "i2cp.leaseSetClient.dh.";
private static final String PROP_PSK = "i2cp.leaseSetClient.psk."; private static final String PROP_PSK = "i2cp.leaseSetClient.psk.";
private static final boolean PREFER_NEW_ENC = false;
public RequestLeaseSetMessageHandler(I2PAppContext context) { public RequestLeaseSetMessageHandler(I2PAppContext context) {
this(context, RequestLeaseSetMessage.MESSAGE_TYPE); this(context, RequestLeaseSetMessage.MESSAGE_TYPE);
} }
@ -239,6 +241,8 @@ class RequestLeaseSetMessageHandler extends HandlerImpl {
List<EncType> types = new ArrayList<EncType>(2); List<EncType> types = new ArrayList<EncType>(2);
String senc = session.getOptions().getProperty(PROP_LS_ENCTYPE); String senc = session.getOptions().getProperty(PROP_LS_ENCTYPE);
if (senc != null) { if (senc != null) {
if (!PREFER_NEW_ENC && senc.equals("4,0"))
senc = "0,4";
String[] senca = DataHelper.split(senc, ","); String[] senca = DataHelper.split(senc, ",");
for (String sencaa : senca) { for (String sencaa : senca) {
EncType newtype = EncType.parseEncType(sencaa); EncType newtype = EncType.parseEncType(sencaa);
@ -483,7 +487,7 @@ class RequestLeaseSetMessageHandler extends HandlerImpl {
* @param types must be available * @param types must be available
*/ */
public LeaseInfo(Destination dest, List<EncType> types) { public LeaseInfo(Destination dest, List<EncType> types) {
if (types.size() > 1) { if (types.size() > 1 && PREFER_NEW_ENC) {
Collections.sort(types, Collections.reverseOrder()); Collections.sort(types, Collections.reverseOrder());
} }
_privKeys = new ArrayList<PrivateKey>(types.size()); _privKeys = new ArrayList<PrivateKey>(types.size());

View File

@ -1,5 +1,35 @@
2019-11-20 zzz
* I2CP:
- Prevent an uncaught OCMOSJ exception from killing the session
- Don't put ECIES first in LS2
2019-11-17 zzz
* SSU: Lower ACKSender log level (ticket #2651)
2019-11-16 zzz
* Transport: Save IPv6 firewalled state across restarts (ticket #2175)
2019-11-15 zzz
* Console: Fix plugin icon-code images
* i2psnark: Don't start tunnels when autostart enabled but no
torrents set to autostart (ticket #2662)
* SSU: Remove redundant field (ticket #2659)
2019-11-14 zzz
* Transport:
- Fixes for IPv6 firewalled logic (ticket #2175)
- Fix SSU log value (ticket #2652)
- Remove unused currentReceiveSecond (ticket #2661)
2019-11-13 zzz
* Console: Hide buttons on /configkeyring if no entries
* i2ptunnel: Don't delay after ConnectException if stopped
(fixes zzzot stop delay)
2019-11-12 zzz 2019-11-12 zzz
* i2psnark: Audio playlist support * i2psnark:
- Audio playlist support
- Restrict mime types for HTML5 players
2019-11-11 zzz 2019-11-11 zzz
* KeyGenerator: Use new PrivateKey constructor * KeyGenerator: Use new PrivateKey constructor

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */ /** deprecated */
public final static String ID = "Monotone"; public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION; public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 4; public final static long BUILD = 5;
/** for example "-test" */ /** for example "-test" */
public final static String EXTRA = ""; public final static String EXTRA = "";