Skip to content

Commit

Permalink
Update filestore to only require the client id
Browse files Browse the repository at this point in the history
Trussed-auth needs to create filestores with a custom path for its own data.
It did so by creating a "fake" CoreContext, which will be harder to do because of the interrupt.
  • Loading branch information
sosthene-nitrokey committed Jun 20, 2023
1 parent e979f47 commit 5af424e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ impl<P: Platform> ServiceResources<P> {
.map_err(|_| Error::EntropyMalfunction)
}

pub fn filestore(&mut self, ctx: &CoreContext) -> ClientFilestore<P::S> {
ClientFilestore::new(ctx.path.clone(), self.platform.store())
pub fn filestore(&mut self, client_id: PathBuf) -> ClientFilestore<P::S> {
ClientFilestore::new(client_id, self.platform.store())
}

pub fn trussed_filestore(&mut self) -> ClientFilestore<P::S> {
Expand Down Expand Up @@ -143,7 +143,7 @@ impl<P: Platform> ServiceResources<P> {
let keystore = &mut self.keystore(ctx)?;
let certstore = &mut self.certstore(ctx)?;
let counterstore = &mut self.counterstore(ctx)?;
let filestore = &mut self.filestore(ctx);
let filestore = &mut self.filestore(ctx.path.clone());

debug_now!("TRUSSED {:?}", request);
match request {
Expand Down

0 comments on commit 5af424e

Please sign in to comment.