summaryrefslogtreecommitdiffstats
path: root/RELEASE.md
AgeCommit message (Expand)AuthorFilesLines
2020-05-04misc: 19.08.2 Release NotesAndrew Yourtchenko1-0/+126
2020-02-06misc: VPP 20.01 Release NotesAndrew Yourtchenko1-1/+1297
2020-01-15misc: Initial 20.05-rc0 commitAndrew Yourtchenko1-0/+5
2020-01-11misc: VPP 19.08.1 release notesAndrew Yourtchenko1-0/+69
2019-10-29misc: 19.04.3 Release NotesDave Wallace1-0/+9
2019-08-26misc: VPP 19.08 Release NotesAndrew Yourtchenko1-1/+688
2019-08-07Initial 20.01-rc0 commitv20.01-rc0Andrew Yourtchenko1-0/+5
2019-07-25misc: 19.04.2 Release NotesDave Wallace1-0/+9
2019-07-19misc: 19.01.3 Release NotesAndrew Yourtchenko1-0/+9
2019-05-3019.04.1 Release NotesDave Wallace1-7/+16
2019-05-1719.01.2 Release NotesAndrew Yourtchenko1-0/+9
2019-04-30VPP 19.04 Release NotesDave Wallace1-1/+64
2019-04-19Doxygen cleanup.Dave Wallace1-0/+298
2019-04-10Initial 19.08-rc0 commitv19.08-rc0Dave Wallace1-0/+10
2019-03-0619.01.1 Release NotesDave Wallace1-0/+9
2019-02-1519.01 Release NotesAndrew Yourtchenko1-0/+389
2018-10-23Release Notes for 18.10Marco Varlese1-0/+316
2018-07-30Update Release Notes for 18.07 ReleaseEd Warnicke1-0/+316
2018-05-1818.01.2 Release NotesDave Wallace1-0/+10
2018-04-26VPP 18.04 release notesChris Luke1-252/+1732
2018-04-04Doc updates prior to branchChris Luke1-0/+8
2018-02-02Update 18.01 Release NotesDave Wallace1-0/+1
2018-01-2518.01 Release NotesDave Wallace1-3/+453
2017-10-2617.10 Release NotesFlorin Coras1-0/+251
2017-07-2617.07 Release NoteNeale Ranns1-0/+64
2017-05-161704: Release notes. Cherry pick from 6288.Ole Troan1-2/+111
2017-04-20docs: Forward-port missing 17.01 release notesChris Luke1-1/+83
2017-03-01Initial Release notes for 17.04.Ole Troan1-0/+20
2016-12-21Bump to 17.04 releasev17.04-rc0Damjan Marion1-1/+6
2016-09-21Copy the 16.09 release notes to masterChris Luke1-0/+200
'#n572'>572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088
import socket
import unittest
from scapy.layers.ipsec import ESP
from scapy.layers.inet import IP, ICMP, UDP
from scapy.layers.inet6 import IPv6
from scapy.layers.l2 import Ether
from scapy.packet import Raw

from parameterized import parameterized
from framework import VppTestRunner
from template_ipsec import IpsecTra46Tests, IpsecTun46Tests, TemplateIpsec, \
    IpsecTcpTests, IpsecTun4Tests, IpsecTra4Tests, config_tra_params, \
    config_tun_params, IPsecIPv4Params, IPsecIPv6Params, \
    IpsecTra4, IpsecTun4, IpsecTra6, IpsecTun6, \
    IpsecTun6HandoffTests, IpsecTun4HandoffTests, \
    IpsecTra6ExtTests
from vpp_ipsec import VppIpsecSpd, VppIpsecSpdEntry, VppIpsecSA,\
    VppIpsecSpdItfBinding
from vpp_ip_route import VppIpRoute, VppRoutePath
from vpp_ip import DpoProto
from vpp_papi import VppEnum

NUM_PKTS = 67
engines_supporting_chain_bufs = ["openssl", "async"]
engines = ["ia32", "ipsecmb", "openssl"]


