Skip to content

Commit

Permalink
windows-sys 0.52
Browse files Browse the repository at this point in the history
  • Loading branch information
kayabaNerve committed Dec 5, 2023
1 parent 08aa4f8 commit 2434383
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ edition = "2018"
default-target = "x86_64-pc-windows-msvc"

[dependencies]
windows-sys = { version = "0.48", features = [
windows-sys = { version = "0.52", features = [
"Win32_Foundation", "Win32_Security_Cryptography",
"Win32_Security_Authentication_Identity", "Win32_Security_Credentials",
"Win32_System_Memory"] }

[dev-dependencies]
windows-sys = { version = "0.48", features = ["Win32_System_SystemInformation", "Win32_System_Time"] }
windows-sys = { version = "0.52", features = ["Win32_System_SystemInformation", "Win32_System_Time"] }
6 changes: 3 additions & 3 deletions src/crypt_prov.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::ptr;
use std::slice;

use windows_sys::Win32::Security::Cryptography;
use windows_sys::Win32::System::Memory;
use windows_sys::Win32::Foundation;

use crate::crypt_key::CryptKey;
use crate::Inner;
Expand Down Expand Up @@ -204,7 +204,7 @@ impl<'a> ImportOptions<'a> {

let mut key = 0;
let res = Cryptography::CryptImportKey(self.prov.0, buf, len, 0, self.flags, &mut key);
Memory::LocalFree(buf as isize);
Foundation::LocalFree(buf as *mut _);

if res != 0 {
Ok(CryptKey::from_inner(key))
Expand Down Expand Up @@ -239,7 +239,7 @@ impl<'a> ImportOptions<'a> {
let pkey = pkey.PrivateKey;

let res = self.import(slice::from_raw_parts(pkey.pbData, pkey.cbData as usize));
Memory::LocalFree(buf as isize);
Foundation::LocalFree(buf as *mut _);
res
}
}
Expand Down

0 comments on commit 2434383

Please sign in to comment.