Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Quanah Gibson-Mount
OpenLDAP
Commits
1d1c1edf
Commit
1d1c1edf
authored
Jan 10, 2001
by
Kurt Zeilenga
Browse files
update rand file after use
parent
2ae02fc1
Changes
1
Hide whitespace changes
Inline
Side-by-side
libraries/libldap/tls.c
View file @
1d1c1edf
...
...
@@ -1071,6 +1071,7 @@ tls_seed_PRNG( const char *randfile )
{
#ifndef URANDOM_DEVICE
/* no /dev/urandom (or equiv) */
long
total
=
0
;
char
buffer
[
MAXPATHLEN
];
if
(
randfile
==
NULL
)
{
...
...
@@ -1093,7 +1094,7 @@ tls_seed_PRNG( const char *randfile )
return
-
1
;
}
RAND_load_file
(
randfile
,
-
1
);
total
=
RAND_load_file
(
randfile
,
-
1
);
if
(
RAND_status
()
==
0
)
{
Debug
(
LDAP_DEBUG_ANY
,
...
...
@@ -1101,6 +1102,12 @@ tls_seed_PRNG( const char *randfile )
0
,
0
,
0
);
return
-
1
;
}
/* assume if there was enough bits to seed that it's okay
* to write derived bits to the file
*/
RAND_write_file
(
randfile
);
#endif
return
0
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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