Une MAJ de sécurité est nécessaire sur notre version actuelle. Elle sera effectuée lundi 02/08 entre 12h30 et 13h. L'interruption de service devrait durer quelques minutes (probablement moins de 5 minutes).

Commit 08c87e6a authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Rename Serializable.result into election_result

The name was conflicting with Pervasives.result.
parent dbfd371f
......@@ -564,7 +564,7 @@ module Make (W : ELECTION_DATA) (M : RANDOM) = struct
in Z.(hash zkp commitments =% challenge)
) c f.decryption_factors f.decryption_proofs
type result = elt Serializable_t.result
type result = elt Serializable_t.election_result
type combinator = factor list -> elt array array
......
......@@ -122,7 +122,7 @@ type plaintext = int list <ocaml repr="array"> list <ocaml repr="array">
type 'a encrypted_tally = 'a ciphertext list <ocaml repr="array"> list <ocaml repr="array">
type 'a result = {
type 'a election_result = {
num_tallied : int;
encrypted_tally : 'a encrypted_tally;
partial_decryptions : 'a partial_decryption list;
......
......@@ -207,7 +207,7 @@ module type ELECTION = sig
(** {2 Result} *)
type result = elt Serializable_t.result
type result = elt Serializable_t.election_result
(** The election result. It contains the needed data to validate the
result from the encrypted tally. *)
......
......@@ -206,7 +206,7 @@ module Make (P : PARSED_PARAMS) : S = struct
in
let result = E.compute_result nballots tally factors combinator in
assert (E.check_result combinator result);
string_of_result G.write result
string_of_election_result G.write result
let verify () =
(match threshold with
......@@ -221,7 +221,7 @@ module Make (P : PARSED_PARAMS) : S = struct
);
(match get_result () with
| Some result ->
let result = result_of_string G.read result in
let result = election_result_of_string G.read result in
assert (fst (Lazy.force encrypted_tally) = result.encrypted_tally);
let checker = E.check_factor result.encrypted_tally in
let combinator = match threshold with
......
......@@ -41,7 +41,7 @@ let set_draft_election uuid se =
let get_election_result uuid =
match%lwt read_file ~uuid "result.json" with
| Some [x] -> return (Some (result_of_string Yojson.Safe.read_json x))
| Some [x] -> return (Some (election_result_of_string Yojson.Safe.read_json x))
| _ -> return_none
type election_date =
......
......@@ -57,7 +57,7 @@ val get_auth_config : uuid -> auth_config list 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_election_result : uuid -> Yojson.Safe.json election_result option Lwt.t
type election_kind =
[ `Draft
......@@ -84,4 +84,4 @@ val has_voted : uuid -> user -> bool Lwt.t
val init_credential_mapping : uuid -> string list -> unit Lwt.t
val replace_credential : uuid -> string -> string -> unit Lwt.t
val cast_ballot : uuid -> rawballot:string -> user:string -> datetime -> (string * bool, cast_error) Pervasives.result Lwt.t
val cast_ballot : uuid -> rawballot:string -> user:string -> datetime -> (string * bool, cast_error) result Lwt.t
......@@ -1781,7 +1781,7 @@ let handle_election_tally_release uuid () =
in
let result = E.compute_result ntallied et pds combinator in
let%lwt () =
let result = string_of_result W.G.write result in
let result = string_of_election_result W.G.write result in
write_file ~uuid (string_of_election_file ESResult) [result]
in
let%lwt () = Web_persist.set_election_state uuid `Tallied in
......
......@@ -58,7 +58,7 @@ val regenpwd : uuid -> unit -> [> `Html ] Eliom_content.Html.F.elt Lwt.t
val cast_raw : 'a election -> unit -> [> `Html ] Eliom_content.Html.F.elt Lwt.t
val cast_confirmation : 'a election -> string -> unit -> [> `Html ] Eliom_content.Html.F.elt Lwt.t
val cast_confirmed : 'a election -> result:[< `Error of Web_common.error | `Valid of string ] -> unit -> [> `Html ] Eliom_content.Html.F.elt Lwt.t
val pretty_ballots : 'a election -> string list -> Yojson.Safe.json result option -> unit -> [> `Html ] Eliom_content.Html.F.elt Lwt.t
val pretty_ballots : 'a election -> string list -> Yojson.Safe.json election_result option -> unit -> [> `Html ] Eliom_content.Html.F.elt Lwt.t
val pretty_records : 'a election -> (string * string) list -> unit -> [> `Html ] Eliom_content.Html.F.elt Lwt.t
val tally_trustees : 'a election -> int -> string -> unit -> [> `Html ] Eliom_content.Html.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