Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
759850fe
Commit
759850fe
authored
Aug 09, 2006
by
Juan Lang
Committed by
Alexandre Julliard
Aug 10, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Add a couple stubs, and implement the undocumented…
crypt32: Add a couple stubs, and implement the undocumented I_CryptReadTrustedPublisherDWORDValueFromRegistry.
parent
2628627e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
94 additions
and
1 deletion
+94
-1
crypt32.spec
dlls/crypt32/crypt32.spec
+3
-1
main.c
dlls/crypt32/main.c
+41
-0
main.c
dlls/crypt32/tests/main.c
+50
-0
No files found.
dlls/crypt32/crypt32.spec
View file @
759850fe
...
...
@@ -186,15 +186,17 @@
@ stdcall I_CryptFlushLruCache(ptr long long)
@ stdcall I_CryptFreeLruCache(ptr long long)
@ stdcall I_CryptFreeTls(long long)
@ st
ub I_CryptGetDefaultCryptProv
@ st
dcall I_CryptGetDefaultCryptProv(long long long)
@ stub I_CryptGetDefaultCryptProvForEncrypt
@ stdcall I_CryptGetOssGlobal(long)
@ stdcall I_CryptGetTls(long)
@ stub I_CryptInsertLruEntry
@ stdcall I_CryptInstallAsn1Module(long long long)
@ stdcall I_CryptInstallOssGlobal(long long long)
@ stdcall I_CryptReadTrustedPublisherDWORDValueFromRegistry(wstr ptr)
@ stub I_CryptReleaseLruEntry
@ stdcall I_CryptSetTls(long ptr)
@ stdcall I_CryptUninstallAsn1Module(ptr)
@ stub I_CryptUninstallOssGlobal
@ stub PFXExportCertStore
@ stub PFXImportCertStore
...
...
dlls/crypt32/main.c
View file @
759850fe
...
...
@@ -27,6 +27,8 @@
#include "winreg.h"
#include "winnls.h"
#include "mssip.h"
#include "winuser.h"
#include "advpub.h"
#include "crypt32_private.h"
#include "wine/debug.h"
...
...
@@ -269,6 +271,39 @@ BOOL WINAPI I_CryptGetOssGlobal(DWORD x)
return
FALSE
;
}
BOOL
WINAPI
I_CryptGetDefaultCryptProv
(
DWORD
x
,
DWORD
y
,
DWORD
z
)
{
FIXME
(
"%08lx %08lx %08lx
\n
"
,
x
,
y
,
z
);
return
FALSE
;
}
BOOL
WINAPI
I_CryptReadTrustedPublisherDWORDValueFromRegistry
(
LPCWSTR
name
,
DWORD
*
value
)
{
static
const
WCHAR
safer
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'P'
,
'o'
,
'l'
,
'i'
,
'c'
,
'i'
,
'e'
,
's'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'C'
,
'e'
,
'r'
,
't'
,
'i'
,
'f'
,
'i'
,
'c'
,
'a'
,
't'
,
'e'
,
's'
,
'\\'
,
'T'
,
'r'
,
'u'
,
's'
,
't'
,
'e'
,
'd'
,
'P'
,
'u'
,
'b'
,
'l'
,
'i'
,
's'
,
'h'
,
'e'
,
'r'
,
'\\'
,
'S'
,
'a'
,
'f'
,
'e'
,
'r'
,
0
};
HKEY
key
;
LONG
rc
;
BOOL
ret
=
FALSE
;
TRACE
(
"(%s, %p)
\n
"
,
debugstr_w
(
name
),
value
);
rc
=
RegCreateKeyW
(
HKEY_LOCAL_MACHINE
,
safer
,
&
key
);
if
(
rc
==
ERROR_SUCCESS
)
{
DWORD
size
=
sizeof
(
DWORD
);
if
(
!
RegQueryValueExW
(
key
,
name
,
NULL
,
NULL
,
(
LPBYTE
)
value
,
&
size
))
ret
=
TRUE
;
RegCloseKey
(
key
);
}
return
ret
;
}
BOOL
WINAPI
I_CryptInstallOssGlobal
(
DWORD
x
,
DWORD
y
,
DWORD
z
)
{
FIXME
(
"%08lx %08lx %08lx
\n
"
,
x
,
y
,
z
);
...
...
@@ -281,6 +316,12 @@ BOOL WINAPI I_CryptInstallAsn1Module(void *x, DWORD y, DWORD z)
return
TRUE
;
}
BOOL
WINAPI
I_CryptUninstallAsn1Module
(
void
*
x
)
{
FIXME
(
"%p
\n
"
,
x
);
return
TRUE
;
}
BOOL
WINAPI
CryptQueryObject
(
DWORD
dwObjectType
,
const
void
*
pvObject
,
DWORD
dwExpectedContentTypeFlags
,
DWORD
dwExpectedFormatTypeFlags
,
DWORD
dwFlags
,
DWORD
*
pdwMsgAndCertEncodingType
,
DWORD
*
pdwContentType
,
...
...
dlls/crypt32/tests/main.c
View file @
759850fe
...
...
@@ -24,6 +24,7 @@
#include <winbase.h>
#include <winerror.h>
#include <wincrypt.h>
#include <winreg.h>
#include "wine/test.h"
...
...
@@ -272,6 +273,54 @@ static void test_cryptTls(void)
}
}
typedef
BOOL
(
WINAPI
*
I_CryptReadTrustedPublisherDWORDValueFromRegistryFunc
)
(
LPCWSTR
,
DWORD
*
);
static
void
test_readTrustedPublisherDWORD
(
void
)
{
HMODULE
lib
=
LoadLibraryA
(
"crypt32.dll"
);
if
(
lib
)
{
I_CryptReadTrustedPublisherDWORDValueFromRegistryFunc
pReadDWORD
=
(
I_CryptReadTrustedPublisherDWORDValueFromRegistryFunc
)
GetProcAddress
(
lib
,
"I_CryptReadTrustedPublisherDWORDValueFromRegistry"
);
if
(
pReadDWORD
)
{
static
const
WCHAR
safer
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'P'
,
'o'
,
'l'
,
'i'
,
'c'
,
'i'
,
'e'
,
's'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'C'
,
'e'
,
'r'
,
't'
,
'i'
,
'f'
,
'i'
,
'c'
,
'a'
,
't'
,
'e'
,
's'
,
'\\'
,
'T'
,
'r'
,
'u'
,
's'
,
't'
,
'e'
,
'd'
,
'P'
,
'u'
,
'b'
,
'l'
,
'i'
,
's'
,
'h'
,
'e'
,
'r'
,
'\\'
,
'S'
,
'a'
,
'f'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
authenticodeFlags
[]
=
{
'A'
,
'u'
,
't'
,
'h'
,
'e'
,
'n'
,
't'
,
'i'
,
'c'
,
'o'
,
'd'
,
'e'
,
'F'
,
'l'
,
'a'
,
'g'
,
's'
,
0
};
BOOL
ret
,
exists
=
FALSE
;
DWORD
size
,
readFlags
,
returnedFlags
;
HKEY
key
;
LONG
rc
;
rc
=
RegOpenKeyW
(
HKEY_LOCAL_MACHINE
,
safer
,
&
key
);
if
(
rc
==
ERROR_SUCCESS
)
{
size
=
sizeof
(
readFlags
);
rc
=
RegQueryValueExW
(
key
,
authenticodeFlags
,
NULL
,
NULL
,
(
LPBYTE
)
&
readFlags
,
&
size
);
if
(
rc
==
ERROR_SUCCESS
)
exists
=
TRUE
;
}
ret
=
pReadDWORD
(
authenticodeFlags
,
&
returnedFlags
);
ok
(
ret
==
exists
,
"Unexpected return value
\n
"
);
if
(
exists
)
ok
(
readFlags
==
returnedFlags
,
"Expected flags %08lx, got %08lx
\n
"
,
readFlags
,
returnedFlags
);
}
FreeLibrary
(
lib
);
}
}
START_TEST
(
main
)
{
test_findAttribute
();
...
...
@@ -280,4 +329,5 @@ START_TEST(main)
test_verifyTimeValidity
();
test_cryptAllocate
();
test_cryptTls
();
test_readTrustedPublisherDWORD
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment