From: tb Date: Thu, 12 May 2022 10:12:18 +0000 (+0000) Subject: Add a few more testcases for X509v3_asid_subset() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1a2187c2cdf812f68af45c99957884e8514d1ec1;p=openbsd Add a few more testcases for X509v3_asid_subset() --- 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 * @@ -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 = {