]> gitweb.fluxo.info Git - firma.git/commitdiff
SendListPubkey now using MimeWrapMessage
authorrhatto <rhatto>
Thu, 12 Oct 2006 14:24:06 +0000 (14:24 +0000)
committerrhatto <rhatto>
Thu, 12 Oct 2006 14:24:06 +0000 (14:24 +0000)
firma

diff --git a/firma b/firma
index 0a7c1b100077763e6e9b07ff93359451ef9aa2aa..dbef48a4844f10d479db0602ade5c64ef3cb1cb0 100755 (executable)
--- a/firma
+++ b/firma
@@ -1602,7 +1602,6 @@ function SendListPubkey {
   local key
   local keys
   local keyid
-  local boundary
   local keyboundary
 
   if [ "$1" == "help" ]; then
@@ -1631,21 +1630,9 @@ function SendListPubkey {
       return 1
     fi
 
-    recipients="$key"
-    boundary="`RandomString 15`"
+    RECIPIENTS="$key"
     keyboundary="`RandomString 15`"
 
-    # these are the headers of the message to be sent, so no indentation here
-    MESSAGE_HEADERS="\
-From: $LIST_ADDRESS
-Subject: List public key for $LIST_ADDRESS
-To: $recipients
-MIME-Version: 1.0
-Content-Type: multipart/encrypted;
-  protocol=\"application/pgp-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="\
@@ -1664,30 +1651,15 @@ $MESSAGE_BODY
     # now encrypt the message body
     MESSAGE_BODY="`echo -e "${PASSPHRASE}\n${MESSAGE_BODY}" | $GPG_ENCRYPT --recipient $recipients`"
 
-    # 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
-Content-Type: application/pgp-encrypted
-Content-Description: PGP/MIME version identification
-
-Version: 1
-
---$boundary
-Content-Type: application/octet-stream; name=\"encrypted.asc\"
-Content-Disposition: inline; filename=\"encrypted.asc\"
-
-${MESSAGE_BODY}
-
---${boundary}--"
-
-    AssembleMessage
+    # compose the message
+    MimeWrapMessage
 
     # send message
     echo "$MESSAGE" | $MAIL_AGENT $MAIL_AGENT_ARGS $recipients
   done
 
-  FixListOwnerShip
+  AdminLog "List pubkey sent to $keys."
+  FixListOwnership
 
 }