diff --git a/demos/hashsum.c b/demos/hashsum.c index 78d6369..8f94af5 100644 --- a/demos/hashsum.c +++ b/demos/hashsum.c @@ -67,6 +67,7 @@ int main(int argc, char **argv) void register_algs(void) { int err; + LTC_UNUSED_PARAM(err); #ifdef LTC_TIGER register_hash (&tiger_desc); diff --git a/demos/multi.c b/demos/multi.c index 82d543f..84d4136 100644 --- a/demos/multi.c +++ b/demos/multi.c @@ -56,6 +56,7 @@ int main(void) } /* LTC_OMAC */ +#ifdef LTC_OMAC len = sizeof(buf[0]); omac_memory(find_cipher("aes"), key, 16, (unsigned char*)"hello", 5, buf[0], &len); len2 = sizeof(buf[0]); @@ -76,8 +77,10 @@ int main(void) printf("Failed: %d %lu %lu\n", __LINE__, len, len2); return EXIT_FAILURE; } +#endif /* PMAC */ +#ifdef LTC_PMAC len = sizeof(buf[0]); pmac_memory(find_cipher("aes"), key, 16, (unsigned char*)"hello", 5, buf[0], &len); len2 = sizeof(buf[0]); @@ -98,7 +101,7 @@ int main(void) printf("Failed: %d %lu %lu\n", __LINE__, len, len2); return EXIT_FAILURE; } - +#endif printf("All passed\n"); return EXIT_SUCCESS; diff --git a/demos/tv_gen.c b/demos/tv_gen.c index 1a6a6a1..f84bcfe 100644 --- a/demos/tv_gen.c +++ b/demos/tv_gen.c @@ -3,6 +3,7 @@ void reg_algs(void) { int err; + LTC_UNUSED_PARAM(err); #ifdef LTC_RIJNDAEL register_cipher (&aes_desc); @@ -340,6 +341,7 @@ void omac_gen(void) void pmac_gen(void) { +#ifdef LTC_PMAC unsigned char key[MAXBLOCKSIZE], output[MAXBLOCKSIZE], input[MAXBLOCKSIZE*2+2]; int err, x, y, z, kl; FILE *out; @@ -391,10 +393,12 @@ void pmac_gen(void) fprintf(out, "\n"); } fclose(out); +#endif } void eax_gen(void) { +#ifdef LTC_EAX_MODE int err, kl, x, y1, z; FILE *out; unsigned char key[MAXBLOCKSIZE], nonce[MAXBLOCKSIZE*2], header[MAXBLOCKSIZE*2], @@ -451,10 +455,12 @@ void eax_gen(void) fprintf(out, "\n"); } fclose(out); +#endif } void ocb_gen(void) { +#ifdef LTC_OCB_MODE int err, kl, x, y1, z; FILE *out; unsigned char key[MAXBLOCKSIZE], nonce[MAXBLOCKSIZE*2], @@ -514,10 +520,12 @@ void ocb_gen(void) fprintf(out, "\n"); } fclose(out); +#endif } void ocb3_gen(void) { +#ifdef LTC_OCB3_MODE int err, kl, x, y1, z; FILE *out; unsigned char key[MAXBLOCKSIZE], nonce[MAXBLOCKSIZE*2], @@ -577,10 +585,12 @@ void ocb3_gen(void) fprintf(out, "\n"); } fclose(out); +#endif } void ccm_gen(void) { +#ifdef LTC_CCM_MODE int err, kl, x, y1, z; FILE *out; unsigned char key[MAXBLOCKSIZE], nonce[MAXBLOCKSIZE*2], @@ -640,10 +650,12 @@ void ccm_gen(void) fprintf(out, "\n"); } fclose(out); +#endif } void gcm_gen(void) { +#ifdef LTC_GCM_MODE int err, kl, x, y1, z; FILE *out; unsigned char key[MAXBLOCKSIZE], plaintext[MAXBLOCKSIZE*2], tag[MAXBLOCKSIZE]; @@ -697,6 +709,7 @@ void gcm_gen(void) fprintf(out, "\n"); } fclose(out); +#endif } void base64_gen(void) @@ -764,6 +777,7 @@ void ecc_gen(void) void lrw_gen(void) { +#ifdef LTC_LRW_MODE FILE *out; unsigned char tweak[16], key[16], iv[16], buf[1024]; int x, y, err; @@ -825,6 +839,7 @@ void lrw_gen(void) lrw_done(&lrw); } fclose(out); +#endif } int main(void)