libreswan/libreswan-4.5-openssl3.patch

89 lines
2.6 KiB
Diff
Raw Normal View History

From 88b96bba93c97546bd1b7ccdfb1b805d4b209037 Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Tue, 11 Jan 2022 11:03:37 +0100
Subject: [PATCH] libreswan-4.5-openssl3.patch
---
programs/pluto/ikev2_ipseckey.h | 7 +------
programs/pluto/ikev2_ipseckey_dnsr.c | 7 ++++++-
programs/pluto/ikev2_ipseckey_dnsr.h | 8 ++++++++
3 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/programs/pluto/ikev2_ipseckey.h b/programs/pluto/ikev2_ipseckey.h
index a1441b0..d364483 100644
--- a/programs/pluto/ikev2_ipseckey.h
+++ b/programs/pluto/ikev2_ipseckey.h
@@ -1,4 +1,5 @@
#include "state.h"
+#include "ikev2_ipseckey_dnsr.h" /* for dns_status */
#ifndef _IKEV2_IPSECKEY_H
#define _IKEV2_IPSECKEY_H
@@ -11,12 +12,6 @@
#define IS_LIBUNBOUND LSW_LIBUNBOUND_ENABLED
-typedef enum {
- DNS_OK = STF_OK,
- DNS_FATAL = STF_FATAL,
- DNS_SUSPEND = STF_SUSPEND,
-} dns_status;
-
dns_status responder_fetch_idi_ipseckey(struct ike_sa *ike,
stf_status (*callback)(struct ike_sa *ike,
struct msg_digest *md,
diff --git a/programs/pluto/ikev2_ipseckey_dnsr.c b/programs/pluto/ikev2_ipseckey_dnsr.c
index be7f20a..60a4b7d 100644
--- a/programs/pluto/ikev2_ipseckey_dnsr.c
+++ b/programs/pluto/ikev2_ipseckey_dnsr.c
@@ -19,6 +19,12 @@
* for more details.
*/
+/* This file has been split from ikev2_ipseckey.c to avoid macro
+ * conflicts between NSS headers and OpenSSL 3.0 headers (included
+ * through <ldns/ldns.h>. Therefore, this file should not include
+ * internal headers that depends on NSS headers.
+ */
+
#ifndef USE_DNSSEC
# error this file should only be compiled when DNSSEC is defined
#endif
@@ -30,7 +36,6 @@
#include <unbound.h>
#include "unbound-event.h"
#include "dnssec.h" /* includes unbound.h */
-#include "ikev2_ipseckey.h" /* for dns_status */
#include "ikev2_ipseckey_dnsr.h"
struct p_dns_req *pluto_dns_list = NULL; /* DNS queries linked list */
diff --git a/programs/pluto/ikev2_ipseckey_dnsr.h b/programs/pluto/ikev2_ipseckey_dnsr.h
index f73febe..27404ae 100644
--- a/programs/pluto/ikev2_ipseckey_dnsr.h
+++ b/programs/pluto/ikev2_ipseckey_dnsr.h
@@ -3,6 +3,12 @@
#ifndef _IKEV2_IPSECKEY_DNSR_H
#define _IKEV2_IPSECKEY_DNSR_H
+typedef enum {
+ DNS_OK = STF_OK,
+ DNS_FATAL = STF_FATAL,
+ DNS_SUSPEND = STF_SUSPEND,
+} dns_status;
+
struct p_dns_req;
typedef void dnsr_cb_fn(struct p_dns_req *);
@@ -23,6 +29,8 @@ typedef void dnsr_pubkeys_cb_fn(struct p_dns_req *dnsr,
typedef void dnsr_validate_address_cb_fn(struct p_dns_req *dnsr,
unsigned char *addr);
+struct ike_sa;
+
struct p_dns_req {
dns_status dns_status;
--
2.31.1