mirror of https://github.com/wolfSSL/wolfssl.git
Separated out the AES-GCM test as its own test case.
parent
6cdd8f46fa
commit
9295917ef2
|
@ -99,6 +99,7 @@ int rabbit_test();
|
|||
int des_test();
|
||||
int des3_test();
|
||||
int aes_test();
|
||||
int aesgcm_test();
|
||||
int rsa_test();
|
||||
int dh_test();
|
||||
int dsa_test();
|
||||
|
@ -233,6 +234,13 @@ void ctaocrypt_test(void* args)
|
|||
err_sys("AES test failed!\n", ret);
|
||||
else
|
||||
printf( "AES test passed!\n");
|
||||
|
||||
#ifdef HAVE_AESGCM
|
||||
if ( (ret = aesgcm_test()) )
|
||||
err_sys("AES-GCM test failed!\n", ret);
|
||||
else
|
||||
printf( "AES-GCM test passed!\n");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if ( (ret = random_test()) )
|
||||
|
@ -1144,8 +1152,14 @@ int aes_test()
|
|||
}
|
||||
#endif /* CYASSL_AES_COUNTER */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef HAVE_AESGCM
|
||||
{
|
||||
int aesgcm_test()
|
||||
{
|
||||
Aes enc;
|
||||
|
||||
/*
|
||||
* This is Test Case 16 from the document Galois/
|
||||
* Counter Mode of Operation (GCM) by McGrew and
|
||||
|
@ -1226,11 +1240,12 @@ int aes_test()
|
|||
return -70;
|
||||
if (memcmp(p, p2, sizeof(p2)))
|
||||
return -71;
|
||||
}
|
||||
#endif /* HAVE_AESGCM */
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* HAVE_AESGCM */
|
||||
|
||||
|
||||
#endif /* NO_AES */
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue