summaryrefslogtreecommitdiff
path: root/src/global.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2008-09-12 14:47:28 +0000
committerWerner Koch <wk@gnupg.org>2008-09-12 14:47:28 +0000
commitce93e7a99301293d45331c01a888d67c8a098101 (patch)
tree45a651e2215fd58c99d93866fbec12d3e787170e /src/global.c
parent89ad60d0181758ac374a412cffd4214e5d323b57 (diff)
downloadlibgcrypt-ce93e7a99301293d45331c01a888d67c8a098101.tar.gz
Only run required tests during power-up self-test.
Enter error state after a failed key generation tests.
Diffstat (limited to 'src/global.c')
-rw-r--r--src/global.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/global.c b/src/global.c
index e664aa7f..09664ab1 100644
--- a/src/global.c
+++ b/src/global.c
@@ -469,17 +469,19 @@ _gcry_vcontrol (enum gcry_ctl_cmds cmd, va_list arg_ptr)
run a selftest. If not we use the is_operational call to
force us into operational state if possible. */
if (_gcry_fips_test_error_or_operational ())
- _gcry_fips_run_selftests ();
+ _gcry_fips_run_selftests (1);
if (_gcry_fips_is_operational ())
err = GPG_ERR_GENERAL; /* Used as TRUE value */
}
break;
case GCRYCTL_SELFTEST:
- /* Run a selftest. This works in fips mode as weel as in
- standard mode. Returns 0 on success or an error code. */
+ /* Run a selftest. This works in fips mode as well as in
+ standard mode. In contrast to the power-up tests, we use an
+ extended version ofthe selftests. Returns 0 on success or an
+ error code. */
global_init ();
- err = _gcry_fips_run_selftests ();
+ err = _gcry_fips_run_selftests (1);
break;
default: