]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Clean up some unnecessary inclusions
authorMatt Caswell <matt@openssl.org>
Wed, 7 Jan 2026 11:54:05 +0000 (11:54 +0000)
committerNeil Horman <nhorman@openssl.org>
Fri, 9 Jan 2026 14:25:51 +0000 (09:25 -0500)
After the deadcode removal there were varios include files being used
that are no longer necessary. We remove them.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29460)

12 files changed:
crypto/evp/legacy_blake2.c
crypto/evp/legacy_md2.c
crypto/evp/legacy_md4.c
crypto/evp/legacy_md5.c
crypto/evp/legacy_md5_sha1.c
crypto/evp/legacy_mdc2.c
crypto/evp/legacy_meth.h [deleted file]
crypto/evp/legacy_ripemd.c
crypto/evp/legacy_sha.c
crypto/evp/legacy_wp.c
crypto/evp/m_null.c
crypto/sm3/legacy_sm3.c

index 317cc9c95fad8341dc06518bb23d3372f7522463..b7018c8277cd073aba3f785ac17ecf9ca6237baf 100644 (file)
@@ -9,7 +9,6 @@
 
 #include "crypto/evp.h"
 #include "prov/blake2.h" /* diverse BLAKE2 macros */
-#include "legacy_meth.h"
 
 static const EVP_MD blake2b_md = {
     NID_blake2b512,
index 2fe3341adfca4cc64d752ccc8390051ceab23bb7..605f8a5b44a6898a129bb6916a328acdd4be7c7d 100644 (file)
@@ -9,7 +9,6 @@
 
 #include <openssl/md2.h>
 #include "crypto/evp.h"
-#include "legacy_meth.h"
 
 static const EVP_MD md2_md = {
     NID_md2,
index 6d12ebdeec09818dd91d69887ba9ad79caba7014..fcfe3662e456a22631121c34db4aa656ae523f68 100644 (file)
@@ -15,7 +15,6 @@
 
 #include <openssl/md4.h>
 #include "crypto/evp.h"
-#include "legacy_meth.h"
 
 static const EVP_MD md4_md = {
     NID_md4,
index cc33f057951ad6a738d21861793b35d87f27a976..bb84cea6b024d8c03c43254c1b3d5bed6fa1d555 100644 (file)
@@ -15,7 +15,6 @@
 
 #include <openssl/md5.h>
 #include "crypto/evp.h"
-#include "legacy_meth.h"
 
 static const EVP_MD md5_md = {
     NID_md5,
index 5e6cf85bf1649c42bc5adbe9ef2e4ada81dad35c..eb81dc5c41512815c31ba1137c2534db272a87ba 100644 (file)
@@ -16,7 +16,6 @@
 
 #include "crypto/evp.h"
 #include "prov/md5_sha1.h" /* diverse MD5_SHA1 macros */
-#include "legacy_meth.h"
 
 static const EVP_MD md5_sha1_md = {
     NID_md5_sha1,
index ef940558e56ab0ab16efc7c0d5efb007052dd432..af47c46f6fa845ca6aa8b3e9661a8966ad92a05c 100644 (file)
@@ -15,7 +15,6 @@
 
 #include <openssl/mdc2.h>
 #include "crypto/evp.h"
-#include "legacy_meth.h"
 
 static const EVP_MD mdc2_md = {
     NID_mdc2,
diff --git a/crypto/evp/legacy_meth.h b/crypto/evp/legacy_meth.h
deleted file mode 100644 (file)
index 01d80e3..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved.
- *
- * Licensed under the Apache License 2.0 (the "License").  You may not use
- * this file except in compliance with the License.  You can obtain a copy
- * in the file LICENSE in the source distribution or at
- * https://www.openssl.org/source/license.html
- */
-
-#define IMPLEMENT_LEGACY_EVP_MD_METH(nm, fn)                                \
-    static int nm##_init(EVP_MD_CTX *ctx)                                   \
-    {                                                                       \
-        return fn##_Init(EVP_MD_CTX_get0_md_data(ctx));                     \
-    }                                                                       \
-    static int nm##_update(EVP_MD_CTX *ctx, const void *data, size_t count) \
-    {                                                                       \
-        return fn##_Update(EVP_MD_CTX_get0_md_data(ctx), data, count);      \
-    }                                                                       \
-    static int nm##_final(EVP_MD_CTX *ctx, unsigned char *md)               \
-    {                                                                       \
-        return fn##_Final(md, EVP_MD_CTX_get0_md_data(ctx));                \
-    }
-
-#define IMPLEMENT_LEGACY_EVP_MD_METH_LC(nm, fn)                             \
-    static int nm##_init(EVP_MD_CTX *ctx)                                   \
-    {                                                                       \
-        return fn##_init(EVP_MD_CTX_get0_md_data(ctx));                     \
-    }                                                                       \
-    static int nm##_update(EVP_MD_CTX *ctx, const void *data, size_t count) \
-    {                                                                       \
-        return fn##_update(EVP_MD_CTX_get0_md_data(ctx), data, count);      \
-    }                                                                       \
-    static int nm##_final(EVP_MD_CTX *ctx, unsigned char *md)               \
-    {                                                                       \
-        return fn##_final(md, EVP_MD_CTX_get0_md_data(ctx));                \
-    }
index f031d16973f0889529eeaf70a4ea8d22b54b6f83..8f32e5ffbc11b40dc1080a2cdea010b3a2bfaaee 100644 (file)
@@ -15,7 +15,6 @@
 
 #include <openssl/ripemd.h>
 #include "crypto/evp.h"
-#include "legacy_meth.h"
 
 static const EVP_MD ripemd160_md = {
     NID_ripemd160,
index 3333e02377deef29c36a7d039bf7e02599f88ca7..437caf4113ca5042cd47fe40d0077aa77ff417f7 100644 (file)
 #include <openssl/sha.h> /* diverse SHA macros */
 #include "internal/sha3.h" /* KECCAK1600_WIDTH */
 #include "crypto/evp.h"
-/* Used by legacy methods */
-#include "crypto/sha.h"
-#include "legacy_meth.h"
-#include "evp_local.h"
 
 static const EVP_MD sha1_md = {
     NID_sha1,
index 3fb202a898c70137475ae807e4cee4a535ced4e4..e5a127d06c140d7c4efff96d9e701b8893b80bdf 100644 (file)
@@ -15,7 +15,6 @@
 
 #include <openssl/whrlpool.h>
 #include "crypto/evp.h"
-#include "legacy_meth.h"
 
 static const EVP_MD whirlpool_md = {
     NID_whirlpool,
index 316b964fc030d0ab8368a26f15cd582b8609d199..2337f0d19fae15b1109145c270f5327c32541a62 100644 (file)
@@ -7,11 +7,6 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include <stdio.h>
-#include "internal/cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-#include <openssl/x509.h>
 #include "crypto/evp.h"
 
 static const EVP_MD null_md = {
index b7129230fa9d97352494547779ef630b3968324f..c37dbaab6d943e32c2d5162be1545c10fa170338 100644 (file)
@@ -9,7 +9,6 @@
  */
 
 #include "crypto/evp.h"
-#include "../evp/legacy_meth.h"
 #include "internal/sm3.h"
 
 static const EVP_MD sm3_md = {