Module: wine Branch: master Commit: 83d4075202ea595f6beb4a39ced54dbabc6a2e21 URL: https://gitlab.winehq.org/wine/wine/-/commit/83d4075202ea595f6beb4a39ced54db...
Author: Chris Denton chris@chrisdenton.dev Date: Sat Feb 18 01:15:01 2023 +0000
bcryptprimitives: ProcessPrng stub.
ProcessPrng is the only publicly documented function exported by bcryptprimitives. This stub simply forwards it to RtlGenRandom in advapi32.
---
configure | 2 ++ configure.ac | 1 + dlls/bcryptprimitives/Makefile.in | 5 +++++ dlls/bcryptprimitives/bcryptprimitives.spec | 1 + dlls/bcryptprimitives/main.c | 27 +++++++++++++++++++++++++++ 5 files changed, 36 insertions(+)
diff --git a/configure b/configure index a8f85ebe05c..8a7ed527eba 100755 --- a/configure +++ b/configure @@ -986,6 +986,7 @@ enable_avicap32 enable_avifil32 enable_avrt enable_bcrypt +enable_bcryptprimitives enable_bluetoothapis enable_browseui enable_bthprops_cpl @@ -21194,6 +21195,7 @@ wine_fn_config_makefile dlls/avifile.dll16 enable_win16 wine_fn_config_makefile dlls/avrt enable_avrt wine_fn_config_makefile dlls/bcrypt enable_bcrypt wine_fn_config_makefile dlls/bcrypt/tests enable_tests +wine_fn_config_makefile dlls/bcryptprimitives enable_bcryptprimitives wine_fn_config_makefile dlls/bluetoothapis enable_bluetoothapis wine_fn_config_makefile dlls/browseui enable_browseui wine_fn_config_makefile dlls/browseui/tests enable_tests diff --git a/configure.ac b/configure.ac index d1c5063201f..70138a7566b 100644 --- a/configure.ac +++ b/configure.ac @@ -2389,6 +2389,7 @@ WINE_CONFIG_MAKEFILE(dlls/avifile.dll16,enable_win16) WINE_CONFIG_MAKEFILE(dlls/avrt) WINE_CONFIG_MAKEFILE(dlls/bcrypt) WINE_CONFIG_MAKEFILE(dlls/bcrypt/tests) +WINE_CONFIG_MAKEFILE(dlls/bcryptprimitives) WINE_CONFIG_MAKEFILE(dlls/bluetoothapis) WINE_CONFIG_MAKEFILE(dlls/browseui) WINE_CONFIG_MAKEFILE(dlls/browseui/tests) diff --git a/dlls/bcryptprimitives/Makefile.in b/dlls/bcryptprimitives/Makefile.in new file mode 100644 index 00000000000..537383ba530 --- /dev/null +++ b/dlls/bcryptprimitives/Makefile.in @@ -0,0 +1,5 @@ +MODULE = bcryptprimitives.dll +IMPORTS = advapi32 + +C_SRCS = \ + main.c diff --git a/dlls/bcryptprimitives/bcryptprimitives.spec b/dlls/bcryptprimitives/bcryptprimitives.spec new file mode 100644 index 00000000000..928cb06afcd --- /dev/null +++ b/dlls/bcryptprimitives/bcryptprimitives.spec @@ -0,0 +1 @@ +@ stdcall ProcessPrng(ptr long) diff --git a/dlls/bcryptprimitives/main.c b/dlls/bcryptprimitives/main.c new file mode 100644 index 00000000000..6562d672389 --- /dev/null +++ b/dlls/bcryptprimitives/main.c @@ -0,0 +1,27 @@ +/* + * Copyright 2023 Christopher S. Denton + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <stdarg.h> +#include "windef.h" +#include "winbase.h" +#include "ntsecapi.h" + +BOOL WINAPI ProcessPrng(BYTE *data, SIZE_T size) +{ + return RtlGenRandom(data, size); +}