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
bd78de79
Commit
bd78de79
authored
May 27, 2005
by
Michael Jung
Committed by
Alexandre Julliard
May 27, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use SystemFunction036 to generate random bytes.
parent
12497168
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
19 deletions
+3
-19
implglue.c
dlls/rsaenh/implglue.c
+3
-19
No files found.
dlls/rsaenh/implglue.c
View file @
bd78de79
...
...
@@ -47,6 +47,8 @@ VOID WINAPI MD5Final( MD5_CTX *ctx );
VOID
WINAPI
A_SHAInit
(
PSHA_CTX
Context
);
VOID
WINAPI
A_SHAUpdate
(
PSHA_CTX
Context
,
PCHAR
Buffer
,
UINT
BufferSize
);
VOID
WINAPI
A_SHAFinal
(
PSHA_CTX
Context
,
PULONG
Result
);
/* Function prototype copied from dlls/advapi32/crypt.c */
BOOL
WINAPI
SystemFunction036
(
PVOID
pbBuffer
,
ULONG
dwLen
);
BOOL
init_hash_impl
(
ALG_ID
aiAlgid
,
HASH_CONTEXT
*
pHashContext
)
{
...
...
@@ -337,25 +339,7 @@ BOOL encrypt_stream_impl(ALG_ID aiAlgid, KEY_CONTEXT *pKeyContext, BYTE *stream,
BOOL
gen_rand_impl
(
BYTE
*
pbBuffer
,
DWORD
dwLen
)
{
int
dev_random
;
/* FIXME: /dev/urandom does not provide random numbers of a sufficient
* quality for cryptographic applications. /dev/random is much better,
* but it blocks if the kernel has not yet collected enough entropy for
* the request, which will suspend the calling thread for an indefinite
* amount of time. */
dev_random
=
open
(
"/dev/urandom"
,
O_RDONLY
);
if
(
dev_random
!=
-
1
)
{
if
(
read
(
dev_random
,
pbBuffer
,
dwLen
)
==
(
ssize_t
)
dwLen
)
{
close
(
dev_random
);
return
TRUE
;
}
close
(
dev_random
);
}
SetLastError
(
NTE_FAIL
);
return
FALSE
;
return
SystemFunction036
(
pbBuffer
,
dwLen
);
}
BOOL
export_public_key_impl
(
BYTE
*
pbDest
,
KEY_CONTEXT
*
pKeyContext
,
DWORD
dwKeyLen
,
DWORD
*
pdwPubExp
)
...
...
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