blob: 6fd4ba15a324d354ea8763308e9d65c152776a61 [file] [log] [blame]
“mystarrocks”23f0c452017-12-11 07:11:51 -08001import socket
Klement Sekera28fb03f2018-04-17 11:36:55 +02002import unittest
Klement Sekera31da2e32018-06-24 22:49:55 +02003from scapy.layers.ipsec import ESP
Christian Hoppsfb7e7ed2019-11-03 07:02:15 -05004from scapy.layers.inet import IP, ICMP, UDP
Neale Ranns041add72020-01-02 04:06:10 +00005from scapy.layers.inet6 import IPv6
6from scapy.layers.l2 import Ether
7from scapy.packet import Raw
“mystarrocks”23f0c452017-12-11 07:11:51 -08008
Neale Ranns00625a62019-07-31 00:13:18 -07009from parameterized import parameterized
juraj.linkes11057662019-07-08 10:22:55 +020010from framework import VppTestRunner
Neale Ranns53f526b2019-02-25 14:32:02 +000011from template_ipsec import IpsecTra46Tests, IpsecTun46Tests, TemplateIpsec, \
Neale Ranns4f33c802019-04-10 12:39:10 +000012 IpsecTcpTests, IpsecTun4Tests, IpsecTra4Tests, config_tra_params, \
Neale Ranns12989b52019-09-26 16:20:19 +000013 config_tun_params, IPsecIPv4Params, IPsecIPv6Params, \
Neale Ranns4a56f4e2019-12-23 04:10:25 +000014 IpsecTra4, IpsecTun4, IpsecTra6, IpsecTun6, \
Neale Ranns02950402019-12-20 00:54:57 +000015 IpsecTun6HandoffTests, IpsecTun4HandoffTests, \
Filip Tehlarefcad1a2020-02-04 09:36:04 +000016 IpsecTra6ExtTests
Klement Sekerabf613952019-01-29 11:38:08 +010017from vpp_ipsec import VppIpsecSpd, VppIpsecSpdEntry, VppIpsecSA,\
Neale Ranns4f33c802019-04-10 12:39:10 +000018 VppIpsecSpdItfBinding
Neale Ranns311124e2019-01-24 04:52:25 -080019from vpp_ip_route import VppIpRoute, VppRoutePath
20from vpp_ip import DpoProto
Neale Ranns17dcec02019-01-09 21:22:20 -080021from vpp_papi import VppEnum
“mystarrocks”23f0c452017-12-11 07:11:51 -080022
Neale Rannsc87b66c2019-02-07 07:26:12 -080023NUM_PKTS = 67
Benoît Ganne5c481ff2021-03-08 10:22:51 +010024engines_supporting_chain_bufs = ["openssl", "async"]
Neale Rannsf16e9a52021-02-25 19:09:24 +000025engines = ["ia32", "ipsecmb", "openssl"]
Neale Rannsc87b66c2019-02-07 07:26:12 -080026
“mystarrocks”23f0c452017-12-11 07:11:51 -080027
Neale Ranns4f33c802019-04-10 12:39:10 +000028class ConfigIpsecESP(TemplateIpsec):
29 encryption_type = ESP
30 tra4_encrypt_node_name = "esp4-encrypt"
Neale Ranns8c609af2021-02-25 10:05:32 +000031 tra4_decrypt_node_name = ["esp4-decrypt", "esp4-decrypt-post"]
Neale Ranns4f33c802019-04-10 12:39:10 +000032 tra6_encrypt_node_name = "esp6-encrypt"
Neale Ranns8c609af2021-02-25 10:05:32 +000033 tra6_decrypt_node_name = ["esp6-decrypt", "esp6-decrypt-post"]
Neale Ranns4f33c802019-04-10 12:39:10 +000034 tun4_encrypt_node_name = "esp4-encrypt"
Neale Ranns8c609af2021-02-25 10:05:32 +000035 tun4_decrypt_node_name = ["esp4-decrypt", "esp4-decrypt-post"]
Neale Ranns4f33c802019-04-10 12:39:10 +000036 tun6_encrypt_node_name = "esp6-encrypt"
Neale Ranns8c609af2021-02-25 10:05:32 +000037 tun6_decrypt_node_name = ["esp6-decrypt", "esp6-decrypt-post"]
Neale Ranns53f526b2019-02-25 14:32:02 +000038
Neale Ranns4f33c802019-04-10 12:39:10 +000039 @classmethod
40 def setUpClass(cls):
41 super(ConfigIpsecESP, cls).setUpClass()
Neale Ranns53f526b2019-02-25 14:32:02 +000042
Neale Ranns4f33c802019-04-10 12:39:10 +000043 @classmethod
44 def tearDownClass(cls):
45 super(ConfigIpsecESP, cls).tearDownClass()
Neale Ranns53f526b2019-02-25 14:32:02 +000046
Neale Ranns4f33c802019-04-10 12:39:10 +000047 def setUp(self):
48 super(ConfigIpsecESP, self).setUp()
Neale Ranns53f526b2019-02-25 14:32:02 +000049
Neale Ranns4f33c802019-04-10 12:39:10 +000050 def tearDown(self):
51 super(ConfigIpsecESP, self).tearDown()
52
Neale Ranns5b891102021-06-28 13:31:28 +000053 def config_anti_replay(self, params):
54 saf = VppEnum.vl_api_ipsec_sad_flags_t
55 for p in params:
56 p.flags |= saf.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY
57
Neale Ranns4f33c802019-04-10 12:39:10 +000058 def config_network(self, params):
59 self.net_objs = []
60 self.tun_if = self.pg0
61 self.tra_if = self.pg2
62 self.logger.info(self.vapi.ppcli("show int addr"))
63
64 self.tra_spd = VppIpsecSpd(self, self.tra_spd_id)
65 self.tra_spd.add_vpp_config()
66 self.net_objs.append(self.tra_spd)
67 self.tun_spd = VppIpsecSpd(self, self.tun_spd_id)
68 self.tun_spd.add_vpp_config()
69 self.net_objs.append(self.tun_spd)
70
71 b = VppIpsecSpdItfBinding(self, self.tun_spd,
72 self.tun_if)
73 b.add_vpp_config()
74 self.net_objs.append(b)
75
76 b = VppIpsecSpdItfBinding(self, self.tra_spd,
77 self.tra_if)
78 b.add_vpp_config()
79 self.net_objs.append(b)
80
81 for p in params:
82 self.config_esp_tra(p)
83 config_tra_params(p, self.encryption_type)
84 for p in params:
85 self.config_esp_tun(p)
Neale Ranns12989b52019-09-26 16:20:19 +000086 config_tun_params(p, self.encryption_type, self.tun_if)
Neale Ranns4f33c802019-04-10 12:39:10 +000087
88 for p in params:
89 d = DpoProto.DPO_PROTO_IP6 if p.is_ipv6 else DpoProto.DPO_PROTO_IP4
90 r = VppIpRoute(self, p.remote_tun_if_host, p.addr_len,
91 [VppRoutePath(self.tun_if.remote_addr[p.addr_type],
92 0xffffffff,
Neale Ranns097fa662018-05-01 05:17:55 -070093 proto=d)])
Neale Ranns4f33c802019-04-10 12:39:10 +000094 r.add_vpp_config()
95 self.net_objs.append(r)
96
97 self.logger.info(self.vapi.ppcli("show ipsec all"))
98
99 def unconfig_network(self):
100 for o in reversed(self.net_objs):
101 o.remove_vpp_config()
102 self.net_objs = []
103
104 def config_esp_tun(self, params):
105 addr_type = params.addr_type
106 scapy_tun_sa_id = params.scapy_tun_sa_id
107 scapy_tun_spi = params.scapy_tun_spi
108 vpp_tun_sa_id = params.vpp_tun_sa_id
109 vpp_tun_spi = params.vpp_tun_spi
110 auth_algo_vpp_id = params.auth_algo_vpp_id
111 auth_key = params.auth_key
112 crypt_algo_vpp_id = params.crypt_algo_vpp_id
113 crypt_key = params.crypt_key
114 remote_tun_if_host = params.remote_tun_if_host
115 addr_any = params.addr_any
116 addr_bcast = params.addr_bcast
117 e = VppEnum.vl_api_ipsec_spd_action_t
Neale Ranns49e7ef62019-04-10 17:24:29 +0000118 flags = params.flags
Neale Ranns041add72020-01-02 04:06:10 +0000119 tun_flags = params.tun_flags
Neale Ranns80f6fd52019-04-16 02:41:34 +0000120 salt = params.salt
Neale Ranns4f33c802019-04-10 12:39:10 +0000121 objs = []
122
123 params.tun_sa_in = VppIpsecSA(self, scapy_tun_sa_id, scapy_tun_spi,
124 auth_algo_vpp_id, auth_key,
125 crypt_algo_vpp_id, crypt_key,
126 self.vpp_esp_protocol,
127 self.tun_if.local_addr[addr_type],
Neale Ranns49e7ef62019-04-10 17:24:29 +0000128 self.tun_if.remote_addr[addr_type],
Neale Ranns041add72020-01-02 04:06:10 +0000129 tun_flags=tun_flags,
130 dscp=params.dscp,
Neale Ranns80f6fd52019-04-16 02:41:34 +0000131 flags=flags,
Neale Ranns9ec846c2021-02-09 14:04:02 +0000132 salt=salt,
133 hop_limit=params.outer_hop_limit)
Neale Ranns4f33c802019-04-10 12:39:10 +0000134 params.tun_sa_out = VppIpsecSA(self, vpp_tun_sa_id, vpp_tun_spi,
135 auth_algo_vpp_id, auth_key,
136 crypt_algo_vpp_id, crypt_key,
137 self.vpp_esp_protocol,
138 self.tun_if.remote_addr[addr_type],
Neale Ranns49e7ef62019-04-10 17:24:29 +0000139 self.tun_if.local_addr[addr_type],
Neale Ranns041add72020-01-02 04:06:10 +0000140 tun_flags=tun_flags,
141 dscp=params.dscp,
Neale Ranns80f6fd52019-04-16 02:41:34 +0000142 flags=flags,
Neale Ranns9ec846c2021-02-09 14:04:02 +0000143 salt=salt,
144 hop_limit=params.outer_hop_limit)
Neale Ranns4f33c802019-04-10 12:39:10 +0000145 objs.append(params.tun_sa_in)
146 objs.append(params.tun_sa_out)
147
148 params.spd_policy_in_any = VppIpsecSpdEntry(self, self.tun_spd,
149 scapy_tun_sa_id,
150 addr_any, addr_bcast,
151 addr_any, addr_bcast,
152 socket.IPPROTO_ESP)
153 params.spd_policy_out_any = VppIpsecSpdEntry(self, self.tun_spd,
154 scapy_tun_sa_id,
155 addr_any, addr_bcast,
156 addr_any, addr_bcast,
157 socket.IPPROTO_ESP,
158 is_outbound=0)
159 objs.append(params.spd_policy_out_any)
160 objs.append(params.spd_policy_in_any)
161
162 objs.append(VppIpsecSpdEntry(self, self.tun_spd, vpp_tun_sa_id,
163 remote_tun_if_host, remote_tun_if_host,
164 self.pg1.remote_addr[addr_type],
165 self.pg1.remote_addr[addr_type],
166 0,
167 priority=10,
168 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
169 is_outbound=0))
170 objs.append(VppIpsecSpdEntry(self, self.tun_spd, scapy_tun_sa_id,
171 self.pg1.remote_addr[addr_type],
172 self.pg1.remote_addr[addr_type],
173 remote_tun_if_host, remote_tun_if_host,
174 0,
175 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
176 priority=10))
177 objs.append(VppIpsecSpdEntry(self, self.tun_spd, vpp_tun_sa_id,
178 remote_tun_if_host, remote_tun_if_host,
179 self.pg0.local_addr[addr_type],
180 self.pg0.local_addr[addr_type],
181 0,
182 priority=20,
183 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
184 is_outbound=0))
185 objs.append(VppIpsecSpdEntry(self, self.tun_spd, scapy_tun_sa_id,
186 self.pg0.local_addr[addr_type],
187 self.pg0.local_addr[addr_type],
188 remote_tun_if_host, remote_tun_if_host,
189 0,
190 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
191 priority=20))
192 for o in objs:
193 o.add_vpp_config()
194 self.net_objs = self.net_objs + objs
195
196 def config_esp_tra(self, params):
197 addr_type = params.addr_type
198 scapy_tra_sa_id = params.scapy_tra_sa_id
199 scapy_tra_spi = params.scapy_tra_spi
200 vpp_tra_sa_id = params.vpp_tra_sa_id
201 vpp_tra_spi = params.vpp_tra_spi
202 auth_algo_vpp_id = params.auth_algo_vpp_id
203 auth_key = params.auth_key
204 crypt_algo_vpp_id = params.crypt_algo_vpp_id
205 crypt_key = params.crypt_key
206 addr_any = params.addr_any
207 addr_bcast = params.addr_bcast
Neale Ranns4f33c802019-04-10 12:39:10 +0000208 e = VppEnum.vl_api_ipsec_spd_action_t
Neale Ranns5b891102021-06-28 13:31:28 +0000209 flags = params.flags
Neale Ranns80f6fd52019-04-16 02:41:34 +0000210 salt = params.salt
Neale Ranns4f33c802019-04-10 12:39:10 +0000211 objs = []
212
213 params.tra_sa_in = VppIpsecSA(self, scapy_tra_sa_id, scapy_tra_spi,
214 auth_algo_vpp_id, auth_key,
215 crypt_algo_vpp_id, crypt_key,
216 self.vpp_esp_protocol,
Neale Ranns80f6fd52019-04-16 02:41:34 +0000217 flags=flags,
218 salt=salt)
Neale Ranns4f33c802019-04-10 12:39:10 +0000219 params.tra_sa_out = VppIpsecSA(self, vpp_tra_sa_id, vpp_tra_spi,
220 auth_algo_vpp_id, auth_key,
221 crypt_algo_vpp_id, crypt_key,
222 self.vpp_esp_protocol,
Neale Ranns80f6fd52019-04-16 02:41:34 +0000223 flags=flags,
224 salt=salt)
Neale Ranns4f33c802019-04-10 12:39:10 +0000225 objs.append(params.tra_sa_in)
226 objs.append(params.tra_sa_out)
227
228 objs.append(VppIpsecSpdEntry(self, self.tra_spd, vpp_tra_sa_id,
229 addr_any, addr_bcast,
230 addr_any, addr_bcast,
231 socket.IPPROTO_ESP))
232 objs.append(VppIpsecSpdEntry(self, self.tra_spd, vpp_tra_sa_id,
233 addr_any, addr_bcast,
234 addr_any, addr_bcast,
235 socket.IPPROTO_ESP,
236 is_outbound=0))
237 objs.append(VppIpsecSpdEntry(self, self.tra_spd, vpp_tra_sa_id,
238 self.tra_if.local_addr[addr_type],
239 self.tra_if.local_addr[addr_type],
240 self.tra_if.remote_addr[addr_type],
241 self.tra_if.remote_addr[addr_type],
242 0, priority=10,
243 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
244 is_outbound=0))
245 objs.append(VppIpsecSpdEntry(self, self.tra_spd, scapy_tra_sa_id,
246 self.tra_if.local_addr[addr_type],
247 self.tra_if.local_addr[addr_type],
248 self.tra_if.remote_addr[addr_type],
249 self.tra_if.remote_addr[addr_type],
250 0, policy=e.IPSEC_API_SPD_ACTION_PROTECT,
251 priority=10))
252 for o in objs:
253 o.add_vpp_config()
254 self.net_objs = self.net_objs + objs
Neale Ranns53f526b2019-02-25 14:32:02 +0000255
256
Neale Ranns4f33c802019-04-10 12:39:10 +0000257class TemplateIpsecEsp(ConfigIpsecESP):
“mystarrocks”23f0c452017-12-11 07:11:51 -0800258 """
259 Basic test for ipsec esp sanity - tunnel and transport modes.
260
261 Below 4 cases are covered as part of this test
262 1) ipsec esp v4 transport basic test - IPv4 Transport mode
Paul Vinciguerra8feeaff2019-03-27 11:25:48 -0700263 scenario using HMAC-SHA1-96 integrity algo
“mystarrocks”23f0c452017-12-11 07:11:51 -0800264 2) ipsec esp v4 transport burst test
265 Above test for 257 pkts
266 3) ipsec esp 4o4 tunnel basic test - IPv4 Tunnel mode
Paul Vinciguerra8feeaff2019-03-27 11:25:48 -0700267 scenario using HMAC-SHA1-96 integrity algo
“mystarrocks”23f0c452017-12-11 07:11:51 -0800268 4) ipsec esp 4o4 tunnel burst test
269 Above test for 257 pkts
270
271 TRANSPORT MODE:
272
273 --- encrypt ---
274 |pg2| <-------> |VPP|
275 --- decrypt ---
276
277 TUNNEL MODE:
278
279 --- encrypt --- plain ---
Klement Sekera4b089f22018-04-17 18:04:57 +0200280 |pg0| <------- |VPP| <------ |pg1|
“mystarrocks”23f0c452017-12-11 07:11:51 -0800281 --- --- ---
282
283 --- decrypt --- plain ---
Klement Sekera4b089f22018-04-17 18:04:57 +0200284 |pg0| -------> |VPP| ------> |pg1|
“mystarrocks”23f0c452017-12-11 07:11:51 -0800285 --- --- ---
“mystarrocks”23f0c452017-12-11 07:11:51 -0800286 """
287
Paul Vinciguerra7f9b7f92019-03-12 19:23:27 -0700288 @classmethod
289 def setUpClass(cls):
290 super(TemplateIpsecEsp, cls).setUpClass()
291
292 @classmethod
293 def tearDownClass(cls):
294 super(TemplateIpsecEsp, cls).tearDownClass()
295
Neale Ranns8e4a89b2019-01-23 08:16:17 -0800296 def setUp(self):
297 super(TemplateIpsecEsp, self).setUp()
Neale Ranns5b891102021-06-28 13:31:28 +0000298 self.config_anti_replay(self.params.values())
Neale Ranns4f33c802019-04-10 12:39:10 +0000299 self.config_network(self.params.values())
Klement Sekera611864f2018-09-26 11:19:00 +0200300
Neale Ranns8e4a89b2019-01-23 08:16:17 -0800301 def tearDown(self):
Neale Ranns4f33c802019-04-10 12:39:10 +0000302 self.unconfig_network()
Neale Ranns8e4a89b2019-01-23 08:16:17 -0800303 super(TemplateIpsecEsp, self).tearDown()
Neale Ranns8e4a89b2019-01-23 08:16:17 -0800304
Klement Sekera611864f2018-09-26 11:19:00 +0200305
Neale Ranns02950402019-12-20 00:54:57 +0000306class TestIpsecEsp1(TemplateIpsecEsp, IpsecTra46Tests,
Filip Tehlarefcad1a2020-02-04 09:36:04 +0000307 IpsecTun46Tests, IpsecTra6ExtTests):
Klement Sekera31da2e32018-06-24 22:49:55 +0200308 """ Ipsec ESP - TUN & TRA tests """
Neale Rannsb1fd80f2020-05-12 13:33:56 +0000309
310 @classmethod
311 def setUpClass(cls):
312 super(TestIpsecEsp1, cls).setUpClass()
313
314 @classmethod
315 def tearDownClass(cls):
316 super(TestIpsecEsp1, cls).tearDownClass()
317
318 def setUp(self):
319 super(TestIpsecEsp1, self).setUp()
320
321 def tearDown(self):
322 super(TestIpsecEsp1, self).tearDown()
323
324 def test_tun_46(self):
325 """ ipsec 4o6 tunnel """
326 # add an SPD entry to direct 2.2.2.2 to the v6 tunnel SA
327 p6 = self.ipv6_params
328 p4 = self.ipv4_params
329
330 p6.remote_tun_if_host4 = "2.2.2.2"
331 e = VppEnum.vl_api_ipsec_spd_action_t
332
333 VppIpsecSpdEntry(self,
334 self.tun_spd,
335 p6.scapy_tun_sa_id,
336 self.pg1.remote_addr[p4.addr_type],
337 self.pg1.remote_addr[p4.addr_type],
338 p6.remote_tun_if_host4,
339 p6.remote_tun_if_host4,
340 0,
341 priority=10,
342 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
343 is_outbound=1).add_vpp_config()
344 VppIpRoute(self, p6.remote_tun_if_host4, p4.addr_len,
345 [VppRoutePath(self.tun_if.remote_addr[p4.addr_type],
346 0xffffffff)]).add_vpp_config()
347
348 old_name = self.tun6_encrypt_node_name
349 self.tun6_encrypt_node_name = "esp4-encrypt"
350
351 self.verify_tun_46(p6, count=63)
352 self.tun6_encrypt_node_name = old_name
353
354 def test_tun_64(self):
355 """ ipsec 6o4 tunnel """
356 # add an SPD entry to direct 4444::4 to the v4 tunnel SA
357 p6 = self.ipv6_params
358 p4 = self.ipv4_params
359
360 p4.remote_tun_if_host6 = "4444::4"
361 e = VppEnum.vl_api_ipsec_spd_action_t
362
363 VppIpsecSpdEntry(self,
364 self.tun_spd,
365 p4.scapy_tun_sa_id,
366 self.pg1.remote_addr[p6.addr_type],
367 self.pg1.remote_addr[p6.addr_type],
368 p4.remote_tun_if_host6,
369 p4.remote_tun_if_host6,
370 0,
371 priority=10,
372 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
373 is_outbound=1).add_vpp_config()
374 d = DpoProto.DPO_PROTO_IP6
375 VppIpRoute(self, p4.remote_tun_if_host6, p6.addr_len,
376 [VppRoutePath(self.tun_if.remote_addr[p6.addr_type],
377 0xffffffff,
378 proto=d)]).add_vpp_config()
379
380 old_name = self.tun4_encrypt_node_name
381 self.tun4_encrypt_node_name = "esp6-encrypt"
382 self.verify_tun_64(p4, count=63)
383 self.tun4_encrypt_node_name = old_name
“mystarrocks”23f0c452017-12-11 07:11:51 -0800384
“mystarrocks”23f0c452017-12-11 07:11:51 -0800385
Neale Ranns041add72020-01-02 04:06:10 +0000386class TestIpsecEspTun(TemplateIpsecEsp, IpsecTun46Tests):
387 """ Ipsec ESP - TUN encap tests """
388
389 def setUp(self):
390 self.ipv4_params = IPsecIPv4Params()
391 self.ipv6_params = IPsecIPv6Params()
392
393 c = (VppEnum.vl_api_tunnel_encap_decap_flags_t.
394 TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_COPY_DSCP)
395 c1 = c | (VppEnum.vl_api_tunnel_encap_decap_flags_t.
396 TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_COPY_ECN)
397
398 self.ipv4_params.tun_flags = c
399 self.ipv6_params.tun_flags = c1
400
401 super(TestIpsecEspTun, self).setUp()
402
403 def gen_pkts(self, sw_intf, src, dst, count=1, payload_size=54):
404 # set the DSCP + ECN - flags are set to copy only DSCP
405 return [Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac) /
406 IP(src=src, dst=dst, tos=5) /
407 UDP(sport=4444, dport=4444) /
408 Raw(b'X' * payload_size)
409 for i in range(count)]
410
Neale Ranns9ec846c2021-02-09 14:04:02 +0000411 def gen_pkts6(self, p, sw_intf, src, dst, count=1, payload_size=54):
Neale Ranns041add72020-01-02 04:06:10 +0000412 # set the DSCP + ECN - flags are set to copy both
413 return [Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac) /
414 IPv6(src=src, dst=dst, tc=5) /
415 UDP(sport=4444, dport=4444) /
416 Raw(b'X' * payload_size)
417 for i in range(count)]
418
419 def verify_encrypted(self, p, sa, rxs):
420 # just check that only the DSCP is copied
421 for rx in rxs:
422 self.assertEqual(rx[IP].tos, 4)
423
424 def verify_encrypted6(self, p, sa, rxs):
425 # just check that the DSCP & ECN are copied
426 for rx in rxs:
427 self.assertEqual(rx[IPv6].tc, 5)
428
429
430class TestIpsecEspTun2(TemplateIpsecEsp, IpsecTun46Tests):
431 """ Ipsec ESP - TUN DSCP tests """
432
433 def setUp(self):
434 self.ipv4_params = IPsecIPv4Params()
435 self.ipv6_params = IPsecIPv6Params()
436
437 self.ipv4_params.dscp = VppEnum.vl_api_ip_dscp_t.IP_API_DSCP_EF
438 self.ipv6_params.dscp = VppEnum.vl_api_ip_dscp_t.IP_API_DSCP_AF11
439
440 super(TestIpsecEspTun2, self).setUp()
441
442 def gen_pkts(self, sw_intf, src, dst, count=1, payload_size=54):
Neale Ranns041add72020-01-02 04:06:10 +0000443 return [Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac) /
444 IP(src=src, dst=dst) /
445 UDP(sport=4444, dport=4444) /
446 Raw(b'X' * payload_size)
447 for i in range(count)]
448
Neale Ranns9ec846c2021-02-09 14:04:02 +0000449 def gen_pkts6(self, p, sw_intf, src, dst, count=1, payload_size=54):
Neale Ranns041add72020-01-02 04:06:10 +0000450 return [Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac) /
451 IPv6(src=src, dst=dst) /
452 UDP(sport=4444, dport=4444) /
453 Raw(b'X' * payload_size)
454 for i in range(count)]
455
456 def verify_encrypted(self, p, sa, rxs):
Neale Ranns9ec846c2021-02-09 14:04:02 +0000457 # just check that only the DSCP is set
Neale Ranns041add72020-01-02 04:06:10 +0000458 for rx in rxs:
459 self.assertEqual(rx[IP].tos,
460 VppEnum.vl_api_ip_dscp_t.IP_API_DSCP_EF << 2)
461
462 def verify_encrypted6(self, p, sa, rxs):
Neale Ranns9ec846c2021-02-09 14:04:02 +0000463 # just check that the DSCP is set
Neale Ranns041add72020-01-02 04:06:10 +0000464 for rx in rxs:
465 self.assertEqual(rx[IPv6].tc,
466 VppEnum.vl_api_ip_dscp_t.IP_API_DSCP_AF11 << 2)
467
468
Klement Sekera31da2e32018-06-24 22:49:55 +0200469class TestIpsecEsp2(TemplateIpsecEsp, IpsecTcpTests):
470 """ Ipsec ESP - TCP tests """
471 pass
“mystarrocks”23f0c452017-12-11 07:11:51 -0800472
473
Neale Rannsfc811342021-02-26 10:35:33 +0000474class TestIpsecEspAsync(TemplateIpsecEsp):
475 """ Ipsec ESP - Aysnc tests """
476
Klement Sekera8d815022021-03-15 16:58:10 +0100477 vpp_worker_count = 2
Neale Rannsfc811342021-02-26 10:35:33 +0000478
479 def setUp(self):
480 super(TestIpsecEspAsync, self).setUp()
481
Neale Rannsf16e9a52021-02-25 19:09:24 +0000482 self.p_sync = IPsecIPv4Params()
Neale Rannsfc811342021-02-26 10:35:33 +0000483
Neale Rannsf16e9a52021-02-25 19:09:24 +0000484 self.p_sync.crypt_algo_vpp_id = (VppEnum.vl_api_ipsec_crypto_alg_t.
485 IPSEC_API_CRYPTO_ALG_AES_CBC_256)
486 self.p_sync.crypt_algo = 'AES-CBC' # scapy name
487 self.p_sync.crypt_key = b'JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h'
Neale Rannsfc811342021-02-26 10:35:33 +0000488
Neale Rannsf16e9a52021-02-25 19:09:24 +0000489 self.p_sync.scapy_tun_sa_id += 0xf0000
490 self.p_sync.scapy_tun_spi += 0xf0000
491 self.p_sync.vpp_tun_sa_id += 0xf0000
492 self.p_sync.vpp_tun_spi += 0xf0000
493 self.p_sync.remote_tun_if_host = "2.2.2.2"
Neale Rannsfc811342021-02-26 10:35:33 +0000494 e = VppEnum.vl_api_ipsec_spd_action_t
495
Neale Rannsf16e9a52021-02-25 19:09:24 +0000496 self.p_sync.sa = VppIpsecSA(
Neale Rannsfc811342021-02-26 10:35:33 +0000497 self,
Neale Rannsf16e9a52021-02-25 19:09:24 +0000498 self.p_sync.vpp_tun_sa_id,
499 self.p_sync.vpp_tun_spi,
500 self.p_sync.auth_algo_vpp_id,
501 self.p_sync.auth_key,
502 self.p_sync.crypt_algo_vpp_id,
503 self.p_sync.crypt_key,
Neale Rannsfc811342021-02-26 10:35:33 +0000504 self.vpp_esp_protocol,
Neale Rannsf16e9a52021-02-25 19:09:24 +0000505 self.tun_if.local_addr[self.p_sync.addr_type],
506 self.tun_if.remote_addr[self.p_sync.addr_type]).add_vpp_config()
507 self.p_sync.spd = VppIpsecSpdEntry(
Neale Rannsfc811342021-02-26 10:35:33 +0000508 self,
509 self.tun_spd,
Neale Rannsf16e9a52021-02-25 19:09:24 +0000510 self.p_sync.vpp_tun_sa_id,
511 self.pg1.remote_addr[self.p_sync.addr_type],
512 self.pg1.remote_addr[self.p_sync.addr_type],
513 self.p_sync.remote_tun_if_host,
514 self.p_sync.remote_tun_if_host,
Neale Rannsfc811342021-02-26 10:35:33 +0000515 0,
516 priority=1,
517 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
518 is_outbound=1).add_vpp_config()
Neale Rannsf16e9a52021-02-25 19:09:24 +0000519 VppIpRoute(self,
520 self.p_sync.remote_tun_if_host,
521 self.p_sync.addr_len,
522 [VppRoutePath(
523 self.tun_if.remote_addr[self.p_sync.addr_type],
524 0xffffffff)]).add_vpp_config()
525 config_tun_params(self.p_sync, self.encryption_type, self.tun_if)
526
527 self.p_async = IPsecIPv4Params()
528
529 self.p_async.crypt_algo_vpp_id = (VppEnum.vl_api_ipsec_crypto_alg_t.
530 IPSEC_API_CRYPTO_ALG_AES_GCM_256)
531 self.p_async.auth_algo_vpp_id = (VppEnum.vl_api_ipsec_integ_alg_t.
532 IPSEC_API_INTEG_ALG_NONE)
533 self.p_async.crypt_algo = 'AES-GCM' # scapy name
534 self.p_async.crypt_key = b'JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h'
535 self.p_async.auth_algo = 'NULL'
536
537 self.p_async.scapy_tun_sa_id += 0xe0000
538 self.p_async.scapy_tun_spi += 0xe0000
539 self.p_async.vpp_tun_sa_id += 0xe0000
540 self.p_async.vpp_tun_spi += 0xe0000
541 self.p_async.remote_tun_if_host = "2.2.2.3"
542
543 iflags = VppEnum.vl_api_ipsec_sad_flags_t
544 self.p_async.flags = (iflags.IPSEC_API_SAD_FLAG_USE_ESN |
545 iflags.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY |
546 iflags.IPSEC_API_SAD_FLAG_ASYNC)
547
548 self.p_async.sa = VppIpsecSA(
549 self,
550 self.p_async.vpp_tun_sa_id,
551 self.p_async.vpp_tun_spi,
552 self.p_async.auth_algo_vpp_id,
553 self.p_async.auth_key,
554 self.p_async.crypt_algo_vpp_id,
555 self.p_async.crypt_key,
556 self.vpp_esp_protocol,
557 self.tun_if.local_addr[self.p_async.addr_type],
558 self.tun_if.remote_addr[self.p_async.addr_type],
559 flags=self.p_async.flags).add_vpp_config()
560 self.p_async.spd = VppIpsecSpdEntry(
561 self,
562 self.tun_spd,
563 self.p_async.vpp_tun_sa_id,
564 self.pg1.remote_addr[self.p_async.addr_type],
565 self.pg1.remote_addr[self.p_async.addr_type],
566 self.p_async.remote_tun_if_host,
567 self.p_async.remote_tun_if_host,
568 0,
569 priority=2,
570 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
571 is_outbound=1).add_vpp_config()
572 VppIpRoute(self,
573 self.p_async.remote_tun_if_host,
574 self.p_async.addr_len,
575 [VppRoutePath(
576 self.tun_if.remote_addr[self.p_async.addr_type],
577 0xffffffff)]).add_vpp_config()
578 config_tun_params(self.p_async, self.encryption_type, self.tun_if)
Neale Rannsfc811342021-02-26 10:35:33 +0000579
580 def test_dual_stream(self):
581 """ Alternating SAs """
Neale Rannsf16e9a52021-02-25 19:09:24 +0000582 p = self.params[self.p_sync.addr_type]
583 self.vapi.ipsec_set_async_mode(async_enable=True)
Neale Rannsfc811342021-02-26 10:35:33 +0000584
585 pkts = [(Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) /
586 IP(src=self.pg1.remote_ip4,
Neale Rannsf16e9a52021-02-25 19:09:24 +0000587 dst=self.p_sync.remote_tun_if_host) /
Neale Rannsfc811342021-02-26 10:35:33 +0000588 UDP(sport=4444, dport=4444) /
589 Raw(b'0x0' * 200)),
590 (Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) /
591 IP(src=self.pg1.remote_ip4,
592 dst=p.remote_tun_if_host) /
593 UDP(sport=4444, dport=4444) /
594 Raw(b'0x0' * 200))]
595 pkts *= 1023
596
597 rxs = self.send_and_expect(self.pg1, pkts, self.pg0)
598
599 self.assertEqual(len(rxs), len(pkts))
600
601 for rx in rxs:
602 if rx[ESP].spi == p.scapy_tun_spi:
603 decrypted = p.vpp_tun_sa.decrypt(rx[IP])
Neale Rannsf16e9a52021-02-25 19:09:24 +0000604 elif rx[ESP].spi == self.p_sync.vpp_tun_spi:
605 decrypted = self.p_sync.scapy_tun_sa.decrypt(rx[IP])
Neale Rannsfc811342021-02-26 10:35:33 +0000606 else:
607 rx.show()
608 self.assertTrue(False)
609
Neale Rannsf16e9a52021-02-25 19:09:24 +0000610 self.p_sync.spd.remove_vpp_config()
611 self.p_sync.sa.remove_vpp_config()
612 self.p_async.spd.remove_vpp_config()
613 self.p_async.sa.remove_vpp_config()
614 self.vapi.ipsec_set_async_mode(async_enable=False)
615
616 def test_sync_async_noop_stream(self):
617 """ Alternating SAs sync/async/noop """
618 p = self.params[self.p_sync.addr_type]
619
620 # first pin the default/noop SA to worker 0
621 pkts = [(Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) /
622 IP(src=self.pg1.remote_ip4,
623 dst=p.remote_tun_if_host) /
624 UDP(sport=4444, dport=4444) /
625 Raw(b'0x0' * 200))]
626 rxs = self.send_and_expect(self.pg1, pkts, self.pg0, worker=0)
627
628 self.logger.info(self.vapi.cli("sh ipsec sa"))
629 self.logger.info(self.vapi.cli("sh crypto async status"))
630
631 # then use all the other SAs on worker 1.
632 # some will handoff, other take the sync and async paths
633 pkts = [(Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) /
634 IP(src=self.pg1.remote_ip4,
635 dst=self.p_sync.remote_tun_if_host) /
636 UDP(sport=4444, dport=4444) /
637 Raw(b'0x0' * 200)),
638 (Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) /
639 IP(src=self.pg1.remote_ip4,
640 dst=p.remote_tun_if_host) /
641 UDP(sport=4444, dport=4444) /
642 Raw(b'0x0' * 200)),
643 (Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) /
644 IP(src=self.pg1.remote_ip4,
645 dst=self.p_async.remote_tun_if_host) /
646 UDP(sport=4444, dport=4444) /
647 Raw(b'0x0' * 200))]
648 pkts *= 1023
649
650 rxs = self.send_and_expect(self.pg1, pkts, self.pg0, worker=1)
651
652 self.assertEqual(len(rxs), len(pkts))
653
654 for rx in rxs:
655 if rx[ESP].spi == p.scapy_tun_spi:
656 decrypted = p.vpp_tun_sa.decrypt(rx[IP])
657 elif rx[ESP].spi == self.p_sync.vpp_tun_spi:
658 decrypted = self.p_sync.scapy_tun_sa.decrypt(rx[IP])
659 elif rx[ESP].spi == self.p_async.vpp_tun_spi:
660 decrypted = self.p_async.scapy_tun_sa.decrypt(rx[IP])
661 else:
662 rx.show()
663 self.assertTrue(False)
664
665 self.p_sync.spd.remove_vpp_config()
666 self.p_sync.sa.remove_vpp_config()
667 self.p_async.spd.remove_vpp_config()
668 self.p_async.sa.remove_vpp_config()
669
670 # async mode should have been disabled now that there are
671 # no async SAs. there's no API for this, so a reluctant
672 # screen scrape.
673 self.assertTrue("DISABLED" in self.vapi.cli("sh crypto async status"))
Neale Rannsfc811342021-02-26 10:35:33 +0000674
675
Neale Ranns4a56f4e2019-12-23 04:10:25 +0000676class TestIpsecEspHandoff(TemplateIpsecEsp,
677 IpsecTun6HandoffTests,
678 IpsecTun4HandoffTests):
679 """ Ipsec ESP - handoff tests """
680 pass
681
682
Neale Ranns4f33c802019-04-10 12:39:10 +0000683class TemplateIpsecEspUdp(ConfigIpsecESP):
Neale Ranns53f526b2019-02-25 14:32:02 +0000684 """
685 UDP encapped ESP
686 """
Paul Vinciguerra7f9b7f92019-03-12 19:23:27 -0700687
688 @classmethod
689 def setUpClass(cls):
690 super(TemplateIpsecEspUdp, cls).setUpClass()
691
692 @classmethod
693 def tearDownClass(cls):
694 super(TemplateIpsecEspUdp, cls).tearDownClass()
695
Neale Ranns53f526b2019-02-25 14:32:02 +0000696 def setUp(self):
697 super(TemplateIpsecEspUdp, self).setUp()
Neale Ranns4f33c802019-04-10 12:39:10 +0000698 self.net_objs = []
Neale Ranns53f526b2019-02-25 14:32:02 +0000699 self.tun_if = self.pg0
700 self.tra_if = self.pg2
701 self.logger.info(self.vapi.ppcli("show int addr"))
702
703 p = self.ipv4_params
704 p.flags = (VppEnum.vl_api_ipsec_sad_flags_t.
Neale Ranns5b891102021-06-28 13:31:28 +0000705 IPSEC_API_SAD_FLAG_UDP_ENCAP |
706 VppEnum.vl_api_ipsec_sad_flags_t.
707 IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY)
Neale Ranns53f526b2019-02-25 14:32:02 +0000708 p.nat_header = UDP(sport=5454, dport=4500)
709
710 self.tra_spd = VppIpsecSpd(self, self.tra_spd_id)
711 self.tra_spd.add_vpp_config()
712 VppIpsecSpdItfBinding(self, self.tra_spd,
713 self.tra_if).add_vpp_config()
714
Neale Ranns4f33c802019-04-10 12:39:10 +0000715 self.config_esp_tra(p)
Neale Ranns2ac885c2019-03-20 18:24:43 +0000716 config_tra_params(p, self.encryption_type)
Neale Ranns53f526b2019-02-25 14:32:02 +0000717
718 self.tun_spd = VppIpsecSpd(self, self.tun_spd_id)
719 self.tun_spd.add_vpp_config()
720 VppIpsecSpdItfBinding(self, self.tun_spd,
721 self.tun_if).add_vpp_config()
722
Neale Ranns4f33c802019-04-10 12:39:10 +0000723 self.config_esp_tun(p)
Neale Ranns92e93842019-04-08 07:36:50 +0000724 self.logger.info(self.vapi.ppcli("show ipsec all"))
Neale Ranns53f526b2019-02-25 14:32:02 +0000725
726 d = DpoProto.DPO_PROTO_IP4
727 VppIpRoute(self, p.remote_tun_if_host, p.addr_len,
728 [VppRoutePath(self.tun_if.remote_addr[p.addr_type],
729 0xffffffff,
730 proto=d)]).add_vpp_config()
731
732 def tearDown(self):
733 super(TemplateIpsecEspUdp, self).tearDown()
Paul Vinciguerra90cf21b2019-03-13 09:23:05 -0700734
735 def show_commands_at_teardown(self):
736 self.logger.info(self.vapi.cli("show hardware"))
Neale Ranns53f526b2019-02-25 14:32:02 +0000737
738
Neale Ranns49e7ef62019-04-10 17:24:29 +0000739class TestIpsecEspUdp(TemplateIpsecEspUdp, IpsecTra4Tests):
Neale Ranns53f526b2019-02-25 14:32:02 +0000740 """ Ipsec NAT-T ESP UDP tests """
Neale Ranns53f526b2019-02-25 14:32:02 +0000741 pass
742
743
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000744class MyParameters():
745 def __init__(self):
Neale Ranns5b891102021-06-28 13:31:28 +0000746 saf = VppEnum.vl_api_ipsec_sad_flags_t
747 flag_esn = saf.IPSEC_API_SAD_FLAG_USE_ESN
748 flag_ar = saf.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY
749 self.flags = [0, flag_esn, flag_ar]
Neale Ranns4f33c802019-04-10 12:39:10 +0000750 # foreach crypto algorithm
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000751 self.algos = {
752 'AES-GCM-128/NONE': {
753 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
Neale Ranns47feb112019-04-11 15:14:07 +0000754 IPSEC_API_CRYPTO_ALG_AES_GCM_128),
755 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
756 IPSEC_API_INTEG_ALG_NONE),
757 'scapy-crypto': "AES-GCM",
758 'scapy-integ': "NULL",
Ole Troan64e978b2019-10-17 21:40:36 +0200759 'key': b"JPjyOWBeVEQiMe7h",
Neale Ranns80f6fd52019-04-16 02:41:34 +0000760 'salt': 0},
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000761 'AES-GCM-192/NONE': {
762 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
Neale Ranns80f6fd52019-04-16 02:41:34 +0000763 IPSEC_API_CRYPTO_ALG_AES_GCM_192),
764 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
765 IPSEC_API_INTEG_ALG_NONE),
766 'scapy-crypto': "AES-GCM",
767 'scapy-integ': "NULL",
Ole Troan64e978b2019-10-17 21:40:36 +0200768 'key': b"JPjyOWBeVEQiMe7h01234567",
Neale Ranns80f6fd52019-04-16 02:41:34 +0000769 'salt': 1010},
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000770 'AES-GCM-256/NONE': {
771 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
Neale Ranns47feb112019-04-11 15:14:07 +0000772 IPSEC_API_CRYPTO_ALG_AES_GCM_256),
773 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
774 IPSEC_API_INTEG_ALG_NONE),
775 'scapy-crypto': "AES-GCM",
776 'scapy-integ': "NULL",
Ole Troan64e978b2019-10-17 21:40:36 +0200777 'key': b"JPjyOWBeVEQiMe7h0123456787654321",
Neale Ranns80f6fd52019-04-16 02:41:34 +0000778 'salt': 2020},
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000779 'AES-CBC-128/MD5-96': {
780 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
Neale Ranns47feb112019-04-11 15:14:07 +0000781 IPSEC_API_CRYPTO_ALG_AES_CBC_128),
782 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
Dmitry Vakhrushev77cc14a2019-08-14 00:12:33 -0400783 IPSEC_API_INTEG_ALG_MD5_96),
Neale Ranns47feb112019-04-11 15:14:07 +0000784 'scapy-crypto': "AES-CBC",
Dmitry Vakhrushev77cc14a2019-08-14 00:12:33 -0400785 'scapy-integ': "HMAC-MD5-96",
Neale Ranns80f6fd52019-04-16 02:41:34 +0000786 'salt': 0,
Ole Troan64e978b2019-10-17 21:40:36 +0200787 'key': b"JPjyOWBeVEQiMe7h"},
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000788 'AES-CBC-192/SHA1-96': {
789 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
Neale Ranns47feb112019-04-11 15:14:07 +0000790 IPSEC_API_CRYPTO_ALG_AES_CBC_192),
791 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
792 IPSEC_API_INTEG_ALG_SHA1_96),
793 'scapy-crypto': "AES-CBC",
794 'scapy-integ': "HMAC-SHA1-96",
Neale Ranns80f6fd52019-04-16 02:41:34 +0000795 'salt': 0,
Ole Troan64e978b2019-10-17 21:40:36 +0200796 'key': b"JPjyOWBeVEQiMe7hJPjyOWBe"},
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000797 'AES-CBC-256/SHA1-96': {
798 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
Neale Ranns47feb112019-04-11 15:14:07 +0000799 IPSEC_API_CRYPTO_ALG_AES_CBC_256),
800 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
801 IPSEC_API_INTEG_ALG_SHA1_96),
802 'scapy-crypto': "AES-CBC",
803 'scapy-integ': "HMAC-SHA1-96",
Neale Ranns80f6fd52019-04-16 02:41:34 +0000804 'salt': 0,
Ole Troan64e978b2019-10-17 21:40:36 +0200805 'key': b"JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h"},
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000806 '3DES-CBC/SHA1-96': {
807 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
Vladimir Ratnikovf4805072019-05-17 09:17:59 -0400808 IPSEC_API_CRYPTO_ALG_3DES_CBC),
809 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
810 IPSEC_API_INTEG_ALG_SHA1_96),
811 'scapy-crypto': "3DES",
812 'scapy-integ': "HMAC-SHA1-96",
813 'salt': 0,
Ole Troan64e978b2019-10-17 21:40:36 +0200814 'key': b"JPjyOWBeVEQiMe7h00112233"},
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000815 'NONE/SHA1-96': {
816 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
Neale Ranns2cdcd0c2019-08-27 12:26:14 +0000817 IPSEC_API_CRYPTO_ALG_NONE),
818 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
819 IPSEC_API_INTEG_ALG_SHA1_96),
820 'scapy-crypto': "NULL",
821 'scapy-integ': "HMAC-SHA1-96",
822 'salt': 0,
Benoît Ganne490b9272021-01-22 18:03:09 +0100823 'key': b"JPjyOWBeVEQiMe7h00112233"},
824 'AES-CTR-128/SHA1-96': {
825 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
826 IPSEC_API_CRYPTO_ALG_AES_CTR_128),
827 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
828 IPSEC_API_INTEG_ALG_SHA1_96),
829 'scapy-crypto': "AES-CTR",
830 'scapy-integ': "HMAC-SHA1-96",
831 'salt': 0,
832 'key': b"JPjyOWBeVEQiMe7h"},
833 'AES-CTR-192/SHA1-96': {
834 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
835 IPSEC_API_CRYPTO_ALG_AES_CTR_192),
836 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
837 IPSEC_API_INTEG_ALG_SHA1_96),
838 'scapy-crypto': "AES-CTR",
839 'scapy-integ': "HMAC-SHA1-96",
840 'salt': 1010,
841 'key': b"JPjyOWBeVEQiMe7hJPjyOWBe"},
842 'AES-CTR-256/SHA1-96': {
843 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
844 IPSEC_API_CRYPTO_ALG_AES_CTR_256),
845 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
846 IPSEC_API_INTEG_ALG_SHA1_96),
847 'scapy-crypto': "AES-CTR",
848 'scapy-integ': "HMAC-SHA1-96",
849 'salt': 2020,
850 'key': b"JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h"}}
Neale Ranns4f33c802019-04-10 12:39:10 +0000851
Neale Ranns4f33c802019-04-10 12:39:10 +0000852
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000853class RunTestIpsecEspAll(ConfigIpsecESP,
854 IpsecTra4, IpsecTra6,
855 IpsecTun4, IpsecTun6):
856 """ Ipsec ESP all Algos """
857
Neale Ranns8c609af2021-02-25 10:05:32 +0000858 @classmethod
859 def setUpConstants(cls):
860 test_args = str.split(cls.__doc__, " ")
861 engine = test_args[0]
862 if engine == "async":
Klement Sekera8d815022021-03-15 16:58:10 +0100863 cls.vpp_worker_count = 2
Neale Ranns8c609af2021-02-25 10:05:32 +0000864 super(RunTestIpsecEspAll, cls).setUpConstants()
865
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000866 def setUp(self):
867 super(RunTestIpsecEspAll, self).setUp()
868 test_args = str.split(self.__doc__, " ")
869
870 params = MyParameters()
871 self.engine = test_args[0]
872 self.flag = params.flags[0]
Neale Ranns5b891102021-06-28 13:31:28 +0000873 if test_args[1] == 'ESNon':
874 self.flag |= params.flags[1]
875 if test_args[2] == 'ARon':
876 self.flag |= params.flags[2]
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000877
Neale Ranns5b891102021-06-28 13:31:28 +0000878 self.algo = params.algos[test_args[3]]
Neale Ranns8c609af2021-02-25 10:05:32 +0000879 self.async_mode = False
880 if self.engine == "async":
881 self.async_mode = True
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000882
883 def tearDown(self):
884 super(RunTestIpsecEspAll, self).tearDown()
885
886 def run_test(self):
887 self.run_a_test(self.engine, self.flag, self.algo)
888
Filip Tehlarefcad1a2020-02-04 09:36:04 +0000889 def run_a_test(self, engine, flag, algo, payload_size=None):
Neale Ranns8c609af2021-02-25 10:05:32 +0000890 if self.async_mode:
891 self.vapi.cli("set ipsec async mode on")
892 else:
893 self.vapi.cli("set crypto handler all %s" % engine)
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000894
Neale Ranns8c609af2021-02-25 10:05:32 +0000895 self.logger.info(self.vapi.cli("show crypto async status"))
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000896 self.ipv4_params = IPsecIPv4Params()
897 self.ipv6_params = IPsecIPv6Params()
898
899 self.params = {self.ipv4_params.addr_type:
900 self.ipv4_params,
901 self.ipv6_params.addr_type:
902 self.ipv6_params}
903
904 for _, p in self.params.items():
905 p.auth_algo_vpp_id = algo['vpp-integ']
906 p.crypt_algo_vpp_id = algo['vpp-crypto']
907 p.crypt_algo = algo['scapy-crypto']
908 p.auth_algo = algo['scapy-integ']
909 p.crypt_key = algo['key']
910 p.salt = algo['salt']
Neale Ranns5b891102021-06-28 13:31:28 +0000911 p.flags = flag
Neale Ranns9ec846c2021-02-09 14:04:02 +0000912 p.outer_flow_label = 243224
Neale Ranns8c609af2021-02-25 10:05:32 +0000913 p.async_mode = self.async_mode
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000914
915 self.reporter.send_keep_alive(self)
916
Neale Ranns4f33c802019-04-10 12:39:10 +0000917 #
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000918 # configure the SPDs. SAs, etc
Neale Ranns4f33c802019-04-10 12:39:10 +0000919 #
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000920 self.config_network(self.params.values())
Neale Ranns4f33c802019-04-10 12:39:10 +0000921
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000922 #
923 # run some traffic.
924 # An exhautsive 4o6, 6o4 is not necessary
925 # for each algo
926 #
927 self.verify_tra_basic6(count=NUM_PKTS)
928 self.verify_tra_basic4(count=NUM_PKTS)
929 self.verify_tun_66(self.params[socket.AF_INET6],
930 count=NUM_PKTS)
Christian Hoppsfb7e7ed2019-11-03 07:02:15 -0500931 #
932 # Use an odd-byte payload size to check for correct padding.
933 #
934 # 49 + 2 == 51 which should pad +1 to 52 for 4 byte alignment, +5
935 # to 56 for 8 byte alignment, and +13 to 64 for 64 byte alignment.
936 # This should catch bugs where the code is incorrectly over-padding
937 # for algorithms that don't require it
938 psz = 49 - len(IP()/ICMP()) if payload_size is None else payload_size
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000939 self.verify_tun_44(self.params[socket.AF_INET],
Christian Hoppsfb7e7ed2019-11-03 07:02:15 -0500940 count=NUM_PKTS, payload_size=psz)
Neale Ranns4f33c802019-04-10 12:39:10 +0000941
Filip Tehlarefcad1a2020-02-04 09:36:04 +0000942 LARGE_PKT_SZ = [
Filip Tehlare4e8c6b2020-02-13 07:49:30 +0000943 1970, # results in 2 chained buffers entering decrypt node
944 # but leaving as simple buffer due to ICV removal (tra4)
PiotrX Kleskifdca4dd2020-05-05 14:14:22 +0200945 2004, # footer+ICV will be added to 2nd buffer (tun4)
Filip Tehlarefcad1a2020-02-04 09:36:04 +0000946 4010, # ICV ends up splitted accross 2 buffers in esp_decrypt
947 # for transport4; transport6 takes normal path
Filip Tehlarefcad1a2020-02-04 09:36:04 +0000948 4020, # same as above but tra4 and tra6 are switched
949 ]
950 if self.engine in engines_supporting_chain_bufs:
951 for sz in LARGE_PKT_SZ:
952 self.verify_tra_basic4(count=NUM_PKTS, payload_size=sz)
953 self.verify_tra_basic6(count=NUM_PKTS, payload_size=sz)
954 self.verify_tun_66(self.params[socket.AF_INET6],
955 count=NUM_PKTS, payload_size=sz)
956 self.verify_tun_44(self.params[socket.AF_INET],
957 count=NUM_PKTS, payload_size=sz)
958
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000959 #
Neale Ranns5b891102021-06-28 13:31:28 +0000960 # reconfigure the network and SA to run the
961 # anti replay tests
962 #
963 saf = VppEnum.vl_api_ipsec_sad_flags_t
964 if flag & saf.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY:
965 self.unconfig_network()
966 self.config_network(self.params.values())
967 self.verify_tra_anti_replay()
968
969 self.unconfig_network()
970 self.config_network(self.params.values())
971 self.verify_hi_seq_num()
972
973 #
Neale Rannsf16e9a52021-02-25 19:09:24 +0000974 # swap the handlers while SAs are up
975 #
Neale Ranns5b891102021-06-28 13:31:28 +0000976 self.unconfig_network()
977 self.config_network(self.params.values())
Neale Rannsf16e9a52021-02-25 19:09:24 +0000978 for e in engines:
979 if e != engine:
980 self.vapi.cli("set crypto handler all %s" % e)
981 self.verify_tra_basic4(count=NUM_PKTS)
982
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000983 self.unconfig_network()
juraj.linkes11057662019-07-08 10:22:55 +0200984
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000985#
986# To generate test classes, do:
987# grep '# GEN' test_ipsec_esp.py | sed -e 's/# GEN //g' | bash
988#
Neale Ranns8c609af2021-02-25 10:05:32 +0000989# GEN for ENG in native ipsecmb openssl; do \
Neale Ranns5b891102021-06-28 13:31:28 +0000990# GEN for ESN in ESNon ESNoff; do for AR in ARon ARoff; do \
991# GEN for ALG in AES-GCM-128/NONE \
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000992# GEN AES-GCM-192/NONE AES-GCM-256/NONE AES-CBC-128/MD5-96 \
993# GEN AES-CBC-192/SHA1-96 AES-CBC-256/SHA1-96 \
Benoît Ganne490b9272021-01-22 18:03:09 +0100994# GEN 3DES-CBC/SHA1-96 NONE/SHA1-96 \
995# GEN AES-CTR-128/SHA1-96 AES-CTR-192/SHA1-96 AES-CTR-256/SHA1-96; do \
Neale Ranns5b891102021-06-28 13:31:28 +0000996# GEN echo -en "\n\nclass "
997# GEN echo -e "Test_${ENG}_${ESN}_${AR}_${ALG}(RunTestIpsecEspAll):" |
998# GEN sed -e 's/-/_/g' -e 's#/#_#g' ;
999# GEN echo ' """'$ENG $ESN $AR $ALG IPSec test'"""' ;
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001000# GEN echo " def test_ipsec(self):";
Neale Ranns5b891102021-06-28 13:31:28 +00001001# GEN echo ' """'$ENG $ESN $AR $ALG IPSec test'"""' ;
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001002# GEN echo " self.run_test()";
Neale Ranns5b891102021-06-28 13:31:28 +00001003# GEN done; done; done; done
Neale Ranns8c609af2021-02-25 10:05:32 +00001004#
Neale Ranns5b891102021-06-28 13:31:28 +00001005# GEN for ESN in ESNon ESNoff; do for AR in ARon ARoff; do \
1006# GEN for ALG in \
Neale Ranns8c609af2021-02-25 10:05:32 +00001007# GEN AES-GCM-128/NONE AES-GCM-192/NONE AES-GCM-256/NONE \
1008# GEN AES-CBC-192/SHA1-96 AES-CBC-256/SHA1-96; do \
Neale Ranns5b891102021-06-28 13:31:28 +00001009# GEN echo -en "\n\nclass "
1010# GEN echo -e "Test_async_${ESN}_${AR}_${ALG}(RunTestIpsecEspAll):" |
1011# GEN sed -e 's/-/_/g' -e 's#/#_#g' ;
1012# GEN echo ' """'async $ESN $AR $ALG IPSec test'"""' ;
Neale Ranns8c609af2021-02-25 10:05:32 +00001013# GEN echo " def test_ipsec(self):";
Neale Ranns5b891102021-06-28 13:31:28 +00001014# GEN echo ' """'async $ESN $AR $ALG IPSec test'"""' ;
Neale Ranns8c609af2021-02-25 10:05:32 +00001015# GEN echo " self.run_test()";
Neale Ranns5b891102021-06-28 13:31:28 +00001016# GEN done; done; done;
1017
1018
1019class Test_native_ESNon_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1020 """native ESNon ARon AES-GCM-128/NONE IPSec test"""
1021 def test_ipsec(self):
1022 """native ESNon ARon AES-GCM-128/NONE IPSec test"""
1023 self.run_test()
1024
1025
1026class Test_native_ESNon_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1027 """native ESNon ARon AES-GCM-192/NONE IPSec test"""
1028 def test_ipsec(self):
1029 """native ESNon ARon AES-GCM-192/NONE IPSec test"""
1030 self.run_test()
1031
1032
1033class Test_native_ESNon_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1034 """native ESNon ARon AES-GCM-256/NONE IPSec test"""
1035 def test_ipsec(self):
1036 """native ESNon ARon AES-GCM-256/NONE IPSec test"""
1037 self.run_test()
1038
1039
1040class Test_native_ESNon_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1041 """native ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
1042 def test_ipsec(self):
1043 """native ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
1044 self.run_test()
1045
1046
1047class Test_native_ESNon_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1048 """native ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
1049 def test_ipsec(self):
1050 """native ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
1051 self.run_test()
1052
1053
1054class Test_native_ESNon_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1055 """native ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
1056 def test_ipsec(self):
1057 """native ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
1058 self.run_test()
1059
1060
1061class Test_native_ESNon_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1062 """native ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
1063 def test_ipsec(self):
1064 """native ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
1065 self.run_test()
1066
1067
1068class Test_native_ESNon_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1069 """native ESNon ARon NONE/SHA1-96 IPSec test"""
1070 def test_ipsec(self):
1071 """native ESNon ARon NONE/SHA1-96 IPSec test"""
1072 self.run_test()
1073
1074
1075class Test_native_ESNon_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1076 """native ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
1077 def test_ipsec(self):
1078 """native ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
1079 self.run_test()
1080
1081
1082class Test_native_ESNon_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1083 """native ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
1084 def test_ipsec(self):
1085 """native ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
1086 self.run_test()
1087
1088
1089class Test_native_ESNon_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1090 """native ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
1091 def test_ipsec(self):
1092 """native ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
1093 self.run_test()
1094
1095
1096class Test_native_ESNon_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1097 """native ESNon ARoff AES-GCM-128/NONE IPSec test"""
1098 def test_ipsec(self):
1099 """native ESNon ARoff AES-GCM-128/NONE IPSec test"""
1100 self.run_test()
1101
1102
1103class Test_native_ESNon_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1104 """native ESNon ARoff AES-GCM-192/NONE IPSec test"""
1105 def test_ipsec(self):
1106 """native ESNon ARoff AES-GCM-192/NONE IPSec test"""
1107 self.run_test()
1108
1109
1110class Test_native_ESNon_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1111 """native ESNon ARoff AES-GCM-256/NONE IPSec test"""
1112 def test_ipsec(self):
1113 """native ESNon ARoff AES-GCM-256/NONE IPSec test"""
1114 self.run_test()
1115
1116
1117class Test_native_ESNon_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1118 """native ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
1119 def test_ipsec(self):
1120 """native ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
1121 self.run_test()
1122
1123
1124class Test_native_ESNon_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1125 """native ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
1126 def test_ipsec(self):
1127 """native ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
1128 self.run_test()
1129
1130
1131class Test_native_ESNon_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1132 """native ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
1133 def test_ipsec(self):
1134 """native ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
1135 self.run_test()
1136
1137
1138class Test_native_ESNon_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1139 """native ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
1140 def test_ipsec(self):
1141 """native ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
1142 self.run_test()
1143
1144
1145class Test_native_ESNon_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1146 """native ESNon ARoff NONE/SHA1-96 IPSec test"""
1147 def test_ipsec(self):
1148 """native ESNon ARoff NONE/SHA1-96 IPSec test"""
1149 self.run_test()
1150
1151
1152class Test_native_ESNon_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1153 """native ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
1154 def test_ipsec(self):
1155 """native ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
1156 self.run_test()
1157
1158
1159class Test_native_ESNon_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1160 """native ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
1161 def test_ipsec(self):
1162 """native ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
1163 self.run_test()
1164
1165
1166class Test_native_ESNon_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1167 """native ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
1168 def test_ipsec(self):
1169 """native ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
1170 self.run_test()
1171
1172
1173class Test_native_ESNoff_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1174 """native ESNoff ARon AES-GCM-128/NONE IPSec test"""
1175 def test_ipsec(self):
1176 """native ESNoff ARon AES-GCM-128/NONE IPSec test"""
1177 self.run_test()
1178
1179
1180class Test_native_ESNoff_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1181 """native ESNoff ARon AES-GCM-192/NONE IPSec test"""
1182 def test_ipsec(self):
1183 """native ESNoff ARon AES-GCM-192/NONE IPSec test"""
1184 self.run_test()
1185
1186
1187class Test_native_ESNoff_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1188 """native ESNoff ARon AES-GCM-256/NONE IPSec test"""
1189 def test_ipsec(self):
1190 """native ESNoff ARon AES-GCM-256/NONE IPSec test"""
1191 self.run_test()
1192
1193
1194class Test_native_ESNoff_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1195 """native ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
1196 def test_ipsec(self):
1197 """native ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
1198 self.run_test()
1199
1200
1201class Test_native_ESNoff_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1202 """native ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
1203 def test_ipsec(self):
1204 """native ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
1205 self.run_test()
1206
1207
1208class Test_native_ESNoff_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1209 """native ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
1210 def test_ipsec(self):
1211 """native ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
1212 self.run_test()
1213
1214
1215class Test_native_ESNoff_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1216 """native ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
1217 def test_ipsec(self):
1218 """native ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
1219 self.run_test()
1220
1221
1222class Test_native_ESNoff_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1223 """native ESNoff ARon NONE/SHA1-96 IPSec test"""
1224 def test_ipsec(self):
1225 """native ESNoff ARon NONE/SHA1-96 IPSec test"""
1226 self.run_test()
1227
1228
1229class Test_native_ESNoff_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1230 """native ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
1231 def test_ipsec(self):
1232 """native ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
1233 self.run_test()
1234
1235
1236class Test_native_ESNoff_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1237 """native ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
1238 def test_ipsec(self):
1239 """native ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
1240 self.run_test()
1241
1242
1243class Test_native_ESNoff_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1244 """native ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
1245 def test_ipsec(self):
1246 """native ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
1247 self.run_test()
1248
1249
1250class Test_native_ESNoff_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1251 """native ESNoff ARoff AES-GCM-128/NONE IPSec test"""
1252 def test_ipsec(self):
1253 """native ESNoff ARoff AES-GCM-128/NONE IPSec test"""
1254 self.run_test()
1255
1256
1257class Test_native_ESNoff_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1258 """native ESNoff ARoff AES-GCM-192/NONE IPSec test"""
1259 def test_ipsec(self):
1260 """native ESNoff ARoff AES-GCM-192/NONE IPSec test"""
1261 self.run_test()
1262
1263
1264class Test_native_ESNoff_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1265 """native ESNoff ARoff AES-GCM-256/NONE IPSec test"""
1266 def test_ipsec(self):
1267 """native ESNoff ARoff AES-GCM-256/NONE IPSec test"""
1268 self.run_test()
1269
1270
1271class Test_native_ESNoff_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1272 """native ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
1273 def test_ipsec(self):
1274 """native ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
1275 self.run_test()
1276
1277
1278class Test_native_ESNoff_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1279 """native ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
1280 def test_ipsec(self):
1281 """native ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
1282 self.run_test()
1283
1284
1285class Test_native_ESNoff_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1286 """native ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
1287 def test_ipsec(self):
1288 """native ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
1289 self.run_test()
1290
1291
1292class Test_native_ESNoff_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1293 """native ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
1294 def test_ipsec(self):
1295 """native ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
1296 self.run_test()
1297
1298
1299class Test_native_ESNoff_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1300 """native ESNoff ARoff NONE/SHA1-96 IPSec test"""
1301 def test_ipsec(self):
1302 """native ESNoff ARoff NONE/SHA1-96 IPSec test"""
1303 self.run_test()
1304
1305
1306class Test_native_ESNoff_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1307 """native ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
1308 def test_ipsec(self):
1309 """native ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
1310 self.run_test()
1311
1312
1313class Test_native_ESNoff_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1314 """native ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
1315 def test_ipsec(self):
1316 """native ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
1317 self.run_test()
1318
1319
1320class Test_native_ESNoff_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1321 """native ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
1322 def test_ipsec(self):
1323 """native ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
1324 self.run_test()
1325
1326
1327class Test_ipsecmb_ESNon_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1328 """ipsecmb ESNon ARon AES-GCM-128/NONE IPSec test"""
1329 def test_ipsec(self):
1330 """ipsecmb ESNon ARon AES-GCM-128/NONE IPSec test"""
1331 self.run_test()
1332
1333
1334class Test_ipsecmb_ESNon_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1335 """ipsecmb ESNon ARon AES-GCM-192/NONE IPSec test"""
1336 def test_ipsec(self):
1337 """ipsecmb ESNon ARon AES-GCM-192/NONE IPSec test"""
1338 self.run_test()
1339
1340
1341class Test_ipsecmb_ESNon_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1342 """ipsecmb ESNon ARon AES-GCM-256/NONE IPSec test"""
1343 def test_ipsec(self):
1344 """ipsecmb ESNon ARon AES-GCM-256/NONE IPSec test"""
1345 self.run_test()
1346
1347
1348class Test_ipsecmb_ESNon_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1349 """ipsecmb ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
1350 def test_ipsec(self):
1351 """ipsecmb ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
1352 self.run_test()
1353
1354
1355class Test_ipsecmb_ESNon_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1356 """ipsecmb ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
1357 def test_ipsec(self):
1358 """ipsecmb ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
1359 self.run_test()
1360
1361
1362class Test_ipsecmb_ESNon_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1363 """ipsecmb ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
1364 def test_ipsec(self):
1365 """ipsecmb ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
1366 self.run_test()
1367
1368
1369class Test_ipsecmb_ESNon_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1370 """ipsecmb ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
1371 def test_ipsec(self):
1372 """ipsecmb ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
1373 self.run_test()
1374
1375
1376class Test_ipsecmb_ESNon_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1377 """ipsecmb ESNon ARon NONE/SHA1-96 IPSec test"""
1378 def test_ipsec(self):
1379 """ipsecmb ESNon ARon NONE/SHA1-96 IPSec test"""
1380 self.run_test()
1381
1382
1383class Test_ipsecmb_ESNon_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1384 """ipsecmb ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
1385 def test_ipsec(self):
1386 """ipsecmb ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
1387 self.run_test()
1388
1389
1390class Test_ipsecmb_ESNon_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1391 """ipsecmb ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
1392 def test_ipsec(self):
1393 """ipsecmb ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
1394 self.run_test()
1395
1396
1397class Test_ipsecmb_ESNon_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1398 """ipsecmb ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
1399 def test_ipsec(self):
1400 """ipsecmb ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
1401 self.run_test()
1402
1403
1404class Test_ipsecmb_ESNon_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1405 """ipsecmb ESNon ARoff AES-GCM-128/NONE IPSec test"""
1406 def test_ipsec(self):
1407 """ipsecmb ESNon ARoff AES-GCM-128/NONE IPSec test"""
1408 self.run_test()
1409
1410
1411class Test_ipsecmb_ESNon_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1412 """ipsecmb ESNon ARoff AES-GCM-192/NONE IPSec test"""
1413 def test_ipsec(self):
1414 """ipsecmb ESNon ARoff AES-GCM-192/NONE IPSec test"""
1415 self.run_test()
1416
1417
1418class Test_ipsecmb_ESNon_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1419 """ipsecmb ESNon ARoff AES-GCM-256/NONE IPSec test"""
1420 def test_ipsec(self):
1421 """ipsecmb ESNon ARoff AES-GCM-256/NONE IPSec test"""
1422 self.run_test()
1423
1424
1425class Test_ipsecmb_ESNon_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1426 """ipsecmb ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
1427 def test_ipsec(self):
1428 """ipsecmb ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
1429 self.run_test()
1430
1431
1432class Test_ipsecmb_ESNon_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1433 """ipsecmb ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
1434 def test_ipsec(self):
1435 """ipsecmb ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
1436 self.run_test()
1437
1438
1439class Test_ipsecmb_ESNon_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1440 """ipsecmb ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
1441 def test_ipsec(self):
1442 """ipsecmb ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
1443 self.run_test()
1444
1445
1446class Test_ipsecmb_ESNon_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1447 """ipsecmb ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
1448 def test_ipsec(self):
1449 """ipsecmb ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
1450 self.run_test()
1451
1452
1453class Test_ipsecmb_ESNon_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1454 """ipsecmb ESNon ARoff NONE/SHA1-96 IPSec test"""
1455 def test_ipsec(self):
1456 """ipsecmb ESNon ARoff NONE/SHA1-96 IPSec test"""
1457 self.run_test()
1458
1459
1460class Test_ipsecmb_ESNon_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1461 """ipsecmb ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
1462 def test_ipsec(self):
1463 """ipsecmb ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
1464 self.run_test()
1465
1466
1467class Test_ipsecmb_ESNon_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1468 """ipsecmb ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
1469 def test_ipsec(self):
1470 """ipsecmb ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
1471 self.run_test()
1472
1473
1474class Test_ipsecmb_ESNon_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1475 """ipsecmb ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
1476 def test_ipsec(self):
1477 """ipsecmb ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
1478 self.run_test()
1479
1480
1481class Test_ipsecmb_ESNoff_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1482 """ipsecmb ESNoff ARon AES-GCM-128/NONE IPSec test"""
1483 def test_ipsec(self):
1484 """ipsecmb ESNoff ARon AES-GCM-128/NONE IPSec test"""
1485 self.run_test()
1486
1487
1488class Test_ipsecmb_ESNoff_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1489 """ipsecmb ESNoff ARon AES-GCM-192/NONE IPSec test"""
1490 def test_ipsec(self):
1491 """ipsecmb ESNoff ARon AES-GCM-192/NONE IPSec test"""
1492 self.run_test()
1493
1494
1495class Test_ipsecmb_ESNoff_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1496 """ipsecmb ESNoff ARon AES-GCM-256/NONE IPSec test"""
1497 def test_ipsec(self):
1498 """ipsecmb ESNoff ARon AES-GCM-256/NONE IPSec test"""
1499 self.run_test()
1500
1501
1502class Test_ipsecmb_ESNoff_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1503 """ipsecmb ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
1504 def test_ipsec(self):
1505 """ipsecmb ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
1506 self.run_test()
1507
1508
1509class Test_ipsecmb_ESNoff_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1510 """ipsecmb ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
1511 def test_ipsec(self):
1512 """ipsecmb ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
1513 self.run_test()
1514
1515
1516class Test_ipsecmb_ESNoff_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1517 """ipsecmb ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
1518 def test_ipsec(self):
1519 """ipsecmb ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
1520 self.run_test()
1521
1522
1523class Test_ipsecmb_ESNoff_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1524 """ipsecmb ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
1525 def test_ipsec(self):
1526 """ipsecmb ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
1527 self.run_test()
1528
1529
1530class Test_ipsecmb_ESNoff_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1531 """ipsecmb ESNoff ARon NONE/SHA1-96 IPSec test"""
1532 def test_ipsec(self):
1533 """ipsecmb ESNoff ARon NONE/SHA1-96 IPSec test"""
1534 self.run_test()
1535
1536
1537class Test_ipsecmb_ESNoff_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1538 """ipsecmb ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
1539 def test_ipsec(self):
1540 """ipsecmb ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
1541 self.run_test()
1542
1543
1544class Test_ipsecmb_ESNoff_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1545 """ipsecmb ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
1546 def test_ipsec(self):
1547 """ipsecmb ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
1548 self.run_test()
Neale Ranns4f33c802019-04-10 12:39:10 +00001549
Neale Ranns4f33c802019-04-10 12:39:10 +00001550
Neale Ranns5b891102021-06-28 13:31:28 +00001551class Test_ipsecmb_ESNoff_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1552 """ipsecmb ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001553 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001554 """ipsecmb ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001555 self.run_test()
Neale Ranns4f33c802019-04-10 12:39:10 +00001556
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001557
Neale Ranns5b891102021-06-28 13:31:28 +00001558class Test_ipsecmb_ESNoff_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1559 """ipsecmb ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001560 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001561 """ipsecmb ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001562 self.run_test()
1563
1564
Neale Ranns5b891102021-06-28 13:31:28 +00001565class Test_ipsecmb_ESNoff_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1566 """ipsecmb ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001567 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001568 """ipsecmb ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001569 self.run_test()
1570
1571
Neale Ranns5b891102021-06-28 13:31:28 +00001572class Test_ipsecmb_ESNoff_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1573 """ipsecmb ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001574 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001575 """ipsecmb ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001576 self.run_test()
1577
1578
Neale Ranns5b891102021-06-28 13:31:28 +00001579class Test_ipsecmb_ESNoff_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1580 """ipsecmb ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001581 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001582 """ipsecmb ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001583 self.run_test()
1584
1585
Neale Ranns5b891102021-06-28 13:31:28 +00001586class Test_ipsecmb_ESNoff_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1587 """ipsecmb ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001588 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001589 """ipsecmb ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001590 self.run_test()
1591
1592
Neale Ranns5b891102021-06-28 13:31:28 +00001593class Test_ipsecmb_ESNoff_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1594 """ipsecmb ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001595 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001596 """ipsecmb ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001597 self.run_test()
1598
1599
Neale Ranns5b891102021-06-28 13:31:28 +00001600class Test_ipsecmb_ESNoff_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1601 """ipsecmb ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001602 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001603 """ipsecmb ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001604 self.run_test()
1605
1606
Neale Ranns5b891102021-06-28 13:31:28 +00001607class Test_ipsecmb_ESNoff_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1608 """ipsecmb ESNoff ARoff NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001609 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001610 """ipsecmb ESNoff ARoff NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001611 self.run_test()
1612
1613
Neale Ranns5b891102021-06-28 13:31:28 +00001614class Test_ipsecmb_ESNoff_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1615 """ipsecmb ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001616 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001617 """ipsecmb ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001618 self.run_test()
1619
1620
Neale Ranns5b891102021-06-28 13:31:28 +00001621class Test_ipsecmb_ESNoff_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1622 """ipsecmb ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001623 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001624 """ipsecmb ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001625 self.run_test()
1626
1627
Neale Ranns5b891102021-06-28 13:31:28 +00001628class Test_ipsecmb_ESNoff_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1629 """ipsecmb ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001630 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001631 """ipsecmb ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001632 self.run_test()
1633
1634
Neale Ranns5b891102021-06-28 13:31:28 +00001635class Test_openssl_ESNon_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1636 """openssl ESNon ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001637 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001638 """openssl ESNon ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001639 self.run_test()
1640
1641
Neale Ranns5b891102021-06-28 13:31:28 +00001642class Test_openssl_ESNon_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1643 """openssl ESNon ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001644 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001645 """openssl ESNon ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001646 self.run_test()
1647
1648
Neale Ranns5b891102021-06-28 13:31:28 +00001649class Test_openssl_ESNon_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1650 """openssl ESNon ARon AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001651 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001652 """openssl ESNon ARon AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001653 self.run_test()
1654
1655
Neale Ranns5b891102021-06-28 13:31:28 +00001656class Test_openssl_ESNon_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1657 """openssl ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001658 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001659 """openssl ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001660 self.run_test()
1661
1662
Neale Ranns5b891102021-06-28 13:31:28 +00001663class Test_openssl_ESNon_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1664 """openssl ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001665 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001666 """openssl ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001667 self.run_test()
1668
1669
Neale Ranns5b891102021-06-28 13:31:28 +00001670class Test_openssl_ESNon_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1671 """openssl ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001672 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001673 """openssl ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001674 self.run_test()
1675
1676
Neale Ranns5b891102021-06-28 13:31:28 +00001677class Test_openssl_ESNon_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1678 """openssl ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001679 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001680 """openssl ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001681 self.run_test()
1682
1683
Neale Ranns5b891102021-06-28 13:31:28 +00001684class Test_openssl_ESNon_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1685 """openssl ESNon ARon NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001686 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001687 """openssl ESNon ARon NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001688 self.run_test()
1689
1690
Neale Ranns5b891102021-06-28 13:31:28 +00001691class Test_openssl_ESNon_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1692 """openssl ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001693 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001694 """openssl ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001695 self.run_test()
1696
1697
Neale Ranns5b891102021-06-28 13:31:28 +00001698class Test_openssl_ESNon_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1699 """openssl ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001700 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001701 """openssl ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001702 self.run_test()
1703
1704
Neale Ranns5b891102021-06-28 13:31:28 +00001705class Test_openssl_ESNon_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1706 """openssl ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001707 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001708 """openssl ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001709 self.run_test()
1710
1711
Neale Ranns5b891102021-06-28 13:31:28 +00001712class Test_openssl_ESNon_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1713 """openssl ESNon ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001714 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001715 """openssl ESNon ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001716 self.run_test()
1717
1718
Neale Ranns5b891102021-06-28 13:31:28 +00001719class Test_openssl_ESNon_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1720 """openssl ESNon ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001721 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001722 """openssl ESNon ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001723 self.run_test()
1724
1725
Neale Ranns5b891102021-06-28 13:31:28 +00001726class Test_openssl_ESNon_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1727 """openssl ESNon ARoff AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001728 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001729 """openssl ESNon ARoff AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001730 self.run_test()
1731
1732
Neale Ranns5b891102021-06-28 13:31:28 +00001733class Test_openssl_ESNon_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1734 """openssl ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001735 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001736 """openssl ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001737 self.run_test()
1738
1739
Neale Ranns5b891102021-06-28 13:31:28 +00001740class Test_openssl_ESNon_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1741 """openssl ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001742 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001743 """openssl ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001744 self.run_test()
1745
1746
Neale Ranns5b891102021-06-28 13:31:28 +00001747class Test_openssl_ESNon_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1748 """openssl ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001749 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001750 """openssl ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001751 self.run_test()
1752
1753
Neale Ranns5b891102021-06-28 13:31:28 +00001754class Test_openssl_ESNon_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1755 """openssl ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001756 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001757 """openssl ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001758 self.run_test()
1759
1760
Neale Ranns5b891102021-06-28 13:31:28 +00001761class Test_openssl_ESNon_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1762 """openssl ESNon ARoff NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001763 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001764 """openssl ESNon ARoff NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001765 self.run_test()
1766
1767
Neale Ranns5b891102021-06-28 13:31:28 +00001768class Test_openssl_ESNon_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1769 """openssl ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001770 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001771 """openssl ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001772 self.run_test()
1773
1774
Neale Ranns5b891102021-06-28 13:31:28 +00001775class Test_openssl_ESNon_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1776 """openssl ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001777 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001778 """openssl ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001779 self.run_test()
1780
1781
Neale Ranns5b891102021-06-28 13:31:28 +00001782class Test_openssl_ESNon_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1783 """openssl ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001784 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001785 """openssl ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001786 self.run_test()
1787
1788
Neale Ranns5b891102021-06-28 13:31:28 +00001789class Test_openssl_ESNoff_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1790 """openssl ESNoff ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001791 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001792 """openssl ESNoff ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001793 self.run_test()
1794
1795
Neale Ranns5b891102021-06-28 13:31:28 +00001796class Test_openssl_ESNoff_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1797 """openssl ESNoff ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001798 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001799 """openssl ESNoff ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001800 self.run_test()
1801
1802
Neale Ranns5b891102021-06-28 13:31:28 +00001803class Test_openssl_ESNoff_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1804 """openssl ESNoff ARon AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001805 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001806 """openssl ESNoff ARon AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001807 self.run_test()
1808
1809
Neale Ranns5b891102021-06-28 13:31:28 +00001810class Test_openssl_ESNoff_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1811 """openssl ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001812 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001813 """openssl ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001814 self.run_test()
1815
1816
Neale Ranns5b891102021-06-28 13:31:28 +00001817class Test_openssl_ESNoff_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1818 """openssl ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001819 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001820 """openssl ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001821 self.run_test()
1822
1823
Neale Ranns5b891102021-06-28 13:31:28 +00001824class Test_openssl_ESNoff_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1825 """openssl ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001826 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001827 """openssl ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001828 self.run_test()
1829
1830
Neale Ranns5b891102021-06-28 13:31:28 +00001831class Test_openssl_ESNoff_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1832 """openssl ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001833 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001834 """openssl ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001835 self.run_test()
1836
1837
Neale Ranns5b891102021-06-28 13:31:28 +00001838class Test_openssl_ESNoff_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1839 """openssl ESNoff ARon NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001840 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001841 """openssl ESNoff ARon NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001842 self.run_test()
1843
1844
Neale Ranns5b891102021-06-28 13:31:28 +00001845class Test_openssl_ESNoff_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1846 """openssl ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001847 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001848 """openssl ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001849 self.run_test()
1850
1851
Neale Ranns5b891102021-06-28 13:31:28 +00001852class Test_openssl_ESNoff_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1853 """openssl ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001854 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001855 """openssl ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001856 self.run_test()
1857
1858
Neale Ranns5b891102021-06-28 13:31:28 +00001859class Test_openssl_ESNoff_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1860 """openssl ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001861 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001862 """openssl ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001863 self.run_test()
1864
1865
Neale Ranns5b891102021-06-28 13:31:28 +00001866class Test_openssl_ESNoff_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1867 """openssl ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001868 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001869 """openssl ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001870 self.run_test()
1871
1872
Neale Ranns5b891102021-06-28 13:31:28 +00001873class Test_openssl_ESNoff_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1874 """openssl ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001875 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001876 """openssl ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001877 self.run_test()
1878
1879
Neale Ranns5b891102021-06-28 13:31:28 +00001880class Test_openssl_ESNoff_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1881 """openssl ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001882 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001883 """openssl ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001884 self.run_test()
1885
1886
Neale Ranns5b891102021-06-28 13:31:28 +00001887class Test_openssl_ESNoff_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1888 """openssl ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001889 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001890 """openssl ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001891 self.run_test()
1892
1893
Neale Ranns5b891102021-06-28 13:31:28 +00001894class Test_openssl_ESNoff_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1895 """openssl ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001896 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001897 """openssl ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001898 self.run_test()
1899
1900
Neale Ranns5b891102021-06-28 13:31:28 +00001901class Test_openssl_ESNoff_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1902 """openssl ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001903 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001904 """openssl ESNoff ARoff AES-CBC-256/SHA1-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_openssl_ESNoff_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1909 """openssl ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001910 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001911 """openssl ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001912 self.run_test()
1913
1914
Neale Ranns5b891102021-06-28 13:31:28 +00001915class Test_openssl_ESNoff_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1916 """openssl ESNoff ARoff NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001917 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001918 """openssl ESNoff ARoff NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001919 self.run_test()
1920
1921
Neale Ranns5b891102021-06-28 13:31:28 +00001922class Test_openssl_ESNoff_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1923 """openssl ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001924 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001925 """openssl ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001926 self.run_test()
1927
1928
Neale Ranns5b891102021-06-28 13:31:28 +00001929class Test_openssl_ESNoff_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1930 """openssl ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001931 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001932 """openssl ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001933 self.run_test()
1934
1935
Neale Ranns5b891102021-06-28 13:31:28 +00001936class Test_openssl_ESNoff_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1937 """openssl ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001938 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001939 """openssl ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001940 self.run_test()
1941
1942
Neale Ranns5b891102021-06-28 13:31:28 +00001943class Test_async_ESNon_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1944 """async ESNon ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001945 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001946 """async ESNon ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001947 self.run_test()
1948
1949
Neale Ranns5b891102021-06-28 13:31:28 +00001950class Test_async_ESNon_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1951 """async ESNon ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001952 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001953 """async ESNon ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001954 self.run_test()
1955
1956
Neale Ranns5b891102021-06-28 13:31:28 +00001957class Test_async_ESNon_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1958 """async ESNon ARon AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001959 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001960 """async ESNon ARon AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001961 self.run_test()
1962
1963
Neale Ranns5b891102021-06-28 13:31:28 +00001964class Test_async_ESNon_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1965 """async ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001966 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001967 """async ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001968 self.run_test()
1969
1970
Neale Ranns5b891102021-06-28 13:31:28 +00001971class Test_async_ESNon_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1972 """async ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001973 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001974 """async ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001975 self.run_test()
1976
1977
Neale Ranns5b891102021-06-28 13:31:28 +00001978class Test_async_ESNon_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1979 """async ESNon ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001980 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001981 """async ESNon ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001982 self.run_test()
1983
1984
Neale Ranns5b891102021-06-28 13:31:28 +00001985class Test_async_ESNon_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1986 """async ESNon ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001987 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001988 """async ESNon ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001989 self.run_test()
Neale Ranns6afaae12019-07-17 15:07:14 +00001990
Neale Ranns4f33c802019-04-10 12:39:10 +00001991
Neale Ranns5b891102021-06-28 13:31:28 +00001992class Test_async_ESNon_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1993 """async ESNon ARoff AES-GCM-256/NONE IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001994 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001995 """async ESNon ARoff AES-GCM-256/NONE IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001996 self.run_test()
1997
1998
Neale Ranns5b891102021-06-28 13:31:28 +00001999class Test_async_ESNon_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
2000 """async ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002001 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002002 """async ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002003 self.run_test()
2004
2005
Neale Ranns5b891102021-06-28 13:31:28 +00002006class Test_async_ESNon_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
2007 """async ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002008 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002009 """async ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002010 self.run_test()
2011
2012
Neale Ranns5b891102021-06-28 13:31:28 +00002013class Test_async_ESNoff_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
2014 """async ESNoff ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002015 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002016 """async ESNoff ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002017 self.run_test()
2018
2019
Neale Ranns5b891102021-06-28 13:31:28 +00002020class Test_async_ESNoff_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
2021 """async ESNoff ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002022 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002023 """async ESNoff ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002024 self.run_test()
2025
2026
Neale Ranns5b891102021-06-28 13:31:28 +00002027class Test_async_ESNoff_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
2028 """async ESNoff ARon AES-GCM-256/NONE IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002029 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002030 """async ESNoff ARon AES-GCM-256/NONE IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002031 self.run_test()
2032
2033
Neale Ranns5b891102021-06-28 13:31:28 +00002034class Test_async_ESNoff_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
2035 """async ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002036 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002037 """async ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002038 self.run_test()
2039
2040
Neale Ranns5b891102021-06-28 13:31:28 +00002041class Test_async_ESNoff_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
2042 """async ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002043 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002044 """async ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002045 self.run_test()
2046
2047
Neale Ranns5b891102021-06-28 13:31:28 +00002048class Test_async_ESNoff_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
2049 """async ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002050 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002051 """async ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002052 self.run_test()
2053
2054
Neale Ranns5b891102021-06-28 13:31:28 +00002055class Test_async_ESNoff_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
2056 """async ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002057 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002058 """async ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002059 self.run_test()
2060
2061
Neale Ranns5b891102021-06-28 13:31:28 +00002062class Test_async_ESNoff_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
2063 """async ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002064 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002065 """async ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002066 self.run_test()
2067
2068
Neale Ranns5b891102021-06-28 13:31:28 +00002069class Test_async_ESNoff_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
2070 """async ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002071 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002072 """async ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002073 self.run_test()
2074
2075
Neale Ranns5b891102021-06-28 13:31:28 +00002076class Test_async_ESNoff_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
2077 """async ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002078 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002079 """async ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002080 self.run_test()