I2CP: Fix encrypted leaseset for ECIES and dual-key encryption, and for offline keys

This commit is contained in:
zzz
2020-12-23 10:05:58 -05:00
parent 8f5fc44755
commit 7b785ea454
3 changed files with 11 additions and 9 deletions

View File

@@ -99,14 +99,8 @@ class RequestLeaseSetMessageHandler extends HandlerImpl {
protected boolean requiresLS2(I2PSessionImpl session) {
if (!session.supportsLS2())
return false;
if (session.isOffline())
return true;
String s = session.getOptions().getProperty(PROP_LS_ENCTYPE);
if (s != null) {
if (!s.equals("0") && !s.equals("ELGAMAL_2048"))
return true;
}
s = session.getOptions().getProperty(PROP_LS_TYPE);
// we do this check first because we must set _ls2Type regardless
String s = session.getOptions().getProperty(PROP_LS_TYPE);
if (s != null) {
try {
int type = Integer.parseInt(s);
@@ -119,6 +113,13 @@ class RequestLeaseSetMessageHandler extends HandlerImpl {
return true;
}
}
if (session.isOffline())
return true;
s = session.getOptions().getProperty(PROP_LS_ENCTYPE);
if (s != null) {
if (!s.equals("0") && !s.equals("ELGAMAL_2048"))
return true;
}
return false;
}

View File

@@ -1,5 +1,6 @@
2020-12-23 zzz
* Crypto: Increase ratchet tag window
* I2CP: Fix encrypted leaseset for ECIES and offline keys
2020-12-22 zzz
* Console:

View File

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