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