forked from I2P_Developers/i2p.i2p
Blinding:
- Fix bugs with lookup password - Log tweaks
This commit is contained in:
@ -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 = 6;
|
||||
public final static long BUILD = 7;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
|
@ -551,6 +551,13 @@ class ClientMessageEventListener implements I2CPMessageReader.I2CPMessageEventLi
|
||||
Destination dest = cfg.getDestination();
|
||||
if (type == DatabaseEntry.KEY_TYPE_ENCRYPTED_LS2) {
|
||||
// so we can decrypt it
|
||||
// secret must be set before destination
|
||||
String secret = cfg.getOptions().getProperty("i2cp.leaseSetSecret");
|
||||
if (secret != null) {
|
||||
EncryptedLeaseSet encls = (EncryptedLeaseSet) ls;
|
||||
secret = DataHelper.getUTF8(Base64.decode(secret));
|
||||
encls.setSecret(secret);
|
||||
}
|
||||
try {
|
||||
ls.setDestination(dest);
|
||||
} catch (RuntimeException re) {
|
||||
@ -652,12 +659,6 @@ class ClientMessageEventListener implements I2CPMessageReader.I2CPMessageEventLi
|
||||
_runner.disconnectClient("Duplicate hash of encrypted LS2");
|
||||
return;
|
||||
}
|
||||
String secret = cfg.getOptions().getProperty("i2cp.leaseSetSecret");
|
||||
if (secret != null) {
|
||||
EncryptedLeaseSet encls = (EncryptedLeaseSet) ls;
|
||||
secret = DataHelper.getUTF8(Base64.decode(secret));
|
||||
encls.setSecret(secret);
|
||||
}
|
||||
}
|
||||
if (_log.shouldDebug())
|
||||
_log.debug("Publishing: " + ls);
|
||||
|
@ -946,16 +946,16 @@ public abstract class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacad
|
||||
if (_log.shouldWarn())
|
||||
_log.warn("Found blind data for encls: " + bd);
|
||||
encls = (EncryptedLeaseSet) leaseSet;
|
||||
// secret must be set before destination
|
||||
String secret = bd.getSecret();
|
||||
if (secret != null)
|
||||
encls.setSecret(secret);
|
||||
Destination dest = bd.getDestination();
|
||||
if (dest != null) {
|
||||
encls.setDestination(dest);
|
||||
} else {
|
||||
encls.setSigningKey(bd.getUnblindedPubKey());
|
||||
}
|
||||
// secret
|
||||
String secret = bd.getSecret();
|
||||
if (secret != null)
|
||||
encls.setSecret(secret);
|
||||
// per-client auth
|
||||
if (bd.getAuthType() != BlindData.AUTH_NONE)
|
||||
encls.setClientPrivateKey(bd.getAuthPrivKey());
|
||||
|
Reference in New Issue
Block a user