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