class ConfigIpsecESP(TemplateIpsec):
    encryption_type = ESP
    tra4_encrypt_node_name = "esp4-encrypt"
    tra4_decrypt_node_name = ["esp4-decrypt", "esp4-decrypt-post"]
    tra6_encrypt_node_name = "esp6-encrypt"
    tra6_decrypt_node_name = ["esp6-decrypt", "esp6-decrypt-post"]
    tun4_encrypt_node_name = "esp4-encrypt"
    tun4_decrypt_node_name = ["esp4-decrypt", "esp4-decrypt-post"]
    tun6_encrypt_node_name = "esp6-encrypt"
    tun6_decrypt_node_name = ["esp6-decrypt", "esp6-decrypt-post"]

    @classmethod
    def setUpClass(cls):
        super(ConfigIpsecESP, cls).setUpClass()

    @classmethod
    def tearDownClass(cls):
        super(ConfigIpsecESP, cls).tearDownClass()

    def setUp(self):
        super(ConfigIpsecESP, self).setUp()

    def tearDown(self):
        super(ConfigIpsecESP, self).tearDown()

    def config_anti_replay(self, params):
        saf = VppEnum.vl_api_ipsec_sad_flags_t
        for p in params:
            p.flags |= saf.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY

    def config_network(self, params):
        self.net_objs = []
        self.tun_if = self.pg0
        self.tra_if = self.pg2
        self.logger.info(self.vapi.ppcli("show int addr"))

        self.tra_spd = VppIpsecSpd(self, self.tra_spd_id)
        self.tra_spd.add_vpp_config()
        self.net_objs.append(self.tra_spd)
        self.tun_spd = VppIpsecSpd(self, self.tun_spd_id)
        self.tun_spd.add_vpp_config()
        self.net_objs.append(self.tun_spd)

        b = VppIpsecSpdItfBinding(self, self.tun_spd,
                                  self.tun_if)
        b.add_vpp_config()
        self.net_objs.append(b)

        b = VppIpsecSpdItfBinding(self, self.tra_spd,
                                  self.tra_if)
        b.add_vpp_config()
        self.net_objs.append(b)

        for p in params:
            self.config_esp_tra(p)
            config_tra_params(p, self.encryption_type)
        for p in params:
            self.config_esp_tun(p)
            config_tun_params(p, self.encryption_type, self.tun_if)

        for p in params:
            d = DpoProto.DPO_PROTO_IP6 if p.is_ipv6 else DpoProto.DPO_PROTO_IP4
            r = VppIpRoute(self,  p.remote_tun_if_host, p.addr_len,
                           [VppRoutePath(self.tun_if.remote_addr[p.addr_type],
                                         0xffffffff,
                                         proto=d)])
            r.add_vpp_config()
            self.net_objs.append(r)

        self.logger.info(self.vapi.ppcli("show ipsec all"))

    def unconfig_network(self):
        for o in reversed(self.net_objs):
            o.remove_vpp_config()
        self.net_objs = []

    def config_esp_tun(self, params):
        addr_type = params.addr_type
        scapy_tun_sa_id = params.scapy_tun_sa_id
        scapy_tun_spi = params.scapy_tun_spi
        vpp_tun_sa_id = params.vpp_tun_sa_id
        vpp_tun_spi = params.vpp_tun_spi
        auth_algo_vpp_id = params.auth_algo_vpp_id
        auth_key = params.auth_key
        crypt_algo_vpp_id = params.crypt_algo_vpp_id
        crypt_key = params.crypt_key
        remote_tun_if_host = params.remote_tun_if_host
        addr_any = params.addr_any
        addr_bcast = params.addr_bcast
        e = VppEnum.vl_api_ipsec_spd_action_t
        flags = params.flags
        tun_flags = params.tun_flags
        salt = params.salt
        objs = []

        params.tun_sa_in = VppIpsecSA(self, scapy_tun_sa_id, scapy_tun_spi,
                                      auth_algo_vpp_id, auth_key,
                                      crypt_algo_vpp_id, crypt_key,
                                      self.vpp_esp_protocol,
                                      self.tun_if.local_addr[addr_type],
                                      self.tun_if.remote_addr[addr_type],
                                      tun_flags=tun_flags,
                                      dscp=params.dscp,
                                      flags=flags,
                                      salt=salt,
                                      hop_limit=params.outer_hop_limit)
        params.tun_sa_out = VppIpsecSA(self, vpp_tun_sa_id, vpp_tun_spi,
                                       auth_algo_vpp_id, auth_key,
                                       crypt_algo_vpp_id, crypt_key,
                                       self.vpp_esp_protocol,
                                       self.tun_if.remote_addr[addr_type],
                                       self.tun_if.local_addr[addr_type],
                                       tun_flags=tun_flags,
                                       dscp=params.dscp,
                                       flags=flags,
                                       salt=salt,
                                       hop_limit=params.outer_hop_limit)
        objs.append(params.tun_sa_in)
        objs.append(params.tun_sa_out)

        params.spd_policy_in_any = VppIpsecSpdEntry(self, self.tun_spd,
                                                    scapy_tun_sa_id,
                                                    addr_any, addr_bcast,
                                                    addr_any, addr_bcast,
                                                    socket.IPPROTO_ESP)
        params.spd_policy_out_any = VppIpsecSpdEntry(self, self.tun_spd,
                                                     scapy_tun_sa_id,
                                                     addr_any, addr_bcast,
                                                     addr_any, addr_bcast,
                                                     socket.IPPROTO_ESP,
                                                     is_outbound=0)
        objs.append(params.spd_policy_out_any)
        objs.append(params.spd_policy_in_any)

        objs.append(VppIpsecSpdEntry(self, self.tun_spd, vpp_tun_sa_id,
                                     remote_tun_if_host, remote_tun_if_host,
                                     self.pg1.remote_addr[addr_type],
                                     self.pg1.remote_addr[addr_type],
                                     0,
                                     priority=10,
                                     policy=e.IPSEC_API_SPD_ACTION_PROTECT,
                                     is_outbound=0))
        objs.append(VppIpsecSpdEntry(self, self.tun_spd, scapy_tun_sa_id,
                                     self.pg1.remote_addr[addr_type],
                                     self.pg1.remote_addr[addr_type],
                                     remote_tun_if_host, remote_tun_if_host,
                                     0,
                                     policy=e.IPSEC_API_SPD_ACTION_PROTECT,
                                     priority=10))
        objs.append(VppIpsecSpdEntry(self, self.tun_spd, vpp_tun_sa_id,
                                     remote_tun_if_host, remote_tun_if_host,
                                     self.pg0.local_addr[addr_type],
                                     self.pg0.local_addr[addr_type],
                                     0,
                                     priority=20,
                                     policy=e.IPSEC_API_SPD_ACTION_PROTECT,
                                     is_outbound=0))
        objs.append(VppIpsecSpdEntry(self, self.tun_spd, scapy_tun_sa_id,
                                     self.pg0.local_addr[addr_type],
                                     self.pg0.local_addr[addr_type],
                                     remote_tun_if_host, remote_tun_if_host,
                                     0,
                                     policy=e.IPSEC_API_SPD_ACTION_PROTECT,
                                     priority=20))
        for o in objs:
            o.add_vpp_config()
        self.net_objs = self.net_objs + objs

    def config_esp_tra(self, params):
        addr_type = params.addr_type
        scapy_tra_sa_id = params.scapy_tra_sa_id
        scapy_tra_spi = params.scapy_tra_spi
        vpp_tra_sa_id = params.vpp_tra_sa_id
        vpp_tra_spi = params.vpp_tra_spi
        auth_algo_vpp_id = params.auth_algo_vpp_id
        auth_key = params.auth_key
        crypt_algo_vpp_id = params.crypt_algo_vpp_id
        crypt_key = params.crypt_key
        addr_any = params.addr_any
        addr_bcast = params.addr_bcast
        e = VppEnum.vl_api_ipsec_spd_action_t
        flags = params.flags
        salt = params.salt
        objs = []

        params.tra_sa_in = VppIpsecSA(self, scapy_tra_sa_id, scapy_tra_spi,
                                      auth_algo_vpp_id, auth_key,
                                      crypt_algo_vpp_id, crypt_key,
                                      self.vpp_esp_protocol,
                                      flags=flags,
                                      salt=salt)
        params.tra_sa_out = VppIpsecSA(self, vpp_tra_sa_id, vpp_tra_spi,
                                       auth_algo_vpp_id, auth_key,
                                       crypt_algo_vpp_id, crypt_key,
                                       self.vpp_esp_protocol,
                                       flags=flags,
                                       salt=salt)
        objs.append(params.tra_sa_in)
        objs.append(params.tra_sa_out)

        objs.append(VppIpsecSpdEntry(self, self.tra_spd, vpp_tra_sa_id,
                                     addr_any, addr_bcast,
                                     addr_any, addr_bcast,
                                     socket.IPPROTO_ESP))
        objs.append(VppIpsecSpdEntry(self, self.tra_spd, vpp_tra_sa_id,
                                     addr_any, addr_bcast,
                                     addr_any, addr_bcast,
                                     socket.IPPROTO_ESP,
                                     is_outbound=0))
        objs.append(VppIpsecSpdEntry(self, self.tra_spd, vpp_tra_sa_id,
                                     self.tra_if.local_addr[addr_type],
                                     self.tra_if.local_addr[addr_type],
                                     self.tra_if.remote_addr[addr_type],
                                     self.tra_if.remote_addr[addr_type],
                                     0, priority=10,
                                     policy=e.IPSEC_API_SPD_ACTION_PROTECT,
                                     is_outbound=0))
        objs.append(VppIpsecSpdEntry(self, self.tra_spd, scapy_tra_sa_id,
                                     self.tra_if.local_addr[addr_type],
                                     self.tra_if.local_addr[addr_type],
                                     self.tra_if.remote_addr[addr_type],
                                     self.tra_if.remote_addr[addr_type],
                                     0, policy=e.IPSEC_API_SPD_ACTION_PROTECT,
                                     priority=10))
        for o in objs:
            o.add_vpp_config()
        self.net_objs = self.net_objs + objs


class TemplateIpsecEsp(ConfigIpsecESP):
    """
    Basic test for ipsec esp sanity - tunnel and transport modes.

    Below 4 cases are covered as part of this test

    #. ipsec esp v4 transport basic test  - IPv4 Transport mode
        scenario using HMAC-SHA1-96 integrity algo

    #. ipsec esp v4 transport burst test
        Above test for 257 pkts

    #. ipsec esp 4o4 tunnel basic test    - IPv4 Tunnel mode
        scenario using HMAC-SHA1-96 integrity algo

    #. ipsec esp 4o4 tunnel burst test
        Above test for 257 pkts

    TRANSPORT MODE::

         ---   encrypt   ---
        |pg2| <-------> |VPP|
         ---   decrypt   ---

    TUNNEL MODE::

         ---   encrypt   ---   plain   ---
        |pg0| <-------  |VPP| <------ |pg1|
         ---             ---           ---

         ---   decrypt   ---   plain   ---
        |pg0| ------->  |VPP| ------> |pg1|
         ---             ---           ---

    """

    @classmethod
    def setUpClass(cls):
        super(TemplateIpsecEsp, cls).setUpClass()

    @classmethod
    def tearDownClass(cls):
        super(TemplateIpsecEsp, cls).tearDownClass()

    def setUp(self):
        super(TemplateIpsecEsp, self).setUp()
        self.config_anti_replay(self.params.values())
        self.config_network(self.params.values())

    def tearDown(self):
        self.unconfig_network()
        super(TemplateIpsecEsp, self).tearDown()


