Let KeyManager assemble key filenames

pull/1297/head
Stephen Shelton 4 years ago
parent 1497b829bd
commit d8b12ce764
No known key found for this signature in database
GPG Key ID: EE4BADACCE8B631C

@ -66,11 +66,12 @@ namespace llarp
llarp::SecretKey encryptionKey;
llarp::SecretKey transportKey;
private:
fs::path m_rcPath;
fs::path m_idKeyPath;
fs::path m_encKeyPath;
fs::path m_transportKeyPath;
private:
std::atomic_bool m_initialized;
std::atomic_bool m_needBackup;

@ -391,21 +391,26 @@ namespace llarp
_rc.SetNick(conf->router.m_nickname);
_outboundSessionMaker.maxConnectedRouters = conf->router.m_maxConnectedRouters;
_outboundSessionMaker.minConnectedRouters = conf->router.m_minConnectedRouters;
encryption_keyfile = conf->router.m_dataDir / our_enc_key_filename;
our_rc_file = conf->router.m_dataDir / our_rc_filename;
transport_keyfile = conf->router.m_dataDir / our_transport_key_filename;
encryption_keyfile = m_keyManager->m_encKeyPath;
our_rc_file = m_keyManager->m_rcPath;
transport_keyfile = m_keyManager->m_transportKeyPath;
ident_keyfile = m_keyManager->m_idKeyPath;
_ourAddress = conf->router.m_publicAddress;
RouterContact::BlockBogons = conf->router.m_blockBogons;
// Lokid Config
usingSNSeed = conf->lokid.usingSNSeed;
ident_keyfile = conf->lokid.ident_keyfile;
whitelistRouters = conf->lokid.whitelistRouters;
lokidRPCAddr = IpAddress(conf->lokid.lokidRPCAddr); // TODO: make config's option an IpAddress
lokidRPCUser = conf->lokid.lokidRPCUser;
lokidRPCPassword = conf->lokid.lokidRPCPassword;
if (usingSNSeed)
ident_keyfile = conf->lokid.ident_keyfile;
// TODO: add config flag for "is service node"
if (conf->links.m_InboundLinks.size())
{
@ -515,11 +520,6 @@ namespace llarp
whitelistRouters,
m_isServiceNode);
if (!usingSNSeed)
{
ident_keyfile = conf->router.m_dataDir / our_identity_filename;
}
// create inbound links, if we are a service node
for (const LinksConfig::LinkInfo& serverConfig : conf->links.m_InboundLinks)
{

Loading…
Cancel
Save