OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 |
3 # Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # This script generates a (end-entity, intermediate, root) certificate, where | 7 # This script generates a (end-entity, intermediate, root) certificate, where |
8 # the root has no explicit policies associated, the intermediate has multiple | 8 # the root has no explicit policies associated, the intermediate has multiple |
9 # policies, and the leaf has a single policy. | 9 # policies, and the leaf has a single policy. |
10 # | 10 # |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 COMMON_NAME="policy_test.example" \ | 75 COMMON_NAME="policy_test.example" \ |
76 CA_DIR=out \ | 76 CA_DIR=out \ |
77 CA_NAME=policy-intermediate \ | 77 CA_NAME=policy-intermediate \ |
78 try openssl req \ | 78 try openssl req \ |
79 -new \ | 79 -new \ |
80 -key out/policy-cert.key \ | 80 -key out/policy-cert.key \ |
81 -out out/policy-cert.csr \ | 81 -out out/policy-cert.csr \ |
82 -config policy.cnf | 82 -config policy.cnf |
83 | 83 |
84 COMMON_NAME="Policy Test Intermediate CA" \ | 84 COMMON_NAME="Policy Test Intermediate CA" \ |
| 85 SAN="policy_test.example" \ |
85 CA_DIR=out \ | 86 CA_DIR=out \ |
86 CA_NAME=policy-intermediate \ | 87 CA_NAME=policy-intermediate \ |
87 try openssl ca \ | 88 try openssl ca \ |
88 -batch \ | 89 -batch \ |
89 -in out/policy-cert.csr \ | 90 -in out/policy-cert.csr \ |
90 -out out/policy-cert.pem \ | 91 -out out/policy-cert.pem \ |
91 -config policy.cnf \ | 92 -config policy.cnf \ |
92 -extensions user_cert | 93 -extensions user_cert |
93 | 94 |
94 try /bin/sh -c "cat out/policy-cert.pem \ | 95 try /bin/sh -c "cat out/policy-cert.pem \ |
95 out/policy-intermediate.pem \ | 96 out/policy-intermediate.pem \ |
96 out/policy-root.pem >../certificates/explicit-policy-chain.pem" | 97 out/policy-root.pem >../certificates/explicit-policy-chain.pem" |
OLD | NEW |