From f6f9690bd13096349f14b5dbf30bdf1f686aba3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Sun, 10 Jun 2007 07:57:46 +0000 Subject: [PATCH] (test_BN_rand): skip this test if there is no random device git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21043 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hcrypto/test_bn.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/hcrypto/test_bn.c b/lib/hcrypto/test_bn.c index a48a8a0da..004a25903 100644 --- a/lib/hcrypto/test_bn.c +++ b/lib/hcrypto/test_bn.c @@ -327,6 +327,9 @@ test_BN_rand(void) { BIGNUM *bn; + if (RAND_status() != 1) + return 0; + bn = BN_new(); if (bn == NULL) return 1;