diff options
author | Rasmus Dahlberg <rasmus.dahlberg@kau.se> | 2020-10-23 18:01:10 +0200 |
---|---|---|
committer | Rasmus Dahlberg <rasmus.dahlberg@kau.se> | 2020-10-23 18:01:10 +0200 |
commit | 9b38f5a034486c27eaf81062ecdd86a72667e2b0 (patch) | |
tree | f2c7a4e4c485214f81aa66882ea69f93c1aa85d1 /handler.go | |
parent | 7d62710808a38102c09c4f18b1309bf63051db5e (diff) |
added basic trust-anchor code path
Pretty much the bare minimum to load trust anchors from file and check
that the submitter's certificate chains back to something valid.
Diffstat (limited to 'handler.go')
-rw-r--r-- | handler.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -50,7 +50,7 @@ func addEntry(ctx context.Context, i *instance, w http.ResponseWriter, r *http.R return http.StatusBadRequest, err } // request can be decoded - leaf, err := VerifyAddEntryRequest(request) + leaf, err := VerifyAddEntryRequest(i.anchors, request) if err != nil { return http.StatusBadRequest, err } // leaf is valid, e.g., signed by a trust anchor @@ -65,7 +65,7 @@ func addEntry(ctx context.Context, i *instance, w http.ResponseWriter, r *http.R trillianResponse, err := i.client.QueueLeaf(ctx, &trillianRequest) if err != nil { return http.StatusInternalServerError, fmt.Errorf("backend QueueLeaf request failed: %v", err) - } // note: more detail could be provided here, see addChainInternal in ctfe + } // 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 |