From: Sergey Matveev Date: Wed, 13 May 2015 14:00:55 +0000 (+0300) Subject: Use /dev/urandom for new client identity generation X-Git-Tag: 3.3^2~4 X-Git-Url: http://www.git.cypherpunks.ru/?a=commitdiff_plain;h=cb530f030f975afad01155d559e1d16b16bd3097;p=govpn.git Use /dev/urandom for new client identity generation * FreeBSD has /dev/random and it never blocks, giving as much entropy as requested * GNU/Linux has /dev/random can give shorter output * /dev/urandom exists in both systems and never blocks Signed-off-by: Sergey Matveev --- diff --git a/utils/newclient.sh b/utils/newclient.sh index ab86a7f..e741130 100755 --- a/utils/newclient.sh +++ b/utils/newclient.sh @@ -3,7 +3,7 @@ getrand() { local size=$1 - dd if=/dev/random bs=$size count=1 2>/dev/null | hexdump -ve '"%02x"' + dd if=/dev/urandom bs=$size count=1 2>/dev/null | hexdump -ve '"%02x"' } [ -n "$1" ] || {