aes-test: Rename crypt() as it conflicts with a library function on Mac OS X
unistd.h on Linux defines this only if _XOPEN_SOURCE is defined.
This commit is contained in:
+3
-3
@@ -385,7 +385,7 @@ static bool do_test_gcm(test_vector_t *test)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool crypt(crypter_t *crypter, test_vector_t *test)
|
static bool do_crypt(crypter_t *crypter, test_vector_t *test)
|
||||||
{
|
{
|
||||||
if (ctx.decrypt)
|
if (ctx.decrypt)
|
||||||
{
|
{
|
||||||
@@ -424,7 +424,7 @@ static bool do_test_cbc(test_vector_t *test)
|
|||||||
crypter->destroy(crypter);
|
crypter->destroy(crypter);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (!crypt(crypter, test))
|
if (!do_crypt(crypter, test))
|
||||||
{
|
{
|
||||||
crypter->destroy(crypter);
|
crypter->destroy(crypter);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -478,7 +478,7 @@ static bool do_test_mct(test_vector_t *test)
|
|||||||
/* store previous output as it is used as input after next */
|
/* store previous output as it is used as input after next */
|
||||||
memcpy(prev.ptr, output->ptr, prev.len);
|
memcpy(prev.ptr, output->ptr, prev.len);
|
||||||
chunk_free(output);
|
chunk_free(output);
|
||||||
if (!crypt(crypter, test))
|
if (!do_crypt(crypter, test))
|
||||||
{
|
{
|
||||||
crypter->destroy(crypter);
|
crypter->destroy(crypter);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|||||||
Reference in New Issue
Block a user