diff options
author | rhatto <rhatto> | 2006-10-09 19:07:39 +0000 |
---|---|---|
committer | rhatto <rhatto> | 2006-10-09 19:07:39 +0000 |
commit | 6fd7d8e5e70665240c6c3b0a0a58e93734885843 (patch) | |
tree | 4c66a5cace2343152b4148f11b2073265a40ad47 | |
parent | 310868c09310358102b9dce1f04eee1270ad3991 (diff) | |
download | firma-6fd7d8e5e70665240c6c3b0a0a58e93734885843.tar.gz firma-6fd7d8e5e70665240c6c3b0a0a58e93734885843.tar.bz2 |
sendkey now send pgp/mime message
-rwxr-xr-x | firma | 35 |
1 files changed, 26 insertions, 9 deletions
@@ -945,6 +945,7 @@ function ListAdministration { #------------------------------------------------------------- local -i return_code=0 + local subscribers case $# in 1) @@ -976,7 +977,9 @@ function ListAdministration { ;; list) GetSubscribersList - echo $SUBSCRIBERS_LIST + for subscriber in $SUBSCRIBERS_LIST; do + echo " $subscriber" + done ;; subscribe) echo >&2 "$1: missing arguments (try \"subscribe help\")" @@ -1302,7 +1305,7 @@ function SubscribeUsers { help show this help stdin waits for key material from stdin file <file-name> import pubkeys from file - keyserver [server-address] <key-id> import <key-id> from <server-address> + keyserver [server-address] <key-ids> import <key-ids> from <server-address> " elif [ "$1" == "stdin" ]; then echo "please paste the key material here, finninshing with Ctrl-D sequence..." @@ -1332,7 +1335,8 @@ function SubscribeUsers { else method="--recv-keys" fi - $GPG --keyserver $keyserver $method $2 + shift + $GPG --keyserver $keyserver $method $* return_code=$? else echo >&2 "subscribe: missing parameters: type subscribe help" @@ -1361,6 +1365,7 @@ function SendListPubkey { local key local keys local keyid + local random if [ "$1" == "help" ]; then echo "usage: sendkey [all|email|help]" @@ -1389,6 +1394,7 @@ function SendListPubkey { fi recipients="$key" + random="$RANDOM" # these are the headers of the message to be sent, so no indentation here MESSAGE_HEADERS="\ @@ -1396,13 +1402,24 @@ From: $LIST_ADDRESS Subject: List public key for $LIST_ADDRESS To: $recipients" - # this is the body of the message to be sent + # this is the body of the message to be sent, so no indentation here MESSAGE_BODY="`$GPG --armor --export $LIST_ADDRESS`" - MESSAGE_BODY="$( - echo -e "${PASSPHRASE}\n${MESSAGE_BODY}" | \ - $GPG_ENCRYPT --recipient $recipients - )" + MESSAGE_BODY=" +Content-Type: multipart/encrypted; protocol="application/pgp-encrypted"; boundary="$random" +--$random +Content-Type: application/pgp-encrypted +Content-Disposition: attachment + +Version: 1 + +--$random +Content-Type: application/octet-stream +Content-Disposition: inline; filename="msg.asc" + +$(echo -e "${PASSPHRASE}\n${MESSAGE_BODY}" | $GPG_ENCRYPT --recipient $recipients) + +--$random--" AssembleMessage @@ -1516,7 +1533,7 @@ FUNCTIONS=" LogMessage SubscribeUsers SendListPubkey - GetSubscriberInfo" + GetSubscribersInfo" for VAR in $GLOBAL_VARS; do declare $VAR |