Skip to content

Commit

Permalink
feat: Expose verify_from_cesr function
Browse files Browse the repository at this point in the history
  • Loading branch information
edytapawlak committed Sep 4, 2024
1 parent 9113d62 commit cd5c459
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/controller/src/controller/verifying.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl KnownEvents {
Ok((oobis, to_verify))
}

fn verify_from_cesr(&self, stream: &str) -> Result<(), ControllerError> {
pub fn verify_from_cesr(&self, stream: &str) -> Result<(), ControllerError> {
let (_rest, data) =
parse_many(stream.as_bytes()).map_err(|_e| ControllerError::CesrFormatError)?;
self.verify_parsed(&data)
Expand Down
4 changes: 4 additions & 0 deletions components/controller/src/identifier/signing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,8 @@ impl Identifier {
.map(|data| String::from_utf8(data).unwrap())
.map_err(|_e| ControllerError::CesrFormatError)
}

pub fn verify_from_cesr(&self, stream: &str) -> Result<(), ControllerError> {
self.known_events.verify_from_cesr(stream)
}
}

0 comments on commit cd5c459

Please # to comment.