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
c9e0fa44
Commit
c9e0fa44
authored
Nov 28, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Nov 29, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Support getting and setting the KP_PADDING key param.
parent
f6705c67
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
8 deletions
+20
-8
rsaenh.c
dlls/rsaenh/rsaenh.c
+20
-8
No files found.
dlls/rsaenh/rsaenh.c
View file @
c9e0fa44
...
...
@@ -2798,6 +2798,14 @@ BOOL WINAPI RSAENH_CPSetKeyParam(HCRYPTPROV hProv, HCRYPTKEY hKey, DWORD dwParam
}
switch
(
dwParam
)
{
case
KP_PADDING
:
/* The MS providers only support PKCS5_PADDING */
if
(
*
(
DWORD
*
)
pbData
!=
PKCS5_PADDING
)
{
SetLastError
(
NTE_BAD_DATA
);
return
FALSE
;
}
return
TRUE
;
case
KP_MODE
:
pCryptKey
->
dwMode
=
*
(
DWORD
*
)
pbData
;
return
TRUE
;
...
...
@@ -2901,7 +2909,7 @@ BOOL WINAPI RSAENH_CPGetKeyParam(HCRYPTPROV hProv, HCRYPTKEY hKey, DWORD dwParam
DWORD
*
pdwDataLen
,
DWORD
dwFlags
)
{
CRYPTKEY
*
pCryptKey
;
DWORD
dw
BitLen
;
DWORD
dw
Value
;
TRACE
(
"(hProv=%08lx, hKey=%08lx, dwParam=%08x, pbData=%p, pdwDataLen=%p dwFlags=%08x)
\n
"
,
hProv
,
hKey
,
dwParam
,
pbData
,
pdwDataLen
,
dwFlags
);
...
...
@@ -2933,20 +2941,24 @@ BOOL WINAPI RSAENH_CPGetKeyParam(HCRYPTPROV hProv, HCRYPTKEY hKey, DWORD dwParam
return
copy_param
(
pbData
,
pdwDataLen
,
(
CONST
BYTE
*
)
&
pCryptKey
->
abKeyValue
[
pCryptKey
->
dwKeyLen
],
pCryptKey
->
dwSaltLen
);
case
KP_PADDING
:
dwValue
=
PKCS5_PADDING
;
return
copy_param
(
pbData
,
pdwDataLen
,
(
CONST
BYTE
*
)
&
dwValue
,
sizeof
(
DWORD
));
case
KP_KEYLEN
:
dw
BitLen
=
pCryptKey
->
dwKeyLen
<<
3
;
return
copy_param
(
pbData
,
pdwDataLen
,
(
CONST
BYTE
*
)
&
dw
BitLen
,
sizeof
(
DWORD
));
dw
Value
=
pCryptKey
->
dwKeyLen
<<
3
;
return
copy_param
(
pbData
,
pdwDataLen
,
(
CONST
BYTE
*
)
&
dw
Value
,
sizeof
(
DWORD
));
case
KP_EFFECTIVE_KEYLEN
:
if
(
pCryptKey
->
dwEffectiveKeyLen
)
dw
BitLen
=
pCryptKey
->
dwEffectiveKeyLen
;
dw
Value
=
pCryptKey
->
dwEffectiveKeyLen
;
else
dw
BitLen
=
pCryptKey
->
dwKeyLen
<<
3
;
return
copy_param
(
pbData
,
pdwDataLen
,
(
CONST
BYTE
*
)
&
dw
BitLen
,
sizeof
(
DWORD
));
dw
Value
=
pCryptKey
->
dwKeyLen
<<
3
;
return
copy_param
(
pbData
,
pdwDataLen
,
(
CONST
BYTE
*
)
&
dw
Value
,
sizeof
(
DWORD
));
case
KP_BLOCKLEN
:
dw
BitLen
=
pCryptKey
->
dwBlockLen
<<
3
;
return
copy_param
(
pbData
,
pdwDataLen
,
(
CONST
BYTE
*
)
&
dw
BitLen
,
sizeof
(
DWORD
));
dw
Value
=
pCryptKey
->
dwBlockLen
<<
3
;
return
copy_param
(
pbData
,
pdwDataLen
,
(
CONST
BYTE
*
)
&
dw
Value
,
sizeof
(
DWORD
));
case
KP_MODE
:
return
copy_param
(
pbData
,
pdwDataLen
,
(
CONST
BYTE
*
)
&
pCryptKey
->
dwMode
,
sizeof
(
DWORD
));
...
...
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