| 362 | } |
| 363 | |
| 364 | void Session::GenerateAndSavePrivateKey(const Sock& sock) |
| 365 | { |
| 366 | DestGenerate(sock); |
| 367 | |
| 368 | // umask is set to 0077 in common/system.cpp, which is ok. |
| 369 | if (!WriteBinaryFile(m_private_key_file, |
| 370 | std::string(m_private_key.begin(), m_private_key.end()))) { |
| 371 | throw std::runtime_error( |
| 372 | strprintf("Cannot save I2P private key to %s", fs::quoted(fs::PathToString(m_private_key_file)))); |
| 373 | } |
| 374 | } |
| 375 | |
| 376 | Binary Session::MyDestination() const |
| 377 | { |
nothing calls this directly
no test coverage detected