summaryrefslogtreecommitdiffstats
path: root/test/template_ipsec.py
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-04-11 15:14:07 +0000
committerNeale Ranns <nranns@cisco.com>2019-04-17 00:12:05 +0000
commit32b13bba2e3013a1b2a67eca8fe6a177d8e927ed (patch)
tree97dbae11a361e7537be09329c80ae7c3a3acb799 /test/template_ipsec.py
parent07a4d675c8d1b1bc19fa1846369f610ab91a9aba (diff)
IPSEC: support GCM in ESP
Change-Id: Id2ddb77b4ec3dd543d6e638bc882923f2bac011d Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 47feb1146ec3b0e1cf2ebd83cd5211e1df261194)
Diffstat (limited to 'test/template_ipsec.py')
-rw-r--r--test/template_ipsec.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/template_ipsec.py b/test/template_ipsec.py
index de779648645..efe49f1a01f 100644
--- a/test/template_ipsec.py
+++ b/test/template_ipsec.py
@@ -42,6 +42,7 @@ class IPsecIPv4Params(object):
IPSEC_API_CRYPTO_ALG_AES_CBC_128)
self.crypt_algo = 'AES-CBC' # scapy name
self.crypt_key = 'JPjyOWBeVEQiMe7h'
+ self.crypt_salt = ''
self.flags = 0
self.nat_header = None
@@ -77,6 +78,7 @@ class IPsecIPv6Params(object):
IPSEC_API_CRYPTO_ALG_AES_CBC_128)
self.crypt_algo = 'AES-CBC' # scapy name
self.crypt_key = 'JPjyOWBeVEQiMe7h'
+ self.crypt_salt = ''
self.flags = 0
self.nat_header = None
@@ -87,7 +89,7 @@ def config_tun_params(p, encryption_type, tun_if):
IPSEC_API_SAD_FLAG_USE_ESN))
p.scapy_tun_sa = SecurityAssociation(
encryption_type, spi=p.vpp_tun_spi,
- crypt_algo=p.crypt_algo, crypt_key=p.crypt_key,
+ crypt_algo=p.crypt_algo, crypt_key=p.crypt_key + p.crypt_salt,
auth_algo=p.auth_algo, auth_key=p.auth_key,
tunnel_header=ip_class_by_addr_type[p.addr_type](
src=tun_if.remote_addr[p.addr_type],
@@ -96,7 +98,7 @@ def config_tun_params(p, encryption_type, tun_if):
use_esn=use_esn)
p.vpp_tun_sa = SecurityAssociation(
encryption_type, spi=p.scapy_tun_spi,
- crypt_algo=p.crypt_algo, crypt_key=p.crypt_key,
+ crypt_algo=p.crypt_algo, crypt_key=p.crypt_key + p.crypt_salt,
auth_algo=p.auth_algo, auth_key=p.auth_key,
tunnel_header=ip_class_by_addr_type[p.addr_type](
dst=tun_if.remote_addr[p.addr_type],
@@ -112,7 +114,7 @@ def config_tra_params(p, encryption_type):
encryption_type,
spi=p.vpp_tra_spi,
crypt_algo=p.crypt_algo,
- crypt_key=p.crypt_key,
+ crypt_key=p.crypt_key + p.crypt_salt,
auth_algo=p.auth_algo,
auth_key=p.auth_key,
nat_t_header=p.nat_header,
@@ -121,7 +123,7 @@ def config_tra_params(p, encryption_type):
encryption_type,
spi=p.scapy_tra_spi,
crypt_algo=p.crypt_algo,
- crypt_key=p.crypt_key,
+ crypt_key=p.crypt_key + p.crypt_salt,
auth_algo=p.auth_algo,
auth_key=p.auth_key,
nat_t_header=p.nat_header,