[][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

leaf_hash_constructors

Turn some raw leaf data into leaf hash.

openssl_ffi

Because openssl crate is incomplete.

Structs

ConsistencyProofPart

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

FetchInclusionProofResult
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

Fetch the required inclusion proof from the server and see if it convinces us that leaf_hash is in the tree with hash tree_hash and size tree_size. On success, return the index number of the leaf corresponding with the hash.

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)

fetch_inclusion_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

Attempt to derive the root hash from the server provided inclusion proof and our calculated proof_parts.

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.)

verify_dss_raw

Verifies a raw, ASN.1 encoded signature.