]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
test: authorityAttributeIdentifier X.509v3 extension
authorJonathan M. Wilbur <jonathan@wilbur.space>
Wed, 21 Aug 2024 02:25:03 +0000 (02:25 +0000)
committerTomas Mraz <tomas@openssl.org>
Tue, 10 Sep 2024 17:17:34 +0000 (19:17 +0200)
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25244)

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

diff --git a/test/certs/ext-authorityAttributeIdentifier.pem b/test/certs/ext-authorityAttributeIdentifier.pem
new file mode 100644 (file)
index 0000000..38aecb6
--- /dev/null
@@ -0,0 +1,12 @@
+-----BEGIN CERTIFICATE-----
+MIIBtDCCAaCgAwIBAgIDAQIDMAsGCSqGSIb3DQEBBTAAMCIYDzIwMjEwODMxMDIy
+NDM1WhgPMjAyMTA4MzEwMjI0MzVaMAAwggEgMAsGCSqGSIb3DQEBAQOCAQ8AMIIB
+CgKCAQEAtnjLm1ts1hC4fNNt3UnQD9y73bDXgioTyWYSI3ca/KNfuTydjFTEYAmq
+nuGrBOUfgbmH3PRQ0AmpqljgWTb3d3K8H4UFvDWQTPSS21IMjm8oqd19nE5GxWir
+Gu0oDRzhWLHe1RZ7ZrohCPg/1Ocsy47QZuK2laFB0rEmrRWBmEYbDl3/wxf5XfqI
+qpOynJB02thXrTCcTM7Rz1FqCFt/ZVZB5hKY2S+CTdE9OIVKlr4WHMfuvUYeOj06
+GkwLFJHNv2tU+tovI3mYRxUuY4UupkS3MC+Otey7XKm1P+INjWWoegm6iCAt3Vus
+pVz+6pU2xgl3nrAVMQHB4fReQPH0pQIDAQABozswOTA3BgNVHSYEMDAuMCwwIKQe
+MBwxGjAYBgNVBAMMEVdpbGRib2FyIFNvZnR3YXJlAgQBAwUHAwIBsjALBgkqhkiG
+9w0BAQUDAQA=
+-----END CERTIFICATE-----
index 5f68d159436ebe8d1df33443e18fe18fcc74ec53..feb28fd080cf7a0969a7b0211257baacb71e6c5c 100644 (file)
@@ -16,7 +16,7 @@ use OpenSSL::Test qw/:DEFAULT srctop_file/;
 
 setup("test_x509");
 
-plan tests => 97;
+plan tests => 100;
 
 # Prevent MSys2 filename munging for arguments that look like file paths but
 # aren't
@@ -304,6 +304,17 @@ cert_contains($iobo_cert,
               "DirName:CN = Wildboar",
               1, 'X.509 Issued On Behalf Of');
 
+my $auth_att_id_cert = srctop_file(@certs, "ext-authorityAttributeIdentifier.pem");
+cert_contains($auth_att_id_cert,
+              "DirName:CN = Wildboar",
+              1, 'X.509 Authority Attribute Identifier');
+cert_contains($auth_att_id_cert,
+              "Issuer Serial: 01030507",
+              1, 'X.509 Authority Attribute Identifier');
+cert_contains($auth_att_id_cert,
+              "Issuer UID: B2",
+              1, 'X.509 Authority Attribute Identifier');
+
 sub test_errors { # actually tests diagnostics of OSSL_STORE
     my ($expected, $cert, @opts) = @_;
     my $infile = srctop_file(@certs, $cert);