diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2020-03-24 08:28:19 -0700 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2020-03-24 09:13:46 -0700 |
commit | 442c718051bc8e697b38d99fb91563277c64369e (patch) | |
tree | 2e1285e588863143adbfecc12526251e849bc0ba | |
parent | 0d58f14cacb195e35aa13ae0d5574e26f106a9b3 (diff) | |
download | openssl_tpm2_engine-442c718051bc8e697b38d99fb91563277c64369e.tar.gz |
Fix OpenSSL 1.0.2 build
Older versions of OpenSSL are giving the error
tpm2-common.h:82:10: error: 'struct stack_st_TSSOPTPOLICY' declared inside parameter list [-Werror]
Fix this by adding a DECLARE_STACK_OF to tpm2-asn.1 and including it
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-rw-r--r-- | tpm2-asn.h | 2 | ||||
-rw-r--r-- | tpm2-common.h | 1 |
2 files changed, 3 insertions, 0 deletions
@@ -10,6 +10,7 @@ #define _TPM2_ASN_H #include <openssl/asn1t.h> +#include <openssl/pem.h> /* * Define the format of policy commands required for TPM enhanced authorization. @@ -25,6 +26,7 @@ typedef struct { } TSSOPTPOLICY; #if OPENSSL_VERSION_NUMBER < 0x10100000 +DECLARE_STACK_OF(TSSOPTPOLICY); #define sk_TSSOPTPOLICY_new_null() SKM_sk_new_null(TSSOPTPOLICY) #define sk_TSSOPTPOLICY_push(sk, policy) SKM_sk_push(TSSOPTPOLICY, sk, policy) #define sk_TSSOPTPOLICY_pop(sk) SKM_sk_pop(TSSOPTPOLICY, sk) diff --git a/tpm2-common.h b/tpm2-common.h index 046761c..6e2028f 100644 --- a/tpm2-common.h +++ b/tpm2-common.h @@ -1,5 +1,6 @@ #ifndef _TPM2_COMMON_H #define _TPM2_COMMON_H +#include "tpm2-asn.h" #define T2_AES_KEY_BITS 128 #define T2_AES_KEY_BYTES (T2_AES_KEY_BITS/8) |