summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/package-resources/signed/update-signatures.sh
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2020-10-20 18:26:38 +0200
committerStefan Kangas <stefan@marxist.se>2020-10-20 18:26:38 +0200
commit6a946d29a119b9cf7d05c04d5751b18b6438ef4e (patch)
treea6845aecc695b7e5fe24b034663e830499085096 /test/lisp/emacs-lisp/package-resources/signed/update-signatures.sh
parent5f9fb508e6dcc25462b3c9a5595a3ec87903720c (diff)
downloademacs-6a946d29a119b9cf7d05c04d5751b18b6438ef4e.tar.gz
emacs-6a946d29a119b9cf7d05c04d5751b18b6438ef4e.tar.bz2
emacs-6a946d29a119b9cf7d05c04d5751b18b6438ef4e.zip
Tweak test data for signed package installation
* test/lisp/emacs-lisp/package-resources/signed/signed-bad-1.0.el: * test/lisp/emacs-lisp/package-resources/signed/signed-good-1.0.el: Use lexical-binding. * test/lisp/emacs-lisp/package-resources/signed/update-signatures.sh: New file. * test/lisp/emacs-lisp/package-resources/key.pub: * test/lisp/emacs-lisp/package-resources/key.sec: Add new key. * test/lisp/emacs-lisp/package-resources/signed/signed-good-1.0.el.sig: * test/lisp/emacs-lisp/package-resources/signed/archive-contents.sig: Update signatures using new key.
Diffstat (limited to 'test/lisp/emacs-lisp/package-resources/signed/update-signatures.sh')
-rwxr-xr-xtest/lisp/emacs-lisp/package-resources/signed/update-signatures.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/package-resources/signed/update-signatures.sh b/test/lisp/emacs-lisp/package-resources/signed/update-signatures.sh
new file mode 100755
index 00000000000..a48c9bb1aa2
--- /dev/null
+++ b/test/lisp/emacs-lisp/package-resources/signed/update-signatures.sh
@@ -0,0 +1,32 @@
+#! /bin/sh
+
+# Generate a new key and update the signatures for tests.
+
+# Copyright (C) 2020 Free Software Foundation, Inc.
+
+# This file is part of GNU Emacs.
+
+# GNU Emacs is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU Emacs is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+
+export GPG_AGENT=""
+KEYRING="./key.ring"
+TRUSTDB="./trust.db"
+GPG="gpg --no-default-keyring --trustdb-name $TRUSTDB --keyring $KEYRING --yes"
+
+rm $KEYRING
+$GPG --full-generate-key
+$GPG --export --armor > "../key.pub"
+$GPG --export-secret-keys -armor > "../key.sec"
+$GPG --detach-sign --sign "./archive-contents"
+$GPG --detach-sign --sign "./signed-good-1.0.el"