Sorry, wrong subject in previous post... 

Jim Klo
Senior Software Engineer
Center for Software Engineering
SRI International

On Jul 2, 2012, at 4:04 PM, Jim Klo wrote:

> Hi,
> 
> Great project BTW.
> 
> I have possibly an interesting use case that I'm trying to solve. 
> I would like to validate a GPG signed message within CouchDB map/reduce 
> (which uses SpiderMonkey in an idempotent manner) using a fixed set of keys.
> 
> So far, I've gotten straight SpiderMonkey work for my needs, some of the 
> hurdles I ran into tho:
> 
>       1. "navigator" object is used in an unchecked manner.
>       2. there's a jQuery dependency for messaging (which probably shouldn't 
> exist).
>       3. showMessage(text) function has no default implementation.
>       4. dependency upon HTML5's localStorage
> 
> FWIW: here's my sample code: https://gist.github.com/3036199
> 
> I was able to get around these deficiencies using some mock objects.  But is 
> there a way for me to utilize the library without these? The first 3 issues I 
> ran into all seem like general bugs, and the dependency upon localStorage 
> seems like simple workarounds are available and could be handled.
> 
> I'm also not sure why I can't do this:
> 
>       var keys = openpgp.read_publicKey(myArmoredKey);
>       var msgs = openpgp.read_message(myClearSignedMessage);
>       
>       msgs[0].validateSignature(keys)
> //    msgs[0].validateSignature(keys[0]) // doesn't work either... 
> 
> I seem to have to use the keys stored in the keyring, which is extra overhead 
> that I'd like to avoid since my keyring can't really be modified in my use 
> case.
> 
> Also, I would like to encapsulate a bit more. Has anyone has utilized 
> OpenPGP.js from a CommonJS environment and can provide some advise before go 
> and start hacking on the source?
> 
> I think for my purposes it may just work by doing:
> 
> if (exports) {
>       exports.openpgp = openpgp;
> }
> 
> But not entirely sure until I try...
> 
> Thanks,
> 
> - Jim
> 
> Jim Klo
> Senior Software Engineer
> Center for Software Engineering
> SRI International
> 
> _______________________________________________
> 
> http://openpgpjs.org

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

http://openpgpjs.org

Reply via email to