mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Merge branch '190-key-manager-duplicates' into 'master'
Fix off-by-one error in key rotation Fixes #190. See merge request !32
This commit is contained in:
@@ -11,6 +11,12 @@ public class TransportKeys {
|
||||
|
||||
public TransportKeys(TransportId transportId, IncomingKeys inPrev,
|
||||
IncomingKeys inCurr, IncomingKeys inNext, OutgoingKeys outCurr) {
|
||||
if (inPrev.getRotationPeriod() != inCurr.getRotationPeriod() - 1)
|
||||
throw new IllegalArgumentException();
|
||||
if (inNext.getRotationPeriod() != inCurr.getRotationPeriod() + 1)
|
||||
throw new IllegalArgumentException();
|
||||
if (outCurr.getRotationPeriod() != inCurr.getRotationPeriod())
|
||||
throw new IllegalArgumentException();
|
||||
this.transportId = transportId;
|
||||
this.inPrev = inPrev;
|
||||
this.inCurr = inCurr;
|
||||
|
||||
Reference in New Issue
Block a user