summaryrefslogtreecommitdiffstats
path: root/test/recipes
diff options
context:
space:
mode:
authorJonathan M. Wilbur <jonathan@wilbur.space>2024-06-17 21:40:30 +0000
committerTomas Mraz <tomas@openssl.org>2024-06-20 19:59:22 +0200
commita7ed61ce8b0565483e6b0e44ed9b13682305e609 (patch)
treeed0fe3b06c5533dc96e85c85b1069b5854907325 /test/recipes
parent2e9cd409c0411e890cabf3827770ac3d4a235b82 (diff)
feat: add delegatedNameConstraints and holderNameConstraints exts
Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/24664)
Diffstat (limited to 'test/recipes')
-rw-r--r--test/recipes/25-test_x509.t24
1 files changed, 23 insertions, 1 deletions
diff --git a/test/recipes/25-test_x509.t b/test/recipes/25-test_x509.t
index 2ae13df615..860a970805 100644
--- a/test/recipes/25-test_x509.t
+++ b/test/recipes/25-test_x509.t
@@ -16,7 +16,7 @@ use OpenSSL::Test qw/:DEFAULT srctop_file/;
setup("test_x509");
-plan tests => 60;
+plan tests => 66;
# Prevent MSys2 filename munging for arguments that look like file paths but
# aren't
@@ -172,6 +172,28 @@ cert_contains($tgt_info_cert,
"Digest Type: Public Key",
1, 'X.509 Targeting Information Object Digest Type');
+my $hnc_cert = srctop_file(@certs, "ext-holderNameConstraints.pem");
+cert_contains($hnc_cert,
+ "X509v3 Holder Name Constraints",
+ 1, 'X.509 Holder Name Constraints');
+cert_contains($hnc_cert,
+ "Permitted:",
+ 1, 'X.509 Holder Name Constraints Permitted');
+cert_contains($hnc_cert,
+ "DirName:CN = Wildboar",
+ 1, 'X.509 Holder Name Constraint');
+
+my $dnc_cert = srctop_file(@certs, "ext-delegatedNameConstraints.pem");
+cert_contains($dnc_cert,
+ "X509v3 Delegated Name Constraints",
+ 1, 'X.509 Delegated Name Constraints');
+cert_contains($dnc_cert,
+ "Permitted:",
+ 1, 'X.509 Delegated Name Constraints Permitted');
+cert_contains($dnc_cert,
+ "DirName:CN = Wildboar",
+ 1, 'X.509 Delegated Name Constraint');
+
sub test_errors { # actually tests diagnostics of OSSL_STORE
my ($expected, $cert, @opts) = @_;
my $infile = srctop_file(@certs, $cert);