aboutsummaryrefslogtreecommitdiffstats
path: root/src/stroke
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2006-06-09 05:50:41 +0000
committerAndreas Steffen <andreas.steffen@strongswan.org>2006-06-09 05:50:41 +0000
commitb7f9ca5837bae541ed789d7a3e194a6347512232 (patch)
treeb863116df944616e6697a7e001d9d871a8e7899d /src/stroke
parentac427e3677e2cb7b41142eb99dd7ae37dc2a5a97 (diff)
downloadstrongswan-b7f9ca5837bae541ed789d7a3e194a6347512232.tar.bz2
strongswan-b7f9ca5837bae541ed789d7a3e194a6347512232.tar.xz
added support for leftsendcert= and left|rightca= parameters
Diffstat (limited to 'src/stroke')
-rw-r--r--src/stroke/stroke.c6
-rw-r--r--src/stroke/stroke.h23
2 files changed, 20 insertions, 9 deletions
diff --git a/src/stroke/stroke.c b/src/stroke/stroke.c
index 9bcc39ad4..3e2c473eb 100644
--- a/src/stroke/stroke.c
+++ b/src/stroke/stroke.c
@@ -24,6 +24,8 @@
#include <stdio.h>
#include <linux/stddef.h>
+#include <types.h>
+
#include "stroke.h"
#define streq(a, b) (strcmp((a), (b)) == 0) /* clearer shorthand */
@@ -106,12 +108,16 @@ static int add_connection(char *name,
msg.add_conn.me.subnet = push_string(&msg, my_net);
msg.add_conn.me.subnet_mask = my_netmask;
msg.add_conn.me.cert = NULL;
+ msg.add_conn.me.ca = NULL;
+ msg.add_conn.me.sendcert = CERT_SEND_IF_ASKED;
msg.add_conn.other.id = push_string(&msg, other_id);
msg.add_conn.other.address = push_string(&msg, other_addr);
msg.add_conn.other.subnet = push_string(&msg, other_net);
msg.add_conn.other.subnet_mask = other_netmask;
msg.add_conn.other.cert = NULL;
+ msg.add_conn.other.ca = NULL;
+ msg.add_conn.other.sendcert = CERT_SEND_IF_ASKED;
return send_stroke_msg(&msg);
}
diff --git a/src/stroke/stroke.h b/src/stroke/stroke.h
index a5e26af4a..fd7870f6c 100644
--- a/src/stroke/stroke.h
+++ b/src/stroke/stroke.h
@@ -30,6 +30,18 @@
#define STROKE_BUF_LEN 2048
+typedef struct stroke_end_t stroke_end_t;
+
+struct stroke_end_t {
+ char *id;
+ char *cert;
+ char *ca;
+ char *address;
+ char *subnet;
+ int subnet_mask;
+ certpolicy_t sendcert;
+};
+
typedef struct stroke_msg_t stroke_msg_t;
/**
@@ -73,15 +85,8 @@ struct stroke_msg_t {
/* data for STR_ADD_CONN */
struct {
char *name;
- /* is this connection handled by charon? */
- int ikev2;
- struct {
- char *id;
- char *cert;
- char *address;
- char *subnet;
- int subnet_mask;
- } me, other;
+ bool ikev2;
+ stroke_end_t me, other;
} add_conn;
struct {