@@ -68,6 +68,13 @@ the format described by https://git.glasklar.is/sigsum/core/sigsum-go/-/blob/mai
6868
6969## Codelab
7070
71+ In this codelab, you'll bring a new TesseraCT POSIX instance up,
72+ and send certificate chains to it. These entries can either be
73+ preloaded from an existing RFC6962 log, or generated locally with
74+ the [ hammer tool] ( /internal/hammer ) .
75+
76+ ### Preloading
77+
7178Generate an ECDSA key like so:
7279
7380``` bash
@@ -107,3 +114,49 @@ Note that running this command a second time may show a lot of errors with
107114entries being sent to the log.
108115Use a larger ` start_index ` to avoid submitting duplicate entries and running into
109116this behaviour.
117+
118+ ### Hammer
119+
120+ Generate ECDSA public and private keys like so:
121+
122+ ``` bash
123+ openssl ecparam -name prime256v1 -genkey -noout -out /tmp/test-ecdsa-priv.pem
124+ openssl ec -in /tmp/test-ecdsa-priv.pem -pubout > /tmp/test-ecdsa-pub.pem
125+ ```
126+
127+ Then, start a log with the following command:
128+
129+ ``` bash
130+ go run ./cmd/tesseract/posix/ \
131+ --http_endpoint=0.0.0.0:6962 \
132+ --storage_dir=/tmp/ecdsa_log \
133+ --slog_level=-4 \
134+ --roots_pem_file=internal/hammer/testdata/test_root_ca_cert.pem \
135+ --origin=example.com/test-ecdsa \
136+ --private_key=/tmp/test-ecdsa-priv.pem \
137+ --checkpoint_interval=2s \
138+ --enable_publication_awaiter=false
139+ ```
140+
141+ In a different terminal, start the hammer:
142+
143+ ``` bash
144+ go run ./internal/hammer \
145+ --log_url=file:///tmp/ecdsa_log \
146+ --write_log_url=http://localhost:6962/ \
147+ --origin=example.com/test-ecdsa \
148+ --log_public_key=$( openssl ec -pubin -inform PEM -in /tmp/test-ecdsa-pub.pem -outform der | base64 -w 0) \
149+ --cert_sign_private_key_path=internal/hammer/testdata/test_leaf_cert_signing_private_key.pem \
150+ --intermediate_ca_cert_path=internal/hammer/testdata/test_intermediate_ca_cert.pem \
151+ --intermediate_ca_key_path=internal/hammer/testdata/test_intermediate_ca_private_key.pem \
152+ --max_read_ops=10 \
153+ --num_readers_random=2 \
154+ --num_readers_full=2 \
155+ --num_writers=500 \
156+ --max_write_ops=500 \
157+ --num_mmd_verifiers=1 \
158+ --mmd_duration=60s \
159+ --leaf_write_goal=4000 \
160+ --show_ui=true \
161+ --dup_chance=0.1
162+ ```
0 commit comments