Remove RC key rotation

We don't have/want this anymore (and on top of that, we *never* used
it in the first place and it probably didn't even work).
pull/2232/head
Jason Rhinelander 9 months ago committed by dr7ana
parent 570e87e1d4
commit cb6d594a89

@ -571,39 +571,15 @@ namespace llarp
} }
bool bool
Router::update_rc(bool rotateKeys) Router::update_rc()
{ {
SecretKey nextOnionKey; SecretKey nextOnionKey;
RouterContact nextRC = router_contact; RouterContact nextRC = router_contact;
if (rotateKeys)
{
CryptoManager::instance()->encryption_keygen(nextOnionKey);
std::string f = encryption_keyfile.string();
// TODO: use disk worker
if (nextOnionKey.SaveToFile(f.c_str()))
{
nextRC.enckey = seckey_topublic(nextOnionKey);
_encryption = nextOnionKey;
}
}
if (!nextRC.Sign(identity())) if (!nextRC.Sign(identity()))
return false; return false;
if (!nextRC.Verify(time_now_ms(), false)) if (!nextRC.Verify(time_now_ms(), false))
return false; return false;
router_contact = std::move(nextRC); router_contact = std::move(nextRC);
if (rotateKeys)
{
// TODO: libquic change
// propagate RC by renegotiating sessions
/*
ForEachPeer([](ILinkSession* s) {
if (s->RenegotiateSession())
LogInfo("renegotiated session");
else
LogWarn("failed to renegotiate session");
});
*/
}
if (IsServiceNode()) if (IsServiceNode())
return SaveRC(); return SaveRC();
return true; return true;

@ -154,7 +154,7 @@ namespace llarp
report_stats(); report_stats();
bool bool
update_rc(bool rotateKeys = false); update_rc();
bool bool
from_config(const Config& conf); from_config(const Config& conf);

Loading…
Cancel
Save