aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authorThomas Winget <tewinget@gmail.com>2014-09-25 00:14:22 -0400
committerThomas Winget <tewinget@gmail.com>2014-09-30 16:21:37 -0400
commit0e1449135d9de9fd05c393c4c85364a7241d98c1 (patch)
treebf863c75693c127b7ecccce1097c70df6d84195e /src/wallet/wallet2.cpp
parentAdding an identical existing checkpoint should not error (diff)
downloadmonero-0e1449135d9de9fd05c393c4c85364a7241d98c1.tar.xz
updated DNSResolver/things that use it for DNSSEC
Note: DNSResolver does not yet *use* DNSSEC, but rather this commit is preparation for including DNSSEC validation. The function in src/wallet/wallet2.cpp that uses DNSResolver still needs its parameters updated accordingly.
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r--src/wallet/wallet2.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 3161f3b16..6fb672798 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -833,12 +833,17 @@ std::vector<std::vector<cryptonote::tx_destination_entry>> split_amounts(
*/
std::vector<std::string> wallet2::addresses_from_url(const std::string& url, bool& dnssec_valid)
{
- // TODO: update this correctly once DNSResolver::get_txt_record() supports it.
- dnssec_valid = false;
-
std::vector<std::string> addresses;
// get txt records
- auto records = tools::DNSResolver::instance().get_txt_record(url);
+ bool dnssec_available, dnssec_isvalid;
+ auto records = tools::DNSResolver::instance().get_txt_record(url, dnssec_available, dnssec_isvalid);
+
+ // TODO: update this to allow for conveying that dnssec was not available
+ if (dnssec_available && dnssec_isvalid)
+ {
+ dnssec_valid = true;
+ }
+ else dnssec_valid = false;
// for each txt record, try to find a monero address in it.
for (auto& rec : records)