Browse code

OpenSSL: remove EVP_CIPHER_CTX_new() from the compat layer

For unknown reason, the writer of the compat layer seemed to think that
this function was only present in OpenSSL 1.1. This is not the case at
all, since it has been introduced in OpenSSL before version 0.9.8.

Thus, there is no need to add this function to the compat layer, and it
can be safely removed.

Signed-off-by: Emmanuel Deloget <logout@free.fr>
Acked-by: Steffan Karger <steffan.karger@fox-it.com>
Message-Id: <20170629142119.29502-1-logout@free.fr>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg14989.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>

Emmanuel Deloget authored on 2017/06/29 23:21:18
Showing 2 changed files
... ...
@@ -919,7 +919,6 @@ if test "${enable_crypto}" = "yes" -a "${with_crypto_library}" = "openssl"; then
919 919
 
920 920
 	AC_CHECK_FUNCS(
921 921
 		[ \
922
-			EVP_CIPHER_CTX_new \
923 922
 			EVP_CIPHER_CTX_free \
924 923
 			HMAC_CTX_new \
925 924
 			HMAC_CTX_free \
... ...
@@ -101,21 +101,6 @@ EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *c)
101 101
 }
102 102
 #endif
103 103
 
104
-#if !defined(HAVE_EVP_CIPHER_CTX_NEW)
105
-/**
106
- * Allocate a new cipher context object
107
- *
108
- * @return                    A zero'ed cipher context object
109
- */
110
-static inline EVP_CIPHER_CTX *
111
-EVP_CIPHER_CTX_new(void)
112
-{
113
-    EVP_CIPHER_CTX *ctx = NULL;
114
-    ALLOC_OBJ_CLEAR(ctx, EVP_CIPHER_CTX);
115
-    return ctx;
116
-}
117
-#endif
118
-
119 104
 #if !defined(HAVE_HMAC_CTX_RESET)
120 105
 /**
121 106
  * Reset a HMAC context