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
cc1e6eed
Commit
cc1e6eed
authored
Jan 28, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Jan 29, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rsaenh: Honor the CRYPT_EXPORTABLE flags to CryptImportKey.
parent
ba01e7b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
rsaenh.c
dlls/rsaenh/rsaenh.c
+8
-1
No files found.
dlls/rsaenh/rsaenh.c
View file @
cc1e6eed
...
...
@@ -2371,7 +2371,8 @@ BOOL WINAPI RSAENH_CPExportKey(HCRYPTPROV hProv, HCRYPTKEY hKey, HCRYPTKEY hPubK
* pbData [I] Pointer to a buffer which holds the BLOB.
* dwDataLen [I] Length of data in buffer at pbData.
* hPubKey [I] Key used to decrypt sensitive BLOB data.
* dwFlags [I] Currently none defined.
* dwFlags [I] One of:
* CRYPT_EXPORTABLE: the imported key is marked exportable
* phKey [O] Handle to the imported key.
*
* RETURNS
...
...
@@ -2428,6 +2429,8 @@ BOOL WINAPI RSAENH_CPImportKey(HCRYPTPROV hProv, CONST BYTE *pbData, DWORD dwDat
ret
=
import_private_key_impl
((
CONST
BYTE
*
)(
pRSAPubKey
+
1
),
&
pCryptKey
->
context
,
pRSAPubKey
->
bitlen
/
8
,
pRSAPubKey
->
pubexp
);
if
(
ret
)
{
if
(
dwFlags
&
CRYPT_EXPORTABLE
)
pCryptKey
->
dwPermissions
|=
CRYPT_EXPORT
;
switch
(
pBlobHeader
->
aiKeyAlg
)
{
case
AT_SIGNATURE
:
...
...
@@ -2467,6 +2470,8 @@ BOOL WINAPI RSAENH_CPImportKey(HCRYPTPROV hProv, CONST BYTE *pbData, DWORD dwDat
ret
=
import_public_key_impl
((
CONST
BYTE
*
)(
pRSAPubKey
+
1
),
&
pCryptKey
->
context
,
pRSAPubKey
->
bitlen
>>
3
,
pRSAPubKey
->
pubexp
);
if
(
ret
)
{
if
(
dwFlags
&
CRYPT_EXPORTABLE
)
pCryptKey
->
dwPermissions
|=
CRYPT_EXPORT
;
switch
(
pBlobHeader
->
aiKeyAlg
)
{
case
AT_KEYEXCHANGE
:
...
...
@@ -2514,6 +2519,8 @@ BOOL WINAPI RSAENH_CPImportKey(HCRYPTPROV hProv, CONST BYTE *pbData, DWORD dwDat
memcpy
(
pCryptKey
->
abKeyValue
,
pbDecrypted
,
dwKeyLen
);
HeapFree
(
GetProcessHeap
(),
0
,
pbDecrypted
);
setup_key
(
pCryptKey
);
if
(
dwFlags
&
CRYPT_EXPORTABLE
)
pCryptKey
->
dwPermissions
|=
CRYPT_EXPORT
;
return
TRUE
;
default:
...
...
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