X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Ftest_ipsec_esp.py;h=69b48ae8e13f6dfaa63272e409db32aee9525537;hb=04338e85ae4979222029d18c314a9cc09d723572;hp=2ac919142d89da40f96295bb227a36c4aa1935a0;hpb=fbc388986e3f38aaedff87b843137be81b7d4f91;p=vpp.git diff --git a/test/test_ipsec_esp.py b/test/test_ipsec_esp.py index 2ac919142d8..69b48ae8e13 100644 --- a/test/test_ipsec_esp.py +++ b/test/test_ipsec_esp.py @@ -7,7 +7,7 @@ from parameterized import parameterized from framework import VppTestRunner from template_ipsec import IpsecTra46Tests, IpsecTun46Tests, TemplateIpsec, \ IpsecTcpTests, IpsecTun4Tests, IpsecTra4Tests, config_tra_params, \ - IPsecIPv4Params, IPsecIPv6Params, \ + config_tun_params, IPsecIPv4Params, IPsecIPv6Params, \ IpsecTra4, IpsecTun4, IpsecTra6, IpsecTun6 from vpp_ipsec import VppIpsecSpd, VppIpsecSpdEntry, VppIpsecSA,\ VppIpsecSpdItfBinding @@ -71,6 +71,7 @@ class ConfigIpsecESP(TemplateIpsec): config_tra_params(p, self.encryption_type) for p in params: self.config_esp_tun(p) + config_tun_params(p, self.encryption_type, self.tun_if) for p in params: d = DpoProto.DPO_PROTO_IP6 if p.is_ipv6 else DpoProto.DPO_PROTO_IP4 @@ -367,7 +368,7 @@ class MyParameters(): IPSEC_API_INTEG_ALG_NONE), 'scapy-crypto': "AES-GCM", 'scapy-integ': "NULL", - 'key': "JPjyOWBeVEQiMe7h", + 'key': b"JPjyOWBeVEQiMe7h", 'salt': 0}, 'AES-GCM-192/NONE': { 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t. @@ -376,7 +377,7 @@ class MyParameters(): IPSEC_API_INTEG_ALG_NONE), 'scapy-crypto': "AES-GCM", 'scapy-integ': "NULL", - 'key': "JPjyOWBeVEQiMe7h01234567", + 'key': b"JPjyOWBeVEQiMe7h01234567", 'salt': 1010}, 'AES-GCM-256/NONE': { 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t. @@ -385,7 +386,7 @@ class MyParameters(): IPSEC_API_INTEG_ALG_NONE), 'scapy-crypto': "AES-GCM", 'scapy-integ': "NULL", - 'key': "JPjyOWBeVEQiMe7h0123456787654321", + 'key': b"JPjyOWBeVEQiMe7h0123456787654321", 'salt': 2020}, 'AES-CBC-128/MD5-96': { 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t. @@ -395,7 +396,7 @@ class MyParameters(): 'scapy-crypto': "AES-CBC", 'scapy-integ': "HMAC-MD5-96", 'salt': 0, - 'key': "JPjyOWBeVEQiMe7h"}, + 'key': b"JPjyOWBeVEQiMe7h"}, 'AES-CBC-192/SHA1-96': { 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t. IPSEC_API_CRYPTO_ALG_AES_CBC_192), @@ -404,7 +405,7 @@ class MyParameters(): 'scapy-crypto': "AES-CBC", 'scapy-integ': "HMAC-SHA1-96", 'salt': 0, - 'key': "JPjyOWBeVEQiMe7hJPjyOWBe"}, + 'key': b"JPjyOWBeVEQiMe7hJPjyOWBe"}, 'AES-CBC-256/SHA1-96': { 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t. IPSEC_API_CRYPTO_ALG_AES_CBC_256), @@ -413,7 +414,7 @@ class MyParameters(): 'scapy-crypto': "AES-CBC", 'scapy-integ': "HMAC-SHA1-96", 'salt': 0, - 'key': "JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h"}, + 'key': b"JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h"}, '3DES-CBC/SHA1-96': { 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t. IPSEC_API_CRYPTO_ALG_3DES_CBC), @@ -422,7 +423,7 @@ class MyParameters(): 'scapy-crypto': "3DES", 'scapy-integ': "HMAC-SHA1-96", 'salt': 0, - 'key': "JPjyOWBeVEQiMe7h00112233"}, + 'key': b"JPjyOWBeVEQiMe7h00112233"}, 'NONE/SHA1-96': { 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t. IPSEC_API_CRYPTO_ALG_NONE), @@ -431,7 +432,7 @@ class MyParameters(): 'scapy-crypto': "NULL", 'scapy-integ': "HMAC-SHA1-96", 'salt': 0, - 'key': "JPjyOWBeVEQiMe7h00112233"}} + 'key': b"JPjyOWBeVEQiMe7h00112233"}} class RunTestIpsecEspAll(ConfigIpsecESP,