From 5ca98022ab73d625046dcb4eef345c9b659ab764 Mon Sep 17 00:00:00 2001 From: zzz Date: Thu, 10 Jan 2019 16:21:48 +0000 Subject: [PATCH] I2CP: Router-side stub for enc. ls2; throw for now --- core/java/src/net/i2p/data/i2cp/CreateLeaseSet2Message.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/java/src/net/i2p/data/i2cp/CreateLeaseSet2Message.java b/core/java/src/net/i2p/data/i2cp/CreateLeaseSet2Message.java index 311ea8b26..ae1fb0be9 100644 --- a/core/java/src/net/i2p/data/i2cp/CreateLeaseSet2Message.java +++ b/core/java/src/net/i2p/data/i2cp/CreateLeaseSet2Message.java @@ -107,10 +107,14 @@ public class CreateLeaseSet2Message extends CreateLeaseSetMessage { throw new I2CPMessageException("Unsupported sig type"); _signingPrivateKey = new SigningPrivateKey(stype); _signingPrivateKey.readBytes(in); - if (type == DatabaseEntry.KEY_TYPE_LS2) { + if (type == DatabaseEntry.KEY_TYPE_LS2 || + type == DatabaseEntry.KEY_TYPE_ENCRYPTED_LS2) { LeaseSet2 ls2 = (LeaseSet2) _leaseSet; // get one PrivateKey for each PublicKey + // TODO decrypt an encrypted LS so we can get the keys List pks = ls2.getEncryptionKeys(); + if (pks == null) + throw new I2CPMessageException("TODO decrypt"); for (PublicKey pk : pks) { EncType etype = pk.getType(); if (etype == null)