• Home
  • Raw
  • Download

Lines Matching +full:existing +full:- +full:versions +full:- +full:check

3 # Use of this source code is governed by a BSD-style license that can be
44 EC_KEYBLOCK_MODE=7 # Only allow RW EC firmware in non-recovery.
45 FIRMWARE_KEYBLOCK_MODE=7 # Only allow RW firmware in non-recovery.
48 KERNEL_KEYBLOCK_MODE=7 # Only allow in non-recovery.
55 # you feel the need to change this file, check the history of that other file
60 local key_version=${3:-1}
66 openssl genrsa -F4 -out "${base}_${len}.pem" $len
67 # create a self-signed certificate
68 openssl req -batch -new -x509 -key "${base}_${len}.pem" \
69 -out "${base}_${len}.crt"
70 # generate pre-processed RSA public key
71 dumpRSAPublicKey -cert "${base}_${len}.crt" > "${base}_${len}.keyb"
75 --pack "${base}.vbpubk" \
76 --key "${base}_${len}.keyb" \
77 --version "${key_version}" \
78 --algorithm $alg
82 --pack "${base}.vbprivk" \
83 --key "${base}_${len}.pem" \
84 --algorithm $alg
87 rm -f "${base}_${len}.pem" "${base}_${len}.crt" "${base}_${len}.keyb"
107 --pack "${base}.keyblock" \
108 --flags $flags \
109 --datapubkey "${pubkey}.vbpubk" \
110 --signprivate "${signkey}.vbprivk"
114 --unpack "${base}.keyblock" \
115 --signpubkey "${signkey}.vbpubk"
118 # File to read current versions from.
119 VERSION_FILE="key.versions"
123 awk -F= '/^'$1'\>/ { print $NF }' "${2:-${VERSION_FILE}}"
126 # Loads the current versions prints them to stdout and sets the global version
131 if [[ ! -f ${VERSION_FILE} ]]; then
149 # Make backups of existing kernel subkeys and keyblocks that will be revved.
154 if [[ ! -e kernel.keyblock ]]; then
157 mv --no-clobber kernel.{keyblock,"v$2.v$1.keyblock"}
160 # Make backups of existing kernel subkeys and keyblocks that will be revved.
168 # --no-clobber to prevent accidentally overwriting existing
170 mv --no-clobber kernel_subkey.{vbprivk,"v${subkey_ver}.vbprivk"}
171 mv --no-clobber kernel_subkey.{vbpubk,"v${subkey_ver}.vbpubk"}
175 # Make backups of existing kernel data keys and keyblocks that will be revved.
183 # --no-clobber to prevent accidentally overwriting existing
185 mv --no-clobber kernel_data_key.{vbprivk,"v${datakey_ver}.vbprivk"}
186 mv --no-clobber kernel_data_key.{vbpubk,"v${datakey_ver}.vbpubk"}
190 # Make backups of existing firmware keys and keyblocks that will be revved.
198 mv --no-clobber firmware_data_key.{vbprivk,"v${subkey_ver}.vbprivk"}
199 mv --no-clobber firmware_data_key.{vbpubk,"v${subkey_ver}.vbpubk"}
200 mv --no-clobber firmware.{keyblock,"v${datakey_ver}.v${subkey_ver}.keyblock"}
204 # Write new key version file with the updated key versions.
231 if [[ ${new_version} -gt 0xffff ]]; then