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
c579945b
Commit
c579945b
authored
Jul 12, 2014
by
Bruno Jesus
Committed by
Alexandre Julliard
Jul 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rsaenh/tests: Add DES/3DES-112 const buffer test.
parent
50ded4b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
rsaenh.c
dlls/rsaenh/tests/rsaenh.c
+11
-1
No files found.
dlls/rsaenh/tests/rsaenh.c
View file @
c579945b
...
@@ -802,6 +802,9 @@ static void test_3des112(void)
...
@@ -802,6 +802,9 @@ static void test_3des112(void)
BOOL
result
;
BOOL
result
;
DWORD
dwLen
;
DWORD
dwLen
;
unsigned
char
pbData
[
16
],
enc_data
[
16
],
bad_data
[
16
];
unsigned
char
pbData
[
16
],
enc_data
[
16
],
bad_data
[
16
];
static
const
BYTE
des112
[
16
]
=
{
0x8e
,
0x0c
,
0x3c
,
0xa3
,
0x05
,
0x88
,
0x5f
,
0x7a
,
0x32
,
0xa1
,
0x06
,
0x52
,
0x64
,
0xd2
,
0x44
,
0x1c
};
int
i
;
int
i
;
result
=
derive_key
(
CALG_3DES_112
,
&
hKey
,
0
);
result
=
derive_key
(
CALG_3DES_112
,
&
hKey
,
0
);
...
@@ -817,6 +820,8 @@ static void test_3des112(void)
...
@@ -817,6 +820,8 @@ static void test_3des112(void)
result
=
CryptEncrypt
(
hKey
,
0
,
TRUE
,
0
,
pbData
,
&
dwLen
,
16
);
result
=
CryptEncrypt
(
hKey
,
0
,
TRUE
,
0
,
pbData
,
&
dwLen
,
16
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
ok
(
!
memcmp
(
pbData
,
des112
,
sizeof
(
des112
)),
"3DES_112 encryption failed!
\n
"
);
result
=
CryptDecrypt
(
hKey
,
0
,
TRUE
,
0
,
pbData
,
&
dwLen
);
result
=
CryptDecrypt
(
hKey
,
0
,
TRUE
,
0
,
pbData
,
&
dwLen
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
...
@@ -886,9 +891,12 @@ static void test_des(void)
...
@@ -886,9 +891,12 @@ static void test_des(void)
BOOL
result
;
BOOL
result
;
DWORD
dwLen
,
dwMode
;
DWORD
dwLen
,
dwMode
;
unsigned
char
pbData
[
16
],
enc_data
[
16
],
bad_data
[
16
];
unsigned
char
pbData
[
16
],
enc_data
[
16
],
bad_data
[
16
];
static
const
BYTE
des
[
16
]
=
{
0x58
,
0x86
,
0x42
,
0x46
,
0x65
,
0x4b
,
0x92
,
0x62
,
0xcf
,
0x0f
,
0x65
,
0x37
,
0x43
,
0x7a
,
0x82
,
0xb9
};
int
i
;
int
i
;
result
=
derive_key
(
CALG_DES
,
&
hKey
,
56
);
result
=
derive_key
(
CALG_DES
,
&
hKey
,
0
);
if
(
!
result
)
{
if
(
!
result
)
{
/* rsaenh compiled without OpenSSL */
/* rsaenh compiled without OpenSSL */
ok
(
GetLastError
()
==
NTE_BAD_ALGID
,
"%08x
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
NTE_BAD_ALGID
,
"%08x
\n
"
,
GetLastError
());
...
@@ -909,6 +917,8 @@ static void test_des(void)
...
@@ -909,6 +917,8 @@ static void test_des(void)
result
=
CryptEncrypt
(
hKey
,
0
,
TRUE
,
0
,
pbData
,
&
dwLen
,
16
);
result
=
CryptEncrypt
(
hKey
,
0
,
TRUE
,
0
,
pbData
,
&
dwLen
,
16
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
ok
(
!
memcmp
(
pbData
,
des
,
sizeof
(
des
)),
"DES encryption failed!
\n
"
);
result
=
CryptDecrypt
(
hKey
,
0
,
TRUE
,
0
,
pbData
,
&
dwLen
);
result
=
CryptDecrypt
(
hKey
,
0
,
TRUE
,
0
,
pbData
,
&
dwLen
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
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