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
b377f834
Commit
b377f834
authored
Feb 15, 2011
by
Juan Lang
Committed by
Alexandre Julliard
Feb 16, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Don't assume a function succeeded (clang).
parent
bcd14a18
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
21 deletions
+25
-21
msg.c
dlls/crypt32/msg.c
+25
-21
No files found.
dlls/crypt32/msg.c
View file @
b377f834
...
...
@@ -1559,38 +1559,42 @@ static BOOL WINAPI CRYPT_ExportKeyTrans(
X509_ASN_ENCODING
,
&
keyInfo
,
&
expKey
);
if
(
ret
)
{
BYTE
*
keyBlob
;
DWORD
size
;
ret
=
CryptExportKey
(
pContentEncryptInfo
->
hContentEncryptKey
,
expKey
,
SIMPLEBLOB
,
0
,
NULL
,
&
size
);
keyBlob
=
CryptMemAlloc
(
size
);
if
(
keyBlob
)
if
(
ret
)
{
ret
=
CryptExportKey
(
pContentEncryptInfo
->
hContentEncryptKey
,
expKey
,
SIMPLEBLOB
,
0
,
keyBlob
,
&
size
);
if
(
ret
)
{
DWORD
head
=
sizeof
(
BLOBHEADER
)
+
sizeof
(
ALG_ID
);
BYTE
*
keyBlob
;
pKeyTransEncryptInfo
->
EncryptedKey
.
pbData
=
CryptMemAlloc
(
size
-
head
);
if
(
pKeyTransEncryptInfo
->
EncryptedKey
.
pbData
)
keyBlob
=
CryptMemAlloc
(
size
);
if
(
keyBlob
)
{
ret
=
CryptExportKey
(
pContentEncryptInfo
->
hContentEncryptKey
,
expKey
,
SIMPLEBLOB
,
0
,
keyBlob
,
&
size
);
if
(
ret
)
{
DWORD
i
,
k
=
0
;
DWORD
head
=
sizeof
(
BLOBHEADER
)
+
sizeof
(
ALG_ID
);
pKeyTransEncryptInfo
->
EncryptedKey
.
pbData
=
CryptMemAlloc
(
size
-
head
);
if
(
pKeyTransEncryptInfo
->
EncryptedKey
.
pbData
)
{
DWORD
i
,
k
=
0
;
pKeyTransEncryptInfo
->
EncryptedKey
.
cbData
=
size
-
head
;
for
(
i
=
size
-
1
;
i
>=
head
;
--
i
,
++
k
)
pKeyTransEncryptInfo
->
EncryptedKey
.
pbData
[
k
]
=
keyBlob
[
i
];
pKeyTransEncryptInfo
->
EncryptedKey
.
cbData
=
size
-
head
;
for
(
i
=
size
-
1
;
i
>=
head
;
--
i
,
++
k
)
pKeyTransEncryptInfo
->
EncryptedKey
.
pbData
[
k
]
=
keyBlob
[
i
];
}
else
ret
=
FALSE
;
}
else
ret
=
FALSE
;
CryptMemFree
(
keyBlob
);
}
CryptMemFree
(
keyBlob
);
else
ret
=
FALSE
;
}
else
ret
=
FALSE
;
CryptDestroyKey
(
expKey
);
}
...
...
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