From dddad7c776881afcb79b627c5e423b4dd1ac8959 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Thu, 3 Jun 1999 07:27:43 +0000 Subject: Experimental: New PGP invocation interface. The invocations are done through formats, so all this should fit more cleanly into mutt now. --- contrib/gpg.rc | 40 ++++++++++++++++++++++++++++++++++++++++ contrib/pgp2.rc | 41 +++++++++++++++++++++++++++++++++++++++++ contrib/pgp5.rc | 41 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 122 insertions(+) create mode 100644 contrib/gpg.rc create mode 100644 contrib/pgp2.rc create mode 100644 contrib/pgp5.rc (limited to 'contrib') diff --git a/contrib/gpg.rc b/contrib/gpg.rc new file mode 100644 index 00000000..41799cf9 --- /dev/null +++ b/contrib/gpg.rc @@ -0,0 +1,40 @@ +# -*-muttrc-*- +# +# Command formats for gpg. +# +# $Id$ +# + +# decode application/pgp +set pgp_decode_command="gpg %?p?--passphrase-fd 0? --no-verbose --batch -o - --decrypt %f" + +# verify a pgp/mime signature +set pgp_verify_command="gpg --no-verbose --batch -o - --verify %s %f" + +# decrypt a pgp/mime attachment +set pgp_decrypt_command="gpg --passphrase-fd 0 --no-verbose --batch -o - --decrypt %f" + +# create a pgp/mime signed attachment +set pgp_sign_command="gpg --no-verbose --batch -o - --passphrase-fd 0 --detach-sign --textmode --armor %?a?-u %a? %f" + +# create a pgp/mime encrypted attachment +set pgp_encrypt_only_command="pgpewrap gpg --no-verbose -v --batch -o - --encrypt --textmode --armor --always-trust -- -r %r + +# create a pgp/mime encrypted and signed attachment +set pgp_encrypt_sign_command="pgpewrap gpg --passphrase-fd 0 --no-verbose -v --batch -o - --encrypt --sign %?a?-u %a? --textmode --armor --always-trust -- -r %r + +# import a key into the public key ring +set pgp_import_command="gpgm --no-verbose --import -v %f" + +# export a key from the public key ring +set pgp_export_command="gpgm --no-verbose --export --armor %r" + +# verify a key +set pgp_verify_key_command="gpgm --no-verbose --batch --fingerprint --check-sigs + +# read in the public key ring +set pgp_list_pubring_command="gpgm --no-verbose --batch --with-colons --list-keys %r" + +# read in the secret key ring +set pgp_list_secring_command="gpgm --no-verbose --batch --with-colons --list-secret-keys %r" + diff --git a/contrib/pgp2.rc b/contrib/pgp2.rc new file mode 100644 index 00000000..f1a6bd6b --- /dev/null +++ b/contrib/pgp2.rc @@ -0,0 +1,41 @@ +# -*-muttrc-*- +# +# PGP command formats for PGP 2. +# +# $Id$ +# + +# decode application/pgp +set pgp_decode_command="%?p?PGPPASSFD=0; export PGPPASSFD;? cat %?p?-? %f | pgp +language=mutt +verbose=0 +batchmode -f" + +# verify a pgp/mime signature +set pgp_verify_command="pgp +language=mutt +verbose=0 +batchmode %f %s" + +# decrypt a pgp/mime attachment +set pgp_decrypt_command="PGPPASSFD=0; export PGPPASSFD; cat - %f | pgp +language=mutt +verbose=0 +batchmode -f" + +# create a pgp/mime signed attachment +set pgp_sign_command="PGPPASSFD=0; export PGPPASSFD; cat - %f | pgp +language=mutt +verbose=0 +batchmode -abfst %?a? -u %a?" + +# create a pgp/mime encrypted attachment +set pgp_encrypt_only_command="PGPPASSFD=0; export PGPPASSFD; cat - %f | pgp +language=mutt +verbose=0 +batchmode +aeft %r" + +# create a pgp/mime encrypted and signed attachment +set pgp_encrypt_sign_command="PGPPASSFD=0; export PGPPASSFD; cat - %f | pgp +language=mutt +verbose=0 +batchmode +aefts %?a?-u %a? %r" + +# import a key into the public key ring +set pgp_import_command="pgp -ka %f +language=mutt" + +# export a key from the public key ring +set pgp_export_command="pgp -kxaf +language=mutt %r" + +# verify a key +set pgp_verify_key_command="pgp -kcc +language=mutt %r" + +# read in the public key ring +set pgp_list_pubring_command="pgpring -k $PGPPATH/pubring.pgp %r" + +# read in the secret key ring +set pgp_list_secring_command="pgpring -k $PGPPATH/secring.pgp %r" + + diff --git a/contrib/pgp5.rc b/contrib/pgp5.rc new file mode 100644 index 00000000..0a54f941 --- /dev/null +++ b/contrib/pgp5.rc @@ -0,0 +1,41 @@ +# -*-muttrc-*- +# +# PGP command formats for PGP 5. +# +# $Id$ +# + +# decode application/pgp +set pgp_decode_command="%?p?PGPPASSFD=0; export PGPPASSFD;? cat %?p?-? %f | pgpv +language=mutt +verbose=0 +batchmode -f --OutputInformationFD=0" + +# verify a pgp/mime signature +set pgp_verify_command="pgpv +language=mutt +verbose=0 +batchmode --OutputInformationFD=1 %f %s" + +# decrypt a pgp/mime attachment +set pgp_decrypt_command="PGPPASSFD=0; export PGPPASSFD; cat - %f | pgpv +language=mutt +verbose=0 +batchmode --OutputInformationFD=2 -f" + +# create a pgp/mime signed attachment +set pgp_sign_command="PGPPASSFD=0; export PGPPASSFD; cat - %f | pgps +language=mutt +verbose=0 +batchmode -abft %?a? -u %a?" + +# create a pgp/mime encrypted attachment +set pgp_encrypt_only_command="PGPPASSFD=0; export PGPPASSFD; cat - %f | pgpewrap pgpe +language=mutt +verbose=0 +batchmode +nobatchinvalidkeys=off -aft -- -r %r" + +# create a pgp/mime encrypted and signed attachment +set pgp_encrypt_sign_command="PGPPASSFD=0; export PGPPASSFD; cat - %f | pgpewrap pgpe +language=mutt +verbose=0 +batchmode +nobatchinvalidkeys=off -afts %?a? -u %a? -- -r %r" + +# import a key into the public key ring +set pgp_import_command="pgpk -a +language=mutt --OutputInformationFD=1 %f" + +# export a key from the public key ring +set pgp_export_command="pgpk -xa +language=mutt --OutputInformationFD=1 %r" + +# verify a key +set pgp_verify_key_command="pgpk -c +batchmode +language=mutt --OutputInformationFD=1 %r" + +# read in the public key ring +set pgp_list_pubring_command="pgpring -k $PGPPATH/pubring.pkr %r" + +# read in the secret key ring +set pgp_list_secring_command="pgpring -k $PGPPATH/secring.skr %r" + + -- cgit v1.2.3