mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-10-15 15:30:43 +00:00
create key files readable by owner only
This commit is contained in:
@@ -323,7 +323,7 @@ namespace client
|
||||
{
|
||||
LogPrint (eLogInfo, "Clients: Can't open file ", fullPath, " Creating new one with signature type ", sigType, " crypto type ", cryptoType);
|
||||
keys = i2p::data::PrivateKeys::CreateRandomKeys (sigType, cryptoType, true);
|
||||
std::ofstream f (fullPath, std::ofstream::binary | std::ofstream::out);
|
||||
std::ofstream f (i2p::fs::CreatePrivateFile (fullPath), std::ofstream::binary | std::ofstream::out);
|
||||
size_t len = keys.GetFullLen ();
|
||||
uint8_t * buf = new uint8_t[len];
|
||||
len = keys.ToBuffer (buf, len);
|
||||
|
||||
Reference in New Issue
Block a user