From 6fc0a90a1ef06b286ff1b466c44751f95dc026f5 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Mon, 19 Jun 2017 15:49:18 +0200 Subject: [PATCH] fix headers & footers in demos & tests --- demos/constants.c | 2 -- demos/hashsum.c | 9 +++++++++ demos/ltcrypt.c | 9 +++++++++ demos/openssl-enc.c | 13 +++++++++++++ demos/sizes.c | 9 +++------ demos/small.c | 8 ++++++++ demos/timing.c | 8 ++++++++ demos/tv_gen.c | 8 ++++++++ helper.pl | 2 ++ src/misc/crypt/crypt.c | 2 +- tests/base64_test.c | 8 ++++++++ tests/cipher_hash_test.c | 8 ++++++++ tests/common.c | 4 ++++ tests/common.h | 12 ++++++++++++ tests/der_test.c | 8 ++++++++ tests/dh_test.c | 12 ++++++++++++ tests/dsa_test.c | 8 ++++++++ tests/ecc_test.c | 8 ++++++++ tests/file_test.c | 12 ++++++++++++ tests/katja_test.c | 12 ++++++++++++ tests/mac_test.c | 8 ++++++++ tests/misc_test.c | 8 ++++++++ tests/modes_test.c | 8 ++++++++ tests/multi_test.c | 12 ++++++++++++ tests/no_prng.c | 4 +--- tests/pkcs_1_eme_test.c | 8 ++++++++ tests/pkcs_1_emsa_test.c | 8 ++++++++ tests/pkcs_1_oaep_test.c | 8 ++++++++ tests/pkcs_1_pss_test.c | 8 ++++++++ tests/pkcs_1_test.c | 8 ++++++++ tests/prng_test.c | 12 ++++++++++++ tests/rotate_test.c | 12 ++++++++++++ tests/rsa_test.c | 8 ++++++++ tests/store_test.c | 8 ++++++++ tests/test.c | 8 ++++++++ tests/tomcrypt_test.h | 8 ++++++++ 36 files changed, 286 insertions(+), 12 deletions(-) diff --git a/demos/constants.c b/demos/constants.c index 47b7542..32af20b 100644 --- a/demos/constants.c +++ b/demos/constants.c @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" diff --git a/demos/hashsum.c b/demos/hashsum.c index 9a3bfe7..880a725 100644 --- a/demos/hashsum.c +++ b/demos/hashsum.c @@ -1,3 +1,12 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + /* * Written by Daniel Richards 6/7/2002 * hash.c: This app uses libtomcrypt to hash either stdin or a file diff --git a/demos/ltcrypt.c b/demos/ltcrypt.c index 05d1137..5425546 100644 --- a/demos/ltcrypt.c +++ b/demos/ltcrypt.c @@ -1,3 +1,12 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + /* encrypt V1.1 Fri Oct 18 04:28:03 NZDT 2002 */ /* File de/encryption, using libtomcrypt */ /* Written by Daniel Richards */ diff --git a/demos/openssl-enc.c b/demos/openssl-enc.c index b94c402..a306e73 100644 --- a/demos/openssl-enc.c +++ b/demos/openssl-enc.c @@ -1,3 +1,12 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + /* * Demo to do the rough equivalent of: * @@ -382,3 +391,7 @@ int main(int argc, char *argv[]) { fclose(infd); fclose(outfd); return 0; } + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff --git a/demos/sizes.c b/demos/sizes.c index 8846364..0825242 100644 --- a/demos/sizes.c +++ b/demos/sizes.c @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -42,7 +40,6 @@ int main(void) { return 0; } - -/* $Source: $ */ -/* $Revision: $ */ -/* $Date: $ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff --git a/demos/small.c b/demos/small.c index 6cc6703..de1f93d 100644 --- a/demos/small.c +++ b/demos/small.c @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ /* small demo app that just includes a cipher/hash/prng */ #include diff --git a/demos/timing.c b/demos/timing.c index 78e928e..b36ba61 100644 --- a/demos/timing.c +++ b/demos/timing.c @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ #include #if defined(_WIN32) diff --git a/demos/tv_gen.c b/demos/tv_gen.c index 90a75c6..f3dd7fa 100644 --- a/demos/tv_gen.c +++ b/demos/tv_gen.c @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ #include void hash_gen(void) diff --git a/helper.pl b/helper.pl index aba8d72..c9dad83 100755 --- a/helper.pl +++ b/helper.pl @@ -136,6 +136,8 @@ MARKER MARKER my @all_files; find({ wanted=> sub { push @all_files, $_ if $_ =~ /\.(c|h)$/ }, no_chdir=>1 }, 'src'); + find({ wanted=> sub { push @all_files, $_ if $_ =~ /\.(c|h)$/ }, no_chdir=>1 }, 'demos'); + find({ wanted=> sub { push @all_files, $_ if $_ =~ /\.(c|h)$/ }, no_chdir=>1 }, 'tests'); for my $f (@all_files) { my $txt = read_file($f); if ($txt !~ /^\Q$first_comment\E/s) { diff --git a/src/misc/crypt/crypt.c b/src/misc/crypt/crypt.c index 4c3681d..1599ada 100644 --- a/src/misc/crypt/crypt.c +++ b/src/misc/crypt/crypt.c @@ -16,7 +16,7 @@ #define NAME(s) #s const char *crypt_build_settings = - "LibTomCrypt " SCRYPT " (Tom St Denis, tomstdenis@gmail.com)\n" + "LibTomCrypt " SCRYPT " (www.libtom.net)\n" "LibTomCrypt is public domain software.\n" #if defined(INCLUDE_BUILD_DATE) "Built on " __DATE__ " at " __TIME__ "\n" diff --git a/tests/base64_test.c b/tests/base64_test.c index 62c0cff..b5b5e93 100644 --- a/tests/base64_test.c +++ b/tests/base64_test.c @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ #include #if defined(LTC_BASE64) || defined(LTC_BASE64_URL) diff --git a/tests/cipher_hash_test.c b/tests/cipher_hash_test.c index 488e9d6..3d9aea4 100644 --- a/tests/cipher_hash_test.c +++ b/tests/cipher_hash_test.c @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ /* test the ciphers and hashes using their built-in self-tests */ #include diff --git a/tests/common.c b/tests/common.c index 6fbab1f..9527e94 100644 --- a/tests/common.c +++ b/tests/common.c @@ -62,3 +62,7 @@ void print_hex(const char* what, const void* v, const unsigned long l) } prng_state yarrow_prng; + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff --git a/tests/common.h b/tests/common.h index 8167233..0a88f31 100644 --- a/tests/common.h +++ b/tests/common.h @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ #ifndef DEMOS_COMMON_H_ #define DEMOS_COMMON_H_ @@ -18,3 +26,7 @@ void run_cmd(int res, int line, char *file, char *cmd, const char *algorithm); void print_hex(const char* what, const void* v, const unsigned long l); #endif /* DEMOS_COMMON_H_ */ + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff --git a/tests/der_test.c b/tests/der_test.c index 92a2747..9d53d6e 100644 --- a/tests/der_test.c +++ b/tests/der_test.c @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ #include #if defined(GMP_LTC_DESC) || defined(USE_GMP) #include diff --git a/tests/dh_test.c b/tests/dh_test.c index 86af8c6..efca705 100644 --- a/tests/dh_test.c +++ b/tests/dh_test.c @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ #include #ifdef LTC_MDH @@ -118,3 +126,7 @@ int dh_test(void) } #endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff --git a/tests/dsa_test.c b/tests/dsa_test.c index 4fca9a7..c62c380 100644 --- a/tests/dsa_test.c +++ b/tests/dsa_test.c @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ #include #ifdef LTC_MDSA diff --git a/tests/ecc_test.c b/tests/ecc_test.c index fb3436d..7fb88d4 100644 --- a/tests/ecc_test.c +++ b/tests/ecc_test.c @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ #include #ifdef LTC_MECC diff --git a/tests/file_test.c b/tests/file_test.c index 8cb4eaf..24ea559 100644 --- a/tests/file_test.c +++ b/tests/file_test.c @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ /* test file related functions */ #include @@ -101,3 +109,7 @@ int file_test(void) return CRYPT_OK; #endif } + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff --git a/tests/katja_test.c b/tests/katja_test.c index dd5be64..0e95bd8 100644 --- a/tests/katja_test.c +++ b/tests/katja_test.c @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ #include #ifdef LTC_MKAT @@ -228,3 +236,7 @@ int katja_test(void) } #endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff --git a/tests/mac_test.c b/tests/mac_test.c index 0f7e7e8..dec87d1 100644 --- a/tests/mac_test.c +++ b/tests/mac_test.c @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ /* test pmac/omac/hmac */ #include diff --git a/tests/misc_test.c b/tests/misc_test.c index d10cc2f..b0140ce 100644 --- a/tests/misc_test.c +++ b/tests/misc_test.c @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ #include int misc_test(void) diff --git a/tests/modes_test.c b/tests/modes_test.c index 82387eb..96b2332 100644 --- a/tests/modes_test.c +++ b/tests/modes_test.c @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ /* test CFB/OFB/CBC modes */ #include diff --git a/tests/multi_test.c b/tests/multi_test.c index 519b78f..4b4da08 100644 --- a/tests/multi_test.c +++ b/tests/multi_test.c @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ /* test the multi helpers... */ #include @@ -223,3 +231,7 @@ int multi_test(void) return CRYPT_OK; } + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff --git a/tests/no_prng.c b/tests/no_prng.c index 1ac65b9..9f2bee3 100644 --- a/tests/no_prng.c +++ b/tests/no_prng.c @@ -1,12 +1,10 @@ -/* LibTomCrypt, modular cryptographic library +/* LibTomCrypt, modular cryptographic library -- Tom St Denis * * LibTomCrypt is a library that provides various cryptographic * algorithms in a highly modular and flexible manner. * * The library is free for all purposes without any express * guarantee it works. - * - * http://libtom.org */ #include "tomcrypt.h" diff --git a/tests/pkcs_1_eme_test.c b/tests/pkcs_1_eme_test.c index ea56a01..8926cf3 100644 --- a/tests/pkcs_1_eme_test.c +++ b/tests/pkcs_1_eme_test.c @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ #include #ifdef LTC_PKCS_1 diff --git a/tests/pkcs_1_emsa_test.c b/tests/pkcs_1_emsa_test.c index 5be6a68..953ac22 100644 --- a/tests/pkcs_1_emsa_test.c +++ b/tests/pkcs_1_emsa_test.c @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ #include #ifdef LTC_PKCS_1 diff --git a/tests/pkcs_1_oaep_test.c b/tests/pkcs_1_oaep_test.c index 549401c..b6bd302 100644 --- a/tests/pkcs_1_oaep_test.c +++ b/tests/pkcs_1_oaep_test.c @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ #include #ifdef LTC_PKCS_1 diff --git a/tests/pkcs_1_pss_test.c b/tests/pkcs_1_pss_test.c index 62692f3..5c9ccc4 100644 --- a/tests/pkcs_1_pss_test.c +++ b/tests/pkcs_1_pss_test.c @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ #include #ifdef LTC_PKCS_1 diff --git a/tests/pkcs_1_test.c b/tests/pkcs_1_test.c index 87dddb5..19bc97a 100644 --- a/tests/pkcs_1_test.c +++ b/tests/pkcs_1_test.c @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ #include #ifdef LTC_PKCS_1 diff --git a/tests/prng_test.c b/tests/prng_test.c index 5e34751..e88ff92 100644 --- a/tests/prng_test.c +++ b/tests/prng_test.c @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ #include #ifdef LTC_PRNG_ENABLE_LTC_RNG @@ -76,3 +84,7 @@ int prng_test(void) } return err; } + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff --git a/tests/rotate_test.c b/tests/rotate_test.c index 870e2db..f7c4610 100644 --- a/tests/rotate_test.c +++ b/tests/rotate_test.c @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ #include /* Test rotate macros */ @@ -402,3 +410,7 @@ int rotate_test(void) return err; } + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff --git a/tests/rsa_test.c b/tests/rsa_test.c index 70c5590..c2081f4 100644 --- a/tests/rsa_test.c +++ b/tests/rsa_test.c @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ #include #ifdef LTC_MRSA diff --git a/tests/store_test.c b/tests/store_test.c index 716ed6d..6974ba0 100644 --- a/tests/store_test.c +++ b/tests/store_test.c @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ #include /* Test store/load macros with offsets */ diff --git a/tests/test.c b/tests/test.c index 156f981..f0d5c7c 100644 --- a/tests/test.c +++ b/tests/test.c @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ #include #ifndef GIT_VERSION diff --git a/tests/tomcrypt_test.h b/tests/tomcrypt_test.h index 36fb9f7..440180c 100644 --- a/tests/tomcrypt_test.h +++ b/tests/tomcrypt_test.h @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ #ifndef __TEST_H_ #define __TEST_H_