| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 | 2 |
| 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 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 certificates for the unittests in | 7 # This script generates certificates for the unittests in |
| 8 # net/base/client_cert_store_unittest.cc. The output files are versioned in | 8 # net/base/client_cert_store_unittest.cc. The output files are versioned in |
| 9 # net/data/ssl/certificates (client_1.pem, client_2.pem). | 9 # net/data/ssl/certificates (client_1.pem, client_2.pem). |
| 10 | 10 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 ID=$id \ | 62 ID=$id \ |
| 63 DISTINGUISHED_NAME=client_dn \ | 63 DISTINGUISHED_NAME=client_dn \ |
| 64 try openssl ca \ | 64 try openssl ca \ |
| 65 -batch \ | 65 -batch \ |
| 66 -in out/client_$id.csr \ | 66 -in out/client_$id.csr \ |
| 67 -cert out/root_$id.pem \ | 67 -cert out/root_$id.pem \ |
| 68 -keyfile out/root_$id.key \ | 68 -keyfile out/root_$id.key \ |
| 69 -out out/client_$id.pem \ | 69 -out out/client_$id.pem \ |
| 70 -config client_authentication.cnf | 70 -config client_authentication.cnf |
| 71 |
| 72 # Package the client cert and private key into a pkcs12 file. |
| 73 try openssl pkcs12 \ |
| 74 -inkey out/client_$id.key \ |
| 75 -in out/client_$id.pem \ |
| 76 -out out/client_$id.p12 \ |
| 77 -export \ |
| 78 -passout pass: |
| 71 done | 79 done |
| OLD | NEW |