<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/crypto/getentropy_freebsd.c, branch OPENBSD_5_9_BASE</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=OPENBSD_5_9_BASE</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=OPENBSD_5_9_BASE'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2015-08-25T17:22:56+00:00</updated>
<entry>
<title>KNF</title>
<updated>2015-08-25T17:22:56+00:00</updated>
<author>
<name>deraadt</name>
<email></email>
</author>
<published>2015-08-25T17:22:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=fbe008c26edb3f5528ff750684198fb495993d3a'/>
<id>urn:sha1:fbe008c26edb3f5528ff750684198fb495993d3a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add hooks to override native arc4random_buf on FreeBSD.</title>
<updated>2014-11-03T06:23:30+00:00</updated>
<author>
<name>bcook</name>
<email></email>
</author>
<published>2014-11-03T06:23:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=97f48e5c1a29dd52ce16c023eaa14f5da0110610'/>
<id>urn:sha1:97f48e5c1a29dd52ce16c023eaa14f5da0110610</id>
<content type='text'>
The FreeBSD-native arc4random_buf implementation falls back to weak sources of
entropy if the sysctl fails. Remove these dangerous fallbacks by overriding
locally.

Unfortunately, pthread_atfork() is also broken on FreeBSD (at least 9 and 10)
if a program does not link to -lthr. Callbacks registered with pthread_atfork()
simply fail silently. So, it is not always possible to detect a PID wraparound.
I wish we could do better.

This improves arc4random_buf's safety compared to the native FreeBSD
implementation.

Tested on FreeBSD 9 and 10.
</content>
</entry>
</feed>