class TestIpsecEsp1(TemplateIpsecEsp, IpsecTra46Tests,
                    IpsecTun46Tests, IpsecTra6ExtTests):
    """ Ipsec ESP - TUN & TRA tests """

    @classmethod
    def setUpClass(cls):
        super(TestIpsecEsp1, cls).setUpClass()

    @classmethod
    def tearDownClass(cls):
        super(TestIpsecEsp1, cls).tearDownClass()

    def setUp(self):
        super(TestIpsecEsp1, self).setUp()

    def tearDown(self):
        super(TestIpsecEsp1, self).tearDown()

    def test_tun_46(self):
        """ ipsec 4o6 tunnel """
        # add an SPD entry to direct 2.2.2.2 to the v6 tunnel SA
        p6 = self.ipv6_params
        p4 = self.ipv4_params

        p6.remote_tun_if_host4 = "2.2.2.2"
        e = VppEnum.vl_api_ipsec_spd_action_t

        VppIpsecSpdEntry(self,
                         self.tun_spd,
                         p6.scapy_tun_sa_id,
                         self.pg1.remote_addr[p4.addr_type],
                         self.pg1.remote_addr[p4.addr_type],
                         p6.remote_tun_if_host4,
                         p6.remote_tun_if_host4,
                         0,
                         priority=10,
                         policy=e.IPSEC_API_SPD_ACTION_PROTECT,
                         is_outbound=1).add_vpp_config()
        VppIpRoute(self,  p6.remote_tun_if_host4, p4.addr_len,
                   [VppRoutePath(self.tun_if.remote_addr[p4.addr_type],
                                 0xffffffff)]).add_vpp_config()

        old_name = self.tun6_encrypt_node_name
        self.tun6_encrypt_node_name = "esp4-encrypt"

        self.verify_tun_46(p6, count=63)
        self.tun6_encrypt_node_name = old_name

    def test_tun_64(self):
        """ ipsec 6o4 tunnel """
        # add an SPD entry to direct 4444::4 to the v4 tunnel SA
        p6 = self.ipv6_params
        p4 = self.ipv4_params

        p4.remote_tun_if_host6 = "4444::4"
        e = VppEnum.vl_api_ipsec_spd_action_t

        VppIpsecSpdEntry(self,
                         self.tun_spd,
                         p4.scapy_tun_sa_id,
                         self.pg1.remote_addr[p6.addr_type],
                         self.pg1.remote_addr[p6.addr_type],
                         p4.remote_tun_if_host6,
                         p4.remote_tun_if_host6,
                         0,
                         priority=10,
                         policy=e.IPSEC_API_SPD_ACTION_PROTECT,
                         is_outbound=1).add_vpp_config()
        d = DpoProto.DPO_PROTO_IP6
        VppIpRoute(self,  p4.remote_tun_if_host6, p6.addr_len,
                   [VppRoutePath(self.tun_if.remote_addr[p6.addr_type],
                                 0xffffffff,
                                 proto=d)]).add_vpp_config()

        old_name = self.tun4_encrypt_node_name
        self.tun4_encrypt_node_name = "esp6-encrypt"
        self.verify_tun_64(p4, count=63)
        self.tun4_encrypt_node_name = old_name


class TestIpsecEspTun(TemplateIpsecEsp, IpsecTun46Tests):
    """ Ipsec ESP - TUN encap tests """

    def setUp(self):
        self.ipv4_params = IPsecIPv4Params()
        self.ipv6_params = IPsecIPv6Params()

        c = (VppEnum.vl_api_tunnel_encap_decap_flags_t.
             TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_COPY_DSCP)
        c1 = c | (VppEnum.vl_api_tunnel_encap_decap_flags_t.
                  TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_COPY_ECN)

        self.ipv4_params.tun_flags = c
        self.ipv6_params.tun_flags = c1

        super(TestIpsecEspTun, self).setUp()

    def gen_pkts(self, sw_intf, src, dst, count=1, payload_size=54):
        # set the DSCP + ECN - flags are set to copy only DSCP
        return [Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac) /
                IP(src=src, dst=dst, tos=5) /
                UDP(sport=4444, dport=4444) /
                Raw(b'X' * payload_size)
                for i in range(count)]

    def gen_pkts6(self, p, sw_intf, src, dst, count=1, payload_size=54):
        # set the DSCP + ECN - flags are set to copy both
        return [Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac) /
                IPv6(src=src, dst=dst, tc=5) /
                UDP(sport=4444, dport=4444) /
                Raw(b'X' * payload_size)
                for i in range(count)]

    def verify_encrypted(self, p, sa, rxs):
        # just check that only the DSCP is copied
        for rx in rxs:
            self.assertEqual(rx[IP].tos, 4)

    def verify_encrypted6(self, p, sa, rxs):
        # just check that the DSCP & ECN are copied
        for rx in rxs:
            self.assertEqual(rx[IPv6].tc, 5)


class TestIpsecEspTun2(TemplateIpsecEsp, IpsecTun46Tests):
    """ Ipsec ESP - TUN DSCP tests """

    def setUp(self):
        self.ipv4_params = IPsecIPv4Params()
        self.ipv6_params = IPsecIPv6Params()

        self.ipv4_params.dscp = VppEnum.vl_api_ip_dscp_t.IP_API_DSCP_EF
        self.ipv6_params.dscp = VppEnum.vl_api_ip_dscp_t.IP_API_DSCP_AF11

        super(TestIpsecEspTun2, self).setUp()

    def gen_pkts(self, sw_intf, src, dst, count=1, payload_size=54):
        return [Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac) /
                IP(src=src, dst=dst) /
                UDP(sport=4444, dport=4444) /
                Raw(b'X' * payload_size)
                for i in range(count)]

    def gen_pkts6(self, p, sw_intf, src, dst, count=1, payload_size=54):
        return [Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac) /
                IPv6(src=src, dst=dst) /
                UDP(sport=4444, dport=4444) /
                Raw(b'X' * payload_size)
                for i in range(count)]

    def verify_encrypted(self, p, sa, rxs):
        # just check that only the DSCP is set
        for rx in rxs:
            self.assertEqual(rx[IP].tos,
                             VppEnum.vl_api_ip_dscp_t.IP_API_DSCP_EF << 2)

    def verify_encrypted6(self, p, sa, rxs):
        # just check that the DSCP is set
        for rx in rxs:
            self.assertEqual(rx[IPv6].tc,
                             VppEnum.vl_api_ip_dscp_t.IP_API_DSCP_AF11 << 2)


class TestIpsecEsp2(TemplateIpsecEsp, IpsecTcpTests):
    """ Ipsec ESP - TCP tests """
    pass


