From e7801b268c97c6b72bfcd76549ce5fd50ab0b1b5 Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Tue, 27 Oct 2020 19:16:10 +0100 Subject: added ed25519 signing and SDIs --- server/main.go | 3 ++- server/testdata/chain/stfe.key | 3 +++ server/testdata/cmd/add-entry | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 server/testdata/chain/stfe.key (limited to 'server') diff --git a/server/main.go b/server/main.go index 84d92ea..924cfc9 100644 --- a/server/main.go +++ b/server/main.go @@ -20,6 +20,7 @@ var ( trillianID = flag.Int64("trillian_id", 5991359069696313945, "log identifier in the Trillian database") rpcDeadline = flag.Duration("rpc_deadline", time.Second*10, "deadline for backend RPC requests") anchorPath = flag.String("anchor_path", "testdata/chain/rgdd-root.pem", "path to a file containing PEM-encoded X.509 root certificates") + keyPath = flag.String("key_path", "testdata/chain/stfe.key", "path to a PEM-encoded ed25519 signing key") ) func main() { @@ -37,7 +38,7 @@ func main() { mux := http.NewServeMux() http.Handle("/", mux) - lp, err := stfe.NewLogParameters([]byte("rgdd"), *trillianID, *prefix, *anchorPath) + lp, err := stfe.NewLogParameters(*trillianID, *prefix, *anchorPath, *keyPath) if err != nil { glog.Fatalf("failed setting up log parameters: %v", err) } diff --git a/server/testdata/chain/stfe.key b/server/testdata/chain/stfe.key new file mode 100644 index 0000000..ffc5df4 --- /dev/null +++ b/server/testdata/chain/stfe.key @@ -0,0 +1,3 @@ +-----BEGIN PRIVATE KEY----- +MC4CAQAwBQYDK2VwBCIEIAhqlhKgY/TiEyTIe5BcZKLELGa2kODtJ3S+oMP4JwsA +-----END PRIVATE KEY----- diff --git a/server/testdata/cmd/add-entry b/server/testdata/cmd/add-entry index 9efd3bf..d5b404d 100755 --- a/server/testdata/cmd/add-entry +++ b/server/testdata/cmd/add-entry @@ -31,3 +31,5 @@ popd >/dev/null info "sending add-entry request" curl --header "application/json" --request POST --data $json $base_url/add-entry +newline +# TODO: try decoding and verifying signature -- cgit v1.2.3