Commit graph

160 commits

Author SHA1 Message Date
moneromooo-monero
0921f5b4d7
util: use putenv instead of setenv for mingw 2015-11-25 21:38:10 +00:00
moneromooo-monero
f3724aef88
Fix startup crash when using a locale boost does not like
There are various locale related bugs in various versions of boost,
where exceptions are thrown in boost::filesystem APIs when the
current locale is not to boost's liking. It's not clear what "not
to boost's liking" means in detail, though "en" and "en_US.UTF-8"
are not to its liking.

Fix it by running a test function that's known to throw in such
a case, and resetting LANG and LC_ALL to C if an exception is
thrown. In simplewallet, the locale is queried before that so the
correct translations will still be used.
2015-11-21 10:13:10 +00:00
moneromooo-monero
0c1dae32b4
i18n: allow language to be passed as a parameter
If empty, it will still be fetched from the environment
2015-11-21 10:11:50 +00:00
moneromooo-monero
e70d2e5be8
common: const and init list pedantry 2015-10-27 09:36:38 +00:00
moneromooo-monero
151c32d5c4
dns_utils: fix wrong asserts
Braino.
2015-09-27 17:42:32 +01:00
moneromooo-monero
4e138a02df
dns_utils: remove unnecessary string conversion 2015-08-30 15:04:18 +01:00
moneromooo-monero
f928468b9b
dns_utils: factor the fetching code for different DNS record types 2015-08-30 15:04:09 +01:00
moneromooo-monero
4ef0da184d
dns_utils: simplify string handling and fix leak 2015-08-30 15:03:59 +01:00
moneromooo-monero
ae5f28cb51
dns_utils: add a const where possible 2015-08-27 21:08:55 +01:00
moneromooo-monero
f43d465da2
dns_utils: lock access to the singleton
This avoids races which could result in two objects being created
2015-08-27 21:08:03 +01:00
moneromooo-monero
5990344cb0
dns: make ctor private
This ensures one can't instanciate a DNSResolver object by
mistake, but uses the singleton. A separate create static
function is added for cases where a new object is explicitely
needed.
2015-08-27 21:06:09 +01:00
moneromooo-monero
ea58576cf6
Add missing file - i18n.cpp 2015-07-15 00:01:05 +01:00
moneromooo-monero
78b2eabc87 Translatable strings for simplewallet
The system is mostly the Qt system, but we don't use Qt to avoid
the dependencies.

See README.i18n for details.
2015-07-14 20:28:25 +01:00
Rostislav
3ade396406 Set dnssec_valid value correctly in dns_utils; fix address_from_url test 2015-06-20 20:02:13 +00:00
moneromooo-monero
a9b1f7eb05
dns_utils: simpify smart pointer use, and use for url strings too
OK, I admit I wanted to template this struct for fun too.
2015-06-07 16:58:49 +01:00
Riccardo Spagni
e01d32e52d
cleaning up, removing redundant files, renaming, fixing incorrect licenses 2015-05-31 13:40:18 +02:00
warptangent
fee8424938
Allow name@domain.tld for OpenAlias lookups
Based on tewinget's update.
Make OpenAlias address format independent of existing DNS functions.

Add tests.

Test:

