blob: 14112d6d71aa03367cfc397969f77d5daac485b8 [file] [log] [blame]
“mystarrocks”23f0c452017-12-11 07:11:51 -08001import socket
Klement Sekera28fb03f2018-04-17 11:36:55 +02002import unittest
Klement Sekera31da2e32018-06-24 22:49:55 +02003from scapy.layers.ipsec import ESP
Christian Hoppsfb7e7ed2019-11-03 07:02:15 -05004from scapy.layers.inet import IP, ICMP, UDP
Neale Ranns041add72020-01-02 04:06:10 +00005from scapy.layers.inet6 import IPv6
6from scapy.layers.l2 import Ether
7from scapy.packet import Raw
“mystarrocks”23f0c452017-12-11 07:11:51 -08008
Neale Ranns00625a62019-07-31 00:13:18 -07009from parameterized import parameterized
juraj.linkes11057662019-07-08 10:22:55 +020010from framework import VppTestRunner
Neale Ranns53f526b2019-02-25 14:32:02 +000011from template_ipsec import IpsecTra46Tests, IpsecTun46Tests, TemplateIpsec, \
Neale Ranns4f33c802019-04-10 12:39:10 +000012 IpsecTcpTests, IpsecTun4Tests, IpsecTra4Tests, config_tra_params, \
Neale Ranns12989b52019-09-26 16:20:19 +000013 config_tun_params, IPsecIPv4Params, IPsecIPv6Params, \
Neale Ranns4a56f4e2019-12-23 04:10:25 +000014 IpsecTra4, IpsecTun4, IpsecTra6, IpsecTun6, \
Neale Ranns02950402019-12-20 00:54:57 +000015 IpsecTun6HandoffTests, IpsecTun4HandoffTests, \
Filip Tehlarefcad1a2020-02-04 09:36:04 +000016 IpsecTra6ExtTests
Klement Sekerabf613952019-01-29 11:38:08 +010017from vpp_ipsec import VppIpsecSpd, VppIpsecSpdEntry, VppIpsecSA,\
Neale Ranns4f33c802019-04-10 12:39:10 +000018 VppIpsecSpdItfBinding
Neale Ranns311124e2019-01-24 04:52:25 -080019from vpp_ip_route import VppIpRoute, VppRoutePath
20from vpp_ip import DpoProto
Neale Ranns17dcec02019-01-09 21:22:20 -080021from vpp_papi import VppEnum
“mystarrocks”23f0c452017-12-11 07:11:51 -080022
Neale Rannsc87b66c2019-02-07 07:26:12 -080023NUM_PKTS = 67
Benoît Ganne5c481ff2021-03-08 10:22:51 +010024engines_supporting_chain_bufs = ["openssl", "async"]
Neale Rannsf16e9a52021-02-25 19:09:24 +000025engines = ["ia32", "ipsecmb", "openssl"]
Neale Rannsc87b66c2019-02-07 07:26:12 -080026
“mystarrocks”23f0c452017-12-11 07:11:51 -080027
Neale Ranns4f33c802019-04-10 12:39:10 +000028class ConfigIpsecESP(TemplateIpsec):
29 encryption_type = ESP
30 tra4_encrypt_node_name = "esp4-encrypt"
Neale Ranns8c609af2021-02-25 10:05:32 +000031 tra4_decrypt_node_name = ["esp4-decrypt", "esp4-decrypt-post"]
Neale Ranns4f33c802019-04-10 12:39:10 +000032 tra6_encrypt_node_name = "esp6-encrypt"
Neale Ranns8c609af2021-02-25 10:05:32 +000033 tra6_decrypt_node_name = ["esp6-decrypt", "esp6-decrypt-post"]
Neale Ranns4f33c802019-04-10 12:39:10 +000034 tun4_encrypt_node_name = "esp4-encrypt"
Neale Ranns8c609af2021-02-25 10:05:32 +000035 tun4_decrypt_node_name = ["esp4-decrypt", "esp4-decrypt-post"]
Neale Ranns4f33c802019-04-10 12:39:10 +000036 tun6_encrypt_node_name = "esp6-encrypt"
Neale Ranns8c609af2021-02-25 10:05:32 +000037 tun6_decrypt_node_name = ["esp6-decrypt", "esp6-decrypt-post"]
Neale Ranns53f526b2019-02-25 14:32:02 +000038
Neale Ranns4f33c802019-04-10 12:39:10 +000039 @classmethod
40 def setUpClass(cls):
41 super(ConfigIpsecESP, cls).setUpClass()
Neale Ranns53f526b2019-02-25 14:32:02 +000042
Neale Ranns4f33c802019-04-10 12:39:10 +000043 @classmethod
44 def tearDownClass(cls):
45 super(ConfigIpsecESP, cls).tearDownClass()
Neale Ranns53f526b2019-02-25 14:32:02 +000046
Neale Ranns4f33c802019-04-10 12:39:10 +000047 def setUp(self):
48 super(ConfigIpsecESP, self).setUp()
Neale Ranns53f526b2019-02-25 14:32:02 +000049
Neale Ranns4f33c802019-04-10 12:39:10 +000050 def tearDown(self):
51 super(ConfigIpsecESP, self).tearDown()
52
Neale Ranns5b891102021-06-28 13:31:28 +000053 def config_anti_replay(self, params):
54 saf = VppEnum.vl_api_ipsec_sad_flags_t
55 for p in params:
56 p.flags |= saf.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY
57
Neale Ranns4f33c802019-04-10 12:39:10 +000058 def config_network(self, params):
59 self.net_objs = []
60 self.tun_if = self.pg0
61 self.tra_if = self.pg2
62 self.logger.info(self.vapi.ppcli("show int addr"))
63
64 self.tra_spd = VppIpsecSpd(self, self.tra_spd_id)
65 self.tra_spd.add_vpp_config()
66 self.net_objs.append(self.tra_spd)
67 self.tun_spd = VppIpsecSpd(self, self.tun_spd_id)
68 self.tun_spd.add_vpp_config()
69 self.net_objs.append(self.tun_spd)
70
71 b = VppIpsecSpdItfBinding(self, self.tun_spd,
72 self.tun_if)
73 b.add_vpp_config()
74 self.net_objs.append(b)
75
76 b = VppIpsecSpdItfBinding(self, self.tra_spd,
77 self.tra_if)
78 b.add_vpp_config()
79 self.net_objs.append(b)
80
81 for p in params:
82 self.config_esp_tra(p)
83 config_tra_params(p, self.encryption_type)
84 for p in params:
85 self.config_esp_tun(p)
Neale Ranns12989b52019-09-26 16:20:19 +000086 config_tun_params(p, self.encryption_type, self.tun_if)
Neale Ranns4f33c802019-04-10 12:39:10 +000087
88 for p in params:
89 d = DpoProto.DPO_PROTO_IP6 if p.is_ipv6 else DpoProto.DPO_PROTO_IP4
90 r = VppIpRoute(self, p.remote_tun_if_host, p.addr_len,
91 [VppRoutePath(self.tun_if.remote_addr[p.addr_type],
92 0xffffffff,
Neale Ranns097fa662018-05-01 05:17:55 -070093 proto=d)])
Neale Ranns4f33c802019-04-10 12:39:10 +000094 r.add_vpp_config()
95 self.net_objs.append(r)
96
97 self.logger.info(self.vapi.ppcli("show ipsec all"))
98
99 def unconfig_network(self):
100 for o in reversed(self.net_objs):
101 o.remove_vpp_config()
102 self.net_objs = []
103
104 def config_esp_tun(self, params):
105 addr_type = params.addr_type
106 scapy_tun_sa_id = params.scapy_tun_sa_id
107 scapy_tun_spi = params.scapy_tun_spi
108 vpp_tun_sa_id = params.vpp_tun_sa_id
109 vpp_tun_spi = params.vpp_tun_spi
110 auth_algo_vpp_id = params.auth_algo_vpp_id
111 auth_key = params.auth_key
112 crypt_algo_vpp_id = params.crypt_algo_vpp_id
113 crypt_key = params.crypt_key
114 remote_tun_if_host = params.remote_tun_if_host
115 addr_any = params.addr_any
116 addr_bcast = params.addr_bcast
117 e = VppEnum.vl_api_ipsec_spd_action_t
Neale Ranns49e7ef62019-04-10 17:24:29 +0000118 flags = params.flags
Neale Ranns041add72020-01-02 04:06:10 +0000119 tun_flags = params.tun_flags
Neale Ranns80f6fd52019-04-16 02:41:34 +0000120 salt = params.salt
Neale Ranns4f33c802019-04-10 12:39:10 +0000121 objs = []
122
123 params.tun_sa_in = VppIpsecSA(self, scapy_tun_sa_id, scapy_tun_spi,
124 auth_algo_vpp_id, auth_key,
125 crypt_algo_vpp_id, crypt_key,
126 self.vpp_esp_protocol,
127 self.tun_if.local_addr[addr_type],
Neale Ranns49e7ef62019-04-10 17:24:29 +0000128 self.tun_if.remote_addr[addr_type],
Neale Ranns041add72020-01-02 04:06:10 +0000129 tun_flags=tun_flags,
130 dscp=params.dscp,
Neale Ranns80f6fd52019-04-16 02:41:34 +0000131 flags=flags,
Neale Ranns9ec846c2021-02-09 14:04:02 +0000132 salt=salt,
133 hop_limit=params.outer_hop_limit)
Neale Ranns4f33c802019-04-10 12:39:10 +0000134 params.tun_sa_out = VppIpsecSA(self, vpp_tun_sa_id, vpp_tun_spi,
135 auth_algo_vpp_id, auth_key,
136 crypt_algo_vpp_id, crypt_key,
137 self.vpp_esp_protocol,
138 self.tun_if.remote_addr[addr_type],
Neale Ranns49e7ef62019-04-10 17:24:29 +0000139 self.tun_if.local_addr[addr_type],
Neale Ranns041add72020-01-02 04:06:10 +0000140 tun_flags=tun_flags,
141 dscp=params.dscp,
Neale Ranns80f6fd52019-04-16 02:41:34 +0000142 flags=flags,
Neale Ranns9ec846c2021-02-09 14:04:02 +0000143 salt=salt,
144 hop_limit=params.outer_hop_limit)
Neale Ranns4f33c802019-04-10 12:39:10 +0000145 objs.append(params.tun_sa_in)
146 objs.append(params.tun_sa_out)
147
148 params.spd_policy_in_any = VppIpsecSpdEntry(self, self.tun_spd,
149 scapy_tun_sa_id,
150 addr_any, addr_bcast,
151 addr_any, addr_bcast,
152 socket.IPPROTO_ESP)
153 params.spd_policy_out_any = VppIpsecSpdEntry(self, self.tun_spd,
154 scapy_tun_sa_id,
155 addr_any, addr_bcast,
156 addr_any, addr_bcast,
157 socket.IPPROTO_ESP,
158 is_outbound=0)
159 objs.append(params.spd_policy_out_any)
160 objs.append(params.spd_policy_in_any)
161
162 objs.append(VppIpsecSpdEntry(self, self.tun_spd, vpp_tun_sa_id,
163 remote_tun_if_host, remote_tun_if_host,
164 self.pg1.remote_addr[addr_type],
165 self.pg1.remote_addr[addr_type],
166 0,
167 priority=10,
168 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
169 is_outbound=0))
170 objs.append(VppIpsecSpdEntry(self, self.tun_spd, scapy_tun_sa_id,
171 self.pg1.remote_addr[addr_type],
172 self.pg1.remote_addr[addr_type],
173 remote_tun_if_host, remote_tun_if_host,
174 0,
175 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
176 priority=10))
177 objs.append(VppIpsecSpdEntry(self, self.tun_spd, vpp_tun_sa_id,
178 remote_tun_if_host, remote_tun_if_host,
179 self.pg0.local_addr[addr_type],
180 self.pg0.local_addr[addr_type],
181 0,
182 priority=20,
183 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
184 is_outbound=0))
185 objs.append(VppIpsecSpdEntry(self, self.tun_spd, scapy_tun_sa_id,
186 self.pg0.local_addr[addr_type],
187 self.pg0.local_addr[addr_type],
188 remote_tun_if_host, remote_tun_if_host,
189 0,
190 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
191 priority=20))
192 for o in objs:
193 o.add_vpp_config()
194 self.net_objs = self.net_objs + objs
195
196 def config_esp_tra(self, params):
197 addr_type = params.addr_type
198 scapy_tra_sa_id = params.scapy_tra_sa_id
199 scapy_tra_spi = params.scapy_tra_spi
200 vpp_tra_sa_id = params.vpp_tra_sa_id
201 vpp_tra_spi = params.vpp_tra_spi
202 auth_algo_vpp_id = params.auth_algo_vpp_id
203 auth_key = params.auth_key
204 crypt_algo_vpp_id = params.crypt_algo_vpp_id
205 crypt_key = params.crypt_key
206 addr_any = params.addr_any
207 addr_bcast = params.addr_bcast
Neale Ranns4f33c802019-04-10 12:39:10 +0000208 e = VppEnum.vl_api_ipsec_spd_action_t
Neale Ranns5b891102021-06-28 13:31:28 +0000209 flags = params.flags
Neale Ranns80f6fd52019-04-16 02:41:34 +0000210 salt = params.salt
Neale Ranns4f33c802019-04-10 12:39:10 +0000211 objs = []
212
213 params.tra_sa_in = VppIpsecSA(self, scapy_tra_sa_id, scapy_tra_spi,
214 auth_algo_vpp_id, auth_key,
215 crypt_algo_vpp_id, crypt_key,
216 self.vpp_esp_protocol,
Neale Ranns80f6fd52019-04-16 02:41:34 +0000217 flags=flags,
218 salt=salt)
Neale Ranns4f33c802019-04-10 12:39:10 +0000219 params.tra_sa_out = VppIpsecSA(self, vpp_tra_sa_id, vpp_tra_spi,
220 auth_algo_vpp_id, auth_key,
221 crypt_algo_vpp_id, crypt_key,
222 self.vpp_esp_protocol,
Neale Ranns80f6fd52019-04-16 02:41:34 +0000223 flags=flags,
224 salt=salt)
Neale Ranns4f33c802019-04-10 12:39:10 +0000225 objs.append(params.tra_sa_in)
226 objs.append(params.tra_sa_out)
227
228 objs.append(VppIpsecSpdEntry(self, self.tra_spd, vpp_tra_sa_id,
229 addr_any, addr_bcast,
230 addr_any, addr_bcast,
231 socket.IPPROTO_ESP))
232 objs.append(VppIpsecSpdEntry(self, self.tra_spd, vpp_tra_sa_id,
233 addr_any, addr_bcast,
234 addr_any, addr_bcast,
235 socket.IPPROTO_ESP,
236 is_outbound=0))
237 objs.append(VppIpsecSpdEntry(self, self.tra_spd, vpp_tra_sa_id,
238 self.tra_if.local_addr[addr_type],
239 self.tra_if.local_addr[addr_type],
240 self.tra_if.remote_addr[addr_type],
241 self.tra_if.remote_addr[addr_type],
242 0, priority=10,
243 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
244 is_outbound=0))
245 objs.append(VppIpsecSpdEntry(self, self.tra_spd, scapy_tra_sa_id,
246 self.tra_if.local_addr[addr_type],
247 self.tra_if.local_addr[addr_type],
248 self.tra_if.remote_addr[addr_type],
249 self.tra_if.remote_addr[addr_type],
250 0, policy=e.IPSEC_API_SPD_ACTION_PROTECT,
251 priority=10))
252 for o in objs:
253 o.add_vpp_config()
254 self.net_objs = self.net_objs + objs
Neale Ranns53f526b2019-02-25 14:32:02 +0000255
256
Neale Ranns4f33c802019-04-10 12:39:10 +0000257class TemplateIpsecEsp(ConfigIpsecESP):
“mystarrocks”23f0c452017-12-11 07:11:51 -0800258 """
259 Basic test for ipsec esp sanity - tunnel and transport modes.
260
261 Below 4 cases are covered as part of this test
Dave Wallaced1706812021-08-12 18:36:02 -0400262
263 #. ipsec esp v4 transport basic test - IPv4 Transport mode
Paul Vinciguerra8feeaff2019-03-27 11:25:48 -0700264 scenario using HMAC-SHA1-96 integrity algo
Dave Wallaced1706812021-08-12 18:36:02 -0400265
266 #. ipsec esp v4 transport burst test
“mystarrocks”23f0c452017-12-11 07:11:51 -0800267 Above test for 257 pkts
268
Dave Wallaced1706812021-08-12 18:36:02 -0400269 #. ipsec esp 4o4 tunnel basic test - IPv4 Tunnel mode
270 scenario using HMAC-SHA1-96 integrity algo
“mystarrocks”23f0c452017-12-11 07:11:51 -0800271
Dave Wallaced1706812021-08-12 18:36:02 -0400272 #. ipsec esp 4o4 tunnel burst test
273 Above test for 257 pkts
“mystarrocks”23f0c452017-12-11 07:11:51 -0800274
Dave Wallaced1706812021-08-12 18:36:02 -0400275 TRANSPORT MODE::
“mystarrocks”23f0c452017-12-11 07:11:51 -0800276
Dave Wallaced1706812021-08-12 18:36:02 -0400277 --- encrypt ---
278 |pg2| <-------> |VPP|
279 --- decrypt ---
“mystarrocks”23f0c452017-12-11 07:11:51 -0800280
Dave Wallaced1706812021-08-12 18:36:02 -0400281 TUNNEL MODE::
282
283 --- encrypt --- plain ---
284 |pg0| <------- |VPP| <------ |pg1|
285 --- --- ---
286
287 --- decrypt --- plain ---
288 |pg0| -------> |VPP| ------> |pg1|
289 --- --- ---
290
“mystarrocks”23f0c452017-12-11 07:11:51 -0800291 """
292
Paul Vinciguerra7f9b7f92019-03-12 19:23:27 -0700293 @classmethod
294 def setUpClass(cls):
295 super(TemplateIpsecEsp, cls).setUpClass()
296
297 @classmethod
298 def tearDownClass(cls):
299 super(TemplateIpsecEsp, cls).tearDownClass()
300
Neale Ranns8e4a89b2019-01-23 08:16:17 -0800301 def setUp(self):
302 super(TemplateIpsecEsp, self).setUp()
Neale Ranns5b891102021-06-28 13:31:28 +0000303 self.config_anti_replay(self.params.values())
Neale Ranns4f33c802019-04-10 12:39:10 +0000304 self.config_network(self.params.values())
Klement Sekera611864f2018-09-26 11:19:00 +0200305
Neale Ranns8e4a89b2019-01-23 08:16:17 -0800306 def tearDown(self):
Neale Ranns4f33c802019-04-10 12:39:10 +0000307 self.unconfig_network()
Neale Ranns8e4a89b2019-01-23 08:16:17 -0800308 super(TemplateIpsecEsp, self).tearDown()
Neale Ranns8e4a89b2019-01-23 08:16:17 -0800309
Klement Sekera611864f2018-09-26 11:19:00 +0200310
Neale Ranns02950402019-12-20 00:54:57 +0000311class TestIpsecEsp1(TemplateIpsecEsp, IpsecTra46Tests,
Filip Tehlarefcad1a2020-02-04 09:36:04 +0000312 IpsecTun46Tests, IpsecTra6ExtTests):
Klement Sekera31da2e32018-06-24 22:49:55 +0200313 """ Ipsec ESP - TUN & TRA tests """
Neale Rannsb1fd80f2020-05-12 13:33:56 +0000314
315 @classmethod
316 def setUpClass(cls):
317 super(TestIpsecEsp1, cls).setUpClass()
318
319 @classmethod
320 def tearDownClass(cls):
321 super(TestIpsecEsp1, cls).tearDownClass()
322
323 def setUp(self):
324 super(TestIpsecEsp1, self).setUp()
325
326 def tearDown(self):
327 super(TestIpsecEsp1, self).tearDown()
328
329 def test_tun_46(self):
330 """ ipsec 4o6 tunnel """
331 # add an SPD entry to direct 2.2.2.2 to the v6 tunnel SA
332 p6 = self.ipv6_params
333 p4 = self.ipv4_params
334
335 p6.remote_tun_if_host4 = "2.2.2.2"
336 e = VppEnum.vl_api_ipsec_spd_action_t
337
338 VppIpsecSpdEntry(self,
339 self.tun_spd,
340 p6.scapy_tun_sa_id,
341 self.pg1.remote_addr[p4.addr_type],
342 self.pg1.remote_addr[p4.addr_type],
343 p6.remote_tun_if_host4,
344 p6.remote_tun_if_host4,
345 0,
346 priority=10,
347 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
348 is_outbound=1).add_vpp_config()
349 VppIpRoute(self, p6.remote_tun_if_host4, p4.addr_len,
350 [VppRoutePath(self.tun_if.remote_addr[p4.addr_type],
351 0xffffffff)]).add_vpp_config()
352
353 old_name = self.tun6_encrypt_node_name
354 self.tun6_encrypt_node_name = "esp4-encrypt"
355
356 self.verify_tun_46(p6, count=63)
357 self.tun6_encrypt_node_name = old_name
358
359 def test_tun_64(self):
360 """ ipsec 6o4 tunnel """
361 # add an SPD entry to direct 4444::4 to the v4 tunnel SA
362 p6 = self.ipv6_params
363 p4 = self.ipv4_params
364
365 p4.remote_tun_if_host6 = "4444::4"
366 e = VppEnum.vl_api_ipsec_spd_action_t
367
368 VppIpsecSpdEntry(self,
369 self.tun_spd,
370 p4.scapy_tun_sa_id,
371 self.pg1.remote_addr[p6.addr_type],
372 self.pg1.remote_addr[p6.addr_type],
373 p4.remote_tun_if_host6,
374 p4.remote_tun_if_host6,
375 0,
376 priority=10,
377 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
378 is_outbound=1).add_vpp_config()
379 d = DpoProto.DPO_PROTO_IP6
380 VppIpRoute(self, p4.remote_tun_if_host6, p6.addr_len,
381 [VppRoutePath(self.tun_if.remote_addr[p6.addr_type],
382 0xffffffff,
383 proto=d)]).add_vpp_config()
384
385 old_name = self.tun4_encrypt_node_name
386 self.tun4_encrypt_node_name = "esp6-encrypt"
387 self.verify_tun_64(p4, count=63)
388 self.tun4_encrypt_node_name = old_name
“mystarrocks”23f0c452017-12-11 07:11:51 -0800389
“mystarrocks”23f0c452017-12-11 07:11:51 -0800390
Neale Ranns041add72020-01-02 04:06:10 +0000391class TestIpsecEspTun(TemplateIpsecEsp, IpsecTun46Tests):
392 """ Ipsec ESP - TUN encap tests """
393
394 def setUp(self):
395 self.ipv4_params = IPsecIPv4Params()
396 self.ipv6_params = IPsecIPv6Params()
397
398 c = (VppEnum.vl_api_tunnel_encap_decap_flags_t.
399 TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_COPY_DSCP)
400 c1 = c | (VppEnum.vl_api_tunnel_encap_decap_flags_t.
401 TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_COPY_ECN)
402
403 self.ipv4_params.tun_flags = c
404 self.ipv6_params.tun_flags = c1
405
406 super(TestIpsecEspTun, self).setUp()
407
408 def gen_pkts(self, sw_intf, src, dst, count=1, payload_size=54):
409 # set the DSCP + ECN - flags are set to copy only DSCP
410 return [Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac) /
411 IP(src=src, dst=dst, tos=5) /
412 UDP(sport=4444, dport=4444) /
413 Raw(b'X' * payload_size)
414 for i in range(count)]
415
Neale Ranns9ec846c2021-02-09 14:04:02 +0000416 def gen_pkts6(self, p, sw_intf, src, dst, count=1, payload_size=54):
Neale Ranns041add72020-01-02 04:06:10 +0000417 # set the DSCP + ECN - flags are set to copy both
418 return [Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac) /
419 IPv6(src=src, dst=dst, tc=5) /
420 UDP(sport=4444, dport=4444) /
421 Raw(b'X' * payload_size)
422 for i in range(count)]
423
424 def verify_encrypted(self, p, sa, rxs):
425 # just check that only the DSCP is copied
426 for rx in rxs:
427 self.assertEqual(rx[IP].tos, 4)
428
429 def verify_encrypted6(self, p, sa, rxs):
430 # just check that the DSCP & ECN are copied
431 for rx in rxs:
432 self.assertEqual(rx[IPv6].tc, 5)
433
434
435class TestIpsecEspTun2(TemplateIpsecEsp, IpsecTun46Tests):
436 """ Ipsec ESP - TUN DSCP tests """
437
438 def setUp(self):
439 self.ipv4_params = IPsecIPv4Params()
440 self.ipv6_params = IPsecIPv6Params()
441
442 self.ipv4_params.dscp = VppEnum.vl_api_ip_dscp_t.IP_API_DSCP_EF
443 self.ipv6_params.dscp = VppEnum.vl_api_ip_dscp_t.IP_API_DSCP_AF11
444
445 super(TestIpsecEspTun2, self).setUp()
446
447 def gen_pkts(self, sw_intf, src, dst, count=1, payload_size=54):
Neale Ranns041add72020-01-02 04:06:10 +0000448 return [Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac) /
449 IP(src=src, dst=dst) /
450 UDP(sport=4444, dport=4444) /
451 Raw(b'X' * payload_size)
452 for i in range(count)]
453
Neale Ranns9ec846c2021-02-09 14:04:02 +0000454 def gen_pkts6(self, p, sw_intf, src, dst, count=1, payload_size=54):
Neale Ranns041add72020-01-02 04:06:10 +0000455 return [Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac) /
456 IPv6(src=src, dst=dst) /
457 UDP(sport=4444, dport=4444) /
458 Raw(b'X' * payload_size)
459 for i in range(count)]
460
461 def verify_encrypted(self, p, sa, rxs):
Neale Ranns9ec846c2021-02-09 14:04:02 +0000462 # just check that only the DSCP is set
Neale Ranns041add72020-01-02 04:06:10 +0000463 for rx in rxs:
464 self.assertEqual(rx[IP].tos,
465 VppEnum.vl_api_ip_dscp_t.IP_API_DSCP_EF << 2)
466
467 def verify_encrypted6(self, p, sa, rxs):
Neale Ranns9ec846c2021-02-09 14:04:02 +0000468 # just check that the DSCP is set
Neale Ranns041add72020-01-02 04:06:10 +0000469 for rx in rxs:
470 self.assertEqual(rx[IPv6].tc,
471 VppEnum.vl_api_ip_dscp_t.IP_API_DSCP_AF11 << 2)
472
473
Klement Sekera31da2e32018-06-24 22:49:55 +0200474class TestIpsecEsp2(TemplateIpsecEsp, IpsecTcpTests):
475 """ Ipsec ESP - TCP tests """
476 pass
“mystarrocks”23f0c452017-12-11 07:11:51 -0800477
478
Neale Rannsfc811342021-02-26 10:35:33 +0000479class TestIpsecEspAsync(TemplateIpsecEsp):
480 """ Ipsec ESP - Aysnc tests """
481
Klement Sekera8d815022021-03-15 16:58:10 +0100482 vpp_worker_count = 2
Neale Rannsfc811342021-02-26 10:35:33 +0000483
484 def setUp(self):
485 super(TestIpsecEspAsync, self).setUp()
486
Neale Rannsf16e9a52021-02-25 19:09:24 +0000487 self.p_sync = IPsecIPv4Params()
Neale Rannsfc811342021-02-26 10:35:33 +0000488
Neale Rannsf16e9a52021-02-25 19:09:24 +0000489 self.p_sync.crypt_algo_vpp_id = (VppEnum.vl_api_ipsec_crypto_alg_t.
490 IPSEC_API_CRYPTO_ALG_AES_CBC_256)
491 self.p_sync.crypt_algo = 'AES-CBC' # scapy name
492 self.p_sync.crypt_key = b'JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h'
Neale Rannsfc811342021-02-26 10:35:33 +0000493
Neale Rannsf16e9a52021-02-25 19:09:24 +0000494 self.p_sync.scapy_tun_sa_id += 0xf0000
495 self.p_sync.scapy_tun_spi += 0xf0000
496 self.p_sync.vpp_tun_sa_id += 0xf0000
497 self.p_sync.vpp_tun_spi += 0xf0000
498 self.p_sync.remote_tun_if_host = "2.2.2.2"
Neale Rannsfc811342021-02-26 10:35:33 +0000499 e = VppEnum.vl_api_ipsec_spd_action_t
500
Neale Rannsf16e9a52021-02-25 19:09:24 +0000501 self.p_sync.sa = VppIpsecSA(
Neale Rannsfc811342021-02-26 10:35:33 +0000502 self,
Neale Rannsf16e9a52021-02-25 19:09:24 +0000503 self.p_sync.vpp_tun_sa_id,
504 self.p_sync.vpp_tun_spi,
505 self.p_sync.auth_algo_vpp_id,
506 self.p_sync.auth_key,
507 self.p_sync.crypt_algo_vpp_id,
508 self.p_sync.crypt_key,
Neale Rannsfc811342021-02-26 10:35:33 +0000509 self.vpp_esp_protocol,
Neale Rannsf16e9a52021-02-25 19:09:24 +0000510 self.tun_if.local_addr[self.p_sync.addr_type],
511 self.tun_if.remote_addr[self.p_sync.addr_type]).add_vpp_config()
512 self.p_sync.spd = VppIpsecSpdEntry(
Neale Rannsfc811342021-02-26 10:35:33 +0000513 self,
514 self.tun_spd,
Neale Rannsf16e9a52021-02-25 19:09:24 +0000515 self.p_sync.vpp_tun_sa_id,
516 self.pg1.remote_addr[self.p_sync.addr_type],
517 self.pg1.remote_addr[self.p_sync.addr_type],
518 self.p_sync.remote_tun_if_host,
519 self.p_sync.remote_tun_if_host,
Neale Rannsfc811342021-02-26 10:35:33 +0000520 0,
521 priority=1,
522 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
523 is_outbound=1).add_vpp_config()
Neale Rannsf16e9a52021-02-25 19:09:24 +0000524 VppIpRoute(self,
525 self.p_sync.remote_tun_if_host,
526 self.p_sync.addr_len,
527 [VppRoutePath(
528 self.tun_if.remote_addr[self.p_sync.addr_type],
529 0xffffffff)]).add_vpp_config()
530 config_tun_params(self.p_sync, self.encryption_type, self.tun_if)
531
532 self.p_async = IPsecIPv4Params()
533
534 self.p_async.crypt_algo_vpp_id = (VppEnum.vl_api_ipsec_crypto_alg_t.
535 IPSEC_API_CRYPTO_ALG_AES_GCM_256)
536 self.p_async.auth_algo_vpp_id = (VppEnum.vl_api_ipsec_integ_alg_t.
537 IPSEC_API_INTEG_ALG_NONE)
538 self.p_async.crypt_algo = 'AES-GCM' # scapy name
539 self.p_async.crypt_key = b'JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h'
540 self.p_async.auth_algo = 'NULL'
541
542 self.p_async.scapy_tun_sa_id += 0xe0000
543 self.p_async.scapy_tun_spi += 0xe0000
544 self.p_async.vpp_tun_sa_id += 0xe0000
545 self.p_async.vpp_tun_spi += 0xe0000
546 self.p_async.remote_tun_if_host = "2.2.2.3"
547
548 iflags = VppEnum.vl_api_ipsec_sad_flags_t
549 self.p_async.flags = (iflags.IPSEC_API_SAD_FLAG_USE_ESN |
550 iflags.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY |
551 iflags.IPSEC_API_SAD_FLAG_ASYNC)
552
553 self.p_async.sa = VppIpsecSA(
554 self,
555 self.p_async.vpp_tun_sa_id,
556 self.p_async.vpp_tun_spi,
557 self.p_async.auth_algo_vpp_id,
558 self.p_async.auth_key,
559 self.p_async.crypt_algo_vpp_id,
560 self.p_async.crypt_key,
561 self.vpp_esp_protocol,
562 self.tun_if.local_addr[self.p_async.addr_type],
563 self.tun_if.remote_addr[self.p_async.addr_type],
564 flags=self.p_async.flags).add_vpp_config()
565 self.p_async.spd = VppIpsecSpdEntry(
566 self,
567 self.tun_spd,
568 self.p_async.vpp_tun_sa_id,
569 self.pg1.remote_addr[self.p_async.addr_type],
570 self.pg1.remote_addr[self.p_async.addr_type],
571 self.p_async.remote_tun_if_host,
572 self.p_async.remote_tun_if_host,
573 0,
574 priority=2,
575 policy=e.IPSEC_API_SPD_ACTION_PROTECT,
576 is_outbound=1).add_vpp_config()
577 VppIpRoute(self,
578 self.p_async.remote_tun_if_host,
579 self.p_async.addr_len,
580 [VppRoutePath(
581 self.tun_if.remote_addr[self.p_async.addr_type],
582 0xffffffff)]).add_vpp_config()
583 config_tun_params(self.p_async, self.encryption_type, self.tun_if)
Neale Rannsfc811342021-02-26 10:35:33 +0000584
585 def test_dual_stream(self):
586 """ Alternating SAs """
Neale Rannsf16e9a52021-02-25 19:09:24 +0000587 p = self.params[self.p_sync.addr_type]
588 self.vapi.ipsec_set_async_mode(async_enable=True)
Neale Rannsfc811342021-02-26 10:35:33 +0000589
590 pkts = [(Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) /
591 IP(src=self.pg1.remote_ip4,
Neale Rannsf16e9a52021-02-25 19:09:24 +0000592 dst=self.p_sync.remote_tun_if_host) /
Neale Rannsfc811342021-02-26 10:35:33 +0000593 UDP(sport=4444, dport=4444) /
594 Raw(b'0x0' * 200)),
595 (Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) /
596 IP(src=self.pg1.remote_ip4,
597 dst=p.remote_tun_if_host) /
598 UDP(sport=4444, dport=4444) /
599 Raw(b'0x0' * 200))]
600 pkts *= 1023
601
602 rxs = self.send_and_expect(self.pg1, pkts, self.pg0)
603
604 self.assertEqual(len(rxs), len(pkts))
605
606 for rx in rxs:
607 if rx[ESP].spi == p.scapy_tun_spi:
608 decrypted = p.vpp_tun_sa.decrypt(rx[IP])
Neale Rannsf16e9a52021-02-25 19:09:24 +0000609 elif rx[ESP].spi == self.p_sync.vpp_tun_spi:
610 decrypted = self.p_sync.scapy_tun_sa.decrypt(rx[IP])
Neale Rannsfc811342021-02-26 10:35:33 +0000611 else:
612 rx.show()
613 self.assertTrue(False)
614
Neale Rannsf16e9a52021-02-25 19:09:24 +0000615 self.p_sync.spd.remove_vpp_config()
616 self.p_sync.sa.remove_vpp_config()
617 self.p_async.spd.remove_vpp_config()
618 self.p_async.sa.remove_vpp_config()
619 self.vapi.ipsec_set_async_mode(async_enable=False)
620
621 def test_sync_async_noop_stream(self):
622 """ Alternating SAs sync/async/noop """
623 p = self.params[self.p_sync.addr_type]
624
625 # first pin the default/noop SA to worker 0
626 pkts = [(Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) /
627 IP(src=self.pg1.remote_ip4,
628 dst=p.remote_tun_if_host) /
629 UDP(sport=4444, dport=4444) /
630 Raw(b'0x0' * 200))]
631 rxs = self.send_and_expect(self.pg1, pkts, self.pg0, worker=0)
632
633 self.logger.info(self.vapi.cli("sh ipsec sa"))
634 self.logger.info(self.vapi.cli("sh crypto async status"))
635
636 # then use all the other SAs on worker 1.
637 # some will handoff, other take the sync and async paths
638 pkts = [(Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) /
639 IP(src=self.pg1.remote_ip4,
640 dst=self.p_sync.remote_tun_if_host) /
641 UDP(sport=4444, dport=4444) /
642 Raw(b'0x0' * 200)),
643 (Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) /
644 IP(src=self.pg1.remote_ip4,
645 dst=p.remote_tun_if_host) /
646 UDP(sport=4444, dport=4444) /
647 Raw(b'0x0' * 200)),
648 (Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) /
649 IP(src=self.pg1.remote_ip4,
650 dst=self.p_async.remote_tun_if_host) /
651 UDP(sport=4444, dport=4444) /
652 Raw(b'0x0' * 200))]
653 pkts *= 1023
654
655 rxs = self.send_and_expect(self.pg1, pkts, self.pg0, worker=1)
656
657 self.assertEqual(len(rxs), len(pkts))
658
659 for rx in rxs:
660 if rx[ESP].spi == p.scapy_tun_spi:
661 decrypted = p.vpp_tun_sa.decrypt(rx[IP])
662 elif rx[ESP].spi == self.p_sync.vpp_tun_spi:
663 decrypted = self.p_sync.scapy_tun_sa.decrypt(rx[IP])
664 elif rx[ESP].spi == self.p_async.vpp_tun_spi:
665 decrypted = self.p_async.scapy_tun_sa.decrypt(rx[IP])
666 else:
667 rx.show()
668 self.assertTrue(False)
669
670 self.p_sync.spd.remove_vpp_config()
671 self.p_sync.sa.remove_vpp_config()
672 self.p_async.spd.remove_vpp_config()
673 self.p_async.sa.remove_vpp_config()
674
675 # async mode should have been disabled now that there are
676 # no async SAs. there's no API for this, so a reluctant
677 # screen scrape.
678 self.assertTrue("DISABLED" in self.vapi.cli("sh crypto async status"))
Neale Rannsfc811342021-02-26 10:35:33 +0000679
680
Neale Ranns4a56f4e2019-12-23 04:10:25 +0000681class TestIpsecEspHandoff(TemplateIpsecEsp,
682 IpsecTun6HandoffTests,
683 IpsecTun4HandoffTests):
684 """ Ipsec ESP - handoff tests """
685 pass
686
687
Neale Ranns4f33c802019-04-10 12:39:10 +0000688class TemplateIpsecEspUdp(ConfigIpsecESP):
Neale Ranns53f526b2019-02-25 14:32:02 +0000689 """
690 UDP encapped ESP
691 """
Paul Vinciguerra7f9b7f92019-03-12 19:23:27 -0700692
693 @classmethod
694 def setUpClass(cls):
695 super(TemplateIpsecEspUdp, cls).setUpClass()
696
697 @classmethod
698 def tearDownClass(cls):
699 super(TemplateIpsecEspUdp, cls).tearDownClass()
700
Neale Ranns53f526b2019-02-25 14:32:02 +0000701 def setUp(self):
702 super(TemplateIpsecEspUdp, self).setUp()
Neale Ranns4f33c802019-04-10 12:39:10 +0000703 self.net_objs = []
Neale Ranns53f526b2019-02-25 14:32:02 +0000704 self.tun_if = self.pg0
705 self.tra_if = self.pg2
706 self.logger.info(self.vapi.ppcli("show int addr"))
707
708 p = self.ipv4_params
709 p.flags = (VppEnum.vl_api_ipsec_sad_flags_t.
Neale Ranns5b891102021-06-28 13:31:28 +0000710 IPSEC_API_SAD_FLAG_UDP_ENCAP |
711 VppEnum.vl_api_ipsec_sad_flags_t.
712 IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY)
Neale Ranns53f526b2019-02-25 14:32:02 +0000713 p.nat_header = UDP(sport=5454, dport=4500)
714
715 self.tra_spd = VppIpsecSpd(self, self.tra_spd_id)
716 self.tra_spd.add_vpp_config()
717 VppIpsecSpdItfBinding(self, self.tra_spd,
718 self.tra_if).add_vpp_config()
719
Neale Ranns4f33c802019-04-10 12:39:10 +0000720 self.config_esp_tra(p)
Neale Ranns2ac885c2019-03-20 18:24:43 +0000721 config_tra_params(p, self.encryption_type)
Neale Ranns53f526b2019-02-25 14:32:02 +0000722
723 self.tun_spd = VppIpsecSpd(self, self.tun_spd_id)
724 self.tun_spd.add_vpp_config()
725 VppIpsecSpdItfBinding(self, self.tun_spd,
726 self.tun_if).add_vpp_config()
727
Neale Ranns4f33c802019-04-10 12:39:10 +0000728 self.config_esp_tun(p)
Neale Ranns92e93842019-04-08 07:36:50 +0000729 self.logger.info(self.vapi.ppcli("show ipsec all"))
Neale Ranns53f526b2019-02-25 14:32:02 +0000730
731 d = DpoProto.DPO_PROTO_IP4
732 VppIpRoute(self, p.remote_tun_if_host, p.addr_len,
733 [VppRoutePath(self.tun_if.remote_addr[p.addr_type],
734 0xffffffff,
735 proto=d)]).add_vpp_config()
736
737 def tearDown(self):
738 super(TemplateIpsecEspUdp, self).tearDown()
Paul Vinciguerra90cf21b2019-03-13 09:23:05 -0700739
740 def show_commands_at_teardown(self):
741 self.logger.info(self.vapi.cli("show hardware"))
Neale Ranns53f526b2019-02-25 14:32:02 +0000742
743
Neale Ranns49e7ef62019-04-10 17:24:29 +0000744class TestIpsecEspUdp(TemplateIpsecEspUdp, IpsecTra4Tests):
Neale Ranns53f526b2019-02-25 14:32:02 +0000745 """ Ipsec NAT-T ESP UDP tests """
Neale Ranns53f526b2019-02-25 14:32:02 +0000746 pass
747
748
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000749class MyParameters():
750 def __init__(self):
Neale Ranns5b891102021-06-28 13:31:28 +0000751 saf = VppEnum.vl_api_ipsec_sad_flags_t
752 flag_esn = saf.IPSEC_API_SAD_FLAG_USE_ESN
753 flag_ar = saf.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY
754 self.flags = [0, flag_esn, flag_ar]
Neale Ranns4f33c802019-04-10 12:39:10 +0000755 # foreach crypto algorithm
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000756 self.algos = {
757 'AES-GCM-128/NONE': {
758 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
Neale Ranns47feb112019-04-11 15:14:07 +0000759 IPSEC_API_CRYPTO_ALG_AES_GCM_128),
760 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
761 IPSEC_API_INTEG_ALG_NONE),
762 'scapy-crypto': "AES-GCM",
763 'scapy-integ': "NULL",
Ole Troan64e978b2019-10-17 21:40:36 +0200764 'key': b"JPjyOWBeVEQiMe7h",
Neale Ranns80f6fd52019-04-16 02:41:34 +0000765 'salt': 0},
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000766 'AES-GCM-192/NONE': {
767 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
Neale Ranns80f6fd52019-04-16 02:41:34 +0000768 IPSEC_API_CRYPTO_ALG_AES_GCM_192),
769 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
770 IPSEC_API_INTEG_ALG_NONE),
771 'scapy-crypto': "AES-GCM",
772 'scapy-integ': "NULL",
Ole Troan64e978b2019-10-17 21:40:36 +0200773 'key': b"JPjyOWBeVEQiMe7h01234567",
Neale Ranns80f6fd52019-04-16 02:41:34 +0000774 'salt': 1010},
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000775 'AES-GCM-256/NONE': {
776 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
Neale Ranns47feb112019-04-11 15:14:07 +0000777 IPSEC_API_CRYPTO_ALG_AES_GCM_256),
778 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
779 IPSEC_API_INTEG_ALG_NONE),
780 'scapy-crypto': "AES-GCM",
781 'scapy-integ': "NULL",
Ole Troan64e978b2019-10-17 21:40:36 +0200782 'key': b"JPjyOWBeVEQiMe7h0123456787654321",
Neale Ranns80f6fd52019-04-16 02:41:34 +0000783 'salt': 2020},
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000784 'AES-CBC-128/MD5-96': {
785 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
Neale Ranns47feb112019-04-11 15:14:07 +0000786 IPSEC_API_CRYPTO_ALG_AES_CBC_128),
787 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
Dmitry Vakhrushev77cc14a2019-08-14 00:12:33 -0400788 IPSEC_API_INTEG_ALG_MD5_96),
Neale Ranns47feb112019-04-11 15:14:07 +0000789 'scapy-crypto': "AES-CBC",
Dmitry Vakhrushev77cc14a2019-08-14 00:12:33 -0400790 'scapy-integ': "HMAC-MD5-96",
Neale Ranns80f6fd52019-04-16 02:41:34 +0000791 'salt': 0,
Ole Troan64e978b2019-10-17 21:40:36 +0200792 'key': b"JPjyOWBeVEQiMe7h"},
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000793 'AES-CBC-192/SHA1-96': {
794 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
Neale Ranns47feb112019-04-11 15:14:07 +0000795 IPSEC_API_CRYPTO_ALG_AES_CBC_192),
796 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
797 IPSEC_API_INTEG_ALG_SHA1_96),
798 'scapy-crypto': "AES-CBC",
799 'scapy-integ': "HMAC-SHA1-96",
Neale Ranns80f6fd52019-04-16 02:41:34 +0000800 'salt': 0,
Ole Troan64e978b2019-10-17 21:40:36 +0200801 'key': b"JPjyOWBeVEQiMe7hJPjyOWBe"},
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000802 'AES-CBC-256/SHA1-96': {
803 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
Neale Ranns47feb112019-04-11 15:14:07 +0000804 IPSEC_API_CRYPTO_ALG_AES_CBC_256),
805 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
806 IPSEC_API_INTEG_ALG_SHA1_96),
807 'scapy-crypto': "AES-CBC",
808 'scapy-integ': "HMAC-SHA1-96",
Neale Ranns80f6fd52019-04-16 02:41:34 +0000809 'salt': 0,
Ole Troan64e978b2019-10-17 21:40:36 +0200810 'key': b"JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h"},
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000811 '3DES-CBC/SHA1-96': {
812 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
Vladimir Ratnikovf4805072019-05-17 09:17:59 -0400813 IPSEC_API_CRYPTO_ALG_3DES_CBC),
814 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
815 IPSEC_API_INTEG_ALG_SHA1_96),
816 'scapy-crypto': "3DES",
817 'scapy-integ': "HMAC-SHA1-96",
818 'salt': 0,
Ole Troan64e978b2019-10-17 21:40:36 +0200819 'key': b"JPjyOWBeVEQiMe7h00112233"},
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000820 'NONE/SHA1-96': {
821 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
Neale Ranns2cdcd0c2019-08-27 12:26:14 +0000822 IPSEC_API_CRYPTO_ALG_NONE),
823 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
824 IPSEC_API_INTEG_ALG_SHA1_96),
825 'scapy-crypto': "NULL",
826 'scapy-integ': "HMAC-SHA1-96",
827 'salt': 0,
Benoît Ganne490b9272021-01-22 18:03:09 +0100828 'key': b"JPjyOWBeVEQiMe7h00112233"},
829 'AES-CTR-128/SHA1-96': {
830 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
831 IPSEC_API_CRYPTO_ALG_AES_CTR_128),
832 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
833 IPSEC_API_INTEG_ALG_SHA1_96),
834 'scapy-crypto': "AES-CTR",
835 'scapy-integ': "HMAC-SHA1-96",
836 'salt': 0,
837 'key': b"JPjyOWBeVEQiMe7h"},
838 'AES-CTR-192/SHA1-96': {
839 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
840 IPSEC_API_CRYPTO_ALG_AES_CTR_192),
841 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
842 IPSEC_API_INTEG_ALG_SHA1_96),
843 'scapy-crypto': "AES-CTR",
844 'scapy-integ': "HMAC-SHA1-96",
845 'salt': 1010,
846 'key': b"JPjyOWBeVEQiMe7hJPjyOWBe"},
847 'AES-CTR-256/SHA1-96': {
848 'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
849 IPSEC_API_CRYPTO_ALG_AES_CTR_256),
850 'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
851 IPSEC_API_INTEG_ALG_SHA1_96),
852 'scapy-crypto': "AES-CTR",
853 'scapy-integ': "HMAC-SHA1-96",
854 'salt': 2020,
855 'key': b"JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h"}}
Neale Ranns4f33c802019-04-10 12:39:10 +0000856
Neale Ranns4f33c802019-04-10 12:39:10 +0000857
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000858class RunTestIpsecEspAll(ConfigIpsecESP,
859 IpsecTra4, IpsecTra6,
860 IpsecTun4, IpsecTun6):
861 """ Ipsec ESP all Algos """
862
Neale Ranns8c609af2021-02-25 10:05:32 +0000863 @classmethod
864 def setUpConstants(cls):
865 test_args = str.split(cls.__doc__, " ")
866 engine = test_args[0]
867 if engine == "async":
Klement Sekera8d815022021-03-15 16:58:10 +0100868 cls.vpp_worker_count = 2
Neale Ranns8c609af2021-02-25 10:05:32 +0000869 super(RunTestIpsecEspAll, cls).setUpConstants()
870
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000871 def setUp(self):
872 super(RunTestIpsecEspAll, self).setUp()
873 test_args = str.split(self.__doc__, " ")
874
875 params = MyParameters()
876 self.engine = test_args[0]
877 self.flag = params.flags[0]
Neale Ranns5b891102021-06-28 13:31:28 +0000878 if test_args[1] == 'ESNon':
879 self.flag |= params.flags[1]
880 if test_args[2] == 'ARon':
881 self.flag |= params.flags[2]
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000882
Neale Ranns5b891102021-06-28 13:31:28 +0000883 self.algo = params.algos[test_args[3]]
Neale Ranns8c609af2021-02-25 10:05:32 +0000884 self.async_mode = False
885 if self.engine == "async":
886 self.async_mode = True
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000887
888 def tearDown(self):
889 super(RunTestIpsecEspAll, self).tearDown()
890
891 def run_test(self):
892 self.run_a_test(self.engine, self.flag, self.algo)
893
Filip Tehlarefcad1a2020-02-04 09:36:04 +0000894 def run_a_test(self, engine, flag, algo, payload_size=None):
Neale Ranns8c609af2021-02-25 10:05:32 +0000895 if self.async_mode:
896 self.vapi.cli("set ipsec async mode on")
897 else:
898 self.vapi.cli("set crypto handler all %s" % engine)
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000899
Neale Ranns8c609af2021-02-25 10:05:32 +0000900 self.logger.info(self.vapi.cli("show crypto async status"))
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000901 self.ipv4_params = IPsecIPv4Params()
902 self.ipv6_params = IPsecIPv6Params()
903
904 self.params = {self.ipv4_params.addr_type:
905 self.ipv4_params,
906 self.ipv6_params.addr_type:
907 self.ipv6_params}
908
909 for _, p in self.params.items():
910 p.auth_algo_vpp_id = algo['vpp-integ']
911 p.crypt_algo_vpp_id = algo['vpp-crypto']
912 p.crypt_algo = algo['scapy-crypto']
913 p.auth_algo = algo['scapy-integ']
914 p.crypt_key = algo['key']
915 p.salt = algo['salt']
Neale Ranns5b891102021-06-28 13:31:28 +0000916 p.flags = flag
Neale Ranns9ec846c2021-02-09 14:04:02 +0000917 p.outer_flow_label = 243224
Neale Ranns8c609af2021-02-25 10:05:32 +0000918 p.async_mode = self.async_mode
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000919
920 self.reporter.send_keep_alive(self)
921
Neale Ranns4f33c802019-04-10 12:39:10 +0000922 #
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000923 # configure the SPDs. SAs, etc
Neale Ranns4f33c802019-04-10 12:39:10 +0000924 #
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000925 self.config_network(self.params.values())
Neale Ranns4f33c802019-04-10 12:39:10 +0000926
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000927 #
928 # run some traffic.
929 # An exhautsive 4o6, 6o4 is not necessary
930 # for each algo
931 #
932 self.verify_tra_basic6(count=NUM_PKTS)
933 self.verify_tra_basic4(count=NUM_PKTS)
934 self.verify_tun_66(self.params[socket.AF_INET6],
935 count=NUM_PKTS)
Christian Hoppsfb7e7ed2019-11-03 07:02:15 -0500936 #
937 # Use an odd-byte payload size to check for correct padding.
938 #
939 # 49 + 2 == 51 which should pad +1 to 52 for 4 byte alignment, +5
940 # to 56 for 8 byte alignment, and +13 to 64 for 64 byte alignment.
941 # This should catch bugs where the code is incorrectly over-padding
942 # for algorithms that don't require it
943 psz = 49 - len(IP()/ICMP()) if payload_size is None else payload_size
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000944 self.verify_tun_44(self.params[socket.AF_INET],
Christian Hoppsfb7e7ed2019-11-03 07:02:15 -0500945 count=NUM_PKTS, payload_size=psz)
Neale Ranns4f33c802019-04-10 12:39:10 +0000946
Filip Tehlarefcad1a2020-02-04 09:36:04 +0000947 LARGE_PKT_SZ = [
Filip Tehlare4e8c6b2020-02-13 07:49:30 +0000948 1970, # results in 2 chained buffers entering decrypt node
949 # but leaving as simple buffer due to ICV removal (tra4)
PiotrX Kleskifdca4dd2020-05-05 14:14:22 +0200950 2004, # footer+ICV will be added to 2nd buffer (tun4)
Filip Tehlarefcad1a2020-02-04 09:36:04 +0000951 4010, # ICV ends up splitted accross 2 buffers in esp_decrypt
952 # for transport4; transport6 takes normal path
Filip Tehlarefcad1a2020-02-04 09:36:04 +0000953 4020, # same as above but tra4 and tra6 are switched
954 ]
955 if self.engine in engines_supporting_chain_bufs:
956 for sz in LARGE_PKT_SZ:
957 self.verify_tra_basic4(count=NUM_PKTS, payload_size=sz)
958 self.verify_tra_basic6(count=NUM_PKTS, payload_size=sz)
959 self.verify_tun_66(self.params[socket.AF_INET6],
960 count=NUM_PKTS, payload_size=sz)
961 self.verify_tun_44(self.params[socket.AF_INET],
962 count=NUM_PKTS, payload_size=sz)
963
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000964 #
Neale Ranns5b891102021-06-28 13:31:28 +0000965 # reconfigure the network and SA to run the
966 # anti replay tests
967 #
968 saf = VppEnum.vl_api_ipsec_sad_flags_t
969 if flag & saf.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY:
970 self.unconfig_network()
971 self.config_network(self.params.values())
972 self.verify_tra_anti_replay()
973
974 self.unconfig_network()
975 self.config_network(self.params.values())
976 self.verify_hi_seq_num()
977
978 #
Neale Rannsf16e9a52021-02-25 19:09:24 +0000979 # swap the handlers while SAs are up
980 #
Neale Ranns5b891102021-06-28 13:31:28 +0000981 self.unconfig_network()
982 self.config_network(self.params.values())
Neale Rannsf16e9a52021-02-25 19:09:24 +0000983 for e in engines:
984 if e != engine:
985 self.vapi.cli("set crypto handler all %s" % e)
986 self.verify_tra_basic4(count=NUM_PKTS)
987
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000988 self.unconfig_network()
juraj.linkes11057662019-07-08 10:22:55 +0200989
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000990#
991# To generate test classes, do:
992# grep '# GEN' test_ipsec_esp.py | sed -e 's/# GEN //g' | bash
993#
Neale Ranns8c609af2021-02-25 10:05:32 +0000994# GEN for ENG in native ipsecmb openssl; do \
Neale Ranns5b891102021-06-28 13:31:28 +0000995# GEN for ESN in ESNon ESNoff; do for AR in ARon ARoff; do \
996# GEN for ALG in AES-GCM-128/NONE \
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +0000997# GEN AES-GCM-192/NONE AES-GCM-256/NONE AES-CBC-128/MD5-96 \
998# GEN AES-CBC-192/SHA1-96 AES-CBC-256/SHA1-96 \
Benoît Ganne490b9272021-01-22 18:03:09 +0100999# GEN 3DES-CBC/SHA1-96 NONE/SHA1-96 \
1000# GEN AES-CTR-128/SHA1-96 AES-CTR-192/SHA1-96 AES-CTR-256/SHA1-96; do \
Neale Ranns5b891102021-06-28 13:31:28 +00001001# GEN echo -en "\n\nclass "
1002# GEN echo -e "Test_${ENG}_${ESN}_${AR}_${ALG}(RunTestIpsecEspAll):" |
1003# GEN sed -e 's/-/_/g' -e 's#/#_#g' ;
1004# GEN echo ' """'$ENG $ESN $AR $ALG IPSec test'"""' ;
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001005# GEN echo " def test_ipsec(self):";
Neale Ranns5b891102021-06-28 13:31:28 +00001006# GEN echo ' """'$ENG $ESN $AR $ALG IPSec test'"""' ;
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001007# GEN echo " self.run_test()";
Neale Ranns5b891102021-06-28 13:31:28 +00001008# GEN done; done; done; done
Neale Ranns8c609af2021-02-25 10:05:32 +00001009#
Neale Ranns5b891102021-06-28 13:31:28 +00001010# GEN for ESN in ESNon ESNoff; do for AR in ARon ARoff; do \
1011# GEN for ALG in \
Neale Ranns8c609af2021-02-25 10:05:32 +00001012# GEN AES-GCM-128/NONE AES-GCM-192/NONE AES-GCM-256/NONE \
1013# GEN AES-CBC-192/SHA1-96 AES-CBC-256/SHA1-96; do \
Neale Ranns5b891102021-06-28 13:31:28 +00001014# GEN echo -en "\n\nclass "
1015# GEN echo -e "Test_async_${ESN}_${AR}_${ALG}(RunTestIpsecEspAll):" |
1016# GEN sed -e 's/-/_/g' -e 's#/#_#g' ;
1017# GEN echo ' """'async $ESN $AR $ALG IPSec test'"""' ;
Neale Ranns8c609af2021-02-25 10:05:32 +00001018# GEN echo " def test_ipsec(self):";
Neale Ranns5b891102021-06-28 13:31:28 +00001019# GEN echo ' """'async $ESN $AR $ALG IPSec test'"""' ;
Neale Ranns8c609af2021-02-25 10:05:32 +00001020# GEN echo " self.run_test()";
Neale Ranns5b891102021-06-28 13:31:28 +00001021# GEN done; done; done;
1022
1023
1024class Test_native_ESNon_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1025 """native ESNon ARon AES-GCM-128/NONE IPSec test"""
1026 def test_ipsec(self):
1027 """native ESNon ARon AES-GCM-128/NONE IPSec test"""
1028 self.run_test()
1029
1030
1031class Test_native_ESNon_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1032 """native ESNon ARon AES-GCM-192/NONE IPSec test"""
1033 def test_ipsec(self):
1034 """native ESNon ARon AES-GCM-192/NONE IPSec test"""
1035 self.run_test()
1036
1037
1038class Test_native_ESNon_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1039 """native ESNon ARon AES-GCM-256/NONE IPSec test"""
1040 def test_ipsec(self):
1041 """native ESNon ARon AES-GCM-256/NONE IPSec test"""
1042 self.run_test()
1043
1044
1045class Test_native_ESNon_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1046 """native ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
1047 def test_ipsec(self):
1048 """native ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
1049 self.run_test()
1050
1051
1052class Test_native_ESNon_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1053 """native ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
1054 def test_ipsec(self):
1055 """native ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
1056 self.run_test()
1057
1058
1059class Test_native_ESNon_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1060 """native ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
1061 def test_ipsec(self):
1062 """native ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
1063 self.run_test()
1064
1065
1066class Test_native_ESNon_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1067 """native ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
1068 def test_ipsec(self):
1069 """native ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
1070 self.run_test()
1071
1072
1073class Test_native_ESNon_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1074 """native ESNon ARon NONE/SHA1-96 IPSec test"""
1075 def test_ipsec(self):
1076 """native ESNon ARon NONE/SHA1-96 IPSec test"""
1077 self.run_test()
1078
1079
1080class Test_native_ESNon_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1081 """native ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
1082 def test_ipsec(self):
1083 """native ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
1084 self.run_test()
1085
1086
1087class Test_native_ESNon_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1088 """native ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
1089 def test_ipsec(self):
1090 """native ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
1091 self.run_test()
1092
1093
1094class Test_native_ESNon_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1095 """native ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
1096 def test_ipsec(self):
1097 """native ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
1098 self.run_test()
1099
1100
1101class Test_native_ESNon_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1102 """native ESNon ARoff AES-GCM-128/NONE IPSec test"""
1103 def test_ipsec(self):
1104 """native ESNon ARoff AES-GCM-128/NONE IPSec test"""
1105 self.run_test()
1106
1107
1108class Test_native_ESNon_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1109 """native ESNon ARoff AES-GCM-192/NONE IPSec test"""
1110 def test_ipsec(self):
1111 """native ESNon ARoff AES-GCM-192/NONE IPSec test"""
1112 self.run_test()
1113
1114
1115class Test_native_ESNon_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1116 """native ESNon ARoff AES-GCM-256/NONE IPSec test"""
1117 def test_ipsec(self):
1118 """native ESNon ARoff AES-GCM-256/NONE IPSec test"""
1119 self.run_test()
1120
1121
1122class Test_native_ESNon_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1123 """native ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
1124 def test_ipsec(self):
1125 """native ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
1126 self.run_test()
1127
1128
1129class Test_native_ESNon_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1130 """native ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
1131 def test_ipsec(self):
1132 """native ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
1133 self.run_test()
1134
1135
1136class Test_native_ESNon_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1137 """native ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
1138 def test_ipsec(self):
1139 """native ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
1140 self.run_test()
1141
1142
1143class Test_native_ESNon_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1144 """native ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
1145 def test_ipsec(self):
1146 """native ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
1147 self.run_test()
1148
1149
1150class Test_native_ESNon_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1151 """native ESNon ARoff NONE/SHA1-96 IPSec test"""
1152 def test_ipsec(self):
1153 """native ESNon ARoff NONE/SHA1-96 IPSec test"""
1154 self.run_test()
1155
1156
1157class Test_native_ESNon_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1158 """native ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
1159 def test_ipsec(self):
1160 """native ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
1161 self.run_test()
1162
1163
1164class Test_native_ESNon_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1165 """native ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
1166 def test_ipsec(self):
1167 """native ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
1168 self.run_test()
1169
1170
1171class Test_native_ESNon_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1172 """native ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
1173 def test_ipsec(self):
1174 """native ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
1175 self.run_test()
1176
1177
1178class Test_native_ESNoff_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1179 """native ESNoff ARon AES-GCM-128/NONE IPSec test"""
1180 def test_ipsec(self):
1181 """native ESNoff ARon AES-GCM-128/NONE IPSec test"""
1182 self.run_test()
1183
1184
1185class Test_native_ESNoff_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1186 """native ESNoff ARon AES-GCM-192/NONE IPSec test"""
1187 def test_ipsec(self):
1188 """native ESNoff ARon AES-GCM-192/NONE IPSec test"""
1189 self.run_test()
1190
1191
1192class Test_native_ESNoff_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1193 """native ESNoff ARon AES-GCM-256/NONE IPSec test"""
1194 def test_ipsec(self):
1195 """native ESNoff ARon AES-GCM-256/NONE IPSec test"""
1196 self.run_test()
1197
1198
1199class Test_native_ESNoff_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1200 """native ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
1201 def test_ipsec(self):
1202 """native ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
1203 self.run_test()
1204
1205
1206class Test_native_ESNoff_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1207 """native ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
1208 def test_ipsec(self):
1209 """native ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
1210 self.run_test()
1211
1212
1213class Test_native_ESNoff_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1214 """native ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
1215 def test_ipsec(self):
1216 """native ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
1217 self.run_test()
1218
1219
1220class Test_native_ESNoff_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1221 """native ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
1222 def test_ipsec(self):
1223 """native ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
1224 self.run_test()
1225
1226
1227class Test_native_ESNoff_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1228 """native ESNoff ARon NONE/SHA1-96 IPSec test"""
1229 def test_ipsec(self):
1230 """native ESNoff ARon NONE/SHA1-96 IPSec test"""
1231 self.run_test()
1232
1233
1234class Test_native_ESNoff_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1235 """native ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
1236 def test_ipsec(self):
1237 """native ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
1238 self.run_test()
1239
1240
1241class Test_native_ESNoff_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1242 """native ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
1243 def test_ipsec(self):
1244 """native ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
1245 self.run_test()
1246
1247
1248class Test_native_ESNoff_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1249 """native ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
1250 def test_ipsec(self):
1251 """native ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
1252 self.run_test()
1253
1254
1255class Test_native_ESNoff_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1256 """native ESNoff ARoff AES-GCM-128/NONE IPSec test"""
1257 def test_ipsec(self):
1258 """native ESNoff ARoff AES-GCM-128/NONE IPSec test"""
1259 self.run_test()
1260
1261
1262class Test_native_ESNoff_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1263 """native ESNoff ARoff AES-GCM-192/NONE IPSec test"""
1264 def test_ipsec(self):
1265 """native ESNoff ARoff AES-GCM-192/NONE IPSec test"""
1266 self.run_test()
1267
1268
1269class Test_native_ESNoff_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1270 """native ESNoff ARoff AES-GCM-256/NONE IPSec test"""
1271 def test_ipsec(self):
1272 """native ESNoff ARoff AES-GCM-256/NONE IPSec test"""
1273 self.run_test()
1274
1275
1276class Test_native_ESNoff_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1277 """native ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
1278 def test_ipsec(self):
1279 """native ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
1280 self.run_test()
1281
1282
1283class Test_native_ESNoff_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1284 """native ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
1285 def test_ipsec(self):
1286 """native ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
1287 self.run_test()
1288
1289
1290class Test_native_ESNoff_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1291 """native ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
1292 def test_ipsec(self):
1293 """native ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
1294 self.run_test()
1295
1296
1297class Test_native_ESNoff_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1298 """native ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
1299 def test_ipsec(self):
1300 """native ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
1301 self.run_test()
1302
1303
1304class Test_native_ESNoff_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1305 """native ESNoff ARoff NONE/SHA1-96 IPSec test"""
1306 def test_ipsec(self):
1307 """native ESNoff ARoff NONE/SHA1-96 IPSec test"""
1308 self.run_test()
1309
1310
1311class Test_native_ESNoff_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1312 """native ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
1313 def test_ipsec(self):
1314 """native ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
1315 self.run_test()
1316
1317
1318class Test_native_ESNoff_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1319 """native ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
1320 def test_ipsec(self):
1321 """native ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
1322 self.run_test()
1323
1324
1325class Test_native_ESNoff_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1326 """native ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
1327 def test_ipsec(self):
1328 """native ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
1329 self.run_test()
1330
1331
1332class Test_ipsecmb_ESNon_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1333 """ipsecmb ESNon ARon AES-GCM-128/NONE IPSec test"""
1334 def test_ipsec(self):
1335 """ipsecmb ESNon ARon AES-GCM-128/NONE IPSec test"""
1336 self.run_test()
1337
1338
1339class Test_ipsecmb_ESNon_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1340 """ipsecmb ESNon ARon AES-GCM-192/NONE IPSec test"""
1341 def test_ipsec(self):
1342 """ipsecmb ESNon ARon AES-GCM-192/NONE IPSec test"""
1343 self.run_test()
1344
1345
1346class Test_ipsecmb_ESNon_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1347 """ipsecmb ESNon ARon AES-GCM-256/NONE IPSec test"""
1348 def test_ipsec(self):
1349 """ipsecmb ESNon ARon AES-GCM-256/NONE IPSec test"""
1350 self.run_test()
1351
1352
1353class Test_ipsecmb_ESNon_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1354 """ipsecmb ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
1355 def test_ipsec(self):
1356 """ipsecmb ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
1357 self.run_test()
1358
1359
1360class Test_ipsecmb_ESNon_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1361 """ipsecmb ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
1362 def test_ipsec(self):
1363 """ipsecmb ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
1364 self.run_test()
1365
1366
1367class Test_ipsecmb_ESNon_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1368 """ipsecmb ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
1369 def test_ipsec(self):
1370 """ipsecmb ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
1371 self.run_test()
1372
1373
1374class Test_ipsecmb_ESNon_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1375 """ipsecmb ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
1376 def test_ipsec(self):
1377 """ipsecmb ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
1378 self.run_test()
1379
1380
1381class Test_ipsecmb_ESNon_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1382 """ipsecmb ESNon ARon NONE/SHA1-96 IPSec test"""
1383 def test_ipsec(self):
1384 """ipsecmb ESNon ARon NONE/SHA1-96 IPSec test"""
1385 self.run_test()
1386
1387
1388class Test_ipsecmb_ESNon_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1389 """ipsecmb ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
1390 def test_ipsec(self):
1391 """ipsecmb ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
1392 self.run_test()
1393
1394
1395class Test_ipsecmb_ESNon_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1396 """ipsecmb ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
1397 def test_ipsec(self):
1398 """ipsecmb ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
1399 self.run_test()
1400
1401
1402class Test_ipsecmb_ESNon_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1403 """ipsecmb ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
1404 def test_ipsec(self):
1405 """ipsecmb ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
1406 self.run_test()
1407
1408
1409class Test_ipsecmb_ESNon_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1410 """ipsecmb ESNon ARoff AES-GCM-128/NONE IPSec test"""
1411 def test_ipsec(self):
1412 """ipsecmb ESNon ARoff AES-GCM-128/NONE IPSec test"""
1413 self.run_test()
1414
1415
1416class Test_ipsecmb_ESNon_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1417 """ipsecmb ESNon ARoff AES-GCM-192/NONE IPSec test"""
1418 def test_ipsec(self):
1419 """ipsecmb ESNon ARoff AES-GCM-192/NONE IPSec test"""
1420 self.run_test()
1421
1422
1423class Test_ipsecmb_ESNon_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1424 """ipsecmb ESNon ARoff AES-GCM-256/NONE IPSec test"""
1425 def test_ipsec(self):
1426 """ipsecmb ESNon ARoff AES-GCM-256/NONE IPSec test"""
1427 self.run_test()
1428
1429
1430class Test_ipsecmb_ESNon_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1431 """ipsecmb ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
1432 def test_ipsec(self):
1433 """ipsecmb ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
1434 self.run_test()
1435
1436
1437class Test_ipsecmb_ESNon_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1438 """ipsecmb ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
1439 def test_ipsec(self):
1440 """ipsecmb ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
1441 self.run_test()
1442
1443
1444class Test_ipsecmb_ESNon_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1445 """ipsecmb ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
1446 def test_ipsec(self):
1447 """ipsecmb ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
1448 self.run_test()
1449
1450
1451class Test_ipsecmb_ESNon_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1452 """ipsecmb ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
1453 def test_ipsec(self):
1454 """ipsecmb ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
1455 self.run_test()
1456
1457
1458class Test_ipsecmb_ESNon_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1459 """ipsecmb ESNon ARoff NONE/SHA1-96 IPSec test"""
1460 def test_ipsec(self):
1461 """ipsecmb ESNon ARoff NONE/SHA1-96 IPSec test"""
1462 self.run_test()
1463
1464
1465class Test_ipsecmb_ESNon_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1466 """ipsecmb ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
1467 def test_ipsec(self):
1468 """ipsecmb ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
1469 self.run_test()
1470
1471
1472class Test_ipsecmb_ESNon_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1473 """ipsecmb ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
1474 def test_ipsec(self):
1475 """ipsecmb ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
1476 self.run_test()
1477
1478
1479class Test_ipsecmb_ESNon_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1480 """ipsecmb ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
1481 def test_ipsec(self):
1482 """ipsecmb ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
1483 self.run_test()
1484
1485
1486class Test_ipsecmb_ESNoff_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1487 """ipsecmb ESNoff ARon AES-GCM-128/NONE IPSec test"""
1488 def test_ipsec(self):
1489 """ipsecmb ESNoff ARon AES-GCM-128/NONE IPSec test"""
1490 self.run_test()
1491
1492
1493class Test_ipsecmb_ESNoff_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1494 """ipsecmb ESNoff ARon AES-GCM-192/NONE IPSec test"""
1495 def test_ipsec(self):
1496 """ipsecmb ESNoff ARon AES-GCM-192/NONE IPSec test"""
1497 self.run_test()
1498
1499
1500class Test_ipsecmb_ESNoff_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1501 """ipsecmb ESNoff ARon AES-GCM-256/NONE IPSec test"""
1502 def test_ipsec(self):
1503 """ipsecmb ESNoff ARon AES-GCM-256/NONE IPSec test"""
1504 self.run_test()
1505
1506
1507class Test_ipsecmb_ESNoff_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1508 """ipsecmb ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
1509 def test_ipsec(self):
1510 """ipsecmb ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
1511 self.run_test()
1512
1513
1514class Test_ipsecmb_ESNoff_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1515 """ipsecmb ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
1516 def test_ipsec(self):
1517 """ipsecmb ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
1518 self.run_test()
1519
1520
1521class Test_ipsecmb_ESNoff_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1522 """ipsecmb ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
1523 def test_ipsec(self):
1524 """ipsecmb ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
1525 self.run_test()
1526
1527
1528class Test_ipsecmb_ESNoff_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1529 """ipsecmb ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
1530 def test_ipsec(self):
1531 """ipsecmb ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
1532 self.run_test()
1533
1534
1535class Test_ipsecmb_ESNoff_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1536 """ipsecmb ESNoff ARon NONE/SHA1-96 IPSec test"""
1537 def test_ipsec(self):
1538 """ipsecmb ESNoff ARon NONE/SHA1-96 IPSec test"""
1539 self.run_test()
1540
1541
1542class Test_ipsecmb_ESNoff_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1543 """ipsecmb ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
1544 def test_ipsec(self):
1545 """ipsecmb ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
1546 self.run_test()
1547
1548
1549class Test_ipsecmb_ESNoff_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1550 """ipsecmb ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
1551 def test_ipsec(self):
1552 """ipsecmb ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
1553 self.run_test()
Neale Ranns4f33c802019-04-10 12:39:10 +00001554
Neale Ranns4f33c802019-04-10 12:39:10 +00001555
Neale Ranns5b891102021-06-28 13:31:28 +00001556class Test_ipsecmb_ESNoff_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1557 """ipsecmb ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001558 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001559 """ipsecmb ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001560 self.run_test()
Neale Ranns4f33c802019-04-10 12:39:10 +00001561
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001562
Neale Ranns5b891102021-06-28 13:31:28 +00001563class Test_ipsecmb_ESNoff_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1564 """ipsecmb ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001565 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001566 """ipsecmb ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001567 self.run_test()
1568
1569
Neale Ranns5b891102021-06-28 13:31:28 +00001570class Test_ipsecmb_ESNoff_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1571 """ipsecmb ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001572 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001573 """ipsecmb ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001574 self.run_test()
1575
1576
Neale Ranns5b891102021-06-28 13:31:28 +00001577class Test_ipsecmb_ESNoff_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1578 """ipsecmb ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001579 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001580 """ipsecmb ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001581 self.run_test()
1582
1583
Neale Ranns5b891102021-06-28 13:31:28 +00001584class Test_ipsecmb_ESNoff_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1585 """ipsecmb ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001586 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001587 """ipsecmb ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001588 self.run_test()
1589
1590
Neale Ranns5b891102021-06-28 13:31:28 +00001591class Test_ipsecmb_ESNoff_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1592 """ipsecmb ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001593 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001594 """ipsecmb ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001595 self.run_test()
1596
1597
Neale Ranns5b891102021-06-28 13:31:28 +00001598class Test_ipsecmb_ESNoff_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1599 """ipsecmb ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001600 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001601 """ipsecmb ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001602 self.run_test()
1603
1604
Neale Ranns5b891102021-06-28 13:31:28 +00001605class Test_ipsecmb_ESNoff_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1606 """ipsecmb ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001607 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001608 """ipsecmb ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001609 self.run_test()
1610
1611
Neale Ranns5b891102021-06-28 13:31:28 +00001612class Test_ipsecmb_ESNoff_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1613 """ipsecmb ESNoff ARoff NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001614 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001615 """ipsecmb ESNoff ARoff NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001616 self.run_test()
1617
1618
Neale Ranns5b891102021-06-28 13:31:28 +00001619class Test_ipsecmb_ESNoff_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1620 """ipsecmb ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001621 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001622 """ipsecmb ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001623 self.run_test()
1624
1625
Neale Ranns5b891102021-06-28 13:31:28 +00001626class Test_ipsecmb_ESNoff_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1627 """ipsecmb ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001628 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001629 """ipsecmb ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001630 self.run_test()
1631
1632
Neale Ranns5b891102021-06-28 13:31:28 +00001633class Test_ipsecmb_ESNoff_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1634 """ipsecmb ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001635 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001636 """ipsecmb ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001637 self.run_test()
1638
1639
Neale Ranns5b891102021-06-28 13:31:28 +00001640class Test_openssl_ESNon_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1641 """openssl ESNon ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001642 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001643 """openssl ESNon ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001644 self.run_test()
1645
1646
Neale Ranns5b891102021-06-28 13:31:28 +00001647class Test_openssl_ESNon_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1648 """openssl ESNon ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001649 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001650 """openssl ESNon ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001651 self.run_test()
1652
1653
Neale Ranns5b891102021-06-28 13:31:28 +00001654class Test_openssl_ESNon_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1655 """openssl ESNon ARon AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001656 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001657 """openssl ESNon ARon AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001658 self.run_test()
1659
1660
Neale Ranns5b891102021-06-28 13:31:28 +00001661class Test_openssl_ESNon_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1662 """openssl ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001663 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001664 """openssl ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001665 self.run_test()
1666
1667
Neale Ranns5b891102021-06-28 13:31:28 +00001668class Test_openssl_ESNon_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1669 """openssl ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001670 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001671 """openssl ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001672 self.run_test()
1673
1674
Neale Ranns5b891102021-06-28 13:31:28 +00001675class Test_openssl_ESNon_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1676 """openssl ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001677 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001678 """openssl ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001679 self.run_test()
1680
1681
Neale Ranns5b891102021-06-28 13:31:28 +00001682class Test_openssl_ESNon_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1683 """openssl ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001684 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001685 """openssl ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001686 self.run_test()
1687
1688
Neale Ranns5b891102021-06-28 13:31:28 +00001689class Test_openssl_ESNon_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1690 """openssl ESNon ARon NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001691 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001692 """openssl ESNon ARon NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001693 self.run_test()
1694
1695
Neale Ranns5b891102021-06-28 13:31:28 +00001696class Test_openssl_ESNon_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1697 """openssl ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001698 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001699 """openssl ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001700 self.run_test()
1701
1702
Neale Ranns5b891102021-06-28 13:31:28 +00001703class Test_openssl_ESNon_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1704 """openssl ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001705 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001706 """openssl ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001707 self.run_test()
1708
1709
Neale Ranns5b891102021-06-28 13:31:28 +00001710class Test_openssl_ESNon_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1711 """openssl ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001712 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001713 """openssl ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001714 self.run_test()
1715
1716
Neale Ranns5b891102021-06-28 13:31:28 +00001717class Test_openssl_ESNon_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1718 """openssl ESNon ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001719 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001720 """openssl ESNon ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001721 self.run_test()
1722
1723
Neale Ranns5b891102021-06-28 13:31:28 +00001724class Test_openssl_ESNon_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1725 """openssl ESNon ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001726 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001727 """openssl ESNon ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001728 self.run_test()
1729
1730
Neale Ranns5b891102021-06-28 13:31:28 +00001731class Test_openssl_ESNon_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1732 """openssl ESNon ARoff AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001733 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001734 """openssl ESNon ARoff AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001735 self.run_test()
1736
1737
Neale Ranns5b891102021-06-28 13:31:28 +00001738class Test_openssl_ESNon_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1739 """openssl ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001740 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001741 """openssl ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001742 self.run_test()
1743
1744
Neale Ranns5b891102021-06-28 13:31:28 +00001745class Test_openssl_ESNon_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1746 """openssl ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001747 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001748 """openssl ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001749 self.run_test()
1750
1751
Neale Ranns5b891102021-06-28 13:31:28 +00001752class Test_openssl_ESNon_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1753 """openssl ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001754 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001755 """openssl ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001756 self.run_test()
1757
1758
Neale Ranns5b891102021-06-28 13:31:28 +00001759class Test_openssl_ESNon_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1760 """openssl ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001761 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001762 """openssl ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001763 self.run_test()
1764
1765
Neale Ranns5b891102021-06-28 13:31:28 +00001766class Test_openssl_ESNon_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1767 """openssl ESNon ARoff NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001768 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001769 """openssl ESNon ARoff NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001770 self.run_test()
1771
1772
Neale Ranns5b891102021-06-28 13:31:28 +00001773class Test_openssl_ESNon_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1774 """openssl ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001775 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001776 """openssl ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001777 self.run_test()
1778
1779
Neale Ranns5b891102021-06-28 13:31:28 +00001780class Test_openssl_ESNon_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1781 """openssl ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001782 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001783 """openssl ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001784 self.run_test()
1785
1786
Neale Ranns5b891102021-06-28 13:31:28 +00001787class Test_openssl_ESNon_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1788 """openssl ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001789 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001790 """openssl ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001791 self.run_test()
1792
1793
Neale Ranns5b891102021-06-28 13:31:28 +00001794class Test_openssl_ESNoff_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1795 """openssl ESNoff ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001796 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001797 """openssl ESNoff ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001798 self.run_test()
1799
1800
Neale Ranns5b891102021-06-28 13:31:28 +00001801class Test_openssl_ESNoff_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1802 """openssl ESNoff ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001803 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001804 """openssl ESNoff ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001805 self.run_test()
1806
1807
Neale Ranns5b891102021-06-28 13:31:28 +00001808class Test_openssl_ESNoff_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1809 """openssl ESNoff ARon AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001810 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001811 """openssl ESNoff ARon AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001812 self.run_test()
1813
1814
Neale Ranns5b891102021-06-28 13:31:28 +00001815class Test_openssl_ESNoff_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1816 """openssl ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001817 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001818 """openssl ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001819 self.run_test()
1820
1821
Neale Ranns5b891102021-06-28 13:31:28 +00001822class Test_openssl_ESNoff_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1823 """openssl ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001824 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001825 """openssl ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001826 self.run_test()
1827
1828
Neale Ranns5b891102021-06-28 13:31:28 +00001829class Test_openssl_ESNoff_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1830 """openssl ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001831 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001832 """openssl ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001833 self.run_test()
1834
1835
Neale Ranns5b891102021-06-28 13:31:28 +00001836class Test_openssl_ESNoff_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1837 """openssl ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001838 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001839 """openssl ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001840 self.run_test()
1841
1842
Neale Ranns5b891102021-06-28 13:31:28 +00001843class Test_openssl_ESNoff_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
1844 """openssl ESNoff ARon NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001845 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001846 """openssl ESNoff ARon NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001847 self.run_test()
1848
1849
Neale Ranns5b891102021-06-28 13:31:28 +00001850class Test_openssl_ESNoff_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1851 """openssl ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001852 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001853 """openssl ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001854 self.run_test()
1855
1856
Neale Ranns5b891102021-06-28 13:31:28 +00001857class Test_openssl_ESNoff_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1858 """openssl ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001859 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001860 """openssl ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001861 self.run_test()
1862
1863
Neale Ranns5b891102021-06-28 13:31:28 +00001864class Test_openssl_ESNoff_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1865 """openssl ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001866 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001867 """openssl ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001868 self.run_test()
1869
1870
Neale Ranns5b891102021-06-28 13:31:28 +00001871class Test_openssl_ESNoff_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1872 """openssl ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001873 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001874 """openssl ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001875 self.run_test()
1876
1877
Neale Ranns5b891102021-06-28 13:31:28 +00001878class Test_openssl_ESNoff_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1879 """openssl ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001880 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001881 """openssl ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001882 self.run_test()
1883
1884
Neale Ranns5b891102021-06-28 13:31:28 +00001885class Test_openssl_ESNoff_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1886 """openssl ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001887 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001888 """openssl ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001889 self.run_test()
1890
1891
Neale Ranns5b891102021-06-28 13:31:28 +00001892class Test_openssl_ESNoff_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
1893 """openssl ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001894 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001895 """openssl ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001896 self.run_test()
1897
1898
Neale Ranns5b891102021-06-28 13:31:28 +00001899class Test_openssl_ESNoff_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1900 """openssl ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001901 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001902 """openssl ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001903 self.run_test()
1904
1905
Neale Ranns5b891102021-06-28 13:31:28 +00001906class Test_openssl_ESNoff_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1907 """openssl ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001908 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001909 """openssl ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001910 self.run_test()
1911
1912
Neale Ranns5b891102021-06-28 13:31:28 +00001913class Test_openssl_ESNoff_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
1914 """openssl ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001915 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001916 """openssl ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001917 self.run_test()
1918
1919
Neale Ranns5b891102021-06-28 13:31:28 +00001920class Test_openssl_ESNoff_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
1921 """openssl ESNoff ARoff NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001922 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001923 """openssl ESNoff ARoff NONE/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001924 self.run_test()
1925
1926
Neale Ranns5b891102021-06-28 13:31:28 +00001927class Test_openssl_ESNoff_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
1928 """openssl ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001929 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001930 """openssl ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001931 self.run_test()
1932
1933
Neale Ranns5b891102021-06-28 13:31:28 +00001934class Test_openssl_ESNoff_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
1935 """openssl ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001936 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001937 """openssl ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001938 self.run_test()
1939
1940
Neale Ranns5b891102021-06-28 13:31:28 +00001941class Test_openssl_ESNoff_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
1942 """openssl ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001943 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001944 """openssl ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001945 self.run_test()
1946
1947
Neale Ranns5b891102021-06-28 13:31:28 +00001948class Test_async_ESNon_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
1949 """async ESNon ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001950 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001951 """async ESNon ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001952 self.run_test()
1953
1954
Neale Ranns5b891102021-06-28 13:31:28 +00001955class Test_async_ESNon_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
1956 """async ESNon ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001957 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001958 """async ESNon ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00001959 self.run_test()
1960
1961
Neale Ranns5b891102021-06-28 13:31:28 +00001962class Test_async_ESNon_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
1963 """async ESNon ARon AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001964 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001965 """async ESNon ARon AES-GCM-256/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001966 self.run_test()
1967
1968
Neale Ranns5b891102021-06-28 13:31:28 +00001969class Test_async_ESNon_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
1970 """async ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001971 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001972 """async ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001973 self.run_test()
1974
1975
Neale Ranns5b891102021-06-28 13:31:28 +00001976class Test_async_ESNon_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
1977 """async ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001978 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001979 """async ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001980 self.run_test()
1981
1982
Neale Ranns5b891102021-06-28 13:31:28 +00001983class Test_async_ESNon_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
1984 """async ESNon ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001985 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001986 """async ESNon ARoff AES-GCM-128/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001987 self.run_test()
1988
1989
Neale Ranns5b891102021-06-28 13:31:28 +00001990class Test_async_ESNon_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
1991 """async ESNon ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001992 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00001993 """async ESNon ARoff AES-GCM-192/NONE IPSec test"""
Andrew Yourtchenkofbc38892019-09-09 11:14:59 +00001994 self.run_test()
Neale Ranns6afaae12019-07-17 15:07:14 +00001995
Neale Ranns4f33c802019-04-10 12:39:10 +00001996
Neale Ranns5b891102021-06-28 13:31:28 +00001997class Test_async_ESNon_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
1998 """async ESNon ARoff AES-GCM-256/NONE IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01001999 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002000 """async ESNon ARoff AES-GCM-256/NONE IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002001 self.run_test()
2002
2003
Neale Ranns5b891102021-06-28 13:31:28 +00002004class Test_async_ESNon_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
2005 """async ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002006 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002007 """async ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002008 self.run_test()
2009
2010
Neale Ranns5b891102021-06-28 13:31:28 +00002011class Test_async_ESNon_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
2012 """async ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002013 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002014 """async ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
Benoît Ganne490b9272021-01-22 18:03:09 +01002015 self.run_test()
2016
2017
Neale Ranns5b891102021-06-28 13:31:28 +00002018class Test_async_ESNoff_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
2019 """async ESNoff ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002020 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002021 """async ESNoff ARon AES-GCM-128/NONE IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002022 self.run_test()
2023
2024
Neale Ranns5b891102021-06-28 13:31:28 +00002025class Test_async_ESNoff_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
2026 """async ESNoff ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002027 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002028 """async ESNoff ARon AES-GCM-192/NONE IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002029 self.run_test()
2030
2031
Neale Ranns5b891102021-06-28 13:31:28 +00002032class Test_async_ESNoff_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
2033 """async ESNoff ARon AES-GCM-256/NONE IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002034 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002035 """async ESNoff ARon AES-GCM-256/NONE IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002036 self.run_test()
2037
2038
Neale Ranns5b891102021-06-28 13:31:28 +00002039class Test_async_ESNoff_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
2040 """async ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002041 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002042 """async ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002043 self.run_test()
2044
2045
Neale Ranns5b891102021-06-28 13:31:28 +00002046class Test_async_ESNoff_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
2047 """async ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002048 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002049 """async ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002050 self.run_test()
2051
2052
Neale Ranns5b891102021-06-28 13:31:28 +00002053class Test_async_ESNoff_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
2054 """async ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002055 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002056 """async ESNoff ARoff AES-GCM-128/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002057 self.run_test()
2058
2059
Neale Ranns5b891102021-06-28 13:31:28 +00002060class Test_async_ESNoff_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
2061 """async ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002062 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002063 """async ESNoff ARoff AES-GCM-192/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002064 self.run_test()
2065
2066
Neale Ranns5b891102021-06-28 13:31:28 +00002067class Test_async_ESNoff_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
2068 """async ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002069 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002070 """async ESNoff ARoff AES-GCM-256/NONE IPSec test"""
Neale Ranns9c23ff82021-06-25 13:30:50 +00002071 self.run_test()
2072
2073
Neale Ranns5b891102021-06-28 13:31:28 +00002074class Test_async_ESNoff_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
2075 """async ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002076 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002077 """async ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002078 self.run_test()
2079
2080
Neale Ranns5b891102021-06-28 13:31:28 +00002081class Test_async_ESNoff_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
2082 """async ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002083 def test_ipsec(self):
Neale Ranns5b891102021-06-28 13:31:28 +00002084 """async ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
Neale Ranns8c609af2021-02-25 10:05:32 +00002085 self.run_test()