blob: 4e1957d8b539e85ecebc370c8de5a9ad97dd4151 [file] [log] [blame]
“mystarrocks”23f0c452017-12-11 07:11:51 -08001import socket
Klement Sekera31da2e32018-06-24 22:49:55 +02002from scapy.layers.ipsec import ESP
Christian Hoppsfb7e7ed2019-11-03 07:02:15 -05003from scapy.layers.inet import IP, ICMP, UDP
Neale Ranns041add72020-01-02 04:06:10 +00004from scapy.layers.inet6 import IPv6
5from scapy.layers.l2 import Ether
6from scapy.packet import Raw
“mystarrocks”23f0c452017-12-11 07:11:51 -08007
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02008from template_ipsec import (
9 IpsecTra46Tests,
10 IpsecTun46Tests,
11 TemplateIpsec,
12 IpsecTcpTests,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020013 IpsecTra4Tests,
14 config_tra_params,
15 config_tun_params,
16 IPsecIPv4Params,
17 IPsecIPv6Params,
18 IpsecTra4,
19 IpsecTun4,
20 IpsecTra6,
21 IpsecTun6,
22 IpsecTun6HandoffTests,
23 IpsecTun4HandoffTests,
24 IpsecTra6ExtTests,
25)
26from vpp_ipsec import VppIpsecSpd, VppIpsecSpdEntry, VppIpsecSA, VppIpsecSpdItfBinding
Neale Ranns311124e2019-01-24 04:52:25 -080027from vpp_ip_route import VppIpRoute, VppRoutePath
28from vpp_ip import DpoProto
Neale Ranns17dcec02019-01-09 21:22:20 -080029from vpp_papi import VppEnum
“mystarrocks”23f0c452017-12-11 07:11:51 -080030
Neale Rannsc87b66c2019-02-07 07:26:12 -080031NUM_PKTS = 67
Benoît Ganne5c481ff2021-03-08 10:22:51 +010032engines_supporting_chain_bufs = ["openssl", "async"]
Neale Rannsf16e9a52021-02-25 19:09:24 +000033engines = ["ia32", "ipsecmb", "openssl"]
Neale Rannsc87b66c2019-02-07 07:26:12 -080034
“mystarrocks”23f0c452017-12-11 07:11:51 -080035
Neale Ranns4f33c802019-04-10 12:39:10 +000036class ConfigIpsecESP(TemplateIpsec):
37 encryption_type = ESP
38 tra4_encrypt_node_name = "esp4-encrypt"
Neale Ranns8c609af2021-02-25 10:05:32 +000039 tra4_decrypt_node_name = ["esp4-decrypt", "esp4-decrypt-post"]
Neale Ranns4f33c802019-04-10 12:39:10 +000040 tra6_encrypt_node_name = "esp6-encrypt"
Neale Ranns8c609af2021-02-25 10:05:32 +000041 tra6_decrypt_node_name = ["esp6-decrypt", "esp6-decrypt-post"]
Neale Ranns4f33c802019-04-10 12:39:10 +000042 tun4_encrypt_node_name = "esp4-encrypt"
Neale Ranns8c609af2021-02-25 10:05:32 +000043 tun4_decrypt_node_name = ["esp4-decrypt", "esp4-decrypt-post"]
Neale Ranns4f33c802019-04-10 12:39:10 +000044 tun6_encrypt_node_name = "esp6-encrypt"
Neale Ranns8c609af2021-02-25 10:05:32 +000045 tun6_decrypt_node_name = ["esp6-decrypt", "esp6-decrypt-post"]
Neale Ranns53f526b2019-02-25 14:32:02 +000046
Neale Ranns4f33c802019-04-10 12:39:10 +000047 @classmethod
48 def setUpClass(cls):
49 super(ConfigIpsecESP, cls).setUpClass()
Neale Ranns53f526b2019-02-25 14:32:02 +000050
Neale Ranns4f33c802019-04-10 12:39:10 +000051 @classmethod
52 def tearDownClass(cls):
53 super(ConfigIpsecESP, cls).tearDownClass()
Neale Ranns53f526b2019-02-25 14:32:02 +000054
Neale Ranns4f33c802019-04-10 12:39:10 +000055 def setUp(self):
56 super(ConfigIpsecESP, self).setUp()
Neale Ranns53f526b2019-02-25 14:32:02 +000057
Neale Ranns4f33c802019-04-10 12:39:10 +000058 def tearDown(self):
59 super(ConfigIpsecESP, self).tearDown()
60
Maxime Peim0e2f1882022-12-22 11:26:57 +000061 def config_anti_replay(self, params, anti_replay_window_size=64):
Neale Ranns5b891102021-06-28 13:31:28 +000062 saf = VppEnum.vl_api_ipsec_sad_flags_t
63 for p in params:
64 p.flags |= saf.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY
Maxime Peim0e2f1882022-12-22 11:26:57 +000065 p.anti_replay_window_size = anti_replay_window_size
Neale Ranns5b891102021-06-28 13:31:28 +000066
Neale Ranns4f33c802019-04-10 12:39:10 +000067 def config_network(self, params):
68 self.net_objs = []
69 self.tun_if = self.pg0
70 self.tra_if = self.pg2
71 self.logger.info(self.vapi.ppcli("show int addr"))
72
73 self.tra_spd = VppIpsecSpd(self, self.tra_spd_id)
74 self.tra_spd.add_vpp_config()
75 self.net_objs.append(self.tra_spd)
76 self.tun_spd = VppIpsecSpd(self, self.tun_spd_id)
77 self.tun_spd.add_vpp_config()
78 self.net_objs.append(self.tun_spd)
79
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020080 b = VppIpsecSpdItfBinding(self, self.tun_spd, self.tun_if)
Neale Ranns4f33c802019-04-10 12:39:10 +000081 b.add_vpp_config()
82 self.net_objs.append(b)
83
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020084 b = VppIpsecSpdItfBinding(self, self.tra_spd, self.tra_if)
Neale Ranns4f33c802019-04-10 12:39:10 +000085 b.add_vpp_config()
86 self.net_objs.append(b)
87
88 for p in params:
89 self.config_esp_tra(p)
90 config_tra_params(p, self.encryption_type)
91 for p in params:
92 self.config_esp_tun(p)
Neale Ranns12989b52019-09-26 16:20:19 +000093 config_tun_params(p, self.encryption_type, self.tun_if)
Neale Ranns4f33c802019-04-10 12:39:10 +000094
95 for p in params:
96 d = DpoProto.DPO_PROTO_IP6 if p.is_ipv6 else DpoProto.DPO_PROTO_IP4
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020097 r = VppIpRoute(
98 self,
99 p.remote_tun_if_host,
100 p.addr_len,
101 [
102 VppRoutePath(
103 self.tun_if.remote_addr[p.addr_type], 0xFFFFFFFF, proto=d
104 )
105 ],
106 )
Neale Ranns4f33c802019-04-10 12:39:10 +0000107 r.add_vpp_config()
108 self.net_objs.append(r)
109
110 self.logger.info(self.vapi.ppcli("show ipsec all"))
111
112 def unconfig_network(self):
113 for o in reversed(self.net_objs):
114 o.remove_vpp_config()
115 self.net_objs = []
116
117 def config_esp_tun(self, params):
118 addr_type = params.addr_type
119 scapy_tun_sa_id = params.scapy_tun_sa_id
120 scapy_tun_spi = params.scapy_tun_spi
121 vpp_tun_sa_id = params.vpp_tun_sa_id
122 vpp_tun_spi = params.vpp_tun_spi
123 auth_algo_vpp_id = params.auth_algo_vpp_id
124 auth_key = params.auth_key
125 crypt_algo_vpp_id = params.crypt_algo_vpp_id
126 crypt_key = params.crypt_key
127 remote_tun_if_host = params.remote_tun_if_host
128 addr_any = params.addr_any
129 addr_bcast = params.addr_bcast
130 e = VppEnum.vl_api_ipsec_spd_action_t
Neale Ranns49e7ef62019-04-10 17:24:29 +0000131 flags = params.flags
Neale Ranns041add72020-01-02 04:06:10 +0000132 tun_flags = params.tun_flags
Neale Ranns80f6fd52019-04-16 02:41:34 +0000133 salt = params.salt
Maxime Peim0e2f1882022-12-22 11:26:57 +0000134 anti_replay_window_size = params.anti_replay_window_size
Neale Ranns4f33c802019-04-10 12:39:10 +0000135 objs = []
136
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200137 params.tun_sa_in = VppIpsecSA(
138 self,
139 scapy_tun_sa_id,
140 scapy_tun_spi,
141 auth_algo_vpp_id,
142 auth_key,
143 crypt_algo_vpp_id,
144 crypt_key,
145 self.vpp_esp_protocol,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200146 self.tun_if.remote_addr[addr_type],
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100147 self.tun_if.local_addr[addr_type],
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200148 tun_flags=tun_flags,
149 dscp=params.dscp,
150 flags=flags,
151 salt=salt,
152 hop_limit=params.outer_hop_limit,
Maxime Peim0e2f1882022-12-22 11:26:57 +0000153 anti_replay_window_size=anti_replay_window_size,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200154 )
155 params.tun_sa_out = VppIpsecSA(
156 self,
157 vpp_tun_sa_id,
158 vpp_tun_spi,
159 auth_algo_vpp_id,
160 auth_key,
161 crypt_algo_vpp_id,
162 crypt_key,
163 self.vpp_esp_protocol,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200164 self.tun_if.local_addr[addr_type],
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100165 self.tun_if.remote_addr[addr_type],
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200166 tun_flags=tun_flags,
167 dscp=params.dscp,
168 flags=flags,
169 salt=salt,
170 hop_limit=params.outer_hop_limit,
Maxime Peim0e2f1882022-12-22 11:26:57 +0000171 anti_replay_window_size=anti_replay_window_size,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200172 )
Neale Ranns4f33c802019-04-10 12:39:10 +0000173 objs.append(params.tun_sa_in)
174 objs.append(params.tun_sa_out)
175
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200176 params.spd_policy_in_any = VppIpsecSpdEntry(
177 self,
178 self.tun_spd,
179 scapy_tun_sa_id,
180 addr_any,
181 addr_bcast,
182 addr_any,
183 addr_bcast,
184 socket.IPPROTO_ESP,
185 )
186 params.spd_policy_out_any = VppIpsecSpdEntry(
187 self,
188 self.tun_spd,
189 scapy_tun_sa_id,
190 addr_any,
191 addr_bcast,
192 addr_any,
193 addr_bcast,
194 socket.IPPROTO_ESP,
195 is_outbound=0,
196 )
Neale Ranns4f33c802019-04-10 12:39:10 +0000197 objs.append(params.spd_policy_out_any)
198 objs.append(params.spd_policy_in_any)
199
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200200 objs.append(
201 VppIpsecSpdEntry(
202 self,
203 self.tun_spd,
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100204 scapy_tun_sa_id,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200205 remote_tun_if_host,
206 remote_tun_if_host,
207 self.pg1.remote_addr[addr_type],
208 self.pg1.remote_addr[addr_type],
Piotr Bronowski815c6a42022-06-09 09:09:28 +0000209 socket.IPPROTO_RAW,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200210 priority=10,
211 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
212 is_outbound=0,
213 )
214 )
215 objs.append(
216 VppIpsecSpdEntry(
217 self,
218 self.tun_spd,
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100219 vpp_tun_sa_id,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200220 self.pg1.remote_addr[addr_type],
221 self.pg1.remote_addr[addr_type],
222 remote_tun_if_host,
223 remote_tun_if_host,
Piotr Bronowski815c6a42022-06-09 09:09:28 +0000224 socket.IPPROTO_RAW,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200225 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
226 priority=10,
227 )
228 )
229 objs.append(
230 VppIpsecSpdEntry(
231 self,
232 self.tun_spd,
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100233 scapy_tun_sa_id,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200234 remote_tun_if_host,
235 remote_tun_if_host,
236 self.pg0.local_addr[addr_type],
237 self.pg0.local_addr[addr_type],
Piotr Bronowski815c6a42022-06-09 09:09:28 +0000238 socket.IPPROTO_RAW,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200239 priority=20,
240 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
241 is_outbound=0,
242 )
243 )
244 objs.append(
245 VppIpsecSpdEntry(
246 self,
247 self.tun_spd,
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100248 vpp_tun_sa_id,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200249 self.pg0.local_addr[addr_type],
250 self.pg0.local_addr[addr_type],
251 remote_tun_if_host,
252 remote_tun_if_host,
Piotr Bronowski815c6a42022-06-09 09:09:28 +0000253 socket.IPPROTO_RAW,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200254 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
255 priority=20,
256 )
257 )
Neale Ranns4f33c802019-04-10 12:39:10 +0000258 for o in objs:
259 o.add_vpp_config()
260 self.net_objs = self.net_objs + objs
261
262 def config_esp_tra(self, params):
263 addr_type = params.addr_type
264 scapy_tra_sa_id = params.scapy_tra_sa_id
265 scapy_tra_spi = params.scapy_tra_spi
266 vpp_tra_sa_id = params.vpp_tra_sa_id
267 vpp_tra_spi = params.vpp_tra_spi
268 auth_algo_vpp_id = params.auth_algo_vpp_id
269 auth_key = params.auth_key
270 crypt_algo_vpp_id = params.crypt_algo_vpp_id
271 crypt_key = params.crypt_key
272 addr_any = params.addr_any
273 addr_bcast = params.addr_bcast
Neale Ranns4f33c802019-04-10 12:39:10 +0000274 e = VppEnum.vl_api_ipsec_spd_action_t
Neale Ranns5b891102021-06-28 13:31:28 +0000275 flags = params.flags
Neale Ranns80f6fd52019-04-16 02:41:34 +0000276 salt = params.salt
Maxime Peim0e2f1882022-12-22 11:26:57 +0000277 anti_replay_window_size = params.anti_replay_window_size
Neale Ranns4f33c802019-04-10 12:39:10 +0000278 objs = []
279
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200280 params.tra_sa_in = VppIpsecSA(
281 self,
282 scapy_tra_sa_id,
283 scapy_tra_spi,
284 auth_algo_vpp_id,
285 auth_key,
286 crypt_algo_vpp_id,
287 crypt_key,
288 self.vpp_esp_protocol,
289 flags=flags,
290 salt=salt,
Maxime Peim0e2f1882022-12-22 11:26:57 +0000291 anti_replay_window_size=anti_replay_window_size,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200292 )
293 params.tra_sa_out = VppIpsecSA(
294 self,
295 vpp_tra_sa_id,
296 vpp_tra_spi,
297 auth_algo_vpp_id,
298 auth_key,
299 crypt_algo_vpp_id,
300 crypt_key,
301 self.vpp_esp_protocol,
302 flags=flags,
303 salt=salt,
Maxime Peim0e2f1882022-12-22 11:26:57 +0000304 anti_replay_window_size=anti_replay_window_size,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200305 )
Neale Ranns4f33c802019-04-10 12:39:10 +0000306 objs.append(params.tra_sa_in)
307 objs.append(params.tra_sa_out)
308
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200309 objs.append(
310 VppIpsecSpdEntry(
311 self,
312 self.tra_spd,
313 vpp_tra_sa_id,
314 addr_any,
315 addr_bcast,
316 addr_any,
317 addr_bcast,
318 socket.IPPROTO_ESP,
319 )
320 )
321 objs.append(
322 VppIpsecSpdEntry(
323 self,
324 self.tra_spd,
325 vpp_tra_sa_id,
326 addr_any,
327 addr_bcast,
328 addr_any,
329 addr_bcast,
330 socket.IPPROTO_ESP,
331 is_outbound=0,
332 )
333 )
334 objs.append(
335 VppIpsecSpdEntry(
336 self,
337 self.tra_spd,
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100338 scapy_tra_sa_id,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200339 self.tra_if.local_addr[addr_type],
340 self.tra_if.local_addr[addr_type],
341 self.tra_if.remote_addr[addr_type],
342 self.tra_if.remote_addr[addr_type],
Piotr Bronowski815c6a42022-06-09 09:09:28 +0000343 socket.IPPROTO_RAW,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200344 priority=10,
345 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
346 is_outbound=0,
347 )
348 )
349 objs.append(
350 VppIpsecSpdEntry(
351 self,
352 self.tra_spd,
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100353 vpp_tra_sa_id,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200354 self.tra_if.local_addr[addr_type],
355 self.tra_if.local_addr[addr_type],
356 self.tra_if.remote_addr[addr_type],
357 self.tra_if.remote_addr[addr_type],
Piotr Bronowski815c6a42022-06-09 09:09:28 +0000358 socket.IPPROTO_RAW,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200359 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
360 priority=10,
361 )
362 )
Neale Ranns4f33c802019-04-10 12:39:10 +0000363 for o in objs:
364 o.add_vpp_config()
365 self.net_objs = self.net_objs + objs
Neale Ranns53f526b2019-02-25 14:32:02 +0000366
367
Neale Ranns4f33c802019-04-10 12:39:10 +0000368class TemplateIpsecEsp(ConfigIpsecESP):
“mystarrocks”23f0c452017-12-11 07:11:51 -0800369 """
370 Basic test for ipsec esp sanity - tunnel and transport modes.
371
372 Below 4 cases are covered as part of this test
Dave Wallaced1706812021-08-12 18:36:02 -0400373
374 #. ipsec esp v4 transport basic test - IPv4 Transport mode
Paul Vinciguerra8feeaff2019-03-27 11:25:48 -0700375 scenario using HMAC-SHA1-96 integrity algo
Dave Wallaced1706812021-08-12 18:36:02 -0400376
377 #. ipsec esp v4 transport burst test
“mystarrocks”23f0c452017-12-11 07:11:51 -0800378 Above test for 257 pkts
379
Dave Wallaced1706812021-08-12 18:36:02 -0400380 #. ipsec esp 4o4 tunnel basic test - IPv4 Tunnel mode
381 scenario using HMAC-SHA1-96 integrity algo
“mystarrocks”23f0c452017-12-11 07:11:51 -0800382
Dave Wallaced1706812021-08-12 18:36:02 -0400383 #. ipsec esp 4o4 tunnel burst test
384 Above test for 257 pkts
“mystarrocks”23f0c452017-12-11 07:11:51 -0800385
Dave Wallaced1706812021-08-12 18:36:02 -0400386 TRANSPORT MODE::
“mystarrocks”23f0c452017-12-11 07:11:51 -0800387
Dave Wallaced1706812021-08-12 18:36:02 -0400388 --- encrypt ---
389 |pg2| <-------> |VPP|
390 --- decrypt ---
“mystarrocks”23f0c452017-12-11 07:11:51 -0800391
Dave Wallaced1706812021-08-12 18:36:02 -0400392 TUNNEL MODE::
393
394 --- encrypt --- plain ---
395 |pg0| <------- |VPP| <------ |pg1|
396 --- --- ---
397
398 --- decrypt --- plain ---
399 |pg0| -------> |VPP| ------> |pg1|
400 --- --- ---
401
“mystarrocks”23f0c452017-12-11 07:11:51 -0800402 """
403
Paul Vinciguerra7f9b7f92019-03-12 19:23:27 -0700404 @classmethod
405 def setUpClass(cls):
406 super(TemplateIpsecEsp, cls).setUpClass()
407
408 @classmethod
409 def tearDownClass(cls):
410 super(TemplateIpsecEsp, cls).tearDownClass()
411
Neale Ranns8e4a89b2019-01-23 08:16:17 -0800412 def setUp(self):
413 super(TemplateIpsecEsp, self).setUp()
Neale Ranns5b891102021-06-28 13:31:28 +0000414 self.config_anti_replay(self.params.values())
Neale Ranns4f33c802019-04-10 12:39:10 +0000415 self.config_network(self.params.values())
Klement Sekera611864f2018-09-26 11:19:00 +0200416
Neale Ranns8e4a89b2019-01-23 08:16:17 -0800417 def tearDown(self):
Neale Ranns4f33c802019-04-10 12:39:10 +0000418 self.unconfig_network()
Neale Ranns8e4a89b2019-01-23 08:16:17 -0800419 super(TemplateIpsecEsp, self).tearDown()
Neale Ranns8e4a89b2019-01-23 08:16:17 -0800420
Klement Sekera611864f2018-09-26 11:19:00 +0200421
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200422class TestIpsecEsp1(
423 TemplateIpsecEsp, IpsecTra46Tests, IpsecTun46Tests, IpsecTra6ExtTests
424):
425 """Ipsec ESP - TUN & TRA tests"""
Neale Rannsb1fd80f2020-05-12 13:33:56 +0000426
427 @classmethod
428 def setUpClass(cls):
429 super(TestIpsecEsp1, cls).setUpClass()
430
431 @classmethod
432 def tearDownClass(cls):
433 super(TestIpsecEsp1, cls).tearDownClass()
434
435 def setUp(self):
436 super(TestIpsecEsp1, self).setUp()
437
438 def tearDown(self):
439 super(TestIpsecEsp1, self).tearDown()
440
441 def test_tun_46(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200442 """ipsec 4o6 tunnel"""
Neale Rannsb1fd80f2020-05-12 13:33:56 +0000443 # add an SPD entry to direct 2.2.2.2 to the v6 tunnel SA
444 p6 = self.ipv6_params
445 p4 = self.ipv4_params
446
447 p6.remote_tun_if_host4 = "2.2.2.2"
448 e = VppEnum.vl_api_ipsec_spd_action_t
449
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200450 VppIpsecSpdEntry(
451 self,
452 self.tun_spd,
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100453 p6.vpp_tun_sa_id,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200454 self.pg1.remote_addr[p4.addr_type],
455 self.pg1.remote_addr[p4.addr_type],
456 p6.remote_tun_if_host4,
457 p6.remote_tun_if_host4,
Piotr Bronowski815c6a42022-06-09 09:09:28 +0000458 socket.IPPROTO_RAW,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200459 priority=10,
460 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
461 is_outbound=1,
462 ).add_vpp_config()
463 VppIpRoute(
464 self,
465 p6.remote_tun_if_host4,
466 p4.addr_len,
467 [VppRoutePath(self.tun_if.remote_addr[p4.addr_type], 0xFFFFFFFF)],
468 ).add_vpp_config()
Neale Rannsb1fd80f2020-05-12 13:33:56 +0000469
470 old_name = self.tun6_encrypt_node_name
471 self.tun6_encrypt_node_name = "esp4-encrypt"
472
473 self.verify_tun_46(p6, count=63)
474 self.tun6_encrypt_node_name = old_name
475
476 def test_tun_64(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200477 """ipsec 6o4 tunnel"""
Neale Rannsb1fd80f2020-05-12 13:33:56 +0000478 # add an SPD entry to direct 4444::4 to the v4 tunnel SA
479 p6 = self.ipv6_params
480 p4 = self.ipv4_params
481
482 p4.remote_tun_if_host6 = "4444::4"
483 e = VppEnum.vl_api_ipsec_spd_action_t
484
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200485 VppIpsecSpdEntry(
486 self,
487 self.tun_spd,
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100488 p4.vpp_tun_sa_id,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200489 self.pg1.remote_addr[p6.addr_type],
490 self.pg1.remote_addr[p6.addr_type],
491 p4.remote_tun_if_host6,
492 p4.remote_tun_if_host6,
Piotr Bronowski815c6a42022-06-09 09:09:28 +0000493 socket.IPPROTO_RAW,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200494 priority=10,
495 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
496 is_outbound=1,
497 ).add_vpp_config()
Neale Rannsb1fd80f2020-05-12 13:33:56 +0000498 d = DpoProto.DPO_PROTO_IP6
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200499 VppIpRoute(
500 self,
501 p4.remote_tun_if_host6,
502 p6.addr_len,
503 [VppRoutePath(self.tun_if.remote_addr[p6.addr_type], 0xFFFFFFFF, proto=d)],
504 ).add_vpp_config()
Neale Rannsb1fd80f2020-05-12 13:33:56 +0000505
506 old_name = self.tun4_encrypt_node_name
507 self.tun4_encrypt_node_name = "esp6-encrypt"
508 self.verify_tun_64(p4, count=63)
509 self.tun4_encrypt_node_name = old_name
“mystarrocks”23f0c452017-12-11 07:11:51 -0800510
“mystarrocks”23f0c452017-12-11 07:11:51 -0800511
Neale Ranns041add72020-01-02 04:06:10 +0000512class TestIpsecEspTun(TemplateIpsecEsp, IpsecTun46Tests):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200513 """Ipsec ESP - TUN encap tests"""
Neale Ranns041add72020-01-02 04:06:10 +0000514
515 def setUp(self):
516 self.ipv4_params = IPsecIPv4Params()
517 self.ipv6_params = IPsecIPv6Params()
518
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200519 c = (
520 VppEnum.vl_api_tunnel_encap_decap_flags_t.TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_COPY_DSCP
521 )
522 c1 = c | (
523 VppEnum.vl_api_tunnel_encap_decap_flags_t.TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_COPY_ECN
524 )
Neale Ranns041add72020-01-02 04:06:10 +0000525
526 self.ipv4_params.tun_flags = c
527 self.ipv6_params.tun_flags = c1
528
529 super(TestIpsecEspTun, self).setUp()
530
531 def gen_pkts(self, sw_intf, src, dst, count=1, payload_size=54):
532 # set the DSCP + ECN - flags are set to copy only DSCP
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200533 return [
534 Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac)
535 / IP(src=src, dst=dst, tos=5)
536 / UDP(sport=4444, dport=4444)
537 / Raw(b"X" * payload_size)
538 for i in range(count)
539 ]
Neale Ranns041add72020-01-02 04:06:10 +0000540
Neale Ranns9ec846c2021-02-09 14:04:02 +0000541 def gen_pkts6(self, p, sw_intf, src, dst, count=1, payload_size=54):
Neale Ranns041add72020-01-02 04:06:10 +0000542 # set the DSCP + ECN - flags are set to copy both
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200543 return [
544 Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac)
545 / IPv6(src=src, dst=dst, tc=5)
546 / UDP(sport=4444, dport=4444)
547 / Raw(b"X" * payload_size)
548 for i in range(count)
549 ]
Neale Ranns041add72020-01-02 04:06:10 +0000550
551 def verify_encrypted(self, p, sa, rxs):
552 # just check that only the DSCP is copied
553 for rx in rxs:
554 self.assertEqual(rx[IP].tos, 4)
555
556 def verify_encrypted6(self, p, sa, rxs):
557 # just check that the DSCP & ECN are copied
558 for rx in rxs:
559 self.assertEqual(rx[IPv6].tc, 5)
560
561
562class TestIpsecEspTun2(TemplateIpsecEsp, IpsecTun46Tests):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200563 """Ipsec ESP - TUN DSCP tests"""
Neale Ranns041add72020-01-02 04:06:10 +0000564
565 def setUp(self):
566 self.ipv4_params = IPsecIPv4Params()
567 self.ipv6_params = IPsecIPv6Params()
568
569 self.ipv4_params.dscp = VppEnum.vl_api_ip_dscp_t.IP_API_DSCP_EF
570 self.ipv6_params.dscp = VppEnum.vl_api_ip_dscp_t.IP_API_DSCP_AF11
571
572 super(TestIpsecEspTun2, self).setUp()
573
574 def gen_pkts(self, sw_intf, src, dst, count=1, payload_size=54):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200575 return [
576 Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac)
577 / IP(src=src, dst=dst)
578 / UDP(sport=4444, dport=4444)
579 / Raw(b"X" * payload_size)
580 for i in range(count)
581 ]
Neale Ranns041add72020-01-02 04:06:10 +0000582
Neale Ranns9ec846c2021-02-09 14:04:02 +0000583 def gen_pkts6(self, p, sw_intf, src, dst, count=1, payload_size=54):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200584 return [
585 Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac)
586 / IPv6(src=src, dst=dst)
587 / UDP(sport=4444, dport=4444)
588 / Raw(b"X" * payload_size)
589 for i in range(count)
590 ]
Neale Ranns041add72020-01-02 04:06:10 +0000591
592 def verify_encrypted(self, p, sa, rxs):
Neale Ranns9ec846c2021-02-09 14:04:02 +0000593 # just check that only the DSCP is set
Neale Ranns041add72020-01-02 04:06:10 +0000594 for rx in rxs:
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200595 self.assertEqual(rx[IP].tos, VppEnum.vl_api_ip_dscp_t.IP_API_DSCP_EF << 2)
Neale Ranns041add72020-01-02 04:06:10 +0000596
597 def verify_encrypted6(self, p, sa, rxs):
Neale Ranns9ec846c2021-02-09 14:04:02 +0000598 # just check that the DSCP is set
Neale Ranns041add72020-01-02 04:06:10 +0000599 for rx in rxs:
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200600 self.assertEqual(
601 rx[IPv6].tc, VppEnum.vl_api_ip_dscp_t.IP_API_DSCP_AF11 << 2
602 )
Neale Ranns041add72020-01-02 04:06:10 +0000603
604
Klement Sekera31da2e32018-06-24 22:49:55 +0200605class TestIpsecEsp2(TemplateIpsecEsp, IpsecTcpTests):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200606 """Ipsec ESP - TCP tests"""
607
Klement Sekera31da2e32018-06-24 22:49:55 +0200608 pass
“mystarrocks”23f0c452017-12-11 07:11:51 -0800609
610
Neale Rannsfc811342021-02-26 10:35:33 +0000611class TestIpsecEspAsync(TemplateIpsecEsp):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200612 """Ipsec ESP - Aysnc tests"""
Neale Rannsfc811342021-02-26 10:35:33 +0000613
Klement Sekera8d815022021-03-15 16:58:10 +0100614 vpp_worker_count = 2
Neale Rannsfc811342021-02-26 10:35:33 +0000615
616 def setUp(self):
617 super(TestIpsecEspAsync, self).setUp()
618
Neale Rannsf16e9a52021-02-25 19:09:24 +0000619 self.p_sync = IPsecIPv4Params()
Neale Rannsfc811342021-02-26 10:35:33 +0000620
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200621 self.p_sync.crypt_algo_vpp_id = (
622 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_CBC_256
623 )
624 self.p_sync.crypt_algo = "AES-CBC" # scapy name
625 self.p_sync.crypt_key = b"JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h"
Neale Rannsfc811342021-02-26 10:35:33 +0000626
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200627 self.p_sync.scapy_tun_sa_id += 0xF0000
628 self.p_sync.scapy_tun_spi += 0xF0000
629 self.p_sync.vpp_tun_sa_id += 0xF0000
630 self.p_sync.vpp_tun_spi += 0xF0000
Neale Rannsf16e9a52021-02-25 19:09:24 +0000631 self.p_sync.remote_tun_if_host = "2.2.2.2"
Neale Rannsfc811342021-02-26 10:35:33 +0000632 e = VppEnum.vl_api_ipsec_spd_action_t
633
Neale Rannsf16e9a52021-02-25 19:09:24 +0000634 self.p_sync.sa = VppIpsecSA(
Neale Rannsfc811342021-02-26 10:35:33 +0000635 self,
Neale Rannsf16e9a52021-02-25 19:09:24 +0000636 self.p_sync.vpp_tun_sa_id,
637 self.p_sync.vpp_tun_spi,
638 self.p_sync.auth_algo_vpp_id,
639 self.p_sync.auth_key,
640 self.p_sync.crypt_algo_vpp_id,
641 self.p_sync.crypt_key,
Neale Rannsfc811342021-02-26 10:35:33 +0000642 self.vpp_esp_protocol,
Neale Rannsf16e9a52021-02-25 19:09:24 +0000643 self.tun_if.local_addr[self.p_sync.addr_type],
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200644 self.tun_if.remote_addr[self.p_sync.addr_type],
645 ).add_vpp_config()
Neale Rannsf16e9a52021-02-25 19:09:24 +0000646 self.p_sync.spd = VppIpsecSpdEntry(
Neale Rannsfc811342021-02-26 10:35:33 +0000647 self,
648 self.tun_spd,
Neale Rannsf16e9a52021-02-25 19:09:24 +0000649 self.p_sync.vpp_tun_sa_id,
650 self.pg1.remote_addr[self.p_sync.addr_type],
651 self.pg1.remote_addr[self.p_sync.addr_type],
652 self.p_sync.remote_tun_if_host,
653 self.p_sync.remote_tun_if_host,
Piotr Bronowski815c6a42022-06-09 09:09:28 +0000654 socket.IPPROTO_RAW,
Neale Rannsfc811342021-02-26 10:35:33 +0000655 priority=1,
656 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200657 is_outbound=1,
658 ).add_vpp_config()
659 VppIpRoute(
660 self,
661 self.p_sync.remote_tun_if_host,
662 self.p_sync.addr_len,
663 [VppRoutePath(self.tun_if.remote_addr[self.p_sync.addr_type], 0xFFFFFFFF)],
664 ).add_vpp_config()
Neale Rannsf16e9a52021-02-25 19:09:24 +0000665 config_tun_params(self.p_sync, self.encryption_type, self.tun_if)
666
667 self.p_async = IPsecIPv4Params()
668
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200669 self.p_async.crypt_algo_vpp_id = (
670 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_GCM_256
671 )
672 self.p_async.auth_algo_vpp_id = (
673 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_NONE
674 )
675 self.p_async.crypt_algo = "AES-GCM" # scapy name
676 self.p_async.crypt_key = b"JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h"
677 self.p_async.auth_algo = "NULL"
Neale Rannsf16e9a52021-02-25 19:09:24 +0000678
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200679 self.p_async.scapy_tun_sa_id += 0xE0000
680 self.p_async.scapy_tun_spi += 0xE0000
681 self.p_async.vpp_tun_sa_id += 0xE0000
682 self.p_async.vpp_tun_spi += 0xE0000
Neale Rannsf16e9a52021-02-25 19:09:24 +0000683 self.p_async.remote_tun_if_host = "2.2.2.3"
684
685 iflags = VppEnum.vl_api_ipsec_sad_flags_t
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200686 self.p_async.flags = (
687 iflags.IPSEC_API_SAD_FLAG_USE_ESN
688 | iflags.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY
689 | iflags.IPSEC_API_SAD_FLAG_ASYNC
690 )
Neale Rannsf16e9a52021-02-25 19:09:24 +0000691
692 self.p_async.sa = VppIpsecSA(
693 self,
694 self.p_async.vpp_tun_sa_id,
695 self.p_async.vpp_tun_spi,
696 self.p_async.auth_algo_vpp_id,
697 self.p_async.auth_key,
698 self.p_async.crypt_algo_vpp_id,
699 self.p_async.crypt_key,
700 self.vpp_esp_protocol,
701 self.tun_if.local_addr[self.p_async.addr_type],
702 self.tun_if.remote_addr[self.p_async.addr_type],
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200703 flags=self.p_async.flags,
704 ).add_vpp_config()
Neale Rannsf16e9a52021-02-25 19:09:24 +0000705 self.p_async.spd = VppIpsecSpdEntry(
706 self,
707 self.tun_spd,
708 self.p_async.vpp_tun_sa_id,
709 self.pg1.remote_addr[self.p_async.addr_type],
710 self.pg1.remote_addr[self.p_async.addr_type],
711 self.p_async.remote_tun_if_host,
712 self.p_async.remote_tun_if_host,
Piotr Bronowski815c6a42022-06-09 09:09:28 +0000713 socket.IPPROTO_RAW,
Neale Rannsf16e9a52021-02-25 19:09:24 +0000714 priority=2,
715 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200716 is_outbound=1,
717 ).add_vpp_config()
718 VppIpRoute(
719 self,
720 self.p_async.remote_tun_if_host,
721 self.p_async.addr_len,
722 [VppRoutePath(self.tun_if.remote_addr[self.p_async.addr_type], 0xFFFFFFFF)],
723 ).add_vpp_config()
Neale Rannsf16e9a52021-02-25 19:09:24 +0000724 config_tun_params(self.p_async, self.encryption_type, self.tun_if)
Neale Rannsfc811342021-02-26 10:35:33 +0000725
726 def test_dual_stream(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200727 """Alternating SAs"""
Neale Rannsf16e9a52021-02-25 19:09:24 +0000728 p = self.params[self.p_sync.addr_type]
729 self.vapi.ipsec_set_async_mode(async_enable=True)
Neale Rannsfc811342021-02-26 10:35:33 +0000730
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200731 pkts = [
732 (
733 Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac)
734 / IP(src=self.pg1.remote_ip4, dst=self.p_sync.remote_tun_if_host)
735 / UDP(sport=4444, dport=4444)
736 / Raw(b"0x0" * 200)
737 ),
738 (
739 Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac)
740 / IP(src=self.pg1.remote_ip4, dst=p.remote_tun_if_host)
741 / UDP(sport=4444, dport=4444)
742 / Raw(b"0x0" * 200)
743 ),
744 ]
Neale Rannsfc811342021-02-26 10:35:33 +0000745 pkts *= 1023
746
747 rxs = self.send_and_expect(self.pg1, pkts, self.pg0)
748
749 self.assertEqual(len(rxs), len(pkts))
750
751 for rx in rxs:
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100752 if rx[ESP].spi == p.vpp_tun_spi:
Neale Rannsfc811342021-02-26 10:35:33 +0000753 decrypted = p.vpp_tun_sa.decrypt(rx[IP])
Neale Rannsf16e9a52021-02-25 19:09:24 +0000754 elif rx[ESP].spi == self.p_sync.vpp_tun_spi:
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100755 decrypted = self.p_sync.vpp_tun_sa.decrypt(rx[IP])
Neale Rannsfc811342021-02-26 10:35:33 +0000756 else:
757 rx.show()
758 self.assertTrue(False)
759
Neale Rannsf16e9a52021-02-25 19:09:24 +0000760 self.p_sync.spd.remove_vpp_config()
761 self.p_sync.sa.remove_vpp_config()
762 self.p_async.spd.remove_vpp_config()
763 self.p_async.sa.remove_vpp_config()
764 self.vapi.ipsec_set_async_mode(async_enable=False)
765
766 def test_sync_async_noop_stream(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200767 """Alternating SAs sync/async/noop"""
Neale Rannsf16e9a52021-02-25 19:09:24 +0000768 p = self.params[self.p_sync.addr_type]
769
770 # first pin the default/noop SA to worker 0
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200771 pkts = [
772 (
773 Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac)
774 / IP(src=self.pg1.remote_ip4, dst=p.remote_tun_if_host)
775 / UDP(sport=4444, dport=4444)
776 / Raw(b"0x0" * 200)
777 )
778 ]
Neale Rannsf16e9a52021-02-25 19:09:24 +0000779 rxs = self.send_and_expect(self.pg1, pkts, self.pg0, worker=0)
780
781 self.logger.info(self.vapi.cli("sh ipsec sa"))
782 self.logger.info(self.vapi.cli("sh crypto async status"))
783
784 # then use all the other SAs on worker 1.
785 # some will handoff, other take the sync and async paths
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200786 pkts = [
787 (
788 Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac)
789 / IP(src=self.pg1.remote_ip4, dst=self.p_sync.remote_tun_if_host)
790 / UDP(sport=4444, dport=4444)
791 / Raw(b"0x0" * 200)
792 ),
793 (
794 Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac)
795 / IP(src=self.pg1.remote_ip4, dst=p.remote_tun_if_host)
796 / UDP(sport=4444, dport=4444)
797 / Raw(b"0x0" * 200)
798 ),
799 (
800 Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac)
801 / IP(src=self.pg1.remote_ip4, dst=self.p_async.remote_tun_if_host)
802 / UDP(sport=4444, dport=4444)
803 / Raw(b"0x0" * 200)
804 ),
805 ]
Neale Rannsf16e9a52021-02-25 19:09:24 +0000806 pkts *= 1023
807
808 rxs = self.send_and_expect(self.pg1, pkts, self.pg0, worker=1)
809
810 self.assertEqual(len(rxs), len(pkts))
811
812 for rx in rxs:
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100813 if rx[ESP].spi == p.vpp_tun_spi:
Neale Rannsf16e9a52021-02-25 19:09:24 +0000814 decrypted = p.vpp_tun_sa.decrypt(rx[IP])
815 elif rx[ESP].spi == self.p_sync.vpp_tun_spi:
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100816 decrypted = self.p_sync.vpp_tun_sa.decrypt(rx[IP])
Neale Rannsf16e9a52021-02-25 19:09:24 +0000817 elif rx[ESP].spi == self.p_async.vpp_tun_spi:
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100818 decrypted = self.p_async.vpp_tun_sa.decrypt(rx[IP])
Neale Rannsf16e9a52021-02-25 19:09:24 +0000819 else:
820 rx.show()
821 self.assertTrue(False)
822
823 self.p_sync.spd.remove_vpp_config()
824 self.p_sync.sa.remove_vpp_config()
825 self.p_async.spd.remove_vpp_config()
826 self.p_async.sa.remove_vpp_config()
827
Neale Rannsfc811342021-02-26 10:35:33 +0000828
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200829class TestIpsecEspHandoff(
830 TemplateIpsecEsp, IpsecTun6HandoffTests, IpsecTun4HandoffTests
831):
832 """Ipsec ESP - handoff tests"""
833
Neale Ranns4a56f4e2019-12-23 04:10:25 +0000834 pass
835
836
Neale Ranns4f33c802019-04-10 12:39:10 +0000837class TemplateIpsecEspUdp(ConfigIpsecESP):
Neale Ranns53f526b2019-02-25 14:32:02 +0000838 """
839 UDP encapped ESP
840 """
Paul Vinciguerra7f9b7f92019-03-12 19:23:27 -0700841
842 @classmethod
843 def setUpClass(cls):
844 super(TemplateIpsecEspUdp, cls).setUpClass()
845
846 @classmethod
847 def tearDownClass(cls):
848 super(TemplateIpsecEspUdp, cls).tearDownClass()
849
Neale Ranns53f526b2019-02-25 14:32:02 +0000850 def setUp(self):
851 super(TemplateIpsecEspUdp, self).setUp()
Neale Ranns4f33c802019-04-10 12:39:10 +0000852 self.net_objs = []
Neale Ranns53f526b2019-02-25 14:32:02 +0000853 self.tun_if = self.pg0
854 self.tra_if = self.pg2
855 self.logger.info(self.vapi.ppcli("show int addr"))
856
857 p = self.ipv4_params
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200858 p.flags = (
859 VppEnum.vl_api_ipsec_sad_flags_t.IPSEC_API_SAD_FLAG_UDP_ENCAP
860 | VppEnum.vl_api_ipsec_sad_flags_t.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY
861 )
Neale Ranns53f526b2019-02-25 14:32:02 +0000862 p.nat_header = UDP(sport=5454, dport=4500)
863
864 self.tra_spd = VppIpsecSpd(self, self.tra_spd_id)
865 self.tra_spd.add_vpp_config()
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200866 VppIpsecSpdItfBinding(self, self.tra_spd, self.tra_if).add_vpp_config()
Neale Ranns53f526b2019-02-25 14:32:02 +0000867
Neale Ranns4f33c802019-04-10 12:39:10 +0000868 self.config_esp_tra(p)
Neale Ranns2ac885c2019-03-20 18:24:43 +0000869 config_tra_params(p, self.encryption_type)
Neale Ranns53f526b2019-02-25 14:32:02 +0000870
871 self.tun_spd = VppIpsecSpd(self, self.tun_spd_id)
872 self.tun_spd.add_vpp_config()
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200873 VppIpsecSpdItfBinding(self, self.tun_spd, self.tun_if).add_vpp_config()
Neale Ranns53f526b2019-02-25 14:32:02 +0000874
Neale Ranns4f33c802019-04-10 12:39:10 +0000875 self.config_esp_tun(p)
Neale Ranns92e93842019-04-08 07:36:50 +0000876 self.logger.info(self.vapi.ppcli("show ipsec all"))
Neale Ranns53f526b2019-02-25 14:32:02 +0000877
878 d = DpoProto.DPO_PROTO_IP4
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200879 VppIpRoute(
880 self,
881 p.remote_tun_if_host,
882 p.addr_len,
883 [VppRoutePath(self.tun_if.remote_addr[p.addr_type], 0xFFFFFFFF, proto=d)],
884 ).add_vpp_config()
Neale Ranns53f526b2019-02-25 14:32:02 +0000885
886 def tearDown(self):
887 super(TemplateIpsecEspUdp, self).tearDown()
Paul Vinciguerra90cf21b2019-03-13 09:23:05 -0700888
889 def show_commands_at_teardown(self):
890 self.logger.info(self.vapi.cli("show hardware"))
Neale Ranns53f526b2019-02-25 14:32:02 +0000891
892
Neale Ranns49e7ef62019-04-10 17:24:29 +0000893class TestIpsecEspUdp(TemplateIpsecEspUdp, IpsecTra4Tests):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200894 """Ipsec NAT-T ESP UDP tests"""
895
Neale Ranns53f526b2019-02-25 14:32:02 +0000896 pass
897
898
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200899class MyParameters:
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000900 def __init__(self):
Neale Ranns5b891102021-06-28 13:31:28 +0000901 saf = VppEnum.vl_api_ipsec_sad_flags_t
902 flag_esn = saf.IPSEC_API_SAD_FLAG_USE_ESN
903 flag_ar = saf.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY
904 self.flags = [0, flag_esn, flag_ar]
Neale Ranns4f33c802019-04-10 12:39:10 +0000905 # foreach crypto algorithm
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000906 self.algos = {
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200907 "AES-GCM-128/NONE": {
908 "vpp-crypto": (
909 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_GCM_128
910 ),
911 "vpp-integ": (
912 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_NONE
913 ),
914 "scapy-crypto": "AES-GCM",
915 "scapy-integ": "NULL",
916 "key": b"JPjyOWBeVEQiMe7h",
917 "salt": 0,
918 },
919 "AES-GCM-192/NONE": {
920 "vpp-crypto": (
921 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_GCM_192
922 ),
923 "vpp-integ": (
924 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_NONE
925 ),
926 "scapy-crypto": "AES-GCM",
927 "scapy-integ": "NULL",
928 "key": b"JPjyOWBeVEQiMe7h01234567",
929 "salt": 1010,
930 },
931 "AES-GCM-256/NONE": {
932 "vpp-crypto": (
933 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_GCM_256
934 ),
935 "vpp-integ": (
936 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_NONE
937 ),
938 "scapy-crypto": "AES-GCM",
939 "scapy-integ": "NULL",
940 "key": b"JPjyOWBeVEQiMe7h0123456787654321",
941 "salt": 2020,
942 },
943 "AES-CBC-128/MD5-96": {
944 "vpp-crypto": (
945 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_CBC_128
946 ),
947 "vpp-integ": (
948 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_MD5_96
949 ),
950 "scapy-crypto": "AES-CBC",
951 "scapy-integ": "HMAC-MD5-96",
952 "salt": 0,
953 "key": b"JPjyOWBeVEQiMe7h",
954 },
955 "AES-CBC-192/SHA1-96": {
956 "vpp-crypto": (
957 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_CBC_192
958 ),
959 "vpp-integ": (
960 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_SHA1_96
961 ),
962 "scapy-crypto": "AES-CBC",
963 "scapy-integ": "HMAC-SHA1-96",
964 "salt": 0,
965 "key": b"JPjyOWBeVEQiMe7hJPjyOWBe",
966 },
967 "AES-CBC-256/SHA1-96": {
968 "vpp-crypto": (
969 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_CBC_256
970 ),
971 "vpp-integ": (
972 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_SHA1_96
973 ),
974 "scapy-crypto": "AES-CBC",
975 "scapy-integ": "HMAC-SHA1-96",
976 "salt": 0,
977 "key": b"JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h",
978 },
979 "3DES-CBC/SHA1-96": {
980 "vpp-crypto": (
981 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_3DES_CBC
982 ),
983 "vpp-integ": (
984 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_SHA1_96
985 ),
986 "scapy-crypto": "3DES",
987 "scapy-integ": "HMAC-SHA1-96",
988 "salt": 0,
989 "key": b"JPjyOWBeVEQiMe7h00112233",
990 },
991 "NONE/SHA1-96": {
992 "vpp-crypto": (
993 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_NONE
994 ),
995 "vpp-integ": (
996 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_SHA1_96
997 ),
998 "scapy-crypto": "NULL",
999 "scapy-integ": "HMAC-SHA1-96",
1000 "salt": 0,
1001 "key": b"JPjyOWBeVEQiMe7h00112233",
1002 },
1003 "AES-CTR-128/SHA1-96": {
1004 "vpp-crypto": (
1005 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_CTR_128
1006 ),
1007 "vpp-integ": (
1008 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_SHA1_96
1009 ),
1010 "scapy-crypto": "AES-CTR",
1011 "scapy-integ": "HMAC-SHA1-96",
1012 "salt": 0,
1013 "key": b"JPjyOWBeVEQiMe7h",
1014 },
1015 "AES-CTR-192/SHA1-96": {
1016 "vpp-crypto": (
1017 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_CTR_192
1018 ),
1019 "vpp-integ": (
1020 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_SHA1_96
1021 ),
1022 "scapy-crypto": "AES-CTR",
1023 "scapy-integ": "HMAC-SHA1-96",
1024 "salt": 1010,
1025 "key": b"JPjyOWBeVEQiMe7hJPjyOWBe",
1026 },
1027 "AES-CTR-256/SHA1-96": {
1028 "vpp-crypto": (
1029 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_CTR_256
1030 ),
1031 "vpp-integ": (
1032 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_SHA1_96
1033 ),
1034 "scapy-crypto": "AES-CTR",
1035 "scapy-integ": "HMAC-SHA1-96",
1036 "salt": 2020,
1037 "key": b"JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h",
1038 },
Benoît Ganne84e66582023-03-10 17:33:03 +01001039 "AES-NULL-GMAC-128/NONE": {
1040 "vpp-crypto": (
1041 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_NULL_GMAC_128
1042 ),
1043 "vpp-integ": (
1044 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_NONE
1045 ),
1046 "scapy-crypto": "AES-NULL-GMAC",
1047 "scapy-integ": "NULL",
1048 "key": b"JPjyOWBeVEQiMe7h",
1049 "salt": 0,
1050 },
1051 "AES-NULL-GMAC-192/NONE": {
1052 "vpp-crypto": (
1053 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_NULL_GMAC_192
1054 ),
1055 "vpp-integ": (
1056 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_NONE
1057 ),
1058 "scapy-crypto": "AES-NULL-GMAC",
1059 "scapy-integ": "NULL",
1060 "key": b"JPjyOWBeVEQiMe7h01234567",
1061 "salt": 1010,
1062 },
1063 "AES-NULL-GMAC-256/NONE": {
1064 "vpp-crypto": (
1065 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_NULL_GMAC_256
1066 ),
1067 "vpp-integ": (
1068 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_NONE
1069 ),
1070 "scapy-crypto": "AES-NULL-GMAC",
1071 "scapy-integ": "NULL",
1072 "key": b"JPjyOWBeVEQiMe7h0123456787654321",
1073 "salt": 2020,
1074 },
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001075 }
Neale Ranns4f33c802019-04-10 12:39:10 +00001076
Neale Ranns4f33c802019-04-10 12:39:10 +00001077
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001078class RunTestIpsecEspAll(ConfigIpsecESP, IpsecTra4, IpsecTra6, IpsecTun4, IpsecTun6):
1079 """Ipsec ESP all Algos"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001080
Neale Ranns8c609af2021-02-25 10:05:32 +00001081 @classmethod
1082 def setUpConstants(cls):
1083 test_args = str.split(cls.__doc__, " ")
1084 engine = test_args[0]
1085 if engine == "async":
Klement Sekera8d815022021-03-15 16:58:10 +01001086 cls.vpp_worker_count = 2
Neale Ranns8c609af2021-02-25 10:05:32 +00001087 super(RunTestIpsecEspAll, cls).setUpConstants()
1088
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001089 def setUp(self):
1090 super(RunTestIpsecEspAll, self).setUp()
1091 test_args = str.split(self.__doc__, " ")
1092
1093 params = MyParameters()
1094 self.engine = test_args[0]
1095 self.flag = params.flags[0]
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001096 if test_args[1] == "ESNon":
Neale Ranns5b891102021-06-28 13:31:28 +00001097 self.flag |= params.flags[1]
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001098 if test_args[2] == "ARon":
Neale Ranns5b891102021-06-28 13:31:28 +00001099 self.flag |= params.flags[2]
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001100
Neale Ranns5b891102021-06-28 13:31:28 +00001101 self.algo = params.algos[test_args[3]]
Neale Ranns8c609af2021-02-25 10:05:32 +00001102 self.async_mode = False
1103 if self.engine == "async":
1104 self.async_mode = True
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001105
1106 def tearDown(self):
1107 super(RunTestIpsecEspAll, self).tearDown()
1108
1109 def run_test(self):
1110 self.run_a_test(self.engine, self.flag, self.algo)
1111
Filip Tehlarefcad1a2020-02-04 09:36:04 +00001112 def run_a_test(self, engine, flag, algo, payload_size=None):
Neale Ranns8c609af2021-02-25 10:05:32 +00001113 if self.async_mode:
1114 self.vapi.cli("set ipsec async mode on")
1115 else:
1116 self.vapi.cli("set crypto handler all %s" % engine)
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001117
Neale Ranns8c609af2021-02-25 10:05:32 +00001118 self.logger.info(self.vapi.cli("show crypto async status"))
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001119 self.ipv4_params = IPsecIPv4Params()
1120 self.ipv6_params = IPsecIPv6Params()
1121
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001122 self.params = {
1123 self.ipv4_params.addr_type: self.ipv4_params,
1124 self.ipv6_params.addr_type: self.ipv6_params,
1125 }
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001126
1127 for _, p in self.params.items():
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001128 p.auth_algo_vpp_id = algo["vpp-integ"]
1129 p.crypt_algo_vpp_id = algo["vpp-crypto"]
1130 p.crypt_algo = algo["scapy-crypto"]
1131 p.auth_algo = algo["scapy-integ"]
1132 p.crypt_key = algo["key"]
1133 p.salt = algo["salt"]
Neale Ranns5b891102021-06-28 13:31:28 +00001134 p.flags = flag
Neale Ranns9ec846c2021-02-09 14:04:02 +00001135 p.outer_flow_label = 243224
Neale Ranns8c609af2021-02-25 10:05:32 +00001136 p.async_mode = self.async_mode
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001137
1138 self.reporter.send_keep_alive(self)
1139
Neale Ranns4f33c802019-04-10 12:39:10 +00001140 #
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001141 # configure the SPDs. SAs, etc
Neale Ranns4f33c802019-04-10 12:39:10 +00001142 #
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001143 self.config_network(self.params.values())
Neale Ranns4f33c802019-04-10 12:39:10 +00001144
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001145 #
1146 # run some traffic.
1147 # An exhautsive 4o6, 6o4 is not necessary
1148 # for each algo
1149 #
1150 self.verify_tra_basic6(count=NUM_PKTS)
1151 self.verify_tra_basic4(count=NUM_PKTS)
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001152 self.verify_tun_66(self.params[socket.AF_INET6], count=NUM_PKTS)
Christian Hoppsfb7e7ed2019-11-03 07:02:15 -05001153 #
1154 # Use an odd-byte payload size to check for correct padding.
1155 #
1156 # 49 + 2 == 51 which should pad +1 to 52 for 4 byte alignment, +5
1157 # to 56 for 8 byte alignment, and +13 to 64 for 64 byte alignment.
1158 # This should catch bugs where the code is incorrectly over-padding
1159 # for algorithms that don't require it
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001160 psz = 49 - len(IP() / ICMP()) if payload_size is None else payload_size
1161 self.verify_tun_44(
1162 self.params[socket.AF_INET], count=NUM_PKTS, payload_size=psz
1163 )
Neale Ranns4f33c802019-04-10 12:39:10 +00001164
Filip Tehlarefcad1a2020-02-04 09:36:04 +00001165 LARGE_PKT_SZ = [
Filip Tehlare4e8c6b2020-02-13 07:49:30 +00001166 1970, # results in 2 chained buffers entering decrypt node
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001167 # but leaving as simple buffer due to ICV removal (tra4)
PiotrX Kleskifdca4dd2020-05-05 14:14:22 +02001168 2004, # footer+ICV will be added to 2nd buffer (tun4)
Nathan Skrzypczak2c77ae42021-09-29 15:36:51 +02001169 4010, # ICV ends up splitted across 2 buffers in esp_decrypt
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001170 # for transport4; transport6 takes normal path
Filip Tehlarefcad1a2020-02-04 09:36:04 +00001171 4020, # same as above but tra4 and tra6 are switched
1172 ]
1173 if self.engine in engines_supporting_chain_bufs:
1174 for sz in LARGE_PKT_SZ:
1175 self.verify_tra_basic4(count=NUM_PKTS, payload_size=sz)
1176 self.verify_tra_basic6(count=NUM_PKTS, payload_size=sz)
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001177 self.verify_tun_66(
1178 self.params[socket.AF_INET6], count=NUM_PKTS, payload_size=sz
1179 )
1180 self.verify_tun_44(
1181 self.params[socket.AF_INET], count=NUM_PKTS, payload_size=sz
1182 )
Filip Tehlarefcad1a2020-02-04 09:36:04 +00001183
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001184 #
Neale Ranns5b891102021-06-28 13:31:28 +00001185 # reconfigure the network and SA to run the
1186 # anti replay tests
1187 #
1188 saf = VppEnum.vl_api_ipsec_sad_flags_t
1189 if flag & saf.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY:
Maxime Peim0e2f1882022-12-22 11:26:57 +00001190 for anti_replay_window_size in (
1191 64,
1192 131072,
1193 ):
1194 self.unconfig_network()
1195 self.config_anti_replay(self.params.values(), anti_replay_window_size)
1196 self.config_network(self.params.values())
1197 self.verify_tra_anti_replay()
1198 self.verify_tra_anti_replay_algorithm()
1199 self.config_anti_replay(self.params.values())
Neale Ranns5b891102021-06-28 13:31:28 +00001200
1201 self.unconfig_network()
1202 self.config_network(self.params.values())
1203 self.verify_hi_seq_num()
Neale Rannse11203e2021-09-21 12:34:19 +00001204 self.unconfig_network()
1205 self.config_network(self.params.values())
1206 self.verify_tra_lost()
Neale Ranns5b891102021-06-28 13:31:28 +00001207
1208 #
Neale Rannsf16e9a52021-02-25 19:09:24 +00001209 # swap the handlers while SAs are up
1210 #
Neale Ranns5b891102021-06-28 13:31:28 +00001211 self.unconfig_network()
1212 self.config_network(self.params.values())
Neale Rannsf16e9a52021-02-25 19:09:24 +00001213 for e in engines:
1214 if e != engine:
1215 self.vapi.cli("set crypto handler all %s" % e)
1216 self.verify_tra_basic4(count=NUM_PKTS)
1217
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001218 self.unconfig_network()
juraj.linkes11057662019-07-08 10:22:55 +02001219
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001220
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001221#
1222# To generate test classes, do:
1223# grep '# GEN' test_ipsec_esp.py | sed -e 's/# GEN //g' | bash
1224#
Neale Ranns8c609af2021-02-25 10:05:32 +00001225# GEN for ENG in native ipsecmb openssl; do \
Neale Ranns5b891102021-06-28 13:31:28 +00001226# GEN for ESN in ESNon ESNoff; do for AR in ARon ARoff; do \
1227# GEN for ALG in AES-GCM-128/NONE \
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001228# GEN AES-GCM-192/NONE AES-GCM-256/NONE AES-CBC-128/MD5-96 \
1229# GEN AES-CBC-192/SHA1-96 AES-CBC-256/SHA1-96 \
Benoît Ganne490b9272021-01-22 18:03:09 +01001230# GEN 3DES-CBC/SHA1-96 NONE/SHA1-96 \
Benoît Ganne84e66582023-03-10 17:33:03 +01001231# GEN AES-CTR-128/SHA1-96 AES-CTR-192/SHA1-96 AES-CTR-256/SHA1-96 \
1232# GEN AES-NULL-GMAC-128/NONE AES-NULL-GMAC-192/NONE AES-NULL-GMAC-256/NONE; do \
Neale Ranns5b891102021-06-28 13:31:28 +00001233# GEN echo -en "\n\nclass "
1234# GEN echo -e "Test_${ENG}_${ESN}_${AR}_${ALG}(RunTestIpsecEspAll):" |
1235# GEN sed -e 's/-/_/g' -e 's#/#_#g' ;
1236# GEN echo ' """'$ENG $ESN $AR $ALG IPSec test'"""' ;
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001237# GEN echo " def test_ipsec(self):";
Neale Ranns5b891102021-06-28 13:31:28 +00001238# GEN echo ' """'$ENG $ESN $AR $ALG IPSec test'"""' ;
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001239# GEN echo " self.run_test()";
Neale Ranns5b891102021-06-28 13:31:28 +00001240# GEN done; done; done; done
Neale Ranns8c609af2021-02-25 10:05:32 +00001241#
Neale Ranns5b891102021-06-28 13:31:28 +00001242# GEN for ESN in ESNon ESNoff; do for AR in ARon ARoff; do \
1243# GEN for ALG in \
Neale Ranns8c609af2021-02-25 10:05:32 +00001244# GEN AES-GCM-128/NONE AES-GCM-192/NONE AES-GCM-256/NONE \
1245# GEN AES-CBC-192/SHA1-96 AES-CBC-256/SHA1-96; do \
Neale Ranns5b891102021-06-28 13:31:28 +00001246# GEN echo -en "\n\nclass "
1247# GEN echo -e "Test_async_${ESN}_${AR}_${ALG}(RunTestIpsecEspAll):" |
1248# GEN sed -e 's/-/_/g' -e 's#/#_#g' ;
1249# GEN echo ' """'async $ESN $AR $ALG IPSec test'"""' ;
Neale Ranns8c609af2021-02-25 10:05:32 +00001250# GEN echo " def test_ipsec(self):";
Neale Ranns5b891102021-06-28 13:31:28 +00001251# GEN echo ' """'async $ESN $AR $ALG IPSec test'"""' ;
Neale Ranns8c609af2021-02-25 10:05:32 +00001252# GEN echo " self.run_test()";
Neale Ranns5b891102021-06-28 13:31:28 +00001253# GEN done; done; done;
1254
1255
1256class Test_native_ESNon_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1257 """native ESNon ARon AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001258
Neale Ranns5b891102021-06-28 13:31:28 +00001259 def test_ipsec(self):
1260 """native ESNon ARon AES-GCM-128/NONE IPSec test"""
1261 self.run_test()
1262
1263
1264class Test_native_ESNon_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1265 """native ESNon ARon AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001266
Neale Ranns5b891102021-06-28 13:31:28 +00001267 def test_ipsec(self):
1268 """native ESNon ARon AES-GCM-192/NONE IPSec test"""
1269 self.run_test()
1270
1271
1272class Test_native_ESNon_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1273 """native ESNon ARon AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001274
Neale Ranns5b891102021-06-28 13:31:28 +00001275 def test_ipsec(self):
1276 """native ESNon ARon AES-GCM-256/NONE IPSec test"""
1277 self.run_test()
1278
1279
1280class Test_native_ESNon_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1281 """native ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001282
Neale Ranns5b891102021-06-28 13:31:28 +00001283 def test_ipsec(self):
1284 """native ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
1285 self.run_test()
1286
1287
1288class Test_native_ESNon_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1289 """native ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001290
Neale Ranns5b891102021-06-28 13:31:28 +00001291 def test_ipsec(self):
1292 """native ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
1293 self.run_test()
1294
1295
1296class Test_native_ESNon_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1297 """native ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001298
Neale Ranns5b891102021-06-28 13:31:28 +00001299 def test_ipsec(self):
1300 """native ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
1301 self.run_test()
1302
1303
1304class Test_native_ESNon_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1305 """native ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001306
Neale Ranns5b891102021-06-28 13:31:28 +00001307 def test_ipsec(self):
1308 """native ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
1309 self.run_test()
1310
1311
1312class Test_native_ESNon_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1313 """native ESNon ARon NONE/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001314
Neale Ranns5b891102021-06-28 13:31:28 +00001315 def test_ipsec(self):
1316 """native ESNon ARon NONE/SHA1-96 IPSec test"""
1317 self.run_test()
1318
1319
1320class Test_native_ESNon_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1321 """native ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001322
Neale Ranns5b891102021-06-28 13:31:28 +00001323 def test_ipsec(self):
1324 """native ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
1325 self.run_test()
1326
1327
1328class Test_native_ESNon_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1329 """native ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001330
Neale Ranns5b891102021-06-28 13:31:28 +00001331 def test_ipsec(self):
1332 """native ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
1333 self.run_test()
1334
1335
1336class Test_native_ESNon_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1337 """native ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001338
Neale Ranns5b891102021-06-28 13:31:28 +00001339 def test_ipsec(self):
1340 """native ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
1341 self.run_test()
1342
1343
1344class Test_native_ESNon_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1345 """native ESNon ARoff AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001346
Neale Ranns5b891102021-06-28 13:31:28 +00001347 def test_ipsec(self):
1348 """native ESNon ARoff AES-GCM-128/NONE IPSec test"""
1349 self.run_test()
1350
1351
1352class Test_native_ESNon_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1353 """native ESNon ARoff AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001354
Neale Ranns5b891102021-06-28 13:31:28 +00001355 def test_ipsec(self):
1356 """native ESNon ARoff AES-GCM-192/NONE IPSec test"""
1357 self.run_test()
1358
1359
1360class Test_native_ESNon_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1361 """native ESNon ARoff AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001362
Neale Ranns5b891102021-06-28 13:31:28 +00001363 def test_ipsec(self):
1364 """native ESNon ARoff AES-GCM-256/NONE IPSec test"""
1365 self.run_test()
1366
1367
1368class Test_native_ESNon_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1369 """native ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001370
Neale Ranns5b891102021-06-28 13:31:28 +00001371 def test_ipsec(self):
1372 """native ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
1373 self.run_test()
1374
1375
1376class Test_native_ESNon_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1377 """native ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001378
Neale Ranns5b891102021-06-28 13:31:28 +00001379 def test_ipsec(self):
1380 """native ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
1381 self.run_test()
1382
1383
1384class Test_native_ESNon_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1385 """native ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001386
Neale Ranns5b891102021-06-28 13:31:28 +00001387 def test_ipsec(self):
1388 """native ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
1389 self.run_test()
1390
1391
1392class Test_native_ESNon_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1393 """native ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001394
Neale Ranns5b891102021-06-28 13:31:28 +00001395 def test_ipsec(self):
1396 """native ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
1397 self.run_test()
1398
1399
1400class Test_native_ESNon_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1401 """native ESNon ARoff NONE/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001402
Neale Ranns5b891102021-06-28 13:31:28 +00001403 def test_ipsec(self):
1404 """native ESNon ARoff NONE/SHA1-96 IPSec test"""
1405 self.run_test()
1406
1407
1408class Test_native_ESNon_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1409 """native ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001410
Neale Ranns5b891102021-06-28 13:31:28 +00001411 def test_ipsec(self):
1412 """native ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
1413 self.run_test()
1414
1415
1416class Test_native_ESNon_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1417 """native ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001418
Neale Ranns5b891102021-06-28 13:31:28 +00001419 def test_ipsec(self):
1420 """native ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
1421 self.run_test()
1422
1423
1424class Test_native_ESNon_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1425 """native ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001426
Neale Ranns5b891102021-06-28 13:31:28 +00001427 def test_ipsec(self):
1428 """native ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
1429 self.run_test()
1430
1431
1432class Test_native_ESNoff_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1433 """native ESNoff ARon AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001434
Neale Ranns5b891102021-06-28 13:31:28 +00001435 def test_ipsec(self):
1436 """native ESNoff ARon AES-GCM-128/NONE IPSec test"""
1437 self.run_test()
1438
1439
1440class Test_native_ESNoff_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1441 """native ESNoff ARon AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001442
Neale Ranns5b891102021-06-28 13:31:28 +00001443 def test_ipsec(self):
1444 """native ESNoff ARon AES-GCM-192/NONE IPSec test"""
1445 self.run_test()
1446
1447
1448class Test_native_ESNoff_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1449 """native ESNoff ARon AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001450
Neale Ranns5b891102021-06-28 13:31:28 +00001451 def test_ipsec(self):
1452 """native ESNoff ARon AES-GCM-256/NONE IPSec test"""
1453 self.run_test()
1454
1455
1456class Test_native_ESNoff_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1457 """native ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001458
Neale Ranns5b891102021-06-28 13:31:28 +00001459 def test_ipsec(self):
1460 """native ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
1461 self.run_test()
1462
1463
1464class Test_native_ESNoff_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1465 """native ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001466
Neale Ranns5b891102021-06-28 13:31:28 +00001467 def test_ipsec(self):
1468 """native ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
1469 self.run_test()
1470
1471
1472class Test_native_ESNoff_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1473 """native ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001474
Neale Ranns5b891102021-06-28 13:31:28 +00001475 def test_ipsec(self):
1476 """native ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
1477 self.run_test()
1478
1479
1480class Test_native_ESNoff_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1481 """native ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001482
Neale Ranns5b891102021-06-28 13:31:28 +00001483 def test_ipsec(self):
1484 """native ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
1485 self.run_test()
1486
1487
1488class Test_native_ESNoff_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1489 """native ESNoff ARon NONE/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001490
Neale Ranns5b891102021-06-28 13:31:28 +00001491 def test_ipsec(self):
1492 """native ESNoff ARon NONE/SHA1-96 IPSec test"""
1493 self.run_test()
1494
1495
1496class Test_native_ESNoff_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1497 """native ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001498
Neale Ranns5b891102021-06-28 13:31:28 +00001499 def test_ipsec(self):
1500 """native ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
1501 self.run_test()
1502
1503
1504class Test_native_ESNoff_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1505 """native ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001506
Neale Ranns5b891102021-06-28 13:31:28 +00001507 def test_ipsec(self):
1508 """native ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
1509 self.run_test()
1510
1511
1512class Test_native_ESNoff_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1513 """native ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001514
Neale Ranns5b891102021-06-28 13:31:28 +00001515 def test_ipsec(self):
1516 """native ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
1517 self.run_test()
1518
1519
1520class Test_native_ESNoff_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1521 """native ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001522
Neale Ranns5b891102021-06-28 13:31:28 +00001523 def test_ipsec(self):
1524 """native ESNoff ARoff AES-GCM-128/NONE IPSec test"""
1525 self.run_test()
1526
1527
1528class Test_native_ESNoff_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1529 """native ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001530
Neale Ranns5b891102021-06-28 13:31:28 +00001531 def test_ipsec(self):
1532 """native ESNoff ARoff AES-GCM-192/NONE IPSec test"""
1533 self.run_test()
1534
1535
1536class Test_native_ESNoff_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1537 """native ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001538
Neale Ranns5b891102021-06-28 13:31:28 +00001539 def test_ipsec(self):
1540 """native ESNoff ARoff AES-GCM-256/NONE IPSec test"""
1541 self.run_test()
1542
1543
1544class Test_native_ESNoff_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1545 """native ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001546
Neale Ranns5b891102021-06-28 13:31:28 +00001547 def test_ipsec(self):
1548 """native ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
1549 self.run_test()
1550
1551
1552class Test_native_ESNoff_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1553 """native ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001554
Neale Ranns5b891102021-06-28 13:31:28 +00001555 def test_ipsec(self):
1556 """native ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
1557 self.run_test()
1558
1559
1560class Test_native_ESNoff_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1561 """native ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001562
Neale Ranns5b891102021-06-28 13:31:28 +00001563 def test_ipsec(self):
1564 """native ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
1565 self.run_test()
1566
1567
1568class Test_native_ESNoff_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1569 """native ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001570
Neale Ranns5b891102021-06-28 13:31:28 +00001571 def test_ipsec(self):
1572 """native ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
1573 self.run_test()
1574
1575
1576class Test_native_ESNoff_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1577 """native ESNoff ARoff NONE/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001578
Neale Ranns5b891102021-06-28 13:31:28 +00001579 def test_ipsec(self):
1580 """native ESNoff ARoff NONE/SHA1-96 IPSec test"""
1581 self.run_test()
1582
1583
1584class Test_native_ESNoff_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1585 """native ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001586
Neale Ranns5b891102021-06-28 13:31:28 +00001587 def test_ipsec(self):
1588 """native ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
1589 self.run_test()
1590
1591
1592class Test_native_ESNoff_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1593 """native ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001594
Neale Ranns5b891102021-06-28 13:31:28 +00001595 def test_ipsec(self):
1596 """native ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
1597 self.run_test()
1598
1599
1600class Test_native_ESNoff_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1601 """native ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001602
Neale Ranns5b891102021-06-28 13:31:28 +00001603 def test_ipsec(self):
1604 """native ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
1605 self.run_test()
1606
1607
1608class Test_ipsecmb_ESNon_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1609 """ipsecmb ESNon ARon AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001610
Neale Ranns5b891102021-06-28 13:31:28 +00001611 def test_ipsec(self):
1612 """ipsecmb ESNon ARon AES-GCM-128/NONE IPSec test"""
1613 self.run_test()
1614
1615
1616class Test_ipsecmb_ESNon_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1617 """ipsecmb ESNon ARon AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001618
Neale Ranns5b891102021-06-28 13:31:28 +00001619 def test_ipsec(self):
1620 """ipsecmb ESNon ARon AES-GCM-192/NONE IPSec test"""
1621 self.run_test()
1622
1623
1624class Test_ipsecmb_ESNon_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1625 """ipsecmb ESNon ARon AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001626
Neale Ranns5b891102021-06-28 13:31:28 +00001627 def test_ipsec(self):
1628 """ipsecmb ESNon ARon AES-GCM-256/NONE IPSec test"""
1629 self.run_test()
1630
1631
1632class Test_ipsecmb_ESNon_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1633 """ipsecmb ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001634
Neale Ranns5b891102021-06-28 13:31:28 +00001635 def test_ipsec(self):
1636 """ipsecmb ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
1637 self.run_test()
1638
1639
1640class Test_ipsecmb_ESNon_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1641 """ipsecmb ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001642
Neale Ranns5b891102021-06-28 13:31:28 +00001643 def test_ipsec(self):
1644 """ipsecmb ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
1645 self.run_test()
1646
1647
1648class Test_ipsecmb_ESNon_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1649 """ipsecmb ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001650
Neale Ranns5b891102021-06-28 13:31:28 +00001651 def test_ipsec(self):
1652 """ipsecmb ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
1653 self.run_test()
1654
1655
1656class Test_ipsecmb_ESNon_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1657 """ipsecmb ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001658
Neale Ranns5b891102021-06-28 13:31:28 +00001659 def test_ipsec(self):
1660 """ipsecmb ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
1661 self.run_test()
1662
1663
1664class Test_ipsecmb_ESNon_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1665 """ipsecmb ESNon ARon NONE/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001666
Neale Ranns5b891102021-06-28 13:31:28 +00001667 def test_ipsec(self):
1668 """ipsecmb ESNon ARon NONE/SHA1-96 IPSec test"""
1669 self.run_test()
1670
1671
1672class Test_ipsecmb_ESNon_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1673 """ipsecmb ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001674
Neale Ranns5b891102021-06-28 13:31:28 +00001675 def test_ipsec(self):
1676 """ipsecmb ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
1677 self.run_test()
1678
1679
1680class Test_ipsecmb_ESNon_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1681 """ipsecmb ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001682
Neale Ranns5b891102021-06-28 13:31:28 +00001683 def test_ipsec(self):
1684 """ipsecmb ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
1685 self.run_test()
1686
1687
1688class Test_ipsecmb_ESNon_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1689 """ipsecmb ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001690
Neale Ranns5b891102021-06-28 13:31:28 +00001691 def test_ipsec(self):
1692 """ipsecmb ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
1693 self.run_test()
1694
1695
1696class Test_ipsecmb_ESNon_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1697 """ipsecmb ESNon ARoff AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001698
Neale Ranns5b891102021-06-28 13:31:28 +00001699 def test_ipsec(self):
1700 """ipsecmb ESNon ARoff AES-GCM-128/NONE IPSec test"""
1701 self.run_test()
1702
1703
1704class Test_ipsecmb_ESNon_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1705 """ipsecmb ESNon ARoff AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001706
Neale Ranns5b891102021-06-28 13:31:28 +00001707 def test_ipsec(self):
1708 """ipsecmb ESNon ARoff AES-GCM-192/NONE IPSec test"""
1709 self.run_test()
1710
1711
1712class Test_ipsecmb_ESNon_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1713 """ipsecmb ESNon ARoff AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001714
Neale Ranns5b891102021-06-28 13:31:28 +00001715 def test_ipsec(self):
1716 """ipsecmb ESNon ARoff AES-GCM-256/NONE IPSec test"""
1717 self.run_test()
1718
1719
1720class Test_ipsecmb_ESNon_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1721 """ipsecmb ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001722
Neale Ranns5b891102021-06-28 13:31:28 +00001723 def test_ipsec(self):
1724 """ipsecmb ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
1725 self.run_test()
1726
1727
1728class Test_ipsecmb_ESNon_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1729 """ipsecmb ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001730
Neale Ranns5b891102021-06-28 13:31:28 +00001731 def test_ipsec(self):
1732 """ipsecmb ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
1733 self.run_test()
1734
1735
1736class Test_ipsecmb_ESNon_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1737 """ipsecmb ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001738
Neale Ranns5b891102021-06-28 13:31:28 +00001739 def test_ipsec(self):
1740 """ipsecmb ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
1741 self.run_test()
1742
1743
1744class Test_ipsecmb_ESNon_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1745 """ipsecmb ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001746
Neale Ranns5b891102021-06-28 13:31:28 +00001747 def test_ipsec(self):
1748 """ipsecmb ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
1749 self.run_test()
1750
1751
1752class Test_ipsecmb_ESNon_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1753 """ipsecmb ESNon ARoff NONE/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001754
Neale Ranns5b891102021-06-28 13:31:28 +00001755 def test_ipsec(self):
1756 """ipsecmb ESNon ARoff NONE/SHA1-96 IPSec test"""
1757 self.run_test()
1758
1759
1760class Test_ipsecmb_ESNon_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1761 """ipsecmb ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001762
Neale Ranns5b891102021-06-28 13:31:28 +00001763 def test_ipsec(self):
1764 """ipsecmb ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
1765 self.run_test()
1766
1767
1768class Test_ipsecmb_ESNon_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1769 """ipsecmb ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001770
Neale Ranns5b891102021-06-28 13:31:28 +00001771 def test_ipsec(self):
1772 """ipsecmb ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
1773 self.run_test()
1774
1775
1776class Test_ipsecmb_ESNon_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1777 """ipsecmb ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001778
Neale Ranns5b891102021-06-28 13:31:28 +00001779 def test_ipsec(self):
1780 """ipsecmb ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
1781 self.run_test()
1782
1783
1784class Test_ipsecmb_ESNoff_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1785 """ipsecmb ESNoff ARon AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001786
Neale Ranns5b891102021-06-28 13:31:28 +00001787 def test_ipsec(self):
1788 """ipsecmb ESNoff ARon AES-GCM-128/NONE IPSec test"""
1789 self.run_test()
1790
1791
1792class Test_ipsecmb_ESNoff_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1793 """ipsecmb ESNoff ARon AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001794
Neale Ranns5b891102021-06-28 13:31:28 +00001795 def test_ipsec(self):
1796 """ipsecmb ESNoff ARon AES-GCM-192/NONE IPSec test"""
1797 self.run_test()
1798
1799
1800class Test_ipsecmb_ESNoff_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1801 """ipsecmb ESNoff ARon AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001802
Neale Ranns5b891102021-06-28 13:31:28 +00001803 def test_ipsec(self):
1804 """ipsecmb ESNoff ARon AES-GCM-256/NONE IPSec test"""
1805 self.run_test()
1806
1807
1808class Test_ipsecmb_ESNoff_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1809 """ipsecmb ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001810
Neale Ranns5b891102021-06-28 13:31:28 +00001811 def test_ipsec(self):
1812 """ipsecmb ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
1813 self.run_test()
1814
1815
1816class Test_ipsecmb_ESNoff_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1817 """ipsecmb ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001818
Neale Ranns5b891102021-06-28 13:31:28 +00001819 def test_ipsec(self):
1820 """ipsecmb ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
1821 self.run_test()
1822
1823
1824class Test_ipsecmb_ESNoff_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1825 """ipsecmb ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001826
Neale Ranns5b891102021-06-28 13:31:28 +00001827 def test_ipsec(self):
1828 """ipsecmb ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
1829 self.run_test()
1830
1831
1832class Test_ipsecmb_ESNoff_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1833 """ipsecmb ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001834
Neale Ranns5b891102021-06-28 13:31:28 +00001835 def test_ipsec(self):
1836 """ipsecmb ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
1837 self.run_test()
1838
1839
1840class Test_ipsecmb_ESNoff_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1841 """ipsecmb ESNoff ARon NONE/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001842
Neale Ranns5b891102021-06-28 13:31:28 +00001843 def test_ipsec(self):
1844 """ipsecmb ESNoff ARon NONE/SHA1-96 IPSec test"""
1845 self.run_test()
1846
1847
1848class Test_ipsecmb_ESNoff_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1849 """ipsecmb ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001850
Neale Ranns5b891102021-06-28 13:31:28 +00001851 def test_ipsec(self):
1852 """ipsecmb ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
1853 self.run_test()
1854
1855
1856class Test_ipsecmb_ESNoff_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1857 """ipsecmb ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001858
Neale Ranns5b891102021-06-28 13:31:28 +00001859 def test_ipsec(self):
1860 """ipsecmb ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
1861 self.run_test()
Neale Ranns4f33c802019-04-10 12:39:10 +00001862
Neale Ranns4f33c802019-04-10 12:39:10 +00001863
Neale Ranns5b891102021-06-28 13:31:28 +00001864class Test_ipsecmb_ESNoff_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1865 """ipsecmb ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001866
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001867 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001868 """ipsecmb ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001869 self.run_test()
Neale Ranns4f33c802019-04-10 12:39:10 +00001870
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001871
Neale Ranns5b891102021-06-28 13:31:28 +00001872class Test_ipsecmb_ESNoff_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1873 """ipsecmb ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001874
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001875 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001876 """ipsecmb ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001877 self.run_test()
1878
1879
Neale Ranns5b891102021-06-28 13:31:28 +00001880class Test_ipsecmb_ESNoff_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1881 """ipsecmb ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001882
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001883 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001884 """ipsecmb 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_ipsecmb_ESNoff_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1889 """ipsecmb ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001890
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001891 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001892 """ipsecmb ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001893 self.run_test()
1894
1895
Neale Ranns5b891102021-06-28 13:31:28 +00001896class Test_ipsecmb_ESNoff_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1897 """ipsecmb ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001898
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001899 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001900 """ipsecmb ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001901 self.run_test()
1902
1903
Neale Ranns5b891102021-06-28 13:31:28 +00001904class Test_ipsecmb_ESNoff_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1905 """ipsecmb ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001906
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001907 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001908 """ipsecmb ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001909 self.run_test()
1910
1911
Neale Ranns5b891102021-06-28 13:31:28 +00001912class Test_ipsecmb_ESNoff_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1913 """ipsecmb ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001914
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001915 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001916 """ipsecmb ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001917 self.run_test()
1918
1919
Neale Ranns5b891102021-06-28 13:31:28 +00001920class Test_ipsecmb_ESNoff_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1921 """ipsecmb ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001922
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001923 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001924 """ipsecmb ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001925 self.run_test()
1926
1927
Neale Ranns5b891102021-06-28 13:31:28 +00001928class Test_ipsecmb_ESNoff_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1929 """ipsecmb ESNoff ARoff NONE/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001930
Benoît Ganne490b9272021-01-22 18:03:09 +01001931 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001932 """ipsecmb ESNoff ARoff NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001933 self.run_test()
1934
1935
Neale Ranns5b891102021-06-28 13:31:28 +00001936class Test_ipsecmb_ESNoff_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1937 """ipsecmb ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001938
Benoît Ganne490b9272021-01-22 18:03:09 +01001939 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001940 """ipsecmb ESNoff ARoff AES-CTR-128/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_ipsecmb_ESNoff_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1945 """ipsecmb ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001946
Benoît Ganne490b9272021-01-22 18:03:09 +01001947 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001948 """ipsecmb ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001949 self.run_test()
1950
1951
Neale Ranns5b891102021-06-28 13:31:28 +00001952class Test_ipsecmb_ESNoff_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1953 """ipsecmb ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001954
Neale Ranns9c23ff82021-06-25 13:30:50 +00001955 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001956 """ipsecmb ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001957 self.run_test()
1958
1959
Neale Ranns5b891102021-06-28 13:31:28 +00001960class Test_openssl_ESNon_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1961 """openssl ESNon ARon AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001962
Neale Ranns9c23ff82021-06-25 13:30:50 +00001963 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001964 """openssl ESNon ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001965 self.run_test()
1966
1967
Neale Ranns5b891102021-06-28 13:31:28 +00001968class Test_openssl_ESNon_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1969 """openssl ESNon ARon AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001970
Neale Ranns9c23ff82021-06-25 13:30:50 +00001971 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001972 """openssl ESNon ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001973 self.run_test()
1974
1975
Neale Ranns5b891102021-06-28 13:31:28 +00001976class Test_openssl_ESNon_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1977 """openssl ESNon ARon AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001978
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001979 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001980 """openssl ESNon ARon AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001981 self.run_test()
1982
1983
Neale Ranns5b891102021-06-28 13:31:28 +00001984class Test_openssl_ESNon_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1985 """openssl ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001986
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001987 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001988 """openssl ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001989 self.run_test()
1990
1991
Neale Ranns5b891102021-06-28 13:31:28 +00001992class Test_openssl_ESNon_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1993 """openssl ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001994
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001995 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001996 """openssl ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001997 self.run_test()
1998
1999
Neale Ranns5b891102021-06-28 13:31:28 +00002000class Test_openssl_ESNon_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
2001 """openssl ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002002
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002003 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002004 """openssl ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002005 self.run_test()
2006
2007
Neale Ranns5b891102021-06-28 13:31:28 +00002008class Test_openssl_ESNon_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
2009 """openssl ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002010
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002011 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002012 """openssl ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002013 self.run_test()
2014
2015
Neale Ranns5b891102021-06-28 13:31:28 +00002016class Test_openssl_ESNon_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
2017 """openssl ESNon ARon NONE/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002018
Benoît Ganne490b9272021-01-22 18:03:09 +01002019 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002020 """openssl ESNon ARon NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002021 self.run_test()
2022
2023
Neale Ranns5b891102021-06-28 13:31:28 +00002024class Test_openssl_ESNon_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
2025 """openssl ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002026
Benoît Ganne490b9272021-01-22 18:03:09 +01002027 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002028 """openssl ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002029 self.run_test()
2030
2031
Neale Ranns5b891102021-06-28 13:31:28 +00002032class Test_openssl_ESNon_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
2033 """openssl ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002034
Benoît Ganne490b9272021-01-22 18:03:09 +01002035 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002036 """openssl ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002037 self.run_test()
2038
2039
Neale Ranns5b891102021-06-28 13:31:28 +00002040class Test_openssl_ESNon_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
2041 """openssl ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002042
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002043 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002044 """openssl ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002045 self.run_test()
2046
2047
Benoît Ganne84e66582023-03-10 17:33:03 +01002048class Test_openssl_ESNon_ARon_AES_NULL_GMAC_128_NONE(RunTestIpsecEspAll):
2049 """openssl ESNon ARon AES-NULL-GMAC-128/NONE IPSec test"""
2050
2051 def test_ipsec(self):
2052 """openssl ESNon ARon AES-NULL-GMAC-128/NONE IPSec test"""
2053 self.run_test()
2054
2055
2056class Test_openssl_ESNon_ARon_AES_NULL_GMAC_192_NONE(RunTestIpsecEspAll):
2057 """openssl ESNon ARon AES-NULL-GMAC-192/NONE IPSec test"""
2058
2059 def test_ipsec(self):
2060 """openssl ESNon ARon AES-NULL-GMAC-192/NONE IPSec test"""
2061 self.run_test()
2062
2063
2064class Test_openssl_ESNon_ARon_AES_NULL_GMAC_256_NONE(RunTestIpsecEspAll):
2065 """openssl ESNon ARon AES-NULL-GMAC-256/NONE IPSec test"""
2066
2067 def test_ipsec(self):
2068 """openssl ESNon ARon AES-NULL-GMAC-256/NONE IPSec test"""
2069 self.run_test()
2070
2071
Neale Ranns5b891102021-06-28 13:31:28 +00002072class Test_openssl_ESNon_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
2073 """openssl ESNon ARoff AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002074
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002075 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002076 """openssl ESNon ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002077 self.run_test()
2078
2079
Neale Ranns5b891102021-06-28 13:31:28 +00002080class Test_openssl_ESNon_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
2081 """openssl ESNon ARoff AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002082
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002083 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002084 """openssl ESNon ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002085 self.run_test()
2086
2087
Neale Ranns5b891102021-06-28 13:31:28 +00002088class Test_openssl_ESNon_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
2089 """openssl ESNon ARoff AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002090
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002091 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002092 """openssl ESNon ARoff AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002093 self.run_test()
2094
2095
Neale Ranns5b891102021-06-28 13:31:28 +00002096class Test_openssl_ESNon_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
2097 """openssl ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002098
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002099 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002100 """openssl ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002101 self.run_test()
2102
2103
Neale Ranns5b891102021-06-28 13:31:28 +00002104class Test_openssl_ESNon_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
2105 """openssl ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002106
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002107 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002108 """openssl ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002109 self.run_test()
2110
2111
Neale Ranns5b891102021-06-28 13:31:28 +00002112class Test_openssl_ESNon_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
2113 """openssl ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002114
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002115 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002116 """openssl ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002117 self.run_test()
2118
2119
Neale Ranns5b891102021-06-28 13:31:28 +00002120class Test_openssl_ESNon_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
2121 """openssl ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002122
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002123 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002124 """openssl ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002125 self.run_test()
2126
2127
Neale Ranns5b891102021-06-28 13:31:28 +00002128class Test_openssl_ESNon_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
2129 """openssl ESNon ARoff NONE/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002130
Benoît Ganne490b9272021-01-22 18:03:09 +01002131 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002132 """openssl ESNon ARoff NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002133 self.run_test()
2134
2135
Neale Ranns5b891102021-06-28 13:31:28 +00002136class Test_openssl_ESNon_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
2137 """openssl ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002138
Benoît Ganne490b9272021-01-22 18:03:09 +01002139 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002140 """openssl ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002141 self.run_test()
2142
2143
Neale Ranns5b891102021-06-28 13:31:28 +00002144class Test_openssl_ESNon_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
2145 """openssl ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002146
Benoît Ganne490b9272021-01-22 18:03:09 +01002147 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002148 """openssl ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002149 self.run_test()
2150
2151
Neale Ranns5b891102021-06-28 13:31:28 +00002152class Test_openssl_ESNon_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
2153 """openssl ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002154
Neale Ranns9c23ff82021-06-25 13:30:50 +00002155 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002156 """openssl ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002157 self.run_test()
2158
2159
Benoît Ganne84e66582023-03-10 17:33:03 +01002160class Test_openssl_ESNon_ARoff_AES_NULL_GMAC_128_NONE(RunTestIpsecEspAll):
2161 """openssl ESNon ARoff AES-NULL-GMAC-128/NONE IPSec test"""
2162
2163 def test_ipsec(self):
2164 """openssl ESNon ARoff AES-NULL-GMAC-128/NONE IPSec test"""
2165 self.run_test()
2166
2167
2168class Test_openssl_ESNon_ARoff_AES_NULL_GMAC_192_NONE(RunTestIpsecEspAll):
2169 """openssl ESNon ARoff AES-NULL-GMAC-192/NONE IPSec test"""
2170
2171 def test_ipsec(self):
2172 """openssl ESNon ARoff AES-NULL-GMAC-192/NONE IPSec test"""
2173 self.run_test()
2174
2175
2176class Test_openssl_ESNon_ARoff_AES_NULL_GMAC_256_NONE(RunTestIpsecEspAll):
2177 """openssl ESNon ARoff AES-NULL-GMAC-256/NONE IPSec test"""
2178
2179 def test_ipsec(self):
2180 """openssl ESNon ARoff AES-NULL-GMAC-256/NONE IPSec test"""
2181 self.run_test()
2182
2183
Neale Ranns5b891102021-06-28 13:31:28 +00002184class Test_openssl_ESNoff_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
2185 """openssl ESNoff ARon AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002186
Neale Ranns9c23ff82021-06-25 13:30:50 +00002187 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002188 """openssl ESNoff ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002189 self.run_test()
2190
2191
Neale Ranns5b891102021-06-28 13:31:28 +00002192class Test_openssl_ESNoff_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
2193 """openssl ESNoff ARon AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002194
Neale Ranns9c23ff82021-06-25 13:30:50 +00002195 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002196 """openssl ESNoff ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002197 self.run_test()
2198
2199
Neale Ranns5b891102021-06-28 13:31:28 +00002200class Test_openssl_ESNoff_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
2201 """openssl ESNoff ARon AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002202
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002203 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002204 """openssl ESNoff ARon AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002205 self.run_test()
2206
2207
Neale Ranns5b891102021-06-28 13:31:28 +00002208class Test_openssl_ESNoff_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
2209 """openssl ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002210
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002211 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002212 """openssl ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002213 self.run_test()
2214
2215
Neale Ranns5b891102021-06-28 13:31:28 +00002216class Test_openssl_ESNoff_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
2217 """openssl ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002218
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002219 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002220 """openssl ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002221 self.run_test()
2222
2223
Neale Ranns5b891102021-06-28 13:31:28 +00002224class Test_openssl_ESNoff_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
2225 """openssl ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002226
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002227 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002228 """openssl ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002229 self.run_test()
2230
2231
Neale Ranns5b891102021-06-28 13:31:28 +00002232class Test_openssl_ESNoff_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
2233 """openssl ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002234
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002235 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002236 """openssl ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002237 self.run_test()
2238
2239
Neale Ranns5b891102021-06-28 13:31:28 +00002240class Test_openssl_ESNoff_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
2241 """openssl ESNoff ARon NONE/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002242
Benoît Ganne490b9272021-01-22 18:03:09 +01002243 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002244 """openssl ESNoff ARon NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002245 self.run_test()
2246
2247
Neale Ranns5b891102021-06-28 13:31:28 +00002248class Test_openssl_ESNoff_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
2249 """openssl ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002250
Benoît Ganne490b9272021-01-22 18:03:09 +01002251 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002252 """openssl ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002253 self.run_test()
2254
2255
Neale Ranns5b891102021-06-28 13:31:28 +00002256class Test_openssl_ESNoff_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
2257 """openssl ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002258
Benoît Ganne490b9272021-01-22 18:03:09 +01002259 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002260 """openssl ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002261 self.run_test()
2262
2263
Neale Ranns5b891102021-06-28 13:31:28 +00002264class Test_openssl_ESNoff_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
2265 """openssl ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002266
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002267 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002268 """openssl ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002269 self.run_test()
2270
2271
Benoît Ganne84e66582023-03-10 17:33:03 +01002272class Test_openssl_ESNoff_ARon_AES_NULL_GMAC_128_NONE(RunTestIpsecEspAll):
2273 """openssl ESNoff ARon AES-NULL-GMAC-128/NONE IPSec test"""
2274
2275 def test_ipsec(self):
2276 """openssl ESNoff ARon AES-NULL-GMAC-128/NONE IPSec test"""
2277 self.run_test()
2278
2279
2280class Test_openssl_ESNoff_ARon_AES_NULL_GMAC_192_NONE(RunTestIpsecEspAll):
2281 """openssl ESNoff ARon AES-NULL-GMAC-192/NONE IPSec test"""
2282
2283 def test_ipsec(self):
2284 """openssl ESNoff ARon AES-NULL-GMAC-192/NONE IPSec test"""
2285 self.run_test()
2286
2287
2288class Test_openssl_ESNoff_ARon_AES_NULL_GMAC_256_NONE(RunTestIpsecEspAll):
2289 """openssl ESNoff ARon AES-NULL-GMAC-256/NONE IPSec test"""
2290
2291 def test_ipsec(self):
2292 """openssl ESNoff ARon AES-NULL-GMAC-256/NONE IPSec test"""
2293 self.run_test()
2294
2295
Neale Ranns5b891102021-06-28 13:31:28 +00002296class Test_openssl_ESNoff_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
2297 """openssl ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002298
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002299 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002300 """openssl ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002301 self.run_test()
2302
2303
Neale Ranns5b891102021-06-28 13:31:28 +00002304class Test_openssl_ESNoff_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
2305 """openssl ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002306
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002307 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002308 """openssl ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002309 self.run_test()
2310
2311
Neale Ranns5b891102021-06-28 13:31:28 +00002312class Test_openssl_ESNoff_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
2313 """openssl ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002314
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002315 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002316 """openssl ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002317 self.run_test()
2318
2319
Neale Ranns5b891102021-06-28 13:31:28 +00002320class Test_openssl_ESNoff_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
2321 """openssl ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002322
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002323 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002324 """openssl ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002325 self.run_test()
2326
2327
Neale Ranns5b891102021-06-28 13:31:28 +00002328class Test_openssl_ESNoff_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
2329 """openssl ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002330
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002331 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002332 """openssl ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002333 self.run_test()
2334
2335
Neale Ranns5b891102021-06-28 13:31:28 +00002336class Test_openssl_ESNoff_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
2337 """openssl ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002338
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002339 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002340 """openssl ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002341 self.run_test()
2342
2343
Neale Ranns5b891102021-06-28 13:31:28 +00002344class Test_openssl_ESNoff_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
2345 """openssl ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002346
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002347 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002348 """openssl ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002349 self.run_test()
2350
2351
Neale Ranns5b891102021-06-28 13:31:28 +00002352class Test_openssl_ESNoff_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
2353 """openssl ESNoff ARoff NONE/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002354
Benoît Ganne490b9272021-01-22 18:03:09 +01002355 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002356 """openssl ESNoff ARoff NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002357 self.run_test()
2358
2359
Neale Ranns5b891102021-06-28 13:31:28 +00002360class Test_openssl_ESNoff_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
2361 """openssl ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002362
Benoît Ganne490b9272021-01-22 18:03:09 +01002363 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002364 """openssl ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002365 self.run_test()
2366
2367
Neale Ranns5b891102021-06-28 13:31:28 +00002368class Test_openssl_ESNoff_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
2369 """openssl ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002370
Benoît Ganne490b9272021-01-22 18:03:09 +01002371 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002372 """openssl ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002373 self.run_test()
2374
2375
Neale Ranns5b891102021-06-28 13:31:28 +00002376class Test_openssl_ESNoff_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
2377 """openssl ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002378
Neale Ranns9c23ff82021-06-25 13:30:50 +00002379 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002380 """openssl ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002381 self.run_test()
2382
2383
Benoît Ganne84e66582023-03-10 17:33:03 +01002384class Test_openssl_ESNoff_ARoff_AES_NULL_GMAC_128_NONE(RunTestIpsecEspAll):
2385 """openssl ESNoff ARoff AES-NULL-GMAC-128/NONE IPSec test"""
2386
2387 def test_ipsec(self):
2388 """openssl ESNoff ARoff AES-NULL-GMAC-128/NONE IPSec test"""
2389 self.run_test()
2390
2391
2392class Test_openssl_ESNoff_ARoff_AES_NULL_GMAC_192_NONE(RunTestIpsecEspAll):
2393 """openssl ESNoff ARoff AES-NULL-GMAC-192/NONE IPSec test"""
2394
2395 def test_ipsec(self):
2396 """openssl ESNoff ARoff AES-NULL-GMAC-192/NONE IPSec test"""
2397 self.run_test()
2398
2399
2400class Test_openssl_ESNoff_ARoff_AES_NULL_GMAC_256_NONE(RunTestIpsecEspAll):
2401 """openssl ESNoff ARoff AES-NULL-GMAC-256/NONE IPSec test"""
2402
2403 def test_ipsec(self):
2404 """openssl ESNoff ARoff AES-NULL-GMAC-256/NONE IPSec test"""
2405 self.run_test()
2406
2407
Neale Ranns5b891102021-06-28 13:31:28 +00002408class Test_async_ESNon_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
2409 """async ESNon ARon AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002410
Neale Ranns9c23ff82021-06-25 13:30:50 +00002411 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002412 """async ESNon ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002413 self.run_test()
2414
2415
Neale Ranns5b891102021-06-28 13:31:28 +00002416class Test_async_ESNon_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
2417 """async ESNon ARon AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002418
Neale Ranns9c23ff82021-06-25 13:30:50 +00002419 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002420 """async ESNon ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002421 self.run_test()
2422
2423
Neale Ranns5b891102021-06-28 13:31:28 +00002424class Test_async_ESNon_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
2425 """async ESNon ARon AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002426
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002427 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002428 """async ESNon ARon AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002429 self.run_test()
2430
2431
Neale Ranns5b891102021-06-28 13:31:28 +00002432class Test_async_ESNon_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
2433 """async ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002434
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002435 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002436 """async ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002437 self.run_test()
2438
2439
Neale Ranns5b891102021-06-28 13:31:28 +00002440class Test_async_ESNon_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
2441 """async ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002442
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002443 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002444 """async ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002445 self.run_test()
2446
2447
Neale Ranns5b891102021-06-28 13:31:28 +00002448class Test_async_ESNon_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
2449 """async ESNon ARoff AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002450
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002451 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002452 """async ESNon ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002453 self.run_test()
2454
2455
Neale Ranns5b891102021-06-28 13:31:28 +00002456class Test_async_ESNon_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
2457 """async ESNon ARoff AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002458
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002459 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002460 """async ESNon ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002461 self.run_test()
Neale Ranns6afaae12019-07-17 15:07:14 +00002462
Neale Ranns4f33c802019-04-10 12:39:10 +00002463
Neale Ranns5b891102021-06-28 13:31:28 +00002464class Test_async_ESNon_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
2465 """async ESNon ARoff AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002466
Benoît Ganne490b9272021-01-22 18:03:09 +01002467 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002468 """async ESNon ARoff AES-GCM-256/NONE IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002469 self.run_test()
2470
2471
Neale Ranns5b891102021-06-28 13:31:28 +00002472class Test_async_ESNon_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
2473 """async ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002474
Benoît Ganne490b9272021-01-22 18:03:09 +01002475 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002476 """async ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002477 self.run_test()
2478
2479
Neale Ranns5b891102021-06-28 13:31:28 +00002480class Test_async_ESNon_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
2481 """async ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002482
Benoît Ganne490b9272021-01-22 18:03:09 +01002483 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002484 """async ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002485 self.run_test()
2486
2487
Neale Ranns5b891102021-06-28 13:31:28 +00002488class Test_async_ESNoff_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
2489 """async ESNoff ARon AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002490
Neale Ranns8c609af2021-02-25 10:05:32 +00002491 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002492 """async ESNoff ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002493 self.run_test()
2494
2495
Neale Ranns5b891102021-06-28 13:31:28 +00002496class Test_async_ESNoff_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
2497 """async ESNoff ARon AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002498
Neale Ranns8c609af2021-02-25 10:05:32 +00002499 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002500 """async ESNoff ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002501 self.run_test()
2502
2503
Neale Ranns5b891102021-06-28 13:31:28 +00002504class Test_async_ESNoff_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
2505 """async ESNoff ARon AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002506
Neale Ranns8c609af2021-02-25 10:05:32 +00002507 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002508 """async ESNoff ARon AES-GCM-256/NONE IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002509 self.run_test()
2510
2511
Neale Ranns5b891102021-06-28 13:31:28 +00002512class Test_async_ESNoff_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
2513 """async ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002514
Neale Ranns8c609af2021-02-25 10:05:32 +00002515 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002516 """async ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002517 self.run_test()
2518
2519
Neale Ranns5b891102021-06-28 13:31:28 +00002520class Test_async_ESNoff_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
2521 """async ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002522
Neale Ranns8c609af2021-02-25 10:05:32 +00002523 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002524 """async ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002525 self.run_test()
2526
2527
Neale Ranns5b891102021-06-28 13:31:28 +00002528class Test_async_ESNoff_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
2529 """async ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002530
Neale Ranns9c23ff82021-06-25 13:30:50 +00002531 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002532 """async ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002533 self.run_test()
2534
2535
Neale Ranns5b891102021-06-28 13:31:28 +00002536class Test_async_ESNoff_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
2537 """async ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002538
Neale Ranns9c23ff82021-06-25 13:30:50 +00002539 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002540 """async ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002541 self.run_test()
2542
2543
Neale Ranns5b891102021-06-28 13:31:28 +00002544class Test_async_ESNoff_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
2545 """async ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002546
Neale Ranns9c23ff82021-06-25 13:30:50 +00002547 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002548 """async ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002549 self.run_test()
2550
2551
Neale Ranns5b891102021-06-28 13:31:28 +00002552class Test_async_ESNoff_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
2553 """async ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002554
Neale Ranns8c609af2021-02-25 10:05:32 +00002555 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002556 """async ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002557 self.run_test()
2558
2559
Neale Ranns5b891102021-06-28 13:31:28 +00002560class Test_async_ESNoff_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
2561 """async ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002562
Neale Ranns8c609af2021-02-25 10:05:32 +00002563 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002564 """async ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002565 self.run_test()