From 69bb3f5332b70739855b2bcf76a9c11085c99806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 31 Jan 2022 13:09:47 +0100 Subject: [PATCH] Move hmac_non_psa out of psa/ directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Manuel Pégourié-Gonnard --- programs/.gitignore | 4 ++-- programs/Makefile | 24 +++++++++---------- programs/hash/CMakeLists.txt | 1 + .../{psa/hmac_non_psa.c => hash/hmac_demo.c} | 4 ++-- programs/psa/CMakeLists.txt | 3 +-- programs/psa/{hmac_psa.c => hmac_demo.c} | 4 ++-- 6 files changed, 20 insertions(+), 20 deletions(-) rename programs/{psa/hmac_non_psa.c => hash/hmac_demo.c} (96%) rename programs/psa/{hmac_psa.c => hmac_demo.c} (97%) diff --git a/programs/.gitignore b/programs/.gitignore index 670c2825e1..6500174378 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 @@ pkey/rsa_verify_pss 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 2f0d406f3a..d2f7d8dd9c 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -64,6 +64,7 @@ APPS = \ 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 @@ APPS = \ 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 @@ 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 $@ +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 @@ psa/crypto_examples$(EXEXT): psa/crypto_examples.c $(DEP) 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 729474c032..9ff1df1d18 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 66fcf7e2f5..cae6224012 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 462fcf643e..37192e34d3 100644 --- a/programs/psa/CMakeLists.txt +++ b/programs/psa/CMakeLists.txt @@ -2,8 +2,7 @@ set(executables 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 c943110dbf..2786bb3766 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. */