Commit 2e840e79 authored by Stephane Glondu's avatar Stephane Glondu

Use a custom uuid type so that string_of_uuid is trivial

parent fa68bc93
......@@ -355,7 +355,7 @@ let loadElection () =
let params = P.election.e_params in
setNodeById "election_name" params.e_name;
setNodeById "election_description" params.e_description;
setNodeById "election_uuid" (Uuidm.to_string params.e_uuid);
setNodeById "election_uuid" (string_of_uuid params.e_uuid);
setNodeById "election_fingerprint" P.election.e_fingerprint;
withElementById "intro" (fun e ->
let b = createStartButton election_params e params.e_questions in
......
......@@ -19,6 +19,7 @@
(* <http://www.gnu.org/licenses/>. *)
(**************************************************************************)
open Serializable_builtin_t
open Platform
open Signatures
......@@ -78,7 +79,7 @@ let remove_dashes x =
module MakeDerive (G : GROUP) = struct
let derive uuid x =
let salt = remove_dashes (Uuidm.to_string uuid) in
let salt = remove_dashes (string_of_uuid uuid) in
let derived = pbkdf2_hex ~iterations:1000 ~salt x in
Z.(of_string_base 16 derived mod G.q)
......
......@@ -19,6 +19,7 @@
(* <http://www.gnu.org/licenses/>. *)
(**************************************************************************)
open Serializable_builtin_t
open Platform
open Signatures
......@@ -29,5 +30,5 @@ end
val check : string -> bool
module MakeDerive (G : GROUP) : sig
val derive : Uuidm.t -> string -> Z.t
val derive : uuid -> string -> Z.t
end
......@@ -42,14 +42,9 @@ let read_number = make_read "read_number" Z.of_string
(** {1 Serializers for type uuid} *)
let write_uuid = make_write Uuidm.to_string
let write_uuid = make_write string_of_uuid
let raw_uuid_of_string x =
match Uuidm.of_string x with
| Some s -> s
| _ -> invalid_arg "uuid_of_string: invalid UUID"
let read_uuid = make_read "read_uuid" raw_uuid_of_string
let read_uuid = make_read "read_uuid" uuid_of_string
(** {1 Serializers for type int_or_null} *)
......
......@@ -22,9 +22,16 @@
open Platform
type number = Z.t
type uuid = Uuidm.t
type uuid = string
type int_or_null = int option
let uuid_of_string x =
match Uuidm.of_string x with
| Some s -> Uuidm.to_string s
| None -> Printf.ksprintf invalid_arg "%S is not a valid UUID" x
let string_of_uuid x = x
module SSet = Set.Make(String)
type string_set = SSet.t
......@@ -22,9 +22,12 @@
open Platform
type number = Z.t
type uuid = Uuidm.t
type uuid
type int_or_null = int option
val uuid_of_string : string -> uuid
val string_of_uuid : uuid -> string
module SSet : Set.S with type elt = string
type string_set = SSet.t
......@@ -19,6 +19,7 @@
(* <http://www.gnu.org/licenses/>. *)
(**************************************************************************)
open Serializable_builtin_t
open Platform
open Signatures
open Common
......@@ -34,17 +35,14 @@ module type S = sig
end
module type PARSED_PARAMS = sig
val uuid : Uuidm.t
val uuid : uuid
module G : GROUP
end
let parse_params p =
let module P = (val p : PARAMS) in
let module R = struct
let uuid =
match Uuidm.of_string P.uuid with
| Some u -> u
| None -> Printf.ksprintf failwith "%s is not a valid UUID" P.uuid
let uuid = uuid_of_string P.uuid
module G = (val Group.of_string P.group : GROUP)
end
in (module R : PARSED_PARAMS)
......
......@@ -36,7 +36,7 @@ module type S = sig
end
module type PARSED_PARAMS = sig
val uuid : Uuidm.t
val uuid : uuid
val template : template
module G : GROUP
val get_public_keys : unit -> G.t trustee_public_key array option
......@@ -46,10 +46,7 @@ end
let parse_params p =
let module P = (val p : PARAMS) in
let module R = struct
let uuid =
match Uuidm.of_string P.uuid with
| Some u -> u
| None -> Printf.ksprintf failwith "%s is not a valid UUID" P.uuid
let uuid = uuid_of_string P.uuid
let template = template_of_string P.template
module G = (val Group.of_string P.group : GROUP)
let get_public_keys () =
......
......@@ -37,7 +37,7 @@ let configure x =
auth_instance, (auth_system, List.map snd auth_config)
) x
in
Web_persist.set_auth_config "" auth_config |> Lwt_main.run;
Web_persist.set_auth_config None auth_config |> Lwt_main.run;
List.iter (fun {auth_system; auth_config; _} ->
match auth_system with
| "password" ->
......@@ -95,9 +95,7 @@ let password_handler () (name, password) =
"password_" ^
match uuid with
| None -> "site"
| Some u ->
let u = Uuidm.to_string u in
underscorize u
| Some u -> underscorize u
in
let table = Ocsipersist.open_table table in
let%lwt salt, hashed =
......@@ -330,11 +328,7 @@ let login_handler service uuid =
cont_push (fun () -> Eliom_registration.Redirection.send (myself service)) >>
Web_templates.already_logged_in () >>= Eliom_registration.Html5.send
| None ->
let uuid_or_empty = match uuid with
| None -> ""
| Some u -> Uuidm.to_string u
in
let%lwt c = Web_persist.get_auth_config uuid_or_empty in
let%lwt c = Web_persist.get_auth_config uuid in
match service with
| Some s ->
let%lwt auth_system, config =
......
......@@ -162,15 +162,8 @@ let election_file = Eliom_parameter.user_type
~of_string:election_file_of_string
~to_string:string_of_election_file
let uuid_of_string x =
match Uuidm.of_string x with
| Some x -> x
| None -> Printf.ksprintf invalid_arg "invalid UUID [%s]" x
let uuid =
let of_string x = uuid_of_string x
and to_string x = Uuidm.to_string x
in Eliom_parameter.user_type ~of_string ~to_string
Eliom_parameter.user_type ~of_string:uuid_of_string ~to_string:string_of_uuid
let b58_digits = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
let token_length = 14
......@@ -198,7 +191,7 @@ let string_of_user {user_domain; user_name} =
user_domain ^ ":" ^ user_name
let underscorize x =
String.map (function '-' -> '_' | c -> c) x
String.map (function '-' -> '_' | c -> c) (string_of_uuid x)
let send_email recipient subject body =
let contents =
......
......@@ -78,19 +78,17 @@ val election_file :
[ `One of election_file ] Eliom_parameter.param_name)
Eliom_parameter.params_type
val uuid_of_string : string -> Uuidm.t
val uuid :
string ->
(Uuidm.t, [ `WithoutSuffix ],
[ `One of Uuidm.t ] Eliom_parameter.param_name)
(uuid, [ `WithoutSuffix ],
[ `One of uuid ] Eliom_parameter.param_name)
Eliom_parameter.params_type
val generate_token : unit -> string Lwt.t
val string_of_user : user -> string
val underscorize : string -> string
val underscorize : uuid -> string
val send_email : string -> string -> string -> unit Lwt.t
......
......@@ -32,7 +32,7 @@ let ( / ) = Filename.concat
module Make (D : ELECTION_DATA) (M : RANDOM with type 'a t = 'a Lwt.t) : WEB_ELECTION = struct
let uuid = Uuidm.to_string D.election.e_params.e_uuid
let uuid = D.election.e_params.e_uuid
module G = D.G
module E = Election.MakeElection (G) (M)
......@@ -67,7 +67,7 @@ module Make (D : ELECTION_DATA) (M : RANDOM with type 'a t = 'a Lwt.t) : WEB_ELE
send_email email subject body
let do_cast rawballot (user, date) =
let voters = Lwt_io.lines_of_file (!spool_dir / uuid / "voters.txt") in
let voters = Lwt_io.lines_of_file (!spool_dir / string_of_uuid uuid / "voters.txt") in
let%lwt voters = Lwt_stream.to_list voters in
let%lwt email, login =
let rec loop = function
......@@ -157,7 +157,7 @@ module Make (D : ELECTION_DATA) (M : RANDOM with type 'a t = 'a Lwt.t) : WEB_ELE
Ocsipersist.add cred_table new_ None
let do_write f =
Lwt_io.(with_file ~mode:Output (!spool_dir / uuid / string_of_election_file f))
Lwt_io.(with_file ~mode:Output (!spool_dir / string_of_uuid uuid / string_of_election_file f))
let do_write_ballots () =
do_write ESBallots (fun oc ->
......
......@@ -30,7 +30,7 @@ let ( / ) = Filename.concat
let get_election_result uuid =
try%lwt
Lwt_io.chars_of_file (!spool_dir / uuid / "result.json") |>
Lwt_io.chars_of_file (!spool_dir / string_of_uuid uuid / "result.json") |>
Lwt_stream.to_string >>= fun x ->
return @@ Some (result_of_string (Yojson.Safe.from_lexbuf ~stream:true) x)
with _ -> return_none
......@@ -46,23 +46,23 @@ type election_state =
let election_states = Ocsipersist.open_table "election_states"
let get_election_state x =
try%lwt Ocsipersist.find election_states x
try%lwt Ocsipersist.find election_states (string_of_uuid x)
with Not_found -> return `Archived
let set_election_state x s =
Ocsipersist.add election_states x s
Ocsipersist.add election_states (string_of_uuid x) s
let past = datetime_of_string "\"2015-10-01 00:00:00.000000\""
let set_election_date uuid d =
let dates = { e_finalization = d } in
Lwt_io.(with_file Output (!spool_dir / uuid / "dates.json") (fun oc ->
Lwt_io.(with_file Output (!spool_dir / string_of_uuid uuid / "dates.json") (fun oc ->
write_line oc (string_of_election_dates dates)
))
let get_election_date uuid =
try%lwt
Lwt_io.chars_of_file (!spool_dir / uuid / "dates.json") |>
Lwt_io.chars_of_file (!spool_dir / string_of_uuid uuid / "dates.json") |>
Lwt_stream.to_string >>= fun x ->
let dates = election_dates_of_string x in
return dates.e_finalization
......@@ -72,24 +72,28 @@ let get_election_date uuid =
let election_pds = Ocsipersist.open_table "election_pds"
let get_partial_decryptions x =
try%lwt Ocsipersist.find election_pds x
try%lwt Ocsipersist.find election_pds (string_of_uuid x)
with Not_found -> return []
let set_partial_decryptions x pds =
Ocsipersist.add election_pds x pds
Ocsipersist.add election_pds (string_of_uuid x) pds
let auth_configs = Ocsipersist.open_table "auth_configs"
let key_of_uuid_option = function
| None -> ""
| Some x -> string_of_uuid x
let get_auth_config x =
try%lwt Ocsipersist.find auth_configs x
try%lwt Ocsipersist.find auth_configs (key_of_uuid_option x)
with Not_found -> return []
let set_auth_config x c =
Ocsipersist.add auth_configs x c
Ocsipersist.add auth_configs (key_of_uuid_option x) c
let get_raw_election uuid =
try%lwt
let lines = Lwt_io.lines_of_file (!spool_dir / uuid / "election.json") in
let lines = Lwt_io.lines_of_file (!spool_dir / string_of_uuid uuid / "election.json") in
begin match%lwt Lwt_stream.to_list lines with
| x :: _ -> return @@ Some x
| [] -> return_none
......@@ -108,31 +112,39 @@ let return_empty_metadata = return empty_metadata
let get_election_metadata uuid =
try%lwt
Lwt_io.chars_of_file (!spool_dir / uuid / "metadata.json") |>
Lwt_io.chars_of_file (!spool_dir / string_of_uuid uuid / "metadata.json") |>
Lwt_stream.to_string >>= fun x ->
return @@ metadata_of_string x
with _ -> return_empty_metadata
let get_elections_by_owner user =
Lwt_unix.files_of_directory !spool_dir |>
Lwt_stream.filter_s (fun x ->
if x = "." || x = ".." then return false else
let%lwt metadata = get_election_metadata x in
match metadata.e_owner with
| Some o -> return (o = user)
| None -> return false
) |> Lwt_stream.to_list
Lwt_stream.filter_map_s
(fun x ->
if x = "." || x = ".." then
return None
else (
try
let uuid = uuid_of_string x in
let%lwt metadata = get_election_metadata uuid in
match metadata.e_owner with
| Some o when o = user -> return (Some uuid)
| _ -> return None
with _ -> return None
)
) |>
Lwt_stream.to_list
let get_voters uuid =
try%lwt
let lines = Lwt_io.lines_of_file (!spool_dir / uuid / "voters.txt") in
let lines = Lwt_io.lines_of_file (!spool_dir / string_of_uuid uuid / "voters.txt") in
let%lwt lines = Lwt_stream.to_list lines in
return @@ Some lines
with _ -> return_none
let get_passwords uuid =
let csv =
try Some (Csv.load (!spool_dir / uuid / "passwords.csv"))
try Some (Csv.load (!spool_dir / string_of_uuid uuid / "passwords.csv"))
with _ -> None
in
match csv with
......@@ -148,21 +160,21 @@ let get_passwords uuid =
let get_public_keys uuid =
try%lwt
let lines = Lwt_io.lines_of_file (!spool_dir / uuid / "public_keys.jsons") in
let lines = Lwt_io.lines_of_file (!spool_dir / string_of_uuid uuid / "public_keys.jsons") in
let%lwt lines = Lwt_stream.to_list lines in
return @@ Some lines
with _ -> return_none
let get_private_keys uuid =
try%lwt
let lines = Lwt_io.lines_of_file (!spool_dir / uuid / "private_keys.jsons") in
let lines = Lwt_io.lines_of_file (!spool_dir / string_of_uuid uuid / "private_keys.jsons") in
let%lwt lines = Lwt_stream.to_list lines in
return @@ Some lines
with _ -> return_none
let get_threshold uuid =
try%lwt
Lwt_io.chars_of_file (!spool_dir / uuid / "threshold.json") |>
Lwt_io.chars_of_file (!spool_dir / string_of_uuid uuid / "threshold.json") |>
Lwt_stream.to_string >>= fun x ->
return (Some x)
with _ -> return_none
......@@ -170,7 +182,7 @@ let get_threshold uuid =
module Ballots = Map.Make (String)
module BallotsCacheTypes = struct
type key = string
type key = uuid
type value = string Ballots.t
end
......@@ -178,7 +190,7 @@ module BallotsCache = Ocsigen_cache.Make (BallotsCacheTypes)
let raw_get_ballots_archived uuid =
try%lwt
let ballots = Lwt_io.lines_of_file (!spool_dir / uuid / "ballots.jsons") in
let ballots = Lwt_io.lines_of_file (!spool_dir / string_of_uuid uuid / "ballots.jsons") in
Lwt_stream.fold (fun b accu ->
let hash = sha256_b64 b in
Ballots.add hash b accu
......@@ -188,7 +200,7 @@ let raw_get_ballots_archived uuid =
let archived_ballots_cache =
new BallotsCache.cache raw_get_ballots_archived 10
let get_ballot_hashes ~uuid =
let get_ballot_hashes uuid =
match%lwt get_election_state uuid with
| `Archived ->
let%lwt ballots = archived_ballots_cache#find uuid in
......@@ -199,7 +211,7 @@ let get_ballot_hashes ~uuid =
return (hash :: accu)
) table [] >>= (fun x -> return @@ List.rev x)
let get_ballot_by_hash ~uuid ~hash =
let get_ballot_by_hash uuid hash =
match%lwt get_election_state uuid with
| `Archived ->
let%lwt ballots = archived_ballots_cache#find uuid in
......
......@@ -30,29 +30,29 @@ type election_state =
| `Tallied of plaintext
| `Archived
]
val get_election_state : string -> election_state Lwt.t
val set_election_state : string -> election_state -> unit Lwt.t
val get_election_state : uuid -> election_state Lwt.t
val set_election_state : uuid -> election_state -> unit Lwt.t
val get_election_date : string -> datetime Lwt.t
val set_election_date : string -> datetime -> unit Lwt.t
val get_election_date : uuid -> datetime Lwt.t
val set_election_date : uuid -> datetime -> unit Lwt.t
val get_partial_decryptions : string -> (int * string) list Lwt.t
val set_partial_decryptions : string -> (int * string) list -> unit Lwt.t
val get_partial_decryptions : uuid -> (int * string) list Lwt.t
val set_partial_decryptions : uuid -> (int * string) list -> unit Lwt.t
val get_auth_config : string -> (string * (string * string list)) list Lwt.t
val set_auth_config : string -> (string * (string * string list)) list -> unit Lwt.t
val get_auth_config : uuid option -> (string * (string * string list)) list Lwt.t
val set_auth_config : uuid option -> (string * (string * string list)) list -> unit Lwt.t
val get_raw_election : string -> string option Lwt.t
val get_election_metadata : string -> metadata Lwt.t
val get_election_result : string -> Yojson.Safe.json result option Lwt.t
val get_raw_election : uuid -> string option Lwt.t
val get_election_metadata : uuid -> metadata Lwt.t
val get_election_result : uuid -> Yojson.Safe.json result option Lwt.t
val get_elections_by_owner : user -> string list Lwt.t
val get_elections_by_owner : user -> uuid list Lwt.t
val get_voters : string -> string list option Lwt.t
val get_passwords : string -> (string * string) SMap.t option Lwt.t
val get_public_keys : string -> string list option Lwt.t
val get_private_keys : string -> string list option Lwt.t
val get_threshold : string -> string option Lwt.t
val get_voters : uuid -> string list option Lwt.t
val get_passwords : uuid -> (string * string) SMap.t option Lwt.t
val get_public_keys : uuid -> string list option Lwt.t
val get_private_keys : uuid -> string list option Lwt.t
val get_threshold : uuid -> string option Lwt.t
val get_ballot_hashes : uuid:string -> string list Lwt.t
val get_ballot_by_hash : uuid:string -> hash:string -> string option Lwt.t
val get_ballot_hashes : uuid -> string list Lwt.t
val get_ballot_by_hash : uuid -> string -> string option Lwt.t
This diff is collapsed.
......@@ -23,7 +23,7 @@ open Lwt
open Web_serializable_t
type user = {
uuid: Uuidm.t option;
uuid: uuid option;
service : string;
name : string;
}
......@@ -53,7 +53,7 @@ let get_election_user uuid =
match u.uuid with
| None -> return None
| Some uuid' ->
if Uuidm.equal uuid uuid' then
if uuid = uuid' then
return @@ Some {
user_domain = u.service;
user_name = u.name
......
......@@ -19,10 +19,11 @@
(* <http://www.gnu.org/licenses/>. *)
(**************************************************************************)
open Serializable_builtin_t
open Web_signatures
type user = {
uuid: Uuidm.t option;
uuid: uuid option;
service : string;
name : string;
}
......@@ -31,7 +32,7 @@ val show_cookie_disclaimer : bool Eliom_reference.eref
val user : user option Eliom_reference.eref
val get_site_user : unit -> Web_serializable_t.user option Lwt.t
val get_election_user : Uuidm.t -> Web_serializable_t.user option Lwt.t
val get_election_user : uuid -> Web_serializable_t.user option Lwt.t
val cont : (unit -> content) list Eliom_reference.eref
val cont_push : (unit -> content) -> unit Lwt.t
......
......@@ -89,7 +89,7 @@ end
module Site_auth = struct
let get_user () = Web_state.get_site_user ()
let get_auth_systems () =
let%lwt l = Web_persist.get_auth_config "" in
let%lwt l = Web_persist.get_auth_config None in
return (List.map fst l)
end
......@@ -992,7 +992,7 @@ let election_setup_credentials token uuid se () =
~a:[a_style "display:none;"]
[
div [pcdata "UUID:"];
div [unsafe_textarea "uuid" (Uuidm.to_string uuid)];
div [unsafe_textarea "uuid" (string_of_uuid uuid)];
div [pcdata "Group parameters:"];
div [unsafe_textarea "group" se.se_group];
]
......@@ -1184,13 +1184,13 @@ let election_setup_importer ~service ~title uuid (elections, tallied, archived)
let format_election election =
let module W = (val election : ELECTION_DATA) in
let name = W.election.e_params.e_name in
let uuid_s = Uuidm.to_string W.election.e_params.e_uuid in
let uuid_s = string_of_uuid W.election.e_params.e_uuid in
let form = post_form ~service
(fun from ->
[
div [pcdata name; pcdata " ("; pcdata uuid_s; pcdata ")"];
div [
user_type_input Uuidm.to_string
user_type_input string_of_uuid
~input_type:`Hidden
~name:from
~value:W.election.e_params.e_uuid ();
......@@ -1321,8 +1321,7 @@ let election_login_box w =
let get_user () =
Web_state.get_election_user W.election.e_params.e_uuid
let get_auth_systems () =
let uuid_s = Uuidm.to_string W.election.e_params.e_uuid in
let%lwt l = Web_persist.get_auth_config uuid_s in
let%lwt l = Web_persist.get_auth_config (Some W.election.e_params.e_uuid) in
return @@ List.map fst l
end in
let auth = (module A : AUTH_SERVICES) in
......@@ -1347,9 +1346,8 @@ let audit_footer w =
let%lwt language = Eliom_reference.get Web_state.language in
let module L = (val Web_i18n.get_lang language) in
let module W = (val w : ELECTION_DATA) in
let uuid_s = Uuidm.to_string W.election.e_params.e_uuid in
let%lwt pk_or_tp =
match%lwt Web_persist.get_threshold uuid_s with
match%lwt Web_persist.get_threshold W.election.e_params.e_uuid with
| None ->
return (a ~service:(file w ESKeys) [
pcdata L.trustee_public_keys
......@@ -1455,8 +1453,7 @@ let election_home w state () =
]
in
let%lwt middle =
let uuid = Uuidm.to_string params.e_uuid in
let%lwt result = Web_persist.get_election_result uuid in
let%lwt result = Web_persist.get_election_result params.e_uuid in
match result with
| Some r ->
let result = r.result in
......@@ -1549,7 +1546,6 @@ Thank you again for your help,
let election_admin w metadata state get_tokens_decrypt () =
let module W = (val w : ELECTION_DATA) in
let title = W.election.e_params.e_name ^ " — Administration" in
let uuid_s = Uuidm.to_string W.election.e_params.e_uuid in
let state_form checked =
let service, value, msg =
if checked then
......@@ -1588,8 +1584,8 @@ let election_admin w metadata state get_tokens_decrypt () =
]) (W.election.e_params.e_uuid, ());
]
| `EncryptedTally (npks, _, hash) ->
let%lwt pds = Web_persist.get_partial_decryptions uuid_s in
let%lwt tp = Web_persist.get_threshold uuid_s in
let%lwt pds = Web_persist.get_partial_decryptions W.election.e_params.e_uuid in
let%lwt tp = Web_persist.get_threshold W.election.e_params.e_uuid in
let tp =
match tp with
| None -> None
......@@ -2063,7 +2059,7 @@ let tally_trustees w trustee_id token () =
params.e_name ^ " — Partial decryption #" ^ string_of_int trustee_id
in
let%lwt encrypted_private_key =
match%lwt Web_persist.get_private_keys (Uuidm.to_string params.e_uuid) with
match%lwt Web_persist.get_private_keys params.e_uuid with
| None -> return_none
| Some keys -> return (Some (List.nth keys (trustee_id-1)))
in
......@@ -2192,7 +2188,7 @@ let login_password () =
] in
base ~title:L.password_login ~content ()
let booth () =
let booth uuid =
let%lwt language = Eliom_reference.get Web_state.language in
let module L = (val Web_i18n.get_lang language) in
let head = head (title (pcdata L.belenios_booth)) [
......@@ -2239,7 +2235,7 @@ let booth () =
string_input ~input_type:`Submit ~value:L.continue ~a:[a_style "font-size:30px;"] ();
br (); br ();
])
(Uuidm.nil, ())
(uuid, ())
in
let main =
div ~a:[a_id "main"] [
......
......@@ -23,7 +23,7 @@ open Serializable_t
open Web_serializable_t
open Signatures
val admin : elections:((module ELECTION_DATA) list * (module ELECTION_DATA) list * (module ELECTION_DATA) list * (Uuidm.t * string) list) option -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val admin : elections:((module ELECTION_DATA) list * (module ELECTION_DATA) list * (module ELECTION_DATA) list * (uuid * string) list) option -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val new_election_failure : [ `Exists | `Exception of exn ] -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
......@@ -37,23 +37,23 @@ val generic_page : title:string ->
string -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_pre : unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup : Uuidm.t -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_voters : Uuidm.t -> setup_election -> int -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_questions : Uuidm.t -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_credential_authority : Uuidm.t -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_credentials : string -> Uuidm.t -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_trustees : Uuidm.t -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_threshold_trustees : Uuidm.t -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_trustee : string -> Uuidm.t -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_threshold_trustee : string -> Uuidm.t -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_import : Uuidm.t -> setup_election -> (module ELECTION_DATA) list * (module ELECTION_DATA) list * (module ELECTION_DATA) list -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_import_trustees : Uuidm.t -> setup_election -> (module ELECTION_DATA) list * (module ELECTION_DATA) list * (module ELECTION_DATA) list -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_confirm : Uuidm.t -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup : uuid -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_voters : uuid -> setup_election -> int -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_questions : uuid -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_credential_authority : uuid -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_credentials : string -> uuid -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_trustees : uuid -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_threshold_trustees : uuid -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_trustee : string -> uuid -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_threshold_trustee : string -> uuid -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_import : uuid -> setup_election -> (module ELECTION_DATA) list * (module ELECTION_DATA) list * (module ELECTION_DATA) list -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_import_trustees : uuid -> setup_election -> (module ELECTION_DATA) list * (module ELECTION_DATA) list * (module ELECTION_DATA) list -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_confirm : uuid -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_home : (module ELECTION_DATA) -> Web_persist.election_state -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_admin : (module ELECTION_DATA) -> Web_serializable_j.metadata -> Web_persist.election_state -> (unit -> string list Lwt.t) -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val update_credential : (module ELECTION_DATA) -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val regenpwd : Uuidm.t -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val regenpwd : uuid -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val cast_raw : (module ELECTION_DATA) -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val cast_confirmation : (module ELECTION_DATA) -> string -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val cast_confirmed : (module ELECTION_DATA) -> result:[< `Error of Web_common.error | `Valid of string ] -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
......@@ -78,4 +78,4 @@ val login_choose :
val login_dummy : unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val login_password : unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val booth : unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val booth : uuid -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment