Bug 504212 - Have javascript stack traces show [object Object] for various CryptoWrapper functions

Pass the ID object instead of reading out the password and passing it in to encrypt/decrypt.
This commit is contained in:
Edward Lee 2009-07-14 16:51:04 -07:00
parent ba2b880253
commit e94143f4e2
2 changed files with 3 additions and 3 deletions

View File

@ -151,7 +151,7 @@ CryptoMeta.prototype = {
throw "keyring doesn't contain a key for " + pubkeyUri;
return this._unwrappedKey = Svc.Crypto.unwrapSymmetricKey(wrapped_key,
privkey.keyData, passphrase, privkey.salt, privkey.iv);
privkey.keyData, passphrase.password, privkey.salt, privkey.iv);
},
addKey: function CryptoMeta_addKey(new_pubkey, privkey, passphrase) {

View File

@ -341,7 +341,7 @@ SyncEngine.prototype = {
while ((item = newitems.iter.next())) {
this._lowMemCheck();
try {
item.decrypt(ID.get('WeaveCryptoID').password);
item.decrypt(ID.get("WeaveCryptoID"));
if (this._reconcile(item)) {
count.applied++;
this._applyIncoming(item);
@ -466,7 +466,7 @@ SyncEngine.prototype = {
// skip getting siblings of already processed and deleted records
if (!out.deleted && !(out.id in meta))
this._store.createMetaRecords(out.id, meta);
out.encrypt(ID.get('WeaveCryptoID').password);
out.encrypt(ID.get("WeaveCryptoID"));
up.pushData(JSON.parse(out.serialize())); // FIXME: inefficient
Sync.sleep(0);
}