Init key manager before InitOutboundLinks are configured

pull/942/head
Stephen Shelton 5 years ago
parent e558a1fa1b
commit 23fc2ad042

@ -131,16 +131,6 @@ namespace llarp
return m_transportKey; return m_transportKey;
} }
bool
KeyManager::getRouterContact(llarp::RouterContact& rc) const
{
if (! m_initialized)
return false;
rc = m_rc;
return true;
}
bool bool
KeyManager::backupKeyFilesByMoving() const KeyManager::backupKeyFilesByMoving() const
{ {

@ -75,7 +75,6 @@ namespace llarp
std::string m_lokidRPCUser; std::string m_lokidRPCUser;
std::string m_lokidRPCPassword; std::string m_lokidRPCPassword;
llarp::RouterContact m_rc;
llarp::SecretKey m_idKey; llarp::SecretKey m_idKey;
llarp::SecretKey m_encKey; llarp::SecretKey m_encKey;
llarp::SecretKey m_transportKey; llarp::SecretKey m_transportKey;

@ -231,13 +231,13 @@ namespace llarp
} }
_nodedb = nodedb; _nodedb = nodedb;
if(!FromConfig(conf)) if (not m_keyManager->initialize(*conf, true))
return false; return false;
if(!InitOutboundLinks()) if(!FromConfig(conf))
return false; return false;
if (not m_keyManager->initialize(*conf, true)) if(!InitOutboundLinks())
return false; return false;
return EnsureIdentity(); return EnsureIdentity();

Loading…
Cancel
Save