summaryrefslogtreecommitdiff
path: root/tests/unit_tests/epee_utils.cpp
Commit message (Collapse)AuthorAgeFilesLines
* ByteSlice: Fix persisting ptr to std::moved SSO bufferDoyle2020-05-201-0/+23
| | | | | | | The Bug: 1. Construct `byte_slice.portion_` with `epee::span(buffer)` which copies a pointer to the SSO buffer to `byte_slice.portion_` 2. It constructs `byte_slice.storage_` with `std::move(buffer)` (normally this swap pointers, but SSO means a memcpy and clear on the original SSO buffer) 3. `slice.data()` returns a pointer from `slice.portion_` that points to the original SSO cleared buffer, `slice.storage_` has the actual string.
* Fixed bugs for take_slice and byte_stream->byte_sliceLee Clagett2020-05-121-0/+31
|
* Add byte_stream for zero-copy serialization, and add support in ZMQ-JSON.Lee Clagett2020-04-111-1/+255
|
* Fixed string_ref usage bug in epee::from_hex::vectorLee Clagett2020-03-301-0/+3
|
* Merge pull request #6351luigi11112020-04-041-3/+43
|\ | | | | | | | | | | 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)
| * Move hex->bin conversion to monero copyright files and with less includesLee Clagett2020-03-091-3/+43
| |
* | p2p: remove old debug commandsAaron Hook2020-03-201-0/+1
|/
* Various improvements to the ZMQ JSON-RPC handling:Lee Clagett2020-03-051-0/+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.
* Add ref-counted buffer byte_slice. Currently used for sending TCP data.Lee Clagett2019-07-161-0/+433
|
* Merge pull request #5748luigi11112019-08-211-1/+2
|\ | | | | | | b350726 boost: update obsolete usage of endian API (moneromooo-monero)
| * boost: update obsolete usage of endian APImoneromooo-monero2019-07-091-1/+2
| |
* | epee: support unicode in parsed stringsmoneromooo-monero2019-08-161-0/+17
|/
* Update 2019 copyrightbinaryFate2019-03-051-1/+1
|
* epee: add SSL supportMartijn Otto2019-03-051-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Adding initial support for broadcasting transactions over TorLee Clagett2019-01-281-6/+16
| | | | | | | | | - 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).
* epee: speedup word/number matchingmoneromooo-monero2019-01-161-0/+84
| | | | | | | | | | | | | | | | | 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
* epee: better network buffer data structuremoneromooo-monero2018-12-231-0/+69
| | | | avoids pointless allocs and memcpy
* unit_tests: add some hex parsing test for non hex inputxiphon2018-11-151-0/+16
|
* unit_tests: add a test for parse_hexstr_to_binbuffmoneromooo-monero2018-11-151-0/+13
|
* Added features to epee::span<T> :Lee Clagett2018-08-031-1/+56
| | | | | | - Support for classes - Added `remove_prefix` function - Added `to_mut_span` and `as_mut_byte_span`
* unit_tests: add tests for local IP range detectionmoneromooo-monero2018-06-011-0/+32
|
* Update 2018 copyrightxmr-eric2018-01-261-1/+1
|
* unit_tests: fix compiling on WindowsiDunk54002017-10-081-3/+1
|
* Upgrades to epee::net_utils::network_addressLee Clagett2017-10-051-0/+231
| | | | | | | | - internal nullptr checks - prevent modifications to network_address (shallow copy issues) - automagically works with any type containing interface functions - removed fnv1a hashing - ipv4_network_address now flattened with no base class
* Improvements for epee binary to hex functions:Lee Clagett2017-04-111-4/+328
| | | | | | | - Performance improvements - Added `span` for zero-copy pointer+length arguments - Added `std::ostream` overload for direct writing to output buffers - Removal of unused `string_tools::buff_to_hex`
* Removed boost/asio.hpp include from epee/string_tools.hLee Clagett2017-03-181-0/+97