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
215c1718
Commit
215c1718
authored
Feb 11, 2020
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcrypt: Support BCRYPT_HASH_REUSABLE_FLAG in BCryptOpenAlgorithmProvider.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3d69d71e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
bcrypt_internal.h
dlls/bcrypt/bcrypt_internal.h
+1
-1
bcrypt_main.c
dlls/bcrypt/bcrypt_main.c
+5
-4
No files found.
dlls/bcrypt/bcrypt_internal.h
View file @
215c1718
...
...
@@ -154,7 +154,7 @@ struct algorithm
struct
object
hdr
;
enum
alg_id
id
;
enum
mode_id
mode
;
BOOL
hmac
;
ULONG
flags
;
};
#if defined(HAVE_GNUTLS_CIPHER_INIT)
...
...
dlls/bcrypt/bcrypt_main.c
View file @
215c1718
...
...
@@ -216,7 +216,7 @@ NTSTATUS WINAPI BCryptGenRandom(BCRYPT_ALG_HANDLE handle, UCHAR *buffer, ULONG c
NTSTATUS
WINAPI
BCryptOpenAlgorithmProvider
(
BCRYPT_ALG_HANDLE
*
handle
,
LPCWSTR
id
,
LPCWSTR
implementation
,
DWORD
flags
)
{
const
DWORD
supported_flags
=
BCRYPT_ALG_HANDLE_HMAC_FLAG
;
const
DWORD
supported_flags
=
BCRYPT_ALG_HANDLE_HMAC_FLAG
|
BCRYPT_HASH_REUSABLE_FLAG
;
struct
algorithm
*
alg
;
enum
alg_id
alg_id
;
ULONG
i
;
...
...
@@ -254,7 +254,7 @@ NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, LPCWSTR
alg
->
hdr
.
magic
=
MAGIC_ALG
;
alg
->
id
=
alg_id
;
alg
->
mode
=
MODE_ID_CBC
;
alg
->
hmac
=
flags
&
BCRYPT_ALG_HANDLE_HMAC_FLAG
;
alg
->
flags
=
flags
;
*
handle
=
alg
;
return
STATUS_SUCCESS
;
...
...
@@ -692,8 +692,9 @@ NTSTATUS WINAPI BCryptCreateHash( BCRYPT_ALG_HANDLE algorithm, BCRYPT_HASH_HANDL
if
(
!
(
hash
=
heap_alloc_zero
(
sizeof
(
*
hash
)
)))
return
STATUS_NO_MEMORY
;
hash
->
hdr
.
magic
=
MAGIC_HASH
;
hash
->
alg_id
=
alg
->
id
;
if
(
alg
->
hmac
)
hash
->
flags
=
HASH_FLAG_HMAC
;
if
(
flags
&
BCRYPT_HASH_REUSABLE_FLAG
)
hash
->
flags
|=
HASH_FLAG_REUSABLE
;
if
(
alg
->
flags
&
BCRYPT_ALG_HANDLE_HMAC_FLAG
)
hash
->
flags
=
HASH_FLAG_HMAC
;
if
((
alg
->
flags
&
BCRYPT_HASH_REUSABLE_FLAG
)
||
(
flags
&
BCRYPT_HASH_REUSABLE_FLAG
))
hash
->
flags
|=
HASH_FLAG_REUSABLE
;
if
(
secretlen
&&
!
(
hash
->
secret
=
heap_alloc
(
secretlen
)))
{
...
...
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