# include <stddef.h>
# include <openssl/obj_mac.h>
# include "crypto/evp.h"
-# include "internal/blake2.h"
+# include "prov/blake2.h"
static int init(EVP_MD_CTX *ctx)
{
# include <stddef.h>
# include <openssl/obj_mac.h>
# include "crypto/evp.h"
-# include "internal/blake2.h"
+# include "prov/blake2.h"
static int init(EVP_MD_CTX *ctx)
{
#include <openssl/opensslconf.h>
-#include "internal/md5_sha1.h" /* diverse MD5_SHA1 macros */
+#include "prov/md5_sha1.h" /* diverse MD5_SHA1 macros */
#ifndef OPENSSL_NO_MD5
* https://www.openssl.org/source/license.html
*/
#include <string.h>
-#include "internal/md5_sha1.h"
+#include "prov/md5_sha1.h"
#include <openssl/evp.h>
int md5_sha1_init(MD5_SHA1_CTX *mctx)
$COMMON_INCLUDES=../crypto ../include common/include
INCLUDE[$LIBCOMMON]=$COMMON_INCLUDES
-INCLUDE[$LIBIMPLEMENTATIONS]=.. $COMMON_INCLUDES default/include
-INCLUDE[$LIBLEGACY]=$COMMON_INCLUDES
+INCLUDE[$LIBIMPLEMENTATIONS]=.. $COMMON_INCLUDES implementations/include
+INCLUDE[$LIBLEGACY]=$COMMON_INCLUDES implementations/include
INCLUDE[$LIBNONFIPS]=$COMMON_INCLUDES
INCLUDE[$LIBFIPS]=.. $COMMON_INCLUDES
DEFINE[$LIBFIPS]=FIPS_MODE
# with DEPEND.
$DEFAULTGOAL=../libcrypto
SOURCE[$DEFAULTGOAL]=$LIBIMPLEMENTATIONS $LIBNONFIPS
+# Some legacy implementations depend on provider header files
+INCLUDE[../libcrypto]=implementations/include
LIBS=$DEFAULTGOAL
# This source is common for all digests in all our providers.
SOURCE[../../libcommon.a]=digest_common.c
-
-# These are our implementations
-$GOAL=../../libimplementations.a
-
-SOURCE[$GOAL]=sha2_prov.c sha3_prov.c
*/
#include "openssl/err.h"
-#include "internal/digestcommon.h"
+#include "prov/digestcommon.h"
#include "internal/providercommonerr.h"
int digest_default_get_params(OSSL_PARAM params[], size_t blksz, size_t paramsz,
-SUBDIRS=digests ciphers
+SUBDIRS=ciphers
$GOAL=../../libcrypto
SOURCE[$GOAL]=defltprov.c
INCLUDE[$GOAL]=include
+++ /dev/null
-$GOAL=../../libimplementations.a
-
-IF[{- !$disabled{blake2} -}]
- SOURCE[$GOAL]=\
- blake2_prov.c blake2b_prov.c blake2s_prov.c
-ENDIF
-
-IF[{- !$disabled{sm3} -}]
- SOURCE[$GOAL]=\
- sm3_prov.c
-ENDIF
-
-IF[{- !$disabled{md5} -}]
- SOURCE[$GOAL]=\
- md5_prov.c md5_sha1_prov.c
-ENDIF
-SUBDIRS=macs kdfs exchange keymgmt signature
+SUBDIRS=digests macs kdfs exchange keymgmt signature
*/
#include <openssl/crypto.h>
-#include "internal/blake2.h"
-#include "internal/digestcommon.h"
+#include "prov/blake2.h"
+#include "prov/digestcommon.h"
#include "internal/provider_algs.h"
OSSL_OP_digest_init_fn blake2s256_init;
#include <string.h>
#include <openssl/crypto.h>
#include "blake2_impl.h"
-#include "internal/blake2.h"
+#include "prov/blake2.h"
static const uint64_t blake2b_IV[8] =
{
#include <string.h>
#include <openssl/crypto.h>
#include "blake2_impl.h"
-#include "internal/blake2.h"
+#include "prov/blake2.h"
static const uint32_t blake2s_IV[8] =
{
--- /dev/null
+# We make separate GOAL variables for each algorithm, to make it easy to
+# switch each to the Legacy provider when needed.
+
+$SHA1_GOAL=../../libimplementations.a
+$SHA2_GOAL=../../libimplementations.a
+$SHA3_GOAL=../../libimplementations.a
+$BLAKE2_GOAL=../../libimplementations.a
+$SM3_GOAL=../../libimplementations.a
+$MD5_GOAL=../../libimplementations.a
+
+$MD2_GOAL=../../liblegacy.a
+$MD4_GOAL=../../liblegacy.a
+$MDC2_GOAL=../../liblegacy.a
+$WHIRLPOOL_GOAL=../../liblegacy.a
+$RIPEMD_GOAL=../../liblegacy.a
+
+SOURCE[$SHA2_GOAL]=sha2_prov.c
+SOURCE[$SHA3_GOAL]=sha3_prov.c
+
+$GOAL=../../libimplementations.a
+
+IF[{- !$disabled{blake2} -}]
+ SOURCE[$BLAKE2_GOAL]=blake2_prov.c blake2b_prov.c blake2s_prov.c
+ENDIF
+
+IF[{- !$disabled{sm3} -}]
+ SOURCE[$SM3_GOAL]=sm3_prov.c
+ENDIF
+
+IF[{- !$disabled{md5} -}]
+ SOURCE[$MD5_GOAL]=md5_prov.c md5_sha1_prov.c
+ENDIF
+
+IF[{- !$disabled{md2} -}]
+ SOURCE[$MD2_GOAL]=md2_prov.c
+ENDIF
+
+IF[{- !$disabled{md4} -}]
+ SOURCE[$MD4_GOAL]=md4_prov.c
+ENDIF
+
+IF[{- !$disabled{mdc2} -}]
+ SOURCE[$MDC2_GOAL]=mdc2_prov.c
+ENDIF
+
+IF[{- !$disabled{whirlpool} -}]
+ SOURCE[$WHIRLPOOL_GOAL]=wp_prov.c
+ENDIF
+
+IF[{- !$disabled{rmd160} -}]
+ SOURCE[$RIPEMD_GOAL]=ripemd_prov.c
+ENDIF
#include <openssl/crypto.h>
#include <openssl/md2.h>
-#include "internal/digestcommon.h"
+#include "prov/digestcommon.h"
#include "internal/provider_algs.h"
/* md2_functions */
#include <openssl/crypto.h>
#include <openssl/md4.h>
-#include "internal/digestcommon.h"
+#include "prov/digestcommon.h"
#include "internal/provider_algs.h"
/* md4_functions */
#include <openssl/crypto.h>
#include <openssl/md5.h>
-#include "internal/digestcommon.h"
+#include "prov/digestcommon.h"
#include "internal/provider_algs.h"
/* md5_functions */
#include <openssl/evp.h>
#include <openssl/params.h>
#include <openssl/core_names.h>
-#include "internal/md5_sha1.h"
-#include "internal/digestcommon.h"
+#include "prov/md5_sha1.h"
+#include "prov/digestcommon.h"
#include "internal/provider_algs.h"
static OSSL_OP_digest_set_ctx_params_fn md5_sha1_set_ctx_params;
#include <openssl/mdc2.h>
#include <openssl/core_names.h>
#include <openssl/err.h>
-#include "internal/digestcommon.h"
+#include "prov/digestcommon.h"
#include "internal/provider_algs.h"
#include "internal/providercommonerr.h"
#include <openssl/crypto.h>
#include <openssl/ripemd.h>
-#include "internal/digestcommon.h"
+#include "prov/digestcommon.h"
#include "internal/provider_algs.h"
/* ripemd160_functions */
#include <openssl/evp.h>
#include <openssl/params.h>
#include <openssl/core_names.h>
-#include "internal/digestcommon.h"
+#include "prov/digestcommon.h"
#include "internal/provider_algs.h"
#include "crypto/sha.h"
#include <openssl/params.h>
#include <openssl/err.h>
#include "internal/sha3.h"
-#include "internal/digestcommon.h"
+#include "prov/digestcommon.h"
#include "internal/provider_algs.h"
#include "internal/providercommonerr.h"
#include <openssl/crypto.h>
#include "internal/sm3.h"
-#include "internal/digestcommon.h"
+#include "prov/digestcommon.h"
#include "internal/provider_algs.h"
/* sm3_functions */
#include <openssl/crypto.h>
#include <openssl/whrlpool.h>
-#include "internal/digestcommon.h"
+#include "prov/digestcommon.h"
#include "internal/provider_algs.h"
/* wp_functions */
#include <openssl/core_names.h>
#include <openssl/params.h>
-#include "internal/blake2.h"
+#include "prov/blake2.h"
#include "internal/cryptlib.h"
#include "internal/providercommonerr.h"
#include "internal/provider_algs.h"
-SUBDIRS=digests
IF[{- $disabled{module} -}]
$GOAL=../../libcrypto
ELSE
+++ /dev/null
-$GOAL=../../liblegacy.a
-
-IF[{- !$disabled{md2} -}]
- SOURCE[$GOAL]=md2_prov.c
-ENDIF
-
-IF[{- !$disabled{md4} -}]
- SOURCE[$GOAL]=md4_prov.c
-ENDIF
-
-IF[{- !$disabled{mdc2} -}]
- SOURCE[$GOAL]=mdc2_prov.c
-ENDIF
-
-IF[{- !$disabled{whirlpool} -}]
- SOURCE[$GOAL]=wp_prov.c
-ENDIF
-
-IF[{- !$disabled{rmd160} -}]
- SOURCE[$GOAL]=ripemd_prov.c
-ENDIF