class TestIpsecEspAsync(TemplateIpsecEsp):
    """ Ipsec ESP - Aysnc tests """

    vpp_worker_count = 2

    def setUp(self):
        super(TestIpsecEspAsync, self).setUp()

        self.p_sync = IPsecIPv4Params()

        self.p_sync.crypt_algo_vpp_id = (VppEnum.vl_api_ipsec_crypto_alg_t.
                                         IPSEC_API_CRYPTO_ALG_AES_CBC_256)
        self.p_sync.crypt_algo = 'AES-CBC'  # scapy name
        self.p_sync.crypt_key = b'JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h'

        self.p_sync.scapy_tun_sa_id += 0xf0000
        self.p_sync.scapy_tun_spi += 0xf0000
        self.p_sync.vpp_tun_sa_id += 0xf0000
        self.p_sync.vpp_tun_spi += 0xf0000
        self.p_sync.remote_tun_if_host = "2.2.2.2"
        e = VppEnum.vl_api_ipsec_spd_action_t

        self.p_sync.sa = VppIpsecSA(
            self,
            self.p_sync.vpp_tun_sa_id,
            self.p_sync.vpp_tun_spi,
            self.p_sync.auth_algo_vpp_id,
            self.p_sync.auth_key,
            self.p_sync.crypt_algo_vpp_id,
            self.p_sync.crypt_key,
            self.vpp_esp_protocol,
            self.tun_if.local_addr[self.p_sync.addr_type],
            self.tun_if.remote_addr[self.p_sync.addr_type]).add_vpp_config()
        self.p_sync.spd = VppIpsecSpdEntry(
            self,
            self.tun_spd,
            self.p_sync.vpp_tun_sa_id,
            self.pg1.remote_addr[self.p_sync.addr_type],
            self.pg1.remote_addr[self.p_sync.addr_type],
            self.p_sync.remote_tun_if_host,
            self.p_sync.remote_tun_if_host,
            0,
            priority=1,
            policy=e.IPSEC_API_SPD_ACTION_PROTECT,
            is_outbound=1).add_vpp_config()
        VppIpRoute(self,
                   self.p_sync.remote_tun_if_host,
                   self.p_sync.addr_len,
                   [VppRoutePath(
                       self.tun_if.remote_addr[self.p_sync.addr_type],
                       0xffffffff)]).add_vpp_config()
        config_tun_params(self.p_sync, self.encryption_type, self.tun_if)

        self.p_async = IPsecIPv4Params()

        self.p_async.crypt_algo_vpp_id = (VppEnum.vl_api_ipsec_crypto_alg_t.
                                          IPSEC_API_CRYPTO_ALG_AES_GCM_256)
        self.p_async.auth_algo_vpp_id = (VppEnum.vl_api_ipsec_integ_alg_t.
                                         IPSEC_API_INTEG_ALG_NONE)
        self.p_async.crypt_algo = 'AES-GCM'  # scapy name
        self.p_async.crypt_key = b'JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h'
        self.p_async.auth_algo = 'NULL'

        self.p_async.scapy_tun_sa_id += 0xe0000
        self.p_async.scapy_tun_spi += 0xe0000
        self.p_async.vpp_tun_sa_id += 0xe0000
        self.p_async.vpp_tun_spi += 0xe0000
        self.p_async.remote_tun_if_host = "2.2.2.3"

        iflags = VppEnum.vl_api_ipsec_sad_flags_t
        self.p_async.flags = (iflags.IPSEC_API_SAD_FLAG_USE_ESN |
                              iflags.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY |
                              iflags.IPSEC_API_SAD_FLAG_ASYNC)

        self.p_async.sa = VppIpsecSA(
            self,
            self.p_async.vpp_tun_sa_id,
            self.p_async.vpp_tun_spi,
            self.p_async.auth_algo_vpp_id,
            self.p_async.auth_key,
            self.p_async.crypt_algo_vpp_id,
            self.p_async.crypt_key,
            self.vpp_esp_protocol,
            self.tun_if.local_addr[self.p_async.addr_type],
            self.tun_if.remote_addr[self.p_async.addr_type],
            flags=self.p_async.flags).add_vpp_config()
        self.p_async.spd = VppIpsecSpdEntry(
            self,
            self.tun_spd,
            self.p_async.vpp_tun_sa_id,
            self.pg1.remote_addr[self.p_async.addr_type],
            self.pg1.remote_addr[self.p_async.addr_type],
            self.p_async.remote_tun_if_host,
            self.p_async.remote_tun_if_host,
            0,
            priority=2,
            policy=e.IPSEC_API_SPD_ACTION_PROTECT,
            is_outbound=1).add_vpp_config()
        VppIpRoute(self,
                   self.p_async.remote_tun_if_host,
                   self.p_async.addr_len,
                   [VppRoutePath(
                       self.tun_if.remote_addr[self.p_async.addr_type],
                       0xffffffff)]).add_vpp_config()
        config_tun_params(self.p_async, self.encryption_type, self.tun_if)

    def test_dual_stream(self):
        """ Alternating SAs """
        p = self.params[self.p_sync.addr_type]
        self.vapi.ipsec_set_async_mode(async_enable=True)

        pkts = [(Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) /
                 IP(src=self.pg1.remote_ip4,
                    dst=self.p_sync.remote_tun_if_host) /
                 UDP(sport=4444, dport=4444) /
                 Raw(b'0x0' * 200)),
                (Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) /
                 IP(src=self.pg1.remote_ip4,
                    dst=p.remote_tun_if_host) /
                 UDP(sport=4444, dport=4444) /
                 Raw(b'0x0' * 200))]
        pkts *= 1023

        rxs = self.send_and_expect(self.pg1, pkts, self.pg0)

        self.assertEqual(len(rxs), len(pkts))

        for rx in rxs:
            if rx[ESP].spi == p.scapy_tun_spi:
                decrypted = p.vpp_tun_sa.decrypt(rx[IP])
            elif rx[ESP].spi == self.p_sync.vpp_tun_spi:
                decrypted = self.p_sync.scapy_tun_sa.decrypt(rx[IP])
            else:
                rx.show()
                self.assertTrue(False)

        self.p_sync.spd.remove_vpp_config()
        self.p_sync.sa.remove_vpp_config()
        self.p_async.spd.remove_vpp_config()
        self.p_async.sa.remove_vpp_config()
        self.vapi.ipsec_set_async_mode(async_enable=False)

    def test_sync_async_noop_stream(self):
        """ Alternating SAs sync/async/noop """
        p = self.params[self.p_sync.addr_type]

        # first pin the default/noop SA to worker 0
        pkts = [(Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) /
                 IP(src=self.pg1.remote_ip4,
                    dst=p.remote_tun_if_host) /
                 UDP(sport=4444, dport=4444) /
                 Raw(b'0x0' * 200))]
        rxs = self.send_and_expect(self.pg1, pkts, self.pg0, worker=0)

        self.logger.info(self.vapi.cli("sh ipsec sa"))
        self.logger.info(self.vapi.cli("sh crypto async status"))

        # then use all the other SAs on worker 1.
        # some will handoff, other take the sync and async paths
        pkts = [(Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) /
                 IP(src=self.pg1.remote_ip4,
                    dst=self.p_sync.remote_tun_if_host) /
                 UDP(sport=4444, dport=4444) /
                 Raw(b'0x0' * 200)),
                (Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) /
                 IP(src=self.pg1.remote_ip4,
                    dst=p.remote_tun_if_host) /
                 UDP(sport=4444, dport=4444) /
                 Raw(b'0x0' * 200)),
                (Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) /
                 IP(src=self.pg1.remote_ip4,
                    dst=self.p_async.remote_tun_if_host) /
                 UDP(sport=4444, dport=4444) /
                 Raw(b'0x0' * 200))]
        pkts *= 1023

        rxs = self.send_and_expect(self.pg1, pkts, self.pg0, worker=1)

        self.assertEqual(len(rxs), len(pkts))

        for rx in rxs:
            if rx[ESP].spi == p.scapy_tun_spi:
                decrypted = p.vpp_tun_sa.decrypt(rx[IP])
            elif rx[ESP].spi == self.p_sync.vpp_tun_spi:
                decrypted = self.p_sync.scapy_tun_sa.decrypt(rx[IP])
            elif rx[ESP].spi == self.p_async.vpp_tun_spi:
                decrypted = self.p_async.scapy_tun_sa.decrypt(rx[IP])
            else:
                rx.show()
                self.assertTrue(False)

        self.p_sync.spd.remove_vpp_config()
        self.p_sync.sa.remove_vpp_config()
        self.p_async.spd.remove_vpp_config()
        self.p_async.sa.remove_vpp_config()

        # async mode should have been disabled now that there are
        # no async SAs. there's no API for this, so a reluctant
        # screen scrape.
        self.assertTrue("DISABLED" in self.vapi.cli("sh crypto async status"))


