Don't fail tests for unsupported rand methods
This commit is contained in:

committed by
Asanka C. Herath

parent
2ea71109d3
commit
8a1fb91009
@@ -60,6 +60,8 @@ for a in unix fortuna egd w32crypto ;do
|
|||||||
${rand} --method=${a} --file=crypto-test 2>error
|
${rand} --method=${a} --file=crypto-test 2>error
|
||||||
res=$?
|
res=$?
|
||||||
if test "X$res" != X0 ; then
|
if test "X$res" != X0 ; then
|
||||||
|
grep "unknown method" error && \
|
||||||
|
{ echo "random $a is not available" ; continue; }
|
||||||
grep "random not ready yet" error || \
|
grep "random not ready yet" error || \
|
||||||
{ echo "random $a ready failing" ; cat error; exit 1; }
|
{ echo "random $a ready failing" ; cat error; exit 1; }
|
||||||
echo "random method $a out for lunch"
|
echo "random method $a out for lunch"
|
||||||
@@ -101,6 +103,8 @@ if [ -e /dev/random -o -e /dev/urandom -o -e /dev/srandom -o -e /dev/arandom ] ;
|
|||||||
${rand} --method=unix --file=unix 2>error
|
${rand} --method=unix --file=unix 2>error
|
||||||
res=$?
|
res=$?
|
||||||
if test "X$res" != X0 ; then
|
if test "X$res" != X0 ; then
|
||||||
|
grep "unknown method" error && \
|
||||||
|
{ echo "random unix is not available"; exit 0; }
|
||||||
grep "random not ready yet" error || \
|
grep "random not ready yet" error || \
|
||||||
{ echo "random unix ready failing" ; cat error; exit 1; }
|
{ echo "random unix ready failing" ; cat error; exit 1; }
|
||||||
echo "random method unix out for lunch"
|
echo "random method unix out for lunch"
|
||||||
|
@@ -132,7 +132,7 @@ main(int argc, char **argv)
|
|||||||
RAND_set_rand_method(RAND_w32crypto_method());
|
RAND_set_rand_method(RAND_w32crypto_method());
|
||||||
#endif
|
#endif
|
||||||
else
|
else
|
||||||
errx(0, "unknown method %s", rand_method);
|
errx(1, "unknown method %s", rand_method);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (RAND_file_name(path, sizeof(path)) == NULL)
|
if (RAND_file_name(path, sizeof(path)) == NULL)
|
||||||
|
Reference in New Issue
Block a user