summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/regress/lib/libcrypto/x509/rfc3779/rfc3779.c53
1 files changed, 52 insertions, 1 deletions
diff --git a/src/regress/lib/libcrypto/x509/rfc3779/rfc3779.c b/src/regress/lib/libcrypto/x509/rfc3779/rfc3779.c
index 1274df7455..cb13807c4e 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.10 2023/12/13 07:19:37 tb Exp $ */ 1/* $OpenBSD: rfc3779.c,v 1.11 2026/03/13 06:40:56 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2021 Theo Buehler <tb@openbsd.org> 3 * Copyright (c) 2021 Theo Buehler <tb@openbsd.org>
4 * 4 *
@@ -216,6 +216,24 @@ const struct IPAddressOrRange_test IPAddressOrRange_test_data[] = {
216 0x0a, 0x40, 0x0f, 0xff, 216 0x0a, 0x40, 0x0f, 0xff,
217 }, 217 },
218 }, 218 },
219 {
220 .description = "range 196.1.7.0 - 196.1.63.255",
221 .der = {
222 0x30, 0x0c,
223 /* 192.1.7.0 */
224 0x03, 0x04, 0x00, 0xc4, 0x01, 0x07,
225 /* 192.1.63.255 */
226 0x03, 0x04, 0x06, 0xc4, 0x01, 0x00,
227 },
228 .der_len = 14,
229 .afi = IANA_AFI_IPV4,
230 .min = {
231 0xc4, 0x01, 0x07, 0x00,
232 },
233 .max = {
234 0xc4, 0x01, 0x3f, 0xff,
235 },
236 },
219}; 237};
220 238
221const size_t N_IPADDRESSORRANGE_TESTS = 239const size_t N_IPADDRESSORRANGE_TESTS =
@@ -760,6 +778,39 @@ const struct build_addr_block_test_data build_addr_block_tests[] = {
760 }, 778 },
761 .afi_len = 1, 779 .afi_len = 1,
762 }, 780 },
781 {
782 .description = "range 196.1.7.0 - 196.1.63.255",
783 .addrs = {
784 {
785 .afi = IANA_AFI_IPV4,
786 .safi = safi_none,
787 .type = choice_range,
788 .addr.ipv4.range = {
789 .min = {
790 196, 1, 7, 0,
791 },
792 .max = {
793 196, 1, 63, 255,
794 },
795 },
796 },
797 {
798 .type = choice_last,
799 },
800 },
801 .der = {
802 0x30, 0x16, 0x30, 0x14, 0x04, 0x02, 0x00, 0x01,
803 0x30, 0x0e, 0x30, 0x0c, 0x03, 0x04, 0x00, 0xc4,
804 0x01, 0x07, 0x03, 0x04, 0x06, 0xc4, 0x01, 0x00,
805 },
806 .der_len = 24,
807 .is_canonical = 1,
808 .inherits = 0,
809 .afis = {
810 IANA_AFI_IPV4,
811 },
812 .afi_len = 1,
813 },
763}; 814};
764 815
765const size_t N_BUILD_ADDR_BLOCK_TESTS = 816const size_t N_BUILD_ADDR_BLOCK_TESTS =