aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2014-10-02 16:48:01 +0200
committerRiccardo Spagni <ric@spagni.net>2014-10-02 16:48:05 +0200
commit1cf22b27a6b95e1e44c35157f5c5ccb73efec9da (patch)
tree770a470c84cd8c7c7ef816dd2c34078d5aebbc7a /src/common
parentsimplewallet ignoring testnet port in RPC mode (diff)
parentDaemon should now exit on conflicting checkpoints (diff)
downloadmonero-1cf22b27a6b95e1e44c35157f5c5ccb73efec9da.tar.xz
Merge pull request #165
c0bdd51 Daemon should now exit on conflicting checkpoints (Thomas Winget) f0b4138 various changes to runtime checkpoint updating (Thomas Winget) 7568f89 Fixed segfault with checkpoints loading (Thomas Winget) b261d92 DNS checkpoint updating added, and daemon flag to enforce them (Thomas Winget) 30caebf reload checkpoints file every ~hr and print if any fail (Thomas Winget) 0e14491 updated DNSResolver/things that use it for DNSSEC (Thomas Winget) 6f2c2e1 Adding an identical existing checkpoint should not error (Thomas Winget)
Diffstat (limited to 'src/common')
-rw-r--r--src/common/dns_utils.cpp12
-rw-r--r--src/common/dns_utils.h8
2 files changed, 14 insertions, 6 deletions
diff --git a/src/common/dns_utils.cpp b/src/common/dns_utils.cpp
index 346761e74..0376ab9a9 100644
--- a/src/common/dns_utils.cpp
+++ b/src/common/dns_utils.cpp
@@ -118,9 +118,11 @@ DNSResolver::~DNSResolver()
}
}
-std::vector<std::string> DNSResolver::get_ipv4(const std::string& url)
+std::vector<std::string> DNSResolver::get_ipv4(const std::string& url, bool& dnssec_available, bool& dnssec_valid)
{
std::vector<std::string> addresses;
+ dnssec_available = false;
+ dnssec_valid = false;
char urlC[1000]; // waaaay too big, but just in case...
strncpy(urlC, url.c_str(), 999);
@@ -148,9 +150,11 @@ std::vector<std::string> DNSResolver::get_ipv4(const std::string& url)
return addresses;
}
-std::vector<std::string> DNSResolver::get_ipv6(const std::string& url)
+std::vector<std::string> DNSResolver::get_ipv6(const std::string& url, bool& dnssec_available, bool& dnssec_valid)
{
std::vector<std::string> addresses;
+ dnssec_available = false;
+ dnssec_valid = false;
char urlC[1000]; // waaaay too big, but just in case...
strncpy(urlC, url.c_str(), 999);
@@ -178,9 +182,11 @@ std::vector<std::string> DNSResolver::get_ipv6(const std::string& url)
return addresses;
}
-std::vector<std::string> DNSResolver::get_txt_record(const std::string& url)
+std::vector<std::string> DNSResolver::get_txt_record(const std::string& url, bool& dnssec_available, bool& dnssec_valid)
{
std::vector<std::string> records;
+ dnssec_available = false;
+ dnssec_valid = false;
char urlC[1000]; // waaaay too big, but just in case...
strncpy(urlC, url.c_str(), 999);
diff --git a/src/common/dns_utils.h b/src/common/dns_utils.h
index dd6946dc4..9958e4ca2 100644
--- a/src/common/dns_utils.h
+++ b/src/common/dns_utils.h
@@ -71,9 +71,11 @@ public:
*
* @param url A string containing a URL to query for
*
+ * @param dnssec_available
+ *
* @return vector of strings containing ipv4 addresses
*/
- std::vector<std::string> get_ipv4(const std::string& url);
+ std::vector<std::string> get_ipv4(const std::string& url, bool& dnssec_available, bool& dnssec_valid);
/**
* @brief gets ipv6 addresses from DNS query
@@ -85,7 +87,7 @@ public:
*
* @return vector of strings containing ipv6 addresses
*/
- std::vector<std::string> get_ipv6(const std::string& url);
+ std::vector<std::string> get_ipv6(const std::string& url, bool& dnssec_available, bool& dnssec_valid);
/**
* @brief gets all TXT records from a DNS query for the supplied URL;
@@ -96,7 +98,7 @@ public:
* @return A vector of strings containing a TXT record; or an empty vector
*/
// TODO: modify this to accomodate DNSSEC
- std::vector<std::string> get_txt_record(const std::string& url);
+ std::vector<std::string> get_txt_record(const std::string& url, bool& dnssec_available, bool& dnssec_valid);
/**
* @brief Gets the singleton instance of DNSResolver