[openssl] master update
Richard Levitte
levitte at openssl.org
Fri Oct 4 08:35:46 UTC 2019
The branch master has been updated
via f50958b8c80ae267c02b2d534da8bde091010707 (commit)
from 29be6c8361aa1c898de6b98ad72fd2ccb6280441 (commit)
- Log -----------------------------------------------------------------
commit f50958b8c80ae267c02b2d534da8bde091010707
Author: Richard Levitte <levitte at openssl.org>
Date: Tue Jun 4 13:58:43 2019 +0200
Move MD5-SHA1 digest completely to the default provider
This leaves minimal implementations of EVP_md5_sha1, which is now only
there to provide a name for implicit fetches.
Reviewed-by: Matt Caswell <matt at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9076)
-----------------------------------------------------------------------
Summary of changes:
crypto/evp/build.info | 4 +--
crypto/evp/c_alld.c | 1 -
crypto/evp/{m_md5_sha1.c => legacy_md5_sha1.c} | 35 +++++-----------------
.../default/include}/internal/md5_sha1.h | 0
4 files changed, 9 insertions(+), 31 deletions(-)
rename crypto/evp/{m_md5_sha1.c => legacy_md5_sha1.c} (50%)
rename {include => providers/default/include}/internal/md5_sha1.h (100%)
diff --git a/crypto/evp/build.info b/crypto/evp/build.info
index 365fe9c305..9c71930c05 100644
--- a/crypto/evp/build.info
+++ b/crypto/evp/build.info
@@ -7,7 +7,7 @@ SOURCE[../../libcrypto]=$COMMON\
e_rc4.c e_aes.c names.c e_seed.c e_aria.c e_sm4.c \
e_xcbc_d.c e_rc2.c e_cast.c e_rc5.c \
m_null.c m_md2.c m_md4.c m_md5.c m_wp.c \
- m_md5_sha1.c m_mdc2.c m_ripemd.c \
+ m_mdc2.c m_ripemd.c \
p_open.c p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c p_dec.c \
bio_md.c bio_b64.c bio_enc.c evp_err.c e_null.c \
c_allc.c c_alld.c bio_ok.c \
@@ -17,7 +17,7 @@ SOURCE[../../libcrypto]=$COMMON\
e_aes_cbc_hmac_sha1.c e_aes_cbc_hmac_sha256.c e_rc4_hmac_md5.c \
e_chacha20_poly1305.c \
pkey_mac.c exchange.c \
- legacy_sha.c
+ legacy_sha.c legacy_md5_sha1.c
SOURCE[../../providers/fips]=$COMMON
INCLUDE[e_aes.o]=.. ../modes
diff --git a/crypto/evp/c_alld.c b/crypto/evp/c_alld.c
index f7d62bd2ec..2f68eeb7cf 100644
--- a/crypto/evp/c_alld.c
+++ b/crypto/evp/c_alld.c
@@ -22,7 +22,6 @@ void openssl_add_all_digests_int(void)
#ifndef OPENSSL_NO_MD5
EVP_add_digest(EVP_md5());
EVP_add_digest_alias(SN_md5, "ssl3-md5");
- EVP_add_digest(EVP_md5_sha1());
#endif
EVP_add_digest(EVP_sha1());
EVP_add_digest_alias(SN_sha1, "ssl3-sha1");
diff --git a/crypto/evp/m_md5_sha1.c b/crypto/evp/legacy_md5_sha1.c
similarity index 50%
rename from crypto/evp/m_md5_sha1.c
rename to crypto/evp/legacy_md5_sha1.c
index e9ed800145..cba37bacd8 100644
--- a/crypto/evp/m_md5_sha1.c
+++ b/crypto/evp/legacy_md5_sha1.c
@@ -7,47 +7,26 @@
* https://www.openssl.org/source/license.html
*/
+#include <openssl/opensslconf.h>
+
+#include "internal/md5_sha1.h" /* diverse MD5_SHA1 macros */
+
#ifndef OPENSSL_NO_MD5
-# include <string.h>
-# include <openssl/evp.h>
# include <openssl/obj_mac.h>
# include "crypto/evp.h"
-# include "internal/md5_sha1.h"
-
-static int init(EVP_MD_CTX *ctx)
-{
- return md5_sha1_init(EVP_MD_CTX_md_data(ctx));
-}
-
-static int update(EVP_MD_CTX *ctx, const void *data, size_t count)
-{
- return md5_sha1_update(EVP_MD_CTX_md_data(ctx), data, count);
-}
-
-static int final(EVP_MD_CTX *ctx, unsigned char *md)
-{
- return md5_sha1_final(md, EVP_MD_CTX_md_data(ctx));
-}
-
-static int ctrl(EVP_MD_CTX *ctx, int cmd, int mslen, void *ms)
-{
- return md5_sha1_ctrl(EVP_MD_CTX_md_data(ctx), cmd, mslen, ms);
-}
static const EVP_MD md5_sha1_md = {
NID_md5_sha1,
NID_md5_sha1,
MD5_SHA1_DIGEST_LENGTH,
0,
- init,
- update,
- final,
+ NULL,
+ NULL,
+ NULL,
NULL,
NULL,
MD5_SHA1_CBLOCK,
- sizeof(EVP_MD *) + sizeof(MD5_SHA1_CTX),
- ctrl
};
const EVP_MD *EVP_md5_sha1(void)
diff --git a/include/internal/md5_sha1.h b/providers/default/include/internal/md5_sha1.h
similarity index 100%
rename from include/internal/md5_sha1.h
rename to providers/default/include/internal/md5_sha1.h
More information about the openssl-commits
mailing list