Skip to content

Commit

Permalink
Remove unwrap from sign()
Browse files Browse the repository at this point in the history
Fix #213

Signed-off-by: Wei Liu <[email protected]>
  • Loading branch information
liuw1 authored and gaojiaqi7 committed Apr 29, 2024
1 parent fd8bff1 commit cf4e188
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crypto/src/x509.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl<'a> CertificateBuilder<'a> {
signature: &'a mut Vec<u8>,
mut signer: impl FnMut(&[u8], &mut Vec<u8>),
) -> Result<Self, DerError> {
let tbs = self.0.tbs_certificate.to_vec().unwrap();
let tbs = self.0.tbs_certificate.to_vec()?;
signer(tbs.as_slice(), signature);
self.0.signature_value = BitString::new(0, signature)?;
Ok(self)
Expand Down

0 comments on commit cf4e188

Please sign in to comment.