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
ec85dfe3
Commit
ec85dfe3
authored
Sep 12, 2022
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcrypt: Rename mode_id to chain_mode.
parent
6f5028dd
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
63 deletions
+63
-63
bcrypt_internal.h
dlls/bcrypt/bcrypt_internal.h
+16
-16
bcrypt_main.c
dlls/bcrypt/bcrypt_main.c
+35
-35
gnutls.c
dlls/bcrypt/gnutls.c
+12
-12
No files found.
dlls/bcrypt/bcrypt_internal.h
View file @
ec85dfe3
...
...
@@ -144,31 +144,31 @@ enum alg_id
ALG_ID_RNG
,
};
enum
mode_id
enum
chain_mode
{
MODE_ID
_CBC
,
MODE_ID
_ECB
,
MODE_ID
_CFB
,
MODE_ID
_CCM
,
MODE_ID
_GCM
,
CHAIN_MODE
_CBC
,
CHAIN_MODE
_ECB
,
CHAIN_MODE
_CFB
,
CHAIN_MODE
_CCM
,
CHAIN_MODE
_GCM
,
};
struct
algorithm
{
struct
object
hdr
;
enum
alg_id
id
;
enum
mode_id
mode
;
unsigned
flags
;
struct
object
hdr
;
enum
alg_id
id
;
enum
chain_mode
mode
;
unsigned
flags
;
};
struct
key_symmetric
{
enum
mode_id
mode
;
ULONG
block_size
;
UCHAR
*
vector
;
ULONG
vector_len
;
UCHAR
*
secret
;
unsigned
secret_len
;
enum
chain_mode
mode
;
ULONG
block_size
;
UCHAR
*
vector
;
ULONG
vector_len
;
UCHAR
*
secret
;
unsigned
secret_len
;
CRITICAL_SECTION
cs
;
};
...
...
dlls/bcrypt/bcrypt_main.c
View file @
ec85dfe3
This diff is collapsed.
Click to expand it.
dlls/bcrypt/gnutls.c
View file @
ec85dfe3
...
...
@@ -490,7 +490,7 @@ static gnutls_cipher_algorithm_t get_gnutls_cipher( const struct key *key )
WARN
(
"handle block size
\n
"
);
switch
(
key
->
u
.
s
.
mode
)
{
case
MODE_ID
_CBC
:
case
CHAIN_MODE
_CBC
:
return
GNUTLS_CIPHER_3DES_CBC
;
default:
break
;
...
...
@@ -502,17 +502,17 @@ static gnutls_cipher_algorithm_t get_gnutls_cipher( const struct key *key )
WARN
(
"handle block size
\n
"
);
switch
(
key
->
u
.
s
.
mode
)
{
case
MODE_ID
_GCM
:
case
CHAIN_MODE
_GCM
:
if
(
key
->
u
.
s
.
secret_len
==
16
)
return
GNUTLS_CIPHER_AES_128_GCM
;
if
(
key
->
u
.
s
.
secret_len
==
32
)
return
GNUTLS_CIPHER_AES_256_GCM
;
break
;
case
MODE_ID
_ECB
:
/* can be emulated with CBC + empty IV */
case
MODE_ID
_CBC
:
case
CHAIN_MODE
_ECB
:
/* can be emulated with CBC + empty IV */
case
CHAIN_MODE
_CBC
:
if
(
key
->
u
.
s
.
secret_len
==
16
)
return
GNUTLS_CIPHER_AES_128_CBC
;
if
(
key
->
u
.
s
.
secret_len
==
24
)
return
GNUTLS_CIPHER_AES_192_CBC
;
if
(
key
->
u
.
s
.
secret_len
==
32
)
return
GNUTLS_CIPHER_AES_256_CBC
;
break
;
case
MODE_ID
_CFB
:
case
CHAIN_MODE
_CFB
:
if
(
key
->
u
.
s
.
secret_len
==
16
)
return
GNUTLS_CIPHER_AES_128_CFB8
;
if
(
key
->
u
.
s
.
secret_len
==
24
)
return
GNUTLS_CIPHER_AES_192_CFB8
;
if
(
key
->
u
.
s
.
secret_len
==
32
)
return
GNUTLS_CIPHER_AES_256_CFB8
;
...
...
@@ -2041,13 +2041,13 @@ typedef ULONG PTR32;
struct
key_symmetric32
{
enum
mode_id
mode
;
ULONG
block_size
;
PTR32
vector
;
ULONG
vector_len
;
PTR32
secret
;
ULONG
secret_len
;
ULONG
__cs
[
6
];
enum
chain_mode
mode
;
ULONG
block_size
;
PTR32
vector
;
ULONG
vector_len
;
PTR32
secret
;
ULONG
secret_len
;
ULONG
__cs
[
6
];
};
struct
key_asymmetric32
...
...
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