(or (y-or-n-p "Sign the message? ")
'not))))
'never)))
- (mm-with-unibyte-current-buffer
- (mc-encrypt-generic
- (or (message-options-get 'message-recipients)
- (message-options-set 'message-recipients
- (mc-cleanup-recipient-headers
- (read-string "Recipients: "))))
- nil nil nil
- (message-options-get 'message-sender))))
+ (insert
+ (with-temp-buffer
+ (set-buffer-multibyte nil)
+ (mc-encrypt-generic
+ (or (message-options-get 'message-recipients)
+ (message-options-set 'message-recipients
+ (mc-cleanup-recipient-headers
+ (read-string "Recipients: "))))
+ nil nil nil
+ (message-options-get 'message-sender))
+ (buffer-string))))
(goto-char (point-min))
(unless (looking-at "-----BEGIN PGP MESSAGE-----")
(error "Fail to encrypt the message"))
(insert "\r"))
(forward-line)
(end-of-line))
- (with-temp-file (setq signature-file (mm-make-temp-file "pgg"))
+ (with-temp-file (setq signature-file (make-temp-file "pgg"))
(mm-insert-part signature))
(if (condition-case err
(prog1
(if (condition-case err
(prog1
(mm-with-unibyte-buffer
- (insert (mm-encode-coding-string text coding-system))
+ (insert (encode-coding-string text coding-system))
(pgg-verify-region (point-min) (point-max) nil t))
(goto-char (point-min))
(while (search-forward "\r\n" nil t)
(autoload 'epg-expand-group "epg-config")
(autoload 'epa-select-keys "epa")
-(autoload 'gnus-create-image "gnus-ems")
-
(defun mml2015-epg-key-image (key-id)
"Return the image of a key, if any"
(with-temp-buffer
- (mm-set-buffer-multibyte nil)
+ (set-buffer-multibyte nil)
(let* ((coding-system-for-write 'binary)
(coding-system-for-read 'binary)
(data (shell-command-to-string
(mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "Corrupted")
(throw 'error handle))
- (setq part (mm-replace-in-string part "\n" "\r\n")
+ (setq part (replace-regexp-in-string "\n" "\r\n" part)
signature (mm-get-part signature)
context (epg-make-context))
(condition-case error
(defun mml2015-epg-clear-verify ()
(let ((inhibit-redisplay t)
(context (epg-make-context))
- (signature (mm-encode-coding-string (buffer-string)
- coding-system-for-write))
+ (signature (encode-coding-string (buffer-string)
+ coding-system-for-write))
plain)
(condition-case error
(setq plain (epg-verify-string context signature))
(mml2015-epg-verify-result-to-string
(epg-context-result-for context 'verify)))
(delete-region (point-min) (point-max))
- (insert (mm-decode-coding-string plain coding-system-for-read)))
+ (insert (decode-coding-string plain coding-system-for-read)))
(mml2015-extract-cleartext-signature))))
(defun mml2015-epg-sign (cont)