mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-23 17:36:37 +02:00
transient keys
This commit is contained in:
parent
6d01a3a7d1
commit
492d71a924
1 changed files with 7 additions and 0 deletions
|
@ -284,6 +284,13 @@ namespace client
|
||||||
bool ClientContext::LoadPrivateKeys (i2p::data::PrivateKeys& keys, const std::string& filename,
|
bool ClientContext::LoadPrivateKeys (i2p::data::PrivateKeys& keys, const std::string& filename,
|
||||||
i2p::data::SigningKeyType sigType, i2p::data::CryptoKeyType cryptoType)
|
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;
|
bool success = true;
|
||||||
std::string fullPath = i2p::fs::DataDirPath (filename);
|
std::string fullPath = i2p::fs::DataDirPath (filename);
|
||||||
std::ifstream s(fullPath, std::ifstream::binary);
|
std::ifstream s(fullPath, std::ifstream::binary);
|
||||||
|
|
Loading…
Add table
Reference in a new issue