summaryrefslogtreecommitdiff
path: root/src/ipa/gen-ipa-priv-key.sh
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-29 04:48:59 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-04-14 02:03:09 +0300
commitec9231889156fc9b5debcdb99605fe32964ebaaa (patch)
treebce651032ef06ecdad3e705a087cb518ad8e4d95 /src/ipa/gen-ipa-priv-key.sh
parente62bc9db73531462dc4b28b42596d0ae26369cbd (diff)
libcamera: Add IPA module signing infrastructure
Add infrastructure to generate an RSA private key and sign IPA modules. The signatures are stored in separate files with a .sign suffix. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/ipa/gen-ipa-priv-key.sh')
-rwxr-xr-xsrc/ipa/gen-ipa-priv-key.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ipa/gen-ipa-priv-key.sh b/src/ipa/gen-ipa-priv-key.sh
new file mode 100755
index 00000000..919751f2
--- /dev/null
+++ b/src/ipa/gen-ipa-priv-key.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (C) 2020, Google Inc.
+#
+# Author: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
+#
+# gen-ipa-priv-key.sh - Generate an RSA private key to sign IPA modules
+
+key="$1"
+
+openssl genpkey -algorithm RSA -out "${key}" -pkeyopt rsa_keygen_bits:2048