#define dout_prefix *_dout << "cephx keyserver: "
-KeyServer::KeyServer(CephContext *cct_)
- : cct(cct_), lock("KeyServer::lock")
+KeyServer::KeyServer(CephContext *cct_, KeyRing *extra_secrets)
+ : cct(cct_),
+ data(extra_secrets),
+ lock("KeyServer::lock")
{
}
/* for each entity */
map<EntityName, EntityAuth> secrets;
+ KeyRing *extra_secrets;
/* for each service type */
version_t rotating_ver;
map<uint32_t, RotatingSecrets> rotating_secrets;
- KeyServerData() : version(0), rotating_ver(0) {}
+ KeyServerData(KeyRing *extra)
+ : version(0),
+ extra_secrets(extra),
+ rotating_ver(0) {}
void encode(bufferlist& bl) const {
__u8 struct_v = 1;
bool _get_service_caps(const EntityName& name, uint32_t service_id,
AuthCapsInfo& caps) const;
public:
- KeyServer(CephContext *cct_);
+ KeyServer(CephContext *cct_, KeyRing *extra_secrets);
bool generate_secret(CryptoKey& secret);
bool get_secret(const EntityName& name, CryptoKey& secret) const;
WRITE_CLASS_ENCODER(KeyServer);
-
-
-
#endif
logger(NULL), cluster_logger(NULL), cluster_logger_registered(false),
monmap(map),
clog(cct_, messenger, monmap, LogClient::FLAG_MON),
- key_server(cct),
+ key_server(cct, &keyring),
auth_supported(cct),
store(s),
global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, 0);
common_init_finish(g_ceph_context);
-
- KeyServer server(g_ceph_context);
+ KeyRing extra;
+ KeyServer server(g_ceph_context, &extra);
generic_dout(0) << "server created" << dendl;