Refactor ctail+ctfetch into a common ctool
This commit is contained in:
@@ -5,28 +5,26 @@ Fetch and decode entries from a Static CT log, outputting structured JSON.
|
||||
## Install
|
||||
|
||||
```bash
|
||||
GOPRIVATE=git.ipng.ch go install git.ipng.ch/certificate-transparency/ctfetch/cmd/ctfetch@latest
|
||||
GOPRIVATE=git.ipng.ch go install git.ipng.ch/certificate-transparency/ctfetch/cmd/ctool@latest
|
||||
```
|
||||
|
||||
The `GOPRIVATE` variable skips the Go checksum database and module proxy, which do not index modules on `git.ipng.ch`.
|
||||
|
||||
## Modes
|
||||
|
||||
`ctfetch` operates in two modes depending on the arguments given.
|
||||
`ctool fetch` operates in two modes depending on the arguments given.
|
||||
|
||||
### Leaf-index mode
|
||||
|
||||
Fetch the entry at a specific leaf index:
|
||||
|
||||
```bash
|
||||
ctfetch [flags] <log-url> <leaf-index> [+sct] [+issuer] [+ctlog] [+all]
|
||||
ctool fetch [flags] <log-url> <leaf-index> [+sct] [+issuer] [+ctlog] [+all]
|
||||
```
|
||||
|
||||
Examples:
|
||||
|
||||
```bash
|
||||
ctfetch https://halloumi2026h1.mon.ct.ipng.ch 629794635
|
||||
ctfetch https://halloumi2026h1.mon.ct.ipng.ch 629794635 +all
|
||||
ctool fetch https://halloumi2026h1.mon.ct.ipng.ch 629794635
|
||||
ctool fetch https://halloumi2026h1.mon.ct.ipng.ch 629794635 +all
|
||||
```
|
||||
|
||||
### Tile-dump mode
|
||||
@@ -34,16 +32,16 @@ ctfetch https://halloumi2026h1.mon.ct.ipng.ch 629794635 +all
|
||||
Fetch all entries from a tile URL or local file. Automatically detects data tiles (log entries) and hash tiles (Merkle tree hashes).
|
||||
|
||||
```bash
|
||||
ctfetch [flags] <tile-url-or-file> [+sct] [+issuer] [+ctlog] [+all]
|
||||
ctool fetch [flags] <tile-url-or-file> [+sct] [+issuer] [+ctlog] [+all]
|
||||
```
|
||||
|
||||
Examples:
|
||||
|
||||
```bash
|
||||
ctfetch https://halloumi2026h1.mon.ct.ipng.ch/tile/data/x002/x460/135
|
||||
ctfetch https://halloumi2026h1.mon.ct.ipng.ch/tile/data/x002/x460/135 +sct +ctlog
|
||||
ctfetch https://halloumi2026h1.mon.ct.ipng.ch/tile/0/x100/999
|
||||
ctfetch --monitoring-url https://halloumi2026h1.mon.ct.ipng.ch tile.bin +issuer
|
||||
ctool fetch https://halloumi2026h1.mon.ct.ipng.ch/tile/data/x002/x460/135
|
||||
ctool fetch https://halloumi2026h1.mon.ct.ipng.ch/tile/data/x002/x460/135 +sct +ctlog
|
||||
ctool fetch https://halloumi2026h1.mon.ct.ipng.ch/tile/0/x100/999
|
||||
ctool fetch --monitoring-url https://halloumi2026h1.mon.ct.ipng.ch tile.bin +issuer
|
||||
```
|
||||
|
||||
## Output modifiers
|
||||
|
||||
Reference in New Issue
Block a user