From 3b663a199f8a3d2f6149ddebb8d98130b158c704 Mon Sep 17 00:00:00 2001 From: Karel Miko Date: Mon, 18 Sep 2017 09:24:19 +0200 Subject: [PATCH] fix char* vs. const char* (tests related part) --- src/hashes/blake2b.c | 8 ++-- src/hashes/blake2s.c | 8 ++-- src/hashes/md2.c | 2 +- src/hashes/md4.c | 2 +- src/hashes/md5.c | 2 +- src/hashes/rmd128.c | 2 +- src/hashes/rmd160.c | 2 +- src/hashes/rmd256.c | 2 +- src/hashes/rmd320.c | 2 +- src/hashes/sha1.c | 2 +- src/hashes/sha2/sha224.c | 2 +- src/hashes/sha2/sha256.c | 2 +- src/hashes/sha2/sha384.c | 2 +- src/hashes/sha2/sha512.c | 2 +- src/hashes/sha2/sha512_224.c | 2 +- src/hashes/sha2/sha512_256.c | 2 +- src/hashes/tiger.c | 2 +- src/mac/hmac/hmac_test.c | 4 +- src/misc/hkdf/hkdf_test.c | 2 +- src/misc/pkcs5/pkcs_5_test.c | 4 +- tests/common.c | 2 +- tests/common.h | 2 +- tests/dsa_test.c | 10 ++-- tests/file_test.c | 2 +- tests/mpi_test.c | 88 ++++++++++++++++++------------------ 25 files changed, 80 insertions(+), 80 deletions(-) diff --git a/src/hashes/blake2b.c b/src/hashes/blake2b.c index 2524286..cd5115c 100644 --- a/src/hashes/blake2b.c +++ b/src/hashes/blake2b.c @@ -399,7 +399,7 @@ int blake2b_512_test(void) return CRYPT_NOP; #else static const struct { - char *msg; + const char *msg; unsigned char hash[64]; } tests[] = { { "", @@ -450,7 +450,7 @@ int blake2b_384_test(void) return CRYPT_NOP; #else static const struct { - char *msg; + const char *msg; unsigned char hash[48]; } tests[] = { { "", @@ -497,7 +497,7 @@ int blake2b_256_test(void) return CRYPT_NOP; #else static const struct { - char *msg; + const char *msg; unsigned char hash[32]; } tests[] = { { "", @@ -550,7 +550,7 @@ int blake2b_160_test(void) return CRYPT_NOP; #else static const struct { - char *msg; + const char *msg; unsigned char hash[20]; } tests[] = { { "", diff --git a/src/hashes/blake2s.c b/src/hashes/blake2s.c index 1cbf597..e3e90f8 100644 --- a/src/hashes/blake2s.c +++ b/src/hashes/blake2s.c @@ -387,7 +387,7 @@ int blake2s_256_test(void) return CRYPT_NOP; #else static const struct { - char *msg; + const char *msg; unsigned char hash[32]; } tests[] = { { "", @@ -441,7 +441,7 @@ int blake2s_224_test(void) return CRYPT_NOP; #else static const struct { - char *msg; + const char *msg; unsigned char hash[28]; } tests[] = { { "", @@ -485,7 +485,7 @@ int blake2s_160_test(void) return CRYPT_NOP; #else static const struct { - char *msg; + const char *msg; unsigned char hash[20]; } tests[] = { { "", @@ -527,7 +527,7 @@ int blake2s_128_test(void) return CRYPT_NOP; #else static const struct { - char *msg; + const char *msg; unsigned char hash[16]; } tests[] = { { "", diff --git a/src/hashes/md2.c b/src/hashes/md2.c index 58f9737..36cc8ae 100644 --- a/src/hashes/md2.c +++ b/src/hashes/md2.c @@ -191,7 +191,7 @@ int md2_test(void) return CRYPT_NOP; #else static const struct { - char *msg; + const char *msg; unsigned char hash[16]; } tests[] = { { "", diff --git a/src/hashes/md4.c b/src/hashes/md4.c index cddc2b5..09b6e31 100644 --- a/src/hashes/md4.c +++ b/src/hashes/md4.c @@ -254,7 +254,7 @@ int md4_test(void) return CRYPT_NOP; #else static const struct md4_test_case { - char *input; + const char *input; unsigned char hash[16]; } tests[] = { { "", diff --git a/src/hashes/md5.c b/src/hashes/md5.c index 93fe2ec..511329a 100644 --- a/src/hashes/md5.c +++ b/src/hashes/md5.c @@ -314,7 +314,7 @@ int md5_test(void) return CRYPT_NOP; #else static const struct { - char *msg; + const char *msg; unsigned char hash[16]; } tests[] = { { "", diff --git a/src/hashes/rmd128.c b/src/hashes/rmd128.c index 26e64b2..df1af1a 100644 --- a/src/hashes/rmd128.c +++ b/src/hashes/rmd128.c @@ -353,7 +353,7 @@ int rmd128_test(void) return CRYPT_NOP; #else static const struct { - char *msg; + const char *msg; unsigned char hash[16]; } tests[] = { { "", diff --git a/src/hashes/rmd160.c b/src/hashes/rmd160.c index 165afd2..8add41e 100644 --- a/src/hashes/rmd160.c +++ b/src/hashes/rmd160.c @@ -412,7 +412,7 @@ int rmd160_test(void) return CRYPT_NOP; #else static const struct { - char *msg; + const char *msg; unsigned char hash[20]; } tests[] = { { "", diff --git a/src/hashes/rmd256.c b/src/hashes/rmd256.c index c2149b6..5fade82 100644 --- a/src/hashes/rmd256.c +++ b/src/hashes/rmd256.c @@ -366,7 +366,7 @@ int rmd256_test(void) return CRYPT_NOP; #else static const struct { - char *msg; + const char *msg; unsigned char hash[32]; } tests[] = { { "", diff --git a/src/hashes/rmd320.c b/src/hashes/rmd320.c index 0098e0b..a4356c4 100644 --- a/src/hashes/rmd320.c +++ b/src/hashes/rmd320.c @@ -431,7 +431,7 @@ int rmd320_test(void) return CRYPT_NOP; #else static const struct { - char *msg; + const char *msg; unsigned char hash[40]; } tests[] = { { "", diff --git a/src/hashes/sha1.c b/src/hashes/sha1.c index 8fbdabf..40f0175 100644 --- a/src/hashes/sha1.c +++ b/src/hashes/sha1.c @@ -246,7 +246,7 @@ int sha1_test(void) return CRYPT_NOP; #else static const struct { - char *msg; + const char *msg; unsigned char hash[20]; } tests[] = { { "abc", diff --git a/src/hashes/sha2/sha224.c b/src/hashes/sha2/sha224.c index 9233cba..773a2c5 100644 --- a/src/hashes/sha2/sha224.c +++ b/src/hashes/sha2/sha224.c @@ -88,7 +88,7 @@ int sha224_test(void) return CRYPT_NOP; #else static const struct { - char *msg; + const char *msg; unsigned char hash[28]; } tests[] = { { "abc", diff --git a/src/hashes/sha2/sha256.c b/src/hashes/sha2/sha256.c index 723e8aa..f1dc423 100644 --- a/src/hashes/sha2/sha256.c +++ b/src/hashes/sha2/sha256.c @@ -292,7 +292,7 @@ int sha256_test(void) return CRYPT_NOP; #else static const struct { - char *msg; + const char *msg; unsigned char hash[32]; } tests[] = { { "abc", diff --git a/src/hashes/sha2/sha384.c b/src/hashes/sha2/sha384.c index c28ddd1..1623812 100644 --- a/src/hashes/sha2/sha384.c +++ b/src/hashes/sha2/sha384.c @@ -90,7 +90,7 @@ int sha384_test(void) return CRYPT_NOP; #else static const struct { - char *msg; + const char *msg; unsigned char hash[48]; } tests[] = { { "abc", diff --git a/src/hashes/sha2/sha512.c b/src/hashes/sha2/sha512.c index d169a91..110203a 100644 --- a/src/hashes/sha2/sha512.c +++ b/src/hashes/sha2/sha512.c @@ -262,7 +262,7 @@ int sha512_test(void) return CRYPT_NOP; #else static const struct { - char *msg; + const char *msg; unsigned char hash[64]; } tests[] = { { "abc", diff --git a/src/hashes/sha2/sha512_224.c b/src/hashes/sha2/sha512_224.c index 75d44fc..48bb938 100644 --- a/src/hashes/sha2/sha512_224.c +++ b/src/hashes/sha2/sha512_224.c @@ -90,7 +90,7 @@ int sha512_224_test(void) return CRYPT_NOP; #else static const struct { - char *msg; + const char *msg; unsigned char hash[28]; } tests[] = { { "abc", diff --git a/src/hashes/sha2/sha512_256.c b/src/hashes/sha2/sha512_256.c index 0bbcaea..943adaa 100644 --- a/src/hashes/sha2/sha512_256.c +++ b/src/hashes/sha2/sha512_256.c @@ -90,7 +90,7 @@ int sha512_256_test(void) return CRYPT_NOP; #else static const struct { - char *msg; + const char *msg; unsigned char hash[32]; } tests[] = { { "abc", diff --git a/src/hashes/tiger.c b/src/hashes/tiger.c index 2438626..863f7fa 100644 --- a/src/hashes/tiger.c +++ b/src/hashes/tiger.c @@ -735,7 +735,7 @@ int tiger_test(void) return CRYPT_NOP; #else static const struct { - char *msg; + const char *msg; unsigned char hash[24]; } tests[] = { { "", diff --git a/src/mac/hmac/hmac_test.c b/src/mac/hmac/hmac_test.c index e3d0754..1570a76 100644 --- a/src/mac/hmac/hmac_test.c +++ b/src/mac/hmac/hmac_test.c @@ -142,8 +142,8 @@ int hmac_test(void) }; static const struct hmac_test_case { - char *num; - char *algo; + const char *num; + const char *algo; const unsigned char *key; unsigned long keylen; const unsigned char *data; diff --git a/src/misc/hkdf/hkdf_test.c b/src/misc/hkdf/hkdf_test.c index 632cea9..f3d5811 100644 --- a/src/misc/hkdf/hkdf_test.c +++ b/src/misc/hkdf/hkdf_test.c @@ -40,7 +40,7 @@ int hkdf_test(void) static const struct hkdf_test_case { int num; - char* Hash; + const char* Hash; unsigned char IKM[80]; unsigned long IKM_l; unsigned char salt[80]; diff --git a/src/misc/pkcs5/pkcs_5_test.c b/src/misc/pkcs5/pkcs_5_test.c index 3788fa4..f6e413b 100644 --- a/src/misc/pkcs5/pkcs_5_test.c +++ b/src/misc/pkcs5/pkcs_5_test.c @@ -35,9 +35,9 @@ int pkcs_5_test (void) #else typedef struct { - char* P; + const char* P; unsigned long P_len; - char* S; + const char* S; unsigned long S_len; int c; unsigned long dkLen; diff --git a/tests/common.c b/tests/common.c index 9527e94..18a5614 100644 --- a/tests/common.c +++ b/tests/common.c @@ -15,7 +15,7 @@ Steffen Jaeckel */ -void run_cmd(int res, int line, char *file, char *cmd, const char *algorithm) +void run_cmd(int res, int line, const char *file, const char *cmd, const char *algorithm) { if (res != CRYPT_OK) { fprintf(stderr, "%s (%d)%s%s\n%s:%d:%s\n", diff --git a/tests/common.h b/tests/common.h index 0a88f31..410db1e 100644 --- a/tests/common.h +++ b/tests/common.h @@ -21,7 +21,7 @@ extern prng_state yarrow_prng; #define DOX(x, str) do { run_cmd((x), __LINE__, __FILE__, #x, (str)); } while (0) #endif -void run_cmd(int res, int line, char *file, char *cmd, const char *algorithm); +void run_cmd(int res, int line, const char *file, const char *cmd, const char *algorithm); void print_hex(const char* what, const void* v, const unsigned long l); diff --git a/tests/dsa_test.c b/tests/dsa_test.c index c21e382..d011db8 100644 --- a/tests/dsa_test.c +++ b/tests/dsa_test.c @@ -53,11 +53,11 @@ static const unsigned char openssl_priv_dsa[] = { }; /* private key - raw hexadecimal numbers */ -static char *hex_g = "3B92E4FF5929150B08995A7BF2AD1440556FA047FF9099B344B3D4FC451505AE6722439CBA3710A5894737ECCCF5AEADA8B47A35CB9D935CEDE6B07E9694C4A60C7DD6708A094F814A0EC213FBEB16BFEAA4F456FF723005DE8A443FBEC6852655D62D1D1EDB15DAA445833C1797980B8D87F3490D90BDA9AB676E87687223DC"; -static char *hex_p = "C50A37515CABD618D5A270BD4A6F6B4AF9E139950F2B99387D9A64D64CB5967ADCEDACA8ACC61B655ADEDB0061251A182CEEA10790625E4D123190C70321FA09E7B173D78EAFDBFDBFB3EFADD1A12A036DE706924A852AFF7A0166531FEAC66741845AC06CED62F9C2626205A4FA48A066EC35C9A811FEB981ABEEBE31B6BFCF"; -static char *hex_q = "AA5BD7F4E5062413E58835CA00C7A635716194C5"; -static char *hex_x = "9936E5E4E9FB28BE91F5065FE8C935B3F5D81FC5"; -static char *hex_y = "5316B0FBBF598A5E5595C14FAC43B80853E6CF0D9223FAB184595239BFCBF22D383ADD935205497E2B12C46173E36F54BD96E5A7AAA95A58A4B767D2C0BDC81EB13A124F98C005EF395D6ABAB70B3BD8B795DD796EA2D28473470388B464D9B9B84FF1C934BBF97366F57C2E11FEC331E60838596781EB6D4127D70D74AFA035"; +static const char *hex_g = "3B92E4FF5929150B08995A7BF2AD1440556FA047FF9099B344B3D4FC451505AE6722439CBA3710A5894737ECCCF5AEADA8B47A35CB9D935CEDE6B07E9694C4A60C7DD6708A094F814A0EC213FBEB16BFEAA4F456FF723005DE8A443FBEC6852655D62D1D1EDB15DAA445833C1797980B8D87F3490D90BDA9AB676E87687223DC"; +static const char *hex_p = "C50A37515CABD618D5A270BD4A6F6B4AF9E139950F2B99387D9A64D64CB5967ADCEDACA8ACC61B655ADEDB0061251A182CEEA10790625E4D123190C70321FA09E7B173D78EAFDBFDBFB3EFADD1A12A036DE706924A852AFF7A0166531FEAC66741845AC06CED62F9C2626205A4FA48A066EC35C9A811FEB981ABEEBE31B6BFCF"; +static const char *hex_q = "AA5BD7F4E5062413E58835CA00C7A635716194C5"; +static const char *hex_x = "9936E5E4E9FB28BE91F5065FE8C935B3F5D81FC5"; +static const char *hex_y = "5316B0FBBF598A5E5595C14FAC43B80853E6CF0D9223FAB184595239BFCBF22D383ADD935205497E2B12C46173E36F54BD96E5A7AAA95A58A4B767D2C0BDC81EB13A124F98C005EF395D6ABAB70B3BD8B795DD796EA2D28473470388B464D9B9B84FF1C934BBF97366F57C2E11FEC331E60838596781EB6D4127D70D74AFA035"; /* The public part of test_dsa.key in SubjectPublicKeyInfo format */ static const unsigned char openssl_pub_dsa[] = { diff --git a/tests/file_test.c b/tests/file_test.c index 24ea559..9ba607e 100644 --- a/tests/file_test.c +++ b/tests/file_test.c @@ -19,7 +19,7 @@ int file_test(void) 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F }; unsigned char buf[200]; unsigned long len; - char *fname = "tests/test.key"; + const char *fname = "tests/test.key"; FILE *in; int err, isha256, iaes; diff --git a/tests/mpi_test.c b/tests/mpi_test.c index c635d1a..9bb73ae 100644 --- a/tests/mpi_test.c +++ b/tests/mpi_test.c @@ -12,48 +12,48 @@ static int _radix_to_bin_test(void) { /* RADIX 16 */ - char *ghex = "2"; - char *phex = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22" - "514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6" - "F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" - "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB" - "9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E8603" - "9B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA0510" - "15728E5A8AACAA68FFFFFFFFFFFFFFFF"; - char *xhex = "A6681ADC386CE944C3DED9A7301DCC9C518250E3EDB62F959198F8DC0057DD6FB57ABAFD788198B1"; - char *yhex = "39046632C834418DFA07B3091538B614D1FB5DBB785C0FBEA3B98B295BC0CD076A88D9452141A269" - "E8BAEB1DD654EBA03A5705318D129754CDF4003A8C399240FBB8F162490F6F0DC70E414B6FEE8808" - "6AFAA48E9F3A248EDC093452663D34E0E809D4F6BADBB36F80B6813EBF7C3281B862209E5604BDEA" - "8B8F5F7BFDC3EEB7ADB73048289BCEA0F5A5CDEE7DF91CD1F0BA632F06DBE9BA7EF014B84B02D497" - "CA7D0C60F734752A649DA496946B4E531B30D9F82EDD855636C0B0F2AE232E4186454E8887BB423E" - "32A5A2495EACBA99620ACD03A38345EBB6735E62330A8EE9AA6C8370410F5CD45AF37EE90A0DA95B" - "E96FC939E88FE0BD2CD09FC8F524208C"; + const char *ghex = "2"; + const char *phex = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22" + "514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6" + "F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" + "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB" + "9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E8603" + "9B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA0510" + "15728E5A8AACAA68FFFFFFFFFFFFFFFF"; + const char *xhex = "A6681ADC386CE944C3DED9A7301DCC9C518250E3EDB62F959198F8DC0057DD6FB57ABAFD788198B1"; + const char *yhex = "39046632C834418DFA07B3091538B614D1FB5DBB785C0FBEA3B98B295BC0CD076A88D9452141A269" + "E8BAEB1DD654EBA03A5705318D129754CDF4003A8C399240FBB8F162490F6F0DC70E414B6FEE8808" + "6AFAA48E9F3A248EDC093452663D34E0E809D4F6BADBB36F80B6813EBF7C3281B862209E5604BDEA" + "8B8F5F7BFDC3EEB7ADB73048289BCEA0F5A5CDEE7DF91CD1F0BA632F06DBE9BA7EF014B84B02D497" + "CA7D0C60F734752A649DA496946B4E531B30D9F82EDD855636C0B0F2AE232E4186454E8887BB423E" + "32A5A2495EACBA99620ACD03A38345EBB6735E62330A8EE9AA6C8370410F5CD45AF37EE90A0DA95B" + "E96FC939E88FE0BD2CD09FC8F524208C"; /* RADIX 47 */ - char *gr47 = "2"; - char *pr47 = "F27Mg1SadOFIRbDOJ5dHgHiVF02Z1LHHQ6G5SLG2U8aTdfH1ETk4GARRE7WW99dBUBLb9e2OHFIaSM1A" - "ag2LNNjgYa9I9CjQGJihL3J7A2SGQe8j5Ch8EHMj5jVbAYDiQKhhPhM6Hc56fKS40GUfJkGO7KJ6EXZQ" - "VgbSa2AkPC65F91g0PaYie8AGNVaFKaV9HOQf3ia1iW4i6eCOB9CcBbH7TbQij8AEgjZ0VRBcLKc6UYO" - "1Zc3I2Jc0h1H2HBEH8ONI3OYBbaPV6XhAd8WCc60D0RDBU3H9U7cWL28a0c90XNO0dh5RXEFBbUCE2ZG" - "gh9XQSVIHkVbFIS5F5IGVOkiWAVc9i8BHB2V0UbGW6UdRTZVV"; - char *xr47 = "6bhO7O9NWFRgEMjdU0Y5POj3c1JP15MYEdIg3FO1PEjUY2aGYNSXcaF01R"; - char *yr47 = "3GNPNWEYfKML1cIbI7Cc1Z0O7aQLJgB734dO2i56LLYDdI4gHYk2GAbQH2WI97hNeC7dj3fPEH8I9gV9" - "U323AXj1AJXbFPFIHGOTdC29QUUeH2SSc6NWhfQDDXd5Q5iXCKEAUGX3SKcNFIfVOYJgZCLjfHYQdgOQ" - "GCjKNgbEV7Hj34MU3b79iANX2DbMYfb9iGi78BWH2HYAd7IAhk7U0OYGHKJX1bIUUj1KBLhAUg46GaER" - "G9W3ARMfBCj6kSdDF9TdkWAjWTDj722IeVJERC4bKU2VDFG20kDhCMF985efD1SS8DfXcdCHF1kDUkSA" - "884FHYiFEPkaagQOBQaN9BNaEHNbbd002DCIIX5eMP4HgPJPF"; + const char *gr47 = "2"; + const char *pr47 = "F27Mg1SadOFIRbDOJ5dHgHiVF02Z1LHHQ6G5SLG2U8aTdfH1ETk4GARRE7WW99dBUBLb9e2OHFIaSM1A" + "ag2LNNjgYa9I9CjQGJihL3J7A2SGQe8j5Ch8EHMj5jVbAYDiQKhhPhM6Hc56fKS40GUfJkGO7KJ6EXZQ" + "VgbSa2AkPC65F91g0PaYie8AGNVaFKaV9HOQf3ia1iW4i6eCOB9CcBbH7TbQij8AEgjZ0VRBcLKc6UYO" + "1Zc3I2Jc0h1H2HBEH8ONI3OYBbaPV6XhAd8WCc60D0RDBU3H9U7cWL28a0c90XNO0dh5RXEFBbUCE2ZG" + "gh9XQSVIHkVbFIS5F5IGVOkiWAVc9i8BHB2V0UbGW6UdRTZVV"; + const char *xr47 = "6bhO7O9NWFRgEMjdU0Y5POj3c1JP15MYEdIg3FO1PEjUY2aGYNSXcaF01R"; + const char *yr47 = "3GNPNWEYfKML1cIbI7Cc1Z0O7aQLJgB734dO2i56LLYDdI4gHYk2GAbQH2WI97hNeC7dj3fPEH8I9gV9" + "U323AXj1AJXbFPFIHGOTdC29QUUeH2SSc6NWhfQDDXd5Q5iXCKEAUGX3SKcNFIfVOYJgZCLjfHYQdgOQ" + "GCjKNgbEV7Hj34MU3b79iANX2DbMYfb9iGi78BWH2HYAd7IAhk7U0OYGHKJX1bIUUj1KBLhAUg46GaER" + "G9W3ARMfBCj6kSdDF9TdkWAjWTDj722IeVJERC4bKU2VDFG20kDhCMF985efD1SS8DfXcdCHF1kDUkSA" + "884FHYiFEPkaagQOBQaN9BNaEHNbbd002DCIIX5eMP4HgPJPF"; /* RADIX 64 */ - char *gr64 = "2"; - char *pr64 = "3//////////yaFsg8XQC8qnCPYYu3S7D4f0au8YcVCT08BlgOx4viYKKe8UOuq1DtlbHcppJf36p0h2c" - "toNnGtJ+4rRMrHmaNaXRLsObv+nlHCGkccD+rh2/zSjlG6j+tkE6lxMecVfQwV915yIn/cIIXcKUpaMp" - "t207oueME/1PZQI3OSLTEQQHO/gFqapr+3PLqZtAEjbXnYyrOWXLAxdjKf1t2Mbcrd33LEIhoO1F5qR0" - "ZA625yCf1UHYuspZlZddSi60w60vidWwBi1wAFjSLTy6zCKidUAylsbLWN63cLINpgbMhb5T8c69Zw1H" - "0LSevQYgogQF//////////"; - char *xr64 = "2cQ1hSE6pfHCFUsQSm7SoSKO9Gu+ssBvMHcFZS05VTRxLwklruWPYn"; - char *yr64 = "v16Ooo3H1ZVe7imaLEBOKqVjTktXS3xwZkOifMy3D1sg8sKKXGQ9fwBhh7TPKww0wLmKnZHANLCtq03g" - "CEP90+xZnOaaFRmt73a5BR+w826hwf8wVEYIEt0aqKcOzDE3e2TJskjkpRu2sWJw/V3A1k68WdbO4lUg" - "BZrzx/SFkjwstC4WecywWzQNDxdtv7D7mkcCl1jlfkdxm5BXB0jINodqCOFSqTIfadQIMb6jEKnimsVW" - "ktOLMDi2myguZBa66HKw8Xxj2FZAbeabUhBgPOWhD0wE3HUksSrvYCmgEwQfiWt113rpKMlD+wGeDgLl" - "fRyavw8/WlIpGdyZr922C"; + const char *gr64 = "2"; + const char *pr64 = "3//////////yaFsg8XQC8qnCPYYu3S7D4f0au8YcVCT08BlgOx4viYKKe8UOuq1DtlbHcppJf36p0h2c" + "toNnGtJ+4rRMrHmaNaXRLsObv+nlHCGkccD+rh2/zSjlG6j+tkE6lxMecVfQwV915yIn/cIIXcKUpaMp" + "t207oueME/1PZQI3OSLTEQQHO/gFqapr+3PLqZtAEjbXnYyrOWXLAxdjKf1t2Mbcrd33LEIhoO1F5qR0" + "ZA625yCf1UHYuspZlZddSi60w60vidWwBi1wAFjSLTy6zCKidUAylsbLWN63cLINpgbMhb5T8c69Zw1H" + "0LSevQYgogQF//////////"; + const char *xr64 = "2cQ1hSE6pfHCFUsQSm7SoSKO9Gu+ssBvMHcFZS05VTRxLwklruWPYn"; + const char *yr64 = "v16Ooo3H1ZVe7imaLEBOKqVjTktXS3xwZkOifMy3D1sg8sKKXGQ9fwBhh7TPKww0wLmKnZHANLCtq03g" + "CEP90+xZnOaaFRmt73a5BR+w826hwf8wVEYIEt0aqKcOzDE3e2TJskjkpRu2sWJw/V3A1k68WdbO4lUg" + "BZrzx/SFkjwstC4WecywWzQNDxdtv7D7mkcCl1jlfkdxm5BXB0jINodqCOFSqTIfadQIMb6jEKnimsVW" + "ktOLMDi2myguZBa66HKw8Xxj2FZAbeabUhBgPOWhD0wE3HUksSrvYCmgEwQfiWt113rpKMlD+wGeDgLl" + "fRyavw8/WlIpGdyZr922C"; /* RADIX 256 */ unsigned char gbin[] = { 0x02 }; unsigned char pbin[] = { @@ -100,10 +100,10 @@ static int _radix_to_bin_test(void) struct { int radix; - void* g; int glen; - void* p; int plen; - void* x; int xlen; - void* y; int ylen; + const void* g; int glen; + const void* p; int plen; + const void* x; int xlen; + const void* y; int ylen; } test[4] = { { 256, gbin, sizeof(gbin), pbin, sizeof(pbin), xbin, sizeof(xbin), ybin, sizeof(ybin) }, { 16, ghex, strlen(ghex)+1, phex, strlen(phex)+1, xhex, strlen(xhex)+1, yhex, strlen(yhex)+1 },