rfq: add tls support for price oracles
(Draft, for now, as the test suite still needs a little work.)
Adds TLS support for communication with price oracles, mostly following the suggestions proposed in #1278. Adds configuration options for skipping certificate verification, distrusting the operating system's root CA list, and using a custom certificate.
Resolves #1278.
Pull Request Test Coverage Report for Build 17361316751
Details
- 57 of 69 (82.61%) changed or added relevant lines in 5 files are covered.
- 35 unchanged lines in 9 files lost coverage.
- Overall coverage increased (+8.1%) to 56.705%
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
|---|---|---|---|
| rfq/tls.go | 23 | 25 | 92.0% |
| tapcfg/server.go | 3 | 6 | 50.0% |
| tapcfg/config.go | 26 | 33 | 78.79% |
| <!-- | Total: | 57 | 69 |
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| tapdb/addrs.go | 2 | 78.23% |
| tapdb/mssmt.go | 2 | 91.36% |
| tapgarden/custodian.go | 2 | 77.02% |
| itest/assertions.go | 3 | 89.08% |
| itest/multisig.go | 3 | 97.91% |
| proof/verifier.go | 3 | 86.82% |
| mssmt/compacted_tree.go | 4 | 80.0% |
| tapdb/assets_store.go | 7 | 79.61% |
| universe/archive.go | 9 | 80.05% |
| <!-- | Total: | 35 |
| Totals | |
|---|---|
| Change from base Build 17301129198: | 8.1% |
| Covered Lines: | 61073 |
| Relevant Lines: | 107703 |
💛 - Coveralls
(Changed this from draft; I think the litd tests are failing for an unrelated reason.)
(As pointed out by @ZZiigguurraatt, to be more precise: TLS support already existed for price oracles, but certificate verification was skipped entirely.)
@jtobin, remember to re-request review from reviewers when ready