pub fn fetch_keys(host: &str) -> Result<KeyDoc>removed at 1.0: fetch the key document with your own HTTP client and pass the response to keys_from_response
Expand description
Fetches https://<host>/.well-known/datumesh.json and checks it (9.2, 9.3).
Certificates are validated (Web PKI roots), no redirect is followed, and the request
times out after 10 seconds. A 200 with a valid document gives the keys; a 200 with an
invalid document is E_KEY_DOC; every other status (redirects included) and every
network, DNS, TLS or timeout failure is E_KEY_UNAVAILABLE. A host that is not a DNS
name is never fetched: it has no keys (E_KEY_UNAVAILABLE, 9.3).
Deprecated since 0.3.1; the fetch feature and this function are removed at 1.0. Fetch
https://<host>/.well-known/datumesh.json with your own HTTP client (no redirects,
validated certificates, a bounded body) and pass the status and body to
keys_from_response, or record a network failure with
Keys::insert_unavailable.