[Openvpn-devel,v3,2/2] OpenSSL: remove EVP_PKEY_id()

Message ID 20180117131046.32402-2-logout@free.fr
State Rejected
Headers show
Series [Openvpn-devel,v3,1/2] OpenSSL: remove some EVP_PKEY type checks | expand

Commit Message

Emmanuel Deloget Jan. 17, 2018, 2:10 a.m. UTC
The function is no longer used so we don't need to keep it in the
OpenSSL 1.1 compatibility layer.

Signed-off-by: Emmanuel Deloget <logout@free.fr>
---
 configure.ac                 |  1 -
 src/openvpn/openssl_compat.h | 14 --------------
 2 files changed, 15 deletions(-)

Comments

Emmanuel Deloget Jan. 17, 2018, 2:14 a.m. UTC | #1
​Of course, this one is not strictly needed. If you want to keep the
function around, feel free to ignore the patch.

Given the relative simplicity of the change, one can also consider that if
the function is needed again we could simply revert this patch.

Best regards,

-- Emmanuel Deloget​
​
<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace">​Of course, this one is not strictly needed. If you want to keep the function around, feel free to ignore the patch. </div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">Given the relative simplicity of the change, one can also consider that if the function is needed again we could simply revert this patch. </div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">Best regards, </div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">-- Emmanuel Deloget​</div>​</div>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Selva Nair Jan. 17, 2018, 4:44 a.m. UTC | #2
Hi

On Wed, Jan 17, 2018 at 8:14 AM, Emmanuel Deloget <logout@free.fr> wrote:
> Of course, this one is not strictly needed. If you want to keep the function
> around, feel free to ignore the patch.
>
> Given the relative simplicity of the change, one can also consider that if
> the function is needed again we could simply revert this patch.

That's fine with me. My pending patches do not call this (at the expense
of double EVP_PKEY_get0_RSA() calls first to dispatch and then to do the
work) and I'm fine with it at the moment.

Selva

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

Patch

diff --git a/configure.ac b/configure.ac
index 2c1937e5..e855a241 100644
--- a/configure.ac
+++ b/configure.ac
@@ -925,7 +925,6 @@  if test "${with_crypto_library}" = "openssl"; then
 			X509_STORE_get0_objects \
 			X509_OBJECT_free \
 			X509_OBJECT_get_type \
-			EVP_PKEY_id \
 			EVP_PKEY_get0_RSA \
 			EVP_PKEY_get0_DSA \
 			EVP_PKEY_get0_EC_KEY \
diff --git a/src/openvpn/openssl_compat.h b/src/openvpn/openssl_compat.h
index 05ec4e95..2c8913e1 100644
--- a/src/openvpn/openssl_compat.h
+++ b/src/openvpn/openssl_compat.h
@@ -258,20 +258,6 @@  EVP_PKEY_get0_EC_KEY(EVP_PKEY *pkey)
 }
 #endif
 
-#if !defined(HAVE_EVP_PKEY_ID)
-/**
- * Get the PKEY type
- *
- * @param pkey                Public key object
- * @return                    The key type
- */
-static inline int
-EVP_PKEY_id(const EVP_PKEY *pkey)
-{
-    return pkey ? pkey->type : EVP_PKEY_NONE;
-}
-#endif
-
 #if !defined(HAVE_EVP_PKEY_GET0_DSA)
 /**
  * Get the DSA object of a public key