From 34d04adfcb264ff331a71727dab1328141afecb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sosth=C3=A8ne=20Gu=C3=A9don?= Date: Tue, 28 May 2024 09:38:34 +0200 Subject: [PATCH] Remove required configure call --- src/core_api.rs | 2 -- src/lib.rs | 7 ------- src/manage.rs | 5 ----- src/trussed_auth_impl.rs | 1 - 4 files changed, 15 deletions(-) diff --git a/src/core_api.rs b/src/core_api.rs index d3ee366..4a01fe7 100644 --- a/src/core_api.rs +++ b/src/core_api.rs @@ -2982,8 +2982,6 @@ impl> Se050Backend { request: &Request, resources: &mut ServiceResources

, ) -> Result { - self.configure()?; - // FIXME: Have a real implementation from trussed let mut backend_path = core_ctx.path.clone(); backend_path.push(&PathBuf::from(BACKEND_DIR)); diff --git a/src/lib.rs b/src/lib.rs index 48befe7..7c49434 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -126,7 +126,6 @@ pub struct Se050Backend { metadata_location: Location, hw_key: HardwareKey, ns: Namespace, - configured: bool, layout: FilesystemLayout, } @@ -147,7 +146,6 @@ impl> Se050Backend { Some(k) => HardwareKey::Raw(k), }, ns, - configured: false, layout, } } @@ -188,9 +186,6 @@ impl> Se050Backend { const REQUIRED_CURVES: [CurveInitializer; 2] = [PRIME256V1_INITIALIZER, SECP521R1_INITIALIZER]; self.enable()?; - if self.configured { - return Ok(()); - } let buf = &mut [0; 1024]; let configured_curves = self .se @@ -207,8 +202,6 @@ impl> Se050Backend { })?; } } - self.configured = true; - Ok(()) } } diff --git a/src/manage.rs b/src/manage.rs index 9bd4936..f187ca1 100644 --- a/src/manage.rs +++ b/src/manage.rs @@ -28,11 +28,6 @@ impl> ExtensionImpl for Se0 request: &::Request, _resources: &mut ServiceResources

, ) -> Result<::Reply, Error> { - self.configure().map_err(|err| { - debug!("Failed to enable for management: {err:?}"); - err - })?; - debug!("Runnig manage request: {request:?}"); match request { Se050ManageRequest::Info(InfoRequest) => { diff --git a/src/trussed_auth_impl.rs b/src/trussed_auth_impl.rs index bca002b..f8295c7 100644 --- a/src/trussed_auth_impl.rs +++ b/src/trussed_auth_impl.rs @@ -264,7 +264,6 @@ impl> ExtensionImpl ::Reply, trussed::Error, > { - self.configure()?; let backend_ctx = backend_ctx.with_namespace(&self.ns, &core_ctx.path); let auth_ctx = backend_ctx.auth; let ns = backend_ctx.ns;