make debug-test
cd build/debug/tests/unit_tests
# test that regular DNS functions work, including IPv4 lookups.
# also test function that converts OpenAlias address format
make && ./unit_tests --gtest_filter=DNSResolver*
# test that OpenAlias addresses like donate@getmonero.org work from
# wallet tools
make && ./unit_tests --gtest_filter=AddressFromURL.Success
2015-05-19 02:56:04 -07:00
warptangent
a0fe18f63a
Revert "Allow name@domain.tld for OpenAlias lookups"
This reverts commit b18368b635.
2015-05-19 02:49:39 -07:00
Thomas Winget
b18368b635
Allow name@domain.tld for OpenAlias lookups 2015-04-29 21:31:34 -04:00
rfree2monero
32c19c6c3d
[fix] log level change. compilation: dns, tests
old unbound #warning does not block compilation
unit tests build fine. Even though the RPC/P2P network type is required again
2015-04-10 16:54:21 +02:00
Riccardo Spagni
6f0d93097e
Merge pull request #252
618f20c Network 1.7; Quieted the debug a bit. (rfree2monero)
391c7f9 Utils: use const, document dbg. Less default debug (rfree2monero)
44f4234 [fix] mac os x includes std::random... (rfree2monero)
162c993 Network 1.6: network limits, logging, +doxy (rfree2monero)
a3b2226 my changelog (rfree2monero)
2900b1e doxygen files (rfree2monero)
1489310 doxygen related tool (rfree2monero)
f9dba47 added windows_stream.* console colors (rfree2monero)
c511abf remerged; commands JSON. logging upgrade. doxygen (rfree2monero)
f79821a fix locking in count-peers thread (2) (rfree2monero)
0198ffb 2014 network limit 1.3 fix log/path/data +utils (rfree2monero)
ae2a506 2014 network limit 1.2 +utils +toc -doc -drmonero (rfree2monero)
0f06dca fixed size_t on windows (rfree2monero)
39fc63f removed not needed <netinet/in.h> (rfree2monero)
5ce4256 2014 network limit 1.1 +utils +toc -doc -drmonero (rfree2monero)
eabb519 2014 network limit 1.0a +utils +toc -doc -drmonero (rfree2monero)
2015-04-02 17:43:43 +02:00
Thomas Winget
c0de96f8bd
Fixed DNS resolution bug in Windows
Due to a bug in unbound, we were passing a string containing a null
character to ub_ctx_resolvconf and ub_ctx_hosts rather than a NULL
pointer.  On *nix this wasn't causing headache, but on Windows this was
causing unbound to not correctly load DNS settings from the OS.

Note on the bug: in a Windows-specific code branch in the function
ub_ctx_hosts(), if the hosts file specified was a NULL pointer, a call
to getenv() was stored in a local char* and later freed.  This is
incorrect, as we do not own that data, and caused the program to crash.
2015-04-02 09:22:31 -04:00
rfree2monero
c511abf005 remerged; commands JSON. logging upgrade. doxygen 2015-04-01 19:00:45 +02:00
Thomas Winget
dbf46a721a
DNSSEC added (hardcoded key)
DNSSEC is now implemented with the hardcoded key from unbound.
This will need to be not hardcoded in the future, but is okay for now.

