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
f808da26
Commit
f808da26
authored
Aug 16, 2014
by
Michael Müller
Committed by
Alexandre Julliard
Sep 15, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcrypt: Add semi-stub for BCryptGetFipsAlgorithmMode.
parent
2884053a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
1 deletion
+33
-1
bcrypt.spec
dlls/bcrypt/bcrypt.spec
+1
-1
bcrypt_main.c
dlls/bcrypt/bcrypt_main.c
+11
-0
bcrypt.c
dlls/bcrypt/tests/bcrypt.c
+21
-0
No files found.
dlls/bcrypt/bcrypt.spec
View file @
f808da26
...
...
@@ -27,7 +27,7 @@
@ stdcall BCryptGenRandom(ptr ptr long long)
@ stub BCryptGenerateKeyPair
@ stub BCryptGenerateSymmetricKey
@ st
ub BCryptGetFipsAlgorithmMode
@ st
dcall BCryptGetFipsAlgorithmMode(ptr)
@ stub BCryptGetProperty
@ stub BCryptHashData
@ stub BCryptImportKey
...
...
dlls/bcrypt/bcrypt_main.c
View file @
f808da26
...
...
@@ -97,3 +97,14 @@ NTSTATUS WINAPI BCryptCloseAlgorithmProvider(BCRYPT_ALG_HANDLE algorithm, DWORD
return
STATUS_NOT_IMPLEMENTED
;
}
NTSTATUS
WINAPI
BCryptGetFipsAlgorithmMode
(
BOOLEAN
*
enabled
)
{
FIXME
(
"%p - semi-stub
\n
"
,
enabled
);
if
(
!
enabled
)
return
STATUS_INVALID_PARAMETER
;
*
enabled
=
FALSE
;
return
STATUS_SUCCESS
;
}
dlls/bcrypt/tests/bcrypt.c
View file @
f808da26
...
...
@@ -27,6 +27,7 @@
static
NTSTATUS
(
WINAPI
*
pBCryptGenRandom
)(
BCRYPT_ALG_HANDLE
hAlgorithm
,
PUCHAR
pbBuffer
,
ULONG
cbBuffer
,
ULONG
dwFlags
);
static
NTSTATUS
(
WINAPI
*
pBCryptGetFipsAlgorithmMode
)(
BOOLEAN
*
enabled
);
static
BOOL
Init
(
void
)
{
...
...
@@ -38,6 +39,7 @@ static BOOL Init(void)
}
pBCryptGenRandom
=
(
void
*
)
GetProcAddress
(
hbcrypt
,
"BCryptGenRandom"
);
pBCryptGetFipsAlgorithmMode
=
(
void
*
)
GetProcAddress
(
hbcrypt
,
"BCryptGetFipsAlgorithmMode"
);
return
TRUE
;
}
...
...
@@ -78,10 +80,29 @@ static void test_BCryptGenRandom(void)
ok
(
memcmp
(
buffer
,
buffer
+
8
,
8
),
"Expected a random number, got 0
\n
"
);
}
static
void
test_BCryptGetFipsAlgorithmMode
(
void
)
{
NTSTATUS
ret
;
BOOLEAN
enabled
;
if
(
!
pBCryptGetFipsAlgorithmMode
)
{
win_skip
(
"BCryptGetFipsAlgorithmMode is not available
\n
"
);
return
;
}
ret
=
pBCryptGetFipsAlgorithmMode
(
&
enabled
);
ok
(
ret
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got 0x%x
\n
"
,
ret
);
ret
=
pBCryptGetFipsAlgorithmMode
(
NULL
);
ok
(
ret
==
STATUS_INVALID_PARAMETER
,
"Expected STATUS_INVALID_PARAMETER, got 0x%x
\n
"
,
ret
);
}
START_TEST
(
bcrypt
)
{
if
(
!
Init
())
return
;
test_BCryptGenRandom
();
test_BCryptGetFipsAlgorithmMode
();
}
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