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/2215/head
Jason Rhinelander 8 months ago
parent 018d7b4a00
commit 82c945ca24
No known key found for this signature in database
GPG Key ID: C4992CE7A88D4262

@ -571,39 +571,15 @@ namespace llarp
}
bool
Router::update_rc(bool rotateKeys)
Router::update_rc()
{
SecretKey nextOnionKey;
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()))
return false;
if (!nextRC.Verify(time_now_ms(), false))
return false;
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())
return SaveRC();
return true;

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

Loading…
Cancel
Save