# FIPS_MODE undefined. The default and legacy
# providers use this.
-SUBDIRS=common default
+SUBDIRS=common default implementations
INCLUDE[../libcrypto]=common/include
-SUBDIRS=digests ciphers macs kdfs exchange keymgmt signature
+SUBDIRS=digests ciphers
SOURCE[../libcommon.a]=provider_err.c provlib.c
$FIPSCOMMON=provider_util.c
+++ /dev/null
-$GOAL=../../libimplementations.a
-
-IF[{- !$disabled{dh} -}]
- SOURCE[$GOAL]=dh_exch.c
-ENDIF
+++ /dev/null
-$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
+++ /dev/null
-$GOAL=../../libimplementations.a
-
-IF[{- !$disabled{dh} -}]
- SOURCE[$GOAL]=dh_kmgmt.c
-ENDIF
-IF[{- !$disabled{dsa} -}]
- SOURCE[$GOAL]=dsa_kmgmt.c
-ENDIF
+++ /dev/null
-$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
+++ /dev/null
-$GOAL=../../libimplementations.a
-
-IF[{- !$disabled{dsa} -}]
- SOURCE[$GOAL]=dsa.c
-ENDIF
-
-
--- /dev/null
+SUBDIRS=macs kdfs exchange keymgmt signature
--- /dev/null
+# 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
--- /dev/null
+# 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
--- /dev/null
+# 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
--- /dev/null
+# 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
--- /dev/null
+# 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
+
+