This commit is contained in:
parent
3133538403
commit
213f619bda
2 changed files with 10 additions and 12 deletions
|
|
@ -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
|
||||
*)
|
||||
|
|
|
|||
|
|
@ -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 })
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue