From 3acd773846a85d142e919e2f4eeeee1acea5ca3a Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Mon, 20 Feb 2017 10:28:33 +0100 Subject: [PATCH 1/3] Fix build with OpenSSL 1.1 due to EVP_PKEY being an opaque struct With OpenSSL 1.1 the build fails with: data_import.c:375:26: error: dereferencing pointer to incomplete type 'EVP_PKEY {aka struct evp_pkey_st}' The manual page[1] says: Previous versions of this document suggested using EVP_PKEY_type(pkey->type) to determine the type of a key. Since EVP_PKEY is now opaque this is no longer possible: the equivalent is EVP_PKEY_base_id(pkey). [1] https://www.openssl.org/docs/man1.1.0/crypto/EVP_PKEY_base_id.html --- src/data_mgmt/data_import.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data_mgmt/data_import.c b/src/data_mgmt/data_import.c index f534717f02..d4d2052bc6 100644 --- a/src/data_mgmt/data_import.c +++ b/src/data_mgmt/data_import.c @@ -372,7 +372,7 @@ readX509Cert( const char *a_pszFile, goto out; } - if ( EVP_PKEY_type( pKey->type ) != EVP_PKEY_RSA ) { + if ( EVP_PKEY_base_id( pKey ) != EVP_PKEY_RSA ) { logError( TOKEN_RSA_KEY_ERROR ); X509_free( pX509 ); -- 2.9.3