class TestIpsecEspHandoff(TemplateIpsecEsp,
                          IpsecTun6HandoffTests,
                          IpsecTun4HandoffTests):
    """ Ipsec ESP - handoff tests """
    pass


class TemplateIpsecEspUdp(ConfigIpsecESP):
    """
    UDP encapped ESP
    """

    @classmethod
    def setUpClass(cls):
        super(TemplateIpsecEspUdp, cls).setUpClass()

    @classmethod
    def tearDownClass(cls):
        super(TemplateIpsecEspUdp, cls).tearDownClass()

    def setUp(self):
        super(TemplateIpsecEspUdp, self).setUp()
        self.net_objs = []
        self.tun_if = self.pg0
        self.tra_if = self.pg2
        self.logger.info(self.vapi.ppcli("show int addr"))

        p = self.ipv4_params
        p.flags = (VppEnum.vl_api_ipsec_sad_flags_t.
                   IPSEC_API_SAD_FLAG_UDP_ENCAP |
                   VppEnum.vl_api_ipsec_sad_flags_t.
                   IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY)
        p.nat_header = UDP(sport=5454, dport=4500)

        self.tra_spd = VppIpsecSpd(self, self.tra_spd_id)
        self.tra_spd.add_vpp_config()
        VppIpsecSpdItfBinding(self, self.tra_spd,
                              self.tra_if).add_vpp_config()

        self.config_esp_tra(p)
        config_tra_params(p, self.encryption_type)

        self.tun_spd = VppIpsecSpd(self, self.tun_spd_id)
        self.tun_spd.add_vpp_config()
        VppIpsecSpdItfBinding(self, self.tun_spd,
                              self.tun_if).add_vpp_config()

        self.config_esp_tun(p)
        self.logger.info(self.vapi.ppcli("show ipsec all"))

        d = DpoProto.DPO_PROTO_IP4
        VppIpRoute(self,  p.remote_tun_if_host, p.addr_len,
                   [VppRoutePath(self.tun_if.remote_addr[p.addr_type],
                                 0xffffffff,
                                 proto=d)]).add_vpp_config()

    def tearDown(self):
        super(TemplateIpsecEspUdp, self).tearDown()

    def show_commands_at_teardown(self):
        self.logger.info(self.vapi.cli("show hardware"))


class TestIpsecEspUdp(TemplateIpsecEspUdp, IpsecTra4Tests):
    """ Ipsec NAT-T ESP UDP tests """
    pass


class MyParameters():
    def __init__(self):
        saf = VppEnum.vl_api_ipsec_sad_flags_t
        flag_esn = saf.IPSEC_API_SAD_FLAG_USE_ESN
        flag_ar = saf.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY
        self.flags = [0, flag_esn, flag_ar]
        # foreach crypto algorithm
        self.algos = {
            'AES-GCM-128/NONE': {
                  'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
                                 IPSEC_API_CRYPTO_ALG_AES_GCM_128),
                  'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
                                IPSEC_API_INTEG_ALG_NONE),
                  'scapy-crypto': "AES-GCM",
                  'scapy-integ': "NULL",
                  'key': b"JPjyOWBeVEQiMe7h",
                  'salt': 0},
            'AES-GCM-192/NONE': {
                  'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
                                 IPSEC_API_CRYPTO_ALG_AES_GCM_192),
                  'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
                                IPSEC_API_INTEG_ALG_NONE),
                  'scapy-crypto': "AES-GCM",
                  'scapy-integ': "NULL",
                  'key': b"JPjyOWBeVEQiMe7h01234567",
                  'salt': 1010},
            'AES-GCM-256/NONE': {
                  'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
                                 IPSEC_API_CRYPTO_ALG_AES_GCM_256),
                  'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
                                IPSEC_API_INTEG_ALG_NONE),
                  'scapy-crypto': "AES-GCM",
                  'scapy-integ': "NULL",
                  'key': b"JPjyOWBeVEQiMe7h0123456787654321",
                  'salt': 2020},
            'AES-CBC-128/MD5-96': {
                  'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
                                 IPSEC_API_CRYPTO_ALG_AES_CBC_128),
                  'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
                                IPSEC_API_INTEG_ALG_MD5_96),
                  'scapy-crypto': "AES-CBC",
                  'scapy-integ': "HMAC-MD5-96",
                  'salt': 0,
                  'key': b"JPjyOWBeVEQiMe7h"},
            'AES-CBC-192/SHA1-96': {
                  'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
                                 IPSEC_API_CRYPTO_ALG_AES_CBC_192),
                  'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
                                IPSEC_API_INTEG_ALG_SHA1_96),
                  'scapy-crypto': "AES-CBC",
                  'scapy-integ': "HMAC-SHA1-96",
                  'salt': 0,
                  'key': b"JPjyOWBeVEQiMe7hJPjyOWBe"},
            'AES-CBC-256/SHA1-96': {
                  'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
                                 IPSEC_API_CRYPTO_ALG_AES_CBC_256),
                  'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
                                IPSEC_API_INTEG_ALG_SHA1_96),
                  'scapy-crypto': "AES-CBC",
                  'scapy-integ': "HMAC-SHA1-96",
                  'salt': 0,
                  'key': b"JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h"},
            '3DES-CBC/SHA1-96': {
                  'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
                                 IPSEC_API_CRYPTO_ALG_3DES_CBC),
                  'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
                                IPSEC_API_INTEG_ALG_SHA1_96),
                  'scapy-crypto': "3DES",
                  'scapy-integ': "HMAC-SHA1-96",
                  'salt': 0,
                  'key': b"JPjyOWBeVEQiMe7h00112233"},
            'NONE/SHA1-96': {
                  'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
                                 IPSEC_API_CRYPTO_ALG_NONE),
                  'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
                                IPSEC_API_INTEG_ALG_SHA1_96),
                  'scapy-crypto': "NULL",
                  'scapy-integ': "HMAC-SHA1-96",
                  'salt': 0,
                  'key': b"JPjyOWBeVEQiMe7h00112233"},
            'AES-CTR-128/SHA1-96': {
                  'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
                                 IPSEC_API_CRYPTO_ALG_AES_CTR_128),
                  'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
                                IPSEC_API_INTEG_ALG_SHA1_96),
                  'scapy-crypto': "AES-CTR",
                  'scapy-integ': "HMAC-SHA1-96",
                  'salt': 0,
                  'key': b"JPjyOWBeVEQiMe7h"},
            'AES-CTR-192/SHA1-96': {
                  'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
                                 IPSEC_API_CRYPTO_ALG_AES_CTR_192),
                  'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
                                IPSEC_API_INTEG_ALG_SHA1_96),
                  'scapy-crypto': "AES-CTR",
                  'scapy-integ': "HMAC-SHA1-96",
                  'salt': 1010,
                  'key': b"JPjyOWBeVEQiMe7hJPjyOWBe"},
            'AES-CTR-256/SHA1-96': {
                  'vpp-crypto': (VppEnum.vl_api_ipsec_crypto_alg_t.
                                 IPSEC_API_CRYPTO_ALG_AES_CTR_256),
                  'vpp-integ': (VppEnum.vl_api_ipsec_integ_alg_t.
                                IPSEC_API_INTEG_ALG_SHA1_96),
                  'scapy-crypto': "AES-CTR",
                  'scapy-integ': "HMAC-SHA1-96",
                  'salt': 2020,
                  'key': b"JPjyOWBeVEQiMe7hJPjyOWBeVEQiMe7h"}}


