Commit Graph

1172 Commits

Author SHA1 Message Date
iDunk5400 b73f4e78d0
[master]: Update gitian yml files 2020-05-13 22:08:00 +02:00
selsta 4baee200a7
build: prepare v0.16.0.0 release 2020-05-13 16:15:03 +02:00
Lee Clagett 29e563bb1e Fixed bugs for take_slice and byte_stream->byte_slice 2020-05-12 01:26:37 -04:00
sumogr 8656a8c9ff remove double includes 2020-05-11 13:53:17 +00:00
SomaticFanatic 5ef0607da6 Update copyright year to 2020
Update copyright year to 2020
2020-05-06 22:36:54 -04:00
ArqTras a07c8abcc1
Update expat.mk 2020-05-03 22:37:58 +02:00
luigi1111 c9b800a787
Merge pull request #6446
e509ede trezor: adapt to new passphrase mechanism (ph4r05)
2020-05-01 15:32:52 -05:00
Dusan Klinec e509ede2aa
trezor: adapt to new passphrase mechanism
- 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-27 18:17:56 +02:00
selsta 6d41d9e8f9
contrib: remove codefresh pipeline 2020-04-25 00:25:55 +02:00
selsta 91182330d7
snap: remove from repo 2020-04-25 00:15:37 +02:00
luigi1111 f389ce1a0f
Merge pull request #6414
14e8035 update openssl 1.0.2r link (sumogr)
2020-04-21 08:48:52 -05:00
luigi1111 06c81b6527
Merge pull request #6359
f9441c5 Fixed string_ref usage bug in epee::from_hex::vector (vtnerd)
2020-04-21 08:38:21 -05:00
woodser 87d75584e8 Allow wallet2.h to run in WebAssembly
- 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-04-15 13:22:46 -04:00
Lee Clagett c26c93019a Add byte_stream for zero-copy serialization, and add support in ZMQ-JSON. 2020-04-11 04:12:11 +00:00
luigi1111 4badcf3781
Merge pull request #6398
8688b46 depends: update qt 5.7.1 download link (sumogr)
2020-04-10 16:08:20 -05:00
luigi1111 ecb8cc9df4
Merge pull request #6397
323a9e3 depends: libsodium disable getrandom()/getentropy() (glibc < 2.25) (xiphon)
2020-04-04 13:19:25 -05:00
luigi1111 00ede0038d
Merge pull request #6387
0dbdba8 epee: avoid spamming 'Generating SSL certificate' in the logs (xiphon)
2020-04-04 13:16:55 -05:00
luigi1111 6aa5da09f5
Merge pull request #6371
b40c27c cppzmq: remove leftovers (selsta)
2020-04-04 13:08:22 -05:00
luigi1111 d86d1a4d29
Merge pull request #6370
3031deb Bump downloaded boost version to 1.72 (omartijn)
6079042 Use boost::asio::ssl::context::sslv23 for backwards compatibility (omartijn)
2020-04-04 13:06:36 -05:00
luigi1111 cfc0f4a7fa
Merge pull request #6351
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-04 12:55:02 -05:00
luigi1111 c4f75fe898
Merge pull request #6339
c61abf8 remove empty statements (shopglobal)
2020-04-04 12:47:31 -05:00
luigi1111 292e2d8f28
Merge pull request #6335
0078ce7 wipeable_string: split - treat CR, LF and Tabs as separators (xiphon)
2020-04-04 12:42:50 -05:00
Lee Clagett da99157462 Use byte_slice for sending zmq messages - removes data copy within zmq 2020-04-03 01:56:17 +00:00
Sumo Gr 14e803565f update openssl 1.0.2r link 2020-04-01 22:34:38 +00:00
moneromooo-monero 21fe6a289b
p2p: fix frequent weak_ptr exception on connection
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-31 20:29:41 +00:00
luigi1111 6c7d928f19
Merge pull request #6336
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-31 15:14:12 -05:00
luigi1111 48b244dcd4
Merge pull request #6311
5002a03 Explicitly define copy assignment operator (omartijn)
2020-03-31 15:13:35 -05:00
Lee Clagett f9441c5759 Fixed string_ref usage bug in epee::from_hex::vector 2020-03-30 16:53:34 +00:00
Alexander Blair e1ee168e39
Merge pull request #6290
019c1dc0 gitian-build.py: Fixing check for docker command. (Jonathan Cross)
2020-03-27 12:29:18 -07:00
Sumo Gr 8688b467ce
depends: update qt 5.7.1 download link
5.7.1 was removed from official qt.io archive, this is one of the few mirrors remaining that keep a copy.
I think it would be better if @TheCharlatan updated to a newer version soon than merging this PR
2020-03-20 21:18:49 +02:00
xiphon 323a9e3a8d depends: libsodium disable getrandom()/getentropy() (glibc < 2.25) 2020-03-20 17:42:51 +00:00
xiphon 0dbdba876e epee: avoid spamming 'Generating SSL certificate' in the logs 2020-03-13 22:48:04 +00:00
Alexander Blair 820ab9fdea
Merge pull request #6273
0f78b06e Various improvements to the ZMQ JSON-RPC handling: (Lee Clagett)
2020-03-12 01:13:49 -07:00
Alexander Blair 179965c974
Merge pull request #6263
c11e64fc Gitian: Change lxc ip link (TheCharlatan)
2020-03-12 01:01:55 -07:00
Alexander Blair 2eee9bcdf8
Merge pull request #6251
0eac0c43 depends: set several missing build tags (moneromooo-monero)
2020-03-12 00:57:22 -07:00
Alexander Blair 857abc368c
Merge pull request #6244
352bd132 abstract_tcp_server2: guard against negative timeouts (moneromooo-monero)
2020-03-12 00:56:29 -07:00
Alexander Blair 092a57df99
Merge pull request #6243
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-12 00:32:46 -07:00
Martijn Otto 6079042cce
Use boost::asio::ssl::context::sslv23 for backwards compatibility
All the insecure protocols that this enables are then disabled, so they
cannot be actually used. The end-result is the same.
2020-03-11 09:28:02 +01:00
Lee Clagett 5fcc23ae0a Move hex->bin conversion to monero copyright files and with less includes 2020-03-09 05:23:59 +00:00
Lee Clagett 81c5943453 Remove temporary std::string creation in some hex->bin calls 2020-03-09 05:23:59 +00:00
selsta b40c27cd42
cppzmq: remove leftovers 2020-03-06 02:30:07 +01:00
Lee Clagett 0f78b06e8c Various improvements to the ZMQ JSON-RPC handling:
- 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-03-05 14:20:56 +00:00
Alexander Blair ccf2e4888e
Merge pull request #6255
81494e3f depends: empty spaces in PATH variable cause build failure (kozyilmaz)
2020-02-28 19:50:39 -08:00
Alexander Blair 944e8a4542
Merge pull request #6220
a9bdc6e4 Improved performance for epee serialization: (Lee Clagett)
2020-02-28 19:45:31 -08:00
Alexander Blair 8d5e043981
Merge pull request #6205
021cf733 ssl: server-side: allow multiple version of TLS (Bertrand Jacquin)
2020-02-28 19:35:48 -08:00
Interchained c61abf87c0 remove empty statements
Cleaning up a little around the code base.
2020-02-17 11:55:15 -05:00
xiphon 0078ce7fac wipeable_string: split - treat CR, LF and Tabs as separators 2020-02-12 21:16:07 +00:00
moneromooo-monero 760ecf2ac8
console_handler: do not let exception past the dor
Coverity 208373
2020-02-12 21:05:25 +00:00
Alexander Blair 5e384f21b5
Merge pull request #6184
2d1afceb net_ssl: load default certificates in CA mode on Windows (moneromooo-monero)
2020-02-06 00:35:46 -08:00
Alexander Blair a62f7dc573
Merge pull request #6182
e896cca8 epee: reorder a couple init list fields to match declaration (moneromooo-monero)
2020-02-06 00:34:15 -08:00
Martijn Otto 5002a0343f
Explicitly define copy assignment operator
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-28 14:59:55 +01:00
moneromooo-monero 3004835b51
epee: remove backward compatible endian specific address serialization 2020-01-26 18:37:34 +00:00
moneromooo-monero b595583f3d
serialization: do not write optional fields with default value 2020-01-26 18:37:30 +00:00
moneromooo-monero 56a4469ef3
network: log traffic and add a simple traffic analysis script 2020-01-26 00:33:41 +00:00
Alexander Blair a7a8eb0279
Merge pull request #6160
bd6a5778 Gitian: Fix sigs generation (TheCharlatan)
2020-01-24 20:15:11 -08:00
Alexander Blair 8039fd4cab
Merge pull request #6143
6efeefbc epee: set application/json MIME type on json errors (moneromooo-monero)
2020-01-16 17:46:13 -08:00
Alexander Blair f1ca98a7ef
Merge pull request #6133
b2ad757f Replace memset with memwipe. (Bert Peters)
2020-01-16 17:41:35 -08:00
Alexander Blair fbc15de2cd
Merge pull request #6125
584d057f epee: fix console_handlers_binder race, wait for thread to finish (xiphon)
2020-01-16 17:32:15 -08:00
Alexander Blair fe736070d2
Merge pull request #6120
feef1c6a epee: fix peer ids being truncated on display (moneromooo-monero)
2020-01-16 17:30:17 -08:00
Jonathan Cross 019c1dc0bb
gitian-build.py: Fixing check for docker command. 2020-01-10 19:16:24 +01:00
TheCharlatan c11e64fc4c
Gitian: Change lxc ip link
The ip link currently listed in the README no longer works on the newest
version of lxc shipped with ubuntu 18.04, this commit corrects this.
2020-01-06 13:18:06 +01:00
kozyilmaz 81494e3ffa
depends: empty spaces in PATH variable cause build failure 2019-12-19 14:18:51 +01:00
moneromooo-monero 0eac0c430a
depends: set several missing build tags 2019-12-18 12:23:23 +00:00
moneromooo-monero 352bd13254
abstract_tcp_server2: guard against negative timeouts 2019-12-16 18:24:52 +00:00
TheCharlatan 8e338e555c
depends: update libsodium to 1.0.18 2019-12-12 23:39:37 +01:00
Bertrand Jacquin 021cf733c6
ssl: server-side: allow multiple version of TLS
boost::asio::ssl::context is created using specifically TLSv1.2, which
blocks the ability to use superior version of TLS like TLSv1.3.

