mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-23 20:15:19 -07:00
Include header files commonly used by the tests to cmptest.h
This commit is contained in:
parent
3b680e0a52
commit
4d276a81e7
@ -1,5 +1,3 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define TEST_NAME "aead_chacha20poly1305"
|
||||
#include "cmptest.h"
|
||||
@ -93,5 +91,9 @@ int main(void)
|
||||
printf("m != m2 (adlen=0)\n");
|
||||
}
|
||||
|
||||
assert(crypto_aead_chacha20poly1305_keybytes() > 0U);
|
||||
assert(crypto_aead_chacha20poly1305_npubbytes() > 0U);
|
||||
assert(crypto_aead_chacha20poly1305_nsecbytes() == 0U);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "auth"
|
||||
#include "cmptest.h"
|
||||
@ -17,5 +16,10 @@ int main(void)
|
||||
printf(",0x%02x",(unsigned int) a[i]);
|
||||
if (i % 8 == 7) printf("\n");
|
||||
}
|
||||
|
||||
assert(crypto_auth_bytes() > 0U);
|
||||
assert(crypto_auth_keybytes() > 0U);
|
||||
assert(strcmp(crypto_auth_primitive(), "hmacsha512256") == 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,7 +1,5 @@
|
||||
/* "Test Case AUTH256-4" from RFC 4868 */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "auth2"
|
||||
#include "cmptest.h"
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
/* "Test Case AUTH256-4" from RFC 4868 */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "auth3"
|
||||
#include "cmptest.h"
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "windows/windows-quirks.h"
|
||||
|
||||
#define TEST_NAME "auth5"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "auth6"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "windows/windows-quirks.h"
|
||||
|
||||
#define TEST_NAME "auth7"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "box"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "box2"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "box7"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "windows/windows-quirks.h"
|
||||
|
||||
#define TEST_NAME "box8"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "box_easy"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,5 +1,3 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define TEST_NAME "box_easy2"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "box_seed"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,7 +1,4 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define TEST_NAME "chacha20"
|
||||
#include "cmptest.h"
|
||||
|
||||
|
@ -2,7 +2,11 @@
|
||||
#ifndef __CMPTEST_H__
|
||||
#define __CMPTEST_H__
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "sodium.h"
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "core1"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "core2"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "core3"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "core4"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "core5"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "core6"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,5 +1,3 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define TEST_NAME "ed25519_convert"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "crypto_uint8.h"
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "crypto_uint8.h"
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "crypto_uint8.h"
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "hash"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "hash3"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "onetimeauth"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "onetimeauth2"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "windows/windows-quirks.h"
|
||||
|
||||
#define TEST_NAME "onetimeauth7"
|
||||
|
@ -1,5 +1,3 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define TEST_NAME "pwhash"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,6 +1,3 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
#define TEST_NAME "pwhash_scrypt_ll"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "scalarmult"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "scalarmult2"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "scalarmult5"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "scalarmult6"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "secretbox"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "secretbox2"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "secretbox7"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "windows/windows-quirks.h"
|
||||
|
||||
#define TEST_NAME "secretbox8"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "secretbox_easy"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,5 +1,3 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define TEST_NAME "secretbox_easy2"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "crypto_uint8.h"
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define TEST_NAME "sign"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "sodium_core"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,5 +1,3 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define TEST_NAME "sodium_utils"
|
||||
#include "cmptest.h"
|
||||
|
@ -3,9 +3,6 @@
|
||||
|
||||
#include <limits.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define TEST_NAME "sodium_utils2"
|
||||
#include "cmptest.h"
|
||||
|
@ -3,9 +3,6 @@
|
||||
|
||||
#include <limits.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define TEST_NAME "sodium_utils3"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "sodium_version"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "stream"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "stream2"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "stream3"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NAME "stream4"
|
||||
#include "cmptest.h"
|
||||
|
@ -1,5 +1,3 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define TEST_NAME "verify1"
|
||||
#include "cmptest.h"
|
||||
|
Loading…
Reference in New Issue
Block a user