Correct PGPSign.mjs to use the clearsign function

The PGPSign function should use the kbpgp.clearsign function instead of the kbpgp.box. 

The clearsign function returns a plaintext message instead of an armorded signature that is used for encryption.
This commit is contained in:
engrach 2026-07-27 11:26:18 +02:00 committed by GitHub
parent c56dd23358
commit 155a0e11d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -66,10 +66,9 @@ class PGPSign extends Operation {
const privKey = await importPrivateKey(privateKey, passphrase);
try {
signedMessage = await promisify(kbpgp.box)({
signedMessage = await promisify(kbpgp.clearsign)({
"msg": message,
"sign_with": privKey,
"asp": ASP
"signing_key": privKey,
});
} catch (err) {
throw new OperationError(`Couldn't sign message: ${err}`);