]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Cleaned up the mon key gen
authoranwleung <anwleung@29311d96-e01e-0410-9327-a35deaab8ce9>
Thu, 1 Mar 2007 20:55:54 +0000 (20:55 +0000)
committeranwleung <anwleung@29311d96-e01e-0410-9327-a35deaab8ce9>
Thu, 1 Mar 2007 20:55:54 +0000 (20:55 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1152 29311d96-e01e-0410-9327-a35deaab8ce9

branches/aleung/security1/ceph/mon/MonMap.h
branches/aleung/security1/ceph/mon/Monitor.cc

index 6f4d9117bf020c8706546ccaac4de2ee192247e7..06c3a7c28901b5f02a69ec6232c733146a724634 100644 (file)
@@ -37,11 +37,12 @@ class MonMap {
   
   void generate_key_pair(string& private_key) {
     esignPriv tempKey = esignPrivKey("crypto/esig1536.dat");
+    private_key = privToString(tempKey);
     pub_key = esignPubKey(tempKey);
     pub_str_key = pubToString(pub_key);
     // now throw away the private key
     keyConvert = false;
-    assert(0); // FIXME
+    //assert(0); // FIXME
   }
 
 
index a9dd22f2e648c469e55bd7c7af42edbe5059aa51..548246cbf62fc9809fd96580cfd5edbe4a008e44 100644 (file)
 void Monitor::set_new_private_key(string& pk)
 {
   dout(10) << "set_new_private_key" << endl;
-
+  myPrivKey = _fromStr_esignPrivKey(pk);
+  myPubKey = esignPubKey(myPrivKey);
+  
   // FIXME.
-  assert(0);
+  //assert(0);
 }
 
 void Monitor::init()