Write identity key into 'account' object.

This is the beginning of a migration to storing one identity
key per account, instead of the braindead duplication we're
doing now.  Part one of a two-part deployment in the schema
migration process.
This commit is contained in:
Moxie Marlinspike
2014-06-25 11:34:54 -07:00
parent f14c181840
commit 437eb8de37
6 changed files with 98 additions and 27 deletions

View File

@@ -17,6 +17,7 @@
package org.whispersystems.textsecuregcm.entities;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.annotations.VisibleForTesting;
import org.hibernate.validator.constraints.NotEmpty;
import javax.validation.Valid;
@@ -27,6 +28,7 @@ public class PreKeyList {
@JsonProperty
@NotNull
@Valid
private PreKey lastResortKey;
@JsonProperty
@@ -38,7 +40,17 @@ public class PreKeyList {
return keys;
}
@VisibleForTesting
public void setKeys(List<PreKey> keys) {
this.keys = keys;
}
public PreKey getLastResortKey() {
return lastResortKey;
}
@VisibleForTesting
public void setLastResortKey(PreKey lastResortKey) {
this.lastResortKey = lastResortKey;
}
}