Filtering is also made specially later in the code to remove unsafe
version for TLS such SSLv2, SSLv3 etc..

This change is removing double filtering to allow TLSv1.2 and above to
be used.

testssl.sh 3.0rc5 now reports the following (please note monerod was
built with USE_EXTRA_EC_CERT):

 $ ./testssl.sh --openssl=/usr/bin/openssl \
     --each-cipher --cipher-per-proto \
     --server-defaults --server-preference \
     --vulnerable --heartbleed --ccs --ticketbleed \
     --robot --renegotiation --compression --breach \
     --poodle --tls-fallback --sweet32 --beast --lucky13 \
     --freak --logjam --drown --pfs --rc4 --full \
     --wide --hints 127.0.0.1:38081

 Using "OpenSSL 1.1.1d  10 Sep 2019" [~80 ciphers]
 on ip-10-97-15-6:/usr/bin/openssl
 (built: "Dec  3 21:14:51 2019", platform: "linux-x86_64")

 Start 2019-12-03 21:51:25        -->> 127.0.0.1:38081 (127.0.0.1) <<--

 rDNS (127.0.0.1):       --
 Service detected:       HTTP

 Testing protocols via sockets except NPN+ALPN

 SSLv2      not offered (OK)
 SSLv3      not offered (OK)
 TLS 1      not offered
 TLS 1.1    not offered
 TLS 1.2    offered (OK)
 TLS 1.3    offered (OK): final
 NPN/SPDY   not offered
 ALPN/HTTP2 not offered

 Testing for server implementation bugs

 No bugs found.

 Testing cipher categories

 NULL ciphers (no encryption)                  not offered (OK)
 Anonymous NULL Ciphers (no authentication)    not offered (OK)
 Export ciphers (w/o ADH+NULL)                 not offered (OK)
 LOW: 64 Bit + DES, RC[2,4] (w/o export)       not offered (OK)
 Triple DES Ciphers / IDEA                     not offered (OK)
 Average: SEED + 128+256 Bit CBC ciphers       not offered
 Strong encryption (AEAD ciphers)              offered (OK)

 Testing robust (perfect) forward secrecy, (P)FS -- omitting Null Authentication/Encryption, 3DES, RC4

 PFS is offered (OK), ciphers follow (client/browser support is important here)

