diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 09:59:16 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 09:59:16 +0000 |
commit | abd376d1e24e6665ef3662eb23ad76adadf78f72 (patch) | |
tree | ec7213f75b7e8c9cdbb4d335ed9ca7c11aae6f5f /debian/tests/simple-tests | |
parent | Adding upstream version 2.2.27. (diff) | |
download | gnupg2-1b23ace4afe324a9aed41b28976bd29275e13e43.tar.xz gnupg2-1b23ace4afe324a9aed41b28976bd29275e13e43.zip |
Adding debian version 2.2.27-2+deb11u2.debian/2.2.27-2+deb11u2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests/simple-tests')
-rw-r--r-- | debian/tests/simple-tests | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/debian/tests/simple-tests b/debian/tests/simple-tests new file mode 100644 index 0000000..97d4ab4 --- /dev/null +++ b/debian/tests/simple-tests @@ -0,0 +1,34 @@ +#!/bin/sh + +set -e +set -x + +DIR=$(mktemp -d) +GPG_HOME=$DIR/gnupg +gpg="gpg --homedir $GPG_HOME" + +mkdir $GPG_HOME +chmod 700 $GPG_HOME + +#trap "cd $HOME && rm -rf $DIR" EXIT + +cd $DIR + +cat > key-batch << EOF +Key-Type: default +Subkey-Type: default +Name-Real: test case +Name-Email: example@example.com +Expire-Date: 0 +%no-protection +%commit +EOF + +$gpg --batch --generate-key key-batch +$gpg -abs < $GPG_HOME/pubring.kbx > pubring.kbx.asc +$gpg --verify pubring.kbx.asc $GPG_HOME/pubring.kbx +gpgv --keyring $GPG_HOME/pubring.kbx pubring.kbx.asc $GPG_HOME/pubring.kbx + +# Encrypt +$gpg -e -r example@example.com < $GPG_HOME/pubring.kbx > pubring.kbx.gpg +$gpg -d -r example@example.com < pubring.kbx.gpg > pubring.kbx.gpg.dec |