diff --git a/src/http_info.ml b/src/http_info.ml index 96d39db7..90e10dc2 100644 --- a/src/http_info.ml +++ b/src/http_info.ml @@ -103,15 +103,17 @@ let mk_keys ~db_conn (module Keys : Keys.S) ~last_issue_date = |> List.map Api.SignKey.of_signkey in - let exchange_pub = - (* the eddsa pub key used to sign exchange_sig *) + (* the eddsa pub key used to sign exchange_sig *) + let* exchange_pub = match signkeys with - | [] -> Fmt.failwith "exchange has no active signkey" - | sk :: _ -> sk.SignKey.key + | [] -> Fmt.error "exchange has no active signkey" + | sk :: _ -> Ok sk.SignKey.key in + + (* TODO *) + (* Compact eddsa signature over the contatentation of all of the master_sigs + (in reverse chronological order by group) in the arrays under "denominations" *) let exchange_sig = - (* Compact eddsa signature over the contatentation of all of the master_sigs - (in reverse chronological order by group) in the arrays under "denominations" *) let hc = denom_l |> List.map (fun dn -> dn.Denomination.master_sig) @@ -184,9 +186,7 @@ let keys req server _env = | [] -> Ok None | s :: _ -> ( match Int64.of_string_opt s with - | None -> - Error - "invalid `?last_issue_date` query param, int_of_string failure" + | None -> Error "invalid `?last_issue_date` query param, not an int" | Some n -> Ok (Some (Timestamp.of_s n))) in let* v = mk_keys ~db_conn keys ~last_issue_date in