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
54b972e2
Commit
54b972e2
authored
Oct 26, 2011
by
Juan Lang
Committed by
Alexandre Julliard
Nov 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rsaenh: Add error messages for failed private key imports.
parent
ee3c0c3e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
rsaenh.c
dlls/rsaenh/rsaenh.c
+19
-3
No files found.
dlls/rsaenh/rsaenh.c
View file @
54b972e2
...
...
@@ -2731,11 +2731,27 @@ static BOOL import_private_key(HCRYPTPROV hProv, CONST BYTE *pbData, DWORD dwDat
return
FALSE
;
}
if
((
dwDataLen
<
sizeof
(
BLOBHEADER
)
+
sizeof
(
RSAPUBKEY
))
||
(
pRSAPubKey
->
magic
!=
RSAENH_MAGIC_RSA2
)
||
(
dwDataLen
<
sizeof
(
BLOBHEADER
)
+
sizeof
(
RSAPUBKEY
)
+
if
((
dwDataLen
<
sizeof
(
BLOBHEADER
)
+
sizeof
(
RSAPUBKEY
)))
{
ERR
(
"datalen %d not long enough for a BLOBHEADER + RSAPUBKEY
\n
"
,
dwDataLen
);
SetLastError
(
NTE_BAD_DATA
);
return
FALSE
;
}
if
(
pRSAPubKey
->
magic
!=
RSAENH_MAGIC_RSA2
)
{
ERR
(
"unexpected magic %08x
\n
"
,
pRSAPubKey
->
magic
);
SetLastError
(
NTE_BAD_DATA
);
return
FALSE
;
}
if
((
dwDataLen
<
sizeof
(
BLOBHEADER
)
+
sizeof
(
RSAPUBKEY
)
+
(
2
*
pRSAPubKey
->
bitlen
>>
3
)
+
(
5
*
((
pRSAPubKey
->
bitlen
+
8
)
>>
4
))))
{
DWORD
expectedLen
=
sizeof
(
BLOBHEADER
)
+
sizeof
(
RSAPUBKEY
)
+
(
2
*
pRSAPubKey
->
bitlen
>>
3
)
+
(
5
*
((
pRSAPubKey
->
bitlen
+
8
)
>>
4
));
ERR
(
"blob too short for pub key: expect %d, got %d
\n
"
,
expectedLen
,
dwDataLen
);
SetLastError
(
NTE_BAD_DATA
);
return
FALSE
;
}
...
...
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