Specify public key type in updatesPublicKey
This commit is contained in:
parent
94491ab691
commit
e863aae0bf
|
@ -10,7 +10,7 @@
|
||||||
},
|
},
|
||||||
"contentProxyUrl": "http://contentproxy.signal.org:443",
|
"contentProxyUrl": "http://contentproxy.signal.org:443",
|
||||||
"updatesUrl": "https://updates2.signal.org/desktop",
|
"updatesUrl": "https://updates2.signal.org/desktop",
|
||||||
"updatesPublicKey": "fd7dd3de7149dc0a127909fee7de0f7620ddd0de061b37a2c303e37de802a401",
|
"updatesPublicKey": "05fd7dd3de7149dc0a127909fee7de0f7620ddd0de061b37a2c303e37de802a401",
|
||||||
"sfuUrl": "https://sfu.voip.signal.org/",
|
"sfuUrl": "https://sfu.voip.signal.org/",
|
||||||
"updatesEnabled": false,
|
"updatesEnabled": false,
|
||||||
"openDevTools": false,
|
"openDevTools": false,
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
import { assert } from 'chai';
|
import { assert } from 'chai';
|
||||||
|
import { get as getFromConfig } from 'config';
|
||||||
|
|
||||||
import { keyPair, sign, verify } from '../../updater/curve';
|
import { keyPair, sign, verify } from '../../updater/curve';
|
||||||
|
|
||||||
|
@ -14,4 +15,22 @@ describe('updater/curve', () => {
|
||||||
|
|
||||||
assert.strictEqual(verified, true);
|
assert.strictEqual(verified, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('verifies with our own key', () => {
|
||||||
|
const message = Buffer.from(
|
||||||
|
'7761a7761eccc0af7ab67546ec044e40dd1e9762f03d0c504d53fb40ceba5738-1.40.0-beta.3'
|
||||||
|
);
|
||||||
|
const signature = Buffer.from(
|
||||||
|
'982eee37076a391392879ce7a69e6ce24708cf12abd87624ae116c665e75b5404bf29fe2cd76c6213753bd16d7529f0f9116d63a63e90d2c6c8b57e17cc17100',
|
||||||
|
'hex'
|
||||||
|
);
|
||||||
|
const publicKey = Buffer.from(
|
||||||
|
getFromConfig<string>('updatesPublicKey'),
|
||||||
|
'hex'
|
||||||
|
);
|
||||||
|
|
||||||
|
const verified = verify(publicKey, message, signature);
|
||||||
|
|
||||||
|
assert.strictEqual(verified, true);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue