From 32835595041c47686908d57127e835619019037a Mon Sep 17 00:00:00 2001 From: rhatto Date: Mon, 9 Oct 2006 20:36:02 +0000 Subject: sendkey pgp/mime fix --- firma | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'firma') 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 -- cgit v1.2.3