aboutsummaryrefslogtreecommitdiff
path: root/pkg/instance/instance.go
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus@mullvad.net>2021-12-14 22:56:15 +0100
committerRasmus Dahlberg <rasmus@mullvad.net>2021-12-14 23:06:35 +0100
commit4a4a4e17d159070ceb7ab7a580c8be6ad2c57e06 (patch)
tree0a174fa7fddf9689eded85b0cc4e1567dc431980 /pkg/instance/instance.go
parent30ac45b7d72b7c023c42d54e6d53b24810ed342b (diff)
instance: Add experimental checkpoint endpointv0.3.3
This commit adds an experimental endpoint that serves the log's to-sign tree head formatted as a signed checkpoint. See documentation at: https://github.com/transparency-dev/formats/tree/main/log#readme If we decide to adopt this endpoint we should consider in more detail what the origin string should be. Right now, it is assumed that the log's configured prefix is unique across the set of all sigsum logs. Example output: ``` $ echo "Public verification key: $vk" Public verification key: 8cf3ac85aadd42891c5ae9aef27244cb2a546a2312f80020aad3f2ae1af73314 $ $ echo "Formatted as a note key: $vkNote" Formatted as a note key: sigsum.org:testonly+8de2c54b+AYzzrIWq3UKJHFrprvJyRMsqVGojEvgAIKrT8q4a9zMU $ $ curl http://localhost:6965/testonly/sigsum/v0/get-checkpoint sigsum.org:testonly 23 HSt6W8ve4/36xAIf04qDOqaKLaKqSOUqKxLNrkK74+g= — sigsum.org:testonly jeLFS4WQDEeTavbiYArHzCQUPXbQ1Y/V8/dKJlBxqOAY4eLhSh3uWNJ8YXp1vs/zR4SDNHI+6UybLmHmFlg/VSf5OAs= ```
Diffstat (limited to 'pkg/instance/instance.go')
-rw-r--r--pkg/instance/instance.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg/instance/instance.go b/pkg/instance/instance.go
index bda553d..4dff31a 100644
--- a/pkg/instance/instance.go
+++ b/pkg/instance/instance.go
@@ -55,6 +55,7 @@ func (i *Instance) Handlers() []Handler {
Handler{Instance: i, Handler: getTreeHeadLatest, Endpoint: types.EndpointGetTreeHeadLatest, Method: http.MethodGet},
Handler{Instance: i, Handler: getTreeHeadToSign, Endpoint: types.EndpointGetTreeHeadToSign, Method: http.MethodGet},
Handler{Instance: i, Handler: getTreeHeadCosigned, Endpoint: types.EndpointGetTreeHeadCosigned, Method: http.MethodGet},
+ Handler{Instance: i, Handler: getCheckpoint, Endpoint: types.Endpoint("get-checkpoint"), Method: http.MethodGet},
Handler{Instance: i, Handler: getConsistencyProof, Endpoint: types.EndpointGetConsistencyProof, Method: http.MethodPost},
Handler{Instance: i, Handler: getInclusionProof, Endpoint: types.EndpointGetInclusionProof, Method: http.MethodPost},
Handler{Instance: i, Handler: getLeaves, Endpoint: types.EndpointGetLeaves, Method: http.MethodPost},