diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2013-11-07 14:50:35 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2013-11-27 11:41:04 +0100 |
commit | 7e2eaf3889a7c5b7c65ce79401559a08d89d253d (patch) | |
tree | dad8e6cb56ae5f257d3dc9e0dd32db179221fb18 /tests | |
parent | bac57717df6b4900e759fa593d030e9f129da1c7 (diff) | |
download | gnutls-7e2eaf3889a7c5b7c65ce79401559a08d89d253d.tar.gz |
completed self-tests by adding digest and MAC tests.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/slow/cipher-test.c | 51 |
1 files changed, 45 insertions, 6 deletions
diff --git a/tests/slow/cipher-test.c b/tests/slow/cipher-test.c index 489ff5fd23..7fb92fdfe2 100644 --- a/tests/slow/cipher-test.c +++ b/tests/slow/cipher-test.c @@ -26,22 +26,61 @@ int main(int argc, char **argv) global_init(); - if (gnutls_cipher_self_test(GNUTLS_CIPHER_AES_128_CBC)) + /* ciphers */ + if (gnutls_cipher_self_test(GNUTLS_CIPHER_AES_128_CBC) < 0) return 1; - if (gnutls_cipher_self_test(GNUTLS_CIPHER_AES_192_CBC)) + if (gnutls_cipher_self_test(GNUTLS_CIPHER_AES_192_CBC) < 0) return 1; - if (gnutls_cipher_self_test(GNUTLS_CIPHER_AES_256_CBC)) + if (gnutls_cipher_self_test(GNUTLS_CIPHER_AES_256_CBC) < 0) return 1; - if (gnutls_cipher_self_test(GNUTLS_CIPHER_AES_128_GCM)) + if (gnutls_cipher_self_test(GNUTLS_CIPHER_AES_128_GCM) < 0) return 1; - if (gnutls_cipher_self_test(GNUTLS_CIPHER_AES_256_GCM)) + if (gnutls_cipher_self_test(GNUTLS_CIPHER_AES_256_GCM) < 0) return 1; - if (gnutls_cipher_self_test(GNUTLS_CIPHER_3DES_CBC)) + if (gnutls_cipher_self_test(GNUTLS_CIPHER_3DES_CBC) < 0) + return 1; + + /* message digests */ + if (gnutls_digest_self_test(GNUTLS_DIG_MD5) < 0) + return 1; + + if (gnutls_digest_self_test(GNUTLS_DIG_SHA1) < 0) + return 1; + + if (gnutls_digest_self_test(GNUTLS_DIG_SHA224) < 0) + return 1; + + if (gnutls_digest_self_test(GNUTLS_DIG_SHA256) < 0) + return 1; + + if (gnutls_digest_self_test(GNUTLS_DIG_SHA384) < 0) + return 1; + + if (gnutls_digest_self_test(GNUTLS_DIG_SHA512) < 0) + return 1; + + /* MAC */ + if (gnutls_mac_self_test(GNUTLS_MAC_MD5) < 0) + return 1; + + if (gnutls_mac_self_test(GNUTLS_MAC_SHA1) < 0) + return 1; + + if (gnutls_mac_self_test(GNUTLS_MAC_SHA224) < 0) + return 1; + + if (gnutls_mac_self_test(GNUTLS_MAC_SHA256) < 0) + return 1; + + if (gnutls_mac_self_test(GNUTLS_MAC_SHA384) < 0) + return 1; + + if (gnutls_mac_self_test(GNUTLS_MAC_SHA512) < 0) return 1; gnutls_global_deinit(); |