blob: fdd7eb8af1518d3a386c915a17c46140783e5cc4 [file] [log] [blame]
“mystarrocks”23f0c452017-12-11 07:11:51 -08001import socket
Klement Sekera28fb03f2018-04-17 11:36:55 +02002import unittest
Klement Sekera31da2e32018-06-24 22:49:55 +02003from scapy.layers.ipsec import ESP
Christian Hoppsfb7e7ed2019-11-03 07:02:15 -05004from scapy.layers.inet import IP, ICMP, UDP
Neale Ranns041add72020-01-02 04:06:10 +00005from scapy.layers.inet6 import IPv6
6from scapy.layers.l2 import Ether
7from scapy.packet import Raw
“mystarrocks”23f0c452017-12-11 07:11:51 -08008
Neale Ranns00625a62019-07-31 00:13:18 -07009from parameterized import parameterized
juraj.linkes11057662019-07-08 10:22:55 +020010from framework import VppTestRunner
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020011from template_ipsec import (
12 IpsecTra46Tests,
13 IpsecTun46Tests,
14 TemplateIpsec,
15 IpsecTcpTests,
16 IpsecTun4Tests,
17 IpsecTra4Tests,
18 config_tra_params,
19 config_tun_params,
20 IPsecIPv4Params,
21 IPsecIPv6Params,
22 IpsecTra4,
23 IpsecTun4,
24 IpsecTra6,
25 IpsecTun6,
26 IpsecTun6HandoffTests,
27 IpsecTun4HandoffTests,
28 IpsecTra6ExtTests,
29)
30from vpp_ipsec import VppIpsecSpd, VppIpsecSpdEntry, VppIpsecSA, VppIpsecSpdItfBinding
Neale Ranns311124e2019-01-24 04:52:25 -080031from vpp_ip_route import VppIpRoute, VppRoutePath
32from vpp_ip import DpoProto
Neale Ranns17dcec02019-01-09 21:22:20 -080033from vpp_papi import VppEnum
“mystarrocks”23f0c452017-12-11 07:11:51 -080034
Neale Rannsc87b66c2019-02-07 07:26:12 -080035NUM_PKTS = 67
Benoît Ganne5c481ff2021-03-08 10:22:51 +010036engines_supporting_chain_bufs = ["openssl", "async"]
Neale Rannsf16e9a52021-02-25 19:09:24 +000037engines = ["ia32", "ipsecmb", "openssl"]
Neale Rannsc87b66c2019-02-07 07:26:12 -080038
“mystarrocks”23f0c452017-12-11 07:11:51 -080039
Neale Ranns4f33c802019-04-10 12:39:10 +000040class ConfigIpsecESP(TemplateIpsec):
41 encryption_type = ESP
42 tra4_encrypt_node_name = "esp4-encrypt"
Neale Ranns8c609af2021-02-25 10:05:32 +000043 tra4_decrypt_node_name = ["esp4-decrypt", "esp4-decrypt-post"]
Neale Ranns4f33c802019-04-10 12:39:10 +000044 tra6_encrypt_node_name = "esp6-encrypt"
Neale Ranns8c609af2021-02-25 10:05:32 +000045 tra6_decrypt_node_name = ["esp6-decrypt", "esp6-decrypt-post"]
Neale Ranns4f33c802019-04-10 12:39:10 +000046 tun4_encrypt_node_name = "esp4-encrypt"
Neale Ranns8c609af2021-02-25 10:05:32 +000047 tun4_decrypt_node_name = ["esp4-decrypt", "esp4-decrypt-post"]
Neale Ranns4f33c802019-04-10 12:39:10 +000048 tun6_encrypt_node_name = "esp6-encrypt"
Neale Ranns8c609af2021-02-25 10:05:32 +000049 tun6_decrypt_node_name = ["esp6-decrypt", "esp6-decrypt-post"]
Neale Ranns53f526b2019-02-25 14:32:02 +000050
Neale Ranns4f33c802019-04-10 12:39:10 +000051 @classmethod
52 def setUpClass(cls):
53 super(ConfigIpsecESP, cls).setUpClass()
Neale Ranns53f526b2019-02-25 14:32:02 +000054
Neale Ranns4f33c802019-04-10 12:39:10 +000055 @classmethod
56 def tearDownClass(cls):
57 super(ConfigIpsecESP, cls).tearDownClass()
Neale Ranns53f526b2019-02-25 14:32:02 +000058
Neale Ranns4f33c802019-04-10 12:39:10 +000059 def setUp(self):
60 super(ConfigIpsecESP, self).setUp()
Neale Ranns53f526b2019-02-25 14:32:02 +000061
Neale Ranns4f33c802019-04-10 12:39:10 +000062 def tearDown(self):
63 super(ConfigIpsecESP, self).tearDown()
64
Maxime Peim0e2f1882022-12-22 11:26:57 +000065 def config_anti_replay(self, params, anti_replay_window_size=64):
Neale Ranns5b891102021-06-28 13:31:28 +000066 saf = VppEnum.vl_api_ipsec_sad_flags_t
67 for p in params:
68 p.flags |= saf.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY
Maxime Peim0e2f1882022-12-22 11:26:57 +000069 p.anti_replay_window_size = anti_replay_window_size
Neale Ranns5b891102021-06-28 13:31:28 +000070
Neale Ranns4f33c802019-04-10 12:39:10 +000071 def config_network(self, params):
72 self.net_objs = []
73 self.tun_if = self.pg0
74 self.tra_if = self.pg2
75 self.logger.info(self.vapi.ppcli("show int addr"))
76
77 self.tra_spd = VppIpsecSpd(self, self.tra_spd_id)
78 self.tra_spd.add_vpp_config()
79 self.net_objs.append(self.tra_spd)
80 self.tun_spd = VppIpsecSpd(self, self.tun_spd_id)
81 self.tun_spd.add_vpp_config()
82 self.net_objs.append(self.tun_spd)
83
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020084 b = VppIpsecSpdItfBinding(self, self.tun_spd, self.tun_if)
Neale Ranns4f33c802019-04-10 12:39:10 +000085 b.add_vpp_config()
86 self.net_objs.append(b)
87
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020088 b = VppIpsecSpdItfBinding(self, self.tra_spd, self.tra_if)
Neale Ranns4f33c802019-04-10 12:39:10 +000089 b.add_vpp_config()
90 self.net_objs.append(b)
91
92 for p in params:
93 self.config_esp_tra(p)
94 config_tra_params(p, self.encryption_type)
95 for p in params:
96 self.config_esp_tun(p)
Neale Ranns12989b52019-09-26 16:20:19 +000097 config_tun_params(p, self.encryption_type, self.tun_if)
Neale Ranns4f33c802019-04-10 12:39:10 +000098
99 for p in params:
100 d = DpoProto.DPO_PROTO_IP6 if p.is_ipv6 else DpoProto.DPO_PROTO_IP4
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200101 r = VppIpRoute(
102 self,
103 p.remote_tun_if_host,
104 p.addr_len,
105 [
106 VppRoutePath(
107 self.tun_if.remote_addr[p.addr_type], 0xFFFFFFFF, proto=d
108 )
109 ],
110 )
Neale Ranns4f33c802019-04-10 12:39:10 +0000111 r.add_vpp_config()
112 self.net_objs.append(r)
113
114 self.logger.info(self.vapi.ppcli("show ipsec all"))
115
116 def unconfig_network(self):
117 for o in reversed(self.net_objs):
118 o.remove_vpp_config()
119 self.net_objs = []
120
121 def config_esp_tun(self, params):
122 addr_type = params.addr_type
123 scapy_tun_sa_id = params.scapy_tun_sa_id
124 scapy_tun_spi = params.scapy_tun_spi
125 vpp_tun_sa_id = params.vpp_tun_sa_id
126 vpp_tun_spi = params.vpp_tun_spi
127 auth_algo_vpp_id = params.auth_algo_vpp_id
128 auth_key = params.auth_key
129 crypt_algo_vpp_id = params.crypt_algo_vpp_id
130 crypt_key = params.crypt_key
131 remote_tun_if_host = params.remote_tun_if_host
132 addr_any = params.addr_any
133 addr_bcast = params.addr_bcast
134 e = VppEnum.vl_api_ipsec_spd_action_t
Neale Ranns49e7ef62019-04-10 17:24:29 +0000135 flags = params.flags
Neale Ranns041add72020-01-02 04:06:10 +0000136 tun_flags = params.tun_flags
Neale Ranns80f6fd52019-04-16 02:41:34 +0000137 salt = params.salt
Maxime Peim0e2f1882022-12-22 11:26:57 +0000138 anti_replay_window_size = params.anti_replay_window_size
Neale Ranns4f33c802019-04-10 12:39:10 +0000139 objs = []
140
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200141 params.tun_sa_in = VppIpsecSA(
142 self,
143 scapy_tun_sa_id,
144 scapy_tun_spi,
145 auth_algo_vpp_id,
146 auth_key,
147 crypt_algo_vpp_id,
148 crypt_key,
149 self.vpp_esp_protocol,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200150 self.tun_if.remote_addr[addr_type],
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100151 self.tun_if.local_addr[addr_type],
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200152 tun_flags=tun_flags,
153 dscp=params.dscp,
154 flags=flags,
155 salt=salt,
156 hop_limit=params.outer_hop_limit,
Maxime Peim0e2f1882022-12-22 11:26:57 +0000157 anti_replay_window_size=anti_replay_window_size,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200158 )
159 params.tun_sa_out = VppIpsecSA(
160 self,
161 vpp_tun_sa_id,
162 vpp_tun_spi,
163 auth_algo_vpp_id,
164 auth_key,
165 crypt_algo_vpp_id,
166 crypt_key,
167 self.vpp_esp_protocol,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200168 self.tun_if.local_addr[addr_type],
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100169 self.tun_if.remote_addr[addr_type],
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200170 tun_flags=tun_flags,
171 dscp=params.dscp,
172 flags=flags,
173 salt=salt,
174 hop_limit=params.outer_hop_limit,
Maxime Peim0e2f1882022-12-22 11:26:57 +0000175 anti_replay_window_size=anti_replay_window_size,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200176 )
Neale Ranns4f33c802019-04-10 12:39:10 +0000177 objs.append(params.tun_sa_in)
178 objs.append(params.tun_sa_out)
179
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200180 params.spd_policy_in_any = VppIpsecSpdEntry(
181 self,
182 self.tun_spd,
183 scapy_tun_sa_id,
184 addr_any,
185 addr_bcast,
186 addr_any,
187 addr_bcast,
188 socket.IPPROTO_ESP,
189 )
190 params.spd_policy_out_any = VppIpsecSpdEntry(
191 self,
192 self.tun_spd,
193 scapy_tun_sa_id,
194 addr_any,
195 addr_bcast,
196 addr_any,
197 addr_bcast,
198 socket.IPPROTO_ESP,
199 is_outbound=0,
200 )
Neale Ranns4f33c802019-04-10 12:39:10 +0000201 objs.append(params.spd_policy_out_any)
202 objs.append(params.spd_policy_in_any)
203
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200204 objs.append(
205 VppIpsecSpdEntry(
206 self,
207 self.tun_spd,
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100208 scapy_tun_sa_id,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200209 remote_tun_if_host,
210 remote_tun_if_host,
211 self.pg1.remote_addr[addr_type],
212 self.pg1.remote_addr[addr_type],
Piotr Bronowski815c6a42022-06-09 09:09:28 +0000213 socket.IPPROTO_RAW,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200214 priority=10,
215 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
216 is_outbound=0,
217 )
218 )
219 objs.append(
220 VppIpsecSpdEntry(
221 self,
222 self.tun_spd,
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100223 vpp_tun_sa_id,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200224 self.pg1.remote_addr[addr_type],
225 self.pg1.remote_addr[addr_type],
226 remote_tun_if_host,
227 remote_tun_if_host,
Piotr Bronowski815c6a42022-06-09 09:09:28 +0000228 socket.IPPROTO_RAW,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200229 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
230 priority=10,
231 )
232 )
233 objs.append(
234 VppIpsecSpdEntry(
235 self,
236 self.tun_spd,
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100237 scapy_tun_sa_id,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200238 remote_tun_if_host,
239 remote_tun_if_host,
240 self.pg0.local_addr[addr_type],
241 self.pg0.local_addr[addr_type],
Piotr Bronowski815c6a42022-06-09 09:09:28 +0000242 socket.IPPROTO_RAW,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200243 priority=20,
244 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
245 is_outbound=0,
246 )
247 )
248 objs.append(
249 VppIpsecSpdEntry(
250 self,
251 self.tun_spd,
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100252 vpp_tun_sa_id,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200253 self.pg0.local_addr[addr_type],
254 self.pg0.local_addr[addr_type],
255 remote_tun_if_host,
256 remote_tun_if_host,
Piotr Bronowski815c6a42022-06-09 09:09:28 +0000257 socket.IPPROTO_RAW,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200258 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
259 priority=20,
260 )
261 )
Neale Ranns4f33c802019-04-10 12:39:10 +0000262 for o in objs:
263 o.add_vpp_config()
264 self.net_objs = self.net_objs + objs
265
266 def config_esp_tra(self, params):
267 addr_type = params.addr_type
268 scapy_tra_sa_id = params.scapy_tra_sa_id
269 scapy_tra_spi = params.scapy_tra_spi
270 vpp_tra_sa_id = params.vpp_tra_sa_id
271 vpp_tra_spi = params.vpp_tra_spi
272 auth_algo_vpp_id = params.auth_algo_vpp_id
273 auth_key = params.auth_key
274 crypt_algo_vpp_id = params.crypt_algo_vpp_id
275 crypt_key = params.crypt_key
276 addr_any = params.addr_any
277 addr_bcast = params.addr_bcast
Neale Ranns4f33c802019-04-10 12:39:10 +0000278 e = VppEnum.vl_api_ipsec_spd_action_t
Neale Ranns5b891102021-06-28 13:31:28 +0000279 flags = params.flags
Neale Ranns80f6fd52019-04-16 02:41:34 +0000280 salt = params.salt
Maxime Peim0e2f1882022-12-22 11:26:57 +0000281 anti_replay_window_size = params.anti_replay_window_size
Neale Ranns4f33c802019-04-10 12:39:10 +0000282 objs = []
283
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200284 params.tra_sa_in = VppIpsecSA(
285 self,
286 scapy_tra_sa_id,
287 scapy_tra_spi,
288 auth_algo_vpp_id,
289 auth_key,
290 crypt_algo_vpp_id,
291 crypt_key,
292 self.vpp_esp_protocol,
293 flags=flags,
294 salt=salt,
Maxime Peim0e2f1882022-12-22 11:26:57 +0000295 anti_replay_window_size=anti_replay_window_size,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200296 )
297 params.tra_sa_out = VppIpsecSA(
298 self,
299 vpp_tra_sa_id,
300 vpp_tra_spi,
301 auth_algo_vpp_id,
302 auth_key,
303 crypt_algo_vpp_id,
304 crypt_key,
305 self.vpp_esp_protocol,
306 flags=flags,
307 salt=salt,
Maxime Peim0e2f1882022-12-22 11:26:57 +0000308 anti_replay_window_size=anti_replay_window_size,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200309 )
Neale Ranns4f33c802019-04-10 12:39:10 +0000310 objs.append(params.tra_sa_in)
311 objs.append(params.tra_sa_out)
312
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200313 objs.append(
314 VppIpsecSpdEntry(
315 self,
316 self.tra_spd,
317 vpp_tra_sa_id,
318 addr_any,
319 addr_bcast,
320 addr_any,
321 addr_bcast,
322 socket.IPPROTO_ESP,
323 )
324 )
325 objs.append(
326 VppIpsecSpdEntry(
327 self,
328 self.tra_spd,
329 vpp_tra_sa_id,
330 addr_any,
331 addr_bcast,
332 addr_any,
333 addr_bcast,
334 socket.IPPROTO_ESP,
335 is_outbound=0,
336 )
337 )
338 objs.append(
339 VppIpsecSpdEntry(
340 self,
341 self.tra_spd,
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100342 scapy_tra_sa_id,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200343 self.tra_if.local_addr[addr_type],
344 self.tra_if.local_addr[addr_type],
345 self.tra_if.remote_addr[addr_type],
346 self.tra_if.remote_addr[addr_type],
Piotr Bronowski815c6a42022-06-09 09:09:28 +0000347 socket.IPPROTO_RAW,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200348 priority=10,
349 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
350 is_outbound=0,
351 )
352 )
353 objs.append(
354 VppIpsecSpdEntry(
355 self,
356 self.tra_spd,
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100357 vpp_tra_sa_id,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200358 self.tra_if.local_addr[addr_type],
359 self.tra_if.local_addr[addr_type],
360 self.tra_if.remote_addr[addr_type],
361 self.tra_if.remote_addr[addr_type],
Piotr Bronowski815c6a42022-06-09 09:09:28 +0000362 socket.IPPROTO_RAW,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200363 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
364 priority=10,
365 )
366 )
Neale Ranns4f33c802019-04-10 12:39:10 +0000367 for o in objs:
368 o.add_vpp_config()
369 self.net_objs = self.net_objs + objs
Neale Ranns53f526b2019-02-25 14:32:02 +0000370
371
Neale Ranns4f33c802019-04-10 12:39:10 +0000372class TemplateIpsecEsp(ConfigIpsecESP):
“mystarrocks”23f0c452017-12-11 07:11:51 -0800373 """
374 Basic test for ipsec esp sanity - tunnel and transport modes.
375
376 Below 4 cases are covered as part of this test
Dave Wallaced1706812021-08-12 18:36:02 -0400377
378 #. ipsec esp v4 transport basic test - IPv4 Transport mode
Paul Vinciguerra8feeaff2019-03-27 11:25:48 -0700379 scenario using HMAC-SHA1-96 integrity algo
Dave Wallaced1706812021-08-12 18:36:02 -0400380
381 #. ipsec esp v4 transport burst test
“mystarrocks”23f0c452017-12-11 07:11:51 -0800382 Above test for 257 pkts
383
Dave Wallaced1706812021-08-12 18:36:02 -0400384 #. ipsec esp 4o4 tunnel basic test - IPv4 Tunnel mode
385 scenario using HMAC-SHA1-96 integrity algo
“mystarrocks”23f0c452017-12-11 07:11:51 -0800386
Dave Wallaced1706812021-08-12 18:36:02 -0400387 #. ipsec esp 4o4 tunnel burst test
388 Above test for 257 pkts
“mystarrocks”23f0c452017-12-11 07:11:51 -0800389
Dave Wallaced1706812021-08-12 18:36:02 -0400390 TRANSPORT MODE::
“mystarrocks”23f0c452017-12-11 07:11:51 -0800391
Dave Wallaced1706812021-08-12 18:36:02 -0400392 --- encrypt ---
393 |pg2| <-------> |VPP|
394 --- decrypt ---
“mystarrocks”23f0c452017-12-11 07:11:51 -0800395
Dave Wallaced1706812021-08-12 18:36:02 -0400396 TUNNEL MODE::
397
398 --- encrypt --- plain ---
399 |pg0| <------- |VPP| <------ |pg1|
400 --- --- ---
401
402 --- decrypt --- plain ---
403 |pg0| -------> |VPP| ------> |pg1|
404 --- --- ---
405
“mystarrocks”23f0c452017-12-11 07:11:51 -0800406 """
407
Paul Vinciguerra7f9b7f92019-03-12 19:23:27 -0700408 @classmethod
409 def setUpClass(cls):
410 super(TemplateIpsecEsp, cls).setUpClass()
411
412 @classmethod
413 def tearDownClass(cls):
414 super(TemplateIpsecEsp, cls).tearDownClass()
415
Neale Ranns8e4a89b2019-01-23 08:16:17 -0800416 def setUp(self):
417 super(TemplateIpsecEsp, self).setUp()
Neale Ranns5b891102021-06-28 13:31:28 +0000418 self.config_anti_replay(self.params.values())
Neale Ranns4f33c802019-04-10 12:39:10 +0000419 self.config_network(self.params.values())
Klement Sekera611864f2018-09-26 11:19:00 +0200420
Neale Ranns8e4a89b2019-01-23 08:16:17 -0800421 def tearDown(self):
Neale Ranns4f33c802019-04-10 12:39:10 +0000422 self.unconfig_network()
Neale Ranns8e4a89b2019-01-23 08:16:17 -0800423 super(TemplateIpsecEsp, self).tearDown()
Neale Ranns8e4a89b2019-01-23 08:16:17 -0800424
Klement Sekera611864f2018-09-26 11:19:00 +0200425
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200426class TestIpsecEsp1(
427 TemplateIpsecEsp, IpsecTra46Tests, IpsecTun46Tests, IpsecTra6ExtTests
428):
429 """Ipsec ESP - TUN & TRA tests"""
Neale Rannsb1fd80f2020-05-12 13:33:56 +0000430
431 @classmethod
432 def setUpClass(cls):
433 super(TestIpsecEsp1, cls).setUpClass()
434
435 @classmethod
436 def tearDownClass(cls):
437 super(TestIpsecEsp1, cls).tearDownClass()
438
439 def setUp(self):
440 super(TestIpsecEsp1, self).setUp()
441
442 def tearDown(self):
443 super(TestIpsecEsp1, self).tearDown()
444
445 def test_tun_46(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200446 """ipsec 4o6 tunnel"""
Neale Rannsb1fd80f2020-05-12 13:33:56 +0000447 # add an SPD entry to direct 2.2.2.2 to the v6 tunnel SA
448 p6 = self.ipv6_params
449 p4 = self.ipv4_params
450
451 p6.remote_tun_if_host4 = "2.2.2.2"
452 e = VppEnum.vl_api_ipsec_spd_action_t
453
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200454 VppIpsecSpdEntry(
455 self,
456 self.tun_spd,
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100457 p6.vpp_tun_sa_id,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200458 self.pg1.remote_addr[p4.addr_type],
459 self.pg1.remote_addr[p4.addr_type],
460 p6.remote_tun_if_host4,
461 p6.remote_tun_if_host4,
Piotr Bronowski815c6a42022-06-09 09:09:28 +0000462 socket.IPPROTO_RAW,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200463 priority=10,
464 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
465 is_outbound=1,
466 ).add_vpp_config()
467 VppIpRoute(
468 self,
469 p6.remote_tun_if_host4,
470 p4.addr_len,
471 [VppRoutePath(self.tun_if.remote_addr[p4.addr_type], 0xFFFFFFFF)],
472 ).add_vpp_config()
Neale Rannsb1fd80f2020-05-12 13:33:56 +0000473
474 old_name = self.tun6_encrypt_node_name
475 self.tun6_encrypt_node_name = "esp4-encrypt"
476
477 self.verify_tun_46(p6, count=63)
478 self.tun6_encrypt_node_name = old_name
479
480 def test_tun_64(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200481 """ipsec 6o4 tunnel"""
Neale Rannsb1fd80f2020-05-12 13:33:56 +0000482 # add an SPD entry to direct 4444::4 to the v4 tunnel SA
483 p6 = self.ipv6_params
484 p4 = self.ipv4_params
485
486 p4.remote_tun_if_host6 = "4444::4"
487 e = VppEnum.vl_api_ipsec_spd_action_t
488
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200489 VppIpsecSpdEntry(
490 self,
491 self.tun_spd,
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100492 p4.vpp_tun_sa_id,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200493 self.pg1.remote_addr[p6.addr_type],
494 self.pg1.remote_addr[p6.addr_type],
495 p4.remote_tun_if_host6,
496 p4.remote_tun_if_host6,
Piotr Bronowski815c6a42022-06-09 09:09:28 +0000497 socket.IPPROTO_RAW,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200498 priority=10,
499 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
500 is_outbound=1,
501 ).add_vpp_config()
Neale Rannsb1fd80f2020-05-12 13:33:56 +0000502 d = DpoProto.DPO_PROTO_IP6
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200503 VppIpRoute(
504 self,
505 p4.remote_tun_if_host6,
506 p6.addr_len,
507 [VppRoutePath(self.tun_if.remote_addr[p6.addr_type], 0xFFFFFFFF, proto=d)],
508 ).add_vpp_config()
Neale Rannsb1fd80f2020-05-12 13:33:56 +0000509
510 old_name = self.tun4_encrypt_node_name
511 self.tun4_encrypt_node_name = "esp6-encrypt"
512 self.verify_tun_64(p4, count=63)
513 self.tun4_encrypt_node_name = old_name
“mystarrocks”23f0c452017-12-11 07:11:51 -0800514
“mystarrocks”23f0c452017-12-11 07:11:51 -0800515
Neale Ranns041add72020-01-02 04:06:10 +0000516class TestIpsecEspTun(TemplateIpsecEsp, IpsecTun46Tests):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200517 """Ipsec ESP - TUN encap tests"""
Neale Ranns041add72020-01-02 04:06:10 +0000518
519 def setUp(self):
520 self.ipv4_params = IPsecIPv4Params()
521 self.ipv6_params = IPsecIPv6Params()
522
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200523 c = (
524 VppEnum.vl_api_tunnel_encap_decap_flags_t.TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_COPY_DSCP
525 )
526 c1 = c | (
527 VppEnum.vl_api_tunnel_encap_decap_flags_t.TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_COPY_ECN
528 )
Neale Ranns041add72020-01-02 04:06:10 +0000529
530 self.ipv4_params.tun_flags = c
531 self.ipv6_params.tun_flags = c1
532
533 super(TestIpsecEspTun, self).setUp()
534
535 def gen_pkts(self, sw_intf, src, dst, count=1, payload_size=54):
536 # set the DSCP + ECN - flags are set to copy only DSCP
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200537 return [
538 Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac)
539 / IP(src=src, dst=dst, tos=5)
540 / UDP(sport=4444, dport=4444)
541 / Raw(b"X" * payload_size)
542 for i in range(count)
543 ]
Neale Ranns041add72020-01-02 04:06:10 +0000544
Neale Ranns9ec846c2021-02-09 14:04:02 +0000545 def gen_pkts6(self, p, sw_intf, src, dst, count=1, payload_size=54):
Neale Ranns041add72020-01-02 04:06:10 +0000546 # set the DSCP + ECN - flags are set to copy both
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200547 return [
548 Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac)
549 / IPv6(src=src, dst=dst, tc=5)
550 / UDP(sport=4444, dport=4444)
551 / Raw(b"X" * payload_size)
552 for i in range(count)
553 ]
Neale Ranns041add72020-01-02 04:06:10 +0000554
555 def verify_encrypted(self, p, sa, rxs):
556 # just check that only the DSCP is copied
557 for rx in rxs:
558 self.assertEqual(rx[IP].tos, 4)
559
560 def verify_encrypted6(self, p, sa, rxs):
561 # just check that the DSCP & ECN are copied
562 for rx in rxs:
563 self.assertEqual(rx[IPv6].tc, 5)
564
565
566class TestIpsecEspTun2(TemplateIpsecEsp, IpsecTun46Tests):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200567 """Ipsec ESP - TUN DSCP tests"""
Neale Ranns041add72020-01-02 04:06:10 +0000568
569 def setUp(self):
570 self.ipv4_params = IPsecIPv4Params()
571 self.ipv6_params = IPsecIPv6Params()
572
573 self.ipv4_params.dscp = VppEnum.vl_api_ip_dscp_t.IP_API_DSCP_EF
574 self.ipv6_params.dscp = VppEnum.vl_api_ip_dscp_t.IP_API_DSCP_AF11
575
576 super(TestIpsecEspTun2, self).setUp()
577
578 def gen_pkts(self, sw_intf, src, dst, count=1, payload_size=54):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200579 return [
580 Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac)
581 / IP(src=src, dst=dst)
582 / UDP(sport=4444, dport=4444)
583 / Raw(b"X" * payload_size)
584 for i in range(count)
585 ]
Neale Ranns041add72020-01-02 04:06:10 +0000586
Neale Ranns9ec846c2021-02-09 14:04:02 +0000587 def gen_pkts6(self, p, sw_intf, src, dst, count=1, payload_size=54):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200588 return [
589 Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac)
590 / IPv6(src=src, dst=dst)
591 / UDP(sport=4444, dport=4444)
592 / Raw(b"X" * payload_size)
593 for i in range(count)
594 ]
Neale Ranns041add72020-01-02 04:06:10 +0000595
596 def verify_encrypted(self, p, sa, rxs):
Neale Ranns9ec846c2021-02-09 14:04:02 +0000597 # just check that only the DSCP is set
Neale Ranns041add72020-01-02 04:06:10 +0000598 for rx in rxs:
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200599 self.assertEqual(rx[IP].tos, VppEnum.vl_api_ip_dscp_t.IP_API_DSCP_EF << 2)
Neale Ranns041add72020-01-02 04:06:10 +0000600
601 def verify_encrypted6(self, p, sa, rxs):
Neale Ranns9ec846c2021-02-09 14:04:02 +0000602 # just check that the DSCP is set
Neale Ranns041add72020-01-02 04:06:10 +0000603 for rx in rxs:
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200604 self.assertEqual(
605 rx[IPv6].tc, VppEnum.vl_api_ip_dscp_t.IP_API_DSCP_AF11 << 2
606 )
Neale Ranns041add72020-01-02 04:06:10 +0000607
608
Klement Sekera31da2e32018-06-24 22:49:55 +0200609class TestIpsecEsp2(TemplateIpsecEsp, IpsecTcpTests):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200610 """Ipsec ESP - TCP tests"""
611
Klement Sekera31da2e32018-06-24 22:49:55 +0200612 pass
“mystarrocks”23f0c452017-12-11 07:11:51 -0800613
614
Neale Rannsfc811342021-02-26 10:35:33 +0000615class TestIpsecEspAsync(TemplateIpsecEsp):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200616 """Ipsec ESP - Aysnc tests"""
Neale Rannsfc811342021-02-26 10:35:33 +0000617
Klement Sekera8d815022021-03-15 16:58:10 +0100618 vpp_worker_count = 2
Neale Rannsfc811342021-02-26 10:35:33 +0000619
620 def setUp(self):
621 super(TestIpsecEspAsync, self).setUp()
622
Neale Rannsf16e9a52021-02-25 19:09:24 +0000623 self.p_sync = IPsecIPv4Params()
Neale Rannsfc811342021-02-26 10:35:33 +0000624
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200625 self.p_sync.crypt_algo_vpp_id = (
626 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_CBC_256
627 )
628 self.p_sync.crypt_algo = "AES-CBC" # scapy name
629 self.p_sync.crypt_key = b"JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h"
Neale Rannsfc811342021-02-26 10:35:33 +0000630
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200631 self.p_sync.scapy_tun_sa_id += 0xF0000
632 self.p_sync.scapy_tun_spi += 0xF0000
633 self.p_sync.vpp_tun_sa_id += 0xF0000
634 self.p_sync.vpp_tun_spi += 0xF0000
Neale Rannsf16e9a52021-02-25 19:09:24 +0000635 self.p_sync.remote_tun_if_host = "2.2.2.2"
Neale Rannsfc811342021-02-26 10:35:33 +0000636 e = VppEnum.vl_api_ipsec_spd_action_t
637
Neale Rannsf16e9a52021-02-25 19:09:24 +0000638 self.p_sync.sa = VppIpsecSA(
Neale Rannsfc811342021-02-26 10:35:33 +0000639 self,
Neale Rannsf16e9a52021-02-25 19:09:24 +0000640 self.p_sync.vpp_tun_sa_id,
641 self.p_sync.vpp_tun_spi,
642 self.p_sync.auth_algo_vpp_id,
643 self.p_sync.auth_key,
644 self.p_sync.crypt_algo_vpp_id,
645 self.p_sync.crypt_key,
Neale Rannsfc811342021-02-26 10:35:33 +0000646 self.vpp_esp_protocol,
Neale Rannsf16e9a52021-02-25 19:09:24 +0000647 self.tun_if.local_addr[self.p_sync.addr_type],
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200648 self.tun_if.remote_addr[self.p_sync.addr_type],
649 ).add_vpp_config()
Neale Rannsf16e9a52021-02-25 19:09:24 +0000650 self.p_sync.spd = VppIpsecSpdEntry(
Neale Rannsfc811342021-02-26 10:35:33 +0000651 self,
652 self.tun_spd,
Neale Rannsf16e9a52021-02-25 19:09:24 +0000653 self.p_sync.vpp_tun_sa_id,
654 self.pg1.remote_addr[self.p_sync.addr_type],
655 self.pg1.remote_addr[self.p_sync.addr_type],
656 self.p_sync.remote_tun_if_host,
657 self.p_sync.remote_tun_if_host,
Piotr Bronowski815c6a42022-06-09 09:09:28 +0000658 socket.IPPROTO_RAW,
Neale Rannsfc811342021-02-26 10:35:33 +0000659 priority=1,
660 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200661 is_outbound=1,
662 ).add_vpp_config()
663 VppIpRoute(
664 self,
665 self.p_sync.remote_tun_if_host,
666 self.p_sync.addr_len,
667 [VppRoutePath(self.tun_if.remote_addr[self.p_sync.addr_type], 0xFFFFFFFF)],
668 ).add_vpp_config()
Neale Rannsf16e9a52021-02-25 19:09:24 +0000669 config_tun_params(self.p_sync, self.encryption_type, self.tun_if)
670
671 self.p_async = IPsecIPv4Params()
672
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200673 self.p_async.crypt_algo_vpp_id = (
674 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_GCM_256
675 )
676 self.p_async.auth_algo_vpp_id = (
677 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_NONE
678 )
679 self.p_async.crypt_algo = "AES-GCM" # scapy name
680 self.p_async.crypt_key = b"JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h"
681 self.p_async.auth_algo = "NULL"
Neale Rannsf16e9a52021-02-25 19:09:24 +0000682
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200683 self.p_async.scapy_tun_sa_id += 0xE0000
684 self.p_async.scapy_tun_spi += 0xE0000
685 self.p_async.vpp_tun_sa_id += 0xE0000
686 self.p_async.vpp_tun_spi += 0xE0000
Neale Rannsf16e9a52021-02-25 19:09:24 +0000687 self.p_async.remote_tun_if_host = "2.2.2.3"
688
689 iflags = VppEnum.vl_api_ipsec_sad_flags_t
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200690 self.p_async.flags = (
691 iflags.IPSEC_API_SAD_FLAG_USE_ESN
692 | iflags.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY
693 | iflags.IPSEC_API_SAD_FLAG_ASYNC
694 )
Neale Rannsf16e9a52021-02-25 19:09:24 +0000695
696 self.p_async.sa = VppIpsecSA(
697 self,
698 self.p_async.vpp_tun_sa_id,
699 self.p_async.vpp_tun_spi,
700 self.p_async.auth_algo_vpp_id,
701 self.p_async.auth_key,
702 self.p_async.crypt_algo_vpp_id,
703 self.p_async.crypt_key,
704 self.vpp_esp_protocol,
705 self.tun_if.local_addr[self.p_async.addr_type],
706 self.tun_if.remote_addr[self.p_async.addr_type],
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200707 flags=self.p_async.flags,
708 ).add_vpp_config()
Neale Rannsf16e9a52021-02-25 19:09:24 +0000709 self.p_async.spd = VppIpsecSpdEntry(
710 self,
711 self.tun_spd,
712 self.p_async.vpp_tun_sa_id,
713 self.pg1.remote_addr[self.p_async.addr_type],
714 self.pg1.remote_addr[self.p_async.addr_type],
715 self.p_async.remote_tun_if_host,
716 self.p_async.remote_tun_if_host,
Piotr Bronowski815c6a42022-06-09 09:09:28 +0000717 socket.IPPROTO_RAW,
Neale Rannsf16e9a52021-02-25 19:09:24 +0000718 priority=2,
719 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200720 is_outbound=1,
721 ).add_vpp_config()
722 VppIpRoute(
723 self,
724 self.p_async.remote_tun_if_host,
725 self.p_async.addr_len,
726 [VppRoutePath(self.tun_if.remote_addr[self.p_async.addr_type], 0xFFFFFFFF)],
727 ).add_vpp_config()
Neale Rannsf16e9a52021-02-25 19:09:24 +0000728 config_tun_params(self.p_async, self.encryption_type, self.tun_if)
Neale Rannsfc811342021-02-26 10:35:33 +0000729
730 def test_dual_stream(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200731 """Alternating SAs"""
Neale Rannsf16e9a52021-02-25 19:09:24 +0000732 p = self.params[self.p_sync.addr_type]
733 self.vapi.ipsec_set_async_mode(async_enable=True)
Neale Rannsfc811342021-02-26 10:35:33 +0000734
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200735 pkts = [
736 (
737 Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac)
738 / IP(src=self.pg1.remote_ip4, dst=self.p_sync.remote_tun_if_host)
739 / UDP(sport=4444, dport=4444)
740 / Raw(b"0x0" * 200)
741 ),
742 (
743 Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac)
744 / IP(src=self.pg1.remote_ip4, dst=p.remote_tun_if_host)
745 / UDP(sport=4444, dport=4444)
746 / Raw(b"0x0" * 200)
747 ),
748 ]
Neale Rannsfc811342021-02-26 10:35:33 +0000749 pkts *= 1023
750
751 rxs = self.send_and_expect(self.pg1, pkts, self.pg0)
752
753 self.assertEqual(len(rxs), len(pkts))
754
755 for rx in rxs:
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100756 if rx[ESP].spi == p.vpp_tun_spi:
Neale Rannsfc811342021-02-26 10:35:33 +0000757 decrypted = p.vpp_tun_sa.decrypt(rx[IP])
Neale Rannsf16e9a52021-02-25 19:09:24 +0000758 elif rx[ESP].spi == self.p_sync.vpp_tun_spi:
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100759 decrypted = self.p_sync.vpp_tun_sa.decrypt(rx[IP])
Neale Rannsfc811342021-02-26 10:35:33 +0000760 else:
761 rx.show()
762 self.assertTrue(False)
763
Neale Rannsf16e9a52021-02-25 19:09:24 +0000764 self.p_sync.spd.remove_vpp_config()
765 self.p_sync.sa.remove_vpp_config()
766 self.p_async.spd.remove_vpp_config()
767 self.p_async.sa.remove_vpp_config()
768 self.vapi.ipsec_set_async_mode(async_enable=False)
769
770 def test_sync_async_noop_stream(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200771 """Alternating SAs sync/async/noop"""
Neale Rannsf16e9a52021-02-25 19:09:24 +0000772 p = self.params[self.p_sync.addr_type]
773
774 # first pin the default/noop SA to worker 0
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200775 pkts = [
776 (
777 Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac)
778 / IP(src=self.pg1.remote_ip4, dst=p.remote_tun_if_host)
779 / UDP(sport=4444, dport=4444)
780 / Raw(b"0x0" * 200)
781 )
782 ]
Neale Rannsf16e9a52021-02-25 19:09:24 +0000783 rxs = self.send_and_expect(self.pg1, pkts, self.pg0, worker=0)
784
785 self.logger.info(self.vapi.cli("sh ipsec sa"))
786 self.logger.info(self.vapi.cli("sh crypto async status"))
787
788 # then use all the other SAs on worker 1.
789 # some will handoff, other take the sync and async paths
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200790 pkts = [
791 (
792 Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac)
793 / IP(src=self.pg1.remote_ip4, dst=self.p_sync.remote_tun_if_host)
794 / UDP(sport=4444, dport=4444)
795 / Raw(b"0x0" * 200)
796 ),
797 (
798 Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac)
799 / IP(src=self.pg1.remote_ip4, dst=p.remote_tun_if_host)
800 / UDP(sport=4444, dport=4444)
801 / Raw(b"0x0" * 200)
802 ),
803 (
804 Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac)
805 / IP(src=self.pg1.remote_ip4, dst=self.p_async.remote_tun_if_host)
806 / UDP(sport=4444, dport=4444)
807 / Raw(b"0x0" * 200)
808 ),
809 ]
Neale Rannsf16e9a52021-02-25 19:09:24 +0000810 pkts *= 1023
811
812 rxs = self.send_and_expect(self.pg1, pkts, self.pg0, worker=1)
813
814 self.assertEqual(len(rxs), len(pkts))
815
816 for rx in rxs:
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100817 if rx[ESP].spi == p.vpp_tun_spi:
Neale Rannsf16e9a52021-02-25 19:09:24 +0000818 decrypted = p.vpp_tun_sa.decrypt(rx[IP])
819 elif rx[ESP].spi == self.p_sync.vpp_tun_spi:
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100820 decrypted = self.p_sync.vpp_tun_sa.decrypt(rx[IP])
Neale Rannsf16e9a52021-02-25 19:09:24 +0000821 elif rx[ESP].spi == self.p_async.vpp_tun_spi:
Arthur de Kerhor0df06b62022-11-16 18:45:24 +0100822 decrypted = self.p_async.vpp_tun_sa.decrypt(rx[IP])
Neale Rannsf16e9a52021-02-25 19:09:24 +0000823 else:
824 rx.show()
825 self.assertTrue(False)
826
827 self.p_sync.spd.remove_vpp_config()
828 self.p_sync.sa.remove_vpp_config()
829 self.p_async.spd.remove_vpp_config()
830 self.p_async.sa.remove_vpp_config()
831
Neale Rannsfc811342021-02-26 10:35:33 +0000832
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200833class TestIpsecEspHandoff(
834 TemplateIpsecEsp, IpsecTun6HandoffTests, IpsecTun4HandoffTests
835):
836 """Ipsec ESP - handoff tests"""
837
Neale Ranns4a56f4e2019-12-23 04:10:25 +0000838 pass
839
840
Neale Ranns4f33c802019-04-10 12:39:10 +0000841class TemplateIpsecEspUdp(ConfigIpsecESP):
Neale Ranns53f526b2019-02-25 14:32:02 +0000842 """
843 UDP encapped ESP
844 """
Paul Vinciguerra7f9b7f92019-03-12 19:23:27 -0700845
846 @classmethod
847 def setUpClass(cls):
848 super(TemplateIpsecEspUdp, cls).setUpClass()
849
850 @classmethod
851 def tearDownClass(cls):
852 super(TemplateIpsecEspUdp, cls).tearDownClass()
853
Neale Ranns53f526b2019-02-25 14:32:02 +0000854 def setUp(self):
855 super(TemplateIpsecEspUdp, self).setUp()
Neale Ranns4f33c802019-04-10 12:39:10 +0000856 self.net_objs = []
Neale Ranns53f526b2019-02-25 14:32:02 +0000857 self.tun_if = self.pg0
858 self.tra_if = self.pg2
859 self.logger.info(self.vapi.ppcli("show int addr"))
860
861 p = self.ipv4_params
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200862 p.flags = (
863 VppEnum.vl_api_ipsec_sad_flags_t.IPSEC_API_SAD_FLAG_UDP_ENCAP
864 | VppEnum.vl_api_ipsec_sad_flags_t.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY
865 )
Neale Ranns53f526b2019-02-25 14:32:02 +0000866 p.nat_header = UDP(sport=5454, dport=4500)
867
868 self.tra_spd = VppIpsecSpd(self, self.tra_spd_id)
869 self.tra_spd.add_vpp_config()
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200870 VppIpsecSpdItfBinding(self, self.tra_spd, self.tra_if).add_vpp_config()
Neale Ranns53f526b2019-02-25 14:32:02 +0000871
Neale Ranns4f33c802019-04-10 12:39:10 +0000872 self.config_esp_tra(p)
Neale Ranns2ac885c2019-03-20 18:24:43 +0000873 config_tra_params(p, self.encryption_type)
Neale Ranns53f526b2019-02-25 14:32:02 +0000874
875 self.tun_spd = VppIpsecSpd(self, self.tun_spd_id)
876 self.tun_spd.add_vpp_config()
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200877 VppIpsecSpdItfBinding(self, self.tun_spd, self.tun_if).add_vpp_config()
Neale Ranns53f526b2019-02-25 14:32:02 +0000878
Neale Ranns4f33c802019-04-10 12:39:10 +0000879 self.config_esp_tun(p)
Neale Ranns92e93842019-04-08 07:36:50 +0000880 self.logger.info(self.vapi.ppcli("show ipsec all"))
Neale Ranns53f526b2019-02-25 14:32:02 +0000881
882 d = DpoProto.DPO_PROTO_IP4
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200883 VppIpRoute(
884 self,
885 p.remote_tun_if_host,
886 p.addr_len,
887 [VppRoutePath(self.tun_if.remote_addr[p.addr_type], 0xFFFFFFFF, proto=d)],
888 ).add_vpp_config()
Neale Ranns53f526b2019-02-25 14:32:02 +0000889
890 def tearDown(self):
891 super(TemplateIpsecEspUdp, self).tearDown()
Paul Vinciguerra90cf21b2019-03-13 09:23:05 -0700892
893 def show_commands_at_teardown(self):
894 self.logger.info(self.vapi.cli("show hardware"))
Neale Ranns53f526b2019-02-25 14:32:02 +0000895
896
Neale Ranns49e7ef62019-04-10 17:24:29 +0000897class TestIpsecEspUdp(TemplateIpsecEspUdp, IpsecTra4Tests):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200898 """Ipsec NAT-T ESP UDP tests"""
899
Neale Ranns53f526b2019-02-25 14:32:02 +0000900 pass
901
902
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200903class MyParameters:
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000904 def __init__(self):
Neale Ranns5b891102021-06-28 13:31:28 +0000905 saf = VppEnum.vl_api_ipsec_sad_flags_t
906 flag_esn = saf.IPSEC_API_SAD_FLAG_USE_ESN
907 flag_ar = saf.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY
908 self.flags = [0, flag_esn, flag_ar]
Neale Ranns4f33c802019-04-10 12:39:10 +0000909 # foreach crypto algorithm
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000910 self.algos = {
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200911 "AES-GCM-128/NONE": {
912 "vpp-crypto": (
913 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_GCM_128
914 ),
915 "vpp-integ": (
916 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_NONE
917 ),
918 "scapy-crypto": "AES-GCM",
919 "scapy-integ": "NULL",
920 "key": b"JPjyOWBeVEQiMe7h",
921 "salt": 0,
922 },
923 "AES-GCM-192/NONE": {
924 "vpp-crypto": (
925 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_GCM_192
926 ),
927 "vpp-integ": (
928 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_NONE
929 ),
930 "scapy-crypto": "AES-GCM",
931 "scapy-integ": "NULL",
932 "key": b"JPjyOWBeVEQiMe7h01234567",
933 "salt": 1010,
934 },
935 "AES-GCM-256/NONE": {
936 "vpp-crypto": (
937 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_GCM_256
938 ),
939 "vpp-integ": (
940 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_NONE
941 ),
942 "scapy-crypto": "AES-GCM",
943 "scapy-integ": "NULL",
944 "key": b"JPjyOWBeVEQiMe7h0123456787654321",
945 "salt": 2020,
946 },
947 "AES-CBC-128/MD5-96": {
948 "vpp-crypto": (
949 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_CBC_128
950 ),
951 "vpp-integ": (
952 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_MD5_96
953 ),
954 "scapy-crypto": "AES-CBC",
955 "scapy-integ": "HMAC-MD5-96",
956 "salt": 0,
957 "key": b"JPjyOWBeVEQiMe7h",
958 },
959 "AES-CBC-192/SHA1-96": {
960 "vpp-crypto": (
961 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_CBC_192
962 ),
963 "vpp-integ": (
964 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_SHA1_96
965 ),
966 "scapy-crypto": "AES-CBC",
967 "scapy-integ": "HMAC-SHA1-96",
968 "salt": 0,
969 "key": b"JPjyOWBeVEQiMe7hJPjyOWBe",
970 },
971 "AES-CBC-256/SHA1-96": {
972 "vpp-crypto": (
973 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_CBC_256
974 ),
975 "vpp-integ": (
976 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_SHA1_96
977 ),
978 "scapy-crypto": "AES-CBC",
979 "scapy-integ": "HMAC-SHA1-96",
980 "salt": 0,
981 "key": b"JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h",
982 },
983 "3DES-CBC/SHA1-96": {
984 "vpp-crypto": (
985 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_3DES_CBC
986 ),
987 "vpp-integ": (
988 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_SHA1_96
989 ),
990 "scapy-crypto": "3DES",
991 "scapy-integ": "HMAC-SHA1-96",
992 "salt": 0,
993 "key": b"JPjyOWBeVEQiMe7h00112233",
994 },
995 "NONE/SHA1-96": {
996 "vpp-crypto": (
997 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_NONE
998 ),
999 "vpp-integ": (
1000 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_SHA1_96
1001 ),
1002 "scapy-crypto": "NULL",
1003 "scapy-integ": "HMAC-SHA1-96",
1004 "salt": 0,
1005 "key": b"JPjyOWBeVEQiMe7h00112233",
1006 },
1007 "AES-CTR-128/SHA1-96": {
1008 "vpp-crypto": (
1009 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_CTR_128
1010 ),
1011 "vpp-integ": (
1012 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_SHA1_96
1013 ),
1014 "scapy-crypto": "AES-CTR",
1015 "scapy-integ": "HMAC-SHA1-96",
1016 "salt": 0,
1017 "key": b"JPjyOWBeVEQiMe7h",
1018 },
1019 "AES-CTR-192/SHA1-96": {
1020 "vpp-crypto": (
1021 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_CTR_192
1022 ),
1023 "vpp-integ": (
1024 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_SHA1_96
1025 ),
1026 "scapy-crypto": "AES-CTR",
1027 "scapy-integ": "HMAC-SHA1-96",
1028 "salt": 1010,
1029 "key": b"JPjyOWBeVEQiMe7hJPjyOWBe",
1030 },
1031 "AES-CTR-256/SHA1-96": {
1032 "vpp-crypto": (
1033 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_CTR_256
1034 ),
1035 "vpp-integ": (
1036 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_SHA1_96
1037 ),
1038 "scapy-crypto": "AES-CTR",
1039 "scapy-integ": "HMAC-SHA1-96",
1040 "salt": 2020,
1041 "key": b"JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h",
1042 },
Benoît Ganne84e66582023-03-10 17:33:03 +01001043 "AES-NULL-GMAC-128/NONE": {
1044 "vpp-crypto": (
1045 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_NULL_GMAC_128
1046 ),
1047 "vpp-integ": (
1048 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_NONE
1049 ),
1050 "scapy-crypto": "AES-NULL-GMAC",
1051 "scapy-integ": "NULL",
1052 "key": b"JPjyOWBeVEQiMe7h",
1053 "salt": 0,
1054 },
1055 "AES-NULL-GMAC-192/NONE": {
1056 "vpp-crypto": (
1057 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_NULL_GMAC_192
1058 ),
1059 "vpp-integ": (
1060 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_NONE
1061 ),
1062 "scapy-crypto": "AES-NULL-GMAC",
1063 "scapy-integ": "NULL",
1064 "key": b"JPjyOWBeVEQiMe7h01234567",
1065 "salt": 1010,
1066 },
1067 "AES-NULL-GMAC-256/NONE": {
1068 "vpp-crypto": (
1069 VppEnum.vl_api_ipsec_crypto_alg_t.IPSEC_API_CRYPTO_ALG_AES_NULL_GMAC_256
1070 ),
1071 "vpp-integ": (
1072 VppEnum.vl_api_ipsec_integ_alg_t.IPSEC_API_INTEG_ALG_NONE
1073 ),
1074 "scapy-crypto": "AES-NULL-GMAC",
1075 "scapy-integ": "NULL",
1076 "key": b"JPjyOWBeVEQiMe7h0123456787654321",
1077 "salt": 2020,
1078 },
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001079 }
Neale Ranns4f33c802019-04-10 12:39:10 +00001080
Neale Ranns4f33c802019-04-10 12:39:10 +00001081
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001082class RunTestIpsecEspAll(ConfigIpsecESP, IpsecTra4, IpsecTra6, IpsecTun4, IpsecTun6):
1083 """Ipsec ESP all Algos"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001084
Neale Ranns8c609af2021-02-25 10:05:32 +00001085 @classmethod
1086 def setUpConstants(cls):
1087 test_args = str.split(cls.__doc__, " ")
1088 engine = test_args[0]
1089 if engine == "async":
Klement Sekera8d815022021-03-15 16:58:10 +01001090 cls.vpp_worker_count = 2
Neale Ranns8c609af2021-02-25 10:05:32 +00001091 super(RunTestIpsecEspAll, cls).setUpConstants()
1092
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001093 def setUp(self):
1094 super(RunTestIpsecEspAll, self).setUp()
1095 test_args = str.split(self.__doc__, " ")
1096
1097 params = MyParameters()
1098 self.engine = test_args[0]
1099 self.flag = params.flags[0]
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001100 if test_args[1] == "ESNon":
Neale Ranns5b891102021-06-28 13:31:28 +00001101 self.flag |= params.flags[1]
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001102 if test_args[2] == "ARon":
Neale Ranns5b891102021-06-28 13:31:28 +00001103 self.flag |= params.flags[2]
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001104
Neale Ranns5b891102021-06-28 13:31:28 +00001105 self.algo = params.algos[test_args[3]]
Neale Ranns8c609af2021-02-25 10:05:32 +00001106 self.async_mode = False
1107 if self.engine == "async":
1108 self.async_mode = True
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001109
1110 def tearDown(self):
1111 super(RunTestIpsecEspAll, self).tearDown()
1112
1113 def run_test(self):
1114 self.run_a_test(self.engine, self.flag, self.algo)
1115
Filip Tehlarefcad1a2020-02-04 09:36:04 +00001116 def run_a_test(self, engine, flag, algo, payload_size=None):
Neale Ranns8c609af2021-02-25 10:05:32 +00001117 if self.async_mode:
1118 self.vapi.cli("set ipsec async mode on")
1119 else:
1120 self.vapi.cli("set crypto handler all %s" % engine)
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001121
Neale Ranns8c609af2021-02-25 10:05:32 +00001122 self.logger.info(self.vapi.cli("show crypto async status"))
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001123 self.ipv4_params = IPsecIPv4Params()
1124 self.ipv6_params = IPsecIPv6Params()
1125
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001126 self.params = {
1127 self.ipv4_params.addr_type: self.ipv4_params,
1128 self.ipv6_params.addr_type: self.ipv6_params,
1129 }
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001130
1131 for _, p in self.params.items():
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001132 p.auth_algo_vpp_id = algo["vpp-integ"]
1133 p.crypt_algo_vpp_id = algo["vpp-crypto"]
1134 p.crypt_algo = algo["scapy-crypto"]
1135 p.auth_algo = algo["scapy-integ"]
1136 p.crypt_key = algo["key"]
1137 p.salt = algo["salt"]
Neale Ranns5b891102021-06-28 13:31:28 +00001138 p.flags = flag
Neale Ranns9ec846c2021-02-09 14:04:02 +00001139 p.outer_flow_label = 243224
Neale Ranns8c609af2021-02-25 10:05:32 +00001140 p.async_mode = self.async_mode
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001141
1142 self.reporter.send_keep_alive(self)
1143
Neale Ranns4f33c802019-04-10 12:39:10 +00001144 #
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001145 # configure the SPDs. SAs, etc
Neale Ranns4f33c802019-04-10 12:39:10 +00001146 #
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001147 self.config_network(self.params.values())
Neale Ranns4f33c802019-04-10 12:39:10 +00001148
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001149 #
1150 # run some traffic.
1151 # An exhautsive 4o6, 6o4 is not necessary
1152 # for each algo
1153 #
1154 self.verify_tra_basic6(count=NUM_PKTS)
1155 self.verify_tra_basic4(count=NUM_PKTS)
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001156 self.verify_tun_66(self.params[socket.AF_INET6], count=NUM_PKTS)
Christian Hoppsfb7e7ed2019-11-03 07:02:15 -05001157 #
1158 # Use an odd-byte payload size to check for correct padding.
1159 #
1160 # 49 + 2 == 51 which should pad +1 to 52 for 4 byte alignment, +5
1161 # to 56 for 8 byte alignment, and +13 to 64 for 64 byte alignment.
1162 # This should catch bugs where the code is incorrectly over-padding
1163 # for algorithms that don't require it
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001164 psz = 49 - len(IP() / ICMP()) if payload_size is None else payload_size
1165 self.verify_tun_44(
1166 self.params[socket.AF_INET], count=NUM_PKTS, payload_size=psz
1167 )
Neale Ranns4f33c802019-04-10 12:39:10 +00001168
Filip Tehlarefcad1a2020-02-04 09:36:04 +00001169 LARGE_PKT_SZ = [
Filip Tehlare4e8c6b2020-02-13 07:49:30 +00001170 1970, # results in 2 chained buffers entering decrypt node
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001171 # but leaving as simple buffer due to ICV removal (tra4)
PiotrX Kleskifdca4dd2020-05-05 14:14:22 +02001172 2004, # footer+ICV will be added to 2nd buffer (tun4)
Nathan Skrzypczak2c77ae42021-09-29 15:36:51 +02001173 4010, # ICV ends up splitted across 2 buffers in esp_decrypt
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001174 # for transport4; transport6 takes normal path
Filip Tehlarefcad1a2020-02-04 09:36:04 +00001175 4020, # same as above but tra4 and tra6 are switched
1176 ]
1177 if self.engine in engines_supporting_chain_bufs:
1178 for sz in LARGE_PKT_SZ:
1179 self.verify_tra_basic4(count=NUM_PKTS, payload_size=sz)
1180 self.verify_tra_basic6(count=NUM_PKTS, payload_size=sz)
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001181 self.verify_tun_66(
1182 self.params[socket.AF_INET6], count=NUM_PKTS, payload_size=sz
1183 )
1184 self.verify_tun_44(
1185 self.params[socket.AF_INET], count=NUM_PKTS, payload_size=sz
1186 )
Filip Tehlarefcad1a2020-02-04 09:36:04 +00001187
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001188 #
Neale Ranns5b891102021-06-28 13:31:28 +00001189 # reconfigure the network and SA to run the
1190 # anti replay tests
1191 #
1192 saf = VppEnum.vl_api_ipsec_sad_flags_t
1193 if flag & saf.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY:
Maxime Peim0e2f1882022-12-22 11:26:57 +00001194 for anti_replay_window_size in (
1195 64,
1196 131072,
1197 ):
1198 self.unconfig_network()
1199 self.config_anti_replay(self.params.values(), anti_replay_window_size)
1200 self.config_network(self.params.values())
1201 self.verify_tra_anti_replay()
1202 self.verify_tra_anti_replay_algorithm()
1203 self.config_anti_replay(self.params.values())
Neale Ranns5b891102021-06-28 13:31:28 +00001204
1205 self.unconfig_network()
1206 self.config_network(self.params.values())
1207 self.verify_hi_seq_num()
Neale Rannse11203e2021-09-21 12:34:19 +00001208 self.unconfig_network()
1209 self.config_network(self.params.values())
1210 self.verify_tra_lost()
Neale Ranns5b891102021-06-28 13:31:28 +00001211
1212 #
Neale Rannsf16e9a52021-02-25 19:09:24 +00001213 # swap the handlers while SAs are up
1214 #
Neale Ranns5b891102021-06-28 13:31:28 +00001215 self.unconfig_network()
1216 self.config_network(self.params.values())
Neale Rannsf16e9a52021-02-25 19:09:24 +00001217 for e in engines:
1218 if e != engine:
1219 self.vapi.cli("set crypto handler all %s" % e)
1220 self.verify_tra_basic4(count=NUM_PKTS)
1221
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001222 self.unconfig_network()
juraj.linkes11057662019-07-08 10:22:55 +02001223
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001224
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001225#
1226# To generate test classes, do:
1227# grep '# GEN' test_ipsec_esp.py | sed -e 's/# GEN //g' | bash
1228#
Neale Ranns8c609af2021-02-25 10:05:32 +00001229# GEN for ENG in native ipsecmb openssl; do \
Neale Ranns5b891102021-06-28 13:31:28 +00001230# GEN for ESN in ESNon ESNoff; do for AR in ARon ARoff; do \
1231# GEN for ALG in AES-GCM-128/NONE \
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001232# GEN AES-GCM-192/NONE AES-GCM-256/NONE AES-CBC-128/MD5-96 \
1233# GEN AES-CBC-192/SHA1-96 AES-CBC-256/SHA1-96 \
Benoît Ganne490b9272021-01-22 18:03:09 +01001234# GEN 3DES-CBC/SHA1-96 NONE/SHA1-96 \
Benoît Ganne84e66582023-03-10 17:33:03 +01001235# GEN AES-CTR-128/SHA1-96 AES-CTR-192/SHA1-96 AES-CTR-256/SHA1-96 \
1236# GEN AES-NULL-GMAC-128/NONE AES-NULL-GMAC-192/NONE AES-NULL-GMAC-256/NONE; do \
Neale Ranns5b891102021-06-28 13:31:28 +00001237# GEN echo -en "\n\nclass "
1238# GEN echo -e "Test_${ENG}_${ESN}_${AR}_${ALG}(RunTestIpsecEspAll):" |
1239# GEN sed -e 's/-/_/g' -e 's#/#_#g' ;
1240# GEN echo ' """'$ENG $ESN $AR $ALG IPSec test'"""' ;
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001241# GEN echo " def test_ipsec(self):";
Neale Ranns5b891102021-06-28 13:31:28 +00001242# GEN echo ' """'$ENG $ESN $AR $ALG IPSec test'"""' ;
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001243# GEN echo " self.run_test()";
Neale Ranns5b891102021-06-28 13:31:28 +00001244# GEN done; done; done; done
Neale Ranns8c609af2021-02-25 10:05:32 +00001245#
Neale Ranns5b891102021-06-28 13:31:28 +00001246# GEN for ESN in ESNon ESNoff; do for AR in ARon ARoff; do \
1247# GEN for ALG in \
Neale Ranns8c609af2021-02-25 10:05:32 +00001248# GEN AES-GCM-128/NONE AES-GCM-192/NONE AES-GCM-256/NONE \
1249# GEN AES-CBC-192/SHA1-96 AES-CBC-256/SHA1-96; do \
Neale Ranns5b891102021-06-28 13:31:28 +00001250# GEN echo -en "\n\nclass "
1251# GEN echo -e "Test_async_${ESN}_${AR}_${ALG}(RunTestIpsecEspAll):" |
1252# GEN sed -e 's/-/_/g' -e 's#/#_#g' ;
1253# GEN echo ' """'async $ESN $AR $ALG IPSec test'"""' ;
Neale Ranns8c609af2021-02-25 10:05:32 +00001254# GEN echo " def test_ipsec(self):";
Neale Ranns5b891102021-06-28 13:31:28 +00001255# GEN echo ' """'async $ESN $AR $ALG IPSec test'"""' ;
Neale Ranns8c609af2021-02-25 10:05:32 +00001256# GEN echo " self.run_test()";
Neale Ranns5b891102021-06-28 13:31:28 +00001257# GEN done; done; done;
1258
1259
1260class Test_native_ESNon_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1261 """native ESNon ARon AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001262
Neale Ranns5b891102021-06-28 13:31:28 +00001263 def test_ipsec(self):
1264 """native ESNon ARon AES-GCM-128/NONE IPSec test"""
1265 self.run_test()
1266
1267
1268class Test_native_ESNon_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1269 """native ESNon ARon AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001270
Neale Ranns5b891102021-06-28 13:31:28 +00001271 def test_ipsec(self):
1272 """native ESNon ARon AES-GCM-192/NONE IPSec test"""
1273 self.run_test()
1274
1275
1276class Test_native_ESNon_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1277 """native ESNon ARon AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001278
Neale Ranns5b891102021-06-28 13:31:28 +00001279 def test_ipsec(self):
1280 """native ESNon ARon AES-GCM-256/NONE IPSec test"""
1281 self.run_test()
1282
1283
1284class Test_native_ESNon_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1285 """native ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001286
Neale Ranns5b891102021-06-28 13:31:28 +00001287 def test_ipsec(self):
1288 """native ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
1289 self.run_test()
1290
1291
1292class Test_native_ESNon_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1293 """native ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001294
Neale Ranns5b891102021-06-28 13:31:28 +00001295 def test_ipsec(self):
1296 """native ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
1297 self.run_test()
1298
1299
1300class Test_native_ESNon_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1301 """native ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001302
Neale Ranns5b891102021-06-28 13:31:28 +00001303 def test_ipsec(self):
1304 """native ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
1305 self.run_test()
1306
1307
1308class Test_native_ESNon_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1309 """native ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001310
Neale Ranns5b891102021-06-28 13:31:28 +00001311 def test_ipsec(self):
1312 """native ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
1313 self.run_test()
1314
1315
1316class Test_native_ESNon_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1317 """native ESNon ARon NONE/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001318
Neale Ranns5b891102021-06-28 13:31:28 +00001319 def test_ipsec(self):
1320 """native ESNon ARon NONE/SHA1-96 IPSec test"""
1321 self.run_test()
1322
1323
1324class Test_native_ESNon_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1325 """native ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001326
Neale Ranns5b891102021-06-28 13:31:28 +00001327 def test_ipsec(self):
1328 """native ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
1329 self.run_test()
1330
1331
1332class Test_native_ESNon_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1333 """native ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001334
Neale Ranns5b891102021-06-28 13:31:28 +00001335 def test_ipsec(self):
1336 """native ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
1337 self.run_test()
1338
1339
1340class Test_native_ESNon_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1341 """native ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001342
Neale Ranns5b891102021-06-28 13:31:28 +00001343 def test_ipsec(self):
1344 """native ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
1345 self.run_test()
1346
1347
1348class Test_native_ESNon_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1349 """native ESNon ARoff AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001350
Neale Ranns5b891102021-06-28 13:31:28 +00001351 def test_ipsec(self):
1352 """native ESNon ARoff AES-GCM-128/NONE IPSec test"""
1353 self.run_test()
1354
1355
1356class Test_native_ESNon_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1357 """native ESNon ARoff AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001358
Neale Ranns5b891102021-06-28 13:31:28 +00001359 def test_ipsec(self):
1360 """native ESNon ARoff AES-GCM-192/NONE IPSec test"""
1361 self.run_test()
1362
1363
1364class Test_native_ESNon_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1365 """native ESNon ARoff AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001366
Neale Ranns5b891102021-06-28 13:31:28 +00001367 def test_ipsec(self):
1368 """native ESNon ARoff AES-GCM-256/NONE IPSec test"""
1369 self.run_test()
1370
1371
1372class Test_native_ESNon_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1373 """native ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001374
Neale Ranns5b891102021-06-28 13:31:28 +00001375 def test_ipsec(self):
1376 """native ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
1377 self.run_test()
1378
1379
1380class Test_native_ESNon_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1381 """native ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001382
Neale Ranns5b891102021-06-28 13:31:28 +00001383 def test_ipsec(self):
1384 """native ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
1385 self.run_test()
1386
1387
1388class Test_native_ESNon_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1389 """native ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001390
Neale Ranns5b891102021-06-28 13:31:28 +00001391 def test_ipsec(self):
1392 """native ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
1393 self.run_test()
1394
1395
1396class Test_native_ESNon_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1397 """native ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001398
Neale Ranns5b891102021-06-28 13:31:28 +00001399 def test_ipsec(self):
1400 """native ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
1401 self.run_test()
1402
1403
1404class Test_native_ESNon_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1405 """native ESNon ARoff NONE/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001406
Neale Ranns5b891102021-06-28 13:31:28 +00001407 def test_ipsec(self):
1408 """native ESNon ARoff NONE/SHA1-96 IPSec test"""
1409 self.run_test()
1410
1411
1412class Test_native_ESNon_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1413 """native ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001414
Neale Ranns5b891102021-06-28 13:31:28 +00001415 def test_ipsec(self):
1416 """native ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
1417 self.run_test()
1418
1419
1420class Test_native_ESNon_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1421 """native ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001422
Neale Ranns5b891102021-06-28 13:31:28 +00001423 def test_ipsec(self):
1424 """native ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
1425 self.run_test()
1426
1427
1428class Test_native_ESNon_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1429 """native ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001430
Neale Ranns5b891102021-06-28 13:31:28 +00001431 def test_ipsec(self):
1432 """native ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
1433 self.run_test()
1434
1435
1436class Test_native_ESNoff_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1437 """native ESNoff ARon AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001438
Neale Ranns5b891102021-06-28 13:31:28 +00001439 def test_ipsec(self):
1440 """native ESNoff ARon AES-GCM-128/NONE IPSec test"""
1441 self.run_test()
1442
1443
1444class Test_native_ESNoff_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1445 """native ESNoff ARon AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001446
Neale Ranns5b891102021-06-28 13:31:28 +00001447 def test_ipsec(self):
1448 """native ESNoff ARon AES-GCM-192/NONE IPSec test"""
1449 self.run_test()
1450
1451
1452class Test_native_ESNoff_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1453 """native ESNoff ARon AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001454
Neale Ranns5b891102021-06-28 13:31:28 +00001455 def test_ipsec(self):
1456 """native ESNoff ARon AES-GCM-256/NONE IPSec test"""
1457 self.run_test()
1458
1459
1460class Test_native_ESNoff_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1461 """native ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001462
Neale Ranns5b891102021-06-28 13:31:28 +00001463 def test_ipsec(self):
1464 """native ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
1465 self.run_test()
1466
1467
1468class Test_native_ESNoff_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1469 """native ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001470
Neale Ranns5b891102021-06-28 13:31:28 +00001471 def test_ipsec(self):
1472 """native ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
1473 self.run_test()
1474
1475
1476class Test_native_ESNoff_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1477 """native ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001478
Neale Ranns5b891102021-06-28 13:31:28 +00001479 def test_ipsec(self):
1480 """native ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
1481 self.run_test()
1482
1483
1484class Test_native_ESNoff_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1485 """native ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001486
Neale Ranns5b891102021-06-28 13:31:28 +00001487 def test_ipsec(self):
1488 """native ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
1489 self.run_test()
1490
1491
1492class Test_native_ESNoff_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1493 """native ESNoff ARon NONE/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001494
Neale Ranns5b891102021-06-28 13:31:28 +00001495 def test_ipsec(self):
1496 """native ESNoff ARon NONE/SHA1-96 IPSec test"""
1497 self.run_test()
1498
1499
1500class Test_native_ESNoff_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1501 """native ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001502
Neale Ranns5b891102021-06-28 13:31:28 +00001503 def test_ipsec(self):
1504 """native ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
1505 self.run_test()
1506
1507
1508class Test_native_ESNoff_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1509 """native ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001510
Neale Ranns5b891102021-06-28 13:31:28 +00001511 def test_ipsec(self):
1512 """native ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
1513 self.run_test()
1514
1515
1516class Test_native_ESNoff_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1517 """native ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001518
Neale Ranns5b891102021-06-28 13:31:28 +00001519 def test_ipsec(self):
1520 """native ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
1521 self.run_test()
1522
1523
1524class Test_native_ESNoff_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1525 """native ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001526
Neale Ranns5b891102021-06-28 13:31:28 +00001527 def test_ipsec(self):
1528 """native ESNoff ARoff AES-GCM-128/NONE IPSec test"""
1529 self.run_test()
1530
1531
1532class Test_native_ESNoff_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1533 """native ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001534
Neale Ranns5b891102021-06-28 13:31:28 +00001535 def test_ipsec(self):
1536 """native ESNoff ARoff AES-GCM-192/NONE IPSec test"""
1537 self.run_test()
1538
1539
1540class Test_native_ESNoff_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1541 """native ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001542
Neale Ranns5b891102021-06-28 13:31:28 +00001543 def test_ipsec(self):
1544 """native ESNoff ARoff AES-GCM-256/NONE IPSec test"""
1545 self.run_test()
1546
1547
1548class Test_native_ESNoff_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1549 """native ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001550
Neale Ranns5b891102021-06-28 13:31:28 +00001551 def test_ipsec(self):
1552 """native ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
1553 self.run_test()
1554
1555
1556class Test_native_ESNoff_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1557 """native ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001558
Neale Ranns5b891102021-06-28 13:31:28 +00001559 def test_ipsec(self):
1560 """native ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
1561 self.run_test()
1562
1563
1564class Test_native_ESNoff_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1565 """native ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001566
Neale Ranns5b891102021-06-28 13:31:28 +00001567 def test_ipsec(self):
1568 """native ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
1569 self.run_test()
1570
1571
1572class Test_native_ESNoff_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1573 """native ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001574
Neale Ranns5b891102021-06-28 13:31:28 +00001575 def test_ipsec(self):
1576 """native ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
1577 self.run_test()
1578
1579
1580class Test_native_ESNoff_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1581 """native ESNoff ARoff NONE/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001582
Neale Ranns5b891102021-06-28 13:31:28 +00001583 def test_ipsec(self):
1584 """native ESNoff ARoff NONE/SHA1-96 IPSec test"""
1585 self.run_test()
1586
1587
1588class Test_native_ESNoff_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1589 """native ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001590
Neale Ranns5b891102021-06-28 13:31:28 +00001591 def test_ipsec(self):
1592 """native ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
1593 self.run_test()
1594
1595
1596class Test_native_ESNoff_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1597 """native ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001598
Neale Ranns5b891102021-06-28 13:31:28 +00001599 def test_ipsec(self):
1600 """native ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
1601 self.run_test()
1602
1603
1604class Test_native_ESNoff_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1605 """native ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001606
Neale Ranns5b891102021-06-28 13:31:28 +00001607 def test_ipsec(self):
1608 """native ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
1609 self.run_test()
1610
1611
1612class Test_ipsecmb_ESNon_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1613 """ipsecmb ESNon ARon AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001614
Neale Ranns5b891102021-06-28 13:31:28 +00001615 def test_ipsec(self):
1616 """ipsecmb ESNon ARon AES-GCM-128/NONE IPSec test"""
1617 self.run_test()
1618
1619
1620class Test_ipsecmb_ESNon_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1621 """ipsecmb ESNon ARon AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001622
Neale Ranns5b891102021-06-28 13:31:28 +00001623 def test_ipsec(self):
1624 """ipsecmb ESNon ARon AES-GCM-192/NONE IPSec test"""
1625 self.run_test()
1626
1627
1628class Test_ipsecmb_ESNon_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1629 """ipsecmb ESNon ARon AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001630
Neale Ranns5b891102021-06-28 13:31:28 +00001631 def test_ipsec(self):
1632 """ipsecmb ESNon ARon AES-GCM-256/NONE IPSec test"""
1633 self.run_test()
1634
1635
1636class Test_ipsecmb_ESNon_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1637 """ipsecmb ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001638
Neale Ranns5b891102021-06-28 13:31:28 +00001639 def test_ipsec(self):
1640 """ipsecmb ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
1641 self.run_test()
1642
1643
1644class Test_ipsecmb_ESNon_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1645 """ipsecmb ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001646
Neale Ranns5b891102021-06-28 13:31:28 +00001647 def test_ipsec(self):
1648 """ipsecmb ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
1649 self.run_test()
1650
1651
1652class Test_ipsecmb_ESNon_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1653 """ipsecmb ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001654
Neale Ranns5b891102021-06-28 13:31:28 +00001655 def test_ipsec(self):
1656 """ipsecmb ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
1657 self.run_test()
1658
1659
1660class Test_ipsecmb_ESNon_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1661 """ipsecmb ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001662
Neale Ranns5b891102021-06-28 13:31:28 +00001663 def test_ipsec(self):
1664 """ipsecmb ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
1665 self.run_test()
1666
1667
1668class Test_ipsecmb_ESNon_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1669 """ipsecmb ESNon ARon NONE/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001670
Neale Ranns5b891102021-06-28 13:31:28 +00001671 def test_ipsec(self):
1672 """ipsecmb ESNon ARon NONE/SHA1-96 IPSec test"""
1673 self.run_test()
1674
1675
1676class Test_ipsecmb_ESNon_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1677 """ipsecmb ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001678
Neale Ranns5b891102021-06-28 13:31:28 +00001679 def test_ipsec(self):
1680 """ipsecmb ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
1681 self.run_test()
1682
1683
1684class Test_ipsecmb_ESNon_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1685 """ipsecmb ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001686
Neale Ranns5b891102021-06-28 13:31:28 +00001687 def test_ipsec(self):
1688 """ipsecmb ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
1689 self.run_test()
1690
1691
1692class Test_ipsecmb_ESNon_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1693 """ipsecmb ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001694
Neale Ranns5b891102021-06-28 13:31:28 +00001695 def test_ipsec(self):
1696 """ipsecmb ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
1697 self.run_test()
1698
1699
1700class Test_ipsecmb_ESNon_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1701 """ipsecmb ESNon ARoff AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001702
Neale Ranns5b891102021-06-28 13:31:28 +00001703 def test_ipsec(self):
1704 """ipsecmb ESNon ARoff AES-GCM-128/NONE IPSec test"""
1705 self.run_test()
1706
1707
1708class Test_ipsecmb_ESNon_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1709 """ipsecmb ESNon ARoff AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001710
Neale Ranns5b891102021-06-28 13:31:28 +00001711 def test_ipsec(self):
1712 """ipsecmb ESNon ARoff AES-GCM-192/NONE IPSec test"""
1713 self.run_test()
1714
1715
1716class Test_ipsecmb_ESNon_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1717 """ipsecmb ESNon ARoff AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001718
Neale Ranns5b891102021-06-28 13:31:28 +00001719 def test_ipsec(self):
1720 """ipsecmb ESNon ARoff AES-GCM-256/NONE IPSec test"""
1721 self.run_test()
1722
1723
1724class Test_ipsecmb_ESNon_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1725 """ipsecmb ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001726
Neale Ranns5b891102021-06-28 13:31:28 +00001727 def test_ipsec(self):
1728 """ipsecmb ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
1729 self.run_test()
1730
1731
1732class Test_ipsecmb_ESNon_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1733 """ipsecmb ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001734
Neale Ranns5b891102021-06-28 13:31:28 +00001735 def test_ipsec(self):
1736 """ipsecmb ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
1737 self.run_test()
1738
1739
1740class Test_ipsecmb_ESNon_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1741 """ipsecmb ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001742
Neale Ranns5b891102021-06-28 13:31:28 +00001743 def test_ipsec(self):
1744 """ipsecmb ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
1745 self.run_test()
1746
1747
1748class Test_ipsecmb_ESNon_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1749 """ipsecmb ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001750
Neale Ranns5b891102021-06-28 13:31:28 +00001751 def test_ipsec(self):
1752 """ipsecmb ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
1753 self.run_test()
1754
1755
1756class Test_ipsecmb_ESNon_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1757 """ipsecmb ESNon ARoff NONE/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001758
Neale Ranns5b891102021-06-28 13:31:28 +00001759 def test_ipsec(self):
1760 """ipsecmb ESNon ARoff NONE/SHA1-96 IPSec test"""
1761 self.run_test()
1762
1763
1764class Test_ipsecmb_ESNon_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1765 """ipsecmb ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001766
Neale Ranns5b891102021-06-28 13:31:28 +00001767 def test_ipsec(self):
1768 """ipsecmb ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
1769 self.run_test()
1770
1771
1772class Test_ipsecmb_ESNon_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1773 """ipsecmb ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001774
Neale Ranns5b891102021-06-28 13:31:28 +00001775 def test_ipsec(self):
1776 """ipsecmb ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
1777 self.run_test()
1778
1779
1780class Test_ipsecmb_ESNon_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1781 """ipsecmb ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001782
Neale Ranns5b891102021-06-28 13:31:28 +00001783 def test_ipsec(self):
1784 """ipsecmb ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
1785 self.run_test()
1786
1787
1788class Test_ipsecmb_ESNoff_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1789 """ipsecmb ESNoff ARon AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001790
Neale Ranns5b891102021-06-28 13:31:28 +00001791 def test_ipsec(self):
1792 """ipsecmb ESNoff ARon AES-GCM-128/NONE IPSec test"""
1793 self.run_test()
1794
1795
1796class Test_ipsecmb_ESNoff_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1797 """ipsecmb ESNoff ARon AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001798
Neale Ranns5b891102021-06-28 13:31:28 +00001799 def test_ipsec(self):
1800 """ipsecmb ESNoff ARon AES-GCM-192/NONE IPSec test"""
1801 self.run_test()
1802
1803
1804class Test_ipsecmb_ESNoff_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1805 """ipsecmb ESNoff ARon AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001806
Neale Ranns5b891102021-06-28 13:31:28 +00001807 def test_ipsec(self):
1808 """ipsecmb ESNoff ARon AES-GCM-256/NONE IPSec test"""
1809 self.run_test()
1810
1811
1812class Test_ipsecmb_ESNoff_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1813 """ipsecmb ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001814
Neale Ranns5b891102021-06-28 13:31:28 +00001815 def test_ipsec(self):
1816 """ipsecmb ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
1817 self.run_test()
1818
1819
1820class Test_ipsecmb_ESNoff_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1821 """ipsecmb ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001822
Neale Ranns5b891102021-06-28 13:31:28 +00001823 def test_ipsec(self):
1824 """ipsecmb ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
1825 self.run_test()
1826
1827
1828class Test_ipsecmb_ESNoff_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1829 """ipsecmb ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001830
Neale Ranns5b891102021-06-28 13:31:28 +00001831 def test_ipsec(self):
1832 """ipsecmb ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
1833 self.run_test()
1834
1835
1836class Test_ipsecmb_ESNoff_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1837 """ipsecmb ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001838
Neale Ranns5b891102021-06-28 13:31:28 +00001839 def test_ipsec(self):
1840 """ipsecmb ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
1841 self.run_test()
1842
1843
1844class Test_ipsecmb_ESNoff_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1845 """ipsecmb ESNoff ARon NONE/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001846
Neale Ranns5b891102021-06-28 13:31:28 +00001847 def test_ipsec(self):
1848 """ipsecmb ESNoff ARon NONE/SHA1-96 IPSec test"""
1849 self.run_test()
1850
1851
1852class Test_ipsecmb_ESNoff_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1853 """ipsecmb ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001854
Neale Ranns5b891102021-06-28 13:31:28 +00001855 def test_ipsec(self):
1856 """ipsecmb ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
1857 self.run_test()
1858
1859
1860class Test_ipsecmb_ESNoff_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1861 """ipsecmb ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001862
Neale Ranns5b891102021-06-28 13:31:28 +00001863 def test_ipsec(self):
1864 """ipsecmb ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
1865 self.run_test()
Neale Ranns4f33c802019-04-10 12:39:10 +00001866
Neale Ranns4f33c802019-04-10 12:39:10 +00001867
Neale Ranns5b891102021-06-28 13:31:28 +00001868class Test_ipsecmb_ESNoff_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1869 """ipsecmb ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001870
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001871 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001872 """ipsecmb ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001873 self.run_test()
Neale Ranns4f33c802019-04-10 12:39:10 +00001874
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001875
Neale Ranns5b891102021-06-28 13:31:28 +00001876class Test_ipsecmb_ESNoff_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1877 """ipsecmb ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001878
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001879 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001880 """ipsecmb ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001881 self.run_test()
1882
1883
Neale Ranns5b891102021-06-28 13:31:28 +00001884class Test_ipsecmb_ESNoff_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1885 """ipsecmb ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001886
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001887 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001888 """ipsecmb ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001889 self.run_test()
1890
1891
Neale Ranns5b891102021-06-28 13:31:28 +00001892class Test_ipsecmb_ESNoff_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1893 """ipsecmb ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001894
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001895 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001896 """ipsecmb ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001897 self.run_test()
1898
1899
Neale Ranns5b891102021-06-28 13:31:28 +00001900class Test_ipsecmb_ESNoff_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1901 """ipsecmb ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001902
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001903 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001904 """ipsecmb ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001905 self.run_test()
1906
1907
Neale Ranns5b891102021-06-28 13:31:28 +00001908class Test_ipsecmb_ESNoff_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1909 """ipsecmb ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001910
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001911 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001912 """ipsecmb ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001913 self.run_test()
1914
1915
Neale Ranns5b891102021-06-28 13:31:28 +00001916class Test_ipsecmb_ESNoff_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1917 """ipsecmb ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001918
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001919 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001920 """ipsecmb ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001921 self.run_test()
1922
1923
Neale Ranns5b891102021-06-28 13:31:28 +00001924class Test_ipsecmb_ESNoff_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1925 """ipsecmb ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001926
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001927 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001928 """ipsecmb ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001929 self.run_test()
1930
1931
Neale Ranns5b891102021-06-28 13:31:28 +00001932class Test_ipsecmb_ESNoff_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1933 """ipsecmb ESNoff ARoff NONE/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001934
Benoît Ganne490b9272021-01-22 18:03:09 +01001935 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001936 """ipsecmb ESNoff ARoff NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001937 self.run_test()
1938
1939
Neale Ranns5b891102021-06-28 13:31:28 +00001940class Test_ipsecmb_ESNoff_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1941 """ipsecmb ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001942
Benoît Ganne490b9272021-01-22 18:03:09 +01001943 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001944 """ipsecmb ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001945 self.run_test()
1946
1947
Neale Ranns5b891102021-06-28 13:31:28 +00001948class Test_ipsecmb_ESNoff_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1949 """ipsecmb ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001950
Benoît Ganne490b9272021-01-22 18:03:09 +01001951 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001952 """ipsecmb ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001953 self.run_test()
1954
1955
Neale Ranns5b891102021-06-28 13:31:28 +00001956class Test_ipsecmb_ESNoff_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1957 """ipsecmb ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001958
Neale Ranns9c23ff82021-06-25 13:30:50 +00001959 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001960 """ipsecmb ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001961 self.run_test()
1962
1963
Neale Ranns5b891102021-06-28 13:31:28 +00001964class Test_openssl_ESNon_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1965 """openssl ESNon ARon AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001966
Neale Ranns9c23ff82021-06-25 13:30:50 +00001967 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001968 """openssl ESNon ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001969 self.run_test()
1970
1971
Neale Ranns5b891102021-06-28 13:31:28 +00001972class Test_openssl_ESNon_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1973 """openssl ESNon ARon AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001974
Neale Ranns9c23ff82021-06-25 13:30:50 +00001975 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001976 """openssl ESNon ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001977 self.run_test()
1978
1979
Neale Ranns5b891102021-06-28 13:31:28 +00001980class Test_openssl_ESNon_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1981 """openssl ESNon ARon AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001982
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001983 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001984 """openssl ESNon ARon AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001985 self.run_test()
1986
1987
Neale Ranns5b891102021-06-28 13:31:28 +00001988class Test_openssl_ESNon_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1989 """openssl ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001990
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001991 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001992 """openssl ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001993 self.run_test()
1994
1995
Neale Ranns5b891102021-06-28 13:31:28 +00001996class Test_openssl_ESNon_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1997 """openssl ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001998
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001999 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002000 """openssl ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002001 self.run_test()
2002
2003
Neale Ranns5b891102021-06-28 13:31:28 +00002004class Test_openssl_ESNon_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
2005 """openssl ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002006
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002007 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002008 """openssl ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002009 self.run_test()
2010
2011
Neale Ranns5b891102021-06-28 13:31:28 +00002012class Test_openssl_ESNon_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
2013 """openssl ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002014
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002015 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002016 """openssl ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002017 self.run_test()
2018
2019
Neale Ranns5b891102021-06-28 13:31:28 +00002020class Test_openssl_ESNon_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
2021 """openssl ESNon ARon NONE/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002022
Benoît Ganne490b9272021-01-22 18:03:09 +01002023 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002024 """openssl ESNon ARon NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002025 self.run_test()
2026
2027
Neale Ranns5b891102021-06-28 13:31:28 +00002028class Test_openssl_ESNon_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
2029 """openssl ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002030
Benoît Ganne490b9272021-01-22 18:03:09 +01002031 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002032 """openssl ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002033 self.run_test()
2034
2035
Neale Ranns5b891102021-06-28 13:31:28 +00002036class Test_openssl_ESNon_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
2037 """openssl ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002038
Benoît Ganne490b9272021-01-22 18:03:09 +01002039 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002040 """openssl ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002041 self.run_test()
2042
2043
Neale Ranns5b891102021-06-28 13:31:28 +00002044class Test_openssl_ESNon_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
2045 """openssl ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002046
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002047 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002048 """openssl ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002049 self.run_test()
2050
2051
Benoît Ganne84e66582023-03-10 17:33:03 +01002052class Test_openssl_ESNon_ARon_AES_NULL_GMAC_128_NONE(RunTestIpsecEspAll):
2053 """openssl ESNon ARon AES-NULL-GMAC-128/NONE IPSec test"""
2054
2055 def test_ipsec(self):
2056 """openssl ESNon ARon AES-NULL-GMAC-128/NONE IPSec test"""
2057 self.run_test()
2058
2059
2060class Test_openssl_ESNon_ARon_AES_NULL_GMAC_192_NONE(RunTestIpsecEspAll):
2061 """openssl ESNon ARon AES-NULL-GMAC-192/NONE IPSec test"""
2062
2063 def test_ipsec(self):
2064 """openssl ESNon ARon AES-NULL-GMAC-192/NONE IPSec test"""
2065 self.run_test()
2066
2067
2068class Test_openssl_ESNon_ARon_AES_NULL_GMAC_256_NONE(RunTestIpsecEspAll):
2069 """openssl ESNon ARon AES-NULL-GMAC-256/NONE IPSec test"""
2070
2071 def test_ipsec(self):
2072 """openssl ESNon ARon AES-NULL-GMAC-256/NONE IPSec test"""
2073 self.run_test()
2074
2075
Neale Ranns5b891102021-06-28 13:31:28 +00002076class Test_openssl_ESNon_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
2077 """openssl ESNon ARoff AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002078
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002079 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002080 """openssl ESNon ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002081 self.run_test()
2082
2083
Neale Ranns5b891102021-06-28 13:31:28 +00002084class Test_openssl_ESNon_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
2085 """openssl ESNon ARoff AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002086
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002087 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002088 """openssl ESNon ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002089 self.run_test()
2090
2091
Neale Ranns5b891102021-06-28 13:31:28 +00002092class Test_openssl_ESNon_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
2093 """openssl ESNon ARoff AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002094
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002095 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002096 """openssl ESNon ARoff AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002097 self.run_test()
2098
2099
Neale Ranns5b891102021-06-28 13:31:28 +00002100class Test_openssl_ESNon_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
2101 """openssl ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002102
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002103 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002104 """openssl ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002105 self.run_test()
2106
2107
Neale Ranns5b891102021-06-28 13:31:28 +00002108class Test_openssl_ESNon_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
2109 """openssl ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002110
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002111 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002112 """openssl ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002113 self.run_test()
2114
2115
Neale Ranns5b891102021-06-28 13:31:28 +00002116class Test_openssl_ESNon_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
2117 """openssl ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002118
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002119 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002120 """openssl ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002121 self.run_test()
2122
2123
Neale Ranns5b891102021-06-28 13:31:28 +00002124class Test_openssl_ESNon_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
2125 """openssl ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002126
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002127 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002128 """openssl ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002129 self.run_test()
2130
2131
Neale Ranns5b891102021-06-28 13:31:28 +00002132class Test_openssl_ESNon_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
2133 """openssl ESNon ARoff NONE/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002134
Benoît Ganne490b9272021-01-22 18:03:09 +01002135 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002136 """openssl ESNon ARoff NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002137 self.run_test()
2138
2139
Neale Ranns5b891102021-06-28 13:31:28 +00002140class Test_openssl_ESNon_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
2141 """openssl ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002142
Benoît Ganne490b9272021-01-22 18:03:09 +01002143 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002144 """openssl ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002145 self.run_test()
2146
2147
Neale Ranns5b891102021-06-28 13:31:28 +00002148class Test_openssl_ESNon_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
2149 """openssl ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002150
Benoît Ganne490b9272021-01-22 18:03:09 +01002151 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002152 """openssl ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002153 self.run_test()
2154
2155
Neale Ranns5b891102021-06-28 13:31:28 +00002156class Test_openssl_ESNon_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
2157 """openssl ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002158
Neale Ranns9c23ff82021-06-25 13:30:50 +00002159 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002160 """openssl ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002161 self.run_test()
2162
2163
Benoît Ganne84e66582023-03-10 17:33:03 +01002164class Test_openssl_ESNon_ARoff_AES_NULL_GMAC_128_NONE(RunTestIpsecEspAll):
2165 """openssl ESNon ARoff AES-NULL-GMAC-128/NONE IPSec test"""
2166
2167 def test_ipsec(self):
2168 """openssl ESNon ARoff AES-NULL-GMAC-128/NONE IPSec test"""
2169 self.run_test()
2170
2171
2172class Test_openssl_ESNon_ARoff_AES_NULL_GMAC_192_NONE(RunTestIpsecEspAll):
2173 """openssl ESNon ARoff AES-NULL-GMAC-192/NONE IPSec test"""
2174
2175 def test_ipsec(self):
2176 """openssl ESNon ARoff AES-NULL-GMAC-192/NONE IPSec test"""
2177 self.run_test()
2178
2179
2180class Test_openssl_ESNon_ARoff_AES_NULL_GMAC_256_NONE(RunTestIpsecEspAll):
2181 """openssl ESNon ARoff AES-NULL-GMAC-256/NONE IPSec test"""
2182
2183 def test_ipsec(self):
2184 """openssl ESNon ARoff AES-NULL-GMAC-256/NONE IPSec test"""
2185 self.run_test()
2186
2187
Neale Ranns5b891102021-06-28 13:31:28 +00002188class Test_openssl_ESNoff_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
2189 """openssl ESNoff ARon AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002190
Neale Ranns9c23ff82021-06-25 13:30:50 +00002191 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002192 """openssl ESNoff ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002193 self.run_test()
2194
2195
Neale Ranns5b891102021-06-28 13:31:28 +00002196class Test_openssl_ESNoff_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
2197 """openssl ESNoff ARon AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002198
Neale Ranns9c23ff82021-06-25 13:30:50 +00002199 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002200 """openssl ESNoff ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002201 self.run_test()
2202
2203
Neale Ranns5b891102021-06-28 13:31:28 +00002204class Test_openssl_ESNoff_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
2205 """openssl ESNoff ARon AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002206
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002207 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002208 """openssl ESNoff ARon AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002209 self.run_test()
2210
2211
Neale Ranns5b891102021-06-28 13:31:28 +00002212class Test_openssl_ESNoff_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
2213 """openssl ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002214
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002215 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002216 """openssl ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002217 self.run_test()
2218
2219
Neale Ranns5b891102021-06-28 13:31:28 +00002220class Test_openssl_ESNoff_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
2221 """openssl ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002222
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002223 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002224 """openssl ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002225 self.run_test()
2226
2227
Neale Ranns5b891102021-06-28 13:31:28 +00002228class Test_openssl_ESNoff_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
2229 """openssl ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002230
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002231 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002232 """openssl ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002233 self.run_test()
2234
2235
Neale Ranns5b891102021-06-28 13:31:28 +00002236class Test_openssl_ESNoff_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
2237 """openssl ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002238
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002239 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002240 """openssl ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002241 self.run_test()
2242
2243
Neale Ranns5b891102021-06-28 13:31:28 +00002244class Test_openssl_ESNoff_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
2245 """openssl ESNoff ARon NONE/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002246
Benoît Ganne490b9272021-01-22 18:03:09 +01002247 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002248 """openssl ESNoff ARon NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002249 self.run_test()
2250
2251
Neale Ranns5b891102021-06-28 13:31:28 +00002252class Test_openssl_ESNoff_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
2253 """openssl ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002254
Benoît Ganne490b9272021-01-22 18:03:09 +01002255 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002256 """openssl ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002257 self.run_test()
2258
2259
Neale Ranns5b891102021-06-28 13:31:28 +00002260class Test_openssl_ESNoff_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
2261 """openssl ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002262
Benoît Ganne490b9272021-01-22 18:03:09 +01002263 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002264 """openssl ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002265 self.run_test()
2266
2267
Neale Ranns5b891102021-06-28 13:31:28 +00002268class Test_openssl_ESNoff_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
2269 """openssl ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002270
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002271 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002272 """openssl ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002273 self.run_test()
2274
2275
Benoît Ganne84e66582023-03-10 17:33:03 +01002276class Test_openssl_ESNoff_ARon_AES_NULL_GMAC_128_NONE(RunTestIpsecEspAll):
2277 """openssl ESNoff ARon AES-NULL-GMAC-128/NONE IPSec test"""
2278
2279 def test_ipsec(self):
2280 """openssl ESNoff ARon AES-NULL-GMAC-128/NONE IPSec test"""
2281 self.run_test()
2282
2283
2284class Test_openssl_ESNoff_ARon_AES_NULL_GMAC_192_NONE(RunTestIpsecEspAll):
2285 """openssl ESNoff ARon AES-NULL-GMAC-192/NONE IPSec test"""
2286
2287 def test_ipsec(self):
2288 """openssl ESNoff ARon AES-NULL-GMAC-192/NONE IPSec test"""
2289 self.run_test()
2290
2291
2292class Test_openssl_ESNoff_ARon_AES_NULL_GMAC_256_NONE(RunTestIpsecEspAll):
2293 """openssl ESNoff ARon AES-NULL-GMAC-256/NONE IPSec test"""
2294
2295 def test_ipsec(self):
2296 """openssl ESNoff ARon AES-NULL-GMAC-256/NONE IPSec test"""
2297 self.run_test()
2298
2299
Neale Ranns5b891102021-06-28 13:31:28 +00002300class Test_openssl_ESNoff_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
2301 """openssl ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002302
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002303 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002304 """openssl ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002305 self.run_test()
2306
2307
Neale Ranns5b891102021-06-28 13:31:28 +00002308class Test_openssl_ESNoff_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
2309 """openssl ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002310
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002311 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002312 """openssl ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002313 self.run_test()
2314
2315
Neale Ranns5b891102021-06-28 13:31:28 +00002316class Test_openssl_ESNoff_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
2317 """openssl ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002318
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002319 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002320 """openssl ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002321 self.run_test()
2322
2323
Neale Ranns5b891102021-06-28 13:31:28 +00002324class Test_openssl_ESNoff_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
2325 """openssl ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002326
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002327 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002328 """openssl ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002329 self.run_test()
2330
2331
Neale Ranns5b891102021-06-28 13:31:28 +00002332class Test_openssl_ESNoff_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
2333 """openssl ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002334
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002335 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002336 """openssl ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002337 self.run_test()
2338
2339
Neale Ranns5b891102021-06-28 13:31:28 +00002340class Test_openssl_ESNoff_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
2341 """openssl ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002342
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002343 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002344 """openssl ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002345 self.run_test()
2346
2347
Neale Ranns5b891102021-06-28 13:31:28 +00002348class Test_openssl_ESNoff_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
2349 """openssl ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002350
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002351 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002352 """openssl ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002353 self.run_test()
2354
2355
Neale Ranns5b891102021-06-28 13:31:28 +00002356class Test_openssl_ESNoff_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
2357 """openssl ESNoff ARoff NONE/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002358
Benoît Ganne490b9272021-01-22 18:03:09 +01002359 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002360 """openssl ESNoff ARoff NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002361 self.run_test()
2362
2363
Neale Ranns5b891102021-06-28 13:31:28 +00002364class Test_openssl_ESNoff_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
2365 """openssl ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002366
Benoît Ganne490b9272021-01-22 18:03:09 +01002367 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002368 """openssl ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002369 self.run_test()
2370
2371
Neale Ranns5b891102021-06-28 13:31:28 +00002372class Test_openssl_ESNoff_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
2373 """openssl ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002374
Benoît Ganne490b9272021-01-22 18:03:09 +01002375 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002376 """openssl ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002377 self.run_test()
2378
2379
Neale Ranns5b891102021-06-28 13:31:28 +00002380class Test_openssl_ESNoff_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
2381 """openssl ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002382
Neale Ranns9c23ff82021-06-25 13:30:50 +00002383 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002384 """openssl ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002385 self.run_test()
2386
2387
Benoît Ganne84e66582023-03-10 17:33:03 +01002388class Test_openssl_ESNoff_ARoff_AES_NULL_GMAC_128_NONE(RunTestIpsecEspAll):
2389 """openssl ESNoff ARoff AES-NULL-GMAC-128/NONE IPSec test"""
2390
2391 def test_ipsec(self):
2392 """openssl ESNoff ARoff AES-NULL-GMAC-128/NONE IPSec test"""
2393 self.run_test()
2394
2395
2396class Test_openssl_ESNoff_ARoff_AES_NULL_GMAC_192_NONE(RunTestIpsecEspAll):
2397 """openssl ESNoff ARoff AES-NULL-GMAC-192/NONE IPSec test"""
2398
2399 def test_ipsec(self):
2400 """openssl ESNoff ARoff AES-NULL-GMAC-192/NONE IPSec test"""
2401 self.run_test()
2402
2403
2404class Test_openssl_ESNoff_ARoff_AES_NULL_GMAC_256_NONE(RunTestIpsecEspAll):
2405 """openssl ESNoff ARoff AES-NULL-GMAC-256/NONE IPSec test"""
2406
2407 def test_ipsec(self):
2408 """openssl ESNoff ARoff AES-NULL-GMAC-256/NONE IPSec test"""
2409 self.run_test()
2410
2411
Neale Ranns5b891102021-06-28 13:31:28 +00002412class Test_async_ESNon_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
2413 """async ESNon ARon AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002414
Neale Ranns9c23ff82021-06-25 13:30:50 +00002415 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002416 """async ESNon ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002417 self.run_test()
2418
2419
Neale Ranns5b891102021-06-28 13:31:28 +00002420class Test_async_ESNon_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
2421 """async ESNon ARon AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002422
Neale Ranns9c23ff82021-06-25 13:30:50 +00002423 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002424 """async ESNon ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002425 self.run_test()
2426
2427
Neale Ranns5b891102021-06-28 13:31:28 +00002428class Test_async_ESNon_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
2429 """async ESNon ARon AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002430
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002431 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002432 """async ESNon ARon AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002433 self.run_test()
2434
2435
Neale Ranns5b891102021-06-28 13:31:28 +00002436class Test_async_ESNon_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
2437 """async ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002438
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002439 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002440 """async ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002441 self.run_test()
2442
2443
Neale Ranns5b891102021-06-28 13:31:28 +00002444class Test_async_ESNon_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
2445 """async ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002446
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002447 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002448 """async ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002449 self.run_test()
2450
2451
Neale Ranns5b891102021-06-28 13:31:28 +00002452class Test_async_ESNon_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
2453 """async ESNon ARoff AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002454
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002455 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002456 """async ESNon ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002457 self.run_test()
2458
2459
Neale Ranns5b891102021-06-28 13:31:28 +00002460class Test_async_ESNon_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
2461 """async ESNon ARoff AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002462
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002463 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002464 """async ESNon ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00002465 self.run_test()
Neale Ranns6afaae12019-07-17 15:07:14 +00002466
Neale Ranns4f33c802019-04-10 12:39:10 +00002467
Neale Ranns5b891102021-06-28 13:31:28 +00002468class Test_async_ESNon_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
2469 """async ESNon ARoff AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002470
Benoît Ganne490b9272021-01-22 18:03:09 +01002471 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002472 """async ESNon ARoff AES-GCM-256/NONE IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002473 self.run_test()
2474
2475
Neale Ranns5b891102021-06-28 13:31:28 +00002476class Test_async_ESNon_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
2477 """async ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002478
Benoît Ganne490b9272021-01-22 18:03:09 +01002479 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002480 """async ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002481 self.run_test()
2482
2483
Neale Ranns5b891102021-06-28 13:31:28 +00002484class Test_async_ESNon_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
2485 """async ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002486
Benoît Ganne490b9272021-01-22 18:03:09 +01002487 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002488 """async ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002489 self.run_test()
2490
2491
Neale Ranns5b891102021-06-28 13:31:28 +00002492class Test_async_ESNoff_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
2493 """async ESNoff ARon AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002494
Neale Ranns8c609af2021-02-25 10:05:32 +00002495 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002496 """async ESNoff ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002497 self.run_test()
2498
2499
Neale Ranns5b891102021-06-28 13:31:28 +00002500class Test_async_ESNoff_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
2501 """async ESNoff ARon AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002502
Neale Ranns8c609af2021-02-25 10:05:32 +00002503 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002504 """async ESNoff ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002505 self.run_test()
2506
2507
Neale Ranns5b891102021-06-28 13:31:28 +00002508class Test_async_ESNoff_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
2509 """async ESNoff ARon AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002510
Neale Ranns8c609af2021-02-25 10:05:32 +00002511 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002512 """async ESNoff ARon AES-GCM-256/NONE IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002513 self.run_test()
2514
2515
Neale Ranns5b891102021-06-28 13:31:28 +00002516class Test_async_ESNoff_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
2517 """async ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002518
Neale Ranns8c609af2021-02-25 10:05:32 +00002519 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002520 """async ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002521 self.run_test()
2522
2523
Neale Ranns5b891102021-06-28 13:31:28 +00002524class Test_async_ESNoff_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
2525 """async ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002526
Neale Ranns8c609af2021-02-25 10:05:32 +00002527 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002528 """async ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002529 self.run_test()
2530
2531
Neale Ranns5b891102021-06-28 13:31:28 +00002532class Test_async_ESNoff_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
2533 """async ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002534
Neale Ranns9c23ff82021-06-25 13:30:50 +00002535 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002536 """async ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002537 self.run_test()
2538
2539
Neale Ranns5b891102021-06-28 13:31:28 +00002540class Test_async_ESNoff_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
2541 """async ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002542
Neale Ranns9c23ff82021-06-25 13:30:50 +00002543 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002544 """async ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002545 self.run_test()
2546
2547
Neale Ranns5b891102021-06-28 13:31:28 +00002548class Test_async_ESNoff_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
2549 """async ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002550
Neale Ranns9c23ff82021-06-25 13:30:50 +00002551 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002552 """async ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002553 self.run_test()
2554
2555
Neale Ranns5b891102021-06-28 13:31:28 +00002556class Test_async_ESNoff_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
2557 """async ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002558
Neale Ranns8c609af2021-02-25 10:05:32 +00002559 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002560 """async ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002561 self.run_test()
2562
2563
Neale Ranns5b891102021-06-28 13:31:28 +00002564class Test_async_ESNoff_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
2565 """async ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02002566
Neale Ranns8c609af2021-02-25 10:05:32 +00002567 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002568 """async ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002569 self.run_test()