diff --git a/router/java/src/net/i2p/router/crypto/ratchet/RatchetSKM.java b/router/java/src/net/i2p/router/crypto/ratchet/RatchetSKM.java index 35c596a316..33537013bd 100644 --- a/router/java/src/net/i2p/router/crypto/ratchet/RatchetSKM.java +++ b/router/java/src/net/i2p/router/crypto/ratchet/RatchetSKM.java @@ -650,7 +650,7 @@ public class RatchetSKM extends SessionKeyManager implements SessionTagListener int total = 0; int totalSets = 0; long now = _context.clock().now(); - long exp = now + SESSION_LIFETIME_MAX_MS; + long exp = now - SESSION_LIFETIME_MAX_MS; Set sets = new TreeSet(new RatchetTagSetComparator()); for (Map.Entry> e : inboundSets.entrySet()) { SessionKey skey = e.getKey(); @@ -665,7 +665,7 @@ public class RatchetSKM extends SessionKeyManager implements SessionTagListener total += size; buf.append("
  • ID: ").append(ts.getID()); buf.append(" created: ").append(DataHelper.formatTime(ts.getCreated())); - long expires = exp - ts.getDate(); + long expires = ts.getDate() - exp; if (expires > 0) buf.append(" expires in: ").append(DataHelper.formatDuration2(expires)).append(" with "); else @@ -686,7 +686,7 @@ public class RatchetSKM extends SessionKeyManager implements SessionTagListener // outbound totalSets = 0; - exp = now + SESSION_TAG_DURATION_MS; + exp = now - SESSION_TAG_DURATION_MS; Set outbound = getOutboundSessions(); for (OutboundSession sess : outbound) { sets.clear(); @@ -706,7 +706,7 @@ public class RatchetSKM extends SessionKeyManager implements SessionTagListener int size = ts.remaining(); buf.append("
  • ID: ").append(ts.getID()) .append(" created: ").append(DataHelper.formatTime(ts.getCreated())); - long expires = exp - ts.getDate(); + long expires = ts.getDate() - exp; if (expires > 0) buf.append(" expires in: ").append(DataHelper.formatDuration2(expires)).append(" with "); else