Test BN_rand
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17093 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -322,6 +322,21 @@ test_BN_cmp(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
test_BN_rand(void)
|
||||||
|
{
|
||||||
|
BIGNUM *bn;
|
||||||
|
|
||||||
|
bn = BN_new();
|
||||||
|
if (bn == NULL)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
if (!BN_rand(bn, 1024, 0, 0))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
BN_free(bn);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
@@ -333,6 +348,7 @@ main(int argc, char **argv)
|
|||||||
ret += test_BN_import_export();
|
ret += test_BN_import_export();
|
||||||
ret += test_BN_uadd();
|
ret += test_BN_uadd();
|
||||||
ret += test_BN_cmp();
|
ret += test_BN_cmp();
|
||||||
|
ret += test_BN_rand();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user