From b100a1ff6400055f6e11bdc2654ee359f6f011d6 Mon Sep 17 00:00:00 2001 From: anwleung Date: Wed, 31 Jan 2007 02:25:28 +0000 Subject: [PATCH] More map stuff, should be ready to serialize to .ceph_monmap git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1062 29311d96-e01e-0410-9327-a35deaab8ce9 --- branches/aleung/security1/ceph/mon/MonMap.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/branches/aleung/security1/ceph/mon/MonMap.h b/branches/aleung/security1/ceph/mon/MonMap.h index 1ef0b415802af..2b247ffcf8bf0 100644 --- a/branches/aleung/security1/ceph/mon/MonMap.h +++ b/branches/aleung/security1/ceph/mon/MonMap.h @@ -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) { -- 2.39.5