OLD | NEW |
1 #!/bin/bash -e | 1 #!/bin/bash -e |
2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 # | 5 # |
6 | 6 |
7 # Check args first. | 7 # Check args first. |
8 if [ "$#" -lt "1" ]; then | 8 if [ "$#" -lt "1" ]; then |
9 cat <<EOF 1>&2 | 9 cat <<EOF 1>&2 |
10 | 10 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 --key "${base}_${len}.pem" \ | 68 --key "${base}_${len}.pem" \ |
69 --algorithm $alg | 69 --algorithm $alg |
70 | 70 |
71 # remove intermediate files | 71 # remove intermediate files |
72 rm -f "${base}_${len}.pem" "${base}_${len}.crt" "${base}_${len}.keyb" | 72 rm -f "${base}_${len}.pem" "${base}_${len}.crt" "${base}_${len}.keyb" |
73 } | 73 } |
74 | 74 |
75 # First create the .vbpubk and .vbprivk pair. | 75 # First create the .vbpubk and .vbprivk pair. |
76 make_pair "$1" "${2:-4}" | 76 make_pair "$1" "${2:-4}" |
77 | 77 |
78 # Now create a .vblock to hold our .vbpubk. Since it's for developer use, it | 78 # Now create a .keyblock to hold our .vbpubk. Since it's for developer use, it |
79 # won't be signed, just checksummed. Developer kernels can only be run in | 79 # won't be signed, just checksummed. Developer kernels can only be run in |
80 # non-recovery mode with the developer switch enabled, but it won't hurt us to | 80 # non-recovery mode with the developer switch enabled, but it won't hurt us to |
81 # turn on all the flags bits anyway. | 81 # turn on all the flags bits anyway. |
82 vbutil_keyblock --pack "$1.keyblock" --datapubkey "$1.vbpubk" --flags 15 | 82 vbutil_keyblock --pack "$1.keyblock" --datapubkey "$1.vbpubk" --flags 15 |
OLD | NEW |