* epa.el (epa-protocol): New user option.
[elisp/epg.git] / pgg-epg.el
index 09f69f0..86c6155 100644 (file)
 
 ;;; Code:
 
-(require 'epg)
+(require 'epa)
 (eval-when-compile (require 'pgg))
 
 (defvar pgg-epg-secret-key-id-list nil)
 
 (defun pgg-epg-passphrase-callback (context key-id ignore)
   (if (eq key-id 'SYM)
-      (epg-passphrase-callback-function context key-id nil)
+      (epa-passphrase-callback-function context key-id nil)
     (let* ((entry (assoc key-id epg-user-id-alist))
           (passphrase
            (pgg-read-passphrase
@@ -132,7 +132,8 @@ passphrase cache or user."
         (pgg-remove-passphrase-from-cache (car pgg-epg-secret-key-id-list))
         (setq pgg-epg-secret-key-id-list (cdr pgg-epg-secret-key-id-list)))
        (signal (car error) (cdr error))))
-    (if pgg-text-mode
+    (if (and pgg-text-mode
+            (fboundp 'decode-coding-string))
        (setq plain (decode-coding-string plain 'raw-text)))
     (save-excursion
       (set-buffer (get-buffer-create pgg-output-buffer))
@@ -252,7 +253,7 @@ Add all public keys in region between START and END to the keyring."
             (fprint (epg-signature-fingerprint (car pgg-epg-signatures)))
             (trust-good-enough-p
              (memq (epg-signature-validity (car pgg-epg-signatures))
-                   '(marginal fully ultimate))))
+                   '(marginal full ultimate))))
        (cond ((and signer fprint)
               (concat (cdr signer)
                       (unless trust-good-enough-p