Ok, I fixed this in the keyring...

for the getPublicKey if it was working with:
if (keyId == this.publicKeys[i].obj.getKeyId())

I changed it for private key as well from this:
-   if (keyId == util.hexstrdump(this.privateKeys[i].obj.getKeyId())) {
to
+  if (keyId == this.privateKeys[i].obj.getKeyId()) {

now it works... I've tested this for my code, but haven't changed the part
with the subkeys, so I'm not sure if this is ompletely correct... so I'd
rather get your input before pushing it to master. Thanks!

Tankred


Am 24. April 2012 14:46 schrieb Tankred Hase <[email protected]>:

> Hi,
>
> I'm having trouble with
>
> openpgp.keyring.getPrivateKeyForKeyId(keyId)
>
> It doesn't return the the key I stored. If I call 
> "getPrivateKeyForAddress(email)"
> instead and then manually get the key with the correct keyId from the array
> it works.
>
> Is anyone else having trouble with this?
>
> Tankred
>
_______________________________________________

http://openpgpjs.org

Reply via email to