Unit tests updated for DNSSEC (as well as for the fact that, contrary to
previous assumption, example.com does not have a static IP address).
2015-03-24 06:34:15 -04:00
Thomas Winget
2b0583b2c6
Hopefully fixes build on Windows 2015-03-20 16:40:54 -04:00
Thomas Winget
9193d6fb5b
Daemonize changes pulled in -- daemon builds
many RPC functions added by the daemonize changes
(and related changes on the upstream dev branch that were not merged)
were commented out (apart from return).  Other than that, this *should*
work...at any rate, it builds, and that's something.
2015-02-24 00:05:19 -05:00
Riccardo Spagni
f4b69d553a
year updated in license 2015-01-02 18:52:46 +02:00
Ben Boeckel
7d708e4223 cmake: support 2.8.7
Older versions of CMake support LINK_{PUBLIC,PRIVATE} while newer
versions prefer PUBLIC and PRIVATE instead, but still support the LINK_
prefix.
2014-10-24 15:29:51 -04:00
Ben Boeckel
f53f04724c cmake: handle private vs. public headers 2014-10-23 16:42:34 -04:00
Ben Boeckel
55ca7d3b34 cmake: refactor common code with libraries 2014-10-23 16:42:34 -04:00
Ben Boeckel
89cff7bddc cmake: put each library into its own directory
This cleans up the CMake code and shows patterns more easily (to be
refactored in the next commit).
2014-10-23 16:42:34 -04:00
Riccardo Spagni
cee87473ad build libunbound from external if no local libunbound or for static builds 2014-10-06 18:08:32 +02:00
Riccardo Spagni
c4d6658f4c
quick hacky fix for broken TXT reads 2014-10-03 15:10:21 +02:00
Thomas Winget
0e1449135d 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.
2014-09-30 16:21:37 -04:00
Riccardo Spagni
59a8366bb1 Revert "low risk, potentially varint overflow bug patched thanks to BBR"
This reverts commit 4e2b2b942d.
2014-09-25 08:24:42 +02:00
Thomas Winget
fab95aef64
Remove LDNS dep and fix a bug in libunbound const correctness fix 2014-09-24 23:45:01 -04:00
Thomas Winget
2248124453 Removed ldns dependency
ldns dependency was only still around for constants defined in ldns/rr.h,
but those constants are RFC specified DNS constants, and to reduce deps
have been replicated in dns_utils.h instead of including ldns/rr.h.
2014-09-24 22:45:17 -04:00
Riccardo Spagni
4e2b2b942d low risk, potentially varint overflow bug patched thanks to BBR 2014-09-24 22:17:33 -04:00
Thomas Winget
738357459b
libunbound has const correctness issues... 2014-09-24 20:05:34 -04:00
Thomas Winget
1e193d687d temp commit 2014-09-24 09:13:18 +02:00
Thomas Winget
1dece111cc Added function to check syntax of URL for DNS lookup
For now, simply checks for '.' character, but that will be easy to
change in the future if necessary/desired.
2014-09-23 22:59:57 +02:00
Thomas Winget
c14c7e1683 change to allow (at least a bit) for multiple TXT records 2014-09-23 22:58:28 +02:00
Thomas Winget
a5757a628f Monero addres from DNS TXT record implemented, tests pass
Still need to deal with DNSSEC and optional fields in the TXT record.
2014-09-23 22:58:21 +02:00
Thomas Winget
9a3b18dbc2 Use the loop iterator, previous version of me. 2014-09-23 22:58:13 +02:00
Thomas Winget
578050e91d ipv4 and ipv6 resolution working
IPv4 and IPv6 name resolution working.
Unit tests written (and passing).
net_node.{h,inl} code modified to use DNS seeds.
2014-09-23 22:58:07 +02:00
Thomas Winget
1ae6db25e6 Initial commit of DNS code 2014-09-23 22:57:57 +02:00
Zachary Michaels
018e251cc0
Separate testnet default data dir 2014-09-15 15:54:19 +02:00
jebes
a13e879251 HOW DO I ENGLISH? 2014-09-11 10:45:05 -04:00
jebes
f7900ccfc1 mispelled brief, corrected it 2014-09-11 10:36:39 -04:00
jebes
9d6f9335d1 HOW DO I GIT? 2014-09-11 10:20:17 -04:00
jebes
a70bf86037 Documented varint 2014-09-11 10:14:05 -04:00
jebes
c085e9294f commented util.h 2014-09-09 20:18:23 -04:00
fluffypony
6fc995fe5d License updated to BSD 3-clause 2014-07-23 15:03:52 +02:00
Zachary Michaels
7259f07a20 Fix assert bug in base58 encode
The previous implementation was almost certainly a typo.
full_block_size is the maximum index in the encoded_block_sizes array,
and size is used as an index in this array.  So now 1 <= size <=
full_block_size == 8 instead of 1 <= size <= sizeof(full_block_size) ==
size_of(size_t) == ? (maybe 4 on 32-bit systems!)
2014-07-01 14:57:27 -04:00
Thomas Winget
ce352392d5 DRY cin input_line (and test replacement of non-DRY usage) 2014-06-12 19:05:52 -04:00
Thomas Winget
d22e458c6c builds, but doesn't link. other than that, electrum-style recovery implemented (but not tested\!) 2014-06-12 19:05:51 -04:00
mydesktop
333f975760 initial [broken] update 2014-05-03 12:19:43 -04:00
Antonio Juarez
29c2859a3e json rpc for wallet and bugfix 2014-04-02 17:00:17 +01:00
Antonio Juarez
8efa1313f3 some fixes 2014-03-20 11:46:11 +00:00
Antonio Juarez
296ae46ed8 moved all stuff to github 2014-03-03 22:07:58 +00:00