aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-08-17Add clear method to byte_streamLee Clagett1-0/+3
2020-08-16Merge pull request #6736Alexander Blair1-0/+7
05ad4fa39 epee: further defending against exceptions in command handlers (moneromooo-monero)
2020-08-16Merge pull request #6727Alexander Blair1-9/+31
13eee1d6a rpc: reject wrong sized txid (moneromooo-monero) 92e6b7df2 easylogging++: fix crash with reentrant logging (moneromooo-monero) 6dd95d530 epee: guard against exceptions in RPC handlers (moneromooo-monero) 90016ad74 blockchain: guard against exceptions in add_new_block/children (moneromooo-monero)
2020-08-16Merge pull request #6720Alexander Blair1-26/+0
86abf558c epee: Remove unused functions in local_ip.h (Jean Pierre Dudey)
2020-08-16Merge pull request #6718Alexander Blair2-2/+12
85efc88c1 Fix overflow issue in epee:misc_utils::rolling_median_t and median(), with unit test (koe)
2020-08-16Merge pull request #6716Alexander Blair2-8/+1
76c16822d wallet2_api: implement runtime proxy configuration (xiphon)
2020-08-02epee: further defending against exceptions in command handlersmoneromooo-monero1-0/+7
2020-07-30epee: guard against exceptions in RPC handlersmoneromooo-monero1-9/+31
2020-07-24Wallet, daemon: From 'help_advanced' back to 'help', and new 'apropos' commandrbrunner71-0/+25
2020-07-23Fix overflow issue in epee:misc_utils::rolling_median_t and median(), with ↵koe2-2/+12
unit test
2020-07-22epee: Remove unused functions in local_ip.hJean Pierre Dudey1-26/+0
Signed-off-by: Jean Pierre Dudey <me@jeandudey.tech>
2020-07-20wallet2_api: implement runtime proxy configurationxiphon2-8/+1
2020-07-19Merge pull request #6516Alexander Blair2-7/+0
8656a8c9f remove double includes (sumogr)
2020-07-19Merge pull request #6512Alexander Blair11-11/+11
5ef0607da Update copyright year to 2020 (SomaticFanatic)
2020-06-21epee: fix array underflow in unicode parsingmoneromooo-monero1-1/+1
Reported by minerscan Also independently found by OSS-Fuzz just recently
2020-06-08Merge pull request #6539luigi11111-6/+6
85164a8 epee: use memwipe rather than memset for md5 secrets (moneromooo-monero)
2020-05-31Fix boost <1.60 compilation and fix boost 1.73+ warningsLee Clagett4-17/+17
2020-05-16epee: use memwipe rather than memset for md5 secretsmoneromooo-monero1-6/+6
That's used by HTTP auth now
2020-05-14build: fix boost 1.73 compatibilityselsta2-6/+6
2020-05-11remove double includessumogr2-7/+0
2020-05-06Update copyright year to 2020SomaticFanatic11-11/+11
Update copyright year to 2020
2020-04-11Add byte_stream for zero-copy serialization, and add support in ZMQ-JSON.Lee Clagett2-1/+249
2020-05-01Merge pull request #6446luigi11112-0/+11
e509ede trezor: adapt to new passphrase mechanism (ph4r05)
2020-04-27trezor: adapt to new passphrase mechanismDusan Klinec2-0/+11
- 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
2020-04-04Merge pull request #6351luigi11113-38/+24
81c5943 Remove temporary std::string creation in some hex->bin calls (vtnerd) 5fcc23a Move hex->bin conversion to monero copyright files and with less includes (vtnerd) 3387f0e Reduce template bloat in hex->bin for ZMQ json (vtnerd)
2020-04-04Merge pull request #6339luigi11112-2/+2
c61abf8 remove empty statements (shopglobal)
2020-04-03Use byte_slice for sending zmq messages - removes data copy within zmqLee Clagett1-1/+9
2020-04-15Allow wallet2.h to run in WebAssemblywoodser4-158/+117
- Add abstract_http_client.h which http_client.h extends. - Replace simple_http_client with abstract_http_client in wallet2, message_store, message_transporter, and node_rpc_proxy. - Import and export wallet data in wallet2. - Use #if defined __EMSCRIPTEN__ directives to skip incompatible code.
2020-03-31p2p: fix frequent weak_ptr exception on connectionmoneromooo-monero1-1/+6
When a handshake fails, it can fail due to timeout or destroyed connection, in which case the connection will be, or already is, closed, and we don't want to do it twice. Additionally, when closing a connection directly from the top level code, ensure the connection is gone from the m_connects list so it won't be used again. AFAICT this is now clean in netstat, /proc/PID/fd and print_cn. This fixes a noisy (but harmless) exception.
2020-03-31Merge pull request #6336luigi11111-3/+7
760ecf2 console_handler: do not let exception past the dor (moneromooo-monero) 09c8111 threadpool: lock mutex in create (moneromooo-monero) e377977 tx_pool: catch theoretical error in get_block_reward (moneromooo-monero)
2020-03-31Merge pull request #6311luigi11111-0/+7
5002a03 Explicitly define copy assignment operator (omartijn)
2020-03-12Merge pull request #6273Alexander Blair1-1/+11
0f78b06e Various improvements to the ZMQ JSON-RPC handling: (Lee Clagett)
2020-03-12Merge pull request #6244Alexander Blair1-5/+16
352bd132 abstract_tcp_server2: guard against negative timeouts (moneromooo-monero)
2020-03-12Merge pull request #6243Alexander Blair2-6/+4
4771a7ae p2p: remove obsolete local time in handshake (moneromooo-monero) 2fbbc4a2 p2p: avoid sending the same peer list over and over (moneromooo-monero) 3004835b epee: remove backward compatible endian specific address serialization (moneromooo-monero) 39a343d7 p2p: remove backward compatible peer list (moneromooo-monero) 60631802 p2p: simplify last_seen serialization now we have optional stores (moneromooo-monero) 9467b2e4 cryptonote_protocol: omit top 64 bits of difficulty when 0 (moneromooo-monero) b595583f serialization: do not write optional fields with default value (moneromooo-monero) 5f98b46d p2p: remove obsolete local time from TIMED_SYNC (moneromooo-monero)
2020-03-09Move hex->bin conversion to monero copyright files and with less includesLee Clagett3-34/+19
2020-03-09Remove temporary std::string creation in some hex->bin callsLee Clagett1-5/+6
2020-03-05Various improvements to the ZMQ JSON-RPC handling:Lee Clagett1-1/+11
- Finding handling function in ZMQ JSON-RPC now uses binary search - Temporary `std::vector`s in JSON output now use `epee::span` to prevent allocations. - Binary -> hex in JSON output no longer allocates temporary buffer - C++ structs -> JSON skips intermediate DOM creation, and instead write directly to an output stream.
2020-02-28Merge pull request #6220Alexander Blair6-56/+53
a9bdc6e4 Improved performance for epee serialization: (Lee Clagett)
2020-02-17remove empty statementsInterchained2-2/+2
Cleaning up a little around the code base.
2020-02-12console_handler: do not let exception past the dormoneromooo-monero1-3/+7
Coverity 208373
2020-02-06Merge pull request #6182Alexander Blair1-1/+1
e896cca8 epee: reorder a couple init list fields to match declaration (moneromooo-monero)
2020-01-28Explicitly define copy assignment operatorMartijn Otto1-0/+7
The implicit copy assignment operator was deprecated because the class has an explicit copy constructor. According to the standard: The generation of the implicitly-defined copy assignment operator is deprecated (since C++11) if T has a user-declared destructor or user-declared copy constructor. Recent versions of gcc (9.1+) and clang (10.0) warn about this.
2020-01-26epee: remove backward compatible endian specific address serializationmoneromooo-monero1-6/+2
2020-01-26serialization: do not write optional fields with default valuemoneromooo-monero1-0/+2
2020-01-26network: log traffic and add a simple traffic analysis scriptmoneromooo-monero1-5/+43
2020-01-16Merge pull request #6143Alexander Blair1-0/+2
6efeefbc epee: set application/json MIME type on json errors (moneromooo-monero)
2020-01-16Merge pull request #6133Alexander Blair1-1/+1
b2ad757f Replace memset with memwipe. (Bert Peters)
2020-01-16Merge pull request #6125Alexander Blair1-1/+8
584d057f epee: fix console_handlers_binder race, wait for thread to finish (xiphon)
2020-01-16Merge pull request #6120Alexander Blair1-1/+3
feef1c6a epee: fix peer ids being truncated on display (moneromooo-monero)
2019-12-16abstract_tcp_server2: guard against negative timeoutsmoneromooo-monero1-5/+16
2019-11-25epee: reorder a couple init list fields to match declarationmoneromooo-monero1-1/+1
This is a bug waiting to happen
2019-11-15epee: set application/json MIME type on json errorsmoneromooo-monero1-0/+2
2019-11-14epee: fix peer ids being truncated on displaymoneromooo-monero1-1/+3
2019-11-13Replace memset with memwipe.Bert Peters1-1/+1
2019-11-12epee: fix console_handlers_binder race, wait for thread to finishxiphon1-1/+8
2019-11-04Improved performance for epee serialization:Lee Clagett6-56/+53
- Removed copy of field names in binary deserialization - Removed copy of array values in binary deserialization - Removed copy of string values in json deserialization - Removed unhelpful allocation in json string value parsing - Removed copy of blob data on binary and json serialization
2019-11-11epee: close connection when the peer has done somoneromooo-monero1-1/+7
This fixes rapid reconnections failing as the peer hasn't yet worked out the other side is gone, and will reject "duplicate" connections until a timeout.
2019-11-02Adding support for hidden (anonymity) txpoolLee Clagett1-1/+2
2019-11-01epee: allow a random component in once_a_time timeoutsmoneromooo-monero1-4/+16
2019-10-25Merge pull request #5357luigi11114-7/+50
b3a9a4d add a quick early out to get_blocks.bin when up to date (moneromooo-monero) 2899379 daemon, wallet: new pay for RPC use system (moneromooo-monero) ffa4602 simplewallet: add public_nodes command (moneromooo-monero)
2019-10-25daemon, wallet: new pay for RPC use systemmoneromooo-monero4-7/+50
Daemons intended for public use can be set up to require payment in the form of hashes in exchange for RPC service. This enables public daemons to receive payment for their work over a large number of calls. This system behaves similarly to a pool, so payment takes the form of valid blocks every so often, yielding a large one off payment, rather than constant micropayments. This system can also be used by third parties as a "paywall" layer, where users of a service can pay for use by mining Monero to the service provider's address. An example of this for web site access is Primo, a Monero mining based website "paywall": https://github.com/selene-kovri/primo This has some advantages: - incentive to run a node providing RPC services, thereby promoting the availability of third party nodes for those who can't run their own - incentive to run your own node instead of using a third party's, thereby promoting decentralization - decentralized: payment is done between a client and server, with no third party needed - private: since the system is "pay as you go", you don't need to identify yourself to claim a long lived balance - no payment occurs on the blockchain, so there is no extra transactional load - one may mine with a beefy server, and use those credits from a phone, by reusing the client ID (at the cost of some privacy) - no barrier to entry: anyone may run a RPC node, and your expected revenue depends on how much work you do - Sybil resistant: if you run 1000 idle RPC nodes, you don't magically get more revenue - no large credit balance maintained on servers, so they have no incentive to exit scam - you can use any/many node(s), since there's little cost in switching servers - market based prices: competition between servers to lower costs - incentive for a distributed third party node system: if some public nodes are overused/slow, traffic can move to others - increases network security - helps counteract mining pools' share of the network hash rate - zero incentive for a payer to "double spend" since a reorg does not give any money back to the miner And some disadvantages: - low power clients will have difficulty mining (but one can optionally mine in advance and/or with a faster machine) - payment is "random", so a server might go a long time without a block before getting one - a public node's overall expected payment may be small Public nodes are expected to compete to find a suitable level for cost of service. The daemon can be set up this way to require payment for RPC services: monerod --rpc-payment-address 4xxxxxx \ --rpc-payment-credits 250 --rpc-payment-difficulty 1000 These values are an example only. The --rpc-payment-difficulty switch selects how hard each "share" should be, similar to a mining pool. The higher the difficulty, the fewer shares a client will find. The --rpc-payment-credits switch selects how many credits are awarded for each share a client finds. Considering both options, clients will be awarded credits/difficulty credits for every hash they calculate. For example, in the command line above, 0.25 credits per hash. A client mining at 100 H/s will therefore get an average of 25 credits per second. For reference, in the current implementation, a credit is enough to sync 20 blocks, so a 100 H/s client that's just starting to use Monero and uses this daemon will be able to sync 500 blocks per second. The wallet can be set to automatically mine if connected to a daemon which requires payment for RPC usage. It will try to keep a balance of 50000 credits, stopping mining when it's at this level, and starting again as credits are spent. With the example above, a new client will mine this much credits in about half an hour, and this target is enough to sync 500000 blocks (currently about a third of the monero blockchain). There are three new settings in the wallet: - credits-target: this is the amount of credits a wallet will try to reach before stopping mining. The default of 0 means 50000 credits. - auto-mine-for-rpc-payment-threshold: this controls the minimum credit rate which the wallet considers worth mining for. If the daemon credits less than this ratio, the wallet will consider mining to be not worth it. In the example above, the rate is 0.25 - persistent-rpc-client-id: if set, this allows the wallet to reuse a client id across runs. This means a public node can tell a wallet that's connecting is the same as one that connected previously, but allows a wallet to keep their credit balance from one run to the other. Since the wallet only mines to keep a small credit balance, this is not normally worth doing. However, someone may want to mine on a fast server, and use that credit balance on a low power device such as a phone. If left unset, a new client ID is generated at each wallet start, for privacy reasons. To mine and use a credit balance on two different devices, you can use the --rpc-client-secret-key switch. A wallet's client secret key can be found using the new rpc_payments command in the wallet. Note: anyone knowing your RPC client secret key is able to use your credit balance. The wallet has a few new commands too: - start_mining_for_rpc: start mining to acquire more credits, regardless of the auto mining settings - stop_mining_for_rpc: stop mining to acquire more credits - rpc_payments: display information about current credits with the currently selected daemon The node has an extra command: - rpc_payments: display information about clients and their balances The node will forget about any balance for clients which have been inactive for 6 months. Balances carry over on node restart.
2019-10-24Merge pull request #6006luigi11111-2/+6
9f3be3b epee: use SO_REUSEADDR on non-Windows targets (xiphon)
2019-10-22epee: use SO_REUSEADDR on non-Windows targetsxiphon1-2/+6
2019-10-22Merge pull request #5996luigi11111-0/+1
23ba69e epee: fix SSL server handshake, run_one() can block, use poll_one() (xiphon)
2019-10-22Merge pull request #5986luigi11111-1/+1
1080136 abstract_tcp_server2: move 'Trying to connect' from error to debug (moneromooo-monero)
2019-10-22Merge pull request #5966luigi11111-0/+3
be82c40 Support median block size > 4 GB (moneromooo-monero)
2019-10-21Support median block size > 4 GBmoneromooo-monero1-0/+3
add a 128/64 division routine so we can use a > 32 bit median block size in calculations
2019-10-18epee: fix SSL server handshake, run_one() can block, use poll_one()xiphon1-0/+1
2019-10-16Merge pull request #5911luigi11111-0/+5
e48dcb7 levin: armour against some 'should not happen' case (moneromooo-monero)
2019-10-15levin: armour against some "should not happen" casemoneromooo-monero1-0/+5
If adding a response handler after the protocol is released, they could never be cancelled again, and would end up keeping a ref that never goes away
2019-10-14Merge pull request #5947luigi11111-4/+2
c9cfbf7 epee: tcp server - set SO_LINGER instead of SO_REUSEADDR option (xiphon)
2019-10-14Merge pull request #5937luigi11111-1/+1
4b654f6 abstract_tcp_server2: log pointer, not contents, where appropriate (moneromooo-monero)
2019-10-14abstract_tcp_server2: move "Trying to connect" from error to debugmoneromooo-monero1-1/+1
and fix the message grammar
2019-10-08Merge pull request #5918luigi11112-2/+6
4371791 epee: implement handshake timeout for SSL connections (xiphon)
2019-10-08Merge pull request #5917luigi11111-1/+2
7d81850 epee: fix network timeouts in blocked_mode_client (xiphon)
2019-10-02epee: tcp server - set SO_LINGER instead of SO_REUSEADDR optionxiphon1-4/+2
2019-09-30Merge pull request #5910luigi11111-0/+5
1b91beb abstract_tcp_server2: fix lingering connections (moneromooo-monero)
2019-09-30Merge pull request #5893luigi11111-1/+13
Coverity fixes [3a81639, 1bd962d, 2825f07, d099658, d46f701, cd57a10] (anonimal)
2019-09-27abstract_tcp_server2: log pointer, not contents, where appropriatemoneromooo-monero1-1/+1
2019-09-24epee: misc_log_ex.h can now be used in C codemoneromooo-monero1-0/+26
use mfatal/merror/mwarning/minfo/mdebug/mtrace
2019-09-17epee: implement handshake timeout for SSL connectionsxiphon2-2/+6
2019-09-16epee: fix network timeouts in blocked_mode_clientxiphon1-1/+2
2019-09-16Properly format multiline logsmoneromooo-monero1-21/+21
As a side effect, colouring on Windows should now work regardless of version
2019-09-14Merge pull request #5898luigi11111-1/+1
73f22c4 depends: fix MacOS build with Clang 3.7.1 (vtnerd)
2019-09-12abstract_tcp_server2: fix lingering connectionsmoneromooo-monero1-0/+5
Resetting the timer after shutdown was initiated would keep a reference to the object inside ASIO, which would keep the connection alive until the timer timed out
2019-09-08depends: fix MacOS build with Clang 3.7.1Lee Clagett1-1/+1
2019-09-08epee: abstract_tcp_server2: resolve CID 203919 (DC.WEAK_CRYPTO)anonimal1-1/+13
The problem actually exists in two parts: 1. When sending chunks over a connection, if the queue size is greater than N, the seed is predictable across every monero node. >"If rand() is used before any calls to srand(), rand() behaves as if it was seeded with srand(1). Each time rand() is seeded with the same seed, it must produce the same sequence of values." 2. The CID speaks for itself: "'rand' should not be used for security-related applications, because linear congruential algorithms are too easy to break." *But* this is an area of contention. One could argue that a CSPRNG is warranted in order to fully mitigate any potential timing attacks based on crafting chunk responses. Others could argue that the existing LCG, or even an MTG, would suffice (if properly seeded). As a compromise, I've used an MTG with a full bit space. This should give a healthy balance of security and speed without relying on the existing crypto library (which I'm told might break on some systems since epee is not (shouldn't be) dependent upon the existing crypto library).
2019-09-04Fix IP address serialization on big endianmoneromooo-monero1-1/+15
IP addresses are stored in network byte order even on little endian hosts
2019-09-04storages: fix "portable" storage on big endianmoneromooo-monero4-3/+99
2019-09-04storages: fix writing varints on big endianmoneromooo-monero1-1/+1
2019-09-04epee: fix local/loopback checks on big endianmoneromooo-monero1-0/+7
IPv4 addresses are kept in network byte order in memory
2019-09-04Merge pull request #5824luigi11111-1/+1
2a41dc0 epee: fix connections not being properly closed in some instances (moneromooo-monero)
2019-09-04Merge pull request #5814luigi11111-91/+0
bdcdb0e Remove unused code under WINDWOS_PLATFORM guard (tomsmeding) a84aa04 syncobj.h no longer defines shared_guard, so remove those define's (tomsmeding)
2019-09-04Merge pull request #5536luigi11112-13/+78
1a367d6 simplewallet: lock console on inactivity (moneromooo-monero)
2019-08-28simplewallet: lock console on inactivitymoneromooo-monero2-13/+78
2019-08-23syncobj.h no longer defines shared_guard, so remove those define'sTom Smeding1-3/+0
The removed preprocessor macro's refer to types that are not defined in the file anymore; the only other place where shared_guard is defined is in winobj.h, which also defines the same macro's. Therefore, this change is safe. (Side note is that these macro's weren't used at all anyway, but that is orthogonal to the issue.)
2019-08-20fix feature not introduced until boost 1.66Jethro Grassie1-1/+1
2019-08-19epee: fix connections not being properly closed in some instancesmoneromooo-monero1-1/+1
Fixed by Fixed by crCr62U0
2019-08-16epee: support unicode in parsed stringsmoneromooo-monero2-22/+61
2019-08-15Merge pull request #5674luigi11111-0/+24
fcbf7b3 p2p: propagate out peers limit to payload handler (moneromooo-monero) 098aadf p2p: close the right number of connections on setting max in/out peers (moneromooo-monero)
2019-08-15Merge pull request #5649luigi11112-2/+6
a182df2 Bans for RPC connections (hyc)
2019-08-15Remove unused code under WINDWOS_PLATFORM guardTom Smeding1-88/+0
This code has been present, unchanged, ever since the original move to github in 2014 with commit 296ae46ed.
2019-07-31Add IPv6 supportThomas Winget6-64/+416
new cli options (RPC ones also apply to wallet): --p2p-bind-ipv6-address (default = "::") --p2p-bind-port-ipv6 (default same as ipv4 port for given nettype) --rpc-bind-ipv6-address (default = "::1") --p2p-use-ipv6 (default false) --rpc-use-ipv6 (default false) --p2p-require-ipv4 (default true, if ipv4 bind fails and this is true, will not continue even if ipv6 bind successful) --rpc-require-ipv4 (default true, description as above) ipv6 addresses are to be specified as "[xx:xx:xx::xx:xx]:port" except in the cases of the cli args for bind address. For those the square braces can be omitted.
2019-07-24Merge pull request #5531luigi11111-4/+8
9a6006b abstract_tcp_server2: move some things out of a lock (moneromooo-monero)
2019-07-24Merge pull request #5530luigi11111-2/+0
6abaaaa remove obsolete save_graph skeleton code (moneromooo-monero)
2019-07-24Merge pull request #5528luigi11111-1/+1
f61a315 net_utils: fix m_ssl type from time_t to bool (moneromooo-monero)
2019-07-17Added support for "noise" over I1P/Tor to mask Tx transmission.Lee Clagett7-61/+158
2019-07-16Add ref-counted buffer byte_slice. Currently used for sending TCP data.Lee Clagett8-147/+234
2019-07-16allow blocking whole subnetsmoneromooo-monero2-2/+49
2019-06-19p2p: close the right number of connections on setting max in/out peersmoneromooo-monero1-0/+24
2019-06-16Bans for RPC connectionsHoward Chu2-2/+6
Make bans control RPC sessions too. And auto-ban some bad requests. Drops HTTP connections whenever response code is 500.
2019-06-14abstract_tcp_server2: improve DoS resistancemoneromooo-monero1-4/+5
2019-06-14epee: basic sanity check on allocation size from untrusted sourcemoneromooo-monero1-0/+1
Reported by guidov
2019-06-11Merge pull request #5618luigi11111-6/+4
b0a04f7 epee: fix SSL autodetect on reconnection (xiphon)
2019-06-10epee: fix SSL autodetect on reconnectionxiphon1-6/+4
2019-06-09Fix GCC 9.1 build warningsmoneromooo-monero1-0/+5
GCC wants operator= aand copy ctor to be both defined, or neither
2019-05-22Add ssl_options support to monerod's rpc mode.Lee Clagett1-0/+38
2019-05-10abstract_tcp_server2: move some things out of a lockmoneromooo-monero1-4/+8
The lock is meant for the network throttle object only, and this should help coverity get unconfused
2019-05-10remove obsolete save_graph skeleton codemoneromooo-monero1-2/+0
2019-05-10net_utils: fix m_ssl type from time_t to boolmoneromooo-monero1-1/+1
2019-05-07Merge pull request #5509Riccardo Spagni1-0/+3
a62e0725 net_ssl: SSL config tweaks for compatibility and security (moneromooo-monero)
2019-05-07Merge pull request #5499Riccardo Spagni1-0/+236
a4c4a2d8 blockchain: keep a rolling long term block weight median (moneromooo-monero)
2019-05-07net_ssl: SSL config tweaks for compatibility and securitymoneromooo-monero1-0/+3
add two RSA based ciphers for Windows/depends compatibility also enforce server cipher ordering also set ECDH to auto because vtnerd says it is good :) When built with the depends system, openssl does not include any cipher on the current whitelist, so add this one, which fixes the problem, and does seem sensible.
2019-05-02blockchain: keep a rolling long term block weight medianmoneromooo-monero1-0/+236
2019-04-26change SSL certificate fingerprint whitelisting from SHA1 to SHA-256moneromooo-monero1-0/+2
SHA1 is too close to bruteforceable
2019-04-24Merge pull request #5482Riccardo Spagni1-0/+1
9956500d net_helper: clear recv buffer on eof (moneromooo-monero)
2019-04-24Merge pull request #5479Riccardo Spagni1-1/+1
edbae2d0 levin_protocol_handler_async: tune down preallocation a fair bit (moneromooo-monero)
2019-04-23net_helper: clear recv buffer on eofmoneromooo-monero1-0/+1
2019-04-22levin_protocol_handler_async: tune down preallocation a fair bitmoneromooo-monero1-1/+1
It can allocate a lot when getting a lot of connections (in particular, the stress test on windows apparently pushes that memory to actual use, rather than just allocated)
2019-04-21serialization: set default log categorymoneromooo-monero2-0/+6
2019-04-18epee: use boost/timer/timer.hpp, boost/timer.hpp is deprecatedmoneromooo-monero1-1/+1
2019-04-16Merge pull request #5445Riccardo Spagni1-0/+12
b18f0b10 wallet: new --offline option (moneromooo-monero)
2019-04-16Merge pull request #5436Riccardo Spagni1-3/+4
61d63900 net_helper: avoid unnecessary memcpy (moneromooo-monero)
2019-04-15wallet: new --offline optionmoneromooo-monero1-0/+12
It will avoid connecting to a daemon (so useful for cold signing using a RPC wallet), and not perform DNS queries.
2019-04-13net_helper: avoid unnecessary memcpymoneromooo-monero1-3/+4
2019-04-12abstract_tcp_server2: fix timeout on exitmoneromooo-monero2-2/+9
When closing connections due to exiting, the IO service is already gone, so the data exchange needed for a gracious SSL shutdown cannot happen. We just close the socket in that case.
2019-04-11epee: init a new ssl related variable in ctormoneromooo-monero1-0/+1
2019-04-11simplewallet: new net_stats commandmoneromooo-monero2-2/+30
displays total sent and received bytes
2019-04-07Enabling daemon-rpc SSL now requires non-system CA verificationLee Clagett1-0/+3
If `--daemon-ssl enabled` is set in the wallet, then a user certificate, fingerprint, or onion/i2p address must be provided.
2019-04-07Require manual override for user chain certificates.Lee Clagett1-1/+2
An override for the wallet to daemon connection is provided, but not for other SSL contexts. The intent is to prevent users from supplying a system CA as the "user" whitelisted certificate, which is less secure since the key is controlled by a third party.
2019-04-07Perform RFC 2818 hostname verification in client SSL handshakesLee Clagett2-2/+14
If the verification mode is `system_ca`, clients will now do hostname verification. Thus, only certificates from expected hostnames are allowed when SSL is enabled. This can be overridden by forcible setting the SSL mode to autodetect. Clients will also send the hostname even when `system_ca` is not being performed. This leaks possible metadata, but allows servers providing multiple hostnames to respond with the correct certificate. One example is cloudflare, which getmonero.org is currently using.
2019-04-07Require server verification when SSL is enabled.Lee Clagett1-0/+6
If SSL is "enabled" via command line without specifying a fingerprint or certificate, the system CA list is checked for server verification and _now_ fails the handshake if that check fails. This change was made to remain consistent with standard SSL/TLS client behavior. This can still be overridden by using the allow any certificate flag. If the SSL behavior is autodetect, the system CA list is still checked but a warning is logged if this fails. The stream is not rejected because a re-connect will be attempted - its better to have an unverified encrypted stream than an unverified + unencrypted stream.
2019-04-07Pass SSL arguments via one class and use shared_ptr instead of referenceLee Clagett7-111/+152
2019-04-06Change SSL certificate file list to OpenSSL builtin load_verify_locationLee Clagett6-23/+20
Specifying SSL certificates for peer verification does an exact match, making it a not-so-obvious alias for the fingerprints option. This changes the checks to OpenSSL which loads concatenated certificate(s) from a single file and does a certificate-authority (chain of trust) check instead. There is no drop in security - a compromised exact match fingerprint has the same worse case failure. There is increased security in allowing separate long-term CA key and short-term SSL server keys. This also removes loading of the system-default CA files if a custom CA file or certificate fingerprint is specified.
2019-04-06Merge pull request #5375Riccardo Spagni1-0/+1
1569776a Add missing include (Leon Klingele)
2019-04-06Merge pull request #5348Riccardo Spagni4-8/+11
59776a64 epee: some more minor JSON parsing speedup (moneromooo-monero)
2019-04-01Merge pull request #5327Riccardo Spagni2-1/+5
c23ea796 New interactive daemon command 'print_net_stats': Global traffic stats (rbrunner7)
2019-04-01Merge pull request #5309Riccardo Spagni1-0/+1
43042a28 Implement array_entry_t copy constructor (Guido Vranken)
2019-03-31Add missing includeLeon Klingele1-0/+1
2019-03-25epee: some more minor JSON parsing speedupmoneromooo-monero4-8/+11
2019-03-25Added socks proxy (tor/i2pd/kovri) support to walletLee Clagett4-75/+79
2019-03-24Merge pull request #5285Riccardo Spagni1-0/+1
6ef816de console_handler: print newline on EOF (moneromooo-monero)
2019-03-24New interactive daemon command 'print_net_stats': Global traffic statsrbrunner72-1/+5
2019-03-21Merge pull request #5283Riccardo Spagni1-5/+6
16590294 abstract_tcp_server2: fix crashy race on socket shutdown (moneromooo-monero)
2019-03-21epee: fix build with boost 1.70.0moneromooo-monero1-5/+11
get_io_service was deprecated, and got removed
2019-03-19abstract_tcp_server2: fix crashy race on socket shutdownmoneromooo-monero1-5/+6
2019-03-18Implement array_entry_t copy constructorGuido Vranken1-0/+1
Manually initialize the array_entry_t iterator to ensure it points to the correct m_array, thereby preventing a potential use-after-free situation. Signed-off-by: Guido Vranken <guidovranken@gmail.com>
2019-03-17Merge pull request #5061Riccardo Spagni9-9/+9
1f2930ce Update 2019 copyright (binaryFate)
2019-03-13console_handler: print newline on EOFmoneromooo-monero1-0/+1
This avoids the annoying case where the shell prints its prompt after the last line from Monero output, causing line editing to sometimes go wonky, for lack of a better term
2019-03-08Fix startup errors with SSL cert generationHoward Chu1-1/+0
Use SSL API directly, skip boost layer
2019-03-05Update 2019 copyrightbinaryFate9-9/+9
2019-03-05epee: add SSL supportMartijn Otto7-19/+31
RPC connections now have optional tranparent SSL. An optional private key and certificate file can be passed, using the --{rpc,daemon}-ssl-private-key and --{rpc,daemon}-ssl-certificate options. Those have as argument a path to a PEM format private private key and certificate, respectively. If not given, a temporary self signed certificate will be used. SSL can be enabled or disabled using --{rpc}-ssl, which accepts autodetect (default), disabled or enabled. Access can be restricted to particular certificates using the --rpc-ssl-allowed-certificates, which takes a list of paths to PEM encoded certificates. This can allow a wallet to connect to only the daemon they think they're connected to, by forcing SSL and listing the paths to the known good certificates. To generate long term certificates: openssl genrsa -out /tmp/KEY 4096 openssl req -new -key /tmp/KEY -out /tmp/REQ openssl x509 -req -days 999999 -sha256 -in /tmp/REQ -signkey /tmp/KEY -out /tmp/CERT /tmp/KEY is the private key, and /tmp/CERT is the certificate, both in PEM format. /tmp/REQ can be removed. Adjust the last command to set expiration date, etc, as needed. It doesn't make a whole lot of sense for monero anyway, since most servers will run with one time temporary self signed certificates anyway. SSL support is transparent, so all communication is done on the existing ports, with SSL autodetection. This means you can start using an SSL daemon now, but you should not enforce SSL yet or nothing will talk to you.
2019-03-04default initialize rpc structuresmoneromooo-monero2-0/+19
2019-03-04Merge pull request #5162Riccardo Spagni2-6/+14
4d3b61a3 Use io_service::work in epee tcp server (Lee Clagett)
2019-03-04Merge pull request #5160Riccardo Spagni1-1/+1
7af4fbd4 epee: Add space after ':' in additional http response headers (Tom Smeding)
2019-03-04Merge pull request #5113Riccardo Spagni1-0/+1
c0e9e805 Fixed missing return value in once_a_time class on windows (Markus Behm)
2019-03-04Merge pull request #5102Riccardo Spagni2-0/+417
1eef0565 performance_tests: better stats, and keep track of timing history (moneromooo-monero)
2019-03-04Merge pull request #5096Riccardo Spagni1-1/+2
7c3ade44 network_throttle: use circular_buffer where appropriate (moneromooo-monero)
2019-03-04Merge pull request #5091Riccardo Spagni1-1/+4
123fc2a2 i2p: initial support (Jethro Grassie)
2019-02-18epee: Add space after ':' in additional http response headersTom Smeding1-1/+1
2019-02-10Use io_service::work in epee tcp serverLee Clagett2-6/+14
2019-02-09Fixed missing return value in once_a_time class on windowsMarkus Behm1-0/+1
2019-02-02epee: add SSL supportmoneromooo-monero8-198/+539
RPC connections now have optional tranparent SSL. An optional private key and certificate file can be passed, using the --{rpc,daemon}-ssl-private-key and --{rpc,daemon}-ssl-certificate options. Those have as argument a path to a PEM format private private key and certificate, respectively. If not given, a temporary self signed certificate will be used. SSL can be enabled or disabled using --{rpc}-ssl, which accepts autodetect (default), disabled or enabled. Access can be restricted to particular certificates using the --rpc-ssl-allowed-certificates, which takes a list of paths to PEM encoded certificates. This can allow a wallet to connect to only the daemon they think they're connected to, by forcing SSL and listing the paths to the known good certificates. To generate long term certificates: openssl genrsa -out /tmp/KEY 4096 openssl req -new -key /tmp/KEY -out /tmp/REQ openssl x509 -req -days 999999 -sha256 -in /tmp/REQ -signkey /tmp/KEY -out /tmp/CERT /tmp/KEY is the private key, and /tmp/CERT is the certificate, both in PEM format. /tmp/REQ can be removed. Adjust the last command to set expiration date, etc, as needed. It doesn't make a whole lot of sense for monero anyway, since most servers will run with one time temporary self signed certificates anyway. SSL support is transparent, so all communication is done on the existing ports, with SSL autodetection. This means you can start using an SSL daemon now, but you should not enforce SSL yet or nothing will talk to you.
2019-02-01network_throttle: use circular_buffer where appropriatemoneromooo-monero1-1/+2
2019-01-30i2p: initial supportJethro Grassie1-1/+4
2019-01-28Adding initial support for broadcasting transactions over TorLee Clagett5-98/+267
- Support for ".onion" in --add-exclusive-node and --add-peer - Add --anonymizing-proxy for outbound Tor connections - Add --anonymous-inbounds for inbound Tor connections - Support for sharing ".onion" addresses over Tor connections - Support for broadcasting transactions received over RPC exclusively over Tor (else broadcast over public IP when Tor not enabled).
2019-01-28rpc: fix internal daemon calls in restricted rpc getting partial datamoneromooo-monero1-6/+6
2019-01-28performance_tests: better stats, and keep track of timing historymoneromooo-monero2-0/+417
2019-01-22Pruningmoneromooo-monero4-2/+29
The blockchain prunes seven eighths of prunable tx data. This saves about two thirds of the blockchain size, while keeping the node useful as a sync source for an eighth of the blockchain. No other data is currently pruned. There are three ways to prune a blockchain: - run monerod with --prune-blockchain - run "prune_blockchain" in the monerod console - run the monero-blockchain-prune utility The first two will prune in place. Due to how LMDB works, this will not reduce the blockchain size on disk. Instead, it will mark parts of the file as free, so that future data will use that free space, causing the file to not grow until free space grows scarce. The third way will create a second database, a pruned copy of the original one. Since this is a new file, this one will be smaller than the original one. Once the database is pruned, it will stay pruned as it syncs. That is, there is no need to use --prune-blockchain again, etc.
2019-01-16epee: speedup word/number matchingmoneromooo-monero2-45/+89
Number matching semantics are slightly changed: since this is used as a filter to check whether a number is signed and/or floating point, we can speed this up further. strto* functions are called afterwards and will error out where necessary. We now also accept numbers like .4 which were not accepted before. The strto* calls on a boost::string_ref will not access unallocated memory since the parsers always stop at the first bad character, and the original string is zero terminated. in arbitrary time measurement units for some arbitrary test case: match_number2: 235 -> 70 match_word2: 330 -> 108
2019-01-16Merge pull request #5021Riccardo Spagni2-3/+13
b82efa32 epee: speed up json parsing (moneromooo-monero)
2019-01-16Merge pull request #5001Riccardo Spagni1-30/+0
a5ffc2d5 Remove boost::lexical_cast for uuid and unused uuid function (Lee Clagett)
2019-01-16Merge pull request #4976Riccardo Spagni11-54/+128
85665003 epee: better network buffer data structure (moneromooo-monero)
2019-01-06Merge pull request #4950Riccardo Spagni1-8/+15
68f045de easylogging++: check allowed categories before logging (moneromooo-monero)
2019-01-06Merge pull request #4949Riccardo Spagni1-9/+30
5464725a protocol: change standby mode to not wait sleeping (moneromooo-monero) 85807dfb add a once_a_time_milliseconds class (moneromooo-monero)
2019-01-06Merge pull request #4938Riccardo Spagni2-38/+18
a13eb0a1 epee: speed up string matching a bit (moneromooo-monero) 3a3858dc epee: avoid string allocation when parsing a pod from string (moneromooo-monero)
2018-12-31Merge pull request #4933luigi11112-2/+2
3cf85f0 Changed RECIEVED to RECEIVED in log messages. (normoes)
2018-12-27epee: speed up json parsingmoneromooo-monero2-3/+13
2018-12-23epee: better network buffer data structuremoneromooo-monero11-54/+128
avoids pointless allocs and memcpy
2018-12-23Remove boost::lexical_cast for uuid and unused uuid functionLee Clagett1-30/+0
2018-12-08epee: speed up string matching a bitmoneromooo-monero1-2/+6
2018-12-08epee: avoid string allocation when parsing a pod from stringmoneromooo-monero1-36/+12
2018-12-07easylogging++: check allowed categories before loggingmoneromooo-monero1-8/+15
2018-12-07add a once_a_time_milliseconds classmoneromooo-monero1-9/+30
2018-12-04Merge pull request #4866Riccardo Spagni6-57/+371
9c923bad epee: fix network packet header field endianness (moneromooo-monero) ec1a62b5 move int-util.h to epee (moneromooo-monero)
2018-12-04Merge pull request #4880Riccardo Spagni1-0/+9
96e6b439 blockchain_stats: don't use gmtime_r on Windows (moneromooo-monero)
2018-12-04epee: fix network packet header field endiannessmoneromooo-monero5-57/+113
2018-12-04move int-util.h to epeemoneromooo-monero1-0/+258
2018-12-04Merge pull request #4854Riccardo Spagni4-18/+4
bd98e99c Removed a lot of unnecessary includes (Martijn Otto)
2018-12-04Merge pull request #4853Riccardo Spagni1-1/+1
2b3595d0 various: do not propagate exception through dtor (moneromooo-monero)