]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Remove dead EVP_enc_null() code
authorMatt Caswell <matt@openssl.org>
Thu, 18 Dec 2025 15:59:26 +0000 (15:59 +0000)
committerMatt Caswell <matt@openssl.org>
Mon, 12 Jan 2026 08:31:38 +0000 (08:31 +0000)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29446)

crypto/evp/e_null.c

index 1303caa892d4b25cd43fec66a96cfa5acb9a34dd..2eb32ab6818713a688e12c4a0dff431ea1fb9108 100644 (file)
 #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;
-}