class RunTestIpsecEspAll(ConfigIpsecESP,
                         IpsecTra4, IpsecTra6,
                         IpsecTun4, IpsecTun6):
    """ Ipsec ESP all Algos """

    @classmethod
    def setUpConstants(cls):
        test_args = str.split(cls.__doc__, " ")
        engine = test_args[0]
        if engine == "async":
            cls.vpp_worker_count = 2
        super(RunTestIpsecEspAll, cls).setUpConstants()

    def setUp(self):
        super(RunTestIpsecEspAll, self).setUp()
        test_args = str.split(self.__doc__, " ")

        params = MyParameters()
        self.engine = test_args[0]
        self.flag = params.flags[0]
        if test_args[1] == 'ESNon':
            self.flag |= params.flags[1]
        if test_args[2] == 'ARon':
            self.flag |= params.flags[2]

        self.algo = params.algos[test_args[3]]
        self.async_mode = False
        if self.engine == "async":
            self.async_mode = True

    def tearDown(self):
        super(RunTestIpsecEspAll, self).tearDown()

    def run_test(self):
        self.run_a_test(self.engine, self.flag, self.algo)

    def run_a_test(self, engine, flag, algo, payload_size=None):
        if self.async_mode:
            self.vapi.cli("set ipsec async mode on")
        else:
            self.vapi.cli("set crypto handler all %s" % engine)

        self.logger.info(self.vapi.cli("show crypto async status"))
        self.ipv4_params = IPsecIPv4Params()
        self.ipv6_params = IPsecIPv6Params()

        self.params = {self.ipv4_params.addr_type:
                       self.ipv4_params,
                       self.ipv6_params.addr_type:
                       self.ipv6_params}

        for _, p in self.params.items():
            p.auth_algo_vpp_id = algo['vpp-integ']
            p.crypt_algo_vpp_id = algo['vpp-crypto']
            p.crypt_algo = algo['scapy-crypto']
            p.auth_algo = algo['scapy-integ']
            p.crypt_key = algo['key']
            p.salt = algo['salt']
            p.flags = flag
            p.outer_flow_label = 243224
            p.async_mode = self.async_mode

        self.reporter.send_keep_alive(self)

        #
        # configure the SPDs. SAs, etc
        #
        self.config_network(self.params.values())

        #
        # run some traffic.
        #  An exhautsive 4o6, 6o4 is not necessary
        #  for each algo
        #
        self.verify_tra_basic6(count=NUM_PKTS)
        self.verify_tra_basic4(count=NUM_PKTS)
        self.verify_tun_66(self.params[socket.AF_INET6],
                           count=NUM_PKTS)
        #
        # Use an odd-byte payload size to check for correct padding.
        #
        # 49 + 2 == 51 which should pad +1 to 52 for 4 byte alignment, +5
        # to 56 for 8 byte alignment, and +13 to 64 for 64 byte alignment.
        # This should catch bugs where the code is incorrectly over-padding
        # for algorithms that don't require it
        psz = 49 - len(IP()/ICMP()) if payload_size is None else payload_size
        self.verify_tun_44(self.params[socket.AF_INET],
                           count=NUM_PKTS, payload_size=psz)

        LARGE_PKT_SZ = [
            1970,  # results in 2 chained buffers entering decrypt node
                   # but leaving as simple buffer due to ICV removal (tra4)
            2004,  # footer+ICV will be added to 2nd buffer (tun4)
            4010,  # ICV ends up splitted across 2 buffers in esp_decrypt
                   # for transport4; transport6 takes normal path
            4020,  # same as above but tra4 and tra6 are switched
        ]
        if self.engine in engines_supporting_chain_bufs:
            for sz in LARGE_PKT_SZ:
                self.verify_tra_basic4(count=NUM_PKTS, payload_size=sz)
                self.verify_tra_basic6(count=NUM_PKTS, payload_size=sz)
                self.verify_tun_66(self.params[socket.AF_INET6],
                                   count=NUM_PKTS, payload_size=sz)
                self.verify_tun_44(self.params[socket.AF_INET],
                                   count=NUM_PKTS, payload_size=sz)

        #
        # reconfigure the network and SA to run the
        # anti replay tests
        #
        saf = VppEnum.vl_api_ipsec_sad_flags_t
        if flag & saf.IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY:
            self.unconfig_network()
            self.config_network(self.params.values())
            self.verify_tra_anti_replay()

        self.unconfig_network()
        self.config_network(self.params.values())
        self.verify_hi_seq_num()
        self.unconfig_network()
        self.config_network(self.params.values())
        self.verify_tra_lost()

        #
        # swap the handlers while SAs are up
        #
        self.unconfig_network()
        self.config_network(self.params.values())
        for e in engines:
            if e != engine:
                self.vapi.cli("set crypto handler all %s" % e)
                self.verify_tra_basic4(count=NUM_PKTS)

        self.unconfig_network()

#
# To generate test classes, do:
#   grep '# GEN' test_ipsec_esp.py | sed -e 's/# GEN //g' | bash
#
# GEN for ENG in native ipsecmb openssl; do \
# GEN   for ESN in ESNon ESNoff; do for AR in ARon ARoff; do \
# GEN   for ALG in AES-GCM-128/NONE \
# GEN     AES-GCM-192/NONE AES-GCM-256/NONE AES-CBC-128/MD5-96 \
# GEN     AES-CBC-192/SHA1-96 AES-CBC-256/SHA1-96 \
# GEN     3DES-CBC/SHA1-96 NONE/SHA1-96 \
# GEN     AES-CTR-128/SHA1-96 AES-CTR-192/SHA1-96 AES-CTR-256/SHA1-96; do \
# GEN      echo -en "\n\nclass "
# GEN      echo -e "Test_${ENG}_${ESN}_${AR}_${ALG}(RunTestIpsecEspAll):" |
# GEN             sed -e 's/-/_/g' -e 's#/#_#g' ;
# GEN      echo '    """'$ENG $ESN $AR $ALG IPSec test'"""' ;
# GEN      echo "    def test_ipsec(self):";
# GEN      echo '        """'$ENG $ESN $AR $ALG IPSec test'"""' ;
# GEN      echo "        self.run_test()";
# GEN done; done; done; done
#
# GEN   for ESN in ESNon ESNoff; do for AR in ARon ARoff; do \
# GEN   for ALG in \
# GEN     AES-GCM-128/NONE AES-GCM-192/NONE AES-GCM-256/NONE \
# GEN     AES-CBC-192/SHA1-96 AES-CBC-256/SHA1-96; do \
# GEN      echo -en "\n\nclass "
# GEN      echo -e "Test_async_${ESN}_${AR}_${ALG}(RunTestIpsecEspAll):" |
# GEN             sed -e 's/-/_/g' -e 's#/#_#g' ;
# GEN      echo '    """'async $ESN $AR $ALG IPSec test'"""' ;
# GEN      echo "    def test_ipsec(self):";
# GEN      echo '        """'async $ESN $AR $ALG IPSec test'"""' ;
# GEN      echo "        self.run_test()";
# GEN done; done; done;


class Test_native_ESNon_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
    """native ESNon ARon AES-GCM-128/NONE IPSec test"""
    def test_ipsec(self):
        """native ESNon ARon AES-GCM-128/NONE IPSec test"""
        self.run_test()


class Test_native_ESNon_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
    """native ESNon ARon AES-GCM-192/NONE IPSec test"""
    def test_ipsec(self):
        """native ESNon ARon AES-GCM-192/NONE IPSec test"""
        self.run_test()


