Remove all mention of obsolete safety-number-approval setting
This commit is contained in:

committed by
Scott Nonnenberg

parent
26c273618a
commit
a728c9efbf
@@ -64,9 +64,6 @@
|
|||||||
SERVER_URL, USERNAME, PASSWORD
|
SERVER_URL, USERNAME, PASSWORD
|
||||||
);
|
);
|
||||||
accountManager.addEventListener('registration', function() {
|
accountManager.addEventListener('registration', function() {
|
||||||
if (!Whisper.Registration.everDone()) {
|
|
||||||
storage.put('safety-numbers-approval', false);
|
|
||||||
}
|
|
||||||
Whisper.Registration.markDone();
|
Whisper.Registration.markDone();
|
||||||
console.log('dispatching registration event');
|
console.log('dispatching registration event');
|
||||||
Whisper.events.trigger('registration_done');
|
Whisper.events.trigger('registration_done');
|
||||||
|
@@ -5,14 +5,6 @@ describe('KeyChangeListener', function() {
|
|||||||
var newKey = libsignal.crypto.getRandomBytes(33);
|
var newKey = libsignal.crypto.getRandomBytes(33);
|
||||||
var store;
|
var store;
|
||||||
|
|
||||||
before(function() {
|
|
||||||
storage.put('safety-numbers-approval', false);
|
|
||||||
});
|
|
||||||
|
|
||||||
after(function() {
|
|
||||||
storage.remove('safety-numbers-approval');
|
|
||||||
});
|
|
||||||
|
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
store = new SignalProtocolStore();
|
store = new SignalProtocolStore();
|
||||||
Whisper.KeyChangeListener.init(store);
|
Whisper.KeyChangeListener.init(store);
|
||||||
|
@@ -792,8 +792,7 @@ describe("SignalProtocolStore", function() {
|
|||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
it('returns false if blocking approval is required', function(done) {
|
it('returns false if keys match but we just received this new identiy', function(done) {
|
||||||
storage.put('safety-numbers-approval', true);
|
|
||||||
store.isTrustedIdentity(identifier, newIdentity, store.Direction.SENDING).then(function(trusted) {
|
store.isTrustedIdentity(identifier, newIdentity, store.Direction.SENDING).then(function(trusted) {
|
||||||
if (trusted) {
|
if (trusted) {
|
||||||
done(new Error('isTrusted returned true on untrusted key'));
|
done(new Error('isTrusted returned true on untrusted key'));
|
||||||
@@ -802,18 +801,7 @@ describe("SignalProtocolStore", function() {
|
|||||||
}
|
}
|
||||||
}).catch(done);
|
}).catch(done);
|
||||||
});
|
});
|
||||||
it('returns false if keys match but nonblocking approval is required', function(done) {
|
it('returns true if we have already approved identity', function(done) {
|
||||||
storage.put('safety-numbers-approval', false);
|
|
||||||
store.isTrustedIdentity(identifier, newIdentity, store.Direction.SENDING).then(function(trusted) {
|
|
||||||
if (trusted) {
|
|
||||||
done(new Error('isTrusted returned true on untrusted key'));
|
|
||||||
} else {
|
|
||||||
done();
|
|
||||||
}
|
|
||||||
}).catch(done);
|
|
||||||
});
|
|
||||||
it('returns true if neither blocking nor nonblocking approval is required', function(done) {
|
|
||||||
storage.put('safety-numbers-approval', false);
|
|
||||||
store.saveIdentity(address.toString(), newIdentity, true).then(function() {
|
store.saveIdentity(address.toString(), newIdentity, true).then(function() {
|
||||||
store.isTrustedIdentity(identifier, newIdentity, store.Direction.SENDING).then(function(trusted) {
|
store.isTrustedIdentity(identifier, newIdentity, store.Direction.SENDING).then(function(trusted) {
|
||||||
if (trusted) {
|
if (trusted) {
|
||||||
|
Reference in New Issue
Block a user