mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Export all keys command in validator-engine-console (#1412)
* Export all keys command in validator-engine-console * Use OPENSSL_cleanse in Bits256::fill_zero_s
This commit is contained in:
parent
4aa6412f9c
commit
9ae88d87e3
11 changed files with 173 additions and 6 deletions
|
|
@ -413,6 +413,30 @@ class SignFileQuery : public Query {
|
|||
std::string out_file_;
|
||||
};
|
||||
|
||||
class ExportAllPrivateKeysQuery : public Query {
|
||||
public:
|
||||
ExportAllPrivateKeysQuery(td::actor::ActorId<ValidatorEngineConsole> console, Tokenizer tokenizer)
|
||||
: Query(console, std::move(tokenizer)) {
|
||||
}
|
||||
td::Status run() override;
|
||||
td::Status send() override;
|
||||
td::Status receive(td::BufferSlice R) override;
|
||||
static std::string get_name() {
|
||||
return "exportallprivatekeys";
|
||||
}
|
||||
static std::string get_help() {
|
||||
return "exportallprivatekeys <directory>\texports all private keys from validator engine and stores them to "
|
||||
"<directory>";
|
||||
}
|
||||
std::string name() const override {
|
||||
return get_name();
|
||||
}
|
||||
|
||||
private:
|
||||
std::string directory_;
|
||||
ton::PrivateKey client_pk_;
|
||||
};
|
||||
|
||||
class AddAdnlAddrQuery : public Query {
|
||||
public:
|
||||
AddAdnlAddrQuery(td::actor::ActorId<ValidatorEngineConsole> console, Tokenizer tokenizer)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue