mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-08 17:08:57 +01:00
Update saveIdentity
Add support new blockingApproval and nonblockingApproval arguments Populate the firstUse property on identity key records Return whether an existing record was overwritten. References https://github.com/WhisperSystems/Signal-Android/commit/39d4a7#diff-69ede72c549da6bcbcd959935995b7e9R45 // FREEBIE
This commit is contained in:
@@ -43,16 +43,14 @@ describe("SignalProtocolStore", function() {
|
||||
});
|
||||
}).then(done,done);
|
||||
});
|
||||
it('rejects on key change', function(done) {
|
||||
it('returns true on key change', function(done) {
|
||||
var newIdentity = libsignal.crypto.getRandomBytes(33);
|
||||
store.saveIdentity(identifier, testKey.pubKey).then(function() {
|
||||
store.saveIdentity(identifier, newIdentity).then(function() {
|
||||
done(new Error('Allowed to overwrite identity key'));
|
||||
}).catch(function(e) {
|
||||
assert(e instanceof Error);
|
||||
store.saveIdentity(identifier, newIdentity).then(function(changed) {
|
||||
assert.isTrue(changed);
|
||||
done();
|
||||
});
|
||||
});
|
||||
}).catch(done);
|
||||
});
|
||||
});
|
||||
describe('isTrustedIdentity', function() {
|
||||
|
||||
Reference in New Issue
Block a user