diff options
author | Jonathan M. Wilbur <jonathan@wilbur.space> | 2024-06-28 09:57:37 +0000 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2024-07-04 09:36:11 +0200 |
commit | 708b8559f145a1aee1ed18809ab64146de864761 (patch) | |
tree | 22188d05edd4b0f8d23f0f0b639d2b3347def03c | |
parent | 2ef6fa1cdda8dc79ee520d129a87bd3525a37a1f (diff) | |
download | openssl-708b8559f145a1aee1ed18809ab64146de864761.zip openssl-708b8559f145a1aee1ed18809ab64146de864761.tar.gz openssl-708b8559f145a1aee1ed18809ab64146de864761.tar.bz2 |
test: userNotice X.509v3 extension
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24761)
-rw-r--r-- | test/certs/ext-userNotice.pem | 13 | ||||
-rw-r--r-- | test/recipes/25-test_x509.t | 19 |
2 files changed, 31 insertions, 1 deletions
diff --git a/test/certs/ext-userNotice.pem b/test/certs/ext-userNotice.pem new file mode 100644 index 0000000..7061ded --- /dev/null +++ b/test/certs/ext-userNotice.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIIB8jCCAd6gAwIBAgIDAQIDMAsGCSqGSIb3DQEBBTAAMCIYDzIwMjEwODMwMDEw +MjAzWhgPMjAyMTA4MzAwMTAyMDNaMAAwggEgMAsGCSqGSIb3DQEBAQOCAQ8AMIIB +CgKCAQEAtnjLm1ts1hC4fNNt3UnQD9y73bDXgioTyWYSI3ca/KNfuTydjFTEYAmq +nuGrBOUfgbmH3PRQ0AmpqljgWTb3d3K8H4UFvDWQTPSS21IMjm8oqd19nE5GxWir +Gu0oDRzhWLHe1RZ7ZrohCPg/1Ocsy47QZuK2laFB0rEmrRWBmEYbDl3/wxf5XfqI +qpOynJB02thXrTCcTM7Rz1FqCFt/ZVZB5hKY2S+CTdE9OIVKlr4WHMfuvUYeOj06 +GkwLFJHNv2tU+tovI3mYRxUuY4UupkS3MC+Otey7XKm1P+INjWWoegm6iCAt3Vus +pVz+6pU2xgl3nrAVMQHB4fReQPH0pQIDAQABo3kwdzB1BgNVHTEEbjBsMDEwHAwR +V2lsZGJvYXIgU29mdHdhcmUwBwIBewICAcgaEUhleSB0aGVyZSBiaWcgYm9pMDcw +Jx4eAEoAbwBuAGEAdABoAGEAbgAgAFcAaQBsAGIAdQByMAUCAwDFSQwMSWNlIGlj +ZSBiYWJ5MAsGCSqGSIb3DQEBBQMBAA== +-----END CERTIFICATE----- diff --git a/test/recipes/25-test_x509.t b/test/recipes/25-test_x509.t index 22379ec..2501af4 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 => 88; +plan tests => 93; # Prevent MSys2 filename munging for arguments that look like file paths but # aren't @@ -269,6 +269,23 @@ cert_contains($acc_priv_pol, "organizationName", 1, 'X509v3 Acceptable Certification Policies'); +my $user_notice_cert = srctop_file(@certs, "ext-userNotice.pem"); +cert_contains($user_notice_cert, + "Organization: Wildboar Software", + 1, 'X509v3 User Notice'); +cert_contains($user_notice_cert, + "Numbers: 123, 456", + 1, 'X509v3 User Notice'); +cert_contains($user_notice_cert, + "Explicit Text: Hey there big boi", + 1, 'X509v3 User Notice'); +cert_contains($user_notice_cert, + "Number: 50505", + 1, 'X509v3 User Notice'); +cert_contains($user_notice_cert, + "Explicit Text: Ice ice baby", + 1, 'X509v3 User Notice'); + sub test_errors { # actually tests diagnostics of OSSL_STORE my ($expected, $cert, @opts) = @_; my $infile = srctop_file(@certs, $cert); |