aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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