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
9ff16aa1
Commit
9ff16aa1
authored
Mar 10, 2022
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcrypt: Return an error when BCryptFinalizeKeyPair() is called twice.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
545ec32d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
gnutls.c
dlls/bcrypt/gnutls.c
+1
-0
bcrypt.c
dlls/bcrypt/tests/bcrypt.c
+6
-0
No files found.
dlls/bcrypt/gnutls.c
View file @
9ff16aa1
...
...
@@ -846,6 +846,7 @@ static NTSTATUS key_asymmetric_generate( void *args )
int
ret
;
if
(
!
libgnutls_handle
)
return
STATUS_INTERNAL_ERROR
;
if
(
key_data
(
key
)
->
privkey
)
return
STATUS_INVALID_HANDLE
;
switch
(
key
->
alg_id
)
{
...
...
dlls/bcrypt/tests/bcrypt.c
View file @
9ff16aa1
...
...
@@ -2157,6 +2157,9 @@ static void test_RSA(void)
ret
=
BCryptImportKeyPair
(
alg
,
NULL
,
BCRYPT_RSAPRIVATE_BLOB
,
&
key
,
rsaPrivateBlob
,
sizeof
(
rsaPrivateBlob
),
0
);
ok
(
ret
==
STATUS_SUCCESS
,
"got %#lx
\n
"
,
ret
);
ret
=
BCryptFinalizeKeyPair
(
key
,
0
);
ok
(
ret
==
STATUS_INVALID_HANDLE
,
"got %#lx
\n
"
,
ret
);
size
=
0
;
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
rsaPrivateBlob
));
ret
=
BCryptExportKey
(
key
,
NULL
,
BCRYPT_RSAPRIVATE_BLOB
,
buf
,
sizeof
(
rsaPrivateBlob
),
&
size
,
0
);
...
...
@@ -2565,6 +2568,9 @@ static void test_BCryptSignHash(void)
ret
=
BCryptFinalizeKeyPair
(
key
,
0
);
ok
(
ret
==
STATUS_SUCCESS
,
"got %#lx
\n
"
,
ret
);
ret
=
BCryptFinalizeKeyPair
(
key
,
0
);
ok
(
ret
==
STATUS_INVALID_HANDLE
,
"got %#lx
\n
"
,
ret
);
len
=
0
;
memset
(
sig
,
0
,
sizeof
(
sig
));
...
...
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