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
2d0653e2
Commit
2d0653e2
authored
Jun 29, 2013
by
Qian Hong
Committed by
Alexandre Julliard
Jul 01, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rsaenh: Restore key state even after decrypting a block of bad data.
parent
b84e11ec
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
rsaenh.c
dlls/rsaenh/rsaenh.c
+2
-0
rsaenh.c
dlls/rsaenh/tests/rsaenh.c
+0
-2
No files found.
dlls/rsaenh/rsaenh.c
View file @
2d0653e2
...
@@ -2380,11 +2380,13 @@ BOOL WINAPI RSAENH_CPDecrypt(HCRYPTPROV hProv, HCRYPTKEY hKey, HCRYPTHASH hHash,
...
@@ -2380,11 +2380,13 @@ BOOL WINAPI RSAENH_CPDecrypt(HCRYPTPROV hProv, HCRYPTKEY hKey, HCRYPTHASH hHash,
*
pdwDataLen
-=
pbData
[
*
pdwDataLen
-
1
];
*
pdwDataLen
-=
pbData
[
*
pdwDataLen
-
1
];
else
{
else
{
SetLastError
(
NTE_BAD_DATA
);
SetLastError
(
NTE_BAD_DATA
);
setup_key
(
pCryptKey
);
return
FALSE
;
return
FALSE
;
}
}
}
}
else
{
else
{
SetLastError
(
NTE_BAD_DATA
);
SetLastError
(
NTE_BAD_DATA
);
setup_key
(
pCryptKey
);
return
FALSE
;
return
FALSE
;
}
}
}
}
...
...
dlls/rsaenh/tests/rsaenh.c
View file @
2d0653e2
...
@@ -840,7 +840,6 @@ static void test_3des112(void)
...
@@ -840,7 +840,6 @@ static void test_3des112(void)
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
());
ok
(
dwLen
==
cTestData
[
i
].
enclen
,
"length incorrect, got %d, expected %d
\n
"
,
dwLen
,
cTestData
[
i
].
enclen
);
ok
(
dwLen
==
cTestData
[
i
].
enclen
,
"length incorrect, got %d, expected %d
\n
"
,
dwLen
,
cTestData
[
i
].
enclen
);
todo_wine
ok
(
memcmp
(
pbData
,
cTestData
[
i
].
decstr
,
cTestData
[
1
].
enclen
)
==
0
,
"decryption incorrect %d
\n
"
,
i
);
ok
(
memcmp
(
pbData
,
cTestData
[
i
].
decstr
,
cTestData
[
1
].
enclen
)
==
0
,
"decryption incorrect %d
\n
"
,
i
);
if
((
dwLen
!=
cTestData
[
i
].
enclen
)
||
if
((
dwLen
!=
cTestData
[
i
].
enclen
)
||
memcmp
(
pbData
,
cTestData
[
i
].
decstr
,
cTestData
[
i
].
enclen
))
memcmp
(
pbData
,
cTestData
[
i
].
decstr
,
cTestData
[
i
].
enclen
))
...
@@ -1019,7 +1018,6 @@ static void test_3des(void)
...
@@ -1019,7 +1018,6 @@ static void test_3des(void)
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
());
ok
(
dwLen
==
cTestData
[
i
].
enclen
,
"length incorrect, got %d, expected %d
\n
"
,
dwLen
,
cTestData
[
i
].
enclen
);
ok
(
dwLen
==
cTestData
[
i
].
enclen
,
"length incorrect, got %d, expected %d
\n
"
,
dwLen
,
cTestData
[
i
].
enclen
);
todo_wine
ok
(
memcmp
(
pbData
,
cTestData
[
i
].
decstr
,
cTestData
[
1
].
enclen
)
==
0
,
"decryption incorrect %d
\n
"
,
i
);
ok
(
memcmp
(
pbData
,
cTestData
[
i
].
decstr
,
cTestData
[
1
].
enclen
)
==
0
,
"decryption incorrect %d
\n
"
,
i
);
if
((
dwLen
!=
cTestData
[
i
].
enclen
)
||
if
((
dwLen
!=
cTestData
[
i
].
enclen
)
||
memcmp
(
pbData
,
cTestData
[
i
].
decstr
,
cTestData
[
i
].
enclen
))
memcmp
(
pbData
,
cTestData
[
i
].
decstr
,
cTestData
[
i
].
enclen
))
...
...
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