summaryrefslogtreecommitdiffstats
path: root/mod-sign.sh
diff options
context:
space:
mode:
authorKyle McMartin <kyle@mcmartin.ca>2013-03-28 15:01:42 -0400
committerKyle McMartin <kyle@mcmartin.ca>2013-03-28 16:33:21 -0400
commit63cb38bed692a52a79e33f41bfe42c277e578712 (patch)
treec1f407308e9dba3c4d2693733fd8c355bcb1439f /mod-sign.sh
parent60044b936a1178047fdd938c5eac81b5d1ee2ded (diff)
downloadkernel-63cb38bed692a52a79e33f41bfe42c277e578712.tar.gz
kernel-63cb38bed692a52a79e33f41bfe42c277e578712.tar.xz
kernel-63cb38bed692a52a79e33f41bfe42c277e578712.zip
simplify the signing stuff now that sign-file takes pub/priv key args
also fix %{with_*} tests (which jan stancek sent for rhel, thanks!)
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