Commit Graph

403 Commits

Author SHA1 Message Date
moneromooo-monero 3140a378da
wallet_rpc_server: fix get_bulk_payments with short payment ids 2019-07-09 14:39:44 +00:00
Lee Clagett 9bfa4c20ca Fix allow any cert mode in wallet rpc when configured over rpc 2019-05-22 00:15:14 -04:00
Lee Clagett 3544596f9f Add ssl_options support to monerod's rpc mode. 2019-05-22 00:09:11 -04:00
luigi1111 1607419e38
Merge pull request #5538
615f287 wallet: fix certificate fingerprint length check (moneromooo-monero)
2019-05-14 16:02:59 -05:00
moneromooo-monero 615f287aec
wallet: fix certificate fingerprint length check
Fixed by crCr62U0
2019-05-11 13:05:06 +00:00
moneromooo-monero 46244dd08c
wallet_rpc_server: use original addresses in destinations in get_transfers
And add them for pending transfers, where they were missing
2019-05-10 14:44:13 +00:00
Riccardo Spagni c20221f290
Merge pull request #5503
ccc1e311 wallet_rpc_server: reject standalone short payment id in address book (moneromooo-monero)
2019-05-07 17:34:16 +02:00
moneromooo-monero bc94ba4d14
wallet: distinguish between empty and absent attributes 2019-05-02 13:00:08 +00:00
Riccardo Spagni 77f9bfa4d5
Merge pull request #5493
5e0da6fb change SSL certificate fingerprint whitelisting from SHA1 to SHA-256 (moneromooo-monero)
2019-05-02 11:30:28 +02:00
Riccardo Spagni 52eb454d7b
Merge pull request #5491
98fb98f9 wallet_rpc_server: adding missing return on error in set_daemon (moneromooo-monero)
9074c0d8 wallet_rpc_server: return false on error in set_log_categories (moneromooo-monero)
968848a7 wallet_rpc_server: fix crash in validate_address if no wallet is loaded (moneromooo-monero)
2019-05-02 11:30:11 +02:00
moneromooo-monero ccc1e311dc
wallet_rpc_server: reject standalone short payment id in address book 2019-04-30 21:07:37 +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
moneromooo-monero 98fb98f93f
wallet_rpc_server: adding missing return on error in set_daemon 2019-04-25 23:35:37 +00:00
moneromooo-monero 9074c0d8cf
wallet_rpc_server: return false on error in set_log_categories
Reported by SmajeNz0
2019-04-25 23:35:37 +00:00
moneromooo-monero 968848a77b
wallet_rpc_server: fix crash in validate_address if no wallet is loaded
Reported by SmajeNz0
2019-04-25 23:35:37 +00:00
moneromooo-monero 31a9aa83af
wallet_rpc_server: add block_height and frozen to incoming_transfers 2019-04-20 08:44:09 +00:00
Riccardo Spagni 2e342d8df6
Merge pull request #5458
84047cb7 wallet_rpc_server: add unlocked field to incoming_transfers output (moneromooo-monero)
2019-04-18 22:01:22 +02:00
moneromooo-monero 84047cb729
wallet_rpc_server: add unlocked field to incoming_transfers output 2019-04-17 15:30:49 +00:00
moneromooo-monero 3b9ce453a9
wallet_rpc_server: remove unused variable 2019-04-17 11:25:33 +00:00
moneromooo-monero 7110226794
wallet_rpc_server: set suggested_confirmations_threshold for pool txes 2019-04-16 20:59:57 +00:00
moneromooo-monero 294e858d57
wallet_rpc_server: add set_log_level/set_log_categories 2019-04-16 20:50:15 +00:00
Riccardo Spagni f376cd5605
Merge pull request #5446
7d79222f daemon: remove debug info (moneromooo-monero)
8fec0f98 functional_tests: add sweep_single test (moneromooo-monero)
9880d61b wallet_rpc_server: remove unused code (moneromooo-monero)
8a61b33d rpc: omit irrelevant fields for pool txes in gettransactions (moneromooo-monero)
56508524 rpc: add relayed in get_transaction output (moneromooo-monero)
82e510f1 rpc: set default log category in core_rpc_server.h (moneromooo-monero)
2019-04-16 22:46:29 +02:00
Riccardo Spagni 35b3d754e8
Merge pull request #5429
bcb86ae6 wallet_rpc_server: fix inconsistent wallet caches on reload (moneromooo-monero)
2019-04-16 22:39:37 +02:00
Riccardo Spagni 96696d1e75
Merge pull request #5418
374f388d wallet_rpc_server: add a all flag to export_outputs (moneromooo-monero)
2019-04-16 22:37:52 +02:00
moneromooo-monero 9880d61b98
wallet_rpc_server: remove unused code 2019-04-15 09:13:12 +00:00
moneromooo-monero bcb86ae651
wallet_rpc_server: fix inconsistent wallet caches on reload
Loading the same wallet as the currently loaded one would autosave
the current state after loading it, leading to some kind of rollback
effect. We now save before loading to avoid this. If loading fails,
it means the current wallet will be saved (or maybe not, depending
on where the failure occurs: most of the sanity checks occur before
saving). There is a new autosave_current flag to open/restore calls
so the (enabled by default) autosave can be skipped.
2019-04-12 13:40:42 +00:00
Riccardo Spagni 5c02316598
Merge pull request #5382
c12b43cb wallet: add number of blocks required for the balance to fully unlock (moneromooo-monero)
3f1e9e84 wallet2: set confirmations to 0 for pool txes in proofs (moneromooo-monero)
36c037ec wallet_rpc_server: error out on getting the spend key from a hot wallet (moneromooo-monero)
cd1eaff2 wallet_rpc_server: always fill out subaddr_indices in get_transfers (moneromooo-monero)
2019-04-11 13:03:55 +02:00
Riccardo Spagni 3a4008f0fc
Merge pull request #5374
a2561653 wallet: new option to start background mining (moneromooo-monero)
2019-04-11 13:01:30 +02:00
moneromooo-monero 374f388de2
wallet_rpc_server: add a all flag to export_outputs
if we don't want to export new outputs only
2019-04-10 10:37:34 +00: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 21eb1b0725 Pass SSL arguments via one class and use shared_ptr instead of reference 2019-04-07 00:44:37 -04:00
Lee Clagett 1f5ed328aa Change default SSL to "enabled" if user specifies fingerprint/certificate
Currently if a user specifies a ca file or fingerprint to verify peer,
the default behavior is SSL autodetect which allows for mitm downgrade
attacks. It should be investigated whether a manual override should be
allowed - the configuration is likely always invalid.
2019-04-06 23:47:07 -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 7e5651c346
Merge pull request #5345
678262ab wallet_rpc_server: allow english/local language names in create_wallet (moneromooo-monero)
2019-04-06 15:59:10 +02:00
Riccardo Spagni e1f0e6da5c
Merge pull request #5340
16eda54b wallet: use original user address if we have a short payment id (moneromooo-monero)
2019-04-06 15:56:52 +02:00
moneromooo-monero a2561653cb
wallet: new option to start background mining
The setup-background-mining option can be used to select
background mining when a wallet loads. The user will be asked
the first time the wallet is created.
2019-04-04 18:10:45 +00:00
moneromooo-monero c12b43cb5a
wallet: add number of blocks required for the balance to fully unlock 2019-04-01 19:31:19 +00:00
moneromooo-monero 36c037ec47
wallet_rpc_server: error out on getting the spend key from a hot wallet 2019-04-01 19:31:01 +00:00
moneromooo-monero cd1eaff29e
wallet_rpc_server: always fill out subaddr_indices in get_transfers
It was not filled out for in and pool types
2019-04-01 19:30:27 +00:00
moneromooo-monero f825055d22
wallet_rpc_server: error out on getting the spend key from a hot wallet 2019-04-01 16:03:29 +00:00
moneromooo-monero 67aa4adcfc
wallet_rpc_server: add a set_daemon RPC 2019-04-01 16:03:25 +00:00
moneromooo-monero f82bc29ec2
wallet_rpc_server: always fill out subaddr_indices in get_transfers
It was not filled out for in and pool types
2019-04-01 16:03:20 +00:00
moneromooo-monero 01efdc6a7e
wallet_rpc_server: set confirmations to 0 for pending/pool txes 2019-04-01 16:03:17 +00:00
Riccardo Spagni 3b1fa543ca
Merge pull request #5329
023f2c77 wallet_rpc_server: remove mixin from transfer RPCs (moneromooo-monero)
2019-04-01 17:32:20 +02:00
Riccardo Spagni 94880540e7
Merge pull request #5302
23fb056a wallet_rpc_server: new auto_refresh RPC (moneromooo-monero)
2019-04-01 17:25:53 +02:00
Riccardo Spagni b09f1bdb8f
Merge pull request #5299
4ee15655 wallet_rpc_server: fix buffer read overflow in string assignment (moneromooo-monero)
2019-04-01 17:24:33 +02:00
Riccardo Spagni f13d38350a
Merge pull request #5297
a8b98a0b wallet: fix memory only wallets (moneromooo-monero)
2019-04-01 17:23:37 +02:00
moneromooo-monero 678262ab65
wallet_rpc_server: allow english/local language names in create_wallet
and return both in get_languages
2019-03-25 12:52:43 +00:00
moneromooo-monero a8b98a0bd7
wallet: fix memory only wallets
at least when using restore_deterministic_wallet
2019-03-25 12:49:25 +00:00
Riccardo Spagni 4176a399de
Merge pull request #5282
f962449d wallet_rpc_server: include out subaddress indices in get_transfers (moneromooo-monero)
2019-03-24 19:37:07 +02:00
moneromooo-monero 16eda54b38
wallet: use original user address if we have a short payment id 2019-03-24 08:58:59 +00:00
moneromooo-monero 023f2c7747
wallet_rpc_server: remove mixin from transfer RPCs
it's been a while, only use ring_size now
2019-03-21 14:47:39 +00:00
Riccardo Spagni 695d51a481
Merge pull request #5203
8b514645 add multisig tx sets to describe_transfer rpc endpoint (spoke0)
2019-03-19 10:59:42 +02:00
Riccardo Spagni 6d5849d9bb
Merge pull request #5165
36451697 Simplify RPC endpoint, emoving second RPC endpoint generate_from_view_key (Joel)
c17c8188 Remove code duplication (Joel)
acb14c10 Add generate_from_view_key RPC method (Joel)
7dd7a3b7 Add generate_from_keys RPC method (Joel)
2019-03-17 17:51:24 +02:00
Riccardo Spagni 4c91eb23a0
Merge pull request #5061
1f2930ce Update 2019 copyright (binaryFate)
2019-03-17 17:49:30 +02:00
moneromooo-monero 23fb056a72
wallet_rpc_server: new auto_refresh RPC
It can enable/disable auto refresh, and set auto refresh period
2019-03-17 10:33:51 +00:00
moneromooo-monero 4ee156556d
wallet_rpc_server: fix buffer read overflow in string assignment 2019-03-15 19:36:13 +00:00
moneromooo-monero f962449d46
wallet_rpc_server: include out subaddress indices in get_transfers 2019-03-13 14:14:15 +00:00
moneromooo-monero aac4e2f585
wallet_rpc_server: add missing --rpc-ssl-allowed-fingerprints 2019-03-13 12:59:44 +00:00
binaryFate 1f2930ce0b Update 2019 copyright 2019-03-05 22:05:34 +01:00
Riccardo Spagni 5bbbe3902b
Merge pull request #4852
057c279c epee: add SSL support (Martijn Otto)
2019-03-05 16:21:30 +02:00
spoke0 8b51464516 add multisig tx sets to describe_transfer rpc endpoint 2019-03-05 14:42:43 +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
moneromooo-monero c4851024ce
wallet_rpc_server: avoid repeated string allocations when parsing 2019-03-05 11:58:22 +00:00
moneromooo-monero ef93b0995c
various: remove unused variables 2019-03-04 22:24:49 +00:00
Riccardo Spagni 2f7108f9d7
Merge pull request #5156
3d2772a0 wallet-rpc: get balance for all accounts and subaddresses (stoffu)
2019-03-04 21:33:07 +02:00
Riccardo Spagni 6984a4d69c
Merge pull request #5154
8a1ff079 wallet-rpc: get transfers for all accounts and subaddresses (Jethro Grassie)
2019-03-04 21:32:42 +02:00
Riccardo Spagni 27db0e3bb9
Merge pull request #5141
5c81a9f1 wallet_rpc_server: add a validate_address RPC (moneromooo-monero)
2019-03-04 21:30:45 +02:00
Riccardo Spagni 46fd181cca
Merge pull request #4054
24569454 epee: add SSL support (moneromooo-monero)
2019-03-04 21:17:21 +02:00
Joel 364516975a Simplify RPC endpoint, emoving second RPC endpoint generate_from_view_key 2019-03-02 23:14:35 +01:00
Joel c17c81881b Remove code duplication 2019-02-21 15:49:32 +01:00
stoffu 3d2772a0d6
wallet-rpc: get balance for all accounts and subaddresses 2019-02-20 14:23:36 +09:00
Joel acb14c1079 Add generate_from_view_key RPC method 2019-02-19 14:30:35 +01:00
Joel 7dd7a3b791 Add generate_from_keys RPC method 2019-02-19 14:13:01 +01:00
Jethro Grassie 8a1ff079ea
wallet-rpc: get transfers for all accounts and subaddresses 2019-02-17 22:21:45 -05:00
moneromooo-monero 5c81a9f1a1
wallet_rpc_server: add a validate_address RPC 2019-02-14 21:01:11 +00: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 45b7df703b
wallet_rpc_server: remove detached short payment ids support 2019-02-02 18:53:14 +00:00
moneromooo-monero acfff8d0ce
rpc: fix internal daemon calls in restricted rpc getting partial data 2019-01-28 19:35:20 +00:00
moneromooo-monero b7441c4a32
core, wallet: remember original text version of destination address 2019-01-18 16:58:47 +00:00
moneromooo-monero d7354c7864
wallet_rpc_server: add all field to export_key_images
To use if you want all key images, not just the ones for
recently imported outputs
2018-12-24 13:00:29 +00:00
moneromooo-monero aee7a4e364
wallet_rpc_server: do not use RPC data if the call failed
Found by codacy.com
2018-11-23 15:38:00 +00:00
Riccardo Spagni 056abf980e
Merge pull request #4801
7ae36e91 wallet_rpc_server: account for watch-only/non-deterministic/multisig when querying seed (stoffu)
2018-11-16 11:13:09 +02:00
Riccardo Spagni 4561119846
Merge pull request #4784
1c04c21d wallet_rpc_server: include additional tx keys in sign_transfer response (stoffu)
2018-11-16 11:05:31 +02:00
Riccardo Spagni dd42b642ee
Merge pull request #4746
f3019efe wallet-rpc: add on_restore_deterministic RPC call. (Hasan Pekdemir)
2018-11-14 21:31:08 +02:00
Riccardo Spagni 164ba3ef1c
Merge pull request #4731
f26ce08c wallet: add a non destructive blockchain rescan (moneromooo-monero)
2018-11-06 21:30:12 +02:00
stoffu 7ae36e91f6
wallet_rpc_server: account for watch-only/non-deterministic/multisig when querying seed
Followup on #4653
2018-11-05 12:13:15 +09:00
moneromooo-monero 8d71b2b1b3
wallet2: only export necessary outputs and key images
and disable annoying test that requires ridiculous amounts
of skullduggery every time some format changes
2018-11-04 22:27:01 +00:00
moneromooo-monero f26ce08c8a
wallet: add a non destructive blockchain rescan 2018-11-03 15:04:37 +00:00
stoffu 1c04c21d6e
wallet_rpc_server: include additional tx keys in sign_transfer response
Followup on #4552
2018-11-02 21:42:02 +09:00
Riccardo Spagni 3ceeac50da
Merge pull request #4653
ade369f9 Add RPC error code for non-deterministic wallet (Michał Sałaban)
2018-11-01 22:33:20 +02:00
Hasan Pekdemir f3019efe1b wallet-rpc: add on_restore_deterministic RPC call. 2018-10-29 18:19:42 +01:00
Riccardo Spagni c761bee764
Merge pull request #4561
04ddf02e Return appropriate RPC error code when key image signature check fails (Michał Sałaban)
2018-10-26 22:33:35 +02:00
Riccardo Spagni 169e6e9074
Merge pull request #4552
67e76aa0 wallet_rpc_server: optionally return tx keys in sign_transfer (moneromooo-monero)
2018-10-26 22:32:34 +02:00
Riccardo Spagni 659cf52a61
Merge pull request #4539
977fc1bc wallet_rpc_server: add describe_transfer RPC (moneromooo-monero)
2018-10-26 22:20:57 +02:00
Michał Sałaban ade369f96f Add RPC error code for non-deterministic wallet 2018-10-18 23:14:06 +02:00
moneromooo-monero 99d45a9578
wallet_rpc_server: fix change_wallet_password RPC 2018-10-16 15:19:05 +00:00
Michał Sałaban 04ddf02e3a Return appropriate RPC error code when key image signature check fails 2018-10-11 18:12:17 +02:00
moneromooo-monero 67e76aa06c
wallet_rpc_server: optionally return tx keys in sign_transfer 2018-10-10 15:55:35 +00:00
moneromooo-monero 977fc1bceb
wallet_rpc_server: add describe_transfer RPC
for unsigned tx sets using a view only wallet
2018-10-09 10:47:32 +00:00