Skip to content

Commit

Permalink
transient keys
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Nov 22, 2017
1 parent 6d01a3a commit 492d71a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libi2pd_client/ClientContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,13 @@ namespace client
bool ClientContext::LoadPrivateKeys (i2p::data::PrivateKeys& keys, const std::string& filename,
i2p::data::SigningKeyType sigType, i2p::data::CryptoKeyType cryptoType)
{
if (filename == "transient")
{
keys = i2p::data::PrivateKeys::CreateRandomKeys (sigType, cryptoType);
LogPrint (eLogInfo, "Clients: New transient keys address ", m_AddressBook.ToAddress(keys.GetPublic ()->GetIdentHash ()), " created");
return true;
}

bool success = true;
std::string fullPath = i2p::fs::DataDirPath (filename);
std::ifstream s(fullPath, std::ifstream::binary);
Expand Down

0 comments on commit 492d71a

Please sign in to comment.