Lines Matching +full:ca +full:- +full:certificates
4 # Use of this source code is governed by a BSD-style license that can be
7 # This script generates two chains of test certificates:
8 # 1. A1 (end-entity) -> B (self-signed root)
9 # 2. A2 (end-entity) -> B (self-signed root)
15 # nicknames for both certificates.
22 try rm -rf out
26 try /bin/sh -c "echo 01 > out/B-serial"
27 try touch out/B-index.txt
30 try openssl genrsa -out out/A.key 2048
31 try openssl genrsa -out out/B.key 2048
34 CA_COMMON_NAME="B Root CA" \
37 -new \
38 -key out/B.key \
39 -out out/B.csr \
40 -config redundant-ca.cnf
43 CA_COMMON_NAME="B Root CA" \
45 -req -days 3650 \
46 -in out/B.csr \
47 -extfile redundant-ca.cnf \
48 -extensions ca_cert \
49 -signkey out/B.key \
50 -out out/B.pem
52 echo Generate the A1 end-entity CSR.
55 -new \
56 -key out/A.key \
57 -out out/A1.csr \
58 -config ee.cnf
60 echo Generate the A2 end-entity CSR
63 -new \
64 -key out/A.key \
65 -out out/A2.csr \
66 -config ee.cnf
70 CA_COMMON_NAME="B CA" \
72 try openssl ca \
73 -batch \
74 -extensions user_cert \
75 -in out/A1.csr \
76 -out out/A1.pem \
77 -config redundant-ca.cnf
80 CA_COMMON_NAME="B CA" \
82 try openssl ca \
83 -batch \
84 -extensions user_cert \
85 -in out/A2.csr \
86 -out out/A2.pem \
87 -config redundant-ca.cnf
89 echo Exporting the certificates to PKCS#12
91 -export \
92 -inkey out/A.key \
93 -in out/A1.pem \
94 -out ../certificates/duplicate_cn_1.p12 \
95 -passout pass:chrome
98 -export \
99 -inkey out/A.key \
100 -in out/A2.pem \
101 -out ../certificates/duplicate_cn_2.p12 \
102 -passout pass:chrome
104 try cp out/A1.pem ../certificates/duplicate_cn_1.pem
105 try cp out/A2.pem ../certificates/duplicate_cn_2.pem