summaryrefslogtreecommitdiff
path: root/regress/lib
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2022-05-12 10:12:19 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2022-05-12 10:12:19 +0000
commitf4944cd94a78d7e9231692adf3d9e04a7a54c05e (patch)
treea074be5196c043e464edaf3129afed4074f537e7 /regress/lib
parent4dee98a0151e8d261304f17fa9d5d14288dd9cb2 (diff)
Add a few more testcases for X509v3_asid_subset()
Diffstat (limited to 'regress/lib')
-rw-r--r--regress/lib/libcrypto/x509/rfc3779/rfc3779.c145
1 files changed, 144 insertions, 1 deletions
diff --git a/regress/lib/libcrypto/x509/rfc3779/rfc3779.c b/regress/lib/libcrypto/x509/rfc3779/rfc3779.c
index d9b3007ac27..c6d268bb9b3 100644
--- a/regress/lib/libcrypto/x509/rfc3779/rfc3779.c
+++ b/regress/lib/libcrypto/x509/rfc3779/rfc3779.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rfc3779.c,v 1.6 2022/01/07 22:46:05 tb Exp $ */
+/* $OpenBSD: rfc3779.c,v 1.7 2022/05/12 10:12:18 tb Exp $ */
/*
* Copyright (c) 2021 Theo Buehler <tb@openbsd.org>
*
@@ -1539,6 +1539,149 @@ const struct ASIdentifiers_subset_test ASIdentifiers_subset_data[] = {
.is_subset = 1,
.is_subset_if_canonized = 1,
},
+#if 0
+ {
+ .description = "only asnums",
+ .delegationsA = {
+ {
+ .type = V3_ASID_ASNUM,
+ .inherit = 0,
+ .min = "2",
+ .max = "4",
+ },
+ {
+ .type = V3_ASID_END,
+ },
+ },
+ .delegationsB = {
+ {
+ .type = V3_ASID_ASNUM,
+ .inherit = 0,
+ .min = "1",
+ .max = "5",
+ },
+ {
+ .type = V3_ASID_END,
+ },
+ },
+ .is_subset = 1,
+ .is_subset_if_canonized = 1,
+ },
+ {
+ .description = "only rdis",
+ .delegationsA = {
+ {
+ .type = V3_ASID_RDI,
+ .inherit = 0,
+ .min = "2",
+ .max = NULL,
+ },
+ {
+ .type = V3_ASID_END,
+ },
+ },
+ .delegationsB = {
+ {
+ .type = V3_ASID_RDI,
+ .inherit = 0,
+ .min = "1",
+ .max = "5",
+ },
+ {
+ .type = V3_ASID_END,
+ },
+ },
+ .is_subset = 1,
+ .is_subset_if_canonized = 1,
+ },
+ {
+ .description = "child only has asnums, parent only has rdis",
+ .delegationsA = {
+ {
+ .type = V3_ASID_ASNUM,
+ .inherit = 0,
+ .min = "2",
+ .max = "4",
+ },
+ {
+ .type = V3_ASID_END,
+ },
+ },
+ .delegationsB = {
+ {
+ .type = V3_ASID_RDI,
+ .inherit = 0,
+ .min = "1",
+ .max = "5",
+ },
+ {
+ .type = V3_ASID_END,
+ },
+ },
+ .is_subset = 0,
+ .is_subset_if_canonized = 0,
+ },
+ {
+ .description = "child only has rdis, parent only has asnums",
+ .delegationsA = {
+ {
+ .type = V3_ASID_RDI,
+ .inherit = 0,
+ .min = "2",
+ .max = "4",
+ },
+ {
+ .type = V3_ASID_END,
+ },
+ },
+ .delegationsB = {
+ {
+ .type = V3_ASID_ASNUM,
+ .inherit = 0,
+ .min = "1",
+ .max = "5",
+ },
+ {
+ .type = V3_ASID_END,
+ },
+ },
+ .is_subset = 0,
+ .is_subset_if_canonized = 0,
+ },
+ {
+ .description = "child only has rdis, parent has both",
+ .delegationsA = {
+ {
+ .type = V3_ASID_RDI,
+ .inherit = 0,
+ .min = "2",
+ .max = "4",
+ },
+ {
+ .type = V3_ASID_END,
+ },
+ },
+ .delegationsB = {
+ {
+ .type = V3_ASID_ASNUM,
+ .inherit = 0,
+ .min = "1",
+ .max = "5",
+ },
+ {
+ .type = V3_ASID_RDI,
+ .inherit = 0,
+ .min = "1",
+ .max = "5",
+ },
+ {
+ .type = V3_ASID_END,
+ },
+ },
+ .is_subset = 1,
+ .is_subset_if_canonized = 1,
+ },
+#endif
{
.description = "subset relation only after canonization",
.delegationsA = {