From 3e3c5d914ee86d1a9255ed77422b7aaea3f68402 Mon Sep 17 00:00:00 2001 From: Reyk Floeter Date: Fri, 10 May 2019 11:33:15 +0200 Subject: [PATCH 1/2] Unbreak cloud-agent's cms build on newer LibreSSL (OpenBSD 6.5) Fix from github.com/xenotrope --- cms/lib/cms.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cms/lib/cms.h b/cms/lib/cms.h index 8fbb726..f3c6815 100644 --- a/cms/lib/cms.h +++ b/cms/lib/cms.h @@ -80,6 +80,13 @@ DECLARE_ASN1_FUNCTIONS(CMS_ContentInfo) DECLARE_ASN1_FUNCTIONS(CMS_ReceiptRequest) DECLARE_ASN1_PRINT_FUNCTION(CMS_ContentInfo) +#if LIBRESSL_VERSION_NUMBER >= 0x20900000L +#define M_ASN1_new_of(type) \ + (type *)ASN1_item_new(ASN1_ITEM_rptr(type)) +#define M_ASN1_free_of(x, type) \ + ASN1_item_free(CHECKED_PTR_OF(type, x), ASN1_ITEM_rptr(type)) +#endif + # define CMS_SIGNERINFO_ISSUER_SERIAL 0 # define CMS_SIGNERINFO_KEYIDENTIFIER 1 From ffe93c5b4f77c528fff5c59feb31803442ae6efc Mon Sep 17 00:00:00 2001 From: Reyk Floeter Date: Fri, 10 May 2019 12:09:59 +0200 Subject: [PATCH 2/2] Add #if defined(LIBRESSL_VERSION_NUMBER) --- cms/lib/cms.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cms/lib/cms.h b/cms/lib/cms.h index f3c6815..c761e82 100644 --- a/cms/lib/cms.h +++ b/cms/lib/cms.h @@ -80,7 +80,7 @@ DECLARE_ASN1_FUNCTIONS(CMS_ContentInfo) DECLARE_ASN1_FUNCTIONS(CMS_ReceiptRequest) DECLARE_ASN1_PRINT_FUNCTION(CMS_ContentInfo) -#if LIBRESSL_VERSION_NUMBER >= 0x20900000L +#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x20900000L #define M_ASN1_new_of(type) \ (type *)ASN1_item_new(ASN1_ITEM_rptr(type)) #define M_ASN1_free_of(x, type) \