From c2b7ea95b5ae31b76db8f45bbe353b48a58a65f7 Mon Sep 17 00:00:00 2001 From: Mike Battista <13860912+mikebattista@users.noreply.github.com> Date: Fri, 14 Jun 2024 12:02:30 -0700 Subject: [PATCH] NCRYPT_SSL_FUNCTION_TABLE/SslGetCipherSuitePRFHashAlgorithmFn doesn't exist. Fixed #1925. --- generation/WinSDK/manual/Security.Cryptography.cs | 14 ++++++-------- scripts/ChangesSinceLastRelease.txt | 2 ++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/generation/WinSDK/manual/Security.Cryptography.cs b/generation/WinSDK/manual/Security.Cryptography.cs index bccacc55..3abf212d 100644 --- a/generation/WinSDK/manual/Security.Cryptography.cs +++ b/generation/WinSDK/manual/Security.Cryptography.cs @@ -4,11 +4,16 @@ namespace Windows.Win32.Security.Cryptography { + // Manually defined due to missing unsafe modifier during codegen pass + // https://github.com/microsoft/win32metadata/issues/1914 + [UnmanagedFunctionPointer(CallingConvention.Winapi)] + [return:NativeTypeName("SECURITY_STATUS")] + public unsafe delegate HRESULT SslGetCipherSuitePRFHashAlgorithmFn([NativeTypeName("NCRYPT_PROV_HANDLE")][In]UIntPtr hSslProvider, [NativeTypeName("DWORD")][In]uint dwProtocol, [NativeTypeName("DWORD")][In]uint dwCipherSuite, [NativeTypeName("DWORD")][In]uint dwKeyType, [NativeTypeName("WCHAR[64]")][NativeArrayInfo(CountConst = 64),Out]ushort* szPRFHash, [NativeTypeName("DWORD")][In]uint dwFlags); + public static unsafe partial class Apis { // Manually defined due to missing header definitions // https://github.com/microsoft/win32metadata/issues/1605 - [DllImport("BCryptPrimitives.dll", CallingConvention = CallingConvention.StdCall, ExactSpelling = true)] [return: NativeTypeName("BOOL")] public static extern int SystemPrng([NativeTypeName("PUCHAR")][MemorySize(BytesParamIndex=1)][Out] byte* pbRandomData, [NativeTypeName("SIZE_T")] nuint cbRandomData); @@ -16,12 +21,5 @@ public static unsafe partial class Apis [DllImport("BCryptPrimitives.dll", CallingConvention = CallingConvention.StdCall, ExactSpelling = true)] [return: NativeTypeName("BOOL")] public static extern int ProcessPrng([NativeTypeName("PBYTE")][MemorySize(BytesParamIndex=1)][Out] byte* pbData, [NativeTypeName("SIZE_T")] nuint cbData); - - // Manually defined due to missing unsafe modifier during codegen pass - // https://github.com/microsoft/win32metadata/issues/1914 - - [UnmanagedFunctionPointer(CallingConvention.Winapi)] - [return:NativeTypeName("SECURITY_STATUS")] - public delegate HRESULT SslGetCipherSuitePRFHashAlgorithmFn([NativeTypeName("NCRYPT_PROV_HANDLE")][In]UIntPtr hSslProvider, [NativeTypeName("DWORD")][In]uint dwProtocol, [NativeTypeName("DWORD")][In]uint dwCipherSuite, [NativeTypeName("DWORD")][In]uint dwKeyType, [NativeTypeName("WCHAR[64]")][NativeArrayInfo(CountConst = 64),Out]ushort* szPRFHash, [NativeTypeName("DWORD")][In]uint dwFlags); } } diff --git a/scripts/ChangesSinceLastRelease.txt b/scripts/ChangesSinceLastRelease.txt index 7ceb0896..abd1d2f7 100644 --- a/scripts/ChangesSinceLastRelease.txt +++ b/scripts/ChangesSinceLastRelease.txt @@ -893,3 +893,5 @@ Windows.Win32.Networking.WinSock.Apis.INADDR_ANY added Windows.Win32.Networking.WinSock.Apis.INADDR_BROADCAST added Windows.Win32.Networking.WinSock.Apis.SO_DONTLINGER added Windows.Win32.Networking.WinSock.Apis.SO_EXCLUSIVEADDRUSE added +# Fixed #1925. +Windows.Win32.Security.Cryptography.SslGetCipherSuitePRFHashAlgorithmFn added