Skip to content

Commit

Permalink
Simplifying finish_into
Browse files Browse the repository at this point in the history
  • Loading branch information
P-E-Meunier committed Dec 3, 2017
1 parent 905d3f7 commit 9732264
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions openssl/src/sign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,8 @@ impl<'a> Signer<'a> {
/// This method will fail if the buffer is not large enough for
/// the signature, one can use `finish_len` to get an upper bound
/// on the required size.
pub fn finish_into<B:AsMut<[u8]>>(&self, mut buf: B) -> Result<usize, ErrorStack> {
pub fn finish_into(&self, buf: &mut [u8]) -> Result<usize, ErrorStack> {
unsafe {
let buf = buf.as_mut();
let mut len = buf.len();
cvt(ffi::EVP_DigestSignFinal(
self.md_ctx,
Expand Down

0 comments on commit 9732264

Please sign in to comment.