From: Pauli Date: Tue, 20 Aug 2019 22:00:12 +0000 (+1000) Subject: Move KDFs to the provider. X-Git-Tag: openssl-3.0.0-alpha1~1489 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5eb43d382b3eb3fb6950cc8e0dce82886e23e984;p=thirdparty%2Fopenssl.git Move KDFs to the provider. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/9662) --- diff --git a/providers/common/kdfs/build.info b/providers/common/kdfs/build.info new file mode 100644 index 00000000000..422cf7471ec --- /dev/null +++ b/providers/common/kdfs/build.info @@ -0,0 +1,13 @@ +$COMMON=tls1_prf.c hkdf.c scrypt.c pbkdf2.c sskdf.c + +LIBS=../../../libcrypto +SOURCE[../../../libcrypto]=$COMMON sshkdf.c x942kdf.c +INCLUDE[../../../libcrypto]=. ../../../crypto + +IF[{- !$disabled{fips} -}] + MODULES=../../fips + SOURCE[../../fips]=$COMMON + INCLUDE[../../fips]=. ../../../crypto +ENDIF + + diff --git a/crypto/kdf/hkdf.c b/providers/common/kdfs/hkdf.c similarity index 100% rename from crypto/kdf/hkdf.c rename to providers/common/kdfs/hkdf.c diff --git a/crypto/kdf/pbkdf2.c b/providers/common/kdfs/pbkdf2.c similarity index 100% rename from crypto/kdf/pbkdf2.c rename to providers/common/kdfs/pbkdf2.c diff --git a/crypto/kdf/scrypt.c b/providers/common/kdfs/scrypt.c similarity index 100% rename from crypto/kdf/scrypt.c rename to providers/common/kdfs/scrypt.c diff --git a/crypto/kdf/sshkdf.c b/providers/common/kdfs/sshkdf.c similarity index 100% rename from crypto/kdf/sshkdf.c rename to providers/common/kdfs/sshkdf.c diff --git a/crypto/kdf/sskdf.c b/providers/common/kdfs/sskdf.c similarity index 100% rename from crypto/kdf/sskdf.c rename to providers/common/kdfs/sskdf.c diff --git a/crypto/kdf/tls1_prf.c b/providers/common/kdfs/tls1_prf.c similarity index 98% rename from crypto/kdf/tls1_prf.c rename to providers/common/kdfs/tls1_prf.c index edd7f05ce06..3c553e8900a 100644 --- a/crypto/kdf/tls1_prf.c +++ b/providers/common/kdfs/tls1_prf.c @@ -125,6 +125,8 @@ static int kdf_tls1_prf_ctrl(EVP_KDF_IMPL *impl, int cmd, va_list args) impl->seclen = len; return 1; + /* TODO: This is only ever called from pkey_kdf and only as part of setting the TLS secret + consider merging the twe two?? */ case EVP_KDF_CTRL_RESET_TLS_SEED: OPENSSL_cleanse(impl->seed, impl->seedlen); impl->seedlen = 0; diff --git a/crypto/kdf/x942kdf.c b/providers/common/kdfs/x942kdf.c similarity index 100% rename from crypto/kdf/x942kdf.c rename to providers/common/kdfs/x942kdf.c