Remove dead EVP_enc_null() code

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29446)
This commit is contained in:
Matt Caswell
2025-12-18 15:59:26 +00:00
parent 4237166530
commit 4c8280a13c

View File

@@ -13,16 +13,12 @@
#include <openssl/objects.h>
#include "crypto/evp.h"
static int null_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc);
static int null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, size_t inl);
static const EVP_CIPHER n_cipher = {
NID_undef,
1, 0, 0, 0,
EVP_ORIG_GLOBAL,
null_init_key,
null_cipher,
NULL,
NULL,
NULL,
0,
NULL,
@@ -35,17 +31,3 @@ const EVP_CIPHER *EVP_enc_null(void)
{
return &n_cipher;
}
static int null_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc)
{
return 1;
}
static int null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, size_t inl)
{
if (in != out)
memcpy(out, in, inl);
return 1;
}