blob: 74d01cd5568fca5cff16c447754d1ac17c682ae2 [file] [log] [blame]
“mystarrocks”23f0c452017-12-11 07:11:51 -08001import socket
Klement Sekera28fb03f2018-04-17 11:36:55 +02002import unittest
Klement Sekera31da2e32018-06-24 22:49:55 +02003from scapy.layers.ipsec import ESP
Christian Hoppsfb7e7ed2019-11-03 07:02:15 -05004from scapy.layers.inet import IP, ICMP, UDP
Neale Ranns041add72020-01-02 04:06:10 +00005from scapy.layers.inet6 import IPv6
6from scapy.layers.l2 import Ether
7from scapy.packet import Raw
“mystarrocks”23f0c452017-12-11 07:11:51 -08008
Neale Ranns00625a62019-07-31 00:13:18 -07009from parameterized import parameterized
juraj.linkes11057662019-07-08 10:22:55 +020010from framework import VppTestRunner
Neale Ranns53f526b2019-02-25 14:32:02 +000011from template_ipsec import IpsecTra46Tests, IpsecTun46Tests, TemplateIpsec, \
Neale Ranns4f33c802019-04-10 12:39:10 +000012 IpsecTcpTests, IpsecTun4Tests, IpsecTra4Tests, config_tra_params, \
Neale Ranns12989b52019-09-26 16:20:19 +000013 config_tun_params, IPsecIPv4Params, IPsecIPv6Params, \
Neale Ranns4a56f4e2019-12-23 04:10:25 +000014 IpsecTra4, IpsecTun4, IpsecTra6, IpsecTun6, \
Neale Ranns02950402019-12-20 00:54:57 +000015 IpsecTun6HandoffTests, IpsecTun4HandoffTests, \
Filip Tehlarefcad1a2020-02-04 09:36:04 +000016 IpsecTra6ExtTests
Klement Sekerabf613952019-01-29 11:38:08 +010017from vpp_ipsec import VppIpsecSpd, VppIpsecSpdEntry, VppIpsecSA,\
Neale Ranns4f33c802019-04-10 12:39:10 +000018 VppIpsecSpdItfBinding
Neale Ranns311124e2019-01-24 04:52:25 -080019from vpp_ip_route import VppIpRoute, VppRoutePath
20from vpp_ip import DpoProto
Neale Ranns17dcec02019-01-09 21:22:20 -080021from vpp_papi import VppEnum
“mystarrocks”23f0c452017-12-11 07:11:51 -080022
Neale Rannsc87b66c2019-02-07 07:26:12 -080023NUM_PKTS = 67
Benoît Ganne5c481ff2021-03-08 10:22:51 +010024engines_supporting_chain_bufs = ["openssl", "async"]
Neale Rannsf16e9a52021-02-25 19:09:24 +000025engines = ["ia32", "ipsecmb", "openssl"]
Neale Rannsc87b66c2019-02-07 07:26:12 -080026
“mystarrocks”23f0c452017-12-11 07:11:51 -080027
Neale Ranns4f33c802019-04-10 12:39:10 +000028class ConfigIpsecESP(TemplateIpsec):
29 encryption_type = ESP
30 tra4_encrypt_node_name = "esp4-encrypt"
Neale Ranns8c609af2021-02-25 10:05:32 +000031 tra4_decrypt_node_name = ["esp4-decrypt", "esp4-decrypt-post"]
Neale Ranns4f33c802019-04-10 12:39:10 +000032 tra6_encrypt_node_name = "esp6-encrypt"
Neale Ranns8c609af2021-02-25 10:05:32 +000033 tra6_decrypt_node_name = ["esp6-decrypt", "esp6-decrypt-post"]
Neale Ranns4f33c802019-04-10 12:39:10 +000034 tun4_encrypt_node_name = "esp4-encrypt"
Neale Ranns8c609af2021-02-25 10:05:32 +000035 tun4_decrypt_node_name = ["esp4-decrypt", "esp4-decrypt-post"]
Neale Ranns4f33c802019-04-10 12:39:10 +000036 tun6_encrypt_node_name = "esp6-encrypt"
Neale Ranns8c609af2021-02-25 10:05:32 +000037 tun6_decrypt_node_name = ["esp6-decrypt", "esp6-decrypt-post"]
Neale Ranns53f526b2019-02-25 14:32:02 +000038
Neale Ranns4f33c802019-04-10 12:39:10 +000039 @classmethod
40 def setUpClass(cls):
41 super(ConfigIpsecESP, cls).setUpClass()
Neale Ranns53f526b2019-02-25 14:32:02 +000042
Neale Ranns4f33c802019-04-10 12:39:10 +000043 @classmethod
44 def tearDownClass(cls):
45 super(ConfigIpsecESP, cls).tearDownClass()
Neale Ranns53f526b2019-02-25 14:32:02 +000046
Neale Ranns4f33c802019-04-10 12:39:10 +000047 def setUp(self):
48 super(ConfigIpsecESP, self).setUp()
Neale Ranns53f526b2019-02-25 14:32:02 +000049
Neale Ranns4f33c802019-04-10 12:39:10 +000050 def tearDown(self):
51 super(ConfigIpsecESP, self).tearDown()
52
Neale Ranns5b891102021-06-28 13:31:28 +000053 def config_anti_replay(self, params):
54 saf = VppEnum.vl_api_ipsec_sad_flags_t
55 for p in params:
56 p.flags |= saf.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY
57
Neale Ranns4f33c802019-04-10 12:39:10 +000058 def config_network(self, params):
59 self.net_objs = []
60 self.tun_if = self.pg0
61 self.tra_if = self.pg2
62 self.logger.info(self.vapi.ppcli("show int addr"))
63
64 self.tra_spd = VppIpsecSpd(self, self.tra_spd_id)
65 self.tra_spd.add_vpp_config()
66 self.net_objs.append(self.tra_spd)
67 self.tun_spd = VppIpsecSpd(self, self.tun_spd_id)
68 self.tun_spd.add_vpp_config()
69 self.net_objs.append(self.tun_spd)
70
71 b = VppIpsecSpdItfBinding(self, self.tun_spd,
72 self.tun_if)
73 b.add_vpp_config()
74 self.net_objs.append(b)
75
76 b = VppIpsecSpdItfBinding(self, self.tra_spd,
77 self.tra_if)
78 b.add_vpp_config()
79 self.net_objs.append(b)
80
81 for p in params:
82 self.config_esp_tra(p)
83 config_tra_params(p, self.encryption_type)
84 for p in params:
85 self.config_esp_tun(p)
Neale Ranns12989b52019-09-26 16:20:19 +000086 config_tun_params(p, self.encryption_type, self.tun_if)
Neale Ranns4f33c802019-04-10 12:39:10 +000087
88 for p in params:
89 d = DpoProto.DPO_PROTO_IP6 if p.is_ipv6 else DpoProto.DPO_PROTO_IP4
90 r = VppIpRoute(self, p.remote_tun_if_host, p.addr_len,
91 [VppRoutePath(self.tun_if.remote_addr[p.addr_type],
92 0xffffffff,
Neale Ranns097fa662018-05-01 05:17:55 -070093 proto=d)])
Neale Ranns4f33c802019-04-10 12:39:10 +000094 r.add_vpp_config()
95 self.net_objs.append(r)
96
97 self.logger.info(self.vapi.ppcli("show ipsec all"))
98
99 def unconfig_network(self):
100 for o in reversed(self.net_objs):
101 o.remove_vpp_config()
102 self.net_objs = []
103
104 def config_esp_tun(self, params):
105 addr_type = params.addr_type
106 scapy_tun_sa_id = params.scapy_tun_sa_id
107 scapy_tun_spi = params.scapy_tun_spi
108 vpp_tun_sa_id = params.vpp_tun_sa_id
109 vpp_tun_spi = params.vpp_tun_spi
110 auth_algo_vpp_id = params.auth_algo_vpp_id
111 auth_key = params.auth_key
112 crypt_algo_vpp_id = params.crypt_algo_vpp_id
113 crypt_key = params.crypt_key
114 remote_tun_if_host = params.remote_tun_if_host
115 addr_any = params.addr_any
116 addr_bcast = params.addr_bcast
117 e = VppEnum.vl_api_ipsec_spd_action_t
Neale Ranns49e7ef62019-04-10 17:24:29 +0000118 flags = params.flags
Neale Ranns041add72020-01-02 04:06:10 +0000119 tun_flags = params.tun_flags
Neale Ranns80f6fd52019-04-16 02:41:34 +0000120 salt = params.salt
Neale Ranns4f33c802019-04-10 12:39:10 +0000121 objs = []
122
123 params.tun_sa_in = VppIpsecSA(self, scapy_tun_sa_id, scapy_tun_spi,
124 auth_algo_vpp_id, auth_key,
125 crypt_algo_vpp_id, crypt_key,
126 self.vpp_esp_protocol,
127 self.tun_if.local_addr[addr_type],
Neale Ranns49e7ef62019-04-10 17:24:29 +0000128 self.tun_if.remote_addr[addr_type],
Neale Ranns041add72020-01-02 04:06:10 +0000129 tun_flags=tun_flags,
130 dscp=params.dscp,
Neale Ranns80f6fd52019-04-16 02:41:34 +0000131 flags=flags,
Neale Ranns9ec846c2021-02-09 14:04:02 +0000132 salt=salt,
133 hop_limit=params.outer_hop_limit)
Neale Ranns4f33c802019-04-10 12:39:10 +0000134 params.tun_sa_out = VppIpsecSA(self, vpp_tun_sa_id, vpp_tun_spi,
135 auth_algo_vpp_id, auth_key,
136 crypt_algo_vpp_id, crypt_key,
137 self.vpp_esp_protocol,
138 self.tun_if.remote_addr[addr_type],
Neale Ranns49e7ef62019-04-10 17:24:29 +0000139 self.tun_if.local_addr[addr_type],
Neale Ranns041add72020-01-02 04:06:10 +0000140 tun_flags=tun_flags,
141 dscp=params.dscp,
Neale Ranns80f6fd52019-04-16 02:41:34 +0000142 flags=flags,
Neale Ranns9ec846c2021-02-09 14:04:02 +0000143 salt=salt,
144 hop_limit=params.outer_hop_limit)
Neale Ranns4f33c802019-04-10 12:39:10 +0000145 objs.append(params.tun_sa_in)
146 objs.append(params.tun_sa_out)
147
148 params.spd_policy_in_any = VppIpsecSpdEntry(self, self.tun_spd,
149 scapy_tun_sa_id,
150 addr_any, addr_bcast,
151 addr_any, addr_bcast,
152 socket.IPPROTO_ESP)
153 params.spd_policy_out_any = VppIpsecSpdEntry(self, self.tun_spd,
154 scapy_tun_sa_id,
155 addr_any, addr_bcast,
156 addr_any, addr_bcast,
157 socket.IPPROTO_ESP,
158 is_outbound=0)
159 objs.append(params.spd_policy_out_any)
160 objs.append(params.spd_policy_in_any)
161
162 objs.append(VppIpsecSpdEntry(self, self.tun_spd, vpp_tun_sa_id,
163 remote_tun_if_host, remote_tun_if_host,
164 self.pg1.remote_addr[addr_type],
165 self.pg1.remote_addr[addr_type],
166 0,
167 priority=10,
168 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
169 is_outbound=0))
170 objs.append(VppIpsecSpdEntry(self, self.tun_spd, scapy_tun_sa_id,
171 self.pg1.remote_addr[addr_type],
172 self.pg1.remote_addr[addr_type],
173 remote_tun_if_host, remote_tun_if_host,
174 0,
175 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
176 priority=10))
177 objs.append(VppIpsecSpdEntry(self, self.tun_spd, vpp_tun_sa_id,
178 remote_tun_if_host, remote_tun_if_host,
179 self.pg0.local_addr[addr_type],
180 self.pg0.local_addr[addr_type],
181 0,
182 priority=20,
183 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
184 is_outbound=0))
185 objs.append(VppIpsecSpdEntry(self, self.tun_spd, scapy_tun_sa_id,
186 self.pg0.local_addr[addr_type],
187 self.pg0.local_addr[addr_type],
188 remote_tun_if_host, remote_tun_if_host,
189 0,
190 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
191 priority=20))
192 for o in objs:
193 o.add_vpp_config()
194 self.net_objs = self.net_objs + objs
195
196 def config_esp_tra(self, params):
197 addr_type = params.addr_type
198 scapy_tra_sa_id = params.scapy_tra_sa_id
199 scapy_tra_spi = params.scapy_tra_spi
200 vpp_tra_sa_id = params.vpp_tra_sa_id
201 vpp_tra_spi = params.vpp_tra_spi
202 auth_algo_vpp_id = params.auth_algo_vpp_id
203 auth_key = params.auth_key
204 crypt_algo_vpp_id = params.crypt_algo_vpp_id
205 crypt_key = params.crypt_key
206 addr_any = params.addr_any
207 addr_bcast = params.addr_bcast
Neale Ranns4f33c802019-04-10 12:39:10 +0000208 e = VppEnum.vl_api_ipsec_spd_action_t
Neale Ranns5b891102021-06-28 13:31:28 +0000209 flags = params.flags
Neale Ranns80f6fd52019-04-16 02:41:34 +0000210 salt = params.salt
Neale Ranns4f33c802019-04-10 12:39:10 +0000211 objs = []
212
213 params.tra_sa_in = VppIpsecSA(self, scapy_tra_sa_id, scapy_tra_spi,
214 auth_algo_vpp_id, auth_key,
215 crypt_algo_vpp_id, crypt_key,
216 self.vpp_esp_protocol,
Neale Ranns80f6fd52019-04-16 02:41:34 +0000217 flags=flags,
218 salt=salt)
Neale Ranns4f33c802019-04-10 12:39:10 +0000219 params.tra_sa_out = VppIpsecSA(self, vpp_tra_sa_id, vpp_tra_spi,
220 auth_algo_vpp_id, auth_key,
221 crypt_algo_vpp_id, crypt_key,
222 self.vpp_esp_protocol,
Neale Ranns80f6fd52019-04-16 02:41:34 +0000223 flags=flags,
224 salt=salt)
Neale Ranns4f33c802019-04-10 12:39:10 +0000225 objs.append(params.tra_sa_in)
226 objs.append(params.tra_sa_out)
227
228 objs.append(VppIpsecSpdEntry(self, self.tra_spd, vpp_tra_sa_id,
229 addr_any, addr_bcast,
230 addr_any, addr_bcast,
231 socket.IPPROTO_ESP))
232 objs.append(VppIpsecSpdEntry(self, self.tra_spd, vpp_tra_sa_id,
233 addr_any, addr_bcast,
234 addr_any, addr_bcast,
235 socket.IPPROTO_ESP,
236 is_outbound=0))
237 objs.append(VppIpsecSpdEntry(self, self.tra_spd, vpp_tra_sa_id,
238 self.tra_if.local_addr[addr_type],
239 self.tra_if.local_addr[addr_type],
240 self.tra_if.remote_addr[addr_type],
241 self.tra_if.remote_addr[addr_type],
242 0, priority=10,
243 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
244 is_outbound=0))
245 objs.append(VppIpsecSpdEntry(self, self.tra_spd, scapy_tra_sa_id,
246 self.tra_if.local_addr[addr_type],
247 self.tra_if.local_addr[addr_type],
248 self.tra_if.remote_addr[addr_type],
249 self.tra_if.remote_addr[addr_type],
250 0, policy=e.IPSEC_API_SPD_ACTION_PROTECT,
251 priority=10))
252 for o in objs:
253 o.add_vpp_config()
254 self.net_objs = self.net_objs + objs
Neale Ranns53f526b2019-02-25 14:32:02 +0000255
256
Neale Ranns4f33c802019-04-10 12:39:10 +0000257class TemplateIpsecEsp(ConfigIpsecESP):
“mystarrocks”23f0c452017-12-11 07:11:51 -0800258 """
259 Basic test for ipsec esp sanity - tunnel and transport modes.
260
261 Below 4 cases are covered as part of this test
Dave Wallaced1706812021-08-12 18:36:02 -0400262
263 #. ipsec esp v4 transport basic test - IPv4 Transport mode
Paul Vinciguerra8feeaff2019-03-27 11:25:48 -0700264 scenario using HMAC-SHA1-96 integrity algo
Dave Wallaced1706812021-08-12 18:36:02 -0400265
266 #. ipsec esp v4 transport burst test
“mystarrocks”23f0c452017-12-11 07:11:51 -0800267 Above test for 257 pkts
268
Dave Wallaced1706812021-08-12 18:36:02 -0400269 #. ipsec esp 4o4 tunnel basic test - IPv4 Tunnel mode
270 scenario using HMAC-SHA1-96 integrity algo
“mystarrocks”23f0c452017-12-11 07:11:51 -0800271
Dave Wallaced1706812021-08-12 18:36:02 -0400272 #. ipsec esp 4o4 tunnel burst test
273 Above test for 257 pkts
“mystarrocks”23f0c452017-12-11 07:11:51 -0800274
Dave Wallaced1706812021-08-12 18:36:02 -0400275 TRANSPORT MODE::
“mystarrocks”23f0c452017-12-11 07:11:51 -0800276
Dave Wallaced1706812021-08-12 18:36:02 -0400277 --- encrypt ---
278 |pg2| <-------> |VPP|
279 --- decrypt ---
“mystarrocks”23f0c452017-12-11 07:11:51 -0800280
Dave Wallaced1706812021-08-12 18:36:02 -0400281 TUNNEL MODE::
282
283 --- encrypt --- plain ---
284 |pg0| <------- |VPP| <------ |pg1|
285 --- --- ---
286
287 --- decrypt --- plain ---
288 |pg0| -------> |VPP| ------> |pg1|
289 --- --- ---
290
“mystarrocks”23f0c452017-12-11 07:11:51 -0800291 """
292
Paul Vinciguerra7f9b7f92019-03-12 19:23:27 -0700293 @classmethod
294 def setUpClass(cls):
295 super(TemplateIpsecEsp, cls).setUpClass()
296
297 @classmethod
298 def tearDownClass(cls):
299 super(TemplateIpsecEsp, cls).tearDownClass()
300
Neale Ranns8e4a89b2019-01-23 08:16:17 -0800301 def setUp(self):
302 super(TemplateIpsecEsp, self).setUp()
Neale Ranns5b891102021-06-28 13:31:28 +0000303 self.config_anti_replay(self.params.values())
Neale Ranns4f33c802019-04-10 12:39:10 +0000304 self.config_network(self.params.values())
Klement Sekera611864f2018-09-26 11:19:00 +0200305
Neale Ranns8e4a89b2019-01-23 08:16:17 -0800306 def tearDown(self):
Neale Ranns4f33c802019-04-10 12:39:10 +0000307 self.unconfig_network()
Neale Ranns8e4a89b2019-01-23 08:16:17 -0800308 super(TemplateIpsecEsp, self).tearDown()
Neale Ranns8e4a89b2019-01-23 08:16:17 -0800309
Klement Sekera611864f2018-09-26 11:19:00 +0200310
Neale Ranns02950402019-12-20 00:54:57 +0000311class TestIpsecEsp1(TemplateIpsecEsp, IpsecTra46Tests,
Filip Tehlarefcad1a2020-02-04 09:36:04 +0000312 IpsecTun46Tests, IpsecTra6ExtTests):
Klement Sekera31da2e32018-06-24 22:49:55 +0200313 """ Ipsec ESP - TUN & TRA tests """
Neale Rannsb1fd80f2020-05-12 13:33:56 +0000314
315 @classmethod
316 def setUpClass(cls):
317 super(TestIpsecEsp1, cls).setUpClass()
318
319 @classmethod
320 def tearDownClass(cls):
321 super(TestIpsecEsp1, cls).tearDownClass()
322
323 def setUp(self):
324 super(TestIpsecEsp1, self).setUp()
325
326 def tearDown(self):
327 super(TestIpsecEsp1, self).tearDown()
328
329 def test_tun_46(self):
330 """ ipsec 4o6 tunnel """
331 # add an SPD entry to direct 2.2.2.2 to the v6 tunnel SA
332 p6 = self.ipv6_params
333 p4 = self.ipv4_params
334
335 p6.remote_tun_if_host4 = "2.2.2.2"
336 e = VppEnum.vl_api_ipsec_spd_action_t
337
338 VppIpsecSpdEntry(self,
339 self.tun_spd,
340 p6.scapy_tun_sa_id,
341 self.pg1.remote_addr[p4.addr_type],
342 self.pg1.remote_addr[p4.addr_type],
343 p6.remote_tun_if_host4,
344 p6.remote_tun_if_host4,
345 0,
346 priority=10,
347 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
348 is_outbound=1).add_vpp_config()
349 VppIpRoute(self, p6.remote_tun_if_host4, p4.addr_len,
350 [VppRoutePath(self.tun_if.remote_addr[p4.addr_type],
351 0xffffffff)]).add_vpp_config()
352
353 old_name = self.tun6_encrypt_node_name
354 self.tun6_encrypt_node_name = "esp4-encrypt"
355
356 self.verify_tun_46(p6, count=63)
357 self.tun6_encrypt_node_name = old_name
358
359 def test_tun_64(self):
360 """ ipsec 6o4 tunnel """
361 # add an SPD entry to direct 4444::4 to the v4 tunnel SA
362 p6 = self.ipv6_params
363 p4 = self.ipv4_params
364
365 p4.remote_tun_if_host6 = "4444::4"
366 e = VppEnum.vl_api_ipsec_spd_action_t
367
368 VppIpsecSpdEntry(self,
369 self.tun_spd,
370 p4.scapy_tun_sa_id,
371 self.pg1.remote_addr[p6.addr_type],
372 self.pg1.remote_addr[p6.addr_type],
373 p4.remote_tun_if_host6,
374 p4.remote_tun_if_host6,
375 0,
376 priority=10,
377 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
378 is_outbound=1).add_vpp_config()
379 d = DpoProto.DPO_PROTO_IP6
380 VppIpRoute(self, p4.remote_tun_if_host6, p6.addr_len,
381 [VppRoutePath(self.tun_if.remote_addr[p6.addr_type],
382 0xffffffff,
383 proto=d)]).add_vpp_config()
384
385 old_name = self.tun4_encrypt_node_name
386 self.tun4_encrypt_node_name = "esp6-encrypt"
387 self.verify_tun_64(p4, count=63)
388 self.tun4_encrypt_node_name = old_name
“mystarrocks”23f0c452017-12-11 07:11:51 -0800389
“mystarrocks”23f0c452017-12-11 07:11:51 -0800390
Neale Ranns041add72020-01-02 04:06:10 +0000391class TestIpsecEspTun(TemplateIpsecEsp, IpsecTun46Tests):
392 """ Ipsec ESP - TUN encap tests """
393
394 def setUp(self):
395 self.ipv4_params = IPsecIPv4Params()
396 self.ipv6_params = IPsecIPv6Params()
397
398 c = (VppEnum.vl_api_tunnel_encap_decap_flags_t.
399 TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_COPY_DSCP)
400 c1 = c | (VppEnum.vl_api_tunnel_encap_decap_flags_t.
401 TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_COPY_ECN)
402
403 self.ipv4_params.tun_flags = c
404 self.ipv6_params.tun_flags = c1
405
406 super(TestIpsecEspTun, self).setUp()
407
408 def gen_pkts(self, sw_intf, src, dst, count=1, payload_size=54):
409 # set the DSCP + ECN - flags are set to copy only DSCP
410 return [Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac) /
411 IP(src=src, dst=dst, tos=5) /
412 UDP(sport=4444, dport=4444) /
413 Raw(b'X' * payload_size)
414 for i in range(count)]
415
Neale Ranns9ec846c2021-02-09 14:04:02 +0000416 def gen_pkts6(self, p, sw_intf, src, dst, count=1, payload_size=54):
Neale Ranns041add72020-01-02 04:06:10 +0000417 # set the DSCP + ECN - flags are set to copy both
418 return [Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac) /
419 IPv6(src=src, dst=dst, tc=5) /
420 UDP(sport=4444, dport=4444) /
421 Raw(b'X' * payload_size)
422 for i in range(count)]
423
424 def verify_encrypted(self, p, sa, rxs):
425 # just check that only the DSCP is copied
426 for rx in rxs:
427 self.assertEqual(rx[IP].tos, 4)
428
429 def verify_encrypted6(self, p, sa, rxs):
430 # just check that the DSCP & ECN are copied
431 for rx in rxs:
432 self.assertEqual(rx[IPv6].tc, 5)
433
434
435class TestIpsecEspTun2(TemplateIpsecEsp, IpsecTun46Tests):
436 """ Ipsec ESP - TUN DSCP tests """
437
438 def setUp(self):
439 self.ipv4_params = IPsecIPv4Params()
440 self.ipv6_params = IPsecIPv6Params()
441
442 self.ipv4_params.dscp = VppEnum.vl_api_ip_dscp_t.IP_API_DSCP_EF
443 self.ipv6_params.dscp = VppEnum.vl_api_ip_dscp_t.IP_API_DSCP_AF11
444
445 super(TestIpsecEspTun2, self).setUp()
446
447 def gen_pkts(self, sw_intf, src, dst, count=1, payload_size=54):
Neale Ranns041add72020-01-02 04:06:10 +0000448 return [Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac) /
449 IP(src=src, dst=dst) /
450 UDP(sport=4444, dport=4444) /
451 Raw(b'X' * payload_size)
452 for i in range(count)]
453
Neale Ranns9ec846c2021-02-09 14:04:02 +0000454 def gen_pkts6(self, p, sw_intf, src, dst, count=1, payload_size=54):
Neale Ranns041add72020-01-02 04:06:10 +0000455 return [Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac) /
456 IPv6(src=src, dst=dst) /
457 UDP(sport=4444, dport=4444) /
458 Raw(b'X' * payload_size)
459 for i in range(count)]
460
461 def verify_encrypted(self, p, sa, rxs):
Neale Ranns9ec846c2021-02-09 14:04:02 +0000462 # just check that only the DSCP is set
Neale Ranns041add72020-01-02 04:06:10 +0000463 for rx in rxs:
464 self.assertEqual(rx[IP].tos,
465 VppEnum.vl_api_ip_dscp_t.IP_API_DSCP_EF << 2)
466
467 def verify_encrypted6(self, p, sa, rxs):
Neale Ranns9ec846c2021-02-09 14:04:02 +0000468 # just check that the DSCP is set
Neale Ranns041add72020-01-02 04:06:10 +0000469 for rx in rxs:
470 self.assertEqual(rx[IPv6].tc,
471 VppEnum.vl_api_ip_dscp_t.IP_API_DSCP_AF11 << 2)
472
473
Klement Sekera31da2e32018-06-24 22:49:55 +0200474class TestIpsecEsp2(TemplateIpsecEsp, IpsecTcpTests):
475 """ Ipsec ESP - TCP tests """
476 pass
“mystarrocks”23f0c452017-12-11 07:11:51 -0800477
478
Neale Rannsfc811342021-02-26 10:35:33 +0000479class TestIpsecEspAsync(TemplateIpsecEsp):
480 """ Ipsec ESP - Aysnc tests """
481
Klement Sekera8d815022021-03-15 16:58:10 +0100482 vpp_worker_count = 2
Neale Rannsfc811342021-02-26 10:35:33 +0000483
484 def setUp(self):
485 super(TestIpsecEspAsync, self).setUp()
486
Neale Rannsf16e9a52021-02-25 19:09:24 +0000487 self.p_sync = IPsecIPv4Params()
Neale Rannsfc811342021-02-26 10:35:33 +0000488
Neale Rannsf16e9a52021-02-25 19:09:24 +0000489 self.p_sync.crypt_algo_vpp_id = (VppEnum.vl_api_ipsec_crypto_alg_t.
490 IPSEC_API_CRYPTO_ALG_AES_CBC_256)
491 self.p_sync.crypt_algo = 'AES-CBC' # scapy name
492 self.p_sync.crypt_key = b'JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h'
Neale Rannsfc811342021-02-26 10:35:33 +0000493
Neale Rannsf16e9a52021-02-25 19:09:24 +0000494 self.p_sync.scapy_tun_sa_id += 0xf0000
495 self.p_sync.scapy_tun_spi += 0xf0000
496 self.p_sync.vpp_tun_sa_id += 0xf0000
497 self.p_sync.vpp_tun_spi += 0xf0000
498 self.p_sync.remote_tun_if_host = "2.2.2.2"
Neale Rannsfc811342021-02-26 10:35:33 +0000499 e = VppEnum.vl_api_ipsec_spd_action_t
500
Neale Rannsf16e9a52021-02-25 19:09:24 +0000501 self.p_sync.sa = VppIpsecSA(
Neale Rannsfc811342021-02-26 10:35:33 +0000502 self,
Neale Rannsf16e9a52021-02-25 19:09:24 +0000503 self.p_sync.vpp_tun_sa_id,
504 self.p_sync.vpp_tun_spi,
505 self.p_sync.auth_algo_vpp_id,
506 self.p_sync.auth_key,
507 self.p_sync.crypt_algo_vpp_id,
508 self.p_sync.crypt_key,
Neale Rannsfc811342021-02-26 10:35:33 +0000509 self.vpp_esp_protocol,
Neale Rannsf16e9a52021-02-25 19:09:24 +0000510 self.tun_if.local_addr[self.p_sync.addr_type],
511 self.tun_if.remote_addr[self.p_sync.addr_type]).add_vpp_config()
512 self.p_sync.spd = VppIpsecSpdEntry(
Neale Rannsfc811342021-02-26 10:35:33 +0000513 self,
514 self.tun_spd,
Neale Rannsf16e9a52021-02-25 19:09:24 +0000515 self.p_sync.vpp_tun_sa_id,
516 self.pg1.remote_addr[self.p_sync.addr_type],
517 self.pg1.remote_addr[self.p_sync.addr_type],
518 self.p_sync.remote_tun_if_host,
519 self.p_sync.remote_tun_if_host,
Neale Rannsfc811342021-02-26 10:35:33 +0000520 0,
521 priority=1,
522 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
523 is_outbound=1).add_vpp_config()
Neale Rannsf16e9a52021-02-25 19:09:24 +0000524 VppIpRoute(self,
525 self.p_sync.remote_tun_if_host,
526 self.p_sync.addr_len,
527 [VppRoutePath(
528 self.tun_if.remote_addr[self.p_sync.addr_type],
529 0xffffffff)]).add_vpp_config()
530 config_tun_params(self.p_sync, self.encryption_type, self.tun_if)
531
532 self.p_async = IPsecIPv4Params()
533
534 self.p_async.crypt_algo_vpp_id = (VppEnum.vl_api_ipsec_crypto_alg_t.
535 IPSEC_API_CRYPTO_ALG_AES_GCM_256)
536 self.p_async.auth_algo_vpp_id = (VppEnum.vl_api_ipsec_integ_alg_t.
537 IPSEC_API_INTEG_ALG_NONE)
538 self.p_async.crypt_algo = 'AES-GCM' # scapy name
539 self.p_async.crypt_key = b'JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h'
540 self.p_async.auth_algo = 'NULL'
541
542 self.p_async.scapy_tun_sa_id += 0xe0000
543 self.p_async.scapy_tun_spi += 0xe0000
544 self.p_async.vpp_tun_sa_id += 0xe0000
545 self.p_async.vpp_tun_spi += 0xe0000
546 self.p_async.remote_tun_if_host = "2.2.2.3"
547
548 iflags = VppEnum.vl_api_ipsec_sad_flags_t
549 self.p_async.flags = (iflags.IPSEC_API_SAD_FLAG_USE_ESN |
550 iflags.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY |
551 iflags.IPSEC_API_SAD_FLAG_ASYNC)
552
553 self.p_async.sa = VppIpsecSA(
554 self,
555 self.p_async.vpp_tun_sa_id,
556 self.p_async.vpp_tun_spi,
557 self.p_async.auth_algo_vpp_id,
558 self.p_async.auth_key,
559 self.p_async.crypt_algo_vpp_id,
560 self.p_async.crypt_key,
561 self.vpp_esp_protocol,
562 self.tun_if.local_addr[self.p_async.addr_type],
563 self.tun_if.remote_addr[self.p_async.addr_type],
564 flags=self.p_async.flags).add_vpp_config()
565 self.p_async.spd = VppIpsecSpdEntry(
566 self,
567 self.tun_spd,
568 self.p_async.vpp_tun_sa_id,
569 self.pg1.remote_addr[self.p_async.addr_type],
570 self.pg1.remote_addr[self.p_async.addr_type],
571 self.p_async.remote_tun_if_host,
572 self.p_async.remote_tun_if_host,
573 0,
574 priority=2,
575 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
576 is_outbound=1).add_vpp_config()
577 VppIpRoute(self,
578 self.p_async.remote_tun_if_host,
579 self.p_async.addr_len,
580 [VppRoutePath(
581 self.tun_if.remote_addr[self.p_async.addr_type],
582 0xffffffff)]).add_vpp_config()
583 config_tun_params(self.p_async, self.encryption_type, self.tun_if)
Neale Rannsfc811342021-02-26 10:35:33 +0000584
585 def test_dual_stream(self):
586 """ Alternating SAs """
Neale Rannsf16e9a52021-02-25 19:09:24 +0000587 p = self.params[self.p_sync.addr_type]
588 self.vapi.ipsec_set_async_mode(async_enable=True)
Neale Rannsfc811342021-02-26 10:35:33 +0000589
590 pkts = [(Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) /
591 IP(src=self.pg1.remote_ip4,
Neale Rannsf16e9a52021-02-25 19:09:24 +0000592 dst=self.p_sync.remote_tun_if_host) /
Neale Rannsfc811342021-02-26 10:35:33 +0000593 UDP(sport=4444, dport=4444) /
594 Raw(b'0x0' * 200)),
595 (Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) /
596 IP(src=self.pg1.remote_ip4,
597 dst=p.remote_tun_if_host) /
598 UDP(sport=4444, dport=4444) /
599 Raw(b'0x0' * 200))]
600 pkts *= 1023
601
602 rxs = self.send_and_expect(self.pg1, pkts, self.pg0)
603
604 self.assertEqual(len(rxs), len(pkts))
605
606 for rx in rxs:
607 if rx[ESP].spi == p.scapy_tun_spi:
608 decrypted = p.vpp_tun_sa.decrypt(rx[IP])
Neale Rannsf16e9a52021-02-25 19:09:24 +0000609 elif rx[ESP].spi == self.p_sync.vpp_tun_spi:
610 decrypted = self.p_sync.scapy_tun_sa.decrypt(rx[IP])
Neale Rannsfc811342021-02-26 10:35:33 +0000611 else:
612 rx.show()
613 self.assertTrue(False)
614
Neale Rannsf16e9a52021-02-25 19:09:24 +0000615 self.p_sync.spd.remove_vpp_config()
616 self.p_sync.sa.remove_vpp_config()
617 self.p_async.spd.remove_vpp_config()
618 self.p_async.sa.remove_vpp_config()
619 self.vapi.ipsec_set_async_mode(async_enable=False)
620
621 def test_sync_async_noop_stream(self):
622 """ Alternating SAs sync/async/noop """
623 p = self.params[self.p_sync.addr_type]
624
625 # first pin the default/noop SA to worker 0
626 pkts = [(Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) /
627 IP(src=self.pg1.remote_ip4,
628 dst=p.remote_tun_if_host) /
629 UDP(sport=4444, dport=4444) /
630 Raw(b'0x0' * 200))]
631 rxs = self.send_and_expect(self.pg1, pkts, self.pg0, worker=0)
632
633 self.logger.info(self.vapi.cli("sh ipsec sa"))
634 self.logger.info(self.vapi.cli("sh crypto async status"))
635
636 # then use all the other SAs on worker 1.
637 # some will handoff, other take the sync and async paths
638 pkts = [(Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) /
639 IP(src=self.pg1.remote_ip4,
640 dst=self.p_sync.remote_tun_if_host) /
641 UDP(sport=4444, dport=4444) /
642 Raw(b'0x0' * 200)),
643 (Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) /
644 IP(src=self.pg1.remote_ip4,
645 dst=p.remote_tun_if_host) /
646 UDP(sport=4444, dport=4444) /
647 Raw(b'0x0' * 200)),
648 (Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) /
649 IP(src=self.pg1.remote_ip4,
650 dst=self.p_async.remote_tun_if_host) /
651 UDP(sport=4444, dport=4444) /
652 Raw(b'0x0' * 200))]
653 pkts *= 1023
654
655 rxs = self.send_and_expect(self.pg1, pkts, self.pg0, worker=1)
656
657 self.assertEqual(len(rxs), len(pkts))
658
659 for rx in rxs:
660 if rx[ESP].spi == p.scapy_tun_spi:
661 decrypted = p.vpp_tun_sa.decrypt(rx[IP])
662 elif rx[ESP].spi == self.p_sync.vpp_tun_spi:
663 decrypted = self.p_sync.scapy_tun_sa.decrypt(rx[IP])
664 elif rx[ESP].spi == self.p_async.vpp_tun_spi:
665 decrypted = self.p_async.scapy_tun_sa.decrypt(rx[IP])
666 else:
667 rx.show()
668 self.assertTrue(False)
669
670 self.p_sync.spd.remove_vpp_config()
671 self.p_sync.sa.remove_vpp_config()
672 self.p_async.spd.remove_vpp_config()
673 self.p_async.sa.remove_vpp_config()
674
675 # async mode should have been disabled now that there are
676 # no async SAs. there's no API for this, so a reluctant
677 # screen scrape.
678 self.assertTrue("DISABLED" in self.vapi.cli("sh crypto async status"))
Neale Rannsfc811342021-02-26 10:35:33 +0000679
680
Neale Ranns4a56f4e2019-12-23 04:10:25 +0000681class TestIpsecEspHandoff(TemplateIpsecEsp,
682 IpsecTun6HandoffTests,
683 IpsecTun4HandoffTests):
684 """ Ipsec ESP - handoff tests """
685 pass
686
687
Neale Ranns4f33c802019-04-10 12:39:10 +0000688class TemplateIpsecEspUdp(ConfigIpsecESP):
Neale Ranns53f526b2019-02-25 14:32:02 +0000689 """
690 UDP encapped ESP
691 """
Paul Vinciguerra7f9b7f92019-03-12 19:23:27 -0700692
693 @classmethod
694 def setUpClass(cls):
695 super(TemplateIpsecEspUdp, cls).setUpClass()
696
697 @classmethod
698 def tearDownClass(cls):
699 super(TemplateIpsecEspUdp, cls).tearDownClass()
700
Neale Ranns53f526b2019-02-25 14:32:02 +0000701 def setUp(self):
702 super(TemplateIpsecEspUdp, self).setUp()
Neale Ranns4f33c802019-04-10 12:39:10 +0000703 self.net_objs = []
Neale Ranns53f526b2019-02-25 14:32:02 +0000704 self.tun_if = self.pg0
705 self.tra_if = self.pg2
706 self.logger.info(self.vapi.ppcli("show int addr"))
707
708 p = self.ipv4_params
709 p.flags = (VppEnum.vl_api_ipsec_sad_flags_t.
Neale Ranns5b891102021-06-28 13:31:28 +0000710 IPSEC_API_SAD_FLAG_UDP_ENCAP |
711 VppEnum.vl_api_ipsec_sad_flags_t.
712 IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY)
Neale Ranns53f526b2019-02-25 14:32:02 +0000713 p.nat_header = UDP(sport=5454, dport=4500)
714
715 self.tra_spd = VppIpsecSpd(self, self.tra_spd_id)
716 self.tra_spd.add_vpp_config()
717 VppIpsecSpdItfBinding(self, self.tra_spd,
718 self.tra_if).add_vpp_config()
719
Neale Ranns4f33c802019-04-10 12:39:10 +0000720 self.config_esp_tra(p)
Neale Ranns2ac885c2019-03-20 18:24:43 +0000721 config_tra_params(p, self.encryption_type)
Neale Ranns53f526b2019-02-25 14:32:02 +0000722
723 self.tun_spd = VppIpsecSpd(self, self.tun_spd_id)
724 self.tun_spd.add_vpp_config()
725 VppIpsecSpdItfBinding(self, self.tun_spd,
726 self.tun_if).add_vpp_config()
727
Neale Ranns4f33c802019-04-10 12:39:10 +0000728 self.config_esp_tun(p)
Neale Ranns92e93842019-04-08 07:36:50 +0000729 self.logger.info(self.vapi.ppcli("show ipsec all"))
Neale Ranns53f526b2019-02-25 14:32:02 +0000730
731 d = DpoProto.DPO_PROTO_IP4
732 VppIpRoute(self, p.remote_tun_if_host, p.addr_len,
733 [VppRoutePath(self.tun_if.remote_addr[p.addr_type],
734 0xffffffff,
735 proto=d)]).add_vpp_config()
736
737 def tearDown(self):
738 super(TemplateIpsecEspUdp, self).tearDown()
Paul Vinciguerra90cf21b2019-03-13 09:23:05 -0700739
740 def show_commands_at_teardown(self):
741 self.logger.info(self.vapi.cli("show hardware"))
Neale Ranns53f526b2019-02-25 14:32:02 +0000742
743
Neale Ranns49e7ef62019-04-10 17:24:29 +0000744class TestIpsecEspUdp(TemplateIpsecEspUdp, IpsecTra4Tests):
Neale Ranns53f526b2019-02-25 14:32:02 +0000745 """ Ipsec NAT-T ESP UDP tests """
Neale Ranns53f526b2019-02-25 14:32:02 +0000746 pass
747
748
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000749class MyParameters():
750 def __init__(self):
Neale Ranns5b891102021-06-28 13:31:28 +0000751 saf = VppEnum.vl_api_ipsec_sad_flags_t
752 flag_esn = saf.IPSEC_API_SAD_FLAG_USE_ESN
753 flag_ar = saf.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY
754 self.flags = [0, flag_esn, flag_ar]
Neale Ranns4f33c802019-04-10 12:39:10 +0000755 # foreach crypto algorithm
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000756 self.algos = {
757 'AES-GCM-128/NONE': {
758 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
Neale Ranns47feb112019-04-11 15:14:07 +0000759 IPSEC_API_CRYPTO_ALG_AES_GCM_128),
760 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
761 IPSEC_API_INTEG_ALG_NONE),
762 'scapy-crypto': "AES-GCM",
763 'scapy-integ': "NULL",
Ole Troan64e978b2019-10-17 21:40:36 +0200764 'key': b"JPjyOWBeVEQiMe7h",
Neale Ranns80f6fd52019-04-16 02:41:34 +0000765 'salt': 0},
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000766 'AES-GCM-192/NONE': {
767 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
Neale Ranns80f6fd52019-04-16 02:41:34 +0000768 IPSEC_API_CRYPTO_ALG_AES_GCM_192),
769 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
770 IPSEC_API_INTEG_ALG_NONE),
771 'scapy-crypto': "AES-GCM",
772 'scapy-integ': "NULL",
Ole Troan64e978b2019-10-17 21:40:36 +0200773 'key': b"JPjyOWBeVEQiMe7h01234567",
Neale Ranns80f6fd52019-04-16 02:41:34 +0000774 'salt': 1010},
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000775 'AES-GCM-256/NONE': {
776 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
Neale Ranns47feb112019-04-11 15:14:07 +0000777 IPSEC_API_CRYPTO_ALG_AES_GCM_256),
778 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
779 IPSEC_API_INTEG_ALG_NONE),
780 'scapy-crypto': "AES-GCM",
781 'scapy-integ': "NULL",
Ole Troan64e978b2019-10-17 21:40:36 +0200782 'key': b"JPjyOWBeVEQiMe7h0123456787654321",
Neale Ranns80f6fd52019-04-16 02:41:34 +0000783 'salt': 2020},
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000784 'AES-CBC-128/MD5-96': {
785 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
Neale Ranns47feb112019-04-11 15:14:07 +0000786 IPSEC_API_CRYPTO_ALG_AES_CBC_128),
787 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
Dmitry Vakhrushev77cc14a2019-08-14 00:12:33 -0400788 IPSEC_API_INTEG_ALG_MD5_96),
Neale Ranns47feb112019-04-11 15:14:07 +0000789 'scapy-crypto': "AES-CBC",
Dmitry Vakhrushev77cc14a2019-08-14 00:12:33 -0400790 'scapy-integ': "HMAC-MD5-96",
Neale Ranns80f6fd52019-04-16 02:41:34 +0000791 'salt': 0,
Ole Troan64e978b2019-10-17 21:40:36 +0200792 'key': b"JPjyOWBeVEQiMe7h"},
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000793 'AES-CBC-192/SHA1-96': {
794 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
Neale Ranns47feb112019-04-11 15:14:07 +0000795 IPSEC_API_CRYPTO_ALG_AES_CBC_192),
796 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
797 IPSEC_API_INTEG_ALG_SHA1_96),
798 'scapy-crypto': "AES-CBC",
799 'scapy-integ': "HMAC-SHA1-96",
Neale Ranns80f6fd52019-04-16 02:41:34 +0000800 'salt': 0,
Ole Troan64e978b2019-10-17 21:40:36 +0200801 'key': b"JPjyOWBeVEQiMe7hJPjyOWBe"},
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000802 'AES-CBC-256/SHA1-96': {
803 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
Neale Ranns47feb112019-04-11 15:14:07 +0000804 IPSEC_API_CRYPTO_ALG_AES_CBC_256),
805 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
806 IPSEC_API_INTEG_ALG_SHA1_96),
807 'scapy-crypto': "AES-CBC",
808 'scapy-integ': "HMAC-SHA1-96",
Neale Ranns80f6fd52019-04-16 02:41:34 +0000809 'salt': 0,
Ole Troan64e978b2019-10-17 21:40:36 +0200810 'key': b"JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h"},
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000811 '3DES-CBC/SHA1-96': {
812 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
Vladimir Ratnikovf4805072019-05-17 09:17:59 -0400813 IPSEC_API_CRYPTO_ALG_3DES_CBC),
814 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
815 IPSEC_API_INTEG_ALG_SHA1_96),
816 'scapy-crypto': "3DES",
817 'scapy-integ': "HMAC-SHA1-96",
818 'salt': 0,
Ole Troan64e978b2019-10-17 21:40:36 +0200819 'key': b"JPjyOWBeVEQiMe7h00112233"},
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000820 'NONE/SHA1-96': {
821 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
Neale Ranns2cdcd0c2019-08-27 12:26:14 +0000822 IPSEC_API_CRYPTO_ALG_NONE),
823 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
824 IPSEC_API_INTEG_ALG_SHA1_96),
825 'scapy-crypto': "NULL",
826 'scapy-integ': "HMAC-SHA1-96",
827 'salt': 0,
Benoît Ganne490b9272021-01-22 18:03:09 +0100828 'key': b"JPjyOWBeVEQiMe7h00112233"},
829 'AES-CTR-128/SHA1-96': {
830 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
831 IPSEC_API_CRYPTO_ALG_AES_CTR_128),
832 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
833 IPSEC_API_INTEG_ALG_SHA1_96),
834 'scapy-crypto': "AES-CTR",
835 'scapy-integ': "HMAC-SHA1-96",
836 'salt': 0,
837 'key': b"JPjyOWBeVEQiMe7h"},
838 'AES-CTR-192/SHA1-96': {
839 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
840 IPSEC_API_CRYPTO_ALG_AES_CTR_192),
841 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
842 IPSEC_API_INTEG_ALG_SHA1_96),
843 'scapy-crypto': "AES-CTR",
844 'scapy-integ': "HMAC-SHA1-96",
845 'salt': 1010,
846 'key': b"JPjyOWBeVEQiMe7hJPjyOWBe"},
847 'AES-CTR-256/SHA1-96': {
848 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
849 IPSEC_API_CRYPTO_ALG_AES_CTR_256),
850 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
851 IPSEC_API_INTEG_ALG_SHA1_96),
852 'scapy-crypto': "AES-CTR",
853 'scapy-integ': "HMAC-SHA1-96",
854 'salt': 2020,
855 'key': b"JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h"}}
Neale Ranns4f33c802019-04-10 12:39:10 +0000856
Neale Ranns4f33c802019-04-10 12:39:10 +0000857
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000858class RunTestIpsecEspAll(ConfigIpsecESP,
859 IpsecTra4, IpsecTra6,
860 IpsecTun4, IpsecTun6):
861 """ Ipsec ESP all Algos """
862
Neale Ranns8c609af2021-02-25 10:05:32 +0000863 @classmethod
864 def setUpConstants(cls):
865 test_args = str.split(cls.__doc__, " ")
866 engine = test_args[0]
867 if engine == "async":
Klement Sekera8d815022021-03-15 16:58:10 +0100868 cls.vpp_worker_count = 2
Neale Ranns8c609af2021-02-25 10:05:32 +0000869 super(RunTestIpsecEspAll, cls).setUpConstants()
870
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000871 def setUp(self):
872 super(RunTestIpsecEspAll, self).setUp()
873 test_args = str.split(self.__doc__, " ")
874
875 params = MyParameters()
876 self.engine = test_args[0]
877 self.flag = params.flags[0]
Neale Ranns5b891102021-06-28 13:31:28 +0000878 if test_args[1] == 'ESNon':
879 self.flag |= params.flags[1]
880 if test_args[2] == 'ARon':
881 self.flag |= params.flags[2]
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000882
Neale Ranns5b891102021-06-28 13:31:28 +0000883 self.algo = params.algos[test_args[3]]
Neale Ranns8c609af2021-02-25 10:05:32 +0000884 self.async_mode = False
885 if self.engine == "async":
886 self.async_mode = True
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000887
888 def tearDown(self):
889 super(RunTestIpsecEspAll, self).tearDown()
890
891 def run_test(self):
892 self.run_a_test(self.engine, self.flag, self.algo)
893
Filip Tehlarefcad1a2020-02-04 09:36:04 +0000894 def run_a_test(self, engine, flag, algo, payload_size=None):
Neale Ranns8c609af2021-02-25 10:05:32 +0000895 if self.async_mode:
896 self.vapi.cli("set ipsec async mode on")
897 else:
898 self.vapi.cli("set crypto handler all %s" % engine)
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000899
Neale Ranns8c609af2021-02-25 10:05:32 +0000900 self.logger.info(self.vapi.cli("show crypto async status"))
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000901 self.ipv4_params = IPsecIPv4Params()
902 self.ipv6_params = IPsecIPv6Params()
903
904 self.params = {self.ipv4_params.addr_type:
905 self.ipv4_params,
906 self.ipv6_params.addr_type:
907 self.ipv6_params}
908
909 for _, p in self.params.items():
910 p.auth_algo_vpp_id = algo['vpp-integ']
911 p.crypt_algo_vpp_id = algo['vpp-crypto']
912 p.crypt_algo = algo['scapy-crypto']
913 p.auth_algo = algo['scapy-integ']
914 p.crypt_key = algo['key']
915 p.salt = algo['salt']
Neale Ranns5b891102021-06-28 13:31:28 +0000916 p.flags = flag
Neale Ranns9ec846c2021-02-09 14:04:02 +0000917 p.outer_flow_label = 243224
Neale Ranns8c609af2021-02-25 10:05:32 +0000918 p.async_mode = self.async_mode
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000919
920 self.reporter.send_keep_alive(self)
921
Neale Ranns4f33c802019-04-10 12:39:10 +0000922 #
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000923 # configure the SPDs. SAs, etc
Neale Ranns4f33c802019-04-10 12:39:10 +0000924 #
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000925 self.config_network(self.params.values())
Neale Ranns4f33c802019-04-10 12:39:10 +0000926
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000927 #
928 # run some traffic.
929 # An exhautsive 4o6, 6o4 is not necessary
930 # for each algo
931 #
932 self.verify_tra_basic6(count=NUM_PKTS)
933 self.verify_tra_basic4(count=NUM_PKTS)
934 self.verify_tun_66(self.params[socket.AF_INET6],
935 count=NUM_PKTS)
Christian Hoppsfb7e7ed2019-11-03 07:02:15 -0500936 #
937 # Use an odd-byte payload size to check for correct padding.
938 #
939 # 49 + 2 == 51 which should pad +1 to 52 for 4 byte alignment, +5
940 # to 56 for 8 byte alignment, and +13 to 64 for 64 byte alignment.
941 # This should catch bugs where the code is incorrectly over-padding
942 # for algorithms that don't require it
943 psz = 49 - len(IP()/ICMP()) if payload_size is None else payload_size
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000944 self.verify_tun_44(self.params[socket.AF_INET],
Christian Hoppsfb7e7ed2019-11-03 07:02:15 -0500945 count=NUM_PKTS, payload_size=psz)
Neale Ranns4f33c802019-04-10 12:39:10 +0000946
Filip Tehlarefcad1a2020-02-04 09:36:04 +0000947 LARGE_PKT_SZ = [
Filip Tehlare4e8c6b2020-02-13 07:49:30 +0000948 1970, # results in 2 chained buffers entering decrypt node
949 # but leaving as simple buffer due to ICV removal (tra4)
PiotrX Kleskifdca4dd2020-05-05 14:14:22 +0200950 2004, # footer+ICV will be added to 2nd buffer (tun4)
Nathan Skrzypczak2c77ae42021-09-29 15:36:51 +0200951 4010, # ICV ends up splitted across 2 buffers in esp_decrypt
Filip Tehlarefcad1a2020-02-04 09:36:04 +0000952 # for transport4; transport6 takes normal path
Filip Tehlarefcad1a2020-02-04 09:36:04 +0000953 4020, # same as above but tra4 and tra6 are switched
954 ]
955 if self.engine in engines_supporting_chain_bufs:
956 for sz in LARGE_PKT_SZ:
957 self.verify_tra_basic4(count=NUM_PKTS, payload_size=sz)
958 self.verify_tra_basic6(count=NUM_PKTS, payload_size=sz)
959 self.verify_tun_66(self.params[socket.AF_INET6],
960 count=NUM_PKTS, payload_size=sz)
961 self.verify_tun_44(self.params[socket.AF_INET],
962 count=NUM_PKTS, payload_size=sz)
963
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000964 #
Neale Ranns5b891102021-06-28 13:31:28 +0000965 # reconfigure the network and SA to run the
966 # anti replay tests
967 #
968 saf = VppEnum.vl_api_ipsec_sad_flags_t
969 if flag & saf.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY:
970 self.unconfig_network()
971 self.config_network(self.params.values())
972 self.verify_tra_anti_replay()
973
974 self.unconfig_network()
975 self.config_network(self.params.values())
976 self.verify_hi_seq_num()
Neale Rannse11203e2021-09-21 12:34:19 +0000977 self.unconfig_network()
978 self.config_network(self.params.values())
979 self.verify_tra_lost()
Neale Ranns5b891102021-06-28 13:31:28 +0000980
981 #
Neale Rannsf16e9a52021-02-25 19:09:24 +0000982 # swap the handlers while SAs are up
983 #
Neale Ranns5b891102021-06-28 13:31:28 +0000984 self.unconfig_network()
985 self.config_network(self.params.values())
Neale Rannsf16e9a52021-02-25 19:09:24 +0000986 for e in engines:
987 if e != engine:
988 self.vapi.cli("set crypto handler all %s" % e)
989 self.verify_tra_basic4(count=NUM_PKTS)
990
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000991 self.unconfig_network()
juraj.linkes11057662019-07-08 10:22:55 +0200992
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000993#
994# To generate test classes, do:
995# grep '# GEN' test_ipsec_esp.py | sed -e 's/# GEN //g' | bash
996#
Neale Ranns8c609af2021-02-25 10:05:32 +0000997# GEN for ENG in native ipsecmb openssl; do \
Neale Ranns5b891102021-06-28 13:31:28 +0000998# GEN for ESN in ESNon ESNoff; do for AR in ARon ARoff; do \
999# GEN for ALG in AES-GCM-128/NONE \
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001000# GEN AES-GCM-192/NONE AES-GCM-256/NONE AES-CBC-128/MD5-96 \
1001# GEN AES-CBC-192/SHA1-96 AES-CBC-256/SHA1-96 \
Benoît Ganne490b9272021-01-22 18:03:09 +01001002# GEN 3DES-CBC/SHA1-96 NONE/SHA1-96 \
1003# GEN AES-CTR-128/SHA1-96 AES-CTR-192/SHA1-96 AES-CTR-256/SHA1-96; do \
Neale Ranns5b891102021-06-28 13:31:28 +00001004# GEN echo -en "\n\nclass "
1005# GEN echo -e "Test_${ENG}_${ESN}_${AR}_${ALG}(RunTestIpsecEspAll):" |
1006# GEN sed -e 's/-/_/g' -e 's#/#_#g' ;
1007# GEN echo ' """'$ENG $ESN $AR $ALG IPSec test'"""' ;
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001008# GEN echo " def test_ipsec(self):";
Neale Ranns5b891102021-06-28 13:31:28 +00001009# GEN echo ' """'$ENG $ESN $AR $ALG IPSec test'"""' ;
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001010# GEN echo " self.run_test()";
Neale Ranns5b891102021-06-28 13:31:28 +00001011# GEN done; done; done; done
Neale Ranns8c609af2021-02-25 10:05:32 +00001012#
Neale Ranns5b891102021-06-28 13:31:28 +00001013# GEN for ESN in ESNon ESNoff; do for AR in ARon ARoff; do \
1014# GEN for ALG in \
Neale Ranns8c609af2021-02-25 10:05:32 +00001015# GEN AES-GCM-128/NONE AES-GCM-192/NONE AES-GCM-256/NONE \
1016# GEN AES-CBC-192/SHA1-96 AES-CBC-256/SHA1-96; do \
Neale Ranns5b891102021-06-28 13:31:28 +00001017# GEN echo -en "\n\nclass "
1018# GEN echo -e "Test_async_${ESN}_${AR}_${ALG}(RunTestIpsecEspAll):" |
1019# GEN sed -e 's/-/_/g' -e 's#/#_#g' ;
1020# GEN echo ' """'async $ESN $AR $ALG IPSec test'"""' ;
Neale Ranns8c609af2021-02-25 10:05:32 +00001021# GEN echo " def test_ipsec(self):";
Neale Ranns5b891102021-06-28 13:31:28 +00001022# GEN echo ' """'async $ESN $AR $ALG IPSec test'"""' ;
Neale Ranns8c609af2021-02-25 10:05:32 +00001023# GEN echo " self.run_test()";
Neale Ranns5b891102021-06-28 13:31:28 +00001024# GEN done; done; done;
1025
1026
1027class Test_native_ESNon_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1028 """native ESNon ARon AES-GCM-128/NONE IPSec test"""
1029 def test_ipsec(self):
1030 """native ESNon ARon AES-GCM-128/NONE IPSec test"""
1031 self.run_test()
1032
1033
1034class Test_native_ESNon_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1035 """native ESNon ARon AES-GCM-192/NONE IPSec test"""
1036 def test_ipsec(self):
1037 """native ESNon ARon AES-GCM-192/NONE IPSec test"""
1038 self.run_test()
1039
1040
1041class Test_native_ESNon_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1042 """native ESNon ARon AES-GCM-256/NONE IPSec test"""
1043 def test_ipsec(self):
1044 """native ESNon ARon AES-GCM-256/NONE IPSec test"""
1045 self.run_test()
1046
1047
1048class Test_native_ESNon_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1049 """native ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
1050 def test_ipsec(self):
1051 """native ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
1052 self.run_test()
1053
1054
1055class Test_native_ESNon_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1056 """native ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
1057 def test_ipsec(self):
1058 """native ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
1059 self.run_test()
1060
1061
1062class Test_native_ESNon_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1063 """native ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
1064 def test_ipsec(self):
1065 """native ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
1066 self.run_test()
1067
1068
1069class Test_native_ESNon_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1070 """native ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
1071 def test_ipsec(self):
1072 """native ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
1073 self.run_test()
1074
1075
1076class Test_native_ESNon_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1077 """native ESNon ARon NONE/SHA1-96 IPSec test"""
1078 def test_ipsec(self):
1079 """native ESNon ARon NONE/SHA1-96 IPSec test"""
1080 self.run_test()
1081
1082
1083class Test_native_ESNon_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1084 """native ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
1085 def test_ipsec(self):
1086 """native ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
1087 self.run_test()
1088
1089
1090class Test_native_ESNon_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1091 """native ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
1092 def test_ipsec(self):
1093 """native ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
1094 self.run_test()
1095
1096
1097class Test_native_ESNon_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1098 """native ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
1099 def test_ipsec(self):
1100 """native ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
1101 self.run_test()
1102
1103
1104class Test_native_ESNon_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1105 """native ESNon ARoff AES-GCM-128/NONE IPSec test"""
1106 def test_ipsec(self):
1107 """native ESNon ARoff AES-GCM-128/NONE IPSec test"""
1108 self.run_test()
1109
1110
1111class Test_native_ESNon_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1112 """native ESNon ARoff AES-GCM-192/NONE IPSec test"""
1113 def test_ipsec(self):
1114 """native ESNon ARoff AES-GCM-192/NONE IPSec test"""
1115 self.run_test()
1116
1117
1118class Test_native_ESNon_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1119 """native ESNon ARoff AES-GCM-256/NONE IPSec test"""
1120 def test_ipsec(self):
1121 """native ESNon ARoff AES-GCM-256/NONE IPSec test"""
1122 self.run_test()
1123
1124
1125class Test_native_ESNon_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1126 """native ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
1127 def test_ipsec(self):
1128 """native ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
1129 self.run_test()
1130
1131
1132class Test_native_ESNon_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1133 """native ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
1134 def test_ipsec(self):
1135 """native ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
1136 self.run_test()
1137
1138
1139class Test_native_ESNon_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1140 """native ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
1141 def test_ipsec(self):
1142 """native ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
1143 self.run_test()
1144
1145
1146class Test_native_ESNon_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1147 """native ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
1148 def test_ipsec(self):
1149 """native ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
1150 self.run_test()
1151
1152
1153class Test_native_ESNon_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1154 """native ESNon ARoff NONE/SHA1-96 IPSec test"""
1155 def test_ipsec(self):
1156 """native ESNon ARoff NONE/SHA1-96 IPSec test"""
1157 self.run_test()
1158
1159
1160class Test_native_ESNon_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1161 """native ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
1162 def test_ipsec(self):
1163 """native ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
1164 self.run_test()
1165
1166
1167class Test_native_ESNon_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1168 """native ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
1169 def test_ipsec(self):
1170 """native ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
1171 self.run_test()
1172
1173
1174class Test_native_ESNon_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1175 """native ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
1176 def test_ipsec(self):
1177 """native ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
1178 self.run_test()
1179
1180
1181class Test_native_ESNoff_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1182 """native ESNoff ARon AES-GCM-128/NONE IPSec test"""
1183 def test_ipsec(self):
1184 """native ESNoff ARon AES-GCM-128/NONE IPSec test"""
1185 self.run_test()
1186
1187
1188class Test_native_ESNoff_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1189 """native ESNoff ARon AES-GCM-192/NONE IPSec test"""
1190 def test_ipsec(self):
1191 """native ESNoff ARon AES-GCM-192/NONE IPSec test"""
1192 self.run_test()
1193
1194
1195class Test_native_ESNoff_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1196 """native ESNoff ARon AES-GCM-256/NONE IPSec test"""
1197 def test_ipsec(self):
1198 """native ESNoff ARon AES-GCM-256/NONE IPSec test"""
1199 self.run_test()
1200
1201
1202class Test_native_ESNoff_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1203 """native ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
1204 def test_ipsec(self):
1205 """native ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
1206 self.run_test()
1207
1208
1209class Test_native_ESNoff_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1210 """native ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
1211 def test_ipsec(self):
1212 """native ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
1213 self.run_test()
1214
1215
1216class Test_native_ESNoff_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1217 """native ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
1218 def test_ipsec(self):
1219 """native ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
1220 self.run_test()
1221
1222
1223class Test_native_ESNoff_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1224 """native ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
1225 def test_ipsec(self):
1226 """native ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
1227 self.run_test()
1228
1229
1230class Test_native_ESNoff_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1231 """native ESNoff ARon NONE/SHA1-96 IPSec test"""
1232 def test_ipsec(self):
1233 """native ESNoff ARon NONE/SHA1-96 IPSec test"""
1234 self.run_test()
1235
1236
1237class Test_native_ESNoff_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1238 """native ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
1239 def test_ipsec(self):
1240 """native ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
1241 self.run_test()
1242
1243
1244class Test_native_ESNoff_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1245 """native ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
1246 def test_ipsec(self):
1247 """native ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
1248 self.run_test()
1249
1250
1251class Test_native_ESNoff_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1252 """native ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
1253 def test_ipsec(self):
1254 """native ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
1255 self.run_test()
1256
1257
1258class Test_native_ESNoff_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1259 """native ESNoff ARoff AES-GCM-128/NONE IPSec test"""
1260 def test_ipsec(self):
1261 """native ESNoff ARoff AES-GCM-128/NONE IPSec test"""
1262 self.run_test()
1263
1264
1265class Test_native_ESNoff_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1266 """native ESNoff ARoff AES-GCM-192/NONE IPSec test"""
1267 def test_ipsec(self):
1268 """native ESNoff ARoff AES-GCM-192/NONE IPSec test"""
1269 self.run_test()
1270
1271
1272class Test_native_ESNoff_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1273 """native ESNoff ARoff AES-GCM-256/NONE IPSec test"""
1274 def test_ipsec(self):
1275 """native ESNoff ARoff AES-GCM-256/NONE IPSec test"""
1276 self.run_test()
1277
1278
1279class Test_native_ESNoff_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1280 """native ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
1281 def test_ipsec(self):
1282 """native ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
1283 self.run_test()
1284
1285
1286class Test_native_ESNoff_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1287 """native ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
1288 def test_ipsec(self):
1289 """native ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
1290 self.run_test()
1291
1292
1293class Test_native_ESNoff_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1294 """native ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
1295 def test_ipsec(self):
1296 """native ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
1297 self.run_test()
1298
1299
1300class Test_native_ESNoff_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1301 """native ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
1302 def test_ipsec(self):
1303 """native ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
1304 self.run_test()
1305
1306
1307class Test_native_ESNoff_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1308 """native ESNoff ARoff NONE/SHA1-96 IPSec test"""
1309 def test_ipsec(self):
1310 """native ESNoff ARoff NONE/SHA1-96 IPSec test"""
1311 self.run_test()
1312
1313
1314class Test_native_ESNoff_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1315 """native ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
1316 def test_ipsec(self):
1317 """native ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
1318 self.run_test()
1319
1320
1321class Test_native_ESNoff_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1322 """native ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
1323 def test_ipsec(self):
1324 """native ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
1325 self.run_test()
1326
1327
1328class Test_native_ESNoff_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1329 """native ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
1330 def test_ipsec(self):
1331 """native ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
1332 self.run_test()
1333
1334
1335class Test_ipsecmb_ESNon_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1336 """ipsecmb ESNon ARon AES-GCM-128/NONE IPSec test"""
1337 def test_ipsec(self):
1338 """ipsecmb ESNon ARon AES-GCM-128/NONE IPSec test"""
1339 self.run_test()
1340
1341
1342class Test_ipsecmb_ESNon_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1343 """ipsecmb ESNon ARon AES-GCM-192/NONE IPSec test"""
1344 def test_ipsec(self):
1345 """ipsecmb ESNon ARon AES-GCM-192/NONE IPSec test"""
1346 self.run_test()
1347
1348
1349class Test_ipsecmb_ESNon_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1350 """ipsecmb ESNon ARon AES-GCM-256/NONE IPSec test"""
1351 def test_ipsec(self):
1352 """ipsecmb ESNon ARon AES-GCM-256/NONE IPSec test"""
1353 self.run_test()
1354
1355
1356class Test_ipsecmb_ESNon_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1357 """ipsecmb ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
1358 def test_ipsec(self):
1359 """ipsecmb ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
1360 self.run_test()
1361
1362
1363class Test_ipsecmb_ESNon_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1364 """ipsecmb ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
1365 def test_ipsec(self):
1366 """ipsecmb ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
1367 self.run_test()
1368
1369
1370class Test_ipsecmb_ESNon_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1371 """ipsecmb ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
1372 def test_ipsec(self):
1373 """ipsecmb ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
1374 self.run_test()
1375
1376
1377class Test_ipsecmb_ESNon_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1378 """ipsecmb ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
1379 def test_ipsec(self):
1380 """ipsecmb ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
1381 self.run_test()
1382
1383
1384class Test_ipsecmb_ESNon_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1385 """ipsecmb ESNon ARon NONE/SHA1-96 IPSec test"""
1386 def test_ipsec(self):
1387 """ipsecmb ESNon ARon NONE/SHA1-96 IPSec test"""
1388 self.run_test()
1389
1390
1391class Test_ipsecmb_ESNon_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1392 """ipsecmb ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
1393 def test_ipsec(self):
1394 """ipsecmb ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
1395 self.run_test()
1396
1397
1398class Test_ipsecmb_ESNon_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1399 """ipsecmb ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
1400 def test_ipsec(self):
1401 """ipsecmb ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
1402 self.run_test()
1403
1404
1405class Test_ipsecmb_ESNon_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1406 """ipsecmb ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
1407 def test_ipsec(self):
1408 """ipsecmb ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
1409 self.run_test()
1410
1411
1412class Test_ipsecmb_ESNon_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1413 """ipsecmb ESNon ARoff AES-GCM-128/NONE IPSec test"""
1414 def test_ipsec(self):
1415 """ipsecmb ESNon ARoff AES-GCM-128/NONE IPSec test"""
1416 self.run_test()
1417
1418
1419class Test_ipsecmb_ESNon_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1420 """ipsecmb ESNon ARoff AES-GCM-192/NONE IPSec test"""
1421 def test_ipsec(self):
1422 """ipsecmb ESNon ARoff AES-GCM-192/NONE IPSec test"""
1423 self.run_test()
1424
1425
1426class Test_ipsecmb_ESNon_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1427 """ipsecmb ESNon ARoff AES-GCM-256/NONE IPSec test"""
1428 def test_ipsec(self):
1429 """ipsecmb ESNon ARoff AES-GCM-256/NONE IPSec test"""
1430 self.run_test()
1431
1432
1433class Test_ipsecmb_ESNon_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1434 """ipsecmb ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
1435 def test_ipsec(self):
1436 """ipsecmb ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
1437 self.run_test()
1438
1439
1440class Test_ipsecmb_ESNon_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1441 """ipsecmb ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
1442 def test_ipsec(self):
1443 """ipsecmb ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
1444 self.run_test()
1445
1446
1447class Test_ipsecmb_ESNon_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1448 """ipsecmb ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
1449 def test_ipsec(self):
1450 """ipsecmb ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
1451 self.run_test()
1452
1453
1454class Test_ipsecmb_ESNon_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1455 """ipsecmb ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
1456 def test_ipsec(self):
1457 """ipsecmb ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
1458 self.run_test()
1459
1460
1461class Test_ipsecmb_ESNon_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1462 """ipsecmb ESNon ARoff NONE/SHA1-96 IPSec test"""
1463 def test_ipsec(self):
1464 """ipsecmb ESNon ARoff NONE/SHA1-96 IPSec test"""
1465 self.run_test()
1466
1467
1468class Test_ipsecmb_ESNon_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1469 """ipsecmb ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
1470 def test_ipsec(self):
1471 """ipsecmb ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
1472 self.run_test()
1473
1474
1475class Test_ipsecmb_ESNon_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1476 """ipsecmb ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
1477 def test_ipsec(self):
1478 """ipsecmb ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
1479 self.run_test()
1480
1481
1482class Test_ipsecmb_ESNon_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1483 """ipsecmb ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
1484 def test_ipsec(self):
1485 """ipsecmb ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
1486 self.run_test()
1487
1488
1489class Test_ipsecmb_ESNoff_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1490 """ipsecmb ESNoff ARon AES-GCM-128/NONE IPSec test"""
1491 def test_ipsec(self):
1492 """ipsecmb ESNoff ARon AES-GCM-128/NONE IPSec test"""
1493 self.run_test()
1494
1495
1496class Test_ipsecmb_ESNoff_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1497 """ipsecmb ESNoff ARon AES-GCM-192/NONE IPSec test"""
1498 def test_ipsec(self):
1499 """ipsecmb ESNoff ARon AES-GCM-192/NONE IPSec test"""
1500 self.run_test()
1501
1502
1503class Test_ipsecmb_ESNoff_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1504 """ipsecmb ESNoff ARon AES-GCM-256/NONE IPSec test"""
1505 def test_ipsec(self):
1506 """ipsecmb ESNoff ARon AES-GCM-256/NONE IPSec test"""
1507 self.run_test()
1508
1509
1510class Test_ipsecmb_ESNoff_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1511 """ipsecmb ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
1512 def test_ipsec(self):
1513 """ipsecmb ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
1514 self.run_test()
1515
1516
1517class Test_ipsecmb_ESNoff_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1518 """ipsecmb ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
1519 def test_ipsec(self):
1520 """ipsecmb ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
1521 self.run_test()
1522
1523
1524class Test_ipsecmb_ESNoff_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1525 """ipsecmb ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
1526 def test_ipsec(self):
1527 """ipsecmb ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
1528 self.run_test()
1529
1530
1531class Test_ipsecmb_ESNoff_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1532 """ipsecmb ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
1533 def test_ipsec(self):
1534 """ipsecmb ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
1535 self.run_test()
1536
1537
1538class Test_ipsecmb_ESNoff_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1539 """ipsecmb ESNoff ARon NONE/SHA1-96 IPSec test"""
1540 def test_ipsec(self):
1541 """ipsecmb ESNoff ARon NONE/SHA1-96 IPSec test"""
1542 self.run_test()
1543
1544
1545class Test_ipsecmb_ESNoff_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1546 """ipsecmb ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
1547 def test_ipsec(self):
1548 """ipsecmb ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
1549 self.run_test()
1550
1551
1552class Test_ipsecmb_ESNoff_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1553 """ipsecmb ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
1554 def test_ipsec(self):
1555 """ipsecmb ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
1556 self.run_test()
Neale Ranns4f33c802019-04-10 12:39:10 +00001557
Neale Ranns4f33c802019-04-10 12:39:10 +00001558
Neale Ranns5b891102021-06-28 13:31:28 +00001559class Test_ipsecmb_ESNoff_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1560 """ipsecmb ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001561 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001562 """ipsecmb ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001563 self.run_test()
Neale Ranns4f33c802019-04-10 12:39:10 +00001564
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001565
Neale Ranns5b891102021-06-28 13:31:28 +00001566class Test_ipsecmb_ESNoff_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1567 """ipsecmb ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001568 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001569 """ipsecmb ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001570 self.run_test()
1571
1572
Neale Ranns5b891102021-06-28 13:31:28 +00001573class Test_ipsecmb_ESNoff_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1574 """ipsecmb ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001575 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001576 """ipsecmb ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001577 self.run_test()
1578
1579
Neale Ranns5b891102021-06-28 13:31:28 +00001580class Test_ipsecmb_ESNoff_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1581 """ipsecmb ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001582 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001583 """ipsecmb ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001584 self.run_test()
1585
1586
Neale Ranns5b891102021-06-28 13:31:28 +00001587class Test_ipsecmb_ESNoff_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1588 """ipsecmb ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001589 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001590 """ipsecmb ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001591 self.run_test()
1592
1593
Neale Ranns5b891102021-06-28 13:31:28 +00001594class Test_ipsecmb_ESNoff_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1595 """ipsecmb ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001596 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001597 """ipsecmb ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001598 self.run_test()
1599
1600
Neale Ranns5b891102021-06-28 13:31:28 +00001601class Test_ipsecmb_ESNoff_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1602 """ipsecmb ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001603 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001604 """ipsecmb ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001605 self.run_test()
1606
1607
Neale Ranns5b891102021-06-28 13:31:28 +00001608class Test_ipsecmb_ESNoff_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1609 """ipsecmb ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001610 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001611 """ipsecmb ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001612 self.run_test()
1613
1614
Neale Ranns5b891102021-06-28 13:31:28 +00001615class Test_ipsecmb_ESNoff_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1616 """ipsecmb ESNoff ARoff NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001617 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001618 """ipsecmb ESNoff ARoff NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001619 self.run_test()
1620
1621
Neale Ranns5b891102021-06-28 13:31:28 +00001622class Test_ipsecmb_ESNoff_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1623 """ipsecmb ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001624 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001625 """ipsecmb ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001626 self.run_test()
1627
1628
Neale Ranns5b891102021-06-28 13:31:28 +00001629class Test_ipsecmb_ESNoff_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1630 """ipsecmb ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001631 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001632 """ipsecmb ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001633 self.run_test()
1634
1635
Neale Ranns5b891102021-06-28 13:31:28 +00001636class Test_ipsecmb_ESNoff_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1637 """ipsecmb ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001638 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001639 """ipsecmb ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001640 self.run_test()
1641
1642
Neale Ranns5b891102021-06-28 13:31:28 +00001643class Test_openssl_ESNon_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1644 """openssl ESNon ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001645 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001646 """openssl ESNon ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001647 self.run_test()
1648
1649
Neale Ranns5b891102021-06-28 13:31:28 +00001650class Test_openssl_ESNon_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1651 """openssl ESNon ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001652 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001653 """openssl ESNon ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001654 self.run_test()
1655
1656
Neale Ranns5b891102021-06-28 13:31:28 +00001657class Test_openssl_ESNon_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1658 """openssl ESNon ARon AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001659 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001660 """openssl ESNon ARon AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001661 self.run_test()
1662
1663
Neale Ranns5b891102021-06-28 13:31:28 +00001664class Test_openssl_ESNon_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1665 """openssl ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001666 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001667 """openssl ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001668 self.run_test()
1669
1670
Neale Ranns5b891102021-06-28 13:31:28 +00001671class Test_openssl_ESNon_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1672 """openssl ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001673 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001674 """openssl ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001675 self.run_test()
1676
1677
Neale Ranns5b891102021-06-28 13:31:28 +00001678class Test_openssl_ESNon_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1679 """openssl ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001680 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001681 """openssl ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001682 self.run_test()
1683
1684
Neale Ranns5b891102021-06-28 13:31:28 +00001685class Test_openssl_ESNon_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1686 """openssl ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001687 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001688 """openssl ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001689 self.run_test()
1690
1691
Neale Ranns5b891102021-06-28 13:31:28 +00001692class Test_openssl_ESNon_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1693 """openssl ESNon ARon NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001694 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001695 """openssl ESNon ARon NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001696 self.run_test()
1697
1698
Neale Ranns5b891102021-06-28 13:31:28 +00001699class Test_openssl_ESNon_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1700 """openssl ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001701 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001702 """openssl ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001703 self.run_test()
1704
1705
Neale Ranns5b891102021-06-28 13:31:28 +00001706class Test_openssl_ESNon_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1707 """openssl ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001708 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001709 """openssl ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001710 self.run_test()
1711
1712
Neale Ranns5b891102021-06-28 13:31:28 +00001713class Test_openssl_ESNon_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1714 """openssl ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001715 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001716 """openssl ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001717 self.run_test()
1718
1719
Neale Ranns5b891102021-06-28 13:31:28 +00001720class Test_openssl_ESNon_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1721 """openssl ESNon ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001722 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001723 """openssl ESNon ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001724 self.run_test()
1725
1726
Neale Ranns5b891102021-06-28 13:31:28 +00001727class Test_openssl_ESNon_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1728 """openssl ESNon ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001729 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001730 """openssl ESNon ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001731 self.run_test()
1732
1733
Neale Ranns5b891102021-06-28 13:31:28 +00001734class Test_openssl_ESNon_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1735 """openssl ESNon ARoff AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001736 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001737 """openssl ESNon ARoff AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001738 self.run_test()
1739
1740
Neale Ranns5b891102021-06-28 13:31:28 +00001741class Test_openssl_ESNon_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1742 """openssl ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001743 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001744 """openssl ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001745 self.run_test()
1746
1747
Neale Ranns5b891102021-06-28 13:31:28 +00001748class Test_openssl_ESNon_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1749 """openssl ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001750 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001751 """openssl ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001752 self.run_test()
1753
1754
Neale Ranns5b891102021-06-28 13:31:28 +00001755class Test_openssl_ESNon_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1756 """openssl ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001757 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001758 """openssl ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001759 self.run_test()
1760
1761
Neale Ranns5b891102021-06-28 13:31:28 +00001762class Test_openssl_ESNon_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1763 """openssl ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001764 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001765 """openssl ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001766 self.run_test()
1767
1768
Neale Ranns5b891102021-06-28 13:31:28 +00001769class Test_openssl_ESNon_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1770 """openssl ESNon ARoff NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001771 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001772 """openssl ESNon ARoff NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001773 self.run_test()
1774
1775
Neale Ranns5b891102021-06-28 13:31:28 +00001776class Test_openssl_ESNon_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1777 """openssl ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001778 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001779 """openssl ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001780 self.run_test()
1781
1782
Neale Ranns5b891102021-06-28 13:31:28 +00001783class Test_openssl_ESNon_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1784 """openssl ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001785 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001786 """openssl ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001787 self.run_test()
1788
1789
Neale Ranns5b891102021-06-28 13:31:28 +00001790class Test_openssl_ESNon_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1791 """openssl ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001792 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001793 """openssl ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001794 self.run_test()
1795
1796
Neale Ranns5b891102021-06-28 13:31:28 +00001797class Test_openssl_ESNoff_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1798 """openssl ESNoff ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001799 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001800 """openssl ESNoff ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001801 self.run_test()
1802
1803
Neale Ranns5b891102021-06-28 13:31:28 +00001804class Test_openssl_ESNoff_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1805 """openssl ESNoff ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001806 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001807 """openssl ESNoff ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001808 self.run_test()
1809
1810
Neale Ranns5b891102021-06-28 13:31:28 +00001811class Test_openssl_ESNoff_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1812 """openssl ESNoff ARon AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001813 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001814 """openssl ESNoff ARon AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001815 self.run_test()
1816
1817
Neale Ranns5b891102021-06-28 13:31:28 +00001818class Test_openssl_ESNoff_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1819 """openssl ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001820 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001821 """openssl ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001822 self.run_test()
1823
1824
Neale Ranns5b891102021-06-28 13:31:28 +00001825class Test_openssl_ESNoff_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1826 """openssl ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001827 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001828 """openssl ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001829 self.run_test()
1830
1831
Neale Ranns5b891102021-06-28 13:31:28 +00001832class Test_openssl_ESNoff_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1833 """openssl ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001834 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001835 """openssl ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001836 self.run_test()
1837
1838
Neale Ranns5b891102021-06-28 13:31:28 +00001839class Test_openssl_ESNoff_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1840 """openssl ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001841 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001842 """openssl ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001843 self.run_test()
1844
1845
Neale Ranns5b891102021-06-28 13:31:28 +00001846class Test_openssl_ESNoff_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1847 """openssl ESNoff ARon NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001848 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001849 """openssl ESNoff ARon NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001850 self.run_test()
1851
1852
Neale Ranns5b891102021-06-28 13:31:28 +00001853class Test_openssl_ESNoff_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1854 """openssl ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001855 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001856 """openssl ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001857 self.run_test()
1858
1859
Neale Ranns5b891102021-06-28 13:31:28 +00001860class Test_openssl_ESNoff_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1861 """openssl ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001862 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001863 """openssl ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001864 self.run_test()
1865
1866
Neale Ranns5b891102021-06-28 13:31:28 +00001867class Test_openssl_ESNoff_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1868 """openssl ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001869 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001870 """openssl ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001871 self.run_test()
1872
1873
Neale Ranns5b891102021-06-28 13:31:28 +00001874class Test_openssl_ESNoff_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1875 """openssl ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001876 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001877 """openssl ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001878 self.run_test()
1879
1880
Neale Ranns5b891102021-06-28 13:31:28 +00001881class Test_openssl_ESNoff_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1882 """openssl ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001883 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001884 """openssl ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001885 self.run_test()
1886
1887
Neale Ranns5b891102021-06-28 13:31:28 +00001888class Test_openssl_ESNoff_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1889 """openssl ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001890 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001891 """openssl ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001892 self.run_test()
1893
1894
Neale Ranns5b891102021-06-28 13:31:28 +00001895class Test_openssl_ESNoff_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1896 """openssl ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001897 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001898 """openssl ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001899 self.run_test()
1900
1901
Neale Ranns5b891102021-06-28 13:31:28 +00001902class Test_openssl_ESNoff_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1903 """openssl ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001904 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001905 """openssl ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001906 self.run_test()
1907
1908
Neale Ranns5b891102021-06-28 13:31:28 +00001909class Test_openssl_ESNoff_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1910 """openssl ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001911 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001912 """openssl ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001913 self.run_test()
1914
1915
Neale Ranns5b891102021-06-28 13:31:28 +00001916class Test_openssl_ESNoff_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1917 """openssl ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001918 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001919 """openssl ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001920 self.run_test()
1921
1922
Neale Ranns5b891102021-06-28 13:31:28 +00001923class Test_openssl_ESNoff_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1924 """openssl ESNoff ARoff NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001925 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001926 """openssl ESNoff ARoff NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001927 self.run_test()
1928
1929
Neale Ranns5b891102021-06-28 13:31:28 +00001930class Test_openssl_ESNoff_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1931 """openssl ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001932 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001933 """openssl ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001934 self.run_test()
1935
1936
Neale Ranns5b891102021-06-28 13:31:28 +00001937class Test_openssl_ESNoff_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1938 """openssl ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001939 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001940 """openssl ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001941 self.run_test()
1942
1943
Neale Ranns5b891102021-06-28 13:31:28 +00001944class Test_openssl_ESNoff_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1945 """openssl ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001946 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001947 """openssl ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001948 self.run_test()
1949
1950
Neale Ranns5b891102021-06-28 13:31:28 +00001951class Test_async_ESNon_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1952 """async ESNon ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001953 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001954 """async ESNon ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001955 self.run_test()
1956
1957
Neale Ranns5b891102021-06-28 13:31:28 +00001958class Test_async_ESNon_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1959 """async ESNon ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001960 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001961 """async ESNon ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001962 self.run_test()
1963
1964
Neale Ranns5b891102021-06-28 13:31:28 +00001965class Test_async_ESNon_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1966 """async ESNon ARon AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001967 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001968 """async ESNon ARon AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001969 self.run_test()
1970
1971
Neale Ranns5b891102021-06-28 13:31:28 +00001972class Test_async_ESNon_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1973 """async ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001974 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001975 """async ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001976 self.run_test()
1977
1978
Neale Ranns5b891102021-06-28 13:31:28 +00001979class Test_async_ESNon_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1980 """async ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001981 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001982 """async ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001983 self.run_test()
1984
1985
Neale Ranns5b891102021-06-28 13:31:28 +00001986class Test_async_ESNon_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1987 """async ESNon ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001988 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001989 """async ESNon ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001990 self.run_test()
1991
1992
Neale Ranns5b891102021-06-28 13:31:28 +00001993class Test_async_ESNon_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1994 """async ESNon ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001995 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001996 """async ESNon ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001997 self.run_test()
Neale Ranns6afaae12019-07-17 15:07:14 +00001998
Neale Ranns4f33c802019-04-10 12:39:10 +00001999
Neale Ranns5b891102021-06-28 13:31:28 +00002000class Test_async_ESNon_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
2001 """async ESNon ARoff AES-GCM-256/NONE IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002002 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002003 """async ESNon ARoff AES-GCM-256/NONE IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002004 self.run_test()
2005
2006
Neale Ranns5b891102021-06-28 13:31:28 +00002007class Test_async_ESNon_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
2008 """async ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002009 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002010 """async ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002011 self.run_test()
2012
2013
Neale Ranns5b891102021-06-28 13:31:28 +00002014class Test_async_ESNon_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
2015 """async ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002016 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002017 """async ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002018 self.run_test()
2019
2020
Neale Ranns5b891102021-06-28 13:31:28 +00002021class Test_async_ESNoff_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
2022 """async ESNoff ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002023 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002024 """async ESNoff ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002025 self.run_test()
2026
2027
Neale Ranns5b891102021-06-28 13:31:28 +00002028class Test_async_ESNoff_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
2029 """async ESNoff ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002030 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002031 """async ESNoff ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002032 self.run_test()
2033
2034
Neale Ranns5b891102021-06-28 13:31:28 +00002035class Test_async_ESNoff_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
2036 """async ESNoff ARon AES-GCM-256/NONE IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002037 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002038 """async ESNoff ARon AES-GCM-256/NONE IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002039 self.run_test()
2040
2041
Neale Ranns5b891102021-06-28 13:31:28 +00002042class Test_async_ESNoff_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
2043 """async ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002044 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002045 """async ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002046 self.run_test()
2047
2048
Neale Ranns5b891102021-06-28 13:31:28 +00002049class Test_async_ESNoff_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
2050 """async ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002051 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002052 """async ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002053 self.run_test()
2054
2055
Neale Ranns5b891102021-06-28 13:31:28 +00002056class Test_async_ESNoff_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
2057 """async ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002058 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002059 """async ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002060 self.run_test()
2061
2062
Neale Ranns5b891102021-06-28 13:31:28 +00002063class Test_async_ESNoff_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
2064 """async ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002065 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002066 """async ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002067 self.run_test()
2068
2069
Neale Ranns5b891102021-06-28 13:31:28 +00002070class Test_async_ESNoff_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
2071 """async ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002072 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002073 """async ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002074 self.run_test()
2075
2076
Neale Ranns5b891102021-06-28 13:31:28 +00002077class Test_async_ESNoff_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
2078 """async ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002079 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002080 """async ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002081 self.run_test()
2082
2083
Neale Ranns5b891102021-06-28 13:31:28 +00002084class Test_async_ESNoff_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
2085 """async ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002086 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002087 """async ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002088 self.run_test()