2002-10-10 Simon Josefsson <jas@extundo.com>
+ * pgg.el (pgg-verify-region): Use it.
+
+ * pgg-def.el (pgg-query-keyserver): New variable.
+
* pgg.el (pgg-decrypt-region): Bind pgg-default-user-id to
key-identifier in packet. Is this a good idea?
(forward-line) ;; skip header/body separator
(kill-region (point-min) (point)))
(quoted-printable-decode-region (point-min) (point-max))
- (unless (let ((pgg-default-user-id (message-options-get 'message-sender)))
+ (unless (let ((pgg-default-user-id
+ (or (message-options-get 'message-sender)
+ pgg-default-user-id)))
(pgg-sign-region (point-min) (point-max) t))
(pop-to-buffer pgg-errors-buffer)
(error "Encrypt error"))
(defun mml1991-pgg-encrypt (cont &optional sign)
(let (headers)
- ;; Don't sign headers.
+ ;; Strip MIME Content[^ ]: headers since it will be ASCII ARMOURED
(goto-char (point-min))
- (while (not (looking-at "^$"))
- (forward-line))
- (unless (eobp) ;; no headers?
- (setq headers (buffer-substring (point-min) (point)))
- (forward-line) ;; skip header/body separator
- (kill-region (point-min) (point)))
+ (while (looking-at "^Content[^ ]+:") (forward-line))
+ (if (> (point) (point-min))
+ (progn
+ (kill-region (point-min) (point))))
(unless (pgg-encrypt-region
(point-min) (point-max)
(split-string
(pop-to-buffer pgg-errors-buffer)
(error "Encrypt error"))
(kill-region (point-min) (point-max))
- (if headers (insert headers))
+ ;;(insert "Content-Type: application/pgp-encrypted\n\n")
+ ;;(insert "Version: 1\n\n")
(insert "\n")
(insert-buffer pgg-output-buffer)
t))