summaryrefslogtreecommitdiffstats
path: root/entropy.c
AgeCommit message (Collapse)Author
2020-01-23Fix a couple of mysig_t leftovers.Darren Tucker
2020-01-23upstream: Replace all calls to signal(2) with a wrapper arounddtucker@openbsd.org
sigaction(2). This wrapper blocks all other signals during the handler preventing races between handlers, and sets SA_RESTART which should reduce the potential for short read/write operations. OpenBSD-Commit-ID: 5e047663fd77a40d7b07bdabe68529df51fd2519
2019-10-02typo in commentDamien Miller
2019-07-23Add headers to prevent warnings w/out OpenSSL.Darren Tucker
2019-07-06Add missing bracket in EGD seeding code.Darren Tucker
When configured --with-prngd-socket the code had a missing bracket after an API change. Fix that and a couple of warnings. bz#3032 , from ole.weidner at protonmail.ch
2018-11-23Move RANDOM_SEED_SIZE outside ifdef.Darren Tucker
RANDOM_SEED_SIZE is used by both the OpenSSL and non-OpenSSL code This fixes the build with configureed --without-openssl.
2018-11-23refactor libcrypto initialisationDamien Miller
Don't call OpenSSL_add_all_algorithms() unless OpenSSL actually supports it. Move all libcrypto initialisation to a single function, and call that from seed_rng() that is called early in each tool's main(). Prompted by patch from Rosen Penev
2018-10-23remove remaining references to SSLeayDamien Miller
Prompted by Rosen Penev
2018-07-10Adapt portable to legacy buffer API removalDamien Miller
2018-02-15Replace remaining mysignal() with signal().Darren Tucker
These seem to have been missed during the replacement of mysignal with #define signal in commit 5ade9ab. Both include the requisite headers to pick up the #define.
2015-01-15support --without-openssl at configure timeDamien Miller
Disables and removes dependency on OpenSSL. Many features don't work and the set of crypto options is greatly restricted. This will only work on system with native arc4random or /dev/urandom. Considered highly experimental for now.
2014-07-02 - djm@cvs.openbsd.org 2014/06/24 01:13:21Damien Miller
[Makefile.in auth-bsdauth.c auth-chall.c auth-options.c auth-rsa.c [auth2-none.c auth2-pubkey.c authfile.c authfile.h cipher-3des1.c [cipher-chachapoly.c cipher-chachapoly.h cipher.c cipher.h [digest-libc.c digest-openssl.c digest.h dns.c entropy.c hmac.h [hostfile.c key.c key.h krl.c monitor.c packet.c rsa.c rsa.h [ssh-add.c ssh-agent.c ssh-dss.c ssh-ecdsa.c ssh-ed25519.c [ssh-keygen.c ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c [ssh-rsa.c sshbuf-misc.c sshbuf.h sshconnect.c sshconnect1.c [sshconnect2.c sshd.c sshkey.c sshkey.h [openbsd-compat/openssl-compat.c openbsd-compat/openssl-compat.h] New key API: refactor key-related functions to be more library-like, existing API is offered as a set of wrappers. with and ok markus@ Thanks also to Ben Hawkes, David Tomaschik, Ivan Fratric, Matthew Dempsky and Ron Bowes for a detailed review a few months ago. NB. This commit also removes portable OpenSSH support for OpenSSL <0.9.8e.
2014-06-17 - (dtucker) [entropy.c openbsd-compat/openssl-compat.{c,h}Darren Tucker
openbsd-compat/regress/{.cvsignore,Makefile.in,opensslvertest.c}] Move the OpenSSL header/library version test into its own function and add tests for it. Fix it to allow fix version upgrades (but not downgrades). Prompted by chl@ via OpenSMTPD (issue #462) and Debian (bug #748150). ok djm@ chl@
2012-03-30 - (djm) [entropy.c] bz#1991: relax OpenSSL version test to allow runningDamien Miller
openssh binaries on a newer fix release than they were compiled on. with and ok dtucker@
2011-05-05 - (djm) [Makefile.in WARNING.RNG aclocal.m4 buildpkg.sh.in configure.ac]Damien Miller
[entropy.c ssh-add.c ssh-agent.c ssh-keygen.c ssh-keyscan.c] [ssh-keysign.c ssh-pkcs11-helper.c ssh-rand-helper.8 ssh-rand-helper.c] [ssh.c ssh_prng_cmds.in sshd.c contrib/aix/buildbff.sh] [regress/README.regress] Remove ssh-rand-helper and all its tentacles. PRNGd seeding has been rolled into entropy.c directly. Thanks to tim@ for testing on affected platforms.
2011-01-13 - (djm) [entropy.c] cast OPENSSL_VERSION_NUMBER to u_long to avoidDamien Miller
gcc warning on platforms where it defaults to int
2007-03-13 - (dtucker) [entropy.c scard-opensc.c ssh-rand-helper.c] Bug #1294: includeDarren Tucker
string.h to prevent warnings, from vapier at gentoo.org.
2006-09-28 - (dtucker) [entropy.c] Bug #1238: include signal.h to fix compilation errorDarren Tucker
on Solaris 8 w/out /dev/random or prngd. Patch from rl at math.technion.ac.il.
2006-09-01 - (djm) [audit-bsm.c audit.c auth-bsdauth.c auth-chall.c auth-pam.c]Damien Miller
[auth-rsa.c auth-shadow.c auth-sia.c auth1.c auth2-chall.c] [auth2-gss.c auth2-kbdint.c auth2-none.c authfd.c authfile.c] [cipher-3des1.c cipher-aes.c cipher-bf1.c cipher-ctr.c clientloop.c] [dh.c dns.c entropy.c gss-serv-krb5.c gss-serv.c hostfile.c kex.c] [kexdhc.c kexdhs.c kexgexc.c kexgexs.c key.c loginrec.c mac.c] [md5crypt.c monitor.c monitor_wrap.c readconf.c rsa.c] [scard-opensc.c scard.c session.c ssh-add.c ssh-agent.c ssh-dss.c] [ssh-keygen.c ssh-keysign.c ssh-rsa.c ssh.c sshconnect.c] [sshconnect1.c sshconnect2.c sshd.c rc4.diff] [openbsd-compat/bsd-cray.c openbsd-compat/port-aix.c] [openbsd-compat/port-linux.c openbsd-compat/port-solaris.c] [openbsd-compat/port-uw.c] Lots of headers for SCO OSR6, mainly adding stdarg.h for log.h; compile problems reported by rac AT tenzing.org
2006-08-05 - (dtucker) [entropy.c] Needs unistd.h too.Darren Tucker
2006-08-05 - (djm) [auth-pam.c auth.c bufaux.h entropy.c openbsd-compat/port-tun.c]Damien Miller
remove last traces of bufaux.h - it was merged into buffer.h in the big includes.h commit
2006-07-11 - (dtucker) [entropy.c] More fcntl.h, this time on AIX (and probablyDarren Tucker
others).
2006-03-26 - deraadt@cvs.openbsd.org 2006/03/19 18:51:18Damien Miller
[atomicio.c auth-bsdauth.c auth-chall.c auth-krb5.c auth-options.c] [auth-pam.c auth-passwd.c auth-rh-rsa.c auth-rhosts.c auth-rsa.c] [auth-shadow.c auth-skey.c auth.c auth1.c auth2-chall.c] [auth2-hostbased.c auth2-kbdint.c auth2-none.c auth2-passwd.c] [auth2-pubkey.c auth2.c authfd.c authfile.c bufaux.c buffer.c] [canohost.c channels.c cipher-3des1.c cipher-acss.c cipher-aes.c] [cipher-bf1.c cipher-ctr.c cipher.c cleanup.c clientloop.c compat.c] [compress.c deattack.c dh.c dispatch.c dns.c entropy.c fatal.c] [groupaccess.c hostfile.c includes.h kex.c kexdh.c kexdhc.c] [kexdhs.c kexgex.c kexgexc.c kexgexs.c key.c log.c loginrec.c] [loginrec.h logintest.c mac.c match.c md-sha256.c md5crypt.c misc.c] [monitor.c monitor_fdpass.c monitor_mm.c monitor_wrap.c msg.c] [nchan.c packet.c progressmeter.c readconf.c readpass.c rsa.c] [scard.c scp.c servconf.c serverloop.c session.c sftp-client.c] [sftp-common.c sftp-glob.c sftp-server.c sftp.c ssh-add.c] [ssh-agent.c ssh-dss.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c] [ssh-rand-helper.c ssh-rsa.c ssh.c sshconnect.c sshconnect1.c] [sshconnect2.c sshd.c sshlogin.c sshpty.c sshtty.c ttymodes.c] [uidswap.c uuencode.c xmalloc.c openbsd-compat/bsd-arc4random.c] [openbsd-compat/bsd-closefrom.c openbsd-compat/bsd-cygwin_util.c] [openbsd-compat/bsd-getpeereid.c openbsd-compat/bsd-misc.c] [openbsd-compat/bsd-nextstep.c openbsd-compat/bsd-snprintf.c] [openbsd-compat/bsd-waitpid.c openbsd-compat/fake-rfc2553.c] RCSID() can die
2006-03-16 - (dtucker) [entropy.c] Add headers for WIFEXITED and friends.Darren Tucker
2005-09-28 - (dtucker) [entropy.c] Use u_char for receiving RNG seed for consistencyDarren Tucker
2005-09-27 - (dtucker) [entropy.c entropy.h sshd.c] Pass RNG seed to the reexec'edDarren Tucker
process when sshd relies on ssh-random-helper. Should result in faster logins on systems without a real random device or prngd. ok djm@
2005-09-27 - (dtucker) [entropy.c] Remove unnecessary tests for getuid and geteuidDarren Tucker
calls, since they can't possibly fail. ok djm@
2005-07-17 -(djm) [audit.c auth1.c auth2.c entropy.c loginrec.c serverloop.c]Damien Miller
[ssh-rand-helper.c] fix portable 2nd level indents at 4 spaces too
2003-11-21more whitespace (tabs this time)Damien Miller
2003-11-21 - djm@cvs.openbsd.org 2003/11/21 11:57:03Damien Miller
[everything] unexpand and delete whitespace at EOL; ok markus@ (done locally and RCS IDs synced)
2003-08-25 - (bal) redo how we handle 'mysignal()'. Move it toBen Lindstrom
openbsd-compat/bsd-misc.c, s/mysignal/signal/ and #define signal to be our 'mysignal' by default. OK djm@
2003-05-16 - (djm) A few type mismatch fixes from Bug #565Damien Miller
2002-06-09unexpandBen Lindstrom
2002-04-21[entropy.c.] Portability fix for SCO Unix 3.2v4.x (SCO OSR 3.0).Tim Rice
entropy.c needs seteuid(getuid()) for the setuid(original_uid) to succeed. Patch by gert@greenie.muc.de. This fixes one part of Bug 208
2002-04-18 - (djm) Avoid SIGCHLD breakage when run from rsync. Fix fromDamien Miller
Sturle Sunde <sturle.sunde@usit.uio.no>
2002-03-11 - (stevesk) entropy.c: typo in debug messageKevin Steves
2002-01-22 - (djm) autoconf hacking:Damien Miller
- We don't support --without-zlib currently, so don't allow it. - Rework cryptographic random number support detection. We now detect whether OpenSSL seeds itself. If it does, then we don't bother with the ssh-rand-helper program. You can force the use of ssh-rand-helper using the --with-rand-helper configure argument - Simplify and clean up ssh-rand-helper configuration
2001-12-24 - (djm) Ignore fix & patchlevel in OpenSSL version check. Patch fromDamien Miller
solar@openwall.com - (djm) Rework entropy code. If the OpenSSL PRNG is has not been internally seeded, execute a subprogram "ssh-rand-helper" to obtain some entropy for us. Rewrite the old in-process entropy collecter as an example ssh-rand-helper. - (djm) Always perform ssh_prng_cmds path lookups in configure, even if we don't end up using ssh_prng_cmds (so we always get a valid file)
2001-08-06 - (djm) Fix interrupted read in entropy gatherer. Spotted by markus@ onDamien Miller
a fast UltraSPARC.
2001-06-27 - (djm) Fix a few warnings the above turned upDamien Miller
2001-03-19 - (djm) Seed PRNG at startup, rather than waiting for arc4random calls toDamien Miller
do it implicitly.
2001-03-04 - Allow PRNGd entropy collection from localhost TCP socket. ReplaceDamien Miller
"--with-egd-pool" configure option with "--with-prngd-socket" and "--with-prngd-port" options. Debugged and improved by Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>
2001-02-27avoid warningDamien Miller
2001-02-27 - (djm) Warning fix on entropy.c saved uid stuff. Patch from Mark MillerDamien Miller
<markm@swoon.net>
2001-02-27 - (djm) fatal() on OpenSSL version mismatchDamien Miller
2001-02-27 - (djm) Fix up POSIX saved uid support. Report from Mark MillerDamien Miller
<markm@swoon.net> - (djm) Search for -lcrypt on FreeBSD too
2001-02-26 - (djm) Some systems (SCO3, NeXT) have weird saved uid semantics.Damien Miller
Based on patch from Tim Rice <tim@multitalents.net>
2001-02-18 - (stevesk) entropy.c: typo; should be SIGPIPEKevin Steves
2001-02-18 - (djm) Move entropy.c over to mysignal()Damien Miller
2001-02-18 - (djm) Robustify EGD/PRNGd code in face of socket closures. Patch fromDamien Miller
Todd C. Miller <Todd.Miller@courtesan.com>