class Test_native_ESNon_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
    """native ESNon ARon AES-GCM-256/NONE IPSec test"""
    def test_ipsec(self):
        """native ESNon ARon AES-GCM-256/NONE IPSec test"""
        self.run_test()


class Test_native_ESNon_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
    """native ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
    def test_ipsec(self):
        """native ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
        self.run_test()


class Test_native_ESNon_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
    """native ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNon_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
    """native ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNon_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
    """native ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNon_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
    """native ESNon ARon NONE/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNon ARon NONE/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNon_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
    """native ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNon_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
    """native ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNon_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
    """native ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNon_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
    """native ESNon ARoff AES-GCM-128/NONE IPSec test"""
    def test_ipsec(self):
        """native ESNon ARoff AES-GCM-128/NONE IPSec test"""
        self.run_test()


class Test_native_ESNon_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
    """native ESNon ARoff AES-GCM-192/NONE IPSec test"""
    def test_ipsec(self):
        """native ESNon ARoff AES-GCM-192/NONE IPSec test"""
        self.run_test()


class Test_native_ESNon_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
    """native ESNon ARoff AES-GCM-256/NONE IPSec test"""
    def test_ipsec(self):
        """native ESNon ARoff AES-GCM-256/NONE IPSec test"""
        self.run_test()


class Test_native_ESNon_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
    """native ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
    def test_ipsec(self):
        """native ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
        self.run_test()


class Test_native_ESNon_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
    """native ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNon_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
    """native ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNon_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
    """native ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNon_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
    """native ESNon ARoff NONE/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNon ARoff NONE/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNon_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
    """native ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNon_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
    """native ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNon_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
    """native ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNoff_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
    """native ESNoff ARon AES-GCM-128/NONE IPSec test"""
    def test_ipsec(self):
        """native ESNoff ARon AES-GCM-128/NONE IPSec test"""
        self.run_test()


class Test_native_ESNoff_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
    """native ESNoff ARon AES-GCM-192/NONE IPSec test"""
    def test_ipsec(self):
        """native ESNoff ARon AES-GCM-192/NONE IPSec test"""
        self.run_test()


class Test_native_ESNoff_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
    """native ESNoff ARon AES-GCM-256/NONE IPSec test"""
    def test_ipsec(self):
        """native ESNoff ARon AES-GCM-256/NONE IPSec test"""
        self.run_test()


class Test_native_ESNoff_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
    """native ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
    def test_ipsec(self):
        """native ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
        self.run_test()


class Test_native_ESNoff_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
    """native ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNoff_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
    """native ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNoff_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
    """native ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNoff_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
    """native ESNoff ARon NONE/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNoff ARon NONE/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNoff_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
    """native ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNoff_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
    """native ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNoff_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
    """native ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNoff_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
    """native ESNoff ARoff AES-GCM-128/NONE IPSec test"""
    def test_ipsec(self):
        """native ESNoff ARoff AES-GCM-128/NONE IPSec test"""
        self.run_test()


class Test_native_ESNoff_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
    """native ESNoff ARoff AES-GCM-192/NONE IPSec test"""
    def test_ipsec(self):
        """native ESNoff ARoff AES-GCM-192/NONE IPSec test"""
        self.run_test()


class Test_native_ESNoff_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
    """native ESNoff ARoff AES-GCM-256/NONE IPSec test"""
    def test_ipsec(self):
        """native ESNoff ARoff AES-GCM-256/NONE IPSec test"""
        self.run_test()


class Test_native_ESNoff_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
    """native ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
    def test_ipsec(self):
        """native ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
        self.run_test()


class Test_native_ESNoff_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
    """native ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNoff_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
    """native ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNoff_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
    """native ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNoff_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
    """native ESNoff ARoff NONE/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNoff ARoff NONE/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNoff_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
    """native ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNoff_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
    """native ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_native_ESNoff_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
    """native ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """native ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNon_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
    """ipsecmb ESNon ARon AES-GCM-128/NONE IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNon ARon AES-GCM-128/NONE IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNon_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
    """ipsecmb ESNon ARon AES-GCM-192/NONE IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNon ARon AES-GCM-192/NONE IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNon_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
    """ipsecmb ESNon ARon AES-GCM-256/NONE IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNon ARon AES-GCM-256/NONE IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNon_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
    """ipsecmb ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNon_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNon_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNon_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNon_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNon ARon NONE/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNon ARon NONE/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNon_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNon_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNon_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNon_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
    """ipsecmb ESNon ARoff AES-GCM-128/NONE IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNon ARoff AES-GCM-128/NONE IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNon_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
    """ipsecmb ESNon ARoff AES-GCM-192/NONE IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNon ARoff AES-GCM-192/NONE IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNon_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
    """ipsecmb ESNon ARoff AES-GCM-256/NONE IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNon ARoff AES-GCM-256/NONE IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNon_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
    """ipsecmb ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNon_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNon_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNon_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNon_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNon ARoff NONE/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNon ARoff NONE/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNon_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNon_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNon_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNoff_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
    """ipsecmb ESNoff ARon AES-GCM-128/NONE IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNoff ARon AES-GCM-128/NONE IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNoff_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
    """ipsecmb ESNoff ARon AES-GCM-192/NONE IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNoff ARon AES-GCM-192/NONE IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNoff_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
    """ipsecmb ESNoff ARon AES-GCM-256/NONE IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNoff ARon AES-GCM-256/NONE IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNoff_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
    """ipsecmb ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNoff_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNoff_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNoff_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNoff_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNoff ARon NONE/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNoff ARon NONE/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNoff_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNoff_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNoff_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNoff_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
    """ipsecmb ESNoff ARoff AES-GCM-128/NONE IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNoff ARoff AES-GCM-128/NONE IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNoff_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
    """ipsecmb ESNoff ARoff AES-GCM-192/NONE IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNoff ARoff AES-GCM-192/NONE IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNoff_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
    """ipsecmb ESNoff ARoff AES-GCM-256/NONE IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNoff ARoff AES-GCM-256/NONE IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNoff_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
    """ipsecmb ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNoff_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNoff_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNoff_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNoff_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNoff ARoff NONE/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNoff ARoff NONE/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNoff_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNoff_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_ipsecmb_ESNoff_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
    """ipsecmb ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """ipsecmb ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNon_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
    """openssl ESNon ARon AES-GCM-128/NONE IPSec test"""
    def test_ipsec(self):
        """openssl ESNon ARon AES-GCM-128/NONE IPSec test"""
        self.run_test()


class Test_openssl_ESNon_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
    """openssl ESNon ARon AES-GCM-192/NONE IPSec test"""
    def test_ipsec(self):
        """openssl ESNon ARon AES-GCM-192/NONE IPSec test"""
        self.run_test()


class Test_openssl_ESNon_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
    """openssl ESNon ARon AES-GCM-256/NONE IPSec test"""
    def test_ipsec(self):
        """openssl ESNon ARon AES-GCM-256/NONE IPSec test"""
        self.run_test()


class Test_openssl_ESNon_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
    """openssl ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNon ARon AES-CBC-128/MD5-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNon_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNon_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNon_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNon ARon 3DES-CBC/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNon_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNon ARon NONE/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNon ARon NONE/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNon_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNon ARon AES-CTR-128/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNon_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNon ARon AES-CTR-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNon_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNon ARon AES-CTR-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNon_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
    """openssl ESNon ARoff AES-GCM-128/NONE IPSec test"""
    def test_ipsec(self):
        """openssl ESNon ARoff AES-GCM-128/NONE IPSec test"""
        self.run_test()


class Test_openssl_ESNon_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
    """openssl ESNon ARoff AES-GCM-192/NONE IPSec test"""
    def test_ipsec(self):
        """openssl ESNon ARoff AES-GCM-192/NONE IPSec test"""
        self.run_test()


