summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2005-08-09 12:45:57 +0000
committerHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2005-08-09 12:45:57 +0000
commit956a95cc59d443fe3288e258f8a7548ffdb69ac0 (patch)
tree35f0023c8f443493abc7584c775fc2ca88011a7f
parent1e540711bb6cafcb339cac85392e23b8288b67eb (diff)
test for SAs
-rw-r--r--regress/sbin/ipsecctl/Makefile5
-rw-r--r--regress/sbin/ipsecctl/sa5.in18
-rw-r--r--regress/sbin/ipsecctl/sa5.ok36
-rw-r--r--regress/sbin/ipsecctl/sa6.in34
-rw-r--r--regress/sbin/ipsecctl/sa6.ok52
5 files changed, 143 insertions, 2 deletions
diff --git a/regress/sbin/ipsecctl/Makefile b/regress/sbin/ipsecctl/Makefile
index 5b4fa15f154..1d6bd37abbe 100644
--- a/regress/sbin/ipsecctl/Makefile
+++ b/regress/sbin/ipsecctl/Makefile
@@ -1,13 +1,14 @@
-# $OpenBSD: Makefile,v 1.3 2005/08/08 14:51:51 hshoexer Exp $
+# $OpenBSD: Makefile,v 1.4 2005/08/09 12:45:56 hshoexer Exp $
# TARGETS
# ipsec: feed ipsecNN.in through ipsecctl and check wether the output matches
# ipsecNN.ok
# tcpmd5: same as above, but for tcpmd5 rules
+# sa: same as above, but for SA rules.
IPSECTESTS=1 2 3 4 5 6 7 8 9 10 11 12
TCPMD5TESTS=1 2
-SATESTS=1 2 3 4
+SATESTS=1 2 3 4 5 6
SHELL=/bin/sh
diff --git a/regress/sbin/ipsecctl/sa5.in b/regress/sbin/ipsecctl/sa5.in
new file mode 100644
index 00000000000..658802f13d4
--- /dev/null
+++ b/regress/sbin/ipsecctl/sa5.in
@@ -0,0 +1,18 @@
+ah from 1.1.1.1 to 2.2.2.2 spi 0x1eadbeef:0xbeef1ead \
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ah from 1.1.1.2 to 2.2.2.2 spi 0x2eadbeef:0xbeef2ead auth hmac-md5 \
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ah from 1.1.1.3 to 2.2.2.2 spi 0x3eadbeef:0xbeef3ead auth hmac-ripemd160 \
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ah from 1.1.1.4 to 2.2.2.2 spi 0x4eadbeef:0xbeef4ead auth hmac-sha1 \
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ah from 1.1.1.5 to 2.2.2.2 spi 0x5eadbeef:0xbeef5ead auth hmac-sha2-256 \
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ah from 1.1.1.6 to 2.2.2.2 spi 0x6eadbeef:0xbeef6ead auth hmac-sha2-384 \
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ah from 1.1.1.7 to 2.2.2.2 spi 0x7eadbeef:0xbeef7ead auth hmac-sha2-512 \
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ah from 1.1.1.8 to 2.2.2.2 spi 0x8eadbeef:0xbeef8ead auth md5 \
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ah from 1.1.1.9 to 2.2.2.2 spi 0x9eadbeef:0xbeef9ead auth sha1 \
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
diff --git a/regress/sbin/ipsecctl/sa5.ok b/regress/sbin/ipsecctl/sa5.ok
new file mode 100644
index 00000000000..92263c88531
--- /dev/null
+++ b/regress/sbin/ipsecctl/sa5.ok
@@ -0,0 +1,36 @@
+ah from 1.1.1.1 to 2.2.2.2 spi 0x1eadbeef auth hmac-sha2-256
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ah from 2.2.2.2 to 1.1.1.1 spi 0xbeef1ead auth hmac-sha2-256
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ah from 1.1.1.2 to 2.2.2.2 spi 0x2eadbeef auth hmac-md5
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ah from 2.2.2.2 to 1.1.1.2 spi 0xbeef2ead auth hmac-md5
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ah from 1.1.1.3 to 2.2.2.2 spi 0x3eadbeef auth hmac-ripemd160
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ah from 2.2.2.2 to 1.1.1.3 spi 0xbeef3ead auth hmac-ripemd160
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ah from 1.1.1.4 to 2.2.2.2 spi 0x4eadbeef auth hmac-sha1
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ah from 2.2.2.2 to 1.1.1.4 spi 0xbeef4ead auth hmac-sha1
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ah from 1.1.1.5 to 2.2.2.2 spi 0x5eadbeef auth hmac-sha2-256
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ah from 2.2.2.2 to 1.1.1.5 spi 0xbeef5ead auth hmac-sha2-256
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ah from 1.1.1.6 to 2.2.2.2 spi 0x6eadbeef auth hmac-sha2-384
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ah from 2.2.2.2 to 1.1.1.6 spi 0xbeef6ead auth hmac-sha2-384
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ah from 1.1.1.7 to 2.2.2.2 spi 0x7eadbeef auth hmac-sha2-512
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ah from 2.2.2.2 to 1.1.1.7 spi 0xbeef7ead auth hmac-sha2-512
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ah from 1.1.1.8 to 2.2.2.2 spi 0x8eadbeef auth md5
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ah from 2.2.2.2 to 1.1.1.8 spi 0xbeef8ead auth md5
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ah from 1.1.1.9 to 2.2.2.2 spi 0x9eadbeef auth sha1
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ah from 2.2.2.2 to 1.1.1.9 spi 0xbeef9ead auth sha1
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
diff --git a/regress/sbin/ipsecctl/sa6.in b/regress/sbin/ipsecctl/sa6.in
new file mode 100644
index 00000000000..dea66ce5c75
--- /dev/null
+++ b/regress/sbin/ipsecctl/sa6.in
@@ -0,0 +1,34 @@
+esp from 1.1.1.1 to 2.2.2.2 spi 0x1eadbeef:0xbeef1ead \
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
+ enckey 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee:0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+esp from 1.1.1.2 to 2.2.2.2 spi 0x2eadbeef:0xbeef2ead auth hmac-sha1 \
+ enc 3des-cbc \
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
+ enckey 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee:0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+esp from 1.1.1.3 to 2.2.2.2 spi 0x3eadbeef:0xbeef3ead auth hmac-sha1 \
+ enc des-cbc \
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
+ enckey 0xeeeeeeeeeeeeeeee:0xeeeeeeeeeeeeeeee
+esp from 1.1.1.4 to 2.2.2.2 spi 0x4eadbeef:0xbeef4ead auth hmac-sha1 \
+ enc aes \
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
+ enckey 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee:0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+esp from 1.1.1.5 to 2.2.2.2 spi 0x5eadbeef:0xbeef5ead auth hmac-sha1 \
+ enc aesctr \
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
+ enckey 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee:0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+esp from 1.1.1.6 to 2.2.2.2 spi 0x6eadbeef:0xbeef6ead auth hmac-sha1 \
+ enc blowfish \
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
+ enckey 0xeeeeeeeeeeeeeeee:0xeeeeeeeeeeeeeeee
+esp from 1.1.1.7 to 2.2.2.2 spi 0x7eadbeef:0xbeef7ead auth hmac-sha1 \
+ enc cast128 \
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
+ enckey 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee:0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+esp from 1.1.1.8 to 2.2.2.2 spi 0x8eadbeef:0xbeef8ead auth hmac-sha1 \
+ enc null \
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+esp from 1.1.1.9 to 2.2.2.2 spi 0x9eadbeef:0xbeef9ead auth hmac-sha1 \
+ enc skipjack \
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
+ enckey 0xeeeeeeeeeeeeeeeeeeee:0xeeeeeeeeeeeeeeeeeeee
diff --git a/regress/sbin/ipsecctl/sa6.ok b/regress/sbin/ipsecctl/sa6.ok
new file mode 100644
index 00000000000..18d6576d9ac
--- /dev/null
+++ b/regress/sbin/ipsecctl/sa6.ok
@@ -0,0 +1,52 @@
+esp from 1.1.1.1 to 2.2.2.2 spi 0x1eadbeef auth hmac-sha2-256 enc aesctr
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ enckey 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+esp from 2.2.2.2 to 1.1.1.1 spi 0xbeef1ead auth hmac-sha2-256 enc aesctr
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ enckey 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+esp from 1.1.1.2 to 2.2.2.2 spi 0x2eadbeef auth hmac-sha1 enc 3des-cbc
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ enckey 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+esp from 2.2.2.2 to 1.1.1.2 spi 0xbeef2ead auth hmac-sha1 enc 3des-cbc
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ enckey 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+esp from 1.1.1.3 to 2.2.2.2 spi 0x3eadbeef auth hmac-sha1 enc des-cbc
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ enckey 0xeeeeeeeeeeeeeeee
+esp from 2.2.2.2 to 1.1.1.3 spi 0xbeef3ead auth hmac-sha1 enc des-cbc
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ enckey 0xeeeeeeeeeeeeeeee
+esp from 1.1.1.4 to 2.2.2.2 spi 0x4eadbeef auth hmac-sha1 enc aes
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ enckey 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+esp from 2.2.2.2 to 1.1.1.4 spi 0xbeef4ead auth hmac-sha1 enc aes
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ enckey 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+esp from 1.1.1.5 to 2.2.2.2 spi 0x5eadbeef auth hmac-sha1 enc aesctr
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ enckey 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+esp from 2.2.2.2 to 1.1.1.5 spi 0xbeef5ead auth hmac-sha1 enc aesctr
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ enckey 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+esp from 1.1.1.6 to 2.2.2.2 spi 0x6eadbeef auth hmac-sha1 enc blowfish
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ enckey 0xeeeeeeeeeeeeeeee
+esp from 2.2.2.2 to 1.1.1.6 spi 0xbeef6ead auth hmac-sha1 enc blowfish
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ enckey 0xeeeeeeeeeeeeeeee
+esp from 1.1.1.7 to 2.2.2.2 spi 0x7eadbeef auth hmac-sha1 enc cast128
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ enckey 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+esp from 2.2.2.2 to 1.1.1.7 spi 0xbeef7ead auth hmac-sha1 enc cast128
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ enckey 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+esp from 1.1.1.8 to 2.2.2.2 spi 0x8eadbeef auth hmac-sha1 enc null
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+esp from 2.2.2.2 to 1.1.1.8 spi 0xbeef8ead auth hmac-sha1 enc null
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+esp from 1.1.1.9 to 2.2.2.2 spi 0x9eadbeef auth hmac-sha1 enc skipjack
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ enckey 0xeeeeeeeeeeeeeeeeeeee
+esp from 2.2.2.2 to 1.1.1.9 spi 0xbeef9ead auth hmac-sha1 enc skipjack
+ authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ enckey 0xeeeeeeeeeeeeeeeeeeee