3 # Copyright 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
7 # This script generates a set of test (end-entity, intermediate, root)
8 # certificates that can be used to test fetching of an intermediate via AIA.
18 # Create the serial number files.
19 try
echo 1 > out
/aia-test-root-serial
20 try
echo 1 > out
/aia-test-intermediate-serial
22 # Create the signers' DB files.
23 touch out
/aia-test-root-index.txt
24 touch out
/aia-test-intermediate-index.txt
27 try openssl genrsa
-out out
/aia-test-root.key
2048
28 try openssl genrsa
-out out
/aia-test-intermediate.key
2048
29 try openssl genrsa
-out out
/aia-test-cert.key
2048
31 # Generate the root certificate
32 CA_COMMON_NAME
="AIA Test Root CA" \
34 CA_NAME
=aia-test-root \
37 -key out
/aia-test-root.key \
38 -out out
/aia-test-root.csr \
41 CA_COMMON_NAME
="AIA Test Root CA" \
43 CA_NAME
=aia-test-root \
46 -in out
/aia-test-root.csr \
47 -out out
/aia-test-root.pem \
48 -signkey out
/aia-test-root.key \
49 -extfile aia-test.cnf \
52 # Generate the intermediate
53 CA_COMMON_NAME
="AIA Test Intermediate CA" \
55 CA_NAME
=aia-test-root \
58 -key out
/aia-test-intermediate.key \
59 -out out
/aia-test-intermediate.csr \
62 CA_COMMON_NAME
="AIA Test Intermediate CA" \
64 CA_NAME
=aia-test-root \
67 -in out
/aia-test-intermediate.csr \
68 -out out
/aia-test-intermediate.pem \
69 -config aia-test.cnf \
73 CA_COMMON_NAME
="aia-host.invalid" \
75 CA_NAME
=aia-test-intermediate \
78 -key out
/aia-test-cert.key \
79 -out out
/aia-test-cert.csr \
82 CA_COMMON_NAME
="AIA Test Intermediate CA" \
84 CA_NAME
=aia-test-intermediate \
85 AIA_URL
=http
://aia-test.invalid \
88 -in out
/aia-test-cert.csr \
89 -out out
/aia-test-cert.pem \
90 -config aia-test.cnf \