github.com/mre-fog/trillianxx@v1.1.2-0.20180615153820-ae375a99d36a/examples/ct/ctmapper/README.md (about)

     1  # Example CT Mapper
     2  
     3  This is an example of a process which maps from a verifiable Log to a
     4  verifiable Map.
     5  It scans an RFC6962 CT Log server for certificate and precertificates,
     6  and adds entries to a Verifiable Map whose keys are SHA256(domainName), and
     7  whose values are a protobuf of indicies in the log where precerts/certs exist
     8  which have that domain in their subject/SAN fields.
     9  
    10  ## Running the example
    11  
    12  ```bash
    13  # Ensure you have your MySQL DB set up correctly, with tables created by the
    14  # contents of storage/mysql/storage.sql
    15  yes | scripts/resetdb.sh
    16  
    17  go build ./server/trillian_map_server
    18  go build ./examples/ct/ctmapper/mapper
    19  go build ./examples/ct/ctmapper/lookup
    20  
    21  # in one terminal:
    22  ./trillian_map_server --logtostderr
    23  
    24  # in another (leaving the trillian_map_server running):
    25  go build ./cmd/createtree/
    26  tree_id=$(./createtree \
    27      --admin_server=localhost:8090 \
    28      --hash_strategy=TEST_MAP_HASHER \
    29      --tree_type=MAP)
    30  echo "Created map with ID ${tree_id}"
    31  
    32  ./mapper \
    33      --logtostderr \
    34      --log_batch_size=10 \
    35      --map_id=${tree_id} \
    36      --map_server=localhost:8090 \
    37      --source=http://ct.googleapis.com/pilot
    38  ```
    39  
    40  You should then be able to look up domains in the map like so:
    41  
    42  ```bash
    43  ./lookup \
    44      --logtostderr \
    45      --map_id=${tree_id} \
    46      --map_server=localhost:8090 \
    47      mail.google.com www.langeoog.de  # etc. etc.
    48  ```