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
b6efe8c9
Commit
b6efe8c9
authored
Jun 29, 2014
by
Bruno Jesus
Committed by
Alexandre Julliard
Jun 30, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rsaenh/tests: Add tests for the default encryption chaining mode.
parent
ba06731c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
rsaenh.c
dlls/rsaenh/tests/rsaenh.c
+23
-1
No files found.
dlls/rsaenh/tests/rsaenh.c
View file @
b6efe8c9
...
...
@@ -700,6 +700,13 @@ static void test_block_cipher_modes(void)
memcpy
(
abData
,
plain
,
sizeof
(
plain
));
/* test default chaining mode */
dwMode
=
0xdeadbeef
;
dwLen
=
sizeof
(
dwMode
);
result
=
CryptGetKeyParam
(
hKey
,
KP_MODE
,
(
BYTE
*
)
&
dwMode
,
&
dwLen
,
0
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
ok
(
dwMode
==
CRYPT_MODE_CBC
,
"Wrong default chaining mode
\n
"
);
dwMode
=
CRYPT_MODE_ECB
;
result
=
CryptSetKeyParam
(
hKey
,
KP_MODE
,
(
BYTE
*
)
&
dwMode
,
0
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
...
...
@@ -1040,7 +1047,7 @@ static void test_aes(int keylen)
{
HCRYPTKEY
hKey
;
BOOL
result
;
DWORD
dwLen
;
DWORD
dwLen
,
dwMode
;
unsigned
char
pbData
[
16
],
enc_data
[
16
],
bad_data
[
16
];
int
i
;
...
...
@@ -1068,6 +1075,14 @@ static void test_aes(int keylen)
if
(
result
)
ok
(
!
dwLen
,
"unexpected salt length %d
\n
"
,
dwLen
);
/* test default chaining mode */
dwMode
=
0xdeadbeef
;
dwLen
=
sizeof
(
dwMode
);
result
=
CryptGetKeyParam
(
hKey
,
KP_MODE
,
(
BYTE
*
)
&
dwMode
,
&
dwLen
,
0
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
todo_wine
ok
(
dwMode
==
CRYPT_MODE_CBC
,
"Wrong default chaining
\n
"
);
dwLen
=
13
;
result
=
CryptEncrypt
(
hKey
,
0
,
TRUE
,
0
,
pbData
,
&
dwLen
,
16
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
...
...
@@ -1276,6 +1291,13 @@ static void test_rc2(void)
result
=
CryptGetKeyParam
(
hKey
,
KP_KEYLEN
,
(
BYTE
*
)
&
dwKeyLen
,
&
dwLen
,
0
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
/* test default chaining mode */
dwMode
=
0xdeadbeef
;
dwLen
=
sizeof
(
dwMode
);
result
=
CryptGetKeyParam
(
hKey
,
KP_MODE
,
(
BYTE
*
)
&
dwMode
,
&
dwLen
,
0
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
ok
(
dwMode
==
CRYPT_MODE_CBC
,
"Wrong default chaining mode
\n
"
);
dwMode
=
CRYPT_MODE_CBC
;
result
=
CryptSetKeyParam
(
hKey
,
KP_MODE
,
(
BYTE
*
)
&
dwMode
,
0
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
...
...
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