Hexcode  Cipher Suite Name (OpenSSL)       KeyExch.   Encryption  Bits     Cipher Suite Name (IANA/RFC)
-----------------------------------------------------------------------------------------------------------------------------
 x1302   TLS_AES_256_GCM_SHA384            ECDH 253   AESGCM      256      TLS_AES_256_GCM_SHA384
 x1303   TLS_CHACHA20_POLY1305_SHA256      ECDH 253   ChaCha20    256      TLS_CHACHA20_POLY1305_SHA256
 xc030   ECDHE-RSA-AES256-GCM-SHA384       ECDH 253   AESGCM      256      TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
 xc02c   ECDHE-ECDSA-AES256-GCM-SHA384     ECDH 253   AESGCM      256      TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
 xcca9   ECDHE-ECDSA-CHACHA20-POLY1305     ECDH 253   ChaCha20    256      TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
 xcca8   ECDHE-RSA-CHACHA20-POLY1305       ECDH 253   ChaCha20    256      TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
 x1301   TLS_AES_128_GCM_SHA256            ECDH 253   AESGCM      128      TLS_AES_128_GCM_SHA256
 xc02f   ECDHE-RSA-AES128-GCM-SHA256       ECDH 253   AESGCM      128      TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
 xc02b   ECDHE-ECDSA-AES128-GCM-SHA256     ECDH 253   AESGCM      128      TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256

 Elliptic curves offered:     prime256v1 secp384r1 secp521r1 X25519 X448

 Testing server preferences

 Has server cipher order?     yes (OK)
 Negotiated protocol          TLSv1.3
 Negotiated cipher            TLS_AES_256_GCM_SHA384, 253 bit ECDH (X25519)
 Cipher order
    TLSv1.2:   ECDHE-ECDSA-CHACHA20-POLY1305 ECDHE-ECDSA-AES256-GCM-SHA384 ECDHE-ECDSA-AES128-GCM-SHA256 ECDHE-RSA-CHACHA20-POLY1305 ECDHE-RSA-AES256-GCM-SHA384 ECDHE-RSA-AES128-GCM-SHA256
    TLSv1.3:   TLS_AES_256_GCM_SHA384 TLS_CHACHA20_POLY1305_SHA256 TLS_AES_128_GCM_SHA256

 Testing server defaults (Server Hello)

 TLS extensions (standard)    "renegotiation info/#65281" "EC point formats/#11" "supported versions/#43" "key share/#51" "max fragment length/#1" "extended master secret/#23"
 Session Ticket RFC 5077 hint no -- no lifetime advertised
 SSL Session ID support       yes
 Session Resumption           Tickets no, ID: no
 TLS clock skew               Random values, no fingerprinting possible

  Server Certificate #1 (in response to request w/o SNI)
   Signature Algorithm          SHA256 with RSA
   Server key size              RSA 4096 bits
   Server key usage             --
   Server extended key usage    --
   Serial / Fingerprints        01 / SHA1 132E42981812F5575FA0AE64922B18A81B38C03F
                                SHA256 EBA3CC4AA09DEF26706E64A70DB4BC8D723533BB67EAE12B503A845019FB61DC
   Common Name (CN)             (no CN field in subject)
   subjectAltName (SAN)         missing (NOT ok) -- Browsers are complaining
   Issuer
   Trust (hostname)             certificate does not match supplied URI
   Chain of trust               NOT ok (self signed)
   EV cert (experimental)       no
   "eTLS" (visibility info)     not present
   Certificate Validity (UTC)   181 >= 60 days (2019-12-03 21:51 --> 2020-06-02 21:51)
   # of certificates provided   1
   Certificate Revocation List  --
   OCSP URI                     --
                                NOT ok -- neither CRL nor OCSP URI provided
   OCSP stapling                not offered
   OCSP must staple extension   --
   DNS CAA RR (experimental)    not offered
   Certificate Transparency     --

  Server Certificate #2 (in response to request w/o SNI)
   Signature Algorithm          ECDSA with SHA256
   Server key size              EC 256 bits
   Server key usage             --
   Server extended key usage    --
   Serial / Fingerprints        01 / SHA1 E17B765DD8124525B1407E827B89A31FB167647D
                                SHA256 AFB7F44B1C33831F521357E5AEEB813044CB02532143E92D35650A3FF792A7C3
   Common Name (CN)             (no CN field in subject)
   subjectAltName (SAN)         missing (NOT ok) -- Browsers are complaining
   Issuer
   Trust (hostname)             certificate does not match supplied URI
   Chain of trust               NOT ok (self signed)
   EV cert (experimental)       no
   "eTLS" (visibility info)     not present
   Certificate Validity (UTC)   181 >= 60 days (2019-12-03 21:51 --> 2020-06-02 21:51)
   # of certificates provided   1
   Certificate Revocation List  --
   OCSP URI                     --
                                NOT ok -- neither CRL nor OCSP URI provided
   OCSP stapling                not offered
   OCSP must staple extension   --
   DNS CAA RR (experimental)    not offered
   Certificate Transparency     --

 Testing HTTP header response @ "/"

 HTTP Status Code             404 Not found (Hint: supply a path which doesn't give a "404 Not found")
 HTTP clock skew              Got no HTTP time, maybe try different URL?
 Strict Transport Security    not offered
 Public Key Pinning           --
 Server banner                Epee-based
 Application banner           --
 Cookie(s)                    (none issued at "/") -- maybe better try target URL of 30x
 Security headers             --
 Reverse Proxy banner         --

 Testing vulnerabilities

 Heartbleed (CVE-2014-0160)                not vulnerable (OK), no heartbeat extension
 CCS (CVE-2014-0224)                       not vulnerable (OK)
 Ticketbleed (CVE-2016-9244), experiment.  not vulnerable (OK), no session ticket extension
 ROBOT                                     Server does not support any cipher suites that use RSA key transport
 Secure Renegotiation (CVE-2009-3555)      not vulnerable (OK)
 Secure Client-Initiated Renegotiation     not vulnerable (OK)
 CRIME, TLS (CVE-2012-4929)                not vulnerable (OK)
 BREACH (CVE-2013-3587)                    no HTTP compression (OK)  - only supplied "/" tested
 POODLE, SSL (CVE-2014-3566)               not vulnerable (OK)
 TLS_FALLBACK_SCSV (RFC 7507)              No fallback possible, no protocol below TLS 1.2 offered (OK)
 SWEET32 (CVE-2016-2183, CVE-2016-6329)    not vulnerable (OK)
 FREAK (CVE-2015-0204)                     not vulnerable (OK)
 DROWN (CVE-2016-0800, CVE-2016-0703)      not vulnerable on this host and port (OK)
                                           make sure you don't use this certificate elsewhere with SSLv2 enabled services
                                           https://censys.io/ipv4?q=EBA3CC4AA09DEF26706E64A70DB4BC8D723533BB67EAE12B503A845019FB61DC could help you to find out
 LOGJAM (CVE-2015-4000), experimental      not vulnerable (OK): no DH EXPORT ciphers, no DH key detected with <= TLS 1.2
 BEAST (CVE-2011-3389)                     no SSL3 or TLS1 (OK)
 LUCKY13 (CVE-2013-0169), experimental     not vulnerable (OK)
 RC4 (CVE-2013-2566, CVE-2015-2808)        no RC4 ciphers detected (OK)

 Testing ciphers per protocol via OpenSSL plus sockets against the server, ordered by encryption strength

Hexcode  Cipher Suite Name (OpenSSL)       KeyExch.   Encryption  Bits     Cipher Suite Name (IANA/RFC)
-----------------------------------------------------------------------------------------------------------------------------
SSLv2
SSLv3
TLS 1
TLS 1.1
TLS 1.2
 xc030   ECDHE-RSA-AES256-GCM-SHA384       ECDH 253   AESGCM      256      TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
 xc02c   ECDHE-ECDSA-AES256-GCM-SHA384     ECDH 253   AESGCM      256      TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
 xcca9   ECDHE-ECDSA-CHACHA20-POLY1305     ECDH 253   ChaCha20    256      TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
 xcca8   ECDHE-RSA-CHACHA20-POLY1305       ECDH 253   ChaCha20    256      TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
 xc02f   ECDHE-RSA-AES128-GCM-SHA256       ECDH 253   AESGCM      128      TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
 xc02b   ECDHE-ECDSA-AES128-GCM-SHA256     ECDH 253   AESGCM      128      TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
TLS 1.3
 x1302   TLS_AES_256_GCM_SHA384            ECDH 253   AESGCM      256      TLS_AES_256_GCM_SHA384
 x1303   TLS_CHACHA20_POLY1305_SHA256      ECDH 253   ChaCha20    256      TLS_CHACHA20_POLY1305_SHA256
 x1301   TLS_AES_128_GCM_SHA256            ECDH 253   AESGCM      128      TLS_AES_128_GCM_SHA256

 Running client simulations (HTTP) via sockets

 Browser                      Protocol  Cipher Suite Name (OpenSSL)       Forward Secrecy
------------------------------------------------------------------------------------------------
 Android 4.2.2                No connection
 Android 4.4.2                TLSv1.2   ECDHE-RSA-AES256-GCM-SHA384       256 bit ECDH (P-256)
 Android 5.0.0                TLSv1.2   ECDHE-RSA-AES128-GCM-SHA256       256 bit ECDH (P-256)
 Android 6.0                  TLSv1.2   ECDHE-RSA-AES128-GCM-SHA256       256 bit ECDH (P-256)
 Android 7.0                  TLSv1.2   ECDHE-RSA-CHACHA20-POLY1305       253 bit ECDH (X25519)
 Android 8.1 (native)         No connection
 Android 9.0 (native)         TLSv1.3   TLS_AES_256_GCM_SHA384            253 bit ECDH (X25519)
 Chrome 65 Win 7              TLSv1.2   ECDHE-RSA-CHACHA20-POLY1305       253 bit ECDH (X25519)
 Chrome 74 (Win 10)           No connection
 Firefox 62 Win 7             TLSv1.2   ECDHE-RSA-CHACHA20-POLY1305       253 bit ECDH (X25519)
 Firefox 66 (Win 8.1/10)      TLSv1.3   TLS_AES_256_GCM_SHA384            253 bit ECDH (X25519)
 IE 6 XP                      No connection
 IE 7 Vista                   No connection
 IE 8 Win 7                   No connection
 IE 8 XP                      No connection
 IE 11 Win 7                  No connection
 IE 11 Win 8.1                No connection
 IE 11 Win Phone 8.1          No connection
 IE 11 Win 10                 TLSv1.2   ECDHE-RSA-AES256-GCM-SHA384       256 bit ECDH (P-256)
 Edge 15 Win 10               TLSv1.2   ECDHE-RSA-AES256-GCM-SHA384       253 bit ECDH (X25519)
 Edge 17 (Win 10)             TLSv1.2   ECDHE-RSA-AES256-GCM-SHA384       253 bit ECDH (X25519)
 Opera 60 (Win 10)            No connection
 Safari 9 iOS 9               TLSv1.2   ECDHE-RSA-AES256-GCM-SHA384       256 bit ECDH (P-256)
 Safari 9 OS X 10.11          TLSv1.2   ECDHE-RSA-AES256-GCM-SHA384       256 bit ECDH (P-256)
 Safari 10 OS X 10.12         TLSv1.2   ECDHE-RSA-AES256-GCM-SHA384       256 bit ECDH (P-256)
 Apple ATS 9 iOS 9            TLSv1.2   ECDHE-RSA-AES256-GCM-SHA384       256 bit ECDH (P-256)
 Tor 17.0.9 Win 7             No connection
 Java 6u45                    No connection
 Java 7u25                    No connection
 Java 8u161                   TLSv1.2   ECDHE-ECDSA-AES256-GCM-SHA384     256 bit ECDH (P-256)
 Java 9.0.4                   TLSv1.2   ECDHE-ECDSA-AES256-GCM-SHA384     256 bit ECDH (P-256)
 OpenSSL 1.0.1l               TLSv1.2   ECDHE-ECDSA-AES256-GCM-SHA384     256 bit ECDH (P-256)
 OpenSSL 1.0.2e               TLSv1.2   ECDHE-ECDSA-AES256-GCM-SHA384     256 bit ECDH (P-256)
 OpenSSL 1.1.0j (Debian)      TLSv1.2   ECDHE-RSA-CHACHA20-POLY1305       253 bit ECDH (X25519)
 OpenSSL 1.1.1b (Debian)      TLSv1.3   TLS_AES_256_GCM_SHA384            253 bit ECDH (X25519)
 Thunderbird (60.6)           TLSv1.3   TLS_AES_256_GCM_SHA384            253 bit ECDH (X25519)
2019-12-03 22:02:16 +00:00
moneromooo-monero 2d1afceb0d
net_ssl: load default certificates in CA mode on Windows
Because it always does things wonkily doens't it
2019-11-26 19:34:16 +00:00
moneromooo-monero e896cca86e
epee: reorder a couple init list fields to match declaration
This is a bug waiting to happen
2019-11-25 19:27:54 +00:00
luigi1111 3e3db92303
Merge pull request #6117
0f7c9f4 Gitian Readme: adding android signing & fix v0.15 checksum. (jonathancross)
2019-11-20 09:23:19 -06:00
TheCharlatan bd6a577880
Gitian: Fix sigs generation 2019-11-20 13:03:41 +01:00
luigi1111 ac0e6f7ecd
Merge pull request #6118
gitian: add FreeBSD support (75c5a04, 607c01a, cca6e5c, 35b5e91, 024a1c7, b14d9ab, 5eea312, 9cbba5a, 2e435df, abeed9a) (hyc)
2019-11-18 13:21:08 -06:00
Howard Chu abeed9a767
"Fix" non-determinism in native_cctools build
By omitting the otool binary which is built non-deterministically.
We don't use it anyway.
2019-11-18 09:18:00 +00:00
Howard Chu 2e435dfe76
Fixup compiled python in OSX 2019-11-17 13:44:18 +00:00
Howard Chu 9cbba5a8ec
Fix unwind library ordering
Sort objects being archived
2019-11-17 13:44:18 +00:00
Howard Chu 5eea312f6d
Fixup sodium darwin
get rid of sodium-darwin.mk special case, unify back with sodium.mk
2019-11-17 13:44:18 +00:00
Howard Chu b14d9abca9
Use standard time for depends caches
streamline, remove obsolete wrappers
2019-11-17 13:44:18 +00:00
Howard Chu 024a1c7ddf
Add ARFLAGS
Needed to invoke deterministic mode on some archivers
2019-11-17 13:44:07 +00:00
moneromooo-monero 6efeefbca2
epee: set application/json MIME type on json errors 2019-11-15 19:39:20 +00:00
moneromooo-monero feef1c6aac
epee: fix peer ids being truncated on display 2019-11-14 18:27:12 +00:00
Howard Chu 35b5e917aa
gitian: add FreeBSD 2019-11-14 07:03:04 +00:00
Howard Chu cca6e5c645
depends: Add FreeBSD support 2019-11-14 07:03:04 +00:00
Howard Chu 607c01aa56
gitian: Parametrize target platforms 2019-11-14 07:03:04 +00:00
Bert Peters b2ad757f48 Replace memset with memwipe. 2019-11-13 18:00:50 +01:00
xiphon 584d057f74 epee: fix console_handlers_binder race, wait for thread to finish 2019-11-12 16:07:59 +00:00
moneromooo-monero 3d649d528a
epee: close connection when the peer has done so
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-11 20:05:24 +00:00
Howard Chu 75c5a04ca5
gitian: Update to latest gitian-builder 2019-11-11 08:35:53 +00:00
Jonathan Cross 0f7c9f4f31
Gitian Readme: adding android signing & fix v0.15 checksum. 2019-11-11 00:41:59 +01:00
Riccardo Spagni a48ef0a65a
Merge pull request #6088
e8c5ab515 gitian: fix out dir location (iDunk5400)
2019-11-04 06:14:05 -08:00
iDunk5400 e8c5ab5155
gitian: fix out dir location 2019-11-04 10:25:54 +01:00
Howard Chu 5b78c27c50
Copy LICENSE to all archives 2019-11-04 05:05:38 +00:00
Lee Clagett a9bdc6e4c4 Improved performance for epee serialization:
- 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-04 01:46:41 +00:00
selsta 2bfd41b29c
depends: fix typo in packages 2019-11-04 00:08:00 +01:00
Riccardo Spagni 06b0441762
Merge pull request #6074
38f691048 simplewallet: plug a timing leak (moneromooo-monero)
dcff02e4c epee: allow a random component in once_a_time timeouts (moneromooo-monero)
e10833024 wallet: reuse cached height when set after refresh (moneromooo-monero)
5956beaa1 wallet2: fix is_synced checking target height, not height (moneromooo-monero)
fd35e2304 wallet: fix another facet of "did I get some monero" information leak (moneromooo-monero)
d5472bd87 wallet2: do not send an unnecessary last getblocks.bin call on refresh (moneromooo-monero)
97ae7bb5c wallet2: do not repeatedly ask for pool txes sent to us (moneromooo-monero)
2019-11-03 14:52:16 -08:00
Riccardo Spagni f6201081fa
Merge pull request #6077
240dbb124 gitian: add --rebuild option (Howard Chu)
643860776 Add Android support (Howard Chu)
2019-11-03 14:51:52 -08:00
Howard Chu 240dbb1243
gitian: add --rebuild option
Avoids delays when sourceforge is slow to respond; allows rebuilding
when disconnected from networks.
2019-11-03 21:14:45 +00:00
Howard Chu 643860776e
Add Android support 2019-11-03 21:14:45 +00:00
Howard Chu 436e4c3363
Fix readline build
Make sure it links to our libtinfo from our ncurses build.
Hardcode some basic terminal descriptions into our libtinfo.
Re-enable $HOME/.terminfo support to allow user customization.
Use unlikely terminfo-dir, to prevent accidentally using
differently-configured system databases.
2019-11-03 19:03:31 +00:00
Lee Clagett 5d7ae2d279 Adding support for hidden (anonymity) txpool 2019-11-02 20:36:03 +00:00
Riccardo Spagni 4ad0f00385
Merge pull request #6079
e4d1674e8 0.15.0.0 release engineering (Riccardo Spagni)
2019-11-02 17:32:39 +02:00
Riccardo Spagni e4d1674e8c
0.15.0.0 release engineering 2019-11-02 17:21:52 +02:00
moneromooo-monero dcff02e4c3
epee: allow a random component in once_a_time timeouts 2019-11-01 20:57:24 +00:00
Riccardo Spagni 78e59f531e
Merge pull request #6059
45b6b6038 Updating gitian yml files for v0.15 (Jonathan Cross)
2019-11-01 16:59:20 +02:00
Jonathan Cross 45b6b60385
Updating gitian yml files for v0.15 2019-10-31 17:36:47 +01:00
luigi1111 bae49e9fbd
Merge pull request #6022
dd28383 depends: bump cppzmq version to 4.4.1 (anonimal)
157b3fc depends: bump zeromq version to 4.1.7 (anonimal)
2019-10-25 13:54:15 -05:00
luigi1111 960c215801
Merge pull request #5357
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-25 13:38:21 -05:00
moneromooo-monero 2899379791
daemon, wallet: new pay for RPC use system
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-25 09:34:38 +00:00
anonimal 157b3fcff4
depends: bump zeromq version to 4.1.7
Resolves https://hackerone.com/reports/652911
2019-10-25 01:22:17 +00:00
anonimal dd28383a4b
depends: bump cppzmq version to 4.4.1 2019-10-25 00:47:33 +00:00
luigi1111 42d84ad35e
Merge pull request #6006
9f3be3b epee: use SO_REUSEADDR on non-Windows targets (xiphon)
2019-10-24 12:41:59 -05:00
xiphon 9f3be3baed epee: use SO_REUSEADDR on non-Windows targets 2019-10-22 18:40:01 +00:00
luigi1111 6b58d6248a
Merge pull request #5996
23ba69e epee: fix SSL server handshake, run_one() can block, use poll_one() (xiphon)
2019-10-22 10:26:31 -05:00
luigi1111 18f62f89d8
Merge pull request #5986
1080136 abstract_tcp_server2: move 'Trying to connect' from error to debug (moneromooo-monero)
2019-10-22 10:23:04 -05:00
luigi1111 84ce43a239
Merge pull request #5966
be82c40 Support median block size > 4 GB (moneromooo-monero)
2019-10-22 10:08:32 -05:00
moneromooo-monero be82c40703
Support median block size > 4 GB
add a 128/64 division routine so we can use a > 32 bit median block
size in calculations
2019-10-21 10:41:07 +00:00
xiphon 23ba69ec88 epee: fix SSL server handshake, run_one() can block, use poll_one() 2019-10-18 18:32:33 +00:00
luigi1111 7ec8d9640e
Merge pull request #5911
e48dcb7 levin: armour against some 'should not happen' case (moneromooo-monero)
2019-10-16 13:35:55 -05:00
moneromooo-monero e48dcb7a01
levin: armour against some "should not happen" case
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-15 10:30:08 +00:00
luigi1111 8fcdf77d7b
Merge pull request #5947
c9cfbf7 epee: tcp server - set SO_LINGER instead of SO_REUSEADDR option (xiphon)
2019-10-14 20:04:02 -05:00
luigi1111 4118e4b1e9
Merge pull request #5937
4b654f6 abstract_tcp_server2: log pointer, not contents, where appropriate (moneromooo-monero)
2019-10-14 18:08:47 -05:00
moneromooo-monero 10801362f4
abstract_tcp_server2: move "Trying to connect" from error to debug
and fix the message grammar
2019-10-14 14:15:21 +00:00
luigi1111 da7a3dd17b
Merge pull request #5936
24473d7 build: fix MinGW GUI dependencies build (xiphon)
2019-10-08 14:46:09 -05:00
luigi1111 18da0fa240
Merge pull request #5918
4371791 epee: implement handshake timeout for SSL connections (xiphon)
2019-10-08 14:30:45 -05:00
luigi1111 ca975bcb79
Merge pull request #5917
7d81850 epee: fix network timeouts in blocked_mode_client (xiphon)
2019-10-08 14:28:50 -05:00
xiphon c9cfbf7fb3 epee: tcp server - set SO_LINGER instead of SO_REUSEADDR option 2019-10-02 19:08:02 +00:00
luigi1111 15b9b4e047
Merge pull request #5910
1b91beb abstract_tcp_server2: fix lingering connections (moneromooo-monero)
2019-09-30 18:55:58 -05:00
luigi1111 c6430f9dd0
Merge pull request #5893
Coverity fixes [3a81639, 1bd962d, 2825f07, d099658, d46f701, cd57a10] (anonimal)
2019-09-30 18:43:48 -05:00
luigi1111 33ce4ae1fb
Merge pull request #5653
5f8524e Streamline build setup (hyc)
2019-09-30 18:38:34 -05:00
moneromooo-monero 4b654f65a3
abstract_tcp_server2: log pointer, not contents, where appropriate 2019-09-27 15:15:32 +00:00
xiphon 24473d7584 build: fix MinGW GUI dependencies build 2019-09-26 01:43:00 +00:00
Howard Chu fcfa6665a9
Don't set ARCH_ID if it's already set
Usually it's unset, but depends toolchain files set it explicitly
for cross-compiling. Don't override preset values. But make sure
it's set for all x86 / x86_64 builds, not just Linux.

Also make sure -std=c++11 is set for Darwin builds, not all
submodules were getting it consistently before.
2019-09-25 20:10:57 +01:00
Howard Chu 5f8524ef5f
Streamline build setup
Use shorter, prefix-unique directory names
  gitian-builder  -> builder
  gitian-sigs     -> sigs
  monero-binaries -> out

Just use builder/inputs/monero, no need for 2nd repo clone
2019-09-24 17:17:04 +01:00
moneromooo-monero 89339551a2
epee: misc_log_ex.h can now be used in C code
use mfatal/merror/mwarning/minfo/mdebug/mtrace
2019-09-24 15:47:31 +00:00
luigi1111 cbec75ec31
Merge pull request #5892
ab2819a depends: attempt to fix readline (iDunk5400)
2019-09-24 10:34:59 -05:00
luigi1111 77b8e8a536
Merge pull request #5891
e09dbc6 depends: fix monero binaries Boost linking errors (iDunk5400)
2019-09-24 10:30:57 -05:00
luigi1111 eadef8d9cd
Merge pull request #5875
0c55837 contrib: add a suppressions file for leak sanitizer (moneromooo-monero)
2019-09-24 10:06:32 -05:00
xiphon 4371791977 epee: implement handshake timeout for SSL connections 2019-09-17 22:21:16 +00:00
xiphon 7d81850a46 epee: fix network timeouts in blocked_mode_client 2019-09-16 18:55:36 +00:00
moneromooo-monero 32f725d32f
Properly format multiline logs
As a side effect, colouring on Windows should now work
regardless of version
2019-09-16 16:58:01 +00:00
luigi1111 b4ac8969a8
Merge pull request #5898
73f22c4 depends: fix MacOS build with Clang 3.7.1 (vtnerd)
2019-09-14 13:22:35 -05:00
moneromooo-monero 1b91bebd2e
abstract_tcp_server2: fix lingering connections
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-12 12:10:50 +00:00
iDunk5400 e09dbc6089
depends: fix monero binaries Boost linking errors
It would try to link against host system Boost libs when building outside gitian. Tested with x86_64-linux-gnu target.
2019-09-09 10:00:47 +02:00
luigi1111 e7b5b231e0
Merge pull request #5858
5f4bd92 Fix Travis build on Windows + Mac (hyperreality)
2019-09-08 20:09:11 -05:00
Lee Clagett 73f22c48e1
depends: fix MacOS build with Clang 3.7.1 2019-09-08 22:49:11 +02:00
anonimal cd57a10c90
epee: abstract_tcp_server2: resolve CID 203919 (DC.WEAK_CRYPTO)
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-08 01:14:39 +00:00
iDunk5400 ab2819a365
depends: attempt to fix readline
Make readline actually compile, and make ncurses use existing terminfo data (if available).
2019-09-07 22:02:11 +02:00
anonimal 2825f07d95
epee: connection_basic: resolve CID 203916 (UNINIT_CTOR) 2019-09-06 23:18:00 +00:00
anonimal 3a816398b3
epee: connection_basic: resolve CID 203920 (UNINIT_CTOR) 2019-09-06 22:48:16 +00:00
moneromooo-monero bc1144e98e
Fix IP address serialization on big endian
IP addresses are stored in network byte order even on little
endian hosts
2019-09-04 14:54:01 +00:00
moneromooo-monero 516f7b9de0
storages: fix "portable" storage on big endian 2019-09-04 14:53:57 +00:00
moneromooo-monero 32c3834948
storages: fix writing varints on big endian 2019-09-04 14:53:57 +00:00
moneromooo-monero bdda084651
epee: fix local/loopback checks on big endian
IPv4 addresses are kept in network byte order in memory
2019-09-04 14:53:56 +00:00
luigi1111 1b93cb74bb
Merge pull request #5824
2a41dc0 epee: fix connections not being properly closed in some instances (moneromooo-monero)
2019-09-04 09:40:21 -05:00
luigi1111 6fe281d315
Merge pull request #5814
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-04 09:30:29 -05:00
luigi1111 2acd3cee8c
Merge pull request #5796
e3cff3d Gitian build script fixes for MacOS (jonathancross)
2019-09-04 09:23:15 -05:00
luigi1111 101c9678a5
Merge pull request #5764
f26e663 Gitian build (mac, linux): gzip => bzip2 (jonathancross)
2019-09-04 09:21:27 -05:00
luigi1111 23547e6ed6
Merge pull request #5536
1a367d6 simplewallet: lock console on inactivity (moneromooo-monero)
2019-09-04 09:18:38 -05:00
moneromooo-monero 0c558378ed
contrib: add a suppressions file for leak sanitizer
with the Cryptonight per-thread buffer
2019-08-29 11:11:59 +00:00
moneromooo-monero 1a367d6a22
simplewallet: lock console on inactivity 2019-08-28 19:01:48 +00:00
hyperreality 5f4bd92e06 Fix Travis build on Windows + Mac
Following 13c0b8c, the unwind package is being attempted to be built on
Windows and Mac when it should only be built on Linux.
2019-08-27 00:41:03 +01:00
Tom Smeding a84aa04d57 syncobj.h no longer defines shared_guard, so remove those define's
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-23 08:42:36 +02:00
luigi1111 cdfa2e58df
Merge pull request #5827
30779de fix feature not introduced until boost 1.66 (jtgrassie)
2019-08-21 15:54:10 -05:00
luigi1111 1b373185aa
Merge pull request #5702
13c0b8c Add depends riscv 64 bit support (TheCharlatan)
2019-08-21 14:49:09 -05:00
TheCharlatan 13c0b8c265 Add depends riscv 64 bit support 2019-08-20 15:24:47 +02:00
Jethro Grassie 30779de39d
fix feature not introduced until boost 1.66 2019-08-20 01:06:59 -04:00
luigi1111 b7415d3a5c
Merge pull request #5706
9a5933f Gitian: Add version string to output tar archives (TheCharlatan)
2019-08-19 17:16:02 -05:00
luigi1111 bc4f1145c3
Merge pull request #5705
59eecc7 Update icu4c to latest support version (TheCharlatan)
2019-08-19 17:14:52 -05:00
moneromooo-monero 2a41dc0453
epee: fix connections not being properly closed in some instances
Fixed by Fixed by crCr62U0
2019-08-19 22:09:55 +00:00
moneromooo-monero eeca5ca0c8
epee: support unicode in parsed strings 2019-08-16 17:06:03 +00:00
luigi1111 310c26824d
Merge pull request #5756
28c3e73 gitian build README improvements (jonathancross)
2019-08-15 17:34:13 -05:00
luigi1111 8a0711f2f2
Merge pull request #5674
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-15 17:22:39 -05:00
luigi1111 df064eaa36
Merge pull request #5649
a182df2 Bans for RPC connections (hyc)
2019-08-15 17:10:49 -05:00
Tom Smeding bdcdb0e813 Remove unused code under WINDWOS_PLATFORM guard
This code has been present, unchanged, ever since the original move to
github in 2014 with commit 296ae46ed.
2019-08-15 14:57:27 +02:00
Jonathan Cross e3cff3d766
Gitian build script fixes for MacOS 2019-08-06 23:18:31 +02:00
Thomas Winget 155475d971
Add IPv6 support
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-31 20:04:57 -04:00
Jonathan Cross 28c3e736fb
gitian build README improvements 2019-07-30 17:30:43 +02:00
luigi1111 e675b5223f
Merge pull request #5627
afbf05b Add option to run gitian-build.py on non-debian os (TheCharlatan)
2019-07-24 14:41:44 -05:00
luigi1111 38e0e58a95
Merge pull request #5531
9a6006b abstract_tcp_server2: move some things out of a lock (moneromooo-monero)
2019-07-24 14:08:52 -05:00
luigi1111 e579fe4ae0
Merge pull request #5530
6abaaaa remove obsolete save_graph skeleton code (moneromooo-monero)
2019-07-24 14:07:29 -05:00
luigi1111 8774384ace
Merge pull request #5528
f61a315 net_utils: fix m_ssl type from time_t to bool (moneromooo-monero)
2019-07-24 14:05:18 -05:00
Jonathan Cross f26e663a7b
Gitian build (mac, linux): gzip => bzip2 2019-07-18 23:02:36 +02:00
Lee Clagett 3b24b1d082 Added support for "noise" over I1P/Tor to mask Tx transmission. 2019-07-17 14:22:37 +00:00
Lee Clagett bdfc63ae4d Add ref-counted buffer byte_slice. Currently used for sending TCP data. 2019-07-16 16:30:35 +00:00
moneromooo-monero 65c4004963
allow blocking whole subnets 2019-07-16 11:35:53 +00:00
luigi1111 f9a3d7fec8
Merge pull request #5704
8f22279 Depends: Update HIDAPI version (TheCharlatan)
2019-07-12 20:21:41 -05:00
TheCharlatan 9a5933f705 Gitian: Add version string to output tar archives
The tar archives generated by gitian are currently unversioned. This
adds either a tag name when building from a tag, or a short commit id
when building from a commit hash.
2019-06-27 22:25:20 +02:00
TheCharlatan 8f2227940d Depends: Update HIDAPI version
The macos binaries in release v0.14.1.0 were compiled with the buggy
hidapi-0.8.0-rc1 version. This resulted in users not being able to use
their Ledger with the latest cli wallet. After the patch depends now
fetches the source from the libusb hidapi repository that has taken over
maintenance of hidapi.
2019-06-27 17:32:46 +02:00
TheCharlatan 59eecc7ed1 Update icu4c to latest support version
Before this commit the icu4c repo was fetched from TheCharlatan's
repository. This step was made, because up until recently the source
code was hosted on sourceforge and their downloads proved very
unreliable. The origin is now the official icu4c repository.
Also remove some commented lines left over from development.
2019-06-27 16:31:28 +02:00
TheCharlatan afbf05bc58 Add option to run gitian-build.py on non-debian os
This commits adds the `--no-apt` flag to the gitian-build.py script.
This allows gitian builds to be run without root access and non-debian
based operating systems.
2019-06-26 01:21:59 +02:00
TheCharlatan 496cd46d80 Add ncurses package for linux and darwin readline
Readline support is now compiled with the ncurses backend.
2019-06-25 19:16:20 +02:00
TheCharlatan cbbb24cfe1 Remove clutter in depends installed packages
To speedup the depends cached builds, remove some some clutter from the package
files. This mainly incldues removing all the shared libraries and .la
linker files. It also gives stronger guarantees that monero only links
the static libs without any external rvalues.
2019-06-25 09:21:33 +02:00
TheCharlatan 1dbfc812e1 Add debug targets to depends Makefile
Packages can now be built individually and for each stage. This allows
easier debugging.
2019-06-25 09:20:47 +02:00
moneromooo-monero 098aadf084
p2p: close the right number of connections on setting max in/out peers 2019-06-19 11:49:36 +00:00
Howard Chu a182df21d0
Bans for RPC connections
Make bans control RPC sessions too. And auto-ban some bad requests.
Drops HTTP connections whenever response code is 500.
2019-06-16 11:38:08 +01:00
moneromooo-monero 0564da5fdc
ensure no NULL is passed to memcpy
NULL is valid when size is 0, but memcpy uses nonnull attributes,
so let's not poke the bear
2019-06-14 08:47:29 +00:00
moneromooo-monero bc09766bf9
abstract_tcp_server2: improve DoS resistance 2019-06-14 08:47:26 +00:00
moneromooo-monero 39169ace09
epee: basic sanity check on allocation size from untrusted source
Reported by guidov
2019-06-14 08:47:01 +00:00
luigi1111 7b3df89bd4
Merge pull request #5632
3a0fbea Don't use -march=native (hyc)
f8b2f25 Allow parallel make (hyc)
01ced20 Delete redundant cppzmq dependency (hyc)
1dc4ebf Use 9 digit build IDs (hyc)
2019-06-12 14:47:33 -05:00
luigi1111 a22bb544a3
Merge pull request #5552
c27d961 [depends] update openssl to 1.0.2r (who-biz)
2019-06-12 14:43:51 -05:00
Howard Chu 1dc4ebfd6c
Use 9 digit build IDs 2019-06-12 16:47:33 +01:00
Howard Chu 01ced20eca
Delete redundant cppzmq dependency 2019-06-12 10:20:44 +01:00
Howard Chu f8b2f250b7
Allow parallel make 2019-06-12 09:00:50 +01:00
Howard Chu 3a0fbea1ff
Don't use -march=native 2019-06-12 09:00:44 +01:00
luigi1111 9c0e9c40ec
Merge pull request #5618
b0a04f7 epee: fix SSL autodetect on reconnection (xiphon)
2019-06-11 18:15:48 -05:00
xiphon b0a04f7d45 epee: fix SSL autodetect on reconnection 2019-06-10 10:40:16 +00:00
moneromooo-monero 35c20c4332
Fix GCC 9.1 build warnings
GCC wants operator= aand copy ctor to be both defined, or neither
2019-06-09 09:39:18 +00:00
Lee Clagett 3544596f9f Add ssl_options support to monerod's rpc mode. 2019-05-22 00:09:11 -04:00
who-biz c27d96129e [depends] update openssl to 1.0.2r
- This addresses https://www.openssl.org/news/secadv/20190226.txt (CVE: 2019-1559) which impacted all versions of openssl-1.0.

Note that this does not address CVE-2019-1543 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1543), which impacts all versions of openssl 1.1 through 1.1.0j and 1.1.1b.

