> that: > a = unescape(c.deflate()[0][0]); > > is causing signatures to fail.
I opened an issue here: https://github.com/openpgpjs/openpgpjs/issues/210 Thanks for finding this. >> When I look at the minified with Chrome, I see the verify function >> calls "setText" on a "Literal"... >> >> that "setText" code also removes \r >> so even if the message is "fromBinary" (unless there is some mechanism >> in the code I don't know), the msg.verify ?might? still fail? fromBinary calls literalDataPacket.setBytes and here the \r is not replaced. But in general for the problem of handling of \r I opened an issue: https://github.com/openpgpjs/openpgpjs/issues/211 Thomas >> >> Anyhowz, >> >> looking forward to next version, >> >> -tim >> >> On 4/7/14, Thomas Oberndörfer <[email protected]> wrote: >>> I see, this scenario is currently not supported. >>> You are having a binary and signature packets as base64. >>> >>> First we would need to expose the base64 module to openpgp namespace. >>> Then you could do something like: >>> >>> - create message msg with openpgp.message.fromBinary(binary) >>> - decode base64 signatures, read result into new packetlist >>> - concat signature packetlist to msg.packets >>> - call msg.verify... >>> >>> Thomas >>> >>> On Mon, Apr 7, 2014 at 4:38 PM, Tim Prepscius <[email protected]> >>> wrote: >>>> Here's my work around, it shows the difficulties I'm having. >>>> >>>> (I'd copy-paste,but i think the formatting is going to come through >>>> even more badly) >>>> >>>> http://pastebin.com/raw.php?i=AJUHtyzH >>>> >>>> -tim >>>> >>>> >>>> On 4/7/14, Thomas Oberndörfer <[email protected]> wrote: >>>>>> 1. Can openpgpjs read a signature directly? >>>>> >>>>> Here is an example: >>>>> https://github.com/openpgpjs/openpgpjs/blob/master/test/general/signature.js#L472 >>>>> >>>>>> 2. Can openpgjs handle binary signatures? >>>>> >>>>> You could do: >>>>> >>>>> openpgp.message.fromBinary('\r').sign(... >>>>> >>>>> Or what is your exact use case? >>>>> >>>>> Thomas >>>>> >>>>> >>>>> On Mon, Apr 7, 2014 at 4:08 AM, Tim Prepscius <[email protected]> >>>>> wrote: >>>>>> I just wanted to check to make sure I've not overlooked it: >>>>>> >>>>>> 1. Can openpgpjs read a signature directly? >>>>>> (I haven't found it, and am using this kludge >>>>>> >>>>>> // i'm having problems getting the signature with >>>>>> openpgpjs, so I >>>>>> make a fake message and >>>>>> // then get the signature from that >>>>>> >>>>>> var armoredText = "-----BEGIN PGP SIGNED >>>>>> MESSAGE-----\n\n" >>>>>> + data[1]; >>>>>> var input = window.openpgp.armor.decode(armoredText); >>>>>> var packetlist = new window.openpgp.packet.List(); >>>>>> packetlist.read(input.data); >>>>>> >>>>>> ) >>>>>> >>>>>> >>>>>> 2. Can openpgjs handle binary signatures? >>>>>> >>>>>> Actually I sort of know that it can't. Or, any signature that >>>>>> requires the \r. -- And have done a work around. Is a bug for that >>>>>> somewhere I can put myself as a watcher? I'd like to eventually >>>>>> remove my work-around. >>>>>> >>>>>> -tim >>>>>> _______________________________________________ >>>>>> >>>>>> http://openpgpjs.org >>>>>> Subscribe/unsubscribe: http://list.openpgpjs.org >>>>> _______________________________________________ >>>>> >>>>> http://openpgpjs.org >>>>> Subscribe/unsubscribe: http://list.openpgpjs.org >>>>> >>>> _______________________________________________ >>>> >>>> http://openpgpjs.org >>>> Subscribe/unsubscribe: http://list.openpgpjs.org >>> _______________________________________________ >>> >>> http://openpgpjs.org >>> Subscribe/unsubscribe: http://list.openpgpjs.org >>> >> > _______________________________________________ > > http://openpgpjs.org > Subscribe/unsubscribe: http://list.openpgpjs.org _______________________________________________ http://openpgpjs.org Subscribe/unsubscribe: http://list.openpgpjs.org

