Commit Graph

7 Commits

Author SHA1 Message Date
Rusty Russell
17c56a8cfc Fix DER encoding.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-04 15:46:49 +09:30
Rusty Russell
a6d1c65683 Use new opt_usage_exit_fail().
opt_usage_and_exit() exits with status 0, and prints to stdout.
This exits status 1 and prints to stderr.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-04 14:15:19 +09:30
Rusty Russell
cf333e45e1 Fix thinko: open-commit-sig needs to sign *their* commit tx.
And check-commit-sig needs to check it against ours.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-03 13:58:23 +09:30
Rusty Russell
07c7214edb Explicit pubkey structure.
This checks that the protobuf is the right form, also handles uncompressed
keys (though you shouldn't be using those any more, should you?)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-02 11:53:59 +09:30
Rusty Russell
eec612af9f Use raw 64-byte signatures in protocol.
DER encoding introduces problems for non-canonical encodings; we should
do that only at the lightning<->bitcoin interface.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-01 13:04:00 +09:30
Rusty Russell
c04d20e019 commit_tx: new file containing logic to create initial commitment transaction.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-05-30 20:44:00 +09:30
Rusty Russell
bf38ca052e open-commit-sig: create signature for commit tx.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-05-30 20:12:14 +09:30