The above (1.1) is patched in openssl, where it was marked as low severity.  Similar issues possibly present in monero, should be looked into w.r.t. CVE-2019-1543.
2019-05-18 02:18:55 -04:00
Riccardo Spagni e8487fa46b
Merge pull request #5539
3f612cda Changed odd bullet point to low level header (Rohaq)
af9bc4ec Used subeaders to avoid slightly wonky looking formatting (Rohaq)
1873af35 Made code block usage consistent across all .md files (Rohaq)
68103075 Updated Copyright notice (Rohaq)
39bd157f Added Table of Contents to main README.md (Rohaq)
2019-05-15 16:10:41 +02:00
luigi1111 14723fc6e7
Merge pull request #5527
9a7a453 net_ssl: free certs after setting them up (moneromooo-monero)
2019-05-14 15:55:25 -05:00
luigi1111 1fc1c7318c
Merge pull request #5519
b8b957d cmake: fix incorrect hint for OPENSSL_ROOT_DIR (moneromooo-monero)
367bb80 mlog: default to not showing SSL errors (moneromooo-monero)
2019-05-14 15:52:32 -05:00
Rohaq 1873af35bf Made code block usage consistent across all .md files 2019-05-12 05:16:26 +01:00
moneromooo-monero 9a6006bad8
abstract_tcp_server2: move some things out of a lock
The lock is meant for the network throttle object only,
and this should help coverity get unconfused
2019-05-10 14:18:11 +00:00
moneromooo-monero 6abaaaa994
remove obsolete save_graph skeleton code 2019-05-10 14:17:18 +00:00
moneromooo-monero f61a315e8b
net_utils: fix m_ssl type from time_t to bool 2019-05-10 14:14:49 +00:00
moneromooo-monero 9a7a453f25
net_ssl: free certs after setting them up 2019-05-10 00:16:49 +00:00
Riccardo Spagni c0bc6d96cd
Merge pull request #5509
a62e0725 net_ssl: SSL config tweaks for compatibility and security (moneromooo-monero)
2019-05-07 17:39:20 +02:00
Riccardo Spagni 2d04b0e500
Merge pull request #5499
a4c4a2d8 blockchain: keep a rolling long term block weight median (moneromooo-monero)
2019-05-07 17:31:45 +02:00
Riccardo Spagni 123df0eaf7
Merge pull request #5419
f29fecd5 build: debug and test builds via contrib (Dusan Klinec)
2019-05-07 17:26:32 +02:00
moneromooo-monero a62e072571
net_ssl: SSL config tweaks for compatibility and security
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-07 10:01:42 +00:00
moneromooo-monero 367bb80ae7
mlog: default to not showing SSL errors 2019-05-06 07:38:52 +00:00
moneromooo-monero a4c4a2d8aa
blockchain: keep a rolling long term block weight median 2019-05-02 09:47:01 +00:00
moneromooo-monero 5e0da6fb68
change SSL certificate fingerprint whitelisting from SHA1 to SHA-256
SHA1 is too close to bruteforceable
2019-04-26 11:37:15 +00:00
Riccardo Spagni 5d09e39174
Merge pull request #5482
9956500d net_helper: clear recv buffer on eof (moneromooo-monero)
2019-04-24 22:40:12 +02:00
Riccardo Spagni d86dd5fa7c
Merge pull request #5479
edbae2d0 levin_protocol_handler_async: tune down preallocation a fair bit (moneromooo-monero)
2019-04-24 22:39:30 +02:00
moneromooo-monero 9956500d14
net_helper: clear recv buffer on eof 2019-04-23 13:23:17 +00:00
moneromooo-monero edbae2d05b
levin_protocol_handler_async: tune down preallocation a fair bit
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-22 22:35:32 +00:00
moneromooo-monero 7a9316ebef
serialization: set default log category 2019-04-21 09:26:25 +00:00
moneromooo-monero b672d4d6e5
epee: use boost/timer/timer.hpp, boost/timer.hpp is deprecated 2019-04-18 15:12:34 +00:00
Riccardo Spagni ba1b6d36c4
Merge pull request #5447
02c01c0b Add Brewfile to allow for an even easier management of dependencies (Florian)
2019-04-16 22:47:56 +02:00
Riccardo Spagni c8ce4217cf
Merge pull request #5445
b18f0b10 wallet: new --offline option (moneromooo-monero)
2019-04-16 22:46:53 +02:00
Riccardo Spagni e9527f5eed
Merge pull request #5436
61d63900 net_helper: avoid unnecessary memcpy (moneromooo-monero)
2019-04-16 22:43:15 +02:00
Riccardo Spagni c603044398
Merge pull request #5432
c3cf930f abstract_tcp_server2: fix timeout on exit (moneromooo-monero)
2019-04-16 22:41:18 +02:00
Florian 02c01c0bd8 Add Brewfile to allow for an even easier management of dependencies 2019-04-15 14:46:26 +02:00
moneromooo-monero b18f0b1051
wallet: new --offline option
It will avoid connecting to a daemon (so useful for cold signing
using a RPC wallet), and not perform DNS queries.
2019-04-15 09:14:12 +00:00
Riccardo Spagni e46dc055d1
Merge pull request #5369
e72c2c5d do not build in parallel as it is non-deterministic (Jane Mercer)
2019-04-15 09:13:48 +02:00
moneromooo-monero 61d63900b9
net_helper: avoid unnecessary memcpy 2019-04-13 13:24:58 +00:00
moneromooo-monero c3cf930f75
abstract_tcp_server2: fix timeout on exit
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-12 18:13:31 +00:00
moneromooo-monero 4b3bb829c2
epee: init a new ssl related variable in ctor 2019-04-11 11:10:15 +00:00
moneromooo-monero 9f8dc4ce51
simplewallet: new net_stats command
displays total sent and received bytes
2019-04-11 10:46:41 +00:00
Dusan Klinec f29fecd517
build: debug and test builds via contrib 2019-04-10 15:43:52 +02:00
Lee Clagett 2e578b8214 Enabling daemon-rpc SSL now requires non-system CA verification
If `--daemon-ssl enabled` is set in the wallet, then a user certificate,
fingerprint, or onion/i2p address must be provided.
2019-04-07 13:02:43 -04:00
Lee Clagett d58f368289 Require manual override for user chain certificates.
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-07 00:44:37 -04:00
Lee Clagett 97cd1fa98d Only check top-level certificate against fingerprint list.
This allows "chain" certificates to be used with the fingerprint
whitelist option. A user can get a system-ca signature as backup while
clients explicitly whitelist the server certificate. The user specified
CA can also be combined with fingerprint whitelisting.
2019-04-07 00:44:37 -04:00
Lee Clagett 7c388fb358 Call `use_certificate_chain_file` instead of `use_certificate_file`
The former has the same behavior with single self signed certificates
while allowing the server to have separate short-term authentication
keys with long-term authorization keys.
2019-04-07 00:44:37 -04:00
Lee Clagett eca0fea45a Perform RFC 2818 hostname verification in client SSL handshakes
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-07 00:44:37 -04:00
Lee Clagett 0416764cae Require server verification when SSL is enabled.
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-07 00:44:37 -04:00
Lee Clagett 96d602ac84 Add `verify_fail_if_no_cert` option for proper client authentication
Using `verify_peer` on server side requests a certificate from the
client. If no certificate is provided, the server silently accepts the
connection and rejects if the client sends an unexpected certificate.
Adding `verify_fail_if_no_cert` has no affect on client and for server
requires that the peer sends a certificate or fails the handshake. This
is the desired behavior when the user specifies a fingerprint or CA file.
2019-04-07 00:44:37 -04:00
Lee Clagett 21eb1b0725 Pass SSL arguments via one class and use shared_ptr instead of reference 2019-04-07 00:44:37 -04:00
Lee Clagett f18a069fcc Do not require client certificate unless server has some whitelisted.
Currently a client must provide a certificate, even if the server is
configured to allow all certificates. This drops that requirement from
the client - unless the server is configured to use a CA file or
fingerprint(s) for verification - which is the standard behavior for SSL
servers.

