account for non-cleartext sign/verify message parameters

This commit is contained in:
Sanjana Rajan 2017-10-09 17:27:02 -07:00
parent 417470d36a
commit 9893d602e2

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);