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
1cc58867
Commit
1cc58867
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 flag to CryptAcquireContext and CryptGenKey.
parent
cc1e6eed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
rsaenh.c
dlls/rsaenh/rsaenh.c
+4
-1
rsaenh.c
dlls/rsaenh/tests/rsaenh.c
+0
-1
No files found.
dlls/rsaenh/rsaenh.c
View file @
1cc58867
...
@@ -755,7 +755,8 @@ static inline void setup_key(CRYPTKEY *pCryptKey) {
...
@@ -755,7 +755,8 @@ static inline void setup_key(CRYPTKEY *pCryptKey) {
* hProv [I] Handle to the provider to which the created key will belong.
* hProv [I] Handle to the provider to which the created key will belong.
* aiAlgid [I] The new key shall use the crypto algorithm idenfied by aiAlgid.
* aiAlgid [I] The new key shall use the crypto algorithm idenfied by aiAlgid.
* dwFlags [I] Upper 16 bits give the key length.
* dwFlags [I] Upper 16 bits give the key length.
* Lower 16 bits: CRYPT_CREATE_SALT, CRYPT_NO_SALT
* Lower 16 bits: CRYPT_EXPORTABLE, CRYPT_CREATE_SALT,
* CRYPT_NO_SALT
* ppCryptKey [O] Pointer to the created key
* ppCryptKey [O] Pointer to the created key
*
*
* RETURNS
* RETURNS
...
@@ -836,6 +837,8 @@ static HCRYPTKEY new_key(HCRYPTPROV hProv, ALG_ID aiAlgid, DWORD dwFlags, CRYPTK
...
@@ -836,6 +837,8 @@ static HCRYPTKEY new_key(HCRYPTPROV hProv, ALG_ID aiAlgid, DWORD dwFlags, CRYPTK
pCryptKey
->
dwModeBits
=
0
;
pCryptKey
->
dwModeBits
=
0
;
pCryptKey
->
dwPermissions
=
CRYPT_ENCRYPT
|
CRYPT_DECRYPT
|
CRYPT_READ
|
CRYPT_WRITE
|
pCryptKey
->
dwPermissions
=
CRYPT_ENCRYPT
|
CRYPT_DECRYPT
|
CRYPT_READ
|
CRYPT_WRITE
|
CRYPT_MAC
;
CRYPT_MAC
;
if
(
dwFlags
&
CRYPT_EXPORTABLE
)
pCryptKey
->
dwPermissions
|=
CRYPT_EXPORT
;
pCryptKey
->
dwKeyLen
=
dwKeyLen
>>
3
;
pCryptKey
->
dwKeyLen
=
dwKeyLen
>>
3
;
pCryptKey
->
dwEffectiveKeyLen
=
0
;
pCryptKey
->
dwEffectiveKeyLen
=
0
;
if
((
dwFlags
&
CRYPT_CREATE_SALT
)
||
(
dwKeyLen
==
40
&&
!
(
dwFlags
&
CRYPT_NO_SALT
)))
if
((
dwFlags
&
CRYPT_CREATE_SALT
)
||
(
dwKeyLen
==
40
&&
!
(
dwFlags
&
CRYPT_NO_SALT
)))
...
...
dlls/rsaenh/tests/rsaenh.c
View file @
1cc58867
...
@@ -2137,7 +2137,6 @@ static void test_key_permissions(void)
...
@@ -2137,7 +2137,6 @@ static void test_key_permissions(void)
dwLen
=
sizeof
(
DWORD
);
dwLen
=
sizeof
(
DWORD
);
result
=
CryptGetKeyParam
(
hKey1
,
KP_PERMISSIONS
,
(
BYTE
*
)
&
dwVal
,
&
dwLen
,
0
);
result
=
CryptGetKeyParam
(
hKey1
,
KP_PERMISSIONS
,
(
BYTE
*
)
&
dwVal
,
&
dwLen
,
0
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
todo_wine
ok
(
dwVal
==
ok
(
dwVal
==
(
CRYPT_MAC
|
CRYPT_WRITE
|
CRYPT_READ
|
CRYPT_EXPORT
|
CRYPT_DECRYPT
|
CRYPT_ENCRYPT
),
(
CRYPT_MAC
|
CRYPT_WRITE
|
CRYPT_READ
|
CRYPT_EXPORT
|
CRYPT_DECRYPT
|
CRYPT_ENCRYPT
),
"expected CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_EXPORT|CRYPT_DECRYPT|CRYPT_ENCRYPT,"
"expected CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_EXPORT|CRYPT_DECRYPT|CRYPT_ENCRYPT,"
...
...
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