The "system-wide" CA is not being used as a "fallback" to verify clients
before or after this patch.
2019-04-06 23:47:06 -04:00
Lee Clagett a3b0284837 Change SSL certificate file list to OpenSSL builtin load_verify_location
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-06 23:47:06 -04:00
Riccardo Spagni 0baf26c8d6
Merge pull request #5375
1569776a Add missing include (Leon Klingele)
2019-04-06 16:04:06 +02:00
Riccardo Spagni 17fefb8786
Merge pull request #5358
dffdccdc No longer use deprecated RSA_generate_key in favor of RSA_generate_key_ex (Martijn Otto)
2019-04-06 16:02:31 +02:00
Riccardo Spagni 38317f384c
Merge pull request #5348
59776a64 epee: some more minor JSON parsing speedup (moneromooo-monero)
2019-04-06 16:00:18 +02:00
Riccardo Spagni 1ed6441925
Merge pull request #5327
c23ea796 New interactive daemon command 'print_net_stats': Global traffic stats (rbrunner7)
2019-04-01 17:32:01 +02:00
Riccardo Spagni 87840192dd
Merge pull request #5309
43042a28 Implement array_entry_t copy constructor (Guido Vranken)
2019-04-01 17:28:08 +02:00
Leon Klingele 1569776a52
Add missing include 2019-03-31 18:39:25 +02:00
Jane Mercer e72c2c5dcc do not build in parallel as it is non-deterministic 2019-03-29 10:31:35 -07:00
Martijn Otto dffdccdc9e
No longer use deprecated RSA_generate_key in favor of
RSA_generate_key_ex
2019-03-27 13:23:30 +01:00
moneromooo-monero 59776a64ff
epee: some more minor JSON parsing speedup 2019-03-25 14:29:29 +00:00
Lee Clagett 7acfa9f3cc Added socks proxy (tor/i2pd/kovri) support to wallet 2019-03-25 01:35:13 +00:00
Riccardo Spagni 676b17d36d
Merge pull request #5285
6ef816de console_handler: print newline on EOF (moneromooo-monero)
2019-03-24 19:38:04 +02:00
rbrunner7 c23ea7962d New interactive daemon command 'print_net_stats': Global traffic stats 2019-03-24 16:58:57 +01:00
Riccardo Spagni f5d7652f73
Merge pull request #5283
16590294 abstract_tcp_server2: fix crashy race on socket shutdown (moneromooo-monero)
2019-03-21 14:53:03 +02:00
Riccardo Spagni 5259dd7a14
Merge pull request #5259
9141a0a1 connection_basic: remove debug exception ^_^ (moneromooo-monero)
2019-03-21 14:49:09 +02:00
moneromooo-monero 17769db946
epee: fix build with boost 1.70.0
get_io_service was deprecated, and got removed
2019-03-21 11:02:02 +00:00
moneromooo-monero 1659029469
abstract_tcp_server2: fix crashy race on socket shutdown 2019-03-19 16:50:00 +00:00
Guido Vranken 43042a28ec Implement array_entry_t copy constructor
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-18 00:49:12 +01:00
Riccardo Spagni 4c91eb23a0
Merge pull request #5061
1f2930ce Update 2019 copyright (binaryFate)
2019-03-17 17:49:30 +02:00
moneromooo-monero 6ef816de2b
console_handler: print newline on EOF
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-13 16:52:22 +00:00
Dusan Klinec bb8eab24da
epee: certificate generation fix, pkey deleted
- pkey gets deleted by the pkey_deleter but the caller tries to serialize it which causes errors as the memory is freed
2019-03-10 20:09:51 +01:00
moneromooo-monero 9141a0a1ef
connection_basic: remove debug exception ^_^ 2019-03-08 20:13:51 +00:00
Howard Chu b8c2e21cba
Fix startup errors with SSL cert generation
Use SSL API directly, skip boost layer
2019-03-08 15:15:24 +00:00
binaryFate 1f2930ce0b Update 2019 copyright 2019-03-05 22:05:34 +01:00
Martijn Otto 057c279cb4
epee: add SSL support
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-05 14:16:08 +01:00
TheCharlatan 5057eb1199
cmake: ARCH_ID fixes for cross compilation 2019-03-05 10:24:14 +00:00
moneromooo-monero e396146aee
default initialize rpc structures 2019-03-04 22:38:03 +00:00
Riccardo Spagni c83e80c263
Merge pull request #5162
4d3b61a3 Use io_service::work in epee tcp server (Lee Clagett)
2019-03-04 21:33:48 +02:00
Riccardo Spagni f18a7e39b8
Merge pull request #5160
7af4fbd4 epee: Add space after ':' in additional http response headers (Tom Smeding)
2019-03-04 21:33:24 +02:00
Riccardo Spagni 5260111631
Merge pull request #5146
4a9257b4 Support docker for gitian builds (TheCharlatan)
2019-03-04 21:32:30 +02:00
Riccardo Spagni d70de1150a
Merge pull request #5136
7da7a9bb Update openssl to 1.0.2q in depends build system (who-biz)
2019-03-04 21:29:28 +02:00
Riccardo Spagni 933c701c6e
Merge pull request #5133
f0fc4064 Various speedups to depends and Travis (TheCharlatan)
2019-03-04 21:28:56 +02:00
Riccardo Spagni 4a390d43f8
Merge pull request #5113
c0e9e805 Fixed missing return value in once_a_time class on windows (Markus Behm)
2019-03-04 21:25:44 +02:00
Riccardo Spagni a28237c9ca
Merge pull request #5102
1eef0565 performance_tests: better stats, and keep track of timing history (moneromooo-monero)
2019-03-04 21:22:51 +02:00
Riccardo Spagni 722a856d7e
Merge pull request #5096
7c3ade44 network_throttle: use circular_buffer where appropriate (moneromooo-monero)
2019-03-04 21:21:25 +02:00
Riccardo Spagni 4466f4504e
Merge pull request #5091
123fc2a2 i2p: initial support (Jethro Grassie)
2019-03-04 21:20:34 +02:00
TheCharlatan f0fc4064a0
Various speedups to depends and Travis
Further speedups to icu compilation, it is faster to run the
pre-generated configure scripts.

