From 41a52fadaef2a00b08d83beadd5d962c90b5e84e Mon Sep 17 00:00:00 2001 From: swrup Date: Sat, 21 Feb 2026 18:44:43 +0100 Subject: [PATCH] --- src/keys.ml | 12 +++--------- src/keys.mli | 5 ----- src/mod_intf.mli | 27 --------------------------- src/secmod_eddsa.ml | 7 +------ src/secmod_rsa.ml | 7 +------ 5 files changed, 5 insertions(+), 53 deletions(-) diff --git a/src/keys.ml b/src/keys.ml index b3b85902..82d2b10f 100644 --- a/src/keys.ml +++ b/src/keys.ml @@ -6,22 +6,16 @@ type 'a result = ('a, string) Result.t module type S = Mod_intf.KEYS -(* - (Sm_eddsa : Mod_intf.SECMOD_EDDSA) - (Sm_rsa : Mod_intf.SECMOD_RSA) - *) - module Make (Conn : Pg.CONN) = struct - let conn = (module Conn : Pg.CONN) - module Sm_eddsa = Secmod_eddsa.Make () module Sm_rsa = Secmod_rsa.Make () - let secmod_eddsa_pub = Sm_eddsa.sm_pub - let secmod_rsa_pub = Sm_rsa.sm_pub + let conn = (module Conn : Pg.CONN) (* - *) let master_pub = Config.Exchange.master_public_key + let secmod_eddsa_pub = Sm_eddsa.sm_pub + let secmod_rsa_pub = Sm_rsa.sm_pub (* TODO error should be a "key not found", either: diff --git a/src/keys.mli b/src/keys.mli index e10a135d..abf3e388 100644 --- a/src/keys.mli +++ b/src/keys.mli @@ -1,8 +1,3 @@ module type S = Mod_intf.KEYS module Make (_ : Pg.CONN) : S - -(* - (_ : Mod_intf.SECMOD_EDDSA) - (_ : Mod_intf.SECMOD_RSA) - *) diff --git a/src/mod_intf.mli b/src/mod_intf.mli index 0b12ac00..c0edfacd 100644 --- a/src/mod_intf.mli +++ b/src/mod_intf.mli @@ -27,30 +27,3 @@ module type KEYS = sig val revoke_denomination : denom_hash -> Signatures.MasterDenominationKeyRevocation.t -> unit result end - -module type SECMOD = sig - type pub - type sig_typ - type info - - val sm_pub : eddsa_pub - val keys : unit -> info list - val sign_secmod : string -> eddsa_sig - val sign : pub -> string -> (sig_typ, string) Result.t - val revoke : pub -> (unit, string) Result.t -end - -type sm_eddsa_info = eddsa_pub * Time.Absolute.t * Time.Absolute.t -type sm_rsa_info = string * rsa_pub * Time.Absolute.t * Time.Absolute.t - -module type SECMOD_EDDSA = - SECMOD - with type pub = eddsa_pub - and type sig_typ = eddsa_sig - and type info = sm_eddsa_info - -module type SECMOD_RSA = - SECMOD - with type pub = rsa_pub - and type sig_typ = rsa_sig - and type info = sm_rsa_info diff --git a/src/secmod_eddsa.ml b/src/secmod_eddsa.ml index 4056b2d5..70a6f33e 100644 --- a/src/secmod_eddsa.ml +++ b/src/secmod_eddsa.ml @@ -162,13 +162,8 @@ let init () = type info = eddsa_pub * Time.Absolute.t * Time.Absolute.t -module Make () : - Mod_intf.SECMOD - with type pub = eddsa_pub - and type sig_typ = eddsa_sig - and type info = info = struct +module Make () = struct type pub = EddsaPublicKey.t - type sig_typ = EddsaSignature.t type info = EddsaPublicKey.t * Time.Absolute.t * Time.Absolute.t let t = diff --git a/src/secmod_rsa.ml b/src/secmod_rsa.ml index 327437e2..5aa348b8 100644 --- a/src/secmod_rsa.ml +++ b/src/secmod_rsa.ml @@ -187,13 +187,8 @@ let init () = type info = string * rsa_pub * Time.Absolute.t * Time.Absolute.t -module Make () : - Mod_intf.SECMOD - with type pub = rsa_pub - and type sig_typ = rsa_sig - and type info = info = struct +module Make () = struct type pub = RsaPublicKey.t - type sig_typ = RsaSignature.t type info = string * RsaPublicKey.t * Time.Absolute.t * Time.Absolute.t (* --- *)