summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/keygeneration/common.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/keygeneration/common.sh b/scripts/keygeneration/common.sh
index 7482dfcd..21d5334e 100644
--- a/scripts/keygeneration/common.sh
+++ b/scripts/keygeneration/common.sh
@@ -110,6 +110,14 @@ make_pair() {
rm -f "${base}_${len}.pem" "${base}_${len}.crt" "${base}_${len}.keyb"
}
+# Used to generate keys for signing update payloads.
+make_au_payload_key() {
+ local dir=$1
+ local priv="${dir}/update_key.pem"
+ local pub="${dir}/update-payload-key-pub.pem"
+ openssl genrsa -out "${priv}" 2048
+ openssl rsa -pubout -in "${priv}" -out "${pub}"
+}
# Emit a .keyblock containing flags and a public key, signed by a private key
# flags are the bitwise OR of these (passed in decimal, though)