do not echo data back to caller for detached signing
This commit is contained in:
parent
2ffa221b21
commit
81a59b76b1
|
@ -314,13 +314,13 @@ export function sign({ data, privateKeys, armor=true, detached=false}) {
|
|||
}
|
||||
} else {
|
||||
message = message.sign(privateKeys);
|
||||
if (armor) {
|
||||
result.data = message.armor();
|
||||
} else {
|
||||
result.message = message;
|
||||
}
|
||||
}
|
||||
|
||||
if (armor) {
|
||||
result.data = message.armor();
|
||||
} else {
|
||||
result.message = message;
|
||||
}
|
||||
return result;
|
||||
|
||||
}, 'Error signing cleartext message');
|
||||
|
|
|
@ -969,7 +969,7 @@ describe('OpenPGP.js public api tests', function() {
|
|||
publicKeys: publicKey.keys
|
||||
};
|
||||
return openpgp.sign(signOpt).then(function(signed) {
|
||||
verifyOpt.message = openpgp.cleartext.readArmored(signed.data);
|
||||
verifyOpt.message = new openpgp.cleartext.CleartextMessage(plaintext);
|
||||
verifyOpt.signature = openpgp.signature.readArmored(signed.signature);
|
||||
return openpgp.verify(verifyOpt);
|
||||
}).then(function(verified) {
|
||||
|
@ -1009,7 +1009,7 @@ describe('OpenPGP.js public api tests', function() {
|
|||
publicKeys: openpgp.key.readArmored(wrong_pubkey).keys
|
||||
};
|
||||
return openpgp.sign(signOpt).then(function(signed) {
|
||||
verifyOpt.message = openpgp.cleartext.readArmored(signed.data);
|
||||
verifyOpt.message = new openpgp.cleartext.CleartextMessage(plaintext);
|
||||
verifyOpt.signature = openpgp.signature.readArmored(signed.signature);
|
||||
return openpgp.verify(verifyOpt);
|
||||
}).then(function(verified) {
|
||||
|
@ -1051,7 +1051,7 @@ describe('OpenPGP.js public api tests', function() {
|
|||
publicKeys: publicKey.keys
|
||||
};
|
||||
return openpgp.sign(signOpt).then(function(signed) {
|
||||
verifyOpt.message = signed.message;
|
||||
verifyOpt.message = new openpgp.cleartext.CleartextMessage(plaintext);
|
||||
verifyOpt.signature = signed.signature;
|
||||
return openpgp.verify(verifyOpt);
|
||||
}).then(function(verified) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user