From 5687e357c60b31dc274c6d14f1cd623d0cff469b Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Fri, 4 Oct 2019 10:24:09 +0200 Subject: [PATCH] Providers: move common exchange,kdfs,keymgmt,macs,signature From providers/common/ to providers/implementations/ Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/10088) --- providers/build.info | 2 +- providers/common/build.info | 2 +- providers/common/exchange/build.info | 5 ----- providers/common/kdfs/build.info | 5 ----- providers/common/keymgmt/build.info | 8 ------- providers/common/macs/build.info | 9 -------- providers/common/signature/build.info | 7 ------ providers/implementations/build.info | 1 + providers/implementations/exchange/build.info | 8 +++++++ .../exchange/dh_exch.c | 0 providers/implementations/kdfs/build.info | 22 +++++++++++++++++++ .../{common => implementations}/kdfs/hkdf.c | 0 .../{common => implementations}/kdfs/kbkdf.c | 0 .../{common => implementations}/kdfs/pbkdf2.c | 0 .../{common => implementations}/kdfs/pbkdf2.h | 0 .../kdfs/pbkdf2_fips.c | 0 .../{common => implementations}/kdfs/sskdf.c | 0 .../kdfs/tls1_prf.c | 0 providers/implementations/keymgmt/build.info | 12 ++++++++++ .../keymgmt/dh_kmgmt.c | 0 .../keymgmt/dsa_kmgmt.c | 0 providers/implementations/macs/build.info | 15 +++++++++++++ .../macs/cmac_prov.c | 0 .../macs/gmac_prov.c | 0 .../macs/hmac_prov.c | 0 .../macs/kmac_prov.c | 0 .../implementations/signature/build.info | 10 +++++++++ .../signature/dsa.c | 0 28 files changed, 70 insertions(+), 36 deletions(-) delete mode 100644 providers/common/exchange/build.info delete mode 100644 providers/common/kdfs/build.info delete mode 100644 providers/common/keymgmt/build.info delete mode 100644 providers/common/macs/build.info delete mode 100644 providers/common/signature/build.info create mode 100644 providers/implementations/build.info create mode 100644 providers/implementations/exchange/build.info rename providers/{common => implementations}/exchange/dh_exch.c (100%) create mode 100644 providers/implementations/kdfs/build.info rename providers/{common => implementations}/kdfs/hkdf.c (100%) rename providers/{common => implementations}/kdfs/kbkdf.c (100%) rename providers/{common => implementations}/kdfs/pbkdf2.c (100%) rename providers/{common => implementations}/kdfs/pbkdf2.h (100%) rename providers/{common => implementations}/kdfs/pbkdf2_fips.c (100%) rename providers/{common => implementations}/kdfs/sskdf.c (100%) rename providers/{common => implementations}/kdfs/tls1_prf.c (100%) create mode 100644 providers/implementations/keymgmt/build.info rename providers/{common => implementations}/keymgmt/dh_kmgmt.c (100%) rename providers/{common => implementations}/keymgmt/dsa_kmgmt.c (100%) create mode 100644 providers/implementations/macs/build.info rename providers/{common => implementations}/macs/cmac_prov.c (100%) rename providers/{common => implementations}/macs/gmac_prov.c (100%) rename providers/{common => implementations}/macs/hmac_prov.c (100%) rename providers/{common => implementations}/macs/kmac_prov.c (100%) create mode 100644 providers/implementations/signature/build.info rename providers/{common => implementations}/signature/dsa.c (100%) diff --git a/providers/build.info b/providers/build.info index e951c6229d..973adac5c7 100644 --- a/providers/build.info +++ b/providers/build.info @@ -28,7 +28,7 @@ # FIPS_MODE undefined. The default and legacy # providers use this. -SUBDIRS=common default +SUBDIRS=common default implementations INCLUDE[../libcrypto]=common/include diff --git a/providers/common/build.info b/providers/common/build.info index 95c2fd107e..4e662eb97a 100644 --- a/providers/common/build.info +++ b/providers/common/build.info @@ -1,4 +1,4 @@ -SUBDIRS=digests ciphers macs kdfs exchange keymgmt signature +SUBDIRS=digests ciphers SOURCE[../libcommon.a]=provider_err.c provlib.c $FIPSCOMMON=provider_util.c diff --git a/providers/common/exchange/build.info b/providers/common/exchange/build.info deleted file mode 100644 index 90ea0c9a02..0000000000 --- a/providers/common/exchange/build.info +++ /dev/null @@ -1,5 +0,0 @@ -$GOAL=../../libimplementations.a - -IF[{- !$disabled{dh} -}] - SOURCE[$GOAL]=dh_exch.c -ENDIF diff --git a/providers/common/kdfs/build.info b/providers/common/kdfs/build.info deleted file mode 100644 index b2b354dc34..0000000000 --- a/providers/common/kdfs/build.info +++ /dev/null @@ -1,5 +0,0 @@ -$GOAL=../../libimplementations.a - -SOURCE[$GOAL]=tls1_prf.c hkdf.c kbkdf.c pbkdf2.c sskdf.c -SOURCE[../../libfips.a]=pbkdf2_fips.c -SOURCE[../../libnonfips.a]=pbkdf2_fips.c diff --git a/providers/common/keymgmt/build.info b/providers/common/keymgmt/build.info deleted file mode 100644 index 533c489077..0000000000 --- a/providers/common/keymgmt/build.info +++ /dev/null @@ -1,8 +0,0 @@ -$GOAL=../../libimplementations.a - -IF[{- !$disabled{dh} -}] - SOURCE[$GOAL]=dh_kmgmt.c -ENDIF -IF[{- !$disabled{dsa} -}] - SOURCE[$GOAL]=dsa_kmgmt.c -ENDIF diff --git a/providers/common/macs/build.info b/providers/common/macs/build.info deleted file mode 100644 index 1eafe70604..0000000000 --- a/providers/common/macs/build.info +++ /dev/null @@ -1,9 +0,0 @@ -$GOAL=../../libimplementations.a - -$COMMON=gmac_prov.c hmac_prov.c kmac_prov.c - -IF[{- !$disabled{cmac} -}] - $COMMON=$COMMON cmac_prov.c -ENDIF - -SOURCE[$GOAL]=$COMMON diff --git a/providers/common/signature/build.info b/providers/common/signature/build.info deleted file mode 100644 index 496fb7d7d8..0000000000 --- a/providers/common/signature/build.info +++ /dev/null @@ -1,7 +0,0 @@ -$GOAL=../../libimplementations.a - -IF[{- !$disabled{dsa} -}] - SOURCE[$GOAL]=dsa.c -ENDIF - - diff --git a/providers/implementations/build.info b/providers/implementations/build.info new file mode 100644 index 0000000000..1170ef96b3 --- /dev/null +++ b/providers/implementations/build.info @@ -0,0 +1 @@ +SUBDIRS=macs kdfs exchange keymgmt signature diff --git a/providers/implementations/exchange/build.info b/providers/implementations/exchange/build.info new file mode 100644 index 0000000000..fdedb86c03 --- /dev/null +++ b/providers/implementations/exchange/build.info @@ -0,0 +1,8 @@ +# We make separate GOAL variables for each algorithm, to make it easy to +# switch each to the Legacy provider when needed. + +$DH_GOAL=../../libimplementations.a + +IF[{- !$disabled{dh} -}] + SOURCE[$DH_GOAL]=dh_exch.c +ENDIF diff --git a/providers/common/exchange/dh_exch.c b/providers/implementations/exchange/dh_exch.c similarity index 100% rename from providers/common/exchange/dh_exch.c rename to providers/implementations/exchange/dh_exch.c diff --git a/providers/implementations/kdfs/build.info b/providers/implementations/kdfs/build.info new file mode 100644 index 0000000000..8800b12f7e --- /dev/null +++ b/providers/implementations/kdfs/build.info @@ -0,0 +1,22 @@ +# We make separate GOAL variables for each algorithm, to make it easy to +# switch each to the Legacy provider when needed. + +$TLS1_PRF_GOAL=../../libimplementations.a +$HKDF_GOAL=../../libimplementations.a +$KBKDF_GOAL=../../libimplementations.a +$PBKDF2_GOAL=../../libimplementations.a +$SSKDF_GOAL=../../libimplementations.a + +SOURCE[$TLS1_PRF_GOAL]=tls1_prf.c + +SOURCE[$HKDF_GOAL]=hkdf.c + +SOURCE[$KBKDF_GOAL]=kbkdf.c + +SOURCE[$PBKDF2_GOAL]=pbkdf2.c +# Extra code to satisfy the FIPS and non-FIPS separation. +# When the PBKDF2 moves to legacy, this can be removed. +SOURCE[../../libfips.a]=pbkdf2_fips.c +SOURCE[../../libnonfips.a]=pbkdf2_fips.c + +SOURCE[$SSKDF_GOAL]=sskdf.c diff --git a/providers/common/kdfs/hkdf.c b/providers/implementations/kdfs/hkdf.c similarity index 100% rename from providers/common/kdfs/hkdf.c rename to providers/implementations/kdfs/hkdf.c diff --git a/providers/common/kdfs/kbkdf.c b/providers/implementations/kdfs/kbkdf.c similarity index 100% rename from providers/common/kdfs/kbkdf.c rename to providers/implementations/kdfs/kbkdf.c diff --git a/providers/common/kdfs/pbkdf2.c b/providers/implementations/kdfs/pbkdf2.c similarity index 100% rename from providers/common/kdfs/pbkdf2.c rename to providers/implementations/kdfs/pbkdf2.c diff --git a/providers/common/kdfs/pbkdf2.h b/providers/implementations/kdfs/pbkdf2.h similarity index 100% rename from providers/common/kdfs/pbkdf2.h rename to providers/implementations/kdfs/pbkdf2.h diff --git a/providers/common/kdfs/pbkdf2_fips.c b/providers/implementations/kdfs/pbkdf2_fips.c similarity index 100% rename from providers/common/kdfs/pbkdf2_fips.c rename to providers/implementations/kdfs/pbkdf2_fips.c diff --git a/providers/common/kdfs/sskdf.c b/providers/implementations/kdfs/sskdf.c similarity index 100% rename from providers/common/kdfs/sskdf.c rename to providers/implementations/kdfs/sskdf.c diff --git a/providers/common/kdfs/tls1_prf.c b/providers/implementations/kdfs/tls1_prf.c similarity index 100% rename from providers/common/kdfs/tls1_prf.c rename to providers/implementations/kdfs/tls1_prf.c diff --git a/providers/implementations/keymgmt/build.info b/providers/implementations/keymgmt/build.info new file mode 100644 index 0000000000..dc6039b02d --- /dev/null +++ b/providers/implementations/keymgmt/build.info @@ -0,0 +1,12 @@ +# We make separate GOAL variables for each algorithm, to make it easy to +# switch each to the Legacy provider when needed. + +$DH_GOAL=../../libimplementations.a +$DSA_GOAL=../../libimplementations.a + +IF[{- !$disabled{dh} -}] + SOURCE[$DH_GOAL]=dh_kmgmt.c +ENDIF +IF[{- !$disabled{dsa} -}] + SOURCE[$DSA_GOAL]=dsa_kmgmt.c +ENDIF diff --git a/providers/common/keymgmt/dh_kmgmt.c b/providers/implementations/keymgmt/dh_kmgmt.c similarity index 100% rename from providers/common/keymgmt/dh_kmgmt.c rename to providers/implementations/keymgmt/dh_kmgmt.c diff --git a/providers/common/keymgmt/dsa_kmgmt.c b/providers/implementations/keymgmt/dsa_kmgmt.c similarity index 100% rename from providers/common/keymgmt/dsa_kmgmt.c rename to providers/implementations/keymgmt/dsa_kmgmt.c diff --git a/providers/implementations/macs/build.info b/providers/implementations/macs/build.info new file mode 100644 index 0000000000..d4538098e0 --- /dev/null +++ b/providers/implementations/macs/build.info @@ -0,0 +1,15 @@ +# We make separate GOAL variables for each algorithm, to make it easy to +# switch each to the Legacy provider when needed. + +$GMAC_GOAL=../../libimplementations.a +$HMAC_GOAL=../../libimplementations.a +$KMAC_GOAL=../../libimplementations.a +$CMAC_GOAL=../../libimplementations.a + +SOURCE[$GMAC_GOAL]=gmac_prov.c +SOURCE[$HMAC_GOAL]=hmac_prov.c +SOURCE[$KMAC_GOAL]=kmac_prov.c + +IF[{- !$disabled{cmac} -}] + SOURCE[$CMAC_GOAL]=cmac_prov.c +ENDIF diff --git a/providers/common/macs/cmac_prov.c b/providers/implementations/macs/cmac_prov.c similarity index 100% rename from providers/common/macs/cmac_prov.c rename to providers/implementations/macs/cmac_prov.c diff --git a/providers/common/macs/gmac_prov.c b/providers/implementations/macs/gmac_prov.c similarity index 100% rename from providers/common/macs/gmac_prov.c rename to providers/implementations/macs/gmac_prov.c diff --git a/providers/common/macs/hmac_prov.c b/providers/implementations/macs/hmac_prov.c similarity index 100% rename from providers/common/macs/hmac_prov.c rename to providers/implementations/macs/hmac_prov.c diff --git a/providers/common/macs/kmac_prov.c b/providers/implementations/macs/kmac_prov.c similarity index 100% rename from providers/common/macs/kmac_prov.c rename to providers/implementations/macs/kmac_prov.c diff --git a/providers/implementations/signature/build.info b/providers/implementations/signature/build.info new file mode 100644 index 0000000000..a9687fc929 --- /dev/null +++ b/providers/implementations/signature/build.info @@ -0,0 +1,10 @@ +# We make separate GOAL variables for each algorithm, to make it easy to +# switch each to the Legacy provider when needed. + +$DSA_GOAL=../../libimplementations.a + +IF[{- !$disabled{dsa} -}] + SOURCE[$DSA_GOAL]=dsa.c +ENDIF + + diff --git a/providers/common/signature/dsa.c b/providers/implementations/signature/dsa.c similarity index 100% rename from providers/common/signature/dsa.c rename to providers/implementations/signature/dsa.c -- 2.25.1