mirror of
https://github.com/openpgpjs/openpgpjs.git
synced 2025-11-24 06:25:50 +00:00
Fix reused reference of notation array in input
With the new salt notation, the original input array was mutated, which is undesirable, but it also led to an error when signing with multiple keys, since duplicate salt notations were detected.
This commit is contained in:
parent
c6daa090b3
commit
7982713f3d
@ -218,7 +218,7 @@ export async function createSignaturePacket(dataToSign, privateKey, signingKeyPa
|
||||
Object.assign(signaturePacket, signatureProperties);
|
||||
signaturePacket.publicKeyAlgorithm = signingKeyPacket.algorithm;
|
||||
signaturePacket.hashAlgorithm = await getPreferredHashAlgo(privateKey, signingKeyPacket, date, userID, config);
|
||||
signaturePacket.rawNotations = notations;
|
||||
signaturePacket.rawNotations = [...notations];
|
||||
await signaturePacket.sign(signingKeyPacket, dataToSign, date, detached, config);
|
||||
return signaturePacket;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user