Move hmac_non_psa out of psa/ directory
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
diff --git a/programs/.gitignore b/programs/.gitignore
index 670c282..6500174 100644
--- a/programs/.gitignore
+++ b/programs/.gitignore
@@ -15,6 +15,7 @@
aes/crypt_and_hash
hash/generic_sum
hash/hello
+hash/hmac_demo
hash/md5sum
hash/sha1sum
hash/sha2sum
@@ -41,8 +42,7 @@
psa/aead_non_psa
psa/aead_psa
psa/crypto_examples
-psa/hmac_non_psa
-psa/hmac_psa
+psa/hmac_demo
psa/key_ladder_demo
psa/psa_constant_names
random/gen_entropy
diff --git a/programs/Makefile b/programs/Makefile
index 2f0d406..d2f7d8d 100644
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -64,6 +64,7 @@
aes/crypt_and_hash \
hash/generic_sum \
hash/hello \
+ hash/hmac_demo \
pkey/dh_client \
pkey/dh_genprime \
pkey/dh_server \
@@ -87,8 +88,7 @@
psa/aead_non_psa \
psa/aead_psa \
psa/crypto_examples \
- psa/hmac_non_psa \
- psa/hmac_psa \
+ psa/hmac_demo \
psa/key_ladder_demo \
psa/psa_constant_names \
random/gen_entropy \
@@ -177,13 +177,17 @@
echo " CC aes/crypt_and_hash.c"
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) aes/crypt_and_hash.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
+hash/generic_sum$(EXEXT): hash/generic_sum.c $(DEP)
+ echo " CC hash/generic_sum.c"
+ $(CC) $(LOCAL_CFLAGS) $(CFLAGS) hash/generic_sum.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
+
hash/hello$(EXEXT): hash/hello.c $(DEP)
echo " CC hash/hello.c"
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) hash/hello.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
-hash/generic_sum$(EXEXT): hash/generic_sum.c $(DEP)
- echo " CC hash/generic_sum.c"
- $(CC) $(LOCAL_CFLAGS) $(CFLAGS) hash/generic_sum.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 $@
pkey/dh_client$(EXEXT): pkey/dh_client.c $(DEP)
echo " CC pkey/dh_client.c"
@@ -277,13 +281,9 @@
echo " CC psa/crypto_examples.c"
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) psa/crypto_examples.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
-psa/hmac_non_psa$(EXEXT): psa/hmac_non_psa.c $(DEP)
- echo " CC psa/hmac_non_psa.c"
- $(CC) $(LOCAL_CFLAGS) $(CFLAGS) psa/hmac_non_psa.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
-
-psa/hmac_psa$(EXEXT): psa/hmac_psa.c $(DEP)
- echo " CC psa/hmac_psa.c"
- $(CC) $(LOCAL_CFLAGS) $(CFLAGS) psa/hmac_psa.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
+psa/hmac_demo$(EXEXT): psa/hmac_demo.c $(DEP)
+ echo " CC psa/hmac_demo.c"
+ $(CC) $(LOCAL_CFLAGS) $(CFLAGS) psa/hmac_demo.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
psa/key_ladder_demo$(EXEXT): psa/key_ladder_demo.c $(DEP)
echo " CC psa/key_ladder_demo.c"
diff --git a/programs/hash/CMakeLists.txt b/programs/hash/CMakeLists.txt
index 729474c..9ff1df1 100644
--- a/programs/hash/CMakeLists.txt
+++ b/programs/hash/CMakeLists.txt
@@ -1,6 +1,7 @@
set(executables
generic_sum
hello
+ hmac_demo
)
foreach(exe IN LISTS executables)
diff --git a/programs/psa/hmac_non_psa.c b/programs/hash/hmac_demo.c
similarity index 96%
rename from programs/psa/hmac_non_psa.c
rename to programs/hash/hmac_demo.c
index 66fcf7e..cae6224 100644
--- a/programs/psa/hmac_non_psa.c
+++ b/programs/hash/hmac_demo.c
@@ -3,7 +3,7 @@
*
* This programs computes the HMAC of two messages using the multi-part API.
*
- * This is a companion to hmac_psa.c, doing the same operations with the
+ * This is a companion to psa/hmac_demo.c, doing 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 hmac_non_psa.c illustrate this by doing the
+ * This program and its companion psa/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.
*/
diff --git a/programs/psa/CMakeLists.txt b/programs/psa/CMakeLists.txt
index 462fcf6..37192e3 100644
--- a/programs/psa/CMakeLists.txt
+++ b/programs/psa/CMakeLists.txt
@@ -2,8 +2,7 @@
aead_non_psa
aead_psa
crypto_examples
- hmac_non_psa
- hmac_psa
+ hmac_demo
key_ladder_demo
psa_constant_names
)
diff --git a/programs/psa/hmac_psa.c b/programs/psa/hmac_demo.c
similarity index 97%
rename from programs/psa/hmac_psa.c
rename to programs/psa/hmac_demo.c
index c943110..2786bb3 100644
--- a/programs/psa/hmac_psa.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 hmac_non_psa.c, which does the same
+ * It comes with a companion program hash/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 hmac_non_psa.c illustrate this by doing the
+ * This program and its companion hash/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.
*/