2 # Copyright 2019-2020 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");
21 my $cnf = srctop_file("test", "ca-and-certs.cnf");
22 my $CAkey = "keyCA.ss";
23 my $CAcert="certCA.ss";
24 my $CAserial="certCA.srl";
26 my $CAreq2="req2CA.ss"; # temp
32 req( 'make cert request',
33 qw(-new -section userreq),
38 skip 'failure', 8 unless
39 x509( 'convert request into self-signed cert',
40 qw(-req -CAcreateserial -days 30),
41 qw(-extensions v3_ca),
47 skip 'failure', 7 unless
48 x509( 'convert cert into a cert request',
54 skip 'failure', 6 unless
55 req( 'verify request 1',
56 qw(-verify -noout -section userreq),
60 skip 'failure', 5 unless
61 req( 'verify request 2',
62 qw(-verify -noout -section userreq),
66 skip 'failure', 4 unless
67 verify( 'verify signature',
71 skip 'failure', 3 unless
72 req( 'make a user cert request',
73 qw(-new -section userreq),
78 skip 'failure', 2 unless
79 x509( 'sign user cert request',
80 qw(-req -CAcreateserial -days 30 -extensions v3_ee),
85 -CAserial => $CAserial,
91 skip 'failure', 0 unless
92 x509( 'Certificate details',
93 qw(-subject -issuer -startdate -enddate -noout),
100 ok(run(app([qw(openssl verify), @_])), $title);
106 ok(run(app([qw(openssl req), @_])), $title);
112 ok(run(app([qw(openssl x509), @_])), $title);