From 492d71a9244ff03a10c3b43f84dd79a63320af15 Mon Sep 17 00:00:00 2001 From: orignal Date: Wed, 22 Nov 2017 14:49:45 -0500 Subject: [PATCH] transient keys --- libi2pd_client/ClientContext.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libi2pd_client/ClientContext.cpp b/libi2pd_client/ClientContext.cpp index 4eb06424..e340c3f1 100644 --- a/libi2pd_client/ClientContext.cpp +++ b/libi2pd_client/ClientContext.cpp @@ -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);