diff options
author | Rasmus Dahlberg <rasmus.dahlberg@kau.se> | 2020-10-27 19:16:10 +0100 |
---|---|---|
committer | Rasmus Dahlberg <rasmus.dahlberg@kau.se> | 2020-10-27 19:16:10 +0100 |
commit | e7801b268c97c6b72bfcd76549ce5fd50ab0b1b5 (patch) | |
tree | 1eecf16a6b263750b0d480c3d966dff2f3072cfd /handler.go | |
parent | 13dd306e69b26ab8b7aedcd6ed915df4b6672a01 (diff) |
added ed25519 signing and SDIs
Diffstat (limited to 'handler.go')
-rw-r--r-- | handler.go | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -68,7 +68,18 @@ func addEntry(ctx context.Context, i *Instance, w http.ResponseWriter, r *http.R } // note: more detail could be provided here, see addChainInternal in ctfe glog.Infof("Queued leaf: %v", trillianResponse.QueuedLeaf.Leaf.LeafValue) - // TODO: respond with an SDI + sdi, err := GenV1SDI(i.LogParameters, trillianResponse.QueuedLeaf.Leaf.LeafValue) + if err != nil { + return http.StatusInternalServerError, fmt.Errorf("failed creating signed debug info: %v", err) + } + + response, err := NewAddEntryResponse(sdi) + if err != nil { + return http.StatusInternalServerError, fmt.Errorf("failed creating AddEntryResponse: %v", err) + } + if err := WriteJsonResponse(response, w); err != nil { + return http.StatusInternalServerError, err + } return http.StatusOK, nil } |