diff --git a/src/secmod_eddsa.ml b/src/secmod_eddsa.ml index 12d1041e..f14d7e2e 100644 --- a/src/secmod_eddsa.ml +++ b/src/secmod_eddsa.ml @@ -1,3 +1,12 @@ +(* TODO + ! use lock + schedule tasks + sign: check timestamps before signing + + list_issue_date: save timestamp of key generation + key validity period: + more checks + do not exceed lookahead + refacto common parts with secmod_eddsa *) let src = Logs.Src.create "mte.secmod_eddsa" module Log = (val Logs.src_log src : Logs.LOG) @@ -101,7 +110,6 @@ let split_in_periodes ~start ~end_ = in go acc start end_ -(* TODO do not exceed lookahead *) (* try to not generate keys with validity start in the past *) let gen_additional_keys_until_lookahead ~now l = let start = @@ -213,10 +221,3 @@ module Make () = struct let keys () = Hashtbl.to_seq_values t.ht |> List.of_seq |> List.map conv let find_key pub = Hashtbl.find_opt t.ht pub |> Option.map conv end - -(* TODO - - more checks - - sign: check timestamps before signing - - schedule tasks - - ! use lock -*) diff --git a/src/secmod_rsa.ml b/src/secmod_rsa.ml index edc70476..04a8cce6 100644 --- a/src/secmod_rsa.ml +++ b/src/secmod_rsa.ml @@ -1,4 +1,3 @@ -(* TODO refacto common parts with secmod_eddsa *) let src = Logs.Src.create "mte.secmod_rsa" module Log = (val Logs.src_log src : Logs.LOG) @@ -199,9 +198,7 @@ let load () = let sm_pub = EddsaPrivateKey.pub_of_priv sm_key_priv in let ht = Hashtbl.create 0xff in let () = List.iter (fun k -> Hashtbl.replace ht k.h_pub k) keys in - (* TODO list_issue_date - not ideal, not sure what to put here - it would be best to save keys creation time *) + (* TODO list_issue_date *) let last_change = Timestamp.never in Ok (Some { sm_key_priv; sm_pub; ht; last_change })