diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-12-19 19:49:25 +0100 |
---|---|---|
committer | Dr. David von Oheimb <dev@ddvo.net> | 2021-01-13 11:53:15 +0100 |
commit | f0a057dd5343ca81849dd140ee9c302cda914f41 (patch) | |
tree | 9e10d58fcabc35e790608c8c0432af7575c0c8bc /test/recipes/25-test_x509.t | |
parent | 6ad957f1273e9918c22b27d0f1b1812360964a4e (diff) | |
download | openssl-f0a057dd5343ca81849dd140ee9c302cda914f41.tar.gz |
Add tests for (non-)default SKID and AKID inclusion by apps/{req,x509,ca}.c
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13658)
Diffstat (limited to 'test/recipes/25-test_x509.t')
-rw-r--r-- | test/recipes/25-test_x509.t | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/test/recipes/25-test_x509.t b/test/recipes/25-test_x509.t index 19ff335f82..e9550f1fe4 100644 --- a/test/recipes/25-test_x509.t +++ b/test/recipes/25-test_x509.t @@ -20,6 +20,7 @@ plan tests => 15; require_ok(srctop_file('test','recipes','tconversion.pl')); +my @certs = qw(test certs); my $pem = srctop_file("test/certs", "cyrillic.pem"); my $out_msb = "out-cyrillic.msb"; my $out_utf8 = "out-cyrillic.utf8"; @@ -88,21 +89,9 @@ subtest 'x509 -- pathlen' => sub { ok(run(test(["v3ext", srctop_file("test/certs", "pathlen.pem")]))); }; -subtest 'x500 -- subjectAltName' => sub { - my $fp = srctop_file("test/certs", "fake-gp.pem"); - my $out = "ext.out"; - ok(run(app(["openssl", "x509", "-text", "-in", $fp, "-out", $out]))); - ok(has_doctor_id($out)); - unlink $out; -}; - -sub has_doctor_id { - $_ = shift @_; - open(DATA,$_) or return 0; - $_= join('',<DATA>); - close(DATA); - return m/2.16.528.1.1003.1.3.5.5.2-1-0000006666-Z-12345678-01.015-12345678/; -} +cert_contains(srctop_file(@certs, "fake-gp.pem"), + "2.16.528.1.1003.1.3.5.5.2-1-0000006666-Z-12345678-01.015-12345678", + 1, 'x500 -- subjectAltName'); sub test_errors { # actually tests diagnostics of OSSL_STORE my ($expected, $cert, @opts) = @_; |