From f293d98f8ffbb768026f0afaa67eae96c4f4d8dc Mon Sep 17 00:00:00 2001 From: anwleung Date: Thu, 1 Mar 2007 20:55:54 +0000 Subject: [PATCH] Cleaned up the mon key gen git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1152 29311d96-e01e-0410-9327-a35deaab8ce9 --- branches/aleung/security1/ceph/mon/MonMap.h | 3 ++- branches/aleung/security1/ceph/mon/Monitor.cc | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/branches/aleung/security1/ceph/mon/MonMap.h b/branches/aleung/security1/ceph/mon/MonMap.h index 6f4d9117bf020..06c3a7c28901b 100644 --- a/branches/aleung/security1/ceph/mon/MonMap.h +++ b/branches/aleung/security1/ceph/mon/MonMap.h @@ -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 } diff --git a/branches/aleung/security1/ceph/mon/Monitor.cc b/branches/aleung/security1/ceph/mon/Monitor.cc index a9dd22f2e648c..548246cbf62fc 100644 --- a/branches/aleung/security1/ceph/mon/Monitor.cc +++ b/branches/aleung/security1/ceph/mon/Monitor.cc @@ -44,9 +44,11 @@ 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() -- 2.39.5