ctmapper

package
v1.3.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

README

Example CT Mapper

This is an example of a process which maps from a verifiable Log to a verifiable Map. It scans an RFC6962 CT Log server for certificate and precertificates, and adds entries to a Verifiable Map whose keys are SHA256(domainName), and whose values are a protobuf of indicies in the log where precerts/certs exist which have that domain in their subject/SAN fields.

Running the example

# Ensure you have your MySQL DB set up correctly, with tables created by the
# contents of storage/mysql/schema/storage.sql
yes | scripts/resetdb.sh

go build ./server/trillian_map_server
go build ./examples/ct/ctmapper/mapper
go build ./examples/ct/ctmapper/lookup

# in one terminal:
./trillian_map_server --logtostderr

# in another (leaving the trillian_map_server running):
go build ./cmd/createtree/
tree_id=$(./createtree \
    --admin_server=localhost:8090 \
    --hash_strategy=TEST_MAP_HASHER \
    --tree_type=MAP)
echo "Created map with ID ${tree_id}"

./mapper \
    --logtostderr \
    --log_batch_size=10 \
    --map_id=${tree_id} \
    --map_server=localhost:8090 \
    --source=http://ct.googleapis.com/pilot

You should then be able to look up domains in the map like so:

./lookup \
    --logtostderr \
    --map_id=${tree_id} \
    --map_server=localhost:8090 \
    mail.google.com www.langeoog.de  # etc. etc.

Documentation

Overview

Package ctmapper maps from a verifiable log to verifiable map.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashDomain

func HashDomain(key string) []byte

HashDomain converts a domain into a map index.

Types

This section is empty.

Directories

Path Synopsis
The lookup binary looks up a specific ID in a map.
The lookup binary looks up a specific ID in a map.
The mapper binary performs log->map mapping.
The mapper binary performs log->map mapping.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL