diff options
author | luigi1111 <luigi1111w@gmail.com> | 2018-07-27 14:22:34 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2018-07-27 14:22:34 -0500 |
commit | 92b5d6c204b4622760bd9029579d013adf580483 (patch) | |
tree | ac96d1cb46f10a68dd59646afbe6b2a2f0967bfa /src/wallet/api/wallet2_api.h | |
parent | Merge pull request #3629 (diff) | |
parent | wallet2: unlock keys file before calling verify_password (needed for Windows) (diff) | |
download | monero-92b5d6c204b4622760bd9029579d013adf580483.tar.xz |
Merge pull request #4091
a4272de wallet2: unlock keys file before calling verify_password (needed for Windows) (stoffu)
Diffstat (limited to 'src/wallet/api/wallet2_api.h')
-rw-r--r-- | src/wallet/api/wallet2_api.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h index f54255e91..0cd0ff5cf 100644 --- a/src/wallet/api/wallet2_api.h +++ b/src/wallet/api/wallet2_api.h @@ -900,6 +900,12 @@ struct Wallet //! Initiates a light wallet import wallet request virtual bool lightWalletImportWalletRequest(std::string &payment_id, uint64_t &fee, bool &new_request, bool &request_fulfilled, std::string &payment_address, std::string &status) = 0; + + //! locks/unlocks the keys file; returns true on success + virtual bool lockKeysFile() = 0; + virtual bool unlockKeysFile() = 0; + //! returns true if the keys file is locked + virtual bool isKeysFileLocked() = 0; }; /** @@ -1070,6 +1076,10 @@ struct WalletManager * @param password - password to verify * @param no_spend_key - verify only view keys? * @return - true if password is correct + * + * @note + * This function will fail when the wallet keys file is opened because the wallet program locks the keys file. + * In this case, Wallet::unlockKeysFile() and Wallet::lockKeysFile() need to be called before and after the call to this function, respectively. */ virtual bool verifyWalletPassword(const std::string &keys_file_name, const std::string &password, bool no_spend_key) const = 0; |