deraadt
9c21f5c33d
#ifdef wrap the _rs_forkhandler
10 years ago
bcook
fca7f5a866
added handler for an atfork hook from kettenis@
ok deraadt@ beck@ kettenis@
10 years ago
tedu
1d810a359a
include stdint.h for standard ints. from Jean-Philippe Ouellet
10 years ago
tedu
37a5836398
oops, i deleted the wrong word
10 years ago
tedu
13ffbefb0f
remove a lie spotted by guenther
10 years ago
tedu
d3e68c8356
once srandomdev() is called, switch to using arc4random() but mask off the
high bit as required by posix. wouldn't want to break any standards.
idea and ok deraadt
10 years ago
deraadt
1efcd9909f
Use dl_iterate_phdr() to iterate over the segments and throw the addresses
into the hash; hoping the system has some ASLR or PIE. This replaces and
substantially improves upon &main which proved problematic with some picky
linkers.
Work with kettenis, testing by beck
10 years ago
deraadt
757bd836f8
Provide a link to the canonical API specification.
ok beck
10 years ago
beck
6289d57278
While we thought this would make portable life easier it actually
makes it much harder.
ok bcook@ kettenis@
10 years ago
beck
7f965a2eac
Take away the use of the address of main as a source of entropy. Causes
distractions to people testing and seeing link errors in some setups.
This will come back in another form
ok deraadt@
10 years ago
wouter
455c599158
getentropy on Windows. It compiles but has not been thoroughly tested yet.
OK: beck@
10 years ago
wouter
ca0c9eb852
Remove signed/unsigned warning, statement before declaration and
add a function to use function pointers that does not take sizeof(fptr).
OK beck@
10 years ago
miod
9b1d48d8cc
Remove private_{Camellia,RC4}_set_key FIPS indirection tentacles, as has been
done for other symmetric algorithms recently.
10 years ago
deraadt
30150934f0
Wrap "thread_private.h" with #ifdef __OpenBSD__ so that other systems
can copy this file (plus chacha_private.h) directly and reuse it
trivially. Well, as long as they have a getentropy() as well..
ok beck
10 years ago
beck
279cc5b646
guard inclusion of sys/sysctl.h so we can detect at compile time and
keep linux distros happy that don't have it.
ok bcook@
10 years ago
deraadt
bf34b69892
remove gratuitous differences, ok beck
10 years ago
deraadt
96303f230c
remove gratuitous differences, ok beck bcook
10 years ago
deraadt
3f9dd576c8
Split arc4random_uniform into it's own file, to assist other projects
now using this as upstream code. The particular problem is systems
that contain older arc4random derivations lacking arc4random_uniform().
ok tedu miod
10 years ago
beck
a99ff4bd9f
Solaris uses a symbolic link for /dev/urandom which harms best practice of
using O_NOFOLLOW - cope with it as best as possible by trying two
different paths. - written by deraadt@ and kettenis@
10 years ago
deraadt
25da0193d5
odds are that some ABI change occured today, no matter how careful everyone
is
10 years ago
tedu
5bee4066ca
i'm a dumbdumb. fix build.
10 years ago
tedu
447cee822e
move all the feature settings to a common header.
probably ok beck jsing miod
10 years ago
beck
2e9cadcb9c
Make sure we leave OPENSSL_NO_PSK in the conf files so things
can know...
ok jsing@
10 years ago
kettenis
78bf858a52
Add locking for __cxa_finalize() as it modifies the page permissions of the
__atexit tables and touches global variables. From Srinavasa Nagaraju
through Android/Elliott Hughes.
ok tedu@, guenther@
10 years ago
tedu
ae7f8bb30d
better document perils of setuid getenv and xr with issetugid
ok deraadt
10 years ago
tedu
beacb71783
as noted by google/android via kettenis, atexit handlers can install new
handlers. if this happens, restart the loop.
ok kettenis matthew millert miod
10 years ago
tedu
705f1bf46e
reduce obvious dependency on global g_pool by moving to local aliases
ok otto
10 years ago
naddy
33c9c303eb
rephrase the stpcpy() warning
new wording agreed by at least kettenis@ millert@ otto@
10 years ago
beck
97abe91297
Clean up after arc4random u_int32_t uint32_t change
ok jsing@
10 years ago
bcook
165f09edc7
changes to improve portability
ok beck@ deraadt@ jsing@ guenther@
10 years ago
bcook
a3816c6eb6
remove unused variables getentropy for OS X
ok beck@
10 years ago
miod
32c03af696
RSA_NULL used to be a compile option allowing the RSA interfaces to be
compiled-in, with nonfunctional code, to be able to cope with the RSA
patent.
However, we don't use this option, and the RSA patent has expired more than 10
years ago, so just drop this piece.
10 years ago
miod
892a9183d4
Remove undocumented _des_crypt() interface and its companion header file,
which had never been installed, so it's unlikely something ever used this
in the last 15~20 years.
ok deraadt@ jsing@ beck@
10 years ago
beck
91875b6d33
getentropy for osx and solaris. will be needed for a portable release
10 years ago
beck
b7e16f9d19
fix oops, accidental delete.. darn copying of files between machines
10 years ago
beck
8de43bf12f
j should be an int, like repeat
10 years ago
beck
287fe24a2f
unbreak last commit - but same intent, make re-seed less expensive
10 years ago
deraadt
bc5b290d46
repeat calls to getentrypy() with the same pid likely indicate reseeds.
Since we assume the PRNG above is doing "something old, something new"
folding, shortcut and do fewer repeats through the timing loop.
ok beck
10 years ago
deraadt
1a1b9e989b
sys/types.h rather than sys/param.h, where applicable. avoid overreach.
10 years ago
deraadt
d1fde0ca73
sort includes much more sensibly
10 years ago
deraadt
55d6095cc3
limits.h rather than sys/param.h
10 years ago
deraadt
b3e0f519ff
re-init and init code paths are now more shared, so the getpid()-based
portable code path must handle that; with brent cook
10 years ago
deraadt
df559b50e4
extra evil spaces snuck in over the last while
10 years ago
otto
08ecfcb5b8
Move to a smaller rbytes buffer and skip a random part. Not to
improve the random stream itself (it doesn't), but to introduce
noise in the arc4random calling pattern. Thanks to matthew@ who
pointed out bias in a previous diff, ok deraadt@ matthew@
10 years ago
deraadt
b6b255face
Add back an #ifndef MAP_INHERIT_ZERO chunk to support the old getpid()
mechanism, to aid in portability to other systems as requested.
ok matthew
10 years ago
deraadt
0dedf80951
fix HD() misuse; from brent cook
10 years ago
beck
344e312a56
AT_BASE returns us the *address* of the start of ld.so, so
use the address, not what it points to (which is always the same)
ok deraadt@
10 years ago
beck
aed4dc98fb
get the page of data at AT_SYSINFO_EHDR
ok deraadt@
10 years ago
beck
802d41544e
comment fixes from theo
10 years ago
beck
eaa7e91438
Possibly obtain a little bit of entropy from addresses returned
by getauxval if we have it.
ok deraadt@
10 years ago