]>
git.ipfire.org Git - thirdparty/openssl.git/blob - test/recipes/25-test_verify_store.t
2 # Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved.
4 # Licensed under the Apache License 2.0 (the "License"). You may not use
5 # this file except in compliance with the License. You can obtain a copy
6 # in the file LICENSE in the source distribution or at
7 # https://www.openssl.org/source/license.html
12 use OpenSSL
::Test qw
/:DEFAULT with bldtop_file srctop_file cmdstr/;
13 use OpenSSL
::Test
::Utils
;
15 setup
("test_verify_store");
19 my $dummycnf = srctop_file
("apps", "openssl.cnf");
20 my $cakey = srctop_file
("test", "certs", "ca-key.pem");
21 my $ukey = srctop_file
("test", "certs", "ee-key.pem");
23 my $cnf = srctop_file
("test", "ca-and-certs.cnf");
24 my $CAkey = "keyCA.ss";
25 my $CAcert="certCA.ss";
26 my $CAserial="certCA.srl";
28 my $CAreq2="req2CA.ss"; # temp
34 req
( 'make cert request',
35 qw(-new -section userreq),
41 skip
'failure', 8 unless
42 x509
( 'convert request into self-signed cert',
43 qw(-req -CAcreateserial -days 30),
44 qw(-extensions v3_ca),
50 skip
'failure', 7 unless
51 x509
( 'convert cert into a cert request',
57 skip
'failure', 6 unless
58 req
( 'verify request 1',
59 qw(-verify -noout -section userreq),
63 skip
'failure', 5 unless
64 req
( 'verify request 2',
65 qw(-verify -noout -section userreq),
69 skip
'failure', 4 unless
70 verify
( 'verify signature',
74 skip
'failure', 3 unless
75 req
( 'make a user cert request',
76 qw(-new -section userreq),
82 skip
'failure', 2 unless
83 x509
( 'sign user cert request',
84 qw(-req -CAcreateserial -days 30 -extensions v3_ee),
89 -CAserial
=> $CAserial,
95 skip
'failure', 0 unless
96 x509
( 'Certificate details',
97 qw(-subject -issuer -startdate -enddate -noout),
104 ok
(run
(app
([qw(openssl verify), @_])), $title);
110 ok
(run
(app
([qw(openssl req), @_])), $title);
116 ok
(run
(app
([qw(openssl x509), @_])), $title);