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:
parent
c56dd23358
commit
155a0e11d4
@ -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}`);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user