Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c1bc25dd
Commit
c1bc25dd
authored
Sep 08, 2016
by
Kai Blaschke
Committed by
Alexandre Julliard
Sep 12, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcrypt/tests: Show that BCryptGetFipsAlgorithmMode checks a registry key.
Signed-off-by:
Bruno Jesus
<
00cpxxx@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8f760529
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
2 deletions
+36
-2
Makefile.in
dlls/bcrypt/tests/Makefile.in
+1
-1
bcrypt.c
dlls/bcrypt/tests/bcrypt.c
+35
-1
No files found.
dlls/bcrypt/tests/Makefile.in
View file @
c1bc25dd
TESTDLL
=
bcrypt.dll
IMPORTS
=
bcrypt user32
IMPORTS
=
bcrypt user32
advapi32
C_SRCS
=
\
bcrypt.c
dlls/bcrypt/tests/bcrypt.c
View file @
c1bc25dd
...
...
@@ -61,11 +61,45 @@ static void test_BCryptGenRandom(void)
static
void
test_BCryptGetFipsAlgorithmMode
(
void
)
{
NTSTATUS
ret
;
static
const
WCHAR
policyKeyVistaW
[]
=
{
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'S'
,
'e'
,
't'
,
'\\'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'\\'
,
'L'
,
's'
,
'a'
,
'\\'
,
'F'
,
'I'
,
'P'
,
'S'
,
'A'
,
'l'
,
'g'
,
'o'
,
'r'
,
'i'
,
't'
,
'h'
,
'm'
,
'P'
,
'o'
,
'l'
,
'i'
,
'c'
,
'y'
,
0
};
static
const
WCHAR
policyValueVistaW
[]
=
{
'E'
,
'n'
,
'a'
,
'b'
,
'l'
,
'e'
,
'd'
,
0
};
static
const
WCHAR
policyKeyXPW
[]
=
{
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'S'
,
'e'
,
't'
,
'\\'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'\\'
,
'L'
,
's'
,
'a'
,
0
};
static
const
WCHAR
policyValueXPW
[]
=
{
'F'
,
'I'
,
'P'
,
'S'
,
'A'
,
'l'
,
'g'
,
'o'
,
'r'
,
'i'
,
't'
,
'h'
,
'm'
,
'P'
,
'o'
,
'l'
,
'i'
,
'c'
,
'y'
,
0
};
BOOLEAN
expected
;
BOOLEAN
enabled
;
DWORD
value
,
count
[
2
]
=
{
sizeof
(
value
),
sizeof
(
value
)};
NTSTATUS
ret
;
if
(
!
RegGetValueW
(
HKEY_LOCAL_MACHINE
,
policyKeyVistaW
,
policyValueVistaW
,
RRF_RT_REG_DWORD
,
NULL
,
&
value
,
&
count
[
0
]))
{
expected
=
!!
value
;
}
else
if
(
!
RegGetValueW
(
HKEY_LOCAL_MACHINE
,
policyKeyXPW
,
policyValueXPW
,
RRF_RT_REG_DWORD
,
NULL
,
&
value
,
&
count
[
1
]))
{
expected
=
!!
value
;
}
else
{
expected
=
FALSE
;
todo_wine
ok
(
0
,
"Neither XP or Vista key is present
\n
"
);
}
ret
=
BCryptGetFipsAlgorithmMode
(
&
enabled
);
ok
(
ret
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got 0x%x
\n
"
,
ret
);
ok
(
enabled
==
expected
,
"expected result %d, got %d
\n
"
,
expected
,
enabled
);
ret
=
BCryptGetFipsAlgorithmMode
(
NULL
);
ok
(
ret
==
STATUS_INVALID_PARAMETER
,
"Expected STATUS_INVALID_PARAMETER, got 0x%x
\n
"
,
ret
);
...
...
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