Expand description
kute fetch: take a vocabulary from a kute serve --registry by its
digest, and keep it only if it is that vocabulary.
The registry is not trusted and neither is the network between. What
is asked for is named by the hash of its content, the hash is
recomputed here from what arrives, and with --trusted-key a
signature is checked as kute verify checks one. So a registry, or
anyone on the path, can refuse, stall or send something else, and
something else is not kept. It can also see what was asked for and
what was sent: the connection is plain HTTP.
The client is written on std::net like the service, with every
bound in this file: one request, a deadline for the whole exchange, a
cap on the header block and on the body.
Constants§
- LIST_
PATH - The registry routes, under the service’s
/v1/.
Functions§
- fetch
- Fetch the vocabulary with this digest, check it, and write it.
- is_
digest - A digest as the registry names files:
sha256:and 64 lowercase hex digits. Nothing else reaches a path. - list
- What the registry says it holds. Nothing in it is checked: it is the other side’s account, and a file is checked when it is fetched.