summaryrefslogtreecommitdiff
path: root/lib/fips.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2014-07-08 15:14:20 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2014-07-08 15:14:51 +0200
commit87cb7a564f4d963a764838f370cabad55c9b37f4 (patch)
treef49032d8980f99df7a848022c056c0ef2a8e18bc /lib/fips.c
parent999a433c3d8bbeb528d27cc119cf77d7e43e7a73 (diff)
downloadgnutls-87cb7a564f4d963a764838f370cabad55c9b37f4.tar.gz
FIPS140-2 tests: removed redundant checks
We keep on check per cipher which is required, and avoid multiple (and time-consuming) tests.
Diffstat (limited to 'lib/fips.c')
-rw-r--r--lib/fips.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/lib/fips.c b/lib/fips.c
index 12c1d0dd42..8b87544b92 100644
--- a/lib/fips.c
+++ b/lib/fips.c
@@ -209,37 +209,13 @@ int _gnutls_fips_perform_self_checks(void)
/* Tests the FIPS algorithms */
- /* ciphers */
- ret = gnutls_cipher_self_test(0, GNUTLS_CIPHER_AES_128_CBC);
- if (ret < 0) {
- gnutls_assert();
- goto error;
- }
-
- ret = gnutls_cipher_self_test(0, GNUTLS_CIPHER_AES_192_CBC);
- if (ret < 0) {
- gnutls_assert();
- goto error;
- }
-
- ret = gnutls_cipher_self_test(0, GNUTLS_CIPHER_AES_256_CBC);
- if (ret < 0) {
- gnutls_assert();
- goto error;
- }
-
+ /* ciphers - one test per cipher */
ret = gnutls_cipher_self_test(0, GNUTLS_CIPHER_3DES_CBC);
if (ret < 0) {
gnutls_assert();
goto error;
}
- ret = gnutls_cipher_self_test(0, GNUTLS_CIPHER_AES_128_GCM);
- if (ret < 0) {
- gnutls_assert();
- goto error;
- }
-
ret = gnutls_cipher_self_test(0, GNUTLS_CIPHER_AES_256_GCM);
if (ret < 0) {
gnutls_assert();