]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
test: auditIdentity X.509v3 extension decoding and display
authorJonathan M. Wilbur <jonathan@wilbur.space>
Thu, 27 Jun 2024 20:30:06 +0000 (20:30 +0000)
committerMatt Caswell <matt@openssl.org>
Mon, 26 Aug 2024 09:38:44 +0000 (10:38 +0100)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24754)

test/certs/ext-auditIdentity.pem [new file with mode: 0644]
test/recipes/25-test_x509.t

diff --git a/test/certs/ext-auditIdentity.pem b/test/certs/ext-auditIdentity.pem
new file mode 100644 (file)
index 0000000..02b1282
--- /dev/null
@@ -0,0 +1,11 @@
+-----BEGIN CERTIFICATE-----
+MIIBkTCCAX2gAwIBAgIDAQIDMAsGCSqGSIb3DQEBBTAAMCIYDzIwMjEwODMxMDI0
+NDAyWhgPMjAyMTA4MzEwMjQ0MDJaMAAwggEgMAsGCSqGSIb3DQEBAQOCAQ8AMIIB
+CgKCAQEAtnjLm1ts1hC4fNNt3UnQD9y73bDXgioTyWYSI3ca/KNfuTydjFTEYAmq
+nuGrBOUfgbmH3PRQ0AmpqljgWTb3d3K8H4UFvDWQTPSS21IMjm8oqd19nE5GxWir
+Gu0oDRzhWLHe1RZ7ZrohCPg/1Ocsy47QZuK2laFB0rEmrRWBmEYbDl3/wxf5XfqI
+qpOynJB02thXrTCcTM7Rz1FqCFt/ZVZB5hKY2S+CTdE9OIVKlr4WHMfuvUYeOj06
+GkwLFJHNv2tU+tovI3mYRxUuY4UupkS3MC+Otey7XKm1P+INjWWoegm6iCAt3Vus
+pVz+6pU2xgl3nrAVMQHB4fReQPH0pQIDAQABoxgwFjAUBggrBgEFBQcBBAEB/wQF
+BAMJCAcwCwYJKoZIhvcNAQEFAwEA
+-----END CERTIFICATE-----
index 7dc8c241eba533c628993da65bb85e41a28a678b..e3873ebc851ff03cc8fb56f58e8f220434a76023 100644 (file)
@@ -16,7 +16,7 @@ use OpenSSL::Test qw/:DEFAULT srctop_file/;
 
 setup("test_x509");
 
-plan tests => 95;
+plan tests => 96;
 
 # Prevent MSys2 filename munging for arguments that look like file paths but
 # aren't
@@ -294,6 +294,11 @@ cert_contains($battcons_cert,
               "pathlen:3",
               1, 'X.509 Basic Attribute Constraints Path Length');
 
+my $audit_id_cert = srctop_file(@certs, "ext-auditIdentity.pem");
+cert_contains($audit_id_cert,
+              "09:08:07",
+              1, 'X509v3 Audit Identity');
+
 sub test_errors { # actually tests diagnostics of OSSL_STORE
     my ($expected, $cert, @opts) = @_;
     my $infile = srctop_file(@certs, $cert);