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
2b7fcef8
Commit
2b7fcef8
authored
Dec 07, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 07, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rsaenh: Use bcrypt for MD4 hashes.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e73d4e55
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
25 deletions
+2
-25
implglue.c
dlls/rsaenh/implglue.c
+2
-16
implglue.h
dlls/rsaenh/implglue.h
+0
-9
No files found.
dlls/rsaenh/implglue.c
View file @
2b7fcef8
...
@@ -33,10 +33,6 @@
...
@@ -33,10 +33,6 @@
#include <stdio.h>
#include <stdio.h>
/* Function prototypes copied from dlls/advapi32/crypt_md4.c */
VOID
WINAPI
MD4Init
(
MD4_CTX
*
ctx
);
VOID
WINAPI
MD4Update
(
MD4_CTX
*
ctx
,
const
unsigned
char
*
buf
,
unsigned
int
len
);
VOID
WINAPI
MD4Final
(
MD4_CTX
*
ctx
);
/* Function prototypes copied from dlls/advapi32/crypt_md5.c */
/* Function prototypes copied from dlls/advapi32/crypt_md5.c */
VOID
WINAPI
MD5Init
(
MD5_CTX
*
ctx
);
VOID
WINAPI
MD5Init
(
MD5_CTX
*
ctx
);
VOID
WINAPI
MD5Update
(
MD5_CTX
*
ctx
,
const
unsigned
char
*
buf
,
unsigned
int
len
);
VOID
WINAPI
MD5Update
(
MD5_CTX
*
ctx
,
const
unsigned
char
*
buf
,
unsigned
int
len
);
...
@@ -56,8 +52,8 @@ BOOL init_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext)
...
@@ -56,8 +52,8 @@ BOOL init_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext)
break
;
break
;
case
CALG_MD4
:
case
CALG_MD4
:
MD4Init
(
&
pHashContext
->
md4
);
status
=
BCryptOpenAlgorithmProvider
(
&
provider
,
BCRYPT_MD4_ALGORITHM
,
MS_PRIMITIVE_PROVIDER
,
0
);
return
TRUE
;
break
;
case
CALG_MD5
:
case
CALG_MD5
:
MD5Init
(
&
pHashContext
->
md5
);
MD5Init
(
&
pHashContext
->
md5
);
...
@@ -95,10 +91,6 @@ BOOL update_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext, const BYTE *pb
...
@@ -95,10 +91,6 @@ BOOL update_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext, const BYTE *pb
{
{
switch
(
aiAlgid
)
switch
(
aiAlgid
)
{
{
case
CALG_MD4
:
MD4Update
(
&
pHashContext
->
md4
,
pbData
,
dwDataLen
);
break
;
case
CALG_MD5
:
case
CALG_MD5
:
MD5Update
(
&
pHashContext
->
md5
,
pbData
,
dwDataLen
);
MD5Update
(
&
pHashContext
->
md5
,
pbData
,
dwDataLen
);
break
;
break
;
...
@@ -114,11 +106,6 @@ BOOL finalize_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext, BYTE *pbHash
...
@@ -114,11 +106,6 @@ BOOL finalize_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext, BYTE *pbHash
{
{
switch
(
aiAlgid
)
switch
(
aiAlgid
)
{
{
case
CALG_MD4
:
MD4Final
(
&
pHashContext
->
md4
);
memcpy
(
pbHashValue
,
pHashContext
->
md4
.
digest
,
16
);
break
;
case
CALG_MD5
:
case
CALG_MD5
:
MD5Final
(
&
pHashContext
->
md5
);
MD5Final
(
&
pHashContext
->
md5
);
memcpy
(
pbHashValue
,
pHashContext
->
md5
.
digest
,
16
);
memcpy
(
pbHashValue
,
pHashContext
->
md5
.
digest
,
16
);
...
@@ -138,7 +125,6 @@ BOOL duplicate_hash_impl(ALG_ID aiAlgid, const HASH_CONTEXT *pSrcHashContext,
...
@@ -138,7 +125,6 @@ BOOL duplicate_hash_impl(ALG_ID aiAlgid, const HASH_CONTEXT *pSrcHashContext,
{
{
switch
(
aiAlgid
)
switch
(
aiAlgid
)
{
{
case
CALG_MD4
:
case
CALG_MD5
:
case
CALG_MD5
:
*
pDestHashContext
=
*
pSrcHashContext
;
*
pDestHashContext
=
*
pSrcHashContext
;
return
TRUE
;
return
TRUE
;
...
...
dlls/rsaenh/implglue.h
View file @
2b7fcef8
...
@@ -29,14 +29,6 @@
...
@@ -29,14 +29,6 @@
#define RSAENH_MAX_HASH_SIZE 104
#define RSAENH_MAX_HASH_SIZE 104
/* Next typedef copied from dlls/advapi32/crypt_md4.c */
typedef
struct
tagMD4_CTX
{
unsigned
int
buf
[
4
];
unsigned
int
i
[
2
];
unsigned
char
in
[
64
];
unsigned
char
digest
[
16
];
}
MD4_CTX
;
/* Next typedef copied from dlls/advapi32/crypt_md5.c */
/* Next typedef copied from dlls/advapi32/crypt_md5.c */
typedef
struct
tagMD5_CTX
typedef
struct
tagMD5_CTX
{
{
...
@@ -47,7 +39,6 @@ typedef struct tagMD5_CTX
...
@@ -47,7 +39,6 @@ typedef struct tagMD5_CTX
}
MD5_CTX
;
}
MD5_CTX
;
typedef
union
tagHASH_CONTEXT
{
typedef
union
tagHASH_CONTEXT
{
MD4_CTX
md4
;
MD5_CTX
md5
;
MD5_CTX
md5
;
BCRYPT_HASH_HANDLE
bcrypt_hash
;
BCRYPT_HASH_HANDLE
bcrypt_hash
;
}
HASH_CONTEXT
;
}
HASH_CONTEXT
;
...
...
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