summaryrefslogtreecommitdiffstats
path: root/mod-sign.sh
diff options
context:
space:
mode:
Diffstat (limited to 'mod-sign.sh')
-rwxr-xr-xmod-sign.sh12
1 files changed, 5 insertions, 7 deletions
diff --git a/mod-sign.sh b/mod-sign.sh
index 0e7b58c5c..5081e77dc 100755
--- a/mod-sign.sh
+++ b/mod-sign.sh
@@ -9,21 +9,19 @@
# This essentially duplicates the 'modules_sign' Kbuild target and runs the
# same commands for those modules.
-moddir=$1
+MODSECKEY=$1
+MODPUBKEY=$2
-modules=`find $moddir -name *.ko`
+moddir=$3
-MODSECKEY="./signing_key.priv"
-MODPUBKEY="./signing_key.x509"
+modules=`find $moddir -name *.ko`
for mod in $modules
do
dir=`dirname $mod`
file=`basename $mod`
- ./scripts/sign-file sha256 ${MODSECKEY} ${MODPUBKEY} ${dir}/${file} \
- ${dir}/${file}.signed
- mv ${dir}/${file}.signed ${dir}/${file}
+ ./scripts/sign-file sha256 ${MODSECKEY} ${MODPUBKEY} ${dir}/${file}
rm -f ${dir}/${file}.{sig,dig}
done