Merge pull request #591 from openpgpjs/clone_fix

account for non-cleartext sign/verify message parameters
This commit is contained in:
Bart Butler 2017-10-10 10:42:49 -07:00 committed by GitHub
commit c3afff5888

View File

@ -104,7 +104,7 @@ export function parseClonedPackets(options, method) {
if (options.key) {
options.key = packetlistCloneToKey(options.key);
}
if (options.message && (method === 'sign' || method === 'verify')) { // sign and verify support only CleartextMessage
if (options.message && options.message.signature) {
options.message = packetlistCloneToCleartextMessage(options.message);
} else if (options.message) {
options.message = packetlistCloneToMessage(options.message);