From: Elizabeth Figura zfigura@codeweavers.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57962 --- configure | 2 ++ configure.ac | 1 + dlls/advapi32/Makefile.in | 1 - dlls/advapi32/advapi32.spec | 10 +++++----- dlls/cryptbase/Makefile.in | 4 ++++ dlls/cryptbase/cryptbase.spec | 11 ++++++++++ .../{advapi32/crypt_des.c => cryptbase/des.c} | 20 +++++++++++++------ 7 files changed, 37 insertions(+), 12 deletions(-) create mode 100644 dlls/cryptbase/Makefile.in create mode 100644 dlls/cryptbase/cryptbase.spec rename dlls/{advapi32/crypt_des.c => cryptbase/des.c} (97%)
diff --git a/configure b/configure index 08e7a3f7077..ef7c99dd8e8 100755 --- a/configure +++ b/configure @@ -1025,6 +1025,7 @@ enable_coremessaging enable_credui enable_crtdll enable_crypt32 +enable_cryptbase enable_cryptdlg enable_cryptdll enable_cryptext @@ -22179,6 +22180,7 @@ wine_fn_config_makefile dlls/credui/tests enable_tests wine_fn_config_makefile dlls/crtdll enable_crtdll wine_fn_config_makefile dlls/crypt32 enable_crypt32 wine_fn_config_makefile dlls/crypt32/tests enable_tests +wine_fn_config_makefile dlls/cryptbase enable_cryptbase wine_fn_config_makefile dlls/cryptdlg enable_cryptdlg wine_fn_config_makefile dlls/cryptdll enable_cryptdll wine_fn_config_makefile dlls/cryptext enable_cryptext diff --git a/configure.ac b/configure.ac index 306cbe03146..274591f5f53 100644 --- a/configure.ac +++ b/configure.ac @@ -2473,6 +2473,7 @@ WINE_CONFIG_MAKEFILE(dlls/credui/tests) WINE_CONFIG_MAKEFILE(dlls/crtdll) WINE_CONFIG_MAKEFILE(dlls/crypt32) WINE_CONFIG_MAKEFILE(dlls/crypt32/tests) +WINE_CONFIG_MAKEFILE(dlls/cryptbase) WINE_CONFIG_MAKEFILE(dlls/cryptdlg) WINE_CONFIG_MAKEFILE(dlls/cryptdll) WINE_CONFIG_MAKEFILE(dlls/cryptext) diff --git a/dlls/advapi32/Makefile.in b/dlls/advapi32/Makefile.in index 5c766629ccc..353ee35654b 100644 --- a/dlls/advapi32/Makefile.in +++ b/dlls/advapi32/Makefile.in @@ -8,7 +8,6 @@ SOURCES = \ advapi.c \ cred.c \ crypt.c \ - crypt_des.c \ eventlog.c \ lsa.c \ registry.c \ diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec index 7f5fbb07138..f45e4cb023f 100644 --- a/dlls/advapi32/advapi32.spec +++ b/dlls/advapi32/advapi32.spec @@ -777,11 +777,11 @@ @ stdcall StopTraceA(int64 str ptr) @ stdcall -import StopTraceW(int64 wstr ptr) @ stdcall SynchronizeWindows31FilesAndWindowsNTRegistry(long long long long) -@ stdcall SystemFunction001(ptr ptr ptr) -@ stdcall SystemFunction002(ptr ptr ptr) -@ stdcall SystemFunction003(ptr ptr) -@ stdcall SystemFunction004(ptr ptr ptr) -@ stdcall SystemFunction005(ptr ptr ptr) +@ stdcall SystemFunction001(ptr ptr ptr) cryptbase.SystemFunction001 +@ stdcall SystemFunction002(ptr ptr ptr) cryptbase.SystemFunction002 +@ stdcall SystemFunction003(ptr ptr) cryptbase.SystemFunction003 +@ stdcall SystemFunction004(ptr ptr ptr) cryptbase.SystemFunction004 +@ stdcall SystemFunction005(ptr ptr ptr) cryptbase.SystemFunction005 @ stdcall SystemFunction006(ptr ptr) cryptsp.SystemFunction006 @ stdcall SystemFunction007(ptr ptr) cryptsp.SystemFunction007 @ stdcall SystemFunction008(ptr ptr ptr) cryptsp.SystemFunction008 diff --git a/dlls/cryptbase/Makefile.in b/dlls/cryptbase/Makefile.in new file mode 100644 index 00000000000..eb651765c8a --- /dev/null +++ b/dlls/cryptbase/Makefile.in @@ -0,0 +1,4 @@ +MODULE = cryptbase.dll + +SOURCES = \ + des.c diff --git a/dlls/cryptbase/cryptbase.spec b/dlls/cryptbase/cryptbase.spec new file mode 100644 index 00000000000..3fa0102fc33 --- /dev/null +++ b/dlls/cryptbase/cryptbase.spec @@ -0,0 +1,11 @@ +@ stdcall SystemFunction001(ptr ptr ptr) +@ stdcall SystemFunction002(ptr ptr ptr) +@ stdcall SystemFunction003(ptr ptr) +@ stdcall SystemFunction004(ptr ptr ptr) +@ stdcall SystemFunction005(ptr ptr ptr) +@ stub SystemFunction028 +@ stub SystemFunction029 +@ stub SystemFunction034 +@ stub SystemFunction036 +@ stub SystemFunction040 +@ stub SystemFunction041 diff --git a/dlls/advapi32/crypt_des.c b/dlls/cryptbase/des.c similarity index 97% rename from dlls/advapi32/crypt_des.c rename to dlls/cryptbase/des.c index 733729d0720..46ff81d2185 100644 --- a/dlls/advapi32/crypt_des.c +++ b/dlls/cryptbase/des.c @@ -21,10 +21,18 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
+#include <stdarg.h> #include "ntstatus.h" #define WIN32_NO_STATUS #include "windef.h" -#include "crypt.h" +#include "winternl.h" + +struct ustring +{ + DWORD Length; + DWORD MaximumLength; + unsigned char *Buffer; +};
static const unsigned char InitialPermuteMap[64] = { @@ -337,7 +345,7 @@ static unsigned char *DESunhash( unsigned char *dst, const unsigned char *key, c
/****************************************************************************** - * SystemFunction001 [ADVAPI32.@] + * SystemFunction001 (cryptbase.@) * * Encrypts a single block of data using DES * @@ -360,7 +368,7 @@ NTSTATUS WINAPI SystemFunction001( const BYTE *data, const BYTE *key, BYTE *outp }
/****************************************************************************** - * SystemFunction002 [ADVAPI32.@] + * SystemFunction002 (cryptbase.@) * * Decrypts a single block of data using DES * @@ -383,7 +391,7 @@ NTSTATUS WINAPI SystemFunction002( const BYTE *data, const BYTE *key, BYTE *outp }
/****************************************************************************** - * SystemFunction003 [ADVAPI32.@] + * SystemFunction003 (cryptbase.@) * * Hashes a key using DES and a fixed datablock * @@ -407,7 +415,7 @@ NTSTATUS WINAPI SystemFunction003( const BYTE *key, BYTE *output ) }
/****************************************************************************** - * SystemFunction004 [ADVAPI32.@] + * SystemFunction004 (cryptbase.@) * * Encrypts a block of data with DES in ECB mode, preserving the length * @@ -469,7 +477,7 @@ NTSTATUS WINAPI SystemFunction004( const struct ustring *in, const struct ustrin }
/****************************************************************************** - * SystemFunction005 [ADVAPI32.@] + * SystemFunction005 (cryptbase.@) * * Decrypts a block of data with DES in ECB mode *