aboutsummaryrefslogtreecommitdiff
path: root/handler.go
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-10-27 11:55:53 +0100
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-10-27 11:55:53 +0100
commit09ae216893aa1e82df288a91f2f298d642ede57e (patch)
tree22e9067a25a81bf0fd2b2bc6d87365555c62b80c /handler.go
parent96a5021d586a20cbf00eb7f74ca08084bbaf048a (diff)
added leaf appendix
Diffstat (limited to 'handler.go')
-rw-r--r--handler.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/handler.go b/handler.go
index 42f9e23..e165a8f 100644
--- a/handler.go
+++ b/handler.go
@@ -50,16 +50,16 @@ func addEntry(ctx context.Context, i *instance, w http.ResponseWriter, r *http.R
return http.StatusBadRequest, err
} // request can be decoded
- leaf, err := VerifyAddEntryRequest(i.anchors, request)
+ leaf, appendix, err := VerifyAddEntryRequest(i.anchors, request)
if err != nil {
return http.StatusBadRequest, err
- } // leaf is valid, e.g., signed by a trust anchor
+ } // valid add-entry request
trillianRequest := trillian.QueueLeafRequest{
LogId: i.logID,
Leaf: &trillian.LogLeaf{
LeafValue: leaf,
- //TODO: add appendix here w/ chain + signature
+ ExtraData: appendix,
},
}
trillianResponse, err := i.client.QueueLeaf(ctx, &trillianRequest)
@@ -99,7 +99,7 @@ func getEntries(ctx context.Context, i *instance, w http.ResponseWriter, r *http
return http.StatusInternalServerError, fmt.Errorf("backend GetLeavesByRange returned unexpected leaf index: wanted %d, got %d", request.Start+int64(i), leaf.LeafIndex)
}
- glog.Infof("Entry(%d) => %v", request.Start+int64(i), leaf.GetLeafValue())
+ glog.Infof("Leaf(%d) => %v", request.Start+int64(i), leaf.GetLeafValue())
}
// TODO: use the returned root for tree_size santity checking against start?