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
f067283f
Commit
f067283f
authored
Dec 11, 2023
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 18, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcrypt: Assume we have a public key in key_export_dh_public().
parent
dfbbfd6f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
gnutls.c
dlls/bcrypt/gnutls.c
+4
-9
No files found.
dlls/bcrypt/gnutls.c
View file @
f067283f
...
...
@@ -1657,7 +1657,7 @@ static NTSTATUS key_export_dh_public( struct key *key, UCHAR *buf, ULONG len, UL
BCRYPT_DH_KEY_BLOB
*
dh_blob
=
(
BCRYPT_DH_KEY_BLOB
*
)
buf
;
ULONG
size
=
key
->
u
.
a
.
bitlen
/
8
;
gnutls_dh_params_t
params
;
gnutls_datum_t
p
,
g
,
y
,
x
=
{
0
}
;
gnutls_datum_t
p
,
g
,
y
;
UCHAR
*
dst
;
int
ret
=
GNUTLS_E_INVALID_REQUEST
;
...
...
@@ -1667,12 +1667,7 @@ static NTSTATUS key_export_dh_public( struct key *key, UCHAR *buf, ULONG len, UL
return
STATUS_INTERNAL_ERROR
;
}
if
(
key_data
(
key
)
->
a
.
pubkey
)
ret
=
pgnutls_pubkey_export_dh_raw
(
key_data
(
key
)
->
a
.
pubkey
,
params
,
&
y
,
0
);
else
if
(
key_data
(
key
)
->
a
.
privkey
)
ret
=
pgnutls_privkey_export_dh_raw
(
key_data
(
key
)
->
a
.
privkey
,
params
,
&
y
,
&
x
,
0
);
if
(
ret
)
if
((
ret
=
pgnutls_pubkey_export_dh_raw
(
key_data
(
key
)
->
a
.
pubkey
,
params
,
&
y
,
0
)))
{
pgnutls_perror
(
ret
);
pgnutls_dh_params_deinit
(
params
);
...
...
@@ -1682,7 +1677,7 @@ static NTSTATUS key_export_dh_public( struct key *key, UCHAR *buf, ULONG len, UL
if
((
ret
=
pgnutls_dh_params_export_raw
(
params
,
&
p
,
&
g
,
NULL
))
<
0
)
{
pgnutls_perror
(
ret
);
free
(
y
.
data
);
free
(
x
.
data
);
free
(
y
.
data
);
pgnutls_dh_params_deinit
(
params
);
return
STATUS_INTERNAL_ERROR
;
}
...
...
@@ -1699,7 +1694,7 @@ static NTSTATUS key_export_dh_public( struct key *key, UCHAR *buf, ULONG len, UL
dh_blob
->
cbKey
=
size
;
}
free
(
p
.
data
);
free
(
g
.
data
);
free
(
y
.
data
);
free
(
x
.
data
);
free
(
p
.
data
);
free
(
g
.
data
);
free
(
y
.
data
);
return
STATUS_SUCCESS
;
}
...
...
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