mirror of
https://github.com/openssl/openssl.git
synced 2025-03-07 19:38:33 +08:00
test: the attributeMappings X.509v3 extension
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Neil Horman <nhorman@openssl.org> (Merged from https://github.com/openssl/openssl/pull/26157)
This commit is contained in:
parent
93b5275f6b
commit
1e307e65ba
12
test/certs/ext-attributeMappings.pem
Normal file
12
test/certs/ext-attributeMappings.pem
Normal file
@ -0,0 +1,12 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIB1TCCAb+gAwIBAgIEDCI4TjANBgkqhkiG9w0BAQUFADARMQ8wDQYDVQQDDAZI
|
||||
aSBtb20wIhgPMjAyMjEyMTIxOTM3MDhaGA8yMDIyMTIxMjE5MzcwOFowETEPMA0G
|
||||
A1UEAwwGSGkgbW9tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtnjL
|
||||
m1ts1hC4fNNt3UnQD9y73bDXgioTyWYSI3ca/KNfuTydjFTEYAmqnuGrBOUfgbmH
|
||||
3PRQ0AmpqljgWTb3d3K8H4UFvDWQTPSS21IMjm8oqd19nE5GxWirGu0oDRzhWLHe
|
||||
1RZ7ZrohCPg/1Ocsy47QZuK2laFB0rEmrRWBmEYbDl3/wxf5XfqIqpOynJB02thX
|
||||
rTCcTM7Rz1FqCFt/ZVZB5hKY2S+CTdE9OIVKlr4WHMfuvUYeOj06GkwLFJHNv2tU
|
||||
+tovI3mYRxUuY4UupkS3MC+Otey7XKm1P+INjWWoegm6iCAt3VuspVz+6pU2xgl3
|
||||
nrAVMQHB4fReQPH0pQIDAQABozMwMTAvBgNVHUQEKDEmoAqAA1UEA4EDVQQHoRig
|
||||
CwYDVQQDDARhc2RmoQkGA1UEBwICAz4wDQYJKoZIhvcNAQEFBQADAQA=
|
||||
-----END CERTIFICATE-----
|
@ -16,7 +16,7 @@ use OpenSSL::Test qw/:DEFAULT srctop_file/;
|
||||
|
||||
setup("test_x509");
|
||||
|
||||
plan tests => 122;
|
||||
plan tests => 124;
|
||||
|
||||
# Prevent MSys2 filename munging for arguments that look like file paths but
|
||||
# aren't
|
||||
@ -391,6 +391,16 @@ cert_contains($time_spec_per_cert,
|
||||
"Years: 2023, 2024",
|
||||
1, 'X.509 Time Specification (Periodic)');
|
||||
|
||||
my $attr_map_cert = srctop_file(@certs, "ext-attributeMappings.pem");
|
||||
cert_contains($attr_map_cert,
|
||||
"commonName == localityName",
|
||||
1, 'X.509 Attribute Mappings');
|
||||
# localityName has an INTEGER value here, which was intentional to test the
|
||||
# display of non-string values.
|
||||
cert_contains($attr_map_cert,
|
||||
"commonName:asdf == localityName:03:3E",
|
||||
1, 'X.509 Attribute Mappings');
|
||||
|
||||
sub test_errors { # actually tests diagnostics of OSSL_STORE
|
||||
my ($expected, $cert, @opts) = @_;
|
||||
my $infile = srctop_file(@certs, $cert);
|
||||
|
Loading…
Reference in New Issue
Block a user