mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
fix PQ signature validation on loginBlock
This commit is contained in:
parent
603a948b62
commit
b454b003db
@ -188,9 +188,14 @@ const factory = (Util, ApiConfig = {}, ServerCommand, Nacl, Crypto) => {
|
||||
try {
|
||||
// Use Block.sign to create a hybrid signature if available
|
||||
var hybridSig = Block.sign(u8_pub, O);
|
||||
let result = [u8_pub, hybridSig].map(Util.encodeBase64);
|
||||
|
||||
if (O.pqKeypair && O.pqKeypair.publicKey) {
|
||||
result.push(Util.encodeBase64(O.pqKeypair.publicKey));
|
||||
}
|
||||
|
||||
// Return an array with the signature and the pubkey
|
||||
return JSON.stringify([u8_pub, hybridSig].map(Util.encodeBase64));
|
||||
return JSON.stringify(result);
|
||||
} catch (err) {
|
||||
return void console.error(err);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user