diff options
author | tb <> | 2022-05-12 10:12:18 +0000 |
---|---|---|
committer | tb <> | 2022-05-12 10:12:18 +0000 |
commit | be814b451bedb2aaf52c1e292a00ddf1334d89da (patch) | |
tree | efc04816849f396e48da6a1feeedfe4d7f9852e6 /src | |
parent | dc315965463c2c4b824e23781058a706a42066d2 (diff) | |
download | openbsd-be814b451bedb2aaf52c1e292a00ddf1334d89da.tar.gz openbsd-be814b451bedb2aaf52c1e292a00ddf1334d89da.tar.bz2 openbsd-be814b451bedb2aaf52c1e292a00ddf1334d89da.zip |
Add a few more testcases for X509v3_asid_subset()
Diffstat (limited to 'src')
-rw-r--r-- | src/regress/lib/libcrypto/x509/rfc3779/rfc3779.c | 145 |
1 files changed, 144 insertions, 1 deletions
diff --git a/src/regress/lib/libcrypto/x509/rfc3779/rfc3779.c b/src/regress/lib/libcrypto/x509/rfc3779/rfc3779.c index d9b3007ac2..c6d268bb9b 100644 --- a/src/regress/lib/libcrypto/x509/rfc3779/rfc3779.c +++ b/src/regress/lib/libcrypto/x509/rfc3779/rfc3779.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rfc3779.c,v 1.6 2022/01/07 22:46:05 tb Exp $ */ | 1 | /* $OpenBSD: rfc3779.c,v 1.7 2022/05/12 10:12:18 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2021 Theo Buehler <tb@openbsd.org> | 3 | * Copyright (c) 2021 Theo Buehler <tb@openbsd.org> |
4 | * | 4 | * |
@@ -1539,6 +1539,149 @@ const struct ASIdentifiers_subset_test ASIdentifiers_subset_data[] = { | |||
1539 | .is_subset = 1, | 1539 | .is_subset = 1, |
1540 | .is_subset_if_canonized = 1, | 1540 | .is_subset_if_canonized = 1, |
1541 | }, | 1541 | }, |
1542 | #if 0 | ||
1543 | { | ||
1544 | .description = "only asnums", | ||
1545 | .delegationsA = { | ||
1546 | { | ||
1547 | .type = V3_ASID_ASNUM, | ||
1548 | .inherit = 0, | ||
1549 | .min = "2", | ||
1550 | .max = "4", | ||
1551 | }, | ||
1552 | { | ||
1553 | .type = V3_ASID_END, | ||
1554 | }, | ||
1555 | }, | ||
1556 | .delegationsB = { | ||
1557 | { | ||
1558 | .type = V3_ASID_ASNUM, | ||
1559 | .inherit = 0, | ||
1560 | .min = "1", | ||
1561 | .max = "5", | ||
1562 | }, | ||
1563 | { | ||
1564 | .type = V3_ASID_END, | ||
1565 | }, | ||
1566 | }, | ||
1567 | .is_subset = 1, | ||
1568 | .is_subset_if_canonized = 1, | ||
1569 | }, | ||
1570 | { | ||
1571 | .description = "only rdis", | ||
1572 | .delegationsA = { | ||
1573 | { | ||
1574 | .type = V3_ASID_RDI, | ||
1575 | .inherit = 0, | ||
1576 | .min = "2", | ||
1577 | .max = NULL, | ||
1578 | }, | ||
1579 | { | ||
1580 | .type = V3_ASID_END, | ||
1581 | }, | ||
1582 | }, | ||
1583 | .delegationsB = { | ||
1584 | { | ||
1585 | .type = V3_ASID_RDI, | ||
1586 | .inherit = 0, | ||
1587 | .min = "1", | ||
1588 | .max = "5", | ||
1589 | }, | ||
1590 | { | ||
1591 | .type = V3_ASID_END, | ||
1592 | }, | ||
1593 | }, | ||
1594 | .is_subset = 1, | ||
1595 | .is_subset_if_canonized = 1, | ||
1596 | }, | ||
1597 | { | ||
1598 | .description = "child only has asnums, parent only has rdis", | ||
1599 | .delegationsA = { | ||
1600 | { | ||
1601 | .type = V3_ASID_ASNUM, | ||
1602 | .inherit = 0, | ||
1603 | .min = "2", | ||
1604 | .max = "4", | ||
1605 | }, | ||
1606 | { | ||
1607 | .type = V3_ASID_END, | ||
1608 | }, | ||
1609 | }, | ||
1610 | .delegationsB = { | ||
1611 | { | ||
1612 | .type = V3_ASID_RDI, | ||
1613 | .inherit = 0, | ||
1614 | .min = "1", | ||
1615 | .max = "5", | ||
1616 | }, | ||
1617 | { | ||
1618 | .type = V3_ASID_END, | ||
1619 | }, | ||
1620 | }, | ||
1621 | .is_subset = 0, | ||
1622 | .is_subset_if_canonized = 0, | ||
1623 | }, | ||
1624 | { | ||
1625 | .description = "child only has rdis, parent only has asnums", | ||
1626 | .delegationsA = { | ||
1627 | { | ||
1628 | .type = V3_ASID_RDI, | ||
1629 | .inherit = 0, | ||
1630 | .min = "2", | ||
1631 | .max = "4", | ||
1632 | }, | ||
1633 | { | ||
1634 | .type = V3_ASID_END, | ||
1635 | }, | ||
1636 | }, | ||
1637 | .delegationsB = { | ||
1638 | { | ||
1639 | .type = V3_ASID_ASNUM, | ||
1640 | .inherit = 0, | ||
1641 | .min = "1", | ||
1642 | .max = "5", | ||
1643 | }, | ||
1644 | { | ||
1645 | .type = V3_ASID_END, | ||
1646 | }, | ||
1647 | }, | ||
1648 | .is_subset = 0, | ||
1649 | .is_subset_if_canonized = 0, | ||
1650 | }, | ||
1651 | { | ||
1652 | .description = "child only has rdis, parent has both", | ||
1653 | .delegationsA = { | ||
1654 | { | ||
1655 | .type = V3_ASID_RDI, | ||
1656 | .inherit = 0, | ||
1657 | .min = "2", | ||
1658 | .max = "4", | ||
1659 | }, | ||
1660 | { | ||
1661 | .type = V3_ASID_END, | ||
1662 | }, | ||
1663 | }, | ||
1664 | .delegationsB = { | ||
1665 | { | ||
1666 | .type = V3_ASID_ASNUM, | ||
1667 | .inherit = 0, | ||
1668 | .min = "1", | ||
1669 | .max = "5", | ||
1670 | }, | ||
1671 | { | ||
1672 | .type = V3_ASID_RDI, | ||
1673 | .inherit = 0, | ||
1674 | .min = "1", | ||
1675 | .max = "5", | ||
1676 | }, | ||
1677 | { | ||
1678 | .type = V3_ASID_END, | ||
1679 | }, | ||
1680 | }, | ||
1681 | .is_subset = 1, | ||
1682 | .is_subset_if_canonized = 1, | ||
1683 | }, | ||
1684 | #endif | ||
1542 | { | 1685 | { |
1543 | .description = "subset relation only after canonization", | 1686 | .description = "subset relation only after canonization", |
1544 | .delegationsA = { | 1687 | .delegationsA = { |