class Test_openssl_ESNon_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
    """openssl ESNon ARoff AES-GCM-256/NONE IPSec test"""
    def test_ipsec(self):
        """openssl ESNon ARoff AES-GCM-256/NONE IPSec test"""
        self.run_test()


class Test_openssl_ESNon_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
    """openssl ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNon ARoff AES-CBC-128/MD5-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNon_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNon_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNon_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNon ARoff 3DES-CBC/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNon_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNon ARoff NONE/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNon ARoff NONE/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNon_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNon ARoff AES-CTR-128/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNon_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNon ARoff AES-CTR-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNon_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNon ARoff AES-CTR-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNoff_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
    """openssl ESNoff ARon AES-GCM-128/NONE IPSec test"""
    def test_ipsec(self):
        """openssl ESNoff ARon AES-GCM-128/NONE IPSec test"""
        self.run_test()


class Test_openssl_ESNoff_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
    """openssl ESNoff ARon AES-GCM-192/NONE IPSec test"""
    def test_ipsec(self):
        """openssl ESNoff ARon AES-GCM-192/NONE IPSec test"""
        self.run_test()


class Test_openssl_ESNoff_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
    """openssl ESNoff ARon AES-GCM-256/NONE IPSec test"""
    def test_ipsec(self):
        """openssl ESNoff ARon AES-GCM-256/NONE IPSec test"""
        self.run_test()


class Test_openssl_ESNoff_ARon_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
    """openssl ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNoff ARon AES-CBC-128/MD5-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNoff_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNoff_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNoff_ARon_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNoff ARon 3DES-CBC/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNoff_ARon_NONE_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNoff ARon NONE/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNoff ARon NONE/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNoff_ARon_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNoff ARon AES-CTR-128/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNoff_ARon_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNoff ARon AES-CTR-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNoff_ARon_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNoff ARon AES-CTR-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNoff_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
    """openssl ESNoff ARoff AES-GCM-128/NONE IPSec test"""
    def test_ipsec(self):
        """openssl ESNoff ARoff AES-GCM-128/NONE IPSec test"""
        self.run_test()


class Test_openssl_ESNoff_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
    """openssl ESNoff ARoff AES-GCM-192/NONE IPSec test"""
    def test_ipsec(self):
        """openssl ESNoff ARoff AES-GCM-192/NONE IPSec test"""
        self.run_test()


class Test_openssl_ESNoff_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
    """openssl ESNoff ARoff AES-GCM-256/NONE IPSec test"""
    def test_ipsec(self):
        """openssl ESNoff ARoff AES-GCM-256/NONE IPSec test"""
        self.run_test()


class Test_openssl_ESNoff_ARoff_AES_CBC_128_MD5_96(RunTestIpsecEspAll):
    """openssl ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNoff ARoff AES-CBC-128/MD5-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNoff_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNoff_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNoff_ARoff_3DES_CBC_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNoff ARoff 3DES-CBC/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNoff_ARoff_NONE_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNoff ARoff NONE/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNoff ARoff NONE/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNoff_ARoff_AES_CTR_128_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNoff ARoff AES-CTR-128/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNoff_ARoff_AES_CTR_192_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNoff ARoff AES-CTR-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_openssl_ESNoff_ARoff_AES_CTR_256_SHA1_96(RunTestIpsecEspAll):
    """openssl ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """openssl ESNoff ARoff AES-CTR-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_async_ESNon_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
    """async ESNon ARon AES-GCM-128/NONE IPSec test"""
    def test_ipsec(self):
        """async ESNon ARon AES-GCM-128/NONE IPSec test"""
        self.run_test()


class Test_async_ESNon_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
    """async ESNon ARon AES-GCM-192/NONE IPSec test"""
    def test_ipsec(self):
        """async ESNon ARon AES-GCM-192/NONE IPSec test"""
        self.run_test()


class Test_async_ESNon_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
    """async ESNon ARon AES-GCM-256/NONE IPSec test"""
    def test_ipsec(self):
        """async ESNon ARon AES-GCM-256/NONE IPSec test"""
        self.run_test()


class Test_async_ESNon_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
    """async ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """async ESNon ARon AES-CBC-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_async_ESNon_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
    """async ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """async ESNon ARon AES-CBC-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_async_ESNon_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
    """async ESNon ARoff AES-GCM-128/NONE IPSec test"""
    def test_ipsec(self):
        """async ESNon ARoff AES-GCM-128/NONE IPSec test"""
        self.run_test()


class Test_async_ESNon_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
    """async ESNon ARoff AES-GCM-192/NONE IPSec test"""
    def test_ipsec(self):
        """async ESNon ARoff AES-GCM-192/NONE IPSec test"""
        self.run_test()


class Test_async_ESNon_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
    """async ESNon ARoff AES-GCM-256/NONE IPSec test"""
    def test_ipsec(self):
        """async ESNon ARoff AES-GCM-256/NONE IPSec test"""
        self.run_test()


class Test_async_ESNon_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
    """async ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """async ESNon ARoff AES-CBC-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_async_ESNon_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
    """async ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """async ESNon ARoff AES-CBC-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_async_ESNoff_ARon_AES_GCM_128_NONE(RunTestIpsecEspAll):
    """async ESNoff ARon AES-GCM-128/NONE IPSec test"""
    def test_ipsec(self):
        """async ESNoff ARon AES-GCM-128/NONE IPSec test"""
        self.run_test()


class Test_async_ESNoff_ARon_AES_GCM_192_NONE(RunTestIpsecEspAll):
    """async ESNoff ARon AES-GCM-192/NONE IPSec test"""
    def test_ipsec(self):
        """async ESNoff ARon AES-GCM-192/NONE IPSec test"""
        self.run_test()


class Test_async_ESNoff_ARon_AES_GCM_256_NONE(RunTestIpsecEspAll):
    """async ESNoff ARon AES-GCM-256/NONE IPSec test"""
    def test_ipsec(self):
        """async ESNoff ARon AES-GCM-256/NONE IPSec test"""
        self.run_test()


class Test_async_ESNoff_ARon_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
    """async ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """async ESNoff ARon AES-CBC-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_async_ESNoff_ARon_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
    """async ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """async ESNoff ARon AES-CBC-256/SHA1-96 IPSec test"""
        self.run_test()


class Test_async_ESNoff_ARoff_AES_GCM_128_NONE(RunTestIpsecEspAll):
    """async ESNoff ARoff AES-GCM-128/NONE IPSec test"""
    def test_ipsec(self):
        """async ESNoff ARoff AES-GCM-128/NONE IPSec test"""
        self.run_test()


class Test_async_ESNoff_ARoff_AES_GCM_192_NONE(RunTestIpsecEspAll):
    """async ESNoff ARoff AES-GCM-192/NONE IPSec test"""
    def test_ipsec(self):
        """async ESNoff ARoff AES-GCM-192/NONE IPSec test"""
        self.run_test()


class Test_async_ESNoff_ARoff_AES_GCM_256_NONE(RunTestIpsecEspAll):
    """async ESNoff ARoff AES-GCM-256/NONE IPSec test"""
    def test_ipsec(self):
        """async ESNoff ARoff AES-GCM-256/NONE IPSec test"""
        self.run_test()


class Test_async_ESNoff_ARoff_AES_CBC_192_SHA1_96(RunTestIpsecEspAll):
    """async ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """async ESNoff ARoff AES-CBC-192/SHA1-96 IPSec test"""
        self.run_test()


class Test_async_ESNoff_ARoff_AES_CBC_256_SHA1_96(RunTestIpsecEspAll):
    """async ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
    def test_ipsec(self):
        """async ESNoff ARoff AES-CBC-256/SHA1-96 IPSec test"""
        self.run_test()