trezor: adapt to new passphrase mechanism

- choice where to enter passphrase is now made on the host
- use wipeable string in the comm stack
- wipe passphrase memory
- protocol optimizations, prepare for new firmware version
- minor fixes and improvements
- tests fixes, HF12 support
This commit is contained in:
Dusan Klinec 2020-04-07 18:25:25 +02:00 committed by wowario
parent f5765455c5
commit ebe75aaa5f
No known key found for this signature in database
GPG key ID: 24DCBE762DE9C111
24 changed files with 434 additions and 256 deletions

View file

@ -33,6 +33,7 @@
#include <string>
#include <utility>
#include "memwipe.h"
#include "string_tools.h"
#undef MONERO_DEFAULT_LOG_CATEGORY
@ -200,6 +201,11 @@ namespace net_utils
this->~http_response_info();
new(this) http_response_info();
}
void wipe()
{
memwipe(&m_body[0], m_body.size());
}
};
}
}

View file

@ -330,6 +330,11 @@ namespace net_utils
return m_net_client.get_bytes_received();
}
//---------------------------------------------------------------------------
void wipe_response()
{
m_response_info.wipe();
}
//---------------------------------------------------------------------------
private:
//---------------------------------------------------------------------------
inline bool handle_reciev(std::chrono::milliseconds timeout)