Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump bindgen to 0.69.4 #144

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion psa-crypto-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repository = "https://github.com/parallaxsecond/rust-psa-crypto"
rust-version = "1.66.0"

[build-dependencies]
bindgen = { version = "0.66.1", optional = true }
bindgen = { version = "0.69.4", optional = true }
cc = "1.0.59"
cmake = "0.1.44"
regex = "1.9.1"
Expand Down
1 change: 1 addition & 0 deletions psa-crypto-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#[allow(clippy::all)]
#[cfg(feature = "interface")]
mod psa_crypto_binding {
#![allow(unused_imports)]
include!(concat!(env!("OUT_DIR"), "/shim_bindings.rs"));
}

Expand Down
13 changes: 7 additions & 6 deletions psa-crypto/src/operations/cipher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ fn crypt(

let mut output_length = 0;
let mut output_length_finish = 0;
match (|| {

let status = {
Status::from(unsafe {
psa_crypto_sys::psa_cipher_set_iv(&mut operation, iv.as_ptr(), iv.len())
})
Expand Down Expand Up @@ -61,16 +62,16 @@ fn crypt(
.to_result()?;

Ok(())
})() {
Ok(()) => (),
};

match status {
Ok(()) => Ok(output_length + output_length_finish),
Err(x) => {
Status::from(unsafe { psa_crypto_sys::psa_cipher_abort(&mut operation) })
.to_result()?;
return Err(x);
Err(x)
}
}

Ok(output_length + output_length_finish)
}

/// Encrypt a short message with a key
Expand Down
2 changes: 1 addition & 1 deletion psa-crypto/src/types/key_derivation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use super::key::Id;
#[cfg(feature = "operations")]
use super::status::{Error, Result, Status};
#[cfg(feature = "operations")]
use core::convert::{From, TryFrom};
use core::convert::TryFrom;

/// Key derivation operation for deriving keys from existing sources
#[derive(Debug, Clone, Copy)]
Expand Down
Loading