mirror of
https://github.com/openpgpjs/openpgpjs.git
synced 2025-06-09 15:46:42 +00:00
add one pass in case where no priv keys are passed in for signing
This commit is contained in:
parent
79160abcc9
commit
25d16046c2
@ -320,6 +320,9 @@ Message.prototype.sign = function(privateKeys=[], signature=null) {
|
||||
onePassSig.hashAlgorithm = config.prefer_hash_algorithm;
|
||||
onePassSig.publicKeyAlgorithm = sigPacket.publicKeyAlgorithm;
|
||||
onePassSig.signingKeyId = sigPacket.issuerKeyId;
|
||||
if (!privateKeys.length && i === 0) {
|
||||
onePassSig.flags = 1;
|
||||
}
|
||||
packetlist.push(onePassSig);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user