]> git.pld-linux.org Git - packages/tpm-tools.git/blob - 0001-Fix-build-with-OpenSSL-1.1-due-to-EVP_PKEY-being-an-.patch
- new, raw from fedora
[packages/tpm-tools.git] / 0001-Fix-build-with-OpenSSL-1.1-due-to-EVP_PKEY-being-an-.patch
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
5  opaque struct
6
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}'
10
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).
16
17 [1] https://www.openssl.org/docs/man1.1.0/crypto/EVP_PKEY_base_id.html
18 ---
19  src/data_mgmt/data_import.c | 2 +-
20  1 file changed, 1 insertion(+), 1 deletion(-)
21
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,
27                 goto out;
28         }
29  
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 );
33  
34                 X509_free( pX509 );
35 -- 
36 2.9.3
37
This page took 0.128049 seconds and 3 git commands to generate.