Remove processPreKey from protocol_wrapper
Use SessionBuilder directly instead of protocol_wrapper // FREEBIE
This commit is contained in:
parent
843036f0ce
commit
891ddacd35
4 changed files with 10 additions and 18 deletions
|
@ -18,9 +18,11 @@ describe('Protocol Wrapper', function() {
|
|||
});
|
||||
describe('processPreKey', function() {
|
||||
it('rejects if the identity key changes', function(done) {
|
||||
return textsecure.protocol_wrapper.processPreKey({
|
||||
var address = new libsignal.SignalProtocolAddress(identifier, 1);
|
||||
var builder = new libsignal.SessionBuilder(store, address);
|
||||
return builder.processPreKey({
|
||||
identityKey: textsecure.crypto.getRandomBytes(33),
|
||||
encodedNumber: identifier + '.1'
|
||||
encodedNumber: address.toString()
|
||||
}).then(function() {
|
||||
done(new Error('Allowed to overwrite identity key'));
|
||||
}).catch(function(e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue