add rsa gen debug messages
authorDan Mills <thunder@mozilla.com>
Thu, 20 Nov 2008 09:15:16 +0900
changeset 45037 2e1d0b3d9e540bf5ee3312297f7767c4175868ee
parent 45036 984947d2c9492f8759347ad1b2c244e1f9678471
child 45038 c21ebe6983698b18dda0ad3cee6c86638c3acc90
push idunknown
push userunknown
push dateunknown
add rsa gen debug messages
services/sync/modules/base_records/keys.js
--- a/services/sync/modules/base_records/keys.js
+++ b/services/sync/modules/base_records/keys.js
@@ -199,16 +199,17 @@ PubKeyManager.prototype = {
     let ret = yield this.get(self.cb, this.defaultKeyUri);
     self.done(ret);
   },
   getDefaultKey: function KeyMgr_getDefaultKey(onComplete) {
     return this._getDefaultKey.async(this, onComplete);
   },
 
   createKeypair: function KeyMgr_createKeypair(passphrase, pubkeyUri, privkeyUri) {
+    this._log.debug("Generating RSA keypair");
     let pubkey = new PubKey();
     let privkey = new PrivKey();
     privkey.salt = this._crypto.generateRandomBytes(16);
     privkey.iv = this._crypto.generateRandomIV();
 
     let pub = {}, priv = {};
     this._crypto.generateKeypair(passphrase, privkey.salt, privkey.iv, pub, priv);
     [pubkey.keyData, privkey.keyData] = [pub.value, priv.value];
@@ -217,16 +218,17 @@ PubKeyManager.prototype = {
       pubkey.uri = pubkeyUri;
       privkey.publicKeyUri = pubkeyUri;
     }
     if (privkeyUri) {
       privkey.uri = privkeyUri;
       pubkey.privateKeyUri = privkeyUri;
     }
 
+    this._log.debug("Generating RSA keypair... done");
     return {pubkey: pubkey, privkey: privkey};
   },
 
   _import: function KeyMgr__import(url) {
     let self = yield;
 
     this._log.trace("Importing key: " + (url.spec? url.spec : url));