| 321 | } |
| 322 | |
| 323 | void Session::GenerateAndSavePrivateKey(const Sock& sock) |
| 324 | { |
| 325 | DestGenerate(sock); |
| 326 | |
| 327 | // umask is set to 077 in init.cpp, which is ok (unless -sysperms is given) |
| 328 | if (!WriteBinaryFile(m_private_key_file, |
| 329 | std::string(m_private_key.begin(), m_private_key.end()))) { |
| 330 | throw std::runtime_error( |
| 331 | strprintf("Cannot save I2P private key to %s", fs::quoted(fs::PathToString(m_private_key_file)))); |
| 332 | } |
| 333 | } |
| 334 | |
| 335 | Binary Session::MyDestination() const |
| 336 | { |
nothing calls this directly
no test coverage detected