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 set of test (end-entity, intermediate, root) | 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. | 8 # certificates that can be used to test fetching of an intermediate via AIA. |
9 | 9 |
10 try() { | 10 try() { |
11 "$@" || (e=$?; echo "$@" > /dev/stderr; exit $e) | 11 echo "$@" |
| 12 "$@" || exit 1 |
12 } | 13 } |
13 | 14 |
14 try rm -rf out | 15 try rm -rf out |
15 try mkdir out | 16 try mkdir out |
16 | 17 |
17 # Create the serial number files. | 18 # Create the serial number files. |
18 try /bin/sh -c "echo 01 > out/aia-test-root-serial" | 19 try /bin/sh -c "echo 01 > out/aia-test-root-serial" |
19 try /bin/sh -c "echo 01 > out/aia-test-intermediate-serial" | 20 try /bin/sh -c "echo 01 > out/aia-test-intermediate-serial" |
20 | 21 |
21 # Create the signers' DB files. | 22 # Create the signers' DB files. |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 -config aia-test.cnf \ | 91 -config aia-test.cnf \ |
91 -extensions user_cert | 92 -extensions user_cert |
92 | 93 |
93 # Copy to the file names that are actually checked in. | 94 # Copy to the file names that are actually checked in. |
94 try cp out/aia-test-cert.pem ../certificates/aia-cert.pem | 95 try cp out/aia-test-cert.pem ../certificates/aia-cert.pem |
95 try openssl x509 \ | 96 try openssl x509 \ |
96 -outform der \ | 97 -outform der \ |
97 -in out/aia-test-intermediate.pem \ | 98 -in out/aia-test-intermediate.pem \ |
98 -out ../certificates/aia-intermediate.der | 99 -out ../certificates/aia-intermediate.der |
99 try cp out/aia-test-root.pem ../certificates/aia-root.pem | 100 try cp out/aia-test-root.pem ../certificates/aia-root.pem |
OLD | NEW |