[][src]Module ctclient::internal

Things that are only useful if you are doing your own API calling.

Note that the RFC calls inclusion proof "audit proof".

Modules

openssl_utils

Structs

ConsistencyProofPart

A subtree hash provided by the server in a consistency proof.

GetEntriesIter

An iterator over Result<Leaf, Error>.

Leaf

A parsed leaf.

Functions

check_consistency_proof

Fetch the consistency proof from prev_size to next_size from the server and verifies it, returning a Vec<ConsistencyProofPart> if successful, which can later be used to verify the integrity of certificates downloaded from the server later. An Err(...) is returned if the proof is invalid, or some network error happened during the request.

check_inclusion_proof
check_tree_head

Check, verify and return the latest tree head from the CT log at base_url.

consistency_proof_parts

Function used by verify_consistency_proof to construct a consistency proof client side (which is used to check against the server proof)

get_entries

Request leaf entries from the CT log. Does not verify if these entries are consistent with the tree or anything like that. Returns an iterator over the leaves.

get_json

Perform a GET request and parse the result as a JSON.

hash_inclusion_proof
inclusion_proof_parts

Returns an array of Range<u64>s. Each x..y denotes that this part of the proof should be the hash of the subtree formed by leafs with number [x, y).

new_http_client

Construct a new reqwest::Client to be used with the functions in this module. You don't necessary need to use this.

verify_consistency_proof

Verify that the consistency proof given by server_provided_proof gets us from perv_root to next_root, returning an Ok(Vec<ConsistencyProofPart>) if the proof checks, otherwise a Err(String) describing why the proof is invalid.

verify_dss

Verifies a TLS digitally-signed struct (see the TLS RFC for more info.)