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