Rename axolotl to libsignal
// FREEBIE
This commit is contained in:
parent
6bffd50009
commit
9a1a3bdf64
4 changed files with 11 additions and 11 deletions
|
@ -35297,7 +35297,7 @@ Internal.RecipientRecord = function() {
|
||||||
window.textsecure.storage = window.textsecure.storage || {};
|
window.textsecure.storage = window.textsecure.storage || {};
|
||||||
|
|
||||||
textsecure.storage.protocol = new SignalProtocolStore();
|
textsecure.storage.protocol = new SignalProtocolStore();
|
||||||
var protocolInstance = axolotl.protocol(textsecure.storage.protocol);
|
var protocolInstance = libsignal.protocol(textsecure.storage.protocol);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* jobQueue manages multiple queues indexed by device to serialize
|
* jobQueue manages multiple queues indexed by device to serialize
|
||||||
|
@ -36738,7 +36738,7 @@ var TextSecureServer = (function() {
|
||||||
var registerKeys = this.server.registerKeys.bind(this.server);
|
var registerKeys = this.server.registerKeys.bind(this.server);
|
||||||
var createAccount = this.createAccount.bind(this);
|
var createAccount = this.createAccount.bind(this);
|
||||||
var generateKeys = this.generateKeys.bind(this, 100);
|
var generateKeys = this.generateKeys.bind(this, 100);
|
||||||
return axolotl.util.generateIdentityKeyPair().then(function(identityKeyPair) {
|
return libsignal.util.generateIdentityKeyPair().then(function(identityKeyPair) {
|
||||||
return createAccount(number, verificationCode, identityKeyPair).
|
return createAccount(number, verificationCode, identityKeyPair).
|
||||||
then(generateKeys).
|
then(generateKeys).
|
||||||
then(registerKeys).
|
then(registerKeys).
|
||||||
|
@ -36808,7 +36808,7 @@ var TextSecureServer = (function() {
|
||||||
var signalingKey = textsecure.crypto.getRandomBytes(32 + 20);
|
var signalingKey = textsecure.crypto.getRandomBytes(32 + 20);
|
||||||
var password = btoa(getString(textsecure.crypto.getRandomBytes(16)));
|
var password = btoa(getString(textsecure.crypto.getRandomBytes(16)));
|
||||||
password = password.substring(0, password.length - 2);
|
password = password.substring(0, password.length - 2);
|
||||||
var registrationId = axolotl.util.generateRegistrationId();
|
var registrationId = libsignal.util.generateRegistrationId();
|
||||||
|
|
||||||
return this.server.confirmCode(
|
return this.server.confirmCode(
|
||||||
number, verificationCode, password, signalingKey, registrationId, deviceName
|
number, verificationCode, password, signalingKey, registrationId, deviceName
|
||||||
|
@ -36862,7 +36862,7 @@ var TextSecureServer = (function() {
|
||||||
|
|
||||||
for (var keyId = startId; keyId < startId+count; ++keyId) {
|
for (var keyId = startId; keyId < startId+count; ++keyId) {
|
||||||
promises.push(
|
promises.push(
|
||||||
axolotl.util.generatePreKey(keyId).then(function(res) {
|
libsignal.util.generatePreKey(keyId).then(function(res) {
|
||||||
store.storePreKey(res.keyId, res.keyPair);
|
store.storePreKey(res.keyId, res.keyPair);
|
||||||
result.preKeys.push({
|
result.preKeys.push({
|
||||||
keyId : res.keyId,
|
keyId : res.keyId,
|
||||||
|
@ -36874,7 +36874,7 @@ var TextSecureServer = (function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
promises.push(
|
promises.push(
|
||||||
axolotl.util.generateSignedPreKey(identityKey, signedKeyId).then(function(res) {
|
libsignal.util.generateSignedPreKey(identityKey, signedKeyId).then(function(res) {
|
||||||
store.storeSignedPreKey(res.keyId, res.keyPair);
|
store.storeSignedPreKey(res.keyId, res.keyPair);
|
||||||
result.signedPreKey = {
|
result.signedPreKey = {
|
||||||
keyId : res.keyId,
|
keyId : res.keyId,
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
var registerKeys = this.server.registerKeys.bind(this.server);
|
var registerKeys = this.server.registerKeys.bind(this.server);
|
||||||
var createAccount = this.createAccount.bind(this);
|
var createAccount = this.createAccount.bind(this);
|
||||||
var generateKeys = this.generateKeys.bind(this, 100);
|
var generateKeys = this.generateKeys.bind(this, 100);
|
||||||
return axolotl.util.generateIdentityKeyPair().then(function(identityKeyPair) {
|
return libsignal.util.generateIdentityKeyPair().then(function(identityKeyPair) {
|
||||||
return createAccount(number, verificationCode, identityKeyPair).
|
return createAccount(number, verificationCode, identityKeyPair).
|
||||||
then(generateKeys).
|
then(generateKeys).
|
||||||
then(registerKeys).
|
then(registerKeys).
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
var signalingKey = textsecure.crypto.getRandomBytes(32 + 20);
|
var signalingKey = textsecure.crypto.getRandomBytes(32 + 20);
|
||||||
var password = btoa(getString(textsecure.crypto.getRandomBytes(16)));
|
var password = btoa(getString(textsecure.crypto.getRandomBytes(16)));
|
||||||
password = password.substring(0, password.length - 2);
|
password = password.substring(0, password.length - 2);
|
||||||
var registrationId = axolotl.util.generateRegistrationId();
|
var registrationId = libsignal.util.generateRegistrationId();
|
||||||
|
|
||||||
return this.server.confirmCode(
|
return this.server.confirmCode(
|
||||||
number, verificationCode, password, signalingKey, registrationId, deviceName
|
number, verificationCode, password, signalingKey, registrationId, deviceName
|
||||||
|
@ -147,7 +147,7 @@
|
||||||
|
|
||||||
for (var keyId = startId; keyId < startId+count; ++keyId) {
|
for (var keyId = startId; keyId < startId+count; ++keyId) {
|
||||||
promises.push(
|
promises.push(
|
||||||
axolotl.util.generatePreKey(keyId).then(function(res) {
|
libsignal.util.generatePreKey(keyId).then(function(res) {
|
||||||
store.storePreKey(res.keyId, res.keyPair);
|
store.storePreKey(res.keyId, res.keyPair);
|
||||||
result.preKeys.push({
|
result.preKeys.push({
|
||||||
keyId : res.keyId,
|
keyId : res.keyId,
|
||||||
|
@ -159,7 +159,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
promises.push(
|
promises.push(
|
||||||
axolotl.util.generateSignedPreKey(identityKey, signedKeyId).then(function(res) {
|
libsignal.util.generateSignedPreKey(identityKey, signedKeyId).then(function(res) {
|
||||||
store.storeSignedPreKey(res.keyId, res.keyPair);
|
store.storeSignedPreKey(res.keyId, res.keyPair);
|
||||||
result.signedPreKey = {
|
result.signedPreKey = {
|
||||||
keyId : res.keyId,
|
keyId : res.keyId,
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
window.textsecure.storage = window.textsecure.storage || {};
|
window.textsecure.storage = window.textsecure.storage || {};
|
||||||
|
|
||||||
textsecure.storage.protocol = new SignalProtocolStore();
|
textsecure.storage.protocol = new SignalProtocolStore();
|
||||||
var protocolInstance = axolotl.protocol(textsecure.storage.protocol);
|
var protocolInstance = libsignal.protocol(textsecure.storage.protocol);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* jobQueue manages multiple queues indexed by device to serialize
|
* jobQueue manages multiple queues indexed by device to serialize
|
||||||
|
|
|
@ -44,7 +44,7 @@ describe("Key generation", function() {
|
||||||
|
|
||||||
before(function(done) {
|
before(function(done) {
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
axolotl.util.generateIdentityKeyPair().then(function(keyPair) {
|
libsignal.util.generateIdentityKeyPair().then(function(keyPair) {
|
||||||
return textsecure.storage.protocol.put('identityKey', keyPair);
|
return textsecure.storage.protocol.put('identityKey', keyPair);
|
||||||
}).then(done, done);
|
}).then(done, done);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue