Log tweaks, bump -10

This commit is contained in:
zzz
2019-06-06 15:00:35 +00:00
parent e75881d6cc
commit e50bf00fa8
5 changed files with 29 additions and 9 deletions

View File

@ -994,13 +994,17 @@ public class EncryptedLeaseSet extends LeaseSet2 {
pkf.createIfAbsent(SigType.EdDSA_SHA512_Ed25519); pkf.createIfAbsent(SigType.EdDSA_SHA512_Ed25519);
System.out.println("Online test"); System.out.println("Online test");
java.io.File f2 = new java.io.File("online-encls2.dat"); 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<KeyPair> keys = new java.util.ArrayList<KeyPair>(4); List<KeyPair> keys = new java.util.ArrayList<KeyPair>(4);
for (int i = 0; i < 4; i++) { 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"); //f2 = new java.io.File("online-encls2-dh.dat");
test(pkf, f2, false, BlindData.AUTH_DH, keys); //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"); System.out.println("Online test with PSK Keys");
test(pkf, f2, false, BlindData.AUTH_PSK, keys); test(pkf, f2, false, BlindData.AUTH_PSK, keys);
//System.out.println("Offline test"); //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); net.i2p.crypto.KeyPair encKeys2 = net.i2p.crypto.KeyGenerator.getInstance().generatePKIKeys(net.i2p.crypto.EncType.ECIES_X25519);
pubKey = encKeys2.getPublic(); pubKey = encKeys2.getPublic();
ls2.addEncryptionKey(pubKey); ls2.addEncryptionKey(pubKey);
ls2.setSecret("foobar"); //ls2.setSecret("foobar");
SigningPrivateKey spk = pkf.getSigningPrivKey(); SigningPrivateKey spk = pkf.getSigningPrivKey();
if (offline) { if (offline) {
now += 365*24*60*60*1000L; now += 365*24*60*60*1000L;

View File

@ -121,11 +121,14 @@ public class PrivateKey extends SimpleDataStructure implements Destroyable {
public String toString() { public String toString() {
StringBuilder buf = new StringBuilder(64); StringBuilder buf = new StringBuilder(64);
buf.append("[PrivateKey ").append(_type).append(' '); buf.append("[PrivateKey ").append(_type).append(' ');
int length = length();
if (_data == null) { if (_data == null) {
buf.append("null"); buf.append("null");
} else { } else {
buf.append("size: ").append(length); int length = length();
if (length <= 32)
buf.append(toBase64());
else
buf.append("size: ").append(length);
} }
buf.append(']'); buf.append(']');
return buf.toString(); return buf.toString();

View File

@ -151,7 +151,11 @@ public class PublicKey extends SimpleDataStructure {
if (_data == null) { if (_data == null) {
buf.append("null"); buf.append("null");
} else { } else {
buf.append("size: ").append(length()); int length = length();
if (length <= 32)
buf.append(toBase64());
else
buf.append("size: ").append(length);
} }
buf.append(']'); buf.append(']');
return buf.toString(); return buf.toString();

View File

@ -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 2019-06-03 zzz
* Transport: Fix large messages in SSU (ticket #2505) * Transport: Fix large messages in SSU (ticket #2505)

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 = 9; public final static long BUILD = 10;
/** for example "-test" */ /** for example "-test" */
public final static String EXTRA = ""; public final static String EXTRA = "";