core-lightning/common/test
Rusty Russell f7ebbb2ec5 common: make sphinx code ignorant of payload format.
Now "raw_payload" is always the complete string (including realm or length
bytes at the front).

This has several effects:
1. We can receive an decrypt an onion which is grossly malformed.
2. We can still hand this to the htlc_accepted hook.
3. We then fail it unless the htlc_accepted accepts it manually.
4. The createonion API now takes the raw payload, and does not know
   anything about "style".

The only caveat is that the sphinx code needs to know the payload
length: we have a call for that, which simply tells it to copy the
entire onion (and treat us as the final node) if it's invalid.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-12-09 14:33:31 +01:00
..
Makefile unit test: fix run-sphinx dependencies and update mocks 2019-11-26 21:25:25 +01:00
onion-test-v0.json sphinx: Introduce a runtest command to the onion tool 2019-07-30 02:14:49 +00:00
run-amount.c bitcoin/tx: use fromwire_fail in pull_bitcoin_tx. 2019-06-21 03:56:59 +00:00
run-bigsize.c elements: Add amount_asset to support more than just plain satoshis 2019-10-03 04:32:57 +00:00
run-bolt11.c common/bolt11: add secret support. 2019-11-24 23:33:17 +00:00
run-cryptomsg.c common: allow subdaemons to specify the node_id in status messages. 2019-11-18 04:50:22 +00:00
run-derive_basepoints.c elements: Add amount_asset to support more than just plain satoshis 2019-10-03 04:32:57 +00:00
run-features.c common/features: clean up feature handling for different cases. 2019-11-24 23:33:17 +00:00
run-funding_tx.c elements: Add amount_asset to support more than just plain satoshis 2019-10-03 04:32:57 +00:00
run-gossip_rcvd_filter.c elements: Add amount_asset to support more than just plain satoshis 2019-10-03 04:32:57 +00:00
run-ip_port_parsing.c elements: Add amount_asset to support more than just plain satoshis 2019-10-03 04:32:57 +00:00
run-json_remove.c elements: Add amount_asset to support more than just plain satoshis 2019-10-03 04:32:57 +00:00
run-json.c elements: Add amount_asset to support more than just plain satoshis 2019-10-03 04:32:57 +00:00
run-key_derive.c elements: Add amount_asset to support more than just plain satoshis 2019-10-03 04:32:57 +00:00
run-lock.c elements: Add amount_asset to support more than just plain satoshis 2019-10-03 04:32:57 +00:00
run-param.c param: Encapsulate hops parsing in a param_hops_array helper 2019-12-01 15:40:47 +01:00
run-softref.c utils: add set_softref() / clear_softref(). 2019-10-10 21:48:52 -05:00
run-sphinx.c common: make sphinx code ignorant of payload format. 2019-12-09 14:33:31 +01:00