aboutsummaryrefslogtreecommitdiff
path: root/keyserver/inthttp/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'keyserver/inthttp/client.go')
-rw-r--r--keyserver/inthttp/client.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/keyserver/inthttp/client.go b/keyserver/inthttp/client.go
index 3f9690b5..b65cbdaf 100644
--- a/keyserver/inthttp/client.go
+++ b/keyserver/inthttp/client.go
@@ -31,6 +31,7 @@ const (
PerformClaimKeysPath = "/keyserver/performClaimKeys"
QueryKeysPath = "/keyserver/queryKeys"
QueryKeyChangesPath = "/keyserver/queryKeyChanges"
+ QueryOneTimeKeysPath = "/keyserver/queryOneTimeKeys"
)
// NewKeyServerClient creates a KeyInternalAPI implemented by talking to a HTTP POST API.
@@ -108,6 +109,23 @@ func (h *httpKeyInternalAPI) QueryKeys(
}
}
+func (h *httpKeyInternalAPI) QueryOneTimeKeys(
+ ctx context.Context,
+ request *api.QueryOneTimeKeysRequest,
+ response *api.QueryOneTimeKeysResponse,
+) {
+ span, ctx := opentracing.StartSpanFromContext(ctx, "QueryOneTimeKeys")
+ defer span.Finish()
+
+ apiURL := h.apiURL + QueryOneTimeKeysPath
+ err := httputil.PostJSON(ctx, span, h.httpClient, apiURL, request, response)
+ if err != nil {
+ response.Error = &api.KeyError{
+ Err: err.Error(),
+ }
+ }
+}
+
func (h *httpKeyInternalAPI) QueryKeyChanges(
ctx context.Context,
request *api.QueryKeyChangesRequest,