diff --git a/core/java/src/net/i2p/data/EncryptedLeaseSet.java b/core/java/src/net/i2p/data/EncryptedLeaseSet.java index f83f6c0460..bfc980b908 100644 --- a/core/java/src/net/i2p/data/EncryptedLeaseSet.java +++ b/core/java/src/net/i2p/data/EncryptedLeaseSet.java @@ -994,13 +994,17 @@ public class EncryptedLeaseSet extends LeaseSet2 { pkf.createIfAbsent(SigType.EdDSA_SHA512_Ed25519); System.out.println("Online test"); java.io.File f2 = new java.io.File("online-encls2.dat"); - test(pkf, f2, false, BlindData.AUTH_NONE, null); + //test(pkf, f2, false, BlindData.AUTH_NONE, null); List keys = new java.util.ArrayList(4); for (int i = 0; i < 4; i++) { - keys.add(net.i2p.crypto.KeyGenerator.getInstance().generatePKIKeys(net.i2p.crypto.EncType.ECIES_X25519)); + KeyPair kp = net.i2p.crypto.KeyGenerator.getInstance().generatePKIKeys(net.i2p.crypto.EncType.ECIES_X25519); + keys.add(kp); + System.out.println("Client key " + i + ":\n Private: " + kp.getPrivate() + "\n Public: " + kp.getPublic()); } - System.out.println("Online test with DH Keys"); - test(pkf, f2, false, BlindData.AUTH_DH, keys); + //f2 = new java.io.File("online-encls2-dh.dat"); + //System.out.println("Online test with DH Keys"); + //test(pkf, f2, false, BlindData.AUTH_DH, keys); + f2 = new java.io.File("online-encls2-psk.dat"); System.out.println("Online test with PSK Keys"); test(pkf, f2, false, BlindData.AUTH_PSK, keys); //System.out.println("Offline test"); @@ -1033,7 +1037,7 @@ public class EncryptedLeaseSet extends LeaseSet2 { net.i2p.crypto.KeyPair encKeys2 = net.i2p.crypto.KeyGenerator.getInstance().generatePKIKeys(net.i2p.crypto.EncType.ECIES_X25519); pubKey = encKeys2.getPublic(); ls2.addEncryptionKey(pubKey); - ls2.setSecret("foobar"); + //ls2.setSecret("foobar"); SigningPrivateKey spk = pkf.getSigningPrivKey(); if (offline) { now += 365*24*60*60*1000L; diff --git a/core/java/src/net/i2p/data/PrivateKey.java b/core/java/src/net/i2p/data/PrivateKey.java index 791af89bb0..ddbd628113 100644 --- a/core/java/src/net/i2p/data/PrivateKey.java +++ b/core/java/src/net/i2p/data/PrivateKey.java @@ -121,11 +121,14 @@ public class PrivateKey extends SimpleDataStructure implements Destroyable { public String toString() { StringBuilder buf = new StringBuilder(64); buf.append("[PrivateKey ").append(_type).append(' '); - int length = length(); if (_data == null) { buf.append("null"); } else { - buf.append("size: ").append(length); + int length = length(); + if (length <= 32) + buf.append(toBase64()); + else + buf.append("size: ").append(length); } buf.append(']'); return buf.toString(); diff --git a/core/java/src/net/i2p/data/PublicKey.java b/core/java/src/net/i2p/data/PublicKey.java index d6156d5a6d..2e182cb120 100644 --- a/core/java/src/net/i2p/data/PublicKey.java +++ b/core/java/src/net/i2p/data/PublicKey.java @@ -151,7 +151,11 @@ public class PublicKey extends SimpleDataStructure { if (_data == null) { buf.append("null"); } else { - buf.append("size: ").append(length()); + int length = length(); + if (length <= 32) + buf.append(toBase64()); + else + buf.append("size: ").append(length); } buf.append(']'); return buf.toString(); diff --git a/history.txt b/history.txt index ee775e9dfa..d0c9253099 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,12 @@ +2019-06-06 zzz + * CPUID/NBI: + - Add Skylake support (ticket #1869) + - Recognize more Intel "Lake" processors + +2019-06-05 zzz + * NetDb: Fix to set netDb ready immediately after reseed + * Util: Add EKU to selfsigned certs + 2019-06-03 zzz * Transport: Fix large messages in SSU (ticket #2505) diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index f2522cd4ed..7ca1a3ec2c 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -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 = 9; + public final static long BUILD = 10; /** for example "-test" */ public final static String EXTRA = "";