In the hopes of just using the non-blocking random source (rather than
the more elegant Crypt::Random solution also proposed) I offer a quick
patch that changes the source from /dev/random to /dev/urandom.
If the author doesn't pick this up, I can request to take over the
module for that purpose, though I have no vested interest in maintaining
or enhancing it beyond this change.
Cheers
--- Crypt-DSA-1.16/lib/Crypt/DSA/Util.pm.orig 2011-06-16 09:53:46.000000000 +0100
+++ Crypt-DSA-1.16/lib/Crypt/DSA/Util.pm 2011-06-16 09:56:32.000000000 +0100
@@ -53,7 +53,7 @@
my $size = $param{Size};
my $bytes = int($size / 8) + 1;
my $r = '';
- if ( sysopen my $fh, '/dev/random', O_RDONLY ) {
+ if ( sysopen my $fh, '/dev/urandom', O_RDONLY ) {
my $read = 0;
while ($read < $bytes) {
my $got = sysread $fh, my($chunk), $bytes - $read;