Ensure that the native protobuf installation only generates the required
libraries and binaries.

Disable qt compilation when running travis on windows. Qt is used for
lrelease, the travis recipe instead usese the a local installation of
lrelease.

Remove various packages and options from the travis recipe.

Update Readline to version 8.0. The previously used url 404'd sometimes,
use the official gnu ftp server instead.

Remove unused cmake config.
2019-02-23 15:34:59 +01:00
Tom Smeding 7af4fbd4d1 epee: Add space after ':' in additional http response headers 2019-02-18 14:56:28 +01:00
TheCharlatan 4a9257b464
Support docker for gitian builds
Building with docker is arguably easier and more familiar to most people
than either kvm, or lxc.

This commit also relaxes the back compat requirement a bit. 32 bit linux
now uses glibc version 2.0. Also, the docker shell could not handle gcc arguments
containing spaces, so the explicit '-DFELT_TYPE' declaration was dropped.

Lastly, this removes some packages from the osx descriptor.
2019-02-14 23:14:34 +01:00
Lee Clagett 4d3b61a31b Use io_service::work in epee tcp server 2019-02-10 13:40:32 -05:00
who-biz 7da7a9bbcc Update openssl to 1.0.2q in depends build system 2019-02-10 08:14:33 -05:00
Markus Behm c0e9e80581 Fixed missing return value in once_a_time class on windows 2019-02-09 15:24:34 -05:00
moneromooo-monero 2456945408
epee: add SSL support
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-02 20:05:33 +00:00
moneromooo-monero 7c3ade4410
network_throttle: use circular_buffer where appropriate 2019-02-01 21:33:13 +00:00
Jethro Grassie 123fc2a25a
i2p: initial support 2019-01-30 13:37:45 -05:00
Lee Clagett 973403bc9f Adding initial support for broadcasting transactions over Tor
- 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-28 23:56:33 +00:00
Riccardo Spagni 1e5cd3b35a
Merge pull request #5062
acfff8d0 rpc: fix internal daemon calls in restricted rpc getting partial data (moneromooo-monero)
2019-01-28 21:40:11 +02:00
moneromooo-monero acfff8d0ce
rpc: fix internal daemon calls in restricted rpc getting partial data 2019-01-28 19:35:20 +00:00
Riccardo Spagni d214992a7f
Merge pull request #5073
45ea19fa bump sodium to 1.0.16 (italocoin)
2019-01-28 21:33:11 +02:00
Riccardo Spagni fbecfc3c8f
Merge pull request #5065
ca86ef1b readline: don't dereference possible NULL pointer (Jethro Grassie)
2019-01-28 21:31:20 +02:00
moneromooo-monero 1eef056588
performance_tests: better stats, and keep track of timing history 2019-01-28 15:45:37 +00:00
moneromooo-monero b750fb27b0
Pruning
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-22 20:30:51 +00:00
Jethro Grassie ca86ef1beb
readline: don't dereference possible NULL pointer 2019-01-21 01:57:14 -05:00
Riccardo Spagni b65106ce93
Merge pull request #5017
21777daf epee: speedup word/number matching (moneromooo-monero)
2019-01-18 09:24:41 +02:00
TheCharlatan b4433abc64
Optimize the depends builds for faster compilation
This includes more fine grained configure options and skipping the
openssl and zlib dependencies when compiling qt. The zlib and libevent
packages are removed.
2019-01-17 13:23:24 +01:00
moneromooo-monero 21777daf6e
epee: speedup word/number matching
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-16 19:59:40 +00:00
Riccardo Spagni 246b28e47a
Merge pull request #5022
37a9bcf4 Remove visibility settings from boost.mk (TheCharlatan)
2019-01-16 21:37:52 +02:00
Riccardo Spagni a093a7569e
Merge pull request #5021
b82efa32 epee: speed up json parsing (moneromooo-monero)
2019-01-16 21:37:29 +02:00
Riccardo Spagni 3e9bb9626a
Merge pull request #5001
a5ffc2d5 Remove boost::lexical_cast for uuid and unused uuid function (Lee Clagett)
2019-01-16 19:27:13 +02:00
Riccardo Spagni 846362842c
Merge pull request #4976
85665003 epee: better network buffer data structure (moneromooo-monero)
2019-01-16 19:04:22 +02:00
italocoin 45ea19fafb bump sodium to 1.0.16 2019-01-15 07:35:45 -05:00
Riccardo Spagni e723eb960d
Merge pull request #4951
b21a60ef mlocker: set default log category (moneromooo-monero)
2019-01-06 20:38:33 +02:00
Riccardo Spagni 3ce7977389
Merge pull request #4950
68f045de easylogging++: check allowed categories before logging (moneromooo-monero)
2019-01-06 20:38:10 +02:00
Riccardo Spagni 13b006137c
Merge pull request #4949
5464725a protocol: change standby mode to not wait sleeping (moneromooo-monero)
85807dfb add a once_a_time_milliseconds class (moneromooo-monero)
2019-01-06 20:37:51 +02:00
Riccardo Spagni ad1eb3338c
Merge pull request #4938
a13eb0a1 epee: speed up string matching a bit (moneromooo-monero)
3a3858dc epee: avoid string allocation when parsing a pod from string (moneromooo-monero)
2019-01-06 20:36:46 +02:00
luigi1111 53760ee044
Merge pull request #4957
0e2f5cb perf_timer: make all logs Info level (moneromooo-monero)
2018-12-31 16:30:47 -06:00
luigi1111 9c2d671397
Merge pull request #4945
e37154a build: protobuf dependency fixes, libusb build (ph4r05)
2018-12-31 15:53:59 -06:00
luigi1111 d8c03191ca
Merge pull request #4933
3cf85f0 Changed RECIEVED to RECEIVED in log messages. (normoes)
2018-12-31 15:33:18 -06:00
luigi1111 3adac4ee2b
Merge pull request #4929
5a76933 Add glibc back compat code (TheCharlatan)
2018-12-31 15:31:01 -06:00
luigi1111 c93c638199
Merge pull request #4864
707c2f8 Remove -Werror (moneromooo-monero)
2018-12-31 15:13:59 -06:00
TheCharlatan 37a9bcf483 Remove visibility settings from boost.mk
Clang gave a visibility error when compiling boost with visibility
hidden.
2018-12-27 23:30:22 +01:00
moneromooo-monero b82efa32e7
epee: speed up json parsing 2018-12-27 14:28:30 +00:00
moneromooo-monero 85665003a7
epee: better network buffer data structure
avoids pointless allocs and memcpy
2018-12-23 16:46:07 +00:00
Lee Clagett a5ffc2d5ad Remove boost::lexical_cast for uuid and unused uuid function 2018-12-23 11:11:30 +00:00
Dusan Klinec e37154a879
build: protobuf dependency fixes, libusb build
- docker protobuf dependencies, cross-compilation
- device/trezor protobuf build fixes, try_compile
- libusb built under all platforms, used by trezor for direct connect
2018-12-18 16:50:19 +01:00
TheCharlatan 118db4f357 Cleanup leftovers from migrating depends from bitcoin
Depends still contained some leftovers, like the `wallet` target that
included bdb from bitcoin. This commit removes these unneeded targets,
the miniupnpc package and the berkeley db package. Reflect the changes
in the README as well.
2018-12-12 12:14:20 +01:00
Riccardo Spagni 5e9225e637
Merge pull request #4925
ab783b17 easylogging++: ensure logger is initialized before main (moneromooo-monero)
9b69a0ae daemon: print monero version at startup when calling a detached daemon (moneromooo-monero)
4d71d463 mlocker: remove early page size log (moneromooo-monero)
2018-12-12 12:01:18 +02:00
Riccardo Spagni 2dd6fe4898
Merge pull request #4900
4f74a31e http -> https (Dimitris Apostolou)
2018-12-12 11:56:55 +02:00
Riccardo Spagni 5123749d79
Merge pull request #4840
721aacd8 easylogging++: faster access to logging (moneromooo-monero)
7cc27b36 Revert "easylogging++: make the logger handle early/late logging" (moneromooo-monero)
2018-12-12 11:54:11 +02:00
moneromooo-monero 0e2f5cb5fc
perf_timer: make all logs Info level
and make them not default at log level 1
2018-12-08 10:53:09 +00:00
moneromooo-monero a13eb0a1a4
epee: speed up string matching a bit 2018-12-08 02:00:37 +00:00
moneromooo-monero 3a3858dc90
epee: avoid string allocation when parsing a pod from string 2018-12-08 02:00:34 +00:00
moneromooo-monero 68f045de8c
easylogging++: check allowed categories before logging 2018-12-07 13:25:39 +00:00
moneromooo-monero b21a60efd9
mlocker: set default log category 2018-12-07 13:13:24 +00:00
moneromooo-monero 85807dfb25
add a once_a_time_milliseconds class 2018-12-07 12:36:33 +00:00
Riccardo Spagni 16dc6900fb
Merge pull request #4883
40485a73 mlocker: fix access to global lock map after dtor on exit (moneromooo-monero)
2018-12-04 17:30:46 +02:00
Riccardo Spagni e799fc87ae
Merge pull request #4866
9c923bad epee: fix network packet header field endianness (moneromooo-monero)
ec1a62b5 move int-util.h to epee (moneromooo-monero)
2018-12-04 17:30:11 +02:00
Riccardo Spagni d4a0fb2b89
Merge pull request #4880
96e6b439 blockchain_stats: don't use gmtime_r on Windows (moneromooo-monero)
2018-12-04 17:29:46 +02:00
Riccardo Spagni 3d745573d7
Merge pull request #4876
1132436f Only show a single mlock() error, to avoid flooding the log (Martijn Otto)
2018-12-04 17:16:29 +02:00
Riccardo Spagni f6e8ab0dc6
Merge pull request #4875
23829ebb mlocker: don't throw from lock/unlock (moneromooo-monero)
2018-12-04 17:15:07 +02:00
moneromooo-monero 9c923bad9b
epee: fix network packet header field endianness 2018-12-04 15:14:32 +00:00
moneromooo-monero ec1a62b50d
move int-util.h to epee 2018-12-04 15:14:29 +00:00
Riccardo Spagni c00ac446fd
Merge pull request #4854
bd98e99c Removed a lot of unnecessary includes (Martijn Otto)
2018-12-04 17:08:42 +02:00
Riccardo Spagni 398f7076bb
Merge pull request #4853
2b3595d0 various: do not propagate exception through dtor (moneromooo-monero)
2018-12-04 17:07:51 +02:00
Riccardo Spagni 40650b43b8
Merge pull request #4850
b36353e2 unit_tests: add some hex parsing test for non hex input (xiphon)
6671110c unit_tests: add a test for parse_hexstr_to_binbuff (moneromooo-monero)
f6187cd8 epee: speed up parse_hexstr_to_binbuff a little (Howard Chu)
2018-12-04 17:07:19 +02:00
Norman Moeschter 3cf85f0e83
Changed RECIEVED to RECEIVED in log messages. 2018-12-04 07:27:08 +01:00
TheCharlatan 5a76933903 Add glibc back compat code
To ensure that the binaries compiled by gitian run across many linux
distributions, enforce 2.17 as the minimum libc version supported.
2018-12-04 02:21:06 +01:00
Dimitris Apostolou 4f74a31ecd
http -> https 2018-12-01 12:57:37 +02:00
moneromooo-monero 4d71d46373
mlocker: remove early page size log
It comes before the logger is initialized, so gets displayed
even though it should not be by default, and apparenly comes
too early for (some versions of) Android, where it crashes.
2018-11-30 16:52:50 +00:00
moneromooo-monero 721aacd88e
easylogging++: faster access to logging
Turns out getting the global shared_ptr hits the profile,
and passing it around still keeps it at close to ~1% CPU,
which is too much for mostly silent logging.

Leak the object instead, which is even safer for late logging.
2018-11-27 13:55:21 +00:00
moneromooo-monero fc98f7a0a1
rpc: speedup get_outs.bin 2018-11-26 18:56:23 +00:00