aboutsummaryrefslogtreecommitdiff
path: root/server/testdata/entry/README.md
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-10-26 23:48:36 +0100
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-10-26 23:48:36 +0100
commit550f7878bf509cc825726e6d95506e62857d48c9 (patch)
treecd8799f666e905e86c5292063685ab961d7e0ffd /server/testdata/entry/README.md
parentace94cc001e51ef52aebf34c1fe39ad0f3501981 (diff)
tested certificate chain code path further
Added more documentation and quick helper scripts for now. We need to specify which signature schemes we expect/support from submitters.
Diffstat (limited to 'server/testdata/entry/README.md')
-rw-r--r--server/testdata/entry/README.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/server/testdata/entry/README.md b/server/testdata/entry/README.md
new file mode 100644
index 0000000..0d26ca3
--- /dev/null
+++ b/server/testdata/entry/README.md
@@ -0,0 +1,21 @@
+# Create `item` and `signature` for the add-entry endpoint
+
+## Create a serialized `checksum_v1` entry
+The following creates a serialized `checksum_v1` StItem, such that the package
+name is `foobar-0.0.1` and the checksum `SHA256(foobar-0.0.1)`. The result is
+stored in the `stitem` directory as `foobar-0.0.1`.
+```
+$ go run . --logtostderr --name foobar-0.0.1 --dir stitem
+```
+
+## Sign the generated file using an end-entity certificate
+Let's use our ECDSA end-entity certificate using SHA256 as the hash function.
+```
+$ openssl dgst -sha256 -sign "../chain/rgdd-ecdsa.key" -out stitem/foobar-0.0.1.sig stitem/foobar-0.0.1
+```
+
+## Encode the resulting StItem and its signature as base-64
+```
+$ openssl base64 -A -in stitem/foobar-0.0.1 -out stitem/foobar-0.0.1.b64
+$ openssl base64 -A -in stitem/foobar-0.0.1.sig -out stitem/foobar-0.0.1.sig.b64
+```