From 2434383f60d1047dd95fab17795538182153ad98 Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Tue, 5 Dec 2023 01:01:09 -0500 Subject: [PATCH] windows-sys 0.52 --- Cargo.toml | 4 ++-- src/crypt_prov.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9f3f5e7..a6e4ffa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"] } diff --git a/src/crypt_prov.rs b/src/crypt_prov.rs index 9e5cd0c..5c383ba 100644 --- a/src/crypt_prov.rs +++ b/src/crypt_prov.rs @@ -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; @@ -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)) @@ -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 } }