aboutsummaryrefslogtreecommitdiff
path: root/firma
diff options
context:
space:
mode:
authorrhatto <rhatto>2006-10-09 20:36:02 +0000
committerrhatto <rhatto>2006-10-09 20:36:02 +0000
commit32835595041c47686908d57127e835619019037a (patch)
treed3122c8e42c8b311216e829140798dd1a0bcba06 /firma
parent7f6469d9c9a0881b462fb9b99e0d5ab6e1885d8f (diff)
downloadfirma-32835595041c47686908d57127e835619019037a.tar.gz
firma-32835595041c47686908d57127e835619019037a.tar.bz2
sendkey pgp/mime fix
Diffstat (limited to 'firma')
-rwxr-xr-xfirma17
1 files changed, 15 insertions, 2 deletions
diff --git a/firma b/firma
index ae36324..2714645 100755
--- a/firma
+++ b/firma
@@ -1365,7 +1365,8 @@ function SendListPubkey {
local key
local keys
local keyid
- local random
+ local boundary
+ local keyboundary
if [ "$1" == "help" ]; then
echo "usage: sendkey [all|email|help]"
@@ -1395,6 +1396,7 @@ function SendListPubkey {
recipients="$key"
boundary="`RandomString 15`"
+ keyboundary="`RandomString 15`"
# these are the headers of the message to be sent, so no indentation here
MESSAGE_HEADERS="\
@@ -1407,10 +1409,21 @@ Content-Type: multipart/encrypted;
boundary=\"${boundary}\"
Content-Disposition: inline"
- # 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/mixed; boundary=\"$keyboundary\"
+Content-Disposition: inline
+--$keyboundary
+Content-Type: application/pgp-keys
+Content-Disposition: attachment
+
+$MESSAGE_BODY
+
+--${keyboundary}--"
+
+ # this is the body of the message to be sent, so no indentation here
MESSAGE_BODY="\
This is an OpenPGP/MIME encrypted message (RFC 2440 and 3156)
--$boundary