]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
More map stuff, should be ready to serialize to .ceph_monmap
authoranwleung <anwleung@29311d96-e01e-0410-9327-a35deaab8ce9>
Wed, 31 Jan 2007 02:25:28 +0000 (02:25 +0000)
committeranwleung <anwleung@29311d96-e01e-0410-9327-a35deaab8ce9>
Wed, 31 Jan 2007 02:25:28 +0000 (02:25 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1062 29311d96-e01e-0410-9327-a35deaab8ce9

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

index 1ef0b415802af1d6e2676b7ef16c35482645b64c..2b247ffcf8bf0f0b14ed8a48a6a83b42029e2b3d 100644 (file)
@@ -34,6 +34,10 @@ class MonMap {
   bool keyConvert;
 
   MonMap(int s=0) : epoch(0), num_mon(s), mon_inst(s), last_mon(-1) {
+    esignPriv tempKey = esignPrivKey("crypto/esig1536.dat");
+    pub_key = esignPubKey(tempKey);
+    pub_str_key = pubToString(pub_key);
+    // now throw away the private key
     keyConvert = false;
   }
   // the map constructor when I have a key
@@ -80,7 +84,7 @@ class MonMap {
     blist.append((char*)&num_mon, sizeof(num_mon));
     
     _encode(mon_inst, blist);
-    //_encode(pub_str_key, blist);
+    _encode(pub_str_key, blist);
   }
   
   void decode(bufferlist& blist) {
@@ -91,7 +95,7 @@ class MonMap {
     off += sizeof(num_mon);
 
     _decode(mon_inst, blist, off);
-    //_decode(pub_str_key, blist, off);
+    _decode(pub_str_key, blist, off);
   }
 
   int write(char *fn) {