summaryrefslogtreecommitdiffstats
path: root/recipes-connectivity
diff options
context:
space:
mode:
authorTing Liu <b28495@freescale.com>2014-07-24 15:48:17 +0800
committerZhenhua Luo <zhenhua.luo@freescale.com>2014-07-29 17:25:30 +0800
commit5efa2d27dcf4637b008faf782b5e257b748b24c0 (patch)
treec121c2e1e7e3457d17d388530cb01b384188e495 /recipes-connectivity
parent512afc7c5cc481916241fd2dee20aec44ea6f2b4 (diff)
downloadmeta-fsl-ppc-5efa2d27dcf4637b008faf782b5e257b748b24c0.tar.gz
ipsec-demo (scripts and configuration files) add recipe
There are some ipsec demo scripts and configuration files for qoriq boards. add a recipe to hold them. Signed-off-by: Ting Liu <b28495@freescale.com>
Diffstat (limited to 'recipes-connectivity')
-rw-r--r--recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/README77
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_left.conf-3des-sha1-tunnel32
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_right.conf-3des-sha1-tunnel31
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/flush-setkey4
-rw-r--r--recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.left29
-rw-r--r--recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.right28
-rw-r--r--recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.left3
-rw-r--r--recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.right8
-rw-r--r--recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.left39
-rw-r--r--recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.right34
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-transport23
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-tunnel42
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-transport22
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-tunnel42
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-transport23
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-tunnel42
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-transport23
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-tunnel42
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-transport22
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-tunnel42
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-transport23
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-tunnel42
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-transport23
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-tunnel42
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.ipv42
-rw-r--r--recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonCert.pem25
-rw-r--r--recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonKey.pem27
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizes.sh19
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizest.sh19
-rw-r--r--recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/psk.txt2
-rw-r--r--recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/racoon.conf22
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-transport23
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-tunnel42
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-transport22
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-tunnel41
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-transport23
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-tunnel42
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-transport23
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-tunnel42
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-transport22
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-tunnel41
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-transport23
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-tunnel42
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-transport23
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-tunnel42
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.ipv42
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup47
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_left13
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_right13
-rw-r--r--recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan.conf19
-rw-r--r--recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswanCert.pem22
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_left10
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_right10
-rw-r--r--recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunCert.pem25
-rw-r--r--recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunKey.pem27
-rw-r--r--recipes-connectivity/ipsec-demo/ipsec-demo_0.1.bb25
56 files changed, 1518 insertions, 0 deletions
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/README b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/README
new file mode 100644
index 0000000..9578982
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/README
@@ -0,0 +1,77 @@
1test_setkey script usage
2
3The scripts in this directory may be used for testing
4native Linux IPsec with the talitos driver as a loadable module.
5
6It's assumed that these scripts have been placed in the directory
7named /test_setkey.
8
9The scripts setup_left and setup_right configure the ip addresses
10for two boards named 'left' and 'right', which are two gateways for
11an IPsec tunnel. Connect the eth1 interfaces of left and right boards together.
12For smartbits testing, connect eth0 on each board to a smartbits port.
13For other testing (ping, netperf, iperf), connect eth0 on each board to another system.
14
15The scripts named left.conf-* and right.conf-* are setkey scripts
16which configure the IPsec SA and SPD entries.
17The scripts ending in -tunnel use tunnel mode IPsec, and the scripts
18ending in -transport used transport mode IPsec.
19Transport mode is useful for quickly testing security functionality
20using ping or netperf between two boards.
21Tunnel mode can be used for testing throughput using smartbits or other
22performance test equipment.
23
24There is a top level script called 'setup' which
25is used for a one-step setup on the left and right boards.
26'setup' uses two or three parameters. The first parameter is the side, left or right.
27The second parameter is the setkey suffix for the left.conf- and right.conf- files.
28If the third parameter is supplied, the setup will modprobe that name, so
29typically you should provide talitos as the third parameter if you want to load the driver.
30If you have built the talitos driver into the kernel, omit the third parameter to setup.
31You may test software encryption if talitos is built as a module and you omit the third parameter.
32
33Below are example uses of the 'setup' script.
34
351) One-step setup for smartbits
36 Use a tunnel mode setup on each side.
37 AES-HMAC-SHA1:
38 Left side:
39 /test_setkey/setup left aes-sha1-tunnel talitos
40 Right side:
41 /test_setkey/setup right aes-sha1-tunnel talitos
42
43 3DES-HMAC-SHA1:
44 Left side:
45 /test_setkey/setup left 3des-sha1-tunnel talitos
46 Right side:
47 /test_setkey/setup right 3des-sha1-tunnel talitos
48
492) One-step setup for testing ping, netperf, or iperf between two boards.
50 Use a transport mode setup on each side.
51 AES-HMAC-SHA1:
52 Left side:
53 /test_setkey/setup left aes-sha1-transport talitos
54 Right side:
55 /test_setkey/setup right aes-sha1-transport talitos
56
57 3DES-HMAC-SHA1:
58 Left side:
59 /test_setkey/setup left 3des-sha1-transport talitos
60 Right side:
61 /test_setkey/setup right 3des-sha1-transport talitos
62
633) Testing ipv4
64 To test ipv4 (with no security) over the two gateways, use steps below.
65 Testing ipv4 is helpful to get your smartbits configuration verified
66 and also establish a baseline performance for throughput.
67
68 On the left board:
69 cd /test_setkey
70 ./setup_left
71 ./left.ipv4
72
73 On the right board:
74 cd /test_setkey
75 ./setup_right
76 ./right.ipv4
77
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_left.conf-3des-sha1-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_left.conf-3des-sha1-tunnel
new file mode 100755
index 0000000..6bd6c5d
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_left.conf-3des-sha1-tunnel
@@ -0,0 +1,32 @@
1#!/usr/sbin/setkey -f
2#
3#
4# Example ESP Tunnel for VPN.
5#
6# ========= ESP =========
7# | |
8# Network-A Gateway-A Gateway-B Network-B
9# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
10#
11# ====== 83xx board A ====== ===== 83xx board B =====
12# | | | |
13# eth0 eth1 eth1 eth0
14# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
15#
16#
17# Board A setup
18#
19# Flush the SAD and SPD
20flush;
21spdflush;
22
23# I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10)
24#
25# Security policies
26spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec
27 esp/tunnel/200.200.200.10-200.200.200.20/require;
28
29spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec
30 esp/tunnel/200.200.200.20-200.200.200.10/require;
31
32
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_right.conf-3des-sha1-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_right.conf-3des-sha1-tunnel
new file mode 100755
index 0000000..eebf307
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_right.conf-3des-sha1-tunnel
@@ -0,0 +1,31 @@
1#!/usr/sbin/setkey -f
2#
3#
4# Example ESP Tunnel for VPN.
5#
6# ========= ESP =========
7# | |
8# Network-A Gateway-A Gateway-B Network-B
9# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
10#
11# ====== 83xx board A ====== ===== 83xx board B =====
12# | | | |
13# eth0 eth1 eth1 eth0
14# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
15#
16#
17# Board B setup
18# Flush the SAD and SPD
19flush;
20spdflush;
21
22# I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20)
23#
24# Security policies
25
26spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec
27 esp/tunnel/200.200.200.20-200.200.200.10/require;
28
29spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec
30 esp/tunnel/200.200.200.10-200.200.200.20/require;
31
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/flush-setkey b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/flush-setkey
new file mode 100755
index 0000000..0be3056
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/flush-setkey
@@ -0,0 +1,4 @@
1#!/usr/sbin/setkey -f
2
3flush;
4spdflush;
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.left b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.left
new file mode 100644
index 0000000..d9d6c0c
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.left
@@ -0,0 +1,29 @@
1# /etc/ipsec.conf - strongSwan IPsec configuration file
2
3config setup
4 charondebug="chd 2, knl 2"
5 crlcheckinterval=180
6 strictcrlpolicy=no
7 plutostart=no
8
9conn %default
10 ikelifetime=60m
11 keylife=20m
12 rekeymargin=3m
13 keyingtries=1
14 keyexchange=ikev2
15 type=tunnel
16 auth=esp
17 compress=no
18 mobike=no
19
20conn net-net
21 left=200.200.200.10
22 leftsubnet=192.168.1.0/24
23 leftcert=moonCert.pem
24 leftid="C=CH, O=Linux strongSwan, CN=moon.strongswan.org"
25 leftfirewall=yes
26 right=200.200.200.20
27 rightsubnet=192.168.2.0/24
28 rightid="C=CH, O=Linux strongSwan, CN=sun.strongswan.org"
29 auto=add
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.right b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.right
new file mode 100644
index 0000000..c14dee2
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.right
@@ -0,0 +1,28 @@
1# /etc/ipsec.conf - strongSwan IPsec configuration file
2
3config setup
4 charondebug="chd 2, knl 2"
5 crlcheckinterval=180
6 strictcrlpolicy=no
7 plutostart=no
8
9conn %default
10 ikelifetime=60m
11 keylife=20m
12 rekeymargin=3m
13 keyingtries=1
14 keyexchange=ikev2
15 auth=esp
16 compress=no
17 mobike=no
18
19conn net-net
20 left=200.200.200.20
21 leftcert=sunCert.pem
22 leftid="C=CH, O=Linux strongSwan, CN=sun.strongswan.org"
23 leftsubnet=192.168.2.0/24
24 leftfirewall=yes
25 right=200.200.200.10
26 rightid="C=CH, O=Linux strongSwan, CN=moon.strongswan.org"
27 rightsubnet=192.168.1.0/24
28 auto=add
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.left b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.left
new file mode 100644
index 0000000..e86d6aa
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.left
@@ -0,0 +1,3 @@
1# /etc/ipsec.secrets - strongSwan IPsec secrets file
2
3: RSA moonKey.pem
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.right b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.right
new file mode 100644
index 0000000..1095b74
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.right
@@ -0,0 +1,8 @@
1# /etc/ipsec.secrets - strongSwan IPsec secrets file
2
3: RSA sunKey.pem
4
5
6
7
8
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.left b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.left
new file mode 100644
index 0000000..55025db
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.left
@@ -0,0 +1,39 @@
1# /etc/ipsec.conf - strongSwan IPsec configuration file
2
3config setup
4 plutodebug=control
5 crlcheckinterval=180
6 strictcrlpolicy=no
7 charonstart=no
8
9conn %default
10 ikelifetime=60m
11 keylife=20m
12 rekeymargin=3m
13 keyingtries=1
14 keyexchange=ikev1
15 left=200.200.200.10
16 leftcert=moonCert.pem
17 leftid="C=CH, O=Linux strongSwan, CN=moon.strongswan.org"
18 leftfirewall=yes
19
20conn net-net
21 left=%defaultroute
22 leftsubnet=192.168.1.0/24
23 leftcert=moonCert.pem
24 right=200.200.200.20
25 rightsubnet=192.168.2.0/24
26 rightid="C=CH, O=Linux strongSwan, CN=sun.strongswan.org"
27 auto=add
28
29conn host-host
30 left=%defaultroute
31 leftcert=moonCert.pem
32 right=200.200.200.20
33 rightid="C=CH, O=Linux strongSwan, CN=sun.strongswan.org"
34 auto=add
35
36conn rw
37 leftsubnet=192.168.1.0/24
38 right=%any
39 auto=add
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.right b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.right
new file mode 100644
index 0000000..479791e
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.right
@@ -0,0 +1,34 @@
1# /etc/ipsec.conf - strongSwan IPsec configuration file
2
3config setup
4 plutodebug=control
5 crlcheckinterval=180
6 strictcrlpolicy=no
7 charonstart=no
8
9conn %default
10 ikelifetime=60m
11 keylife=20m
12 rekeymargin=3m
13 keyingtries=1
14 keyexchange=ikev1
15 left=200.200.200.20
16 leftcert=sunCert.pem
17 leftid="C=CH, O=Linux strongSwan, CN=sun.strongswan.org"
18 leftfirewall=yes
19
20conn net-net
21 left=%defaultroute
22 leftsubnet=192.168.2.0/24
23 leftcert=sunCert.pem
24 right=200.200.200.10
25 rightsubnet=192.168.1.0/24
26 rightid="C=CH, O=Linux strongSwan, CN=moon.strongswan.org"
27 auto=add
28
29conn host-host
30 left=%defaultroute
31 leftcert=sunCert.pem
32 right=200.200.200.10
33 rightid="C=CH, O=Linux strongSwan, CN=moon.strongswan.org"
34 auto=add
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-transport
new file mode 100755
index 0000000..5422771
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-transport
@@ -0,0 +1,23 @@
1#!/usr/sbin/setkey -f
2#I am 200.200.200.10
3
4flush;
5spdflush;
6
7# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
8# and hmac-md5 authentication using 128 bit long keys
9add 200.200.200.10 200.200.200.20 esp 0x10513
10 -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
11 -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f;
12
13add 200.200.200.20 200.200.200.10 esp 0x10514
14 -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
15 -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e;
16
17
18spdadd 200.200.200.20 200.200.200.10 any -P in ipsec
19 esp/transport//require;
20
21spdadd 200.200.200.10 200.200.200.20 any -P out ipsec
22 esp/transport//require;
23
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-tunnel
new file mode 100755
index 0000000..52bf9c3
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-tunnel
@@ -0,0 +1,42 @@
1#!/usr/sbin/setkey -f
2#
3#
4# Example ESP Tunnel for VPN.
5#
6# ========= ESP =========
7# | |
8# Network-A Gateway-A Gateway-B Network-B
9# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
10#
11# ====== 83xx board A ====== ===== 83xx board B =====
12# | | | |
13# eth0 eth1 eth1 eth0
14# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
15#
16#
17# Board A setup
18#
19# Flush the SAD and SPD
20flush;
21spdflush;
22
23# I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10)
24#
25# Security policies
26spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec
27 esp/tunnel/200.200.200.10-200.200.200.20/require;
28
29spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec
30 esp/tunnel/200.200.200.20-200.200.200.10/require;
31
32
33# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
34# and hmac-md5 authentication using 128 bit long keys
35add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel
36 -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
37 -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f;
38
39add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel
40 -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
41 -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e;
42
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-transport
new file mode 100755
index 0000000..e5ee005
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-transport
@@ -0,0 +1,22 @@
1#!/usr/sbin/setkey -f
2#I am 200.200.200.10
3
4flush;
5spdflush;
6
7# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
8# and hmac-sha1 authentication using 160 bit long keys
9add 200.200.200.10 200.200.200.20 esp 0x10513
10 -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
11 -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3;
12
13add 200.200.200.20 200.200.200.10 esp 0x10514
14 -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
15 -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21;
16
17spdadd 200.200.200.20 200.200.200.10 any -P in ipsec
18 esp/transport//require;
19
20spdadd 200.200.200.10 200.200.200.20 any -P out ipsec
21 esp/transport//require;
22
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-tunnel
new file mode 100755
index 0000000..eb2881d
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-tunnel
@@ -0,0 +1,42 @@
1#!/usr/sbin/setkey -f
2#
3#
4# Example ESP Tunnel for VPN.
5#
6# ========= ESP =========
7# | |
8# Network-A Gateway-A Gateway-B Network-B
9# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
10#
11# ====== 83xx board A ====== ===== 83xx board B =====
12# | | | |
13# eth0 eth1 eth1 eth0
14# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
15#
16#
17# Board A setup
18#
19# Flush the SAD and SPD
20flush;
21spdflush;
22
23# I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10)
24#
25# Security policies
26spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec
27 esp/tunnel/200.200.200.10-200.200.200.20/require;
28
29spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec
30 esp/tunnel/200.200.200.20-200.200.200.10/require;
31
32
33# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
34# and hmac-sha1 authentication using 160 bit long keys
35add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel
36 -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
37 -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3;
38
39add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel
40 -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
41 -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21;
42
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-transport
new file mode 100755
index 0000000..b528632
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-transport
@@ -0,0 +1,23 @@
1#!/usr/sbin/setkey -f
2#I am 200.200.200.10
3
4flush;
5spdflush;
6
7# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
8# and hmac-sha2-256 authentication using 256 bit long keys
9add 200.200.200.10 200.200.200.20 esp 0x10513
10 -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
11 -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198;
12
13add 200.200.200.20 200.200.200.10 esp 0x10514
14 -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
15 -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c;
16
17
18spdadd 200.200.200.20 200.200.200.10 any -P in ipsec
19 esp/transport//require;
20
21spdadd 200.200.200.10 200.200.200.20 any -P out ipsec
22 esp/transport//require;
23
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-tunnel
new file mode 100755
index 0000000..e7726f0
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-tunnel
@@ -0,0 +1,42 @@
1#!/usr/sbin/setkey -f
2#
3#
4# Example ESP Tunnel for VPN.
5#
6# ========= ESP =========
7# | |
8# Network-A Gateway-A Gateway-B Network-B
9# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
10#
11# ====== 83xx board A ====== ===== 83xx board B =====
12# | | | |
13# eth0 eth1 eth1 eth0
14# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
15#
16#
17# Board A setup
18#
19# Flush the SAD and SPD
20flush;
21spdflush;
22
23# I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10)
24#
25# Security policies
26spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec
27 esp/tunnel/200.200.200.10-200.200.200.20/require;
28
29spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec
30 esp/tunnel/200.200.200.20-200.200.200.10/require;
31
32
33# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
34# and hmac-sha2-256 authentication using 256 bit long keys
35add 200.200.200.10 200.200.200.20 esp 0x10513 -m tunnel
36 -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
37 -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198;
38
39add 200.200.200.20 200.200.200.10 esp 0x10514 -m tunnel
40 -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
41 -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c;
42
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-transport
new file mode 100755
index 0000000..96f5783
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-transport
@@ -0,0 +1,23 @@
1#!/usr/sbin/setkey -f
2#I am 200.200.200.10
3
4flush;
5spdflush;
6
7# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
8# and hmac-md5 authentication using 128 bit long keys
9add 200.200.200.10 200.200.200.20 esp 0x10513
10 -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
11 -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f;
12
13add 200.200.200.20 200.200.200.10 esp 0x10514
14 -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
15 -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e;
16
17
18spdadd 200.200.200.20 200.200.200.10 any -P in ipsec
19 esp/transport//require;
20
21spdadd 200.200.200.10 200.200.200.20 any -P out ipsec
22 esp/transport//require;
23
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-tunnel
new file mode 100755
index 0000000..b2cf84b
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-tunnel
@@ -0,0 +1,42 @@
1#!/usr/sbin/setkey -f
2#
3#
4# Example ESP Tunnel for VPN.
5#
6# ========= ESP =========
7# | |
8# Network-A Gateway-A Gateway-B Network-B
9# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
10#
11# ====== 83xx board A ====== ===== 83xx board B =====
12# | | | |
13# eth0 eth1 eth1 eth0
14# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
15#
16#
17# Board A setup
18#
19# Flush the SAD and SPD
20flush;
21spdflush;
22
23# I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10)
24#
25# Security policies
26spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec
27 esp/tunnel/200.200.200.10-200.200.200.20/require;
28
29spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec
30 esp/tunnel/200.200.200.20-200.200.200.10/require;
31
32
33# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
34# and hmac-md5 authentication using 128 bit long keys
35add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel
36 -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
37 -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f;
38
39add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel
40 -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
41 -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e;
42
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-transport
new file mode 100755
index 0000000..f3ffaf5
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-transport
@@ -0,0 +1,22 @@
1#!/usr/sbin/setkey -f
2#I am 200.200.200.10
3
4flush;
5spdflush;
6
7# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
8# and hmac-sha1 authentication using 160 bit long keys
9add 200.200.200.10 200.200.200.20 esp 0x10513
10 -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
11 -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3;
12
13add 200.200.200.20 200.200.200.10 esp 0x10514
14 -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
15 -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21;
16
17spdadd 200.200.200.20 200.200.200.10 any -P in ipsec
18 esp/transport//require;
19
20spdadd 200.200.200.10 200.200.200.20 any -P out ipsec
21 esp/transport//require;
22
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-tunnel
new file mode 100755
index 0000000..1ab7874
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-tunnel
@@ -0,0 +1,42 @@
1#!/usr/sbin/setkey -f
2#
3#
4# Example ESP Tunnel for VPN.
5#
6# ========= ESP =========
7# | |
8# Network-A Gateway-A Gateway-B Network-B
9# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
10#
11# ====== 83xx board A ====== ===== 83xx board B =====
12# | | | |
13# eth0 eth1 eth1 eth0
14# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
15#
16#
17# Board A setup
18#
19# Flush the SAD and SPD
20flush;
21spdflush;
22
23# I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10)
24#
25# Security policies
26spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec
27 esp/tunnel/200.200.200.10-200.200.200.20/require;
28
29spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec
30 esp/tunnel/200.200.200.20-200.200.200.10/require;
31
32
33# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
34# and hmac-sha1 authentication using 160 bit long keys
35add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel
36 -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
37 -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3;
38
39add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel
40 -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
41 -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21;
42
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-transport
new file mode 100755
index 0000000..d2645d6
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-transport
@@ -0,0 +1,23 @@
1#!/usr/sbin/setkey -f
2#I am 200.200.200.10
3
4flush;
5spdflush;
6
7# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
8# and hmac-sha2-256 authentication using 256 bit long keys
9add 200.200.200.10 200.200.200.20 esp 0x10513
10 -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
11 -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198;
12
13add 200.200.200.20 200.200.200.10 esp 0x10514
14 -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
15 -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c;
16
17
18spdadd 200.200.200.20 200.200.200.10 any -P in ipsec
19 esp/transport//require;
20
21spdadd 200.200.200.10 200.200.200.20 any -P out ipsec
22 esp/transport//require;
23
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-tunnel
new file mode 100755
index 0000000..8ed697d
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-tunnel
@@ -0,0 +1,42 @@
1#!/usr/sbin/setkey -f
2#
3#
4# Example ESP Tunnel for VPN.
5#
6# ========= ESP =========
7# | |
8# Network-A Gateway-A Gateway-B Network-B
9# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
10#
11# ====== 83xx board A ====== ===== 83xx board B =====
12# | | | |
13# eth0 eth1 eth1 eth0
14# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
15#
16#
17# Board A setup
18#
19# Flush the SAD and SPD
20flush;
21spdflush;
22
23# I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10)
24#
25# Security policies
26spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec
27 esp/tunnel/200.200.200.10-200.200.200.20/require;
28
29spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec
30 esp/tunnel/200.200.200.20-200.200.200.10/require;
31
32
33# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
34# and hmac-sha2-256 authentication using 256 bit long keys
35add 200.200.200.10 200.200.200.20 esp 0x10513 -m tunnel
36 -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
37 -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198;
38
39add 200.200.200.20 200.200.200.10 esp 0x10514 -m tunnel
40 -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
41 -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c;
42
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-transport
new file mode 100755
index 0000000..84275d0
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-transport
@@ -0,0 +1,23 @@
1#!/usr/sbin/setkey -f
2#I am 200.200.200.10
3
4flush;
5spdflush;
6
7# ESP SAs doing null encryption
8# and null authentication
9add 200.200.200.10 200.200.200.20 esp 0x10513
10 -E null
11 -A null;
12
13add 200.200.200.20 200.200.200.10 esp 0x10514
14 -E null
15 -A null;
16
17
18spdadd 200.200.200.20 200.200.200.10 any -P in ipsec
19 esp/transport//require;
20
21spdadd 200.200.200.10 200.200.200.20 any -P out ipsec
22 esp/transport//require;
23
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-tunnel
new file mode 100755
index 0000000..478d14a
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-tunnel
@@ -0,0 +1,42 @@
1#!/usr/sbin/setkey -f
2#
3#
4# Example ESP Tunnel for VPN.
5#
6# ========= ESP =========
7# | |
8# Network-A Gateway-A Gateway-B Network-B
9# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
10#
11# ====== 83xx board A ====== ===== 83xx board B =====
12# | | | |
13# eth0 eth1 eth1 eth0
14# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
15#
16#
17# Board A setup
18#
19# Flush the SAD and SPD
20flush;
21spdflush;
22
23# I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10)
24#
25# Security policies
26spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec
27 esp/tunnel/200.200.200.10-200.200.200.20/require;
28
29spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec
30 esp/tunnel/200.200.200.20-200.200.200.10/require;
31
32
33# ESP SAs doing null encryption
34# and null authentication
35add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel
36 -E null
37 -A null;
38
39add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel
40 -E null
41 -A null;
42
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.ipv4 b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.ipv4
new file mode 100755
index 0000000..e219f2a
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.ipv4
@@ -0,0 +1,2 @@
1set -v
2route add -net 192.168.2.0 netmask 255.255.255.0 gw 200.200.200.20
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonCert.pem b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonCert.pem
new file mode 100644
index 0000000..d5c970f
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonCert.pem
@@ -0,0 +1,25 @@
1-----BEGIN CERTIFICATE-----
2MIIEIjCCAwqgAwIBAgIBFzANBgkqhkiG9w0BAQsFADBFMQswCQYDVQQGEwJDSDEZ
3MBcGA1UEChMQTGludXggc3Ryb25nU3dhbjEbMBkGA1UEAxMSc3Ryb25nU3dhbiBS
4b290IENBMB4XDTA5MDgyNzEwMDMzMloXDTE0MDgyNjEwMDMzMlowRjELMAkGA1UE
5BhMCQ0gxGTAXBgNVBAoTEExpbnV4IHN0cm9uZ1N3YW4xHDAaBgNVBAMTE21vb24u
6c3Ryb25nc3dhbi5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDK
7L2M91Lu6BYYhWxWgMS9z9TMSTwszm5rhO7ZIsCtMRo4PAeYw+++SGXt3CPXb/+p+
8SWKGlm11rPE71eQ3ehgh2C3hAurfmWO0iQQaCw+fdreeIVCqOQIOP6UqZ327h5yY
9YpHk8VQv4vBJTpxclU1PqnWheqe1ZlLxsW773LRml/fQt/UgvJkCBTZZONLNMfK+
107TDnYaVsAtncgvDN78nUNEe2qY92KK7SrBJ6SpUEg49m51F+XgsGcsgWVHS85on3
11Om/G48crLEVJjdu8CxewSRVgb+lPJWzHd8QsU0Vg/7vlqs3ZRMyNtNKrr4opSvVb
12A6agGlTXhDCreDiXU8KHAgMBAAGjggEaMIIBFjAJBgNVHRMEAjAAMAsGA1UdDwQE
13AwIDqDAdBgNVHQ4EFgQUapx00fiJeYn2WpTpifH6w2SdKS4wbQYDVR0jBGYwZIAU
14XafdcAZRMn7ntm2zteXgYOouTe+hSaRHMEUxCzAJBgNVBAYTAkNIMRkwFwYDVQQK
15ExBMaW51eCBzdHJvbmdTd2FuMRswGQYDVQQDExJzdHJvbmdTd2FuIFJvb3QgQ0GC
16AQAwHgYDVR0RBBcwFYITbW9vbi5zdHJvbmdzd2FuLm9yZzATBgNVHSUEDDAKBggr
17BgEFBQcDATA5BgNVHR8EMjAwMC6gLKAqhihodHRwOi8vY3JsLnN0cm9uZ3N3YW4u
18b3JnL3N0cm9uZ3N3YW4uY3JsMA0GCSqGSIb3DQEBCwUAA4IBAQCctXg2xeMozaTV
19jiBL1P8MY9uEH5JtU0EceQ1RbI5/2vGRdnECND9oADY5vamaaE2Mdq2Qh/vlXnML
20o3ii5ELjsQlYdTYZOcMOdcUUXYvbbFX1cwpkBhyBl1H25KptHcgQ/HnceKp3kOuq
21wYOYjgwePXulcpWXx0E2QtQCFQQZFPyEWeNJxH0oglg53QPXfHY9I2/Gukj5V0bz
22p7ME0Gs8KdnYdmbbDqzQgPsta96/m+HoJlsrVF+4Gqihj6BWMBQ2ybjPWZdG3oH9
2325cE8v60Ry98D0Z/tygbAUFnh5oOvaf642paVgc3aoA77I8U+UZjECxISoiHultY
247QTufOwP
25-----END CERTIFICATE-----
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonKey.pem b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonKey.pem
new file mode 100644
index 0000000..4d99866
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonKey.pem
@@ -0,0 +1,27 @@
1-----BEGIN RSA PRIVATE KEY-----
2MIIEowIBAAKCAQEAyi9jPdS7ugWGIVsVoDEvc/UzEk8LM5ua4Tu2SLArTEaODwHm
3MPvvkhl7dwj12//qfklihpZtdazxO9XkN3oYIdgt4QLq35ljtIkEGgsPn3a3niFQ
4qjkCDj+lKmd9u4ecmGKR5PFUL+LwSU6cXJVNT6p1oXqntWZS8bFu+9y0Zpf30Lf1
5ILyZAgU2WTjSzTHyvu0w52GlbALZ3ILwze/J1DRHtqmPdiiu0qwSekqVBIOPZudR
6fl4LBnLIFlR0vOaJ9zpvxuPHKyxFSY3bvAsXsEkVYG/pTyVsx3fELFNFYP+75arN
72UTMjbTSq6+KKUr1WwOmoBpU14Qwq3g4l1PChwIDAQABAoIBACBFB/Xqajv6fbn9
8K6pxrz02uXwGmacXAtVIDoPzejWmXS4QA4l17HrJDmelSnhelDKry8nnYHkTrTz7
9mn0wQ4HDWy86o/okJUG/TKRLd6bf79aRQqqohqd3iQkHk43GyzuXH+oGioVKF0fc
10ACDWw4wfjL7FMNdHCZ4Bz9DrHO/ysHe9B6rvSYm3VZRhSxaneIkaLkkDadKpVx3f
11XNFlMxY4qKPJYYSoJZ61iMqrO7+rnA93tmyDDs8PKU3BtnpfNrdePgleJHhk8Zqy
12Ev2/NOCSUxbKE8NCtLpGTs+T0qjjnu4k3WPd3ZOBAan0uPDekHZeHB/aXGLhYcxx
13J5SurqECgYEA+F1gppkER5Jtoaudt/CUpdQ1sR9wxf75VBqJ4FiYABGQz9xlG4oj
14zL/o572s0iV3bwFpnQa+WuWrxGkP6ZuB/Z82npc0N/vLou/b4dxvg4n7K+eOOEf0
158FMjsse2tqTIXKCqcmQnR0NPQ1jwuvEKsXP5w/JOlnRXAXnd4jxsJI0CgYEA0GaT
1661ySttUW9jC3mxuY6jkQy8TEQqR3nOFvWwmCXIWOpN/MTTPus+Telxp/pdKhU+mo
17PmX3Unyne5PvwleWDq3YzltX5ZDZGJ5UJlKuNnfGIzQ6OcHRbb7zBpQG6qSRPuug
18bgo688hTnb1L59nK88zWVK45euf6pyuoI+SwIGMCgYEA7yvE8knyhBXvezuv0z1b
19eGHmHp5/VDwY0DQKSEAoiBBiWrkLqLybgwXf/KJ8dZZc8En08aFX2GLJyYe/KiB1
20ys3ypEBJqgvRayP+o/9KZ+qNNRd0rqAksPXvL7ABNNt0kzapTSVDae3Yu6s/j1am
21DIL5qAeERIDedG5uDPpQzdUCgYB7MtjpP63ABhLv8XbpbBQnCxtByw3W89F+Xcrt
22v55gQdhE4cSuMzA/CuMH4vNpPS6AI9aBJNhj3CtKo/cOJachAGb1/wvkO5ALvLW0
23fhZdPstUTnDJain7vfF/hwzbs/PlhXgu9T9KlLfRvXFdG+Sd4g8mumRiozcLkoRw
24y6XPTwKBgDJP+s9wXmdG90HST/aqC7FKrVXLpB63dY5swNUfQP6sa0pFnON0r0JC
25h/YCsGFFIAebQ2uOkM3g3f9nkwTp7910ov+/5uThvRI2w2BBPy0mVuALPjyyF1Z2
26cb9zpyKiIuXoXRCf4sd8r1lR9bn0Fxx0Svpxf+fpMGSI5quHNBKY
27-----END RSA PRIVATE KEY-----
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizes.sh b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizes.sh
new file mode 100755
index 0000000..faefb24
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizes.sh
@@ -0,0 +1,19 @@
1#!/bin/bash
2#
3# Usage: ./pingsizes.sh 1440 20 (or greater)
4#
5
6PINGDEST=${PINGDEST:-200.200.200.10}
7k=$1
8lim="$((k+$2))"
9((k-=1))
10while [ "$k" != "$lim" ] ; do
11 echo -n "ping -s $((k+=1)) : "
12 ping -i 1000 -c 1 -s $k $PINGDEST | grep packets &
13 sleep 1
14 PID=`ps -eaf | grep 'ping -i' | grep -v grep | sed 's/[ ][ ]*/ /g' | cut -d " " -f 2`
15 if [ -n "$PID" ] ; then
16 echo "****************** killing $PID"
17 kill $PID > /dev/null
18 fi
19done
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizest.sh b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizest.sh
new file mode 100755
index 0000000..d5ff0f7
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizest.sh
@@ -0,0 +1,19 @@
1#!/bin/bash
2#
3# Usage: ./pingsizes.sh 1440 20 (or greater)
4#
5
6PINGDEST=${PINGDEST:-200.200.200.10}
7k=$1
8lim="$((k+$2))"
9((k-=1))
10while [ "$k" != "$lim" ] ; do
11 echo ping -s $((k+=1))
12 ping -i 1000 -c 1 -s $k $PINGDEST &
13 sleep 1
14 PID=`ps -eaf | grep 'ping -i' | sed 's/[ ][ ]*/ /g' | cut -d " " -f 2`
15 if [ -n "$PID" ] ; then
16 echo "****************** killing $PID"
17 kill $PID
18 fi
19done
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/psk.txt b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/psk.txt
new file mode 100644
index 0000000..46c1ff4
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/psk.txt
@@ -0,0 +1,2 @@
1200.200.200.20 secretkeyracoon
2200.200.200.10 secretkeyracoon
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/racoon.conf b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/racoon.conf
new file mode 100644
index 0000000..cf561f5
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/racoon.conf
@@ -0,0 +1,22 @@
1path pre_shared_key "/test_setkey/psk.txt" ;
2
3 remote anonymous
4 {
5 exchange_mode main ;
6 lifetime time 1 hour ;
7 proposal {
8 encryption_algorithm 3des;
9 hash_algorithm sha1;
10 authentication_method pre_shared_key ;
11 dh_group 2 ;
12 }
13 }
14
15 sainfo anonymous
16 {
17 pfs_group 2;
18 lifetime time 1 hour ;
19 encryption_algorithm 3des ;
20 authentication_algorithm hmac_sha1 ;
21 compression_algorithm deflate ;
22 }
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-transport
new file mode 100755
index 0000000..7f82fb4
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-transport
@@ -0,0 +1,23 @@
1#!/usr/sbin/setkey -f
2#I am 200.200.200.20
3
4flush;
5spdflush;
6
7# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
8# and hmac-md5 authentication using 128 bit long keys
9add 200.200.200.10 200.200.200.20 esp 0x10513
10 -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
11 -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f;
12
13add 200.200.200.20 200.200.200.10 esp 0x10514
14 -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
15 -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e;
16
17
18spdadd 200.200.200.20 200.200.200.10 any -P out ipsec
19 esp/transport//require;
20
21spdadd 200.200.200.10 200.200.200.20 any -P in ipsec
22 esp/transport//require;
23
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-tunnel
new file mode 100755
index 0000000..5a75257
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-tunnel
@@ -0,0 +1,42 @@
1#!/usr/sbin/setkey -f
2#
3#
4# Example ESP Tunnel for VPN.
5#
6# ========= ESP =========
7# | |
8# Network-A Gateway-A Gateway-B Network-B
9# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
10#
11# ====== 83xx board A ====== ===== 83xx board B =====
12# | | | |
13# eth0 eth1 eth1 eth0
14# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
15#
16#
17# Board B setup
18#
19# Flush the SAD and SPD
20flush;
21spdflush;
22
23# I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20)
24#
25# Security policies
26spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec
27 esp/tunnel/200.200.200.20-200.200.200.10/require;
28
29spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec
30 esp/tunnel/200.200.200.10-200.200.200.20/require;
31
32
33# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
34# and hmac-md5 authentication using 128 bit long keys
35add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel
36 -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
37 -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f;
38
39add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel
40 -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
41 -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e;
42
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-transport
new file mode 100755
index 0000000..6ef885d
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-transport
@@ -0,0 +1,22 @@
1#!/usr/sbin/setkey -f
2#I am 200.200.200.20
3
4flush;
5spdflush;
6
7# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
8# and hmac-sha1 authentication using 160 bit long keys
9add 200.200.200.10 200.200.200.20 esp 0x10513
10 -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
11 -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3;
12
13add 200.200.200.20 200.200.200.10 esp 0x10514
14 -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
15 -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21;
16
17# Security policies
18spdadd 200.200.200.20 200.200.200.10 any -P out ipsec
19 esp/transport//require;
20
21spdadd 200.200.200.10 200.200.200.20 any -P in ipsec
22 esp/transport//require;
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-tunnel
new file mode 100755
index 0000000..16c3157
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-tunnel
@@ -0,0 +1,41 @@
1#!/usr/sbin/setkey -f
2#
3#
4# Example ESP Tunnel for VPN.
5#
6# ========= ESP =========
7# | |
8# Network-A Gateway-A Gateway-B Network-B
9# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
10#
11# ====== 83xx board A ====== ===== 83xx board B =====
12# | | | |
13# eth0 eth1 eth1 eth0
14# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
15#
16#
17# Board B setup
18# Flush the SAD and SPD
19flush;
20spdflush;
21
22# I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20)
23#
24# Security policies
25
26spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec
27 esp/tunnel/200.200.200.20-200.200.200.10/require;
28
29spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec
30 esp/tunnel/200.200.200.10-200.200.200.20/require;
31
32# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
33# and hmac-sha1 authentication using 160 bit long keys
34add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel
35 -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
36 -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3;
37
38add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel
39 -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
40 -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21;
41
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-transport
new file mode 100755
index 0000000..b977209
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-transport
@@ -0,0 +1,23 @@
1#!/usr/sbin/setkey -f
2#I am 200.200.200.20
3
4flush;
5spdflush;
6
7# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
8# and hmac-sha2-256 authentication using 256 bit long keys
9add 200.200.200.10 200.200.200.20 esp 0x10513
10 -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
11 -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198;
12
13add 200.200.200.20 200.200.200.10 esp 0x10514
14 -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
15 -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c;
16
17
18spdadd 200.200.200.20 200.200.200.10 any -P out ipsec
19 esp/transport//require;
20
21spdadd 200.200.200.10 200.200.200.20 any -P in ipsec
22 esp/transport//require;
23
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-tunnel
new file mode 100755
index 0000000..e7c5b4e
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-tunnel
@@ -0,0 +1,42 @@
1#!/usr/sbin/setkey -f
2#
3#
4# Example ESP Tunnel for VPN.
5#
6# ========= ESP =========
7# | |
8# Network-A Gateway-A Gateway-B Network-B
9# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
10#
11# ====== 83xx board A ====== ===== 83xx board B =====
12# | | | |
13# eth0 eth1 eth1 eth0
14# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
15#
16#
17# Board A setup
18#
19# Flush the SAD and SPD
20flush;
21spdflush;
22
23# I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20)
24#
25# Security policies
26spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec
27 esp/tunnel/200.200.200.20-200.200.200.10/require;
28
29spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec
30 esp/tunnel/200.200.200.10-200.200.200.20/require;
31
32
33# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
34# and hmac-sha2-256 authentication using 256 bit long keys
35add 200.200.200.10 200.200.200.20 esp 0x10513 -m tunnel
36 -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
37 -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198;
38
39add 200.200.200.20 200.200.200.10 esp 0x10514 -m tunnel
40 -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
41 -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c;
42
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-transport
new file mode 100755
index 0000000..5d55d00
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-transport
@@ -0,0 +1,23 @@
1#!/usr/sbin/setkey -f
2#I am 200.200.200.20
3
4flush;
5spdflush;
6
7# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
8# and hmac-md5 authentication using 128 bit long keys
9add 200.200.200.10 200.200.200.20 esp 0x10513
10 -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
11 -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f;
12
13add 200.200.200.20 200.200.200.10 esp 0x10514
14 -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
15 -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e;
16
17
18spdadd 200.200.200.20 200.200.200.10 any -P out ipsec
19 esp/transport//require;
20
21spdadd 200.200.200.10 200.200.200.20 any -P in ipsec
22 esp/transport//require;
23
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-tunnel
new file mode 100755
index 0000000..f49bd54
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-tunnel
@@ -0,0 +1,42 @@
1#!/usr/sbin/setkey -f
2#
3#
4# Example ESP Tunnel for VPN.
5#
6# ========= ESP =========
7# | |
8# Network-A Gateway-A Gateway-B Network-B
9# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
10#
11# ====== 83xx board A ====== ===== 83xx board B =====
12# | | | |
13# eth0 eth1 eth1 eth0
14# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
15#
16#
17# Board B setup
18#
19# Flush the SAD and SPD
20flush;
21spdflush;
22
23# I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20)
24#
25# Security policies
26spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec
27 esp/tunnel/200.200.200.20-200.200.200.10/require;
28
29spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec
30 esp/tunnel/200.200.200.10-200.200.200.20/require;
31
32
33# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
34# and hmac-md5 authentication using 128 bit long keys
35add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel
36 -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
37 -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f;
38
39add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel
40 -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
41 -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e;
42
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-transport
new file mode 100755
index 0000000..d9c65a4
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-transport
@@ -0,0 +1,22 @@
1#!/usr/sbin/setkey -f
2#I am 200.200.200.20
3
4flush;
5spdflush;
6
7# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
8# and hmac-sha1 authentication using 160 bit long keys
9add 200.200.200.10 200.200.200.20 esp 0x10513
10 -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
11 -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3;
12
13add 200.200.200.20 200.200.200.10 esp 0x10514
14 -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
15 -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21;
16
17# Security policies
18spdadd 200.200.200.20 200.200.200.10 any -P out ipsec
19 esp/transport//require;
20
21spdadd 200.200.200.10 200.200.200.20 any -P in ipsec
22 esp/transport//require;
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-tunnel
new file mode 100755
index 0000000..1f10136
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-tunnel
@@ -0,0 +1,41 @@
1#!/usr/sbin/setkey -f
2#
3#
4# Example ESP Tunnel for VPN.
5#
6# ========= ESP =========
7# | |
8# Network-A Gateway-A Gateway-B Network-B
9# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
10#
11# ====== 83xx board A ====== ===== 83xx board B =====
12# | | | |
13# eth0 eth1 eth1 eth0
14# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
15#
16#
17# Board B setup
18# Flush the SAD and SPD
19flush;
20spdflush;
21
22# I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20)
23#
24# Security policies
25
26spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec
27 esp/tunnel/200.200.200.20-200.200.200.10/require;
28
29spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec
30 esp/tunnel/200.200.200.10-200.200.200.20/require;
31
32# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
33# and hmac-sha1 authentication using 160 bit long keys
34add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel
35 -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
36 -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3;
37
38add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel
39 -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
40 -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21;
41
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-transport
new file mode 100755
index 0000000..817a8bd
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-transport
@@ -0,0 +1,23 @@
1#!/usr/sbin/setkey -f
2#I am 200.200.200.20
3
4flush;
5spdflush;
6
7# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
8# and hmac-sha2-256 authentication using 256 bit long keys
9add 200.200.200.10 200.200.200.20 esp 0x10513
10 -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
11 -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198;
12
13add 200.200.200.20 200.200.200.10 esp 0x10514
14 -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
15 -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c;
16
17
18spdadd 200.200.200.20 200.200.200.10 any -P out ipsec
19 esp/transport//require;
20
21spdadd 200.200.200.10 200.200.200.20 any -P in ipsec
22 esp/transport//require;
23
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-tunnel
new file mode 100755
index 0000000..9bca18f
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-tunnel
@@ -0,0 +1,42 @@
1#!/usr/sbin/setkey -f
2#
3#
4# Example ESP Tunnel for VPN.
5#
6# ========= ESP =========
7# | |
8# Network-A Gateway-A Gateway-B Network-B
9# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
10#
11# ====== 83xx board A ====== ===== 83xx board B =====
12# | | | |
13# eth0 eth1 eth1 eth0
14# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
15#
16#
17# Board A setup
18#
19# Flush the SAD and SPD
20flush;
21spdflush;
22
23# I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20)
24#
25# Security policies
26spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec
27 esp/tunnel/200.200.200.20-200.200.200.10/require;
28
29spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec
30 esp/tunnel/200.200.200.10-200.200.200.20/require;
31
32
33# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
34# and hmac-sha2-256 authentication using 256 bit long keys
35add 200.200.200.10 200.200.200.20 esp 0x10513 -m tunnel
36 -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
37 -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198;
38
39add 200.200.200.20 200.200.200.10 esp 0x10514 -m tunnel
40 -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
41 -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c;
42
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-transport
new file mode 100755
index 0000000..26dfe2e
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-transport
@@ -0,0 +1,23 @@
1#!/usr/sbin/setkey -f
2#I am 200.200.200.20
3
4flush;
5spdflush;
6
7# ESP SAs doing null encryption
8# and null authentication
9add 200.200.200.10 200.200.200.20 esp 0x10513
10 -E null
11 -A null;
12
13add 200.200.200.20 200.200.200.10 esp 0x10514
14 -E null
15 -A null;
16
17
18spdadd 200.200.200.20 200.200.200.10 any -P out ipsec
19 esp/transport//require;
20
21spdadd 200.200.200.10 200.200.200.20 any -P in ipsec
22 esp/transport//require;
23
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-tunnel
new file mode 100755
index 0000000..bc4f38e
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-tunnel
@@ -0,0 +1,42 @@
1#!/usr/sbin/setkey -f
2#
3#
4# Example ESP Tunnel for VPN.
5#
6# ========= ESP =========
7# | |
8# Network-A Gateway-A Gateway-B Network-B
9# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
10#
11# ====== 83xx board A ====== ===== 83xx board B =====
12# | | | |
13# eth0 eth1 eth1 eth0
14# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
15#
16#
17# Board B setup
18#
19# Flush the SAD and SPD
20flush;
21spdflush;
22
23# I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20)
24#
25# Security policies
26spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec
27 esp/tunnel/200.200.200.20-200.200.200.10/require;
28
29spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec
30 esp/tunnel/200.200.200.10-200.200.200.20/require;
31
32
33# ESP SAs doing null encryption
34# and null authentication
35add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel
36 -E null
37 -A null;
38
39add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel
40 -E null
41 -A null;
42
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.ipv4 b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.ipv4
new file mode 100755
index 0000000..67cd1b2
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.ipv4
@@ -0,0 +1,2 @@
1set -v
2route add -net 192.168.1.0 netmask 255.255.255.0 gw 200.200.200.10
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup
new file mode 100755
index 0000000..9e6fa7f
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup
@@ -0,0 +1,47 @@
1# setup - quick setup for left or right side of ipsec test
2# see README for example use.
3
4SCRIPT_HOME=/test_setkey/
5cd $SCRIPT_HOME
6
7export PATH=$SCRIPT_HOME:$PATH
8
9if [ "$1" != "left" -a "$1" != "right" ] ; then
10 echo "Usage: $0 side [config] [driver]"
11 echo " where side is either left or right."
12 echo " where config is either"
13 echo " aes-sha1-tunnel (default)"
14 echo " or 3des-sha1-tunnel"
15 echo " if driver is supplied, script does 'modprobe driver'"
16 exit 1
17fi
18
19SIDE=$1
20POLICY_CFG=$SIDE.conf
21DEFAULT_POLICY=aes-sha1-tunnel
22
23if [ -n "$2" ] ; then
24 POLICY=$2
25else
26 POLICY=$DEFAULT_POLICY
27fi
28
29SETKEY_FILE=$POLICY_CFG-$POLICY
30
31if [ ! -f $SETKEY_FILE ] ; then
32 echo "Missing setkey command file: $SETKEY_FILE"
33 exit 1
34fi
35
36# modprobe any driver name given as last parameter
37if [ -n "$3" ] ; then
38 modprobe $3
39fi
40
41SETUP_CMD_FILE=./setup_$SIDE
42. $SETUP_CMD_FILE
43
44$SETKEY_FILE
45
46setkey -D
47setkey -D -P
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_left b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_left
new file mode 100755
index 0000000..da76909
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_left
@@ -0,0 +1,13 @@
1# board on left setup
2set -v
3ifconfig eth0 down
4ifconfig eth0 hw ether 00:04:9F:11:22:33
5ifconfig eth0 192.168.1.130 netmask 255.255.255.0
6ifconfig eth0 up
7ifconfig eth1 down
8ifconfig eth1 hw ether 00:E0:0C:00:7D:FD
9ifconfig eth1 200.200.200.10 netmask 255.255.255.0
10ifconfig eth1 up
11arp -s 192.168.1.21 00:00:00:00:00:01
12route add default dev eth1
13echo 1 > /proc/sys/net/ipv4/ip_forward
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_right b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_right
new file mode 100755
index 0000000..f0e333e
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_right
@@ -0,0 +1,13 @@
1# board on right setup
2set -v
3ifconfig eth0 down
4ifconfig eth0 hw ether 00:E0:0C:00:01:FD
5ifconfig eth0 192.168.2.130 netmask 255.255.255.0
6ifconfig eth0 up
7ifconfig eth1 down
8ifconfig eth1 hw ether 00:E0:0C:00:00:FD
9ifconfig eth1 200.200.200.20 netmask 255.255.255.0
10ifconfig eth1 up
11arp -s 192.168.2.21 00:00:00:00:00:02
12route add default dev eth1
13echo 1 > /proc/sys/net/ipv4/ip_forward
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan.conf b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan.conf
new file mode 100644
index 0000000..1701f4a
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan.conf
@@ -0,0 +1,19 @@
1# strongswan.conf - strongSwan configuration file
2
3charon {
4 load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random x509 revocation hmac xcbc stroke kernel-netlink socket-raw updown
5 multiple_authentication = no
6}
7
8pluto {
9
10 # plugins to load in pluto
11 #load = aes des sha1 md5 sha2 hmac gmp random pubkey
12
13}
14
15libstrongswan {
16
17 # set to no, the DH exponent size is optimized
18 # dh_exponent_ansi_x9_42 = no
19}
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswanCert.pem b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswanCert.pem
new file mode 100644
index 0000000..0865ad2
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswanCert.pem
@@ -0,0 +1,22 @@
1-----BEGIN CERTIFICATE-----
2MIIDuDCCAqCgAwIBAgIBADANBgkqhkiG9w0BAQsFADBFMQswCQYDVQQGEwJDSDEZ
3MBcGA1UEChMQTGludXggc3Ryb25nU3dhbjEbMBkGA1UEAxMSc3Ryb25nU3dhbiBS
4b290IENBMB4XDTA0MDkxMDEwMDExOFoXDTE5MDkwNzEwMDExOFowRTELMAkGA1UE
5BhMCQ0gxGTAXBgNVBAoTEExpbnV4IHN0cm9uZ1N3YW4xGzAZBgNVBAMTEnN0cm9u
6Z1N3YW4gUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL/y
7X2LqPVZuWLPIeknK86xhz6ljd3NNhC2z+P1uoCP3sBMuZiZQEjFzhnKcbXxCeo2f
8FnvhOOjrrisSuVkzuu82oxXD3fIkzuS7m9V4E10EZzgmKWIf+WuNRfbgAuUINmLc
94YGAXBQLPyzpP4Ou48hhz/YQo58Bics6PHy5v34qCVROIXDvqhj91P8g+pS+F21/
107P+CH2jRcVIEHZtG8M/PweTPQ95dPzpYd2Ov6SZ/U7EWmbMmT8VcUYn1aChxFmy5
11gweVBWlkH6MP+1DeE0/tL5c87xo5KCeGK8Tdqpe7sBRC4pPEEHDQciTUvkeuJ1Pr
12K+1LwdqRxo7HgMRiDw8CAwEAAaOBsjCBrzASBgNVHRMBAf8ECDAGAQH/AgEBMAsG
13A1UdDwQEAwIBBjAdBgNVHQ4EFgQUXafdcAZRMn7ntm2zteXgYOouTe8wbQYDVR0j
14BGYwZIAUXafdcAZRMn7ntm2zteXgYOouTe+hSaRHMEUxCzAJBgNVBAYTAkNIMRkw
15FwYDVQQKExBMaW51eCBzdHJvbmdTd2FuMRswGQYDVQQDExJzdHJvbmdTd2FuIFJv
16b3QgQ0GCAQAwDQYJKoZIhvcNAQELBQADggEBACOSmqEBtBLR9aV3UyCI8gmzR5in
17Lte9aUXXS+qis6F2h2Stf4sN+Nl6Gj7REC6SpfEH4wWdwiUL5J0CJhyoOjQuDl3n
181Dw3dE4/zqMZdyDKEYTU75TmvusNJBdGsLkrf7EATAjoi/nrTOYPPhSUZvPp/D+Y
19vORJ9Ej51GXlK1nwEB5iA8+tDYniNQn6BD1MEgIejzK+fbiy7braZB1kqhoEr2Si
207luBSnU912sw494E88a2EWbmMvg2TVHPNzCpVkpNk7kifCiwmw9VldkqYy9y/lCa
21Epyp7lTfKw7cbD04Vk8QJW782L6Csuxkl346b17wmOqn8AZips3tFsuAY3w=
22-----END CERTIFICATE-----
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_left b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_left
new file mode 100755
index 0000000..e55c3e4
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_left
@@ -0,0 +1,10 @@
1#strongswan on left board
2set -v
3cp -rf ipsec.conf.left /etc/ipsec.conf
4cp -rf ipsec.secrets.left /etc/ipsec.secrets
5cp -rf strongswan.conf /etc/
6cp -rf strongswanCert.pem /etc/ipsec.d/cacerts/
7cp -rf moonCert.pem /etc/ipsec.d/certs/
8mkdir /etc/ipsec.d/private
9cp -rf sunKey.pem /etc/ipsec.d/private/
10cp -rf moonKey.pem /etc/ipsec.d/private/
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_right b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_right
new file mode 100755
index 0000000..bcdbb73
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_right
@@ -0,0 +1,10 @@
1#strongswan on left board
2set -v
3cp -rf ipsec.conf.right /etc/ipsec.conf
4cp -rf ipsec.secrets.right /etc/ipsec.secrets
5cp -rf strongswan.conf /etc/
6cp -rf strongswanCert.pem /etc/ipsec.d/cacerts/
7cp -rf sunCert.pem /etc/ipsec.d/certs/
8mkdir /etc/ipsec.d/private
9cp -rf sunKey.pem /etc/ipsec.d/private/
10cp -rf moonKey.pem /etc/ipsec.d/private/
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunCert.pem b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunCert.pem
new file mode 100644
index 0000000..d0937ba
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunCert.pem
@@ -0,0 +1,25 @@
1-----BEGIN CERTIFICATE-----
2MIIEIDCCAwigAwIBAgIBFjANBgkqhkiG9w0BAQsFADBFMQswCQYDVQQGEwJDSDEZ
3MBcGA1UEChMQTGludXggc3Ryb25nU3dhbjEbMBkGA1UEAxMSc3Ryb25nU3dhbiBS
4b290IENBMB4XDTA5MDgyNzA5NTkwNFoXDTE0MDgyNjA5NTkwNFowRTELMAkGA1UE
5BhMCQ0gxGTAXBgNVBAoTEExpbnV4IHN0cm9uZ1N3YW4xGzAZBgNVBAMTEnN1bi5z
6dHJvbmdzd2FuLm9yZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN+V
7VIpn6Q5jaU//EN6p6A5cSfUfhBK0mFa2laFFZh/Y0h66AXqqrQ3X917h7YNsSk68
8oowY9h9I3gOx7hNVBsJr2VjdYC+b0q5NTha09/A5mimv/prYj6o0yawxoPjoDs9Y
9h7D7Kf+F8fkgk0stlHJZX66J7dNrFXbg1xBld+Ep5Or2FbEZ9QWUpRQTuhdpNt/4
109YuxQ59DemY9IRbwsrKCHH0mGrJsDdqeb0ap+8QvSXHjCt1fr9MNKWaAFAQLKQI4
11e0da1ntPCEQLeE833+NNRBgGufk0KqGT3eAXqrxa9AEIUJnVcPexQdqUMjcUpXFb
128WNzRWB8Egh3BDK6FsECAwEAAaOCARkwggEVMAkGA1UdEwQCMAAwCwYDVR0PBAQD
13AgOoMB0GA1UdDgQWBBRW1p4v2qihzRlcI1PnxbZwluML+zBtBgNVHSMEZjBkgBRd
14p91wBlEyfue2bbO15eBg6i5N76FJpEcwRTELMAkGA1UEBhMCQ0gxGTAXBgNVBAoT
15EExpbnV4IHN0cm9uZ1N3YW4xGzAZBgNVBAMTEnN0cm9uZ1N3YW4gUm9vdCBDQYIB
16ADAdBgNVHREEFjAUghJzdW4uc3Ryb25nc3dhbi5vcmcwEwYDVR0lBAwwCgYIKwYB
17BQUHAwEwOQYDVR0fBDIwMDAuoCygKoYoaHR0cDovL2NybC5zdHJvbmdzd2FuLm9y
18Zy9zdHJvbmdzd2FuLmNybDANBgkqhkiG9w0BAQsFAAOCAQEAo37LYT9Awx0MK/nA
19FZpPJqUr0Ey+O5Ukcsdx7nd00SlmpiQRY8KmuRXCBQnDEgdLstd3slQjT0pJEgWF
200pzxybnI6eOzYAhLfhart+X1hURiNGbXjggm2s4I5+K32bVIkNEqlsYnd/6F9oo5
21ZNO0/eTTruLZfkNe/zchBGKe/Z7MacVwlYWWCbMtBV4K1d5dGcRRgpQ9WivDlmat
22Nh9wlscDSgSGk3HJkbxnq695VN7zUbDWAUvWWhV5bIDjlAR/xyT9ApqIxiyVVRul
23fYrE7U05Hbt6GgAroAKLp6qJup9+TxQAKSjKIwJ0hf7OuYyQ8TZtVHS7AOhm+T/5
24G/jGGA==
25-----END CERTIFICATE-----
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunKey.pem b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunKey.pem
new file mode 100644
index 0000000..d8fad9a
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunKey.pem
@@ -0,0 +1,27 @@
1-----BEGIN RSA PRIVATE KEY-----
2MIIEpAIBAAKCAQEA35VUimfpDmNpT/8Q3qnoDlxJ9R+EErSYVraVoUVmH9jSHroB
3eqqtDdf3XuHtg2xKTryijBj2H0jeA7HuE1UGwmvZWN1gL5vSrk1OFrT38DmaKa/+
4mtiPqjTJrDGg+OgOz1iHsPsp/4Xx+SCTSy2Ucllfront02sVduDXEGV34Snk6vYV
5sRn1BZSlFBO6F2k23/j1i7FDn0N6Zj0hFvCysoIcfSYasmwN2p5vRqn7xC9JceMK
63V+v0w0pZoAUBAspAjh7R1rWe08IRAt4Tzff401EGAa5+TQqoZPd4BeqvFr0AQhQ
7mdVw97FB2pQyNxSlcVvxY3NFYHwSCHcEMroWwQIDAQABAoIBADH51hjN2zk9HVgl
8QmcTAWzcUie5cLMhrP+M9mtC8O3jcCwwFY6OwfnbMU8DHy0GMqHg5lB8b99UUVPw
9HLAzjDw/ESkc6pgZs4EEhJTsxJLsvTnePgHssEgyXnXf7gRVEqJkPohfy+Zy0UCH
10eIUQXiMlOQ7xg7iDMhwNa+UdWSt539DztSKilQn2xdPZjFnMT0/prvl4NA/8Zn54
11/SdWDq5yRdLWb6EK1V7yJ3687GXR1jzGtgy7TXuncUJVTYgX7RdP1Tn6gWD8YAQ/
12RfT0DdWYm4WHSgSb9/NW8lBZH2yy3hg+lNgofXEvTfBkO5QyW31LIr0tCV6zhJIc
13Y9MxaKUCgYEA9sktaXfhPLe0ECjdeQEOq5EKuDrCviSKCOuAV4BDSOsdw6+5LWfY
14Vb/oke8N70lL3RCblcj1pOKWUi2O/SpEJdDRduiw2gM9cXt3/bChSTHC4TsIxxN/
15Db9OGg72kZ4sRY5Au+zyAAQYBwXhFWux194Jk5qK0JblNG9J5QMqZDcCgYEA5+5h
16BgHUMEO+pdME5lAiSc5PcNTejpA6j+OikCh4/HFXy3C/dLx+Cs1+egw64c8iVaIv
17NEo7n7E9I0e3XqanPRXhMnBRrP+39OVsWPmZ18Li2Hi84KwJyi8Y11l3XJOqaYpF
18wMVUuZpxR0dfG5k/5GwT/tEkmQBglOgG3m2zUMcCgYEA4m3Vd9ahV5dp5AXKpzKc
19JjiPMFfhxJo7+FEz0ZUCp03qYljBu/Jy4MKS/grrqyiCLdQGHNlk4SNxLvdUId78
205gGBnuuDEJU2dAAIKUE9yq2YlBUZSacOxStI2snt28/X6P3LUWHm7LLU5OS1D3Vf
21mKPF/6MlSJuas5CEqVZNN+MCgYBH9Qh7IaQgmVQUBKVXg3Mv7OduvUyTdKIGtHxi
22N3xZ7hxsDP4JjNWaKmlcGmFGX8pqQRheI83d3NJ4GK8GmbP3Wst0p65fezMqsudr
23r30QmPFicgs/tYCQDw6o+aPzwAi2F+VOSqrfrtAIaldSq7hL+VA21dKB+cD9UgOX
24jPd+TwKBgQCbKeg2QNS2qhPIG9eaqJDROuxmxb/07d7OBctgMgxVvKhqW9hW42Sy
25gJ59fyz5QjFBaSfcOdf4gkKyEawVo45/q6ymIQU37R4vF4CW9Z3CfaIbwJp7LcHV
26zH07so/HNsZua6GWCSCLJU5MeCRiZzk2RFiS9KIaLP4gZndv4lXOiQ==
27-----END RSA PRIVATE KEY-----
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo_0.1.bb b/recipes-connectivity/ipsec-demo/ipsec-demo_0.1.bb
new file mode 100644
index 0000000..5607060
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo_0.1.bb
@@ -0,0 +1,25 @@
1SUMMARY = "Scripts and configuration files for ipsec demo"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4
5RDEPENDS_${PN} = "ipsec-tools"
6
7inherit allarch
8
9SRC_URI = "file://test_setkey"
10
11do_configure() {
12 :
13}
14
15do_compile() {
16 :
17}
18
19do_install(){
20 install -d ${D}${datadir}
21 cp -a ${WORKDIR}/test_setkey ${D}${datadir}/
22}
23
24FILES_${PN} = "${datadir}/*"
25