aboutsummaryrefslogtreecommitdiff
path: root/programs
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>2022-02-01 09:38:26 +0100
committerManuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>2022-02-01 09:38:26 +0100
commit29088a414610b1eea20aaeb89d31ffd433eb442c (patch)
tree2e23095c4588022d081589905856098f6aa54e34 /programs
parent6fdc9e8df1f2c7895260ac0b5fd5e4577da414a8 (diff)
downloadmbedtls-29088a414610b1eea20aaeb89d31ffd433eb442c.zip
mbedtls-29088a414610b1eea20aaeb89d31ffd433eb442c.tar.gz
mbedtls-29088a414610b1eea20aaeb89d31ffd433eb442c.tar.bz2
Avoid duplicate program names
Visual Studio and CMake didn't like having targets with the same name, albeit in different directories. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
Diffstat (limited to 'programs')
-rw-r--r--programs/.gitignore4
-rw-r--r--programs/Makefile16
-rw-r--r--programs/cipher/CMakeLists.txt2
-rw-r--r--programs/cipher/cipher_aead_demo.c (renamed from programs/cipher/aead_demo.c)2
-rw-r--r--programs/hash/CMakeLists.txt2
-rw-r--r--programs/hash/md_hmac_demo.c (renamed from programs/hash/hmac_demo.c)0
-rw-r--r--programs/psa/aead_demo.c4
-rw-r--r--programs/psa/hmac_demo.c4
8 files changed, 17 insertions, 17 deletions
diff --git a/programs/.gitignore b/programs/.gitignore
index 076821f..7fe0401 100644
--- a/programs/.gitignore
+++ b/programs/.gitignore
@@ -13,10 +13,10 @@
*.exe
aes/crypt_and_hash
-cipher/aead_demo
+cipher/cipher_aead_demo
hash/generic_sum
hash/hello
-hash/hmac_demo
+hash/md_hmac_demo
hash/md5sum
hash/sha1sum
hash/sha2sum
diff --git a/programs/Makefile b/programs/Makefile
index fccddc6..31295f6 100644
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -62,10 +62,10 @@ endif
## make sure to check that it still works if you tweak the format here.
APPS = \
aes/crypt_and_hash \
- cipher/aead_demo \
+ cipher/cipher_aead_demo \
hash/generic_sum \
hash/hello \
- hash/hmac_demo \
+ hash/md_hmac_demo \
pkey/dh_client \
pkey/dh_genprime \
pkey/dh_server \
@@ -177,9 +177,9 @@ aes/crypt_and_hash$(EXEXT): aes/crypt_and_hash.c $(DEP)
echo " CC aes/crypt_and_hash.c"
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) aes/crypt_and_hash.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
-cipher/aead_demo$(EXEXT): cipher/aead_demo.c $(DEP)
- echo " CC cipher/aead_demo.c"
- $(CC) $(LOCAL_CFLAGS) $(CFLAGS) cipher/aead_demo.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
+cipher/cipher_aead_demo$(EXEXT): cipher/cipher_aead_demo.c $(DEP)
+ echo " CC cipher/cipher_aead_demo.c"
+ $(CC) $(LOCAL_CFLAGS) $(CFLAGS) cipher/cipher_aead_demo.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
hash/generic_sum$(EXEXT): hash/generic_sum.c $(DEP)
echo " CC hash/generic_sum.c"
@@ -189,9 +189,9 @@ hash/hello$(EXEXT): hash/hello.c $(DEP)
echo " CC hash/hello.c"
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) hash/hello.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
-hash/hmac_demo$(EXEXT): hash/hmac_demo.c $(DEP)
- echo " CC hash/hmac_demo.c"
- $(CC) $(LOCAL_CFLAGS) $(CFLAGS) hash/hmac_demo.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
+hash/md_hmac_demo$(EXEXT): hash/md_hmac_demo.c $(DEP)
+ echo " CC hash/md_hmac_demo.c"
+ $(CC) $(LOCAL_CFLAGS) $(CFLAGS) hash/md_hmac_demo.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
pkey/dh_client$(EXEXT): pkey/dh_client.c $(DEP)
echo " CC pkey/dh_client.c"
diff --git a/programs/cipher/CMakeLists.txt b/programs/cipher/CMakeLists.txt
index cc16849..93e5f31 100644
--- a/programs/cipher/CMakeLists.txt
+++ b/programs/cipher/CMakeLists.txt
@@ -1,5 +1,5 @@
set(executables
- aead_demo
+ cipher_aead_demo
)
foreach(exe IN LISTS executables)
diff --git a/programs/cipher/aead_demo.c b/programs/cipher/cipher_aead_demo.c
index 894225d..4da1bfc 100644
--- a/programs/cipher/aead_demo.c
+++ b/programs/cipher/cipher_aead_demo.c
@@ -66,7 +66,7 @@ int main( void )
/* The real program starts here. */
-const char usage[] = "Usage: aead_demo [aes128-gcm|aes256-gcm|aes128-gcm_8|chachapoly]";
+const char usage[] = "Usage: cipher_aead_demo [aes128-gcm|aes256-gcm|aes128-gcm_8|chachapoly]";
/* Dummy data for encryption: IV/nonce, additional data, 2-part message */
const unsigned char iv1[12] = { 0x00 };
diff --git a/programs/hash/CMakeLists.txt b/programs/hash/CMakeLists.txt
index 9ff1df1..da98188 100644
--- a/programs/hash/CMakeLists.txt
+++ b/programs/hash/CMakeLists.txt
@@ -1,7 +1,7 @@
set(executables
generic_sum
hello
- hmac_demo
+ md_hmac_demo
)
foreach(exe IN LISTS executables)
diff --git a/programs/hash/hmac_demo.c b/programs/hash/md_hmac_demo.c
index cae6224..cae6224 100644
--- a/programs/hash/hmac_demo.c
+++ b/programs/hash/md_hmac_demo.c
diff --git a/programs/psa/aead_demo.c b/programs/psa/aead_demo.c
index 4c7a522..396e828 100644
--- a/programs/psa/aead_demo.c
+++ b/programs/psa/aead_demo.c
@@ -4,7 +4,7 @@
* This program AEAD-encrypts a message, using the algorithm and key size
* specified on the command line, using the multi-part API.
*
- * It comes with a companion program cipher/aead_demo.c, which does the same
+ * It comes with a companion program cipher/cipher_aead_demo.c, which does the same
* operations with the legacy Cipher API. The goal is that comparing the two
* programs will help people migrating to the PSA Crypto API.
*
@@ -18,7 +18,7 @@
* On the other hand, with PSA, the algorithms encodes the desired tag length;
* with Cipher the desired tag length needs to be tracked separately.
*
- * This program and its companion cipher/aead_demo.c illustrate this by doing the
+ * This program and its companion cipher/cipher_aead_demo.c illustrate this by doing the
* same sequence of multi-part AEAD computation with both APIs; looking at the
* two side by side should make the differences and similarities clear.
*/
diff --git a/programs/psa/hmac_demo.c b/programs/psa/hmac_demo.c
index 2786bb3..54fea03 100644
--- a/programs/psa/hmac_demo.c
+++ b/programs/psa/hmac_demo.c
@@ -3,7 +3,7 @@
*
* This programs computes the HMAC of two messages using the multi-part API.
*
- * It comes with a companion program hash/hmac_demo.c, which does the same
+ * It comes with a companion program hash/md_hmac_demo.c, which does the same
* operations with the legacy MD API. The goal is that comparing the two
* programs will help people migrating to the PSA Crypto API.
*
@@ -13,7 +13,7 @@
* objects: (1) a psa_key_id_t to hold the key, and (2) a psa_operation_t for
* multi-part progress.
*
- * This program and its companion hash/hmac_demo.c illustrate this by doing the
+ * This program and its companion hash/md_hmac_demo.c illustrate this by doing the
* same sequence of multi-part HMAC computation with both APIs; looking at the
* two side by side should make the differences and similarities clear.
*/