;ELC ;;; compiled by jwz@thalidomide on Tue Apr 5 00:53:25 1994 ;;; from file /th/jwz/emacs19/lisp/packages/mailcrypt.el ;;; emacs version 19.10 Lucid (beta11). ;;; bytecomp version 2.23; 22-dec-93. ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "This file was compiled for Emacs 19.")) (byte-code "!!" [require comint mail-utils] 2) (defvar mc-default-scheme 'pgp "\ *Default encryption scheme to use.") (defvar mc-passwd-timeout "1 min" "\ *Time to deactivate password in after a use, or nil for immediately.") (defvar mc-pgp-user-id (user-login-name) "\ *Your PGP user ID.") (byte-code "!! " [boundp mc-ripem-user-id getenv "RIPEM_USER_NAME" user-full-name "*Your RIPEM user ID."] 2) (defvar mc-pgp-always-sign nil "\ *Always sign encrypted PGP messages.") (defvar mc-always-replace nil "\ *Decrypt messages in place without prompting.") (defvar mc-use-default-recipients nil "\ *Assume that the message should be encoded for everyone listed in the To: and Cc: fields.") (defvar mc-encrypt-for-me nil "\ *Encrypt all outgoing messages with user's public key.") (defvar mc-timer nil "\ Timer object for password deactivation.") (defvar mc-pgp-passwd nil "\ Your PGP passphrase.") (defvar mc-ripem-passwd nil "\ Your RIPEM passphrase.") (defvar mc-pgp-path "pgp" "\ *The PGP executable.") (defvar mc-ripem-path "ripem" "\ *The RIPEM executable.") (defvar mc-ripem-pubkeyfile (getenv "RIPEM_PUBLIC_KEY_FILE") "\ *Location of RIPEM public key file.") (defconst mc-pgp-msg-begin-line "-----BEGIN PGP MESSAGE-----" "\ Text for start of PGP message delimiter.") (defconst mc-pgp-msg-end-line "-----END PGP MESSAGE-----" "\ Text for end of PGP message delimiter.") (defconst mc-pgp-signed-begin-line "-----BEGIN PGP SIGNED MESSAGE-----" "\ Text for start of PGP signed messages.") (defconst mc-pgp-signed-end-line "-----END PGP SIGNATURE-----" "\ Text for end of PGP signed messages.") (defconst mc-pgp-key-begin-line "-----BEGIN PGP PUBLIC KEY BLOCK-----" "\ Text for start of PGP public key.") (defconst mc-pgp-key-end-line "-----END PGP PUBLIC KEY BLOCK-----" "\ Text for end of PGP public key.") (defconst mc-ripem-key-begin-line "-----BEGIN PUBLIC KEY-----" "\ Text for start of RIPEM public key.") (defconst mc-ripem-key-end-line "-----END PUBLIC KEY-----" "\ Text for end of RIPEM public key.") (defconst mc-ripem-msg-begin-line "-----BEGIN PRIVACY-ENHANCED MESSAGE-----" "\ Text for start of RIPEM message delimiter.") (defconst mc-ripem-msg-end-line "-----END PRIVACY-ENHANCED MESSAGE-----" "\ Text for end of RIPEM message delimiter.") (fset 'mc-split #[(regexp str) " \"ɕ\"  #\n ɔOC\"ɕgG U\n OC\" !\n," [match-data nil retval end beg data string-match "[ \n]*" str 0 "[ \n]*$" regexp append store-match-data] 5 "\ Splits STR into a list of elements which were separated by REGEXP, stripping initial and trailing whitespace."]) (byte-code "MM" [mc-temp-display #[(beg end &optional name) "\n { |\n!q cebNj*" [nil tmp name "*Mailcrypt Temp*" beg end generate-new-buffer ((byte-code "p!! \"\" \" p!" [shrink-window-if-larger-than-buffer display-buffer message "Press any key to remove the %s window." name string-match "19\\." emacs-version "Lucid" read-event read-char kill-buffer] 3))] 2] mc-activate-passwd #[(scheme) "!\n\n! #= ?! = ?! \"" [fboundp run-at-time mc-timer cancel-timer mc-passwd-timeout nil mc-deactivate-passwd scheme pgp mc-pgp-passwd comint-read-noecho "PGP Password: " ripem mc-ripem-passwd "RIPEM Password: " error "Encryption scheme %s not recognized"] 4]] 2) (fset 'mc-deactivate-passwd #[nil "!!!" [mc-timer fboundp cancel-timer nil mc-pgp-passwd mc-ripem-passwd message "password deactivated"] 2 "\ *Deactivates both PGP and RIPEM passwords." nil]) (fset 'mc-cleanup-recipient-headers #[(str) " \"\"" [mapcar #[(x) " !A@" [mail-extract-address-components x] 2] mc-split "\\([ \n]*,[ \n]*\\)+" str] 5]) (fset 'mc-encrypt-message #[(&optional recipients scheme) " \"\n##Q!##Q\"!! =BD! D\" \"eb!Q!`\"\"\n!$\"B\"! d*Ή \"\"+ U b.!.! `#!) =4B\"\"\"eb!Q!`!>! d?Ή \"\"+ U?!Ӂ@ \"," [nil retval signed-p start args scheme mc-default-scheme recipients mc-split "\\([ \n]*,[ \n]*\\)+" mc-use-default-recipients mc-cleanup-recipient-headers mail-fetch-field "to" t ", " "cc" read-from-minibuffer "Recipients: " error "No recipients!" pgp mc-encrypt-for-me mc-pgp-user-id "+batchmode" "-feat" mc-pgp-always-sign y-or-n-p "Sign the message? " append "-su" search-forward "\n" mail-header-separator process-environment mc-activate-passwd mc-pgp-passwd "PGPPASSFD=0" message "Encrypting..." apply call-process-region mc-pgp-path mc-passwd-timeout mc-deactivate-passwd 0 mc-pgp-msg-begin-line search-backward mc-temp-display "*Encryption*" "Error while encrypting. Hit C-x u to undo." ripem mc-ripem-user-id "-e" "-m" "encrypted" "-T" "a" "-k" "-" mapcar #[(x) " D" ["-r" x] 2] mc-ripem-passwd mc-ripem-path "Encryption scheme %s not recognized"] 10 "\ *Encrypt the message to RECIPIENTS using the given encryption SCHEME. RECIPIENTS is a comma separated string. If SCHEME is nil, use the value of `mc-default-scheme'." (byte-code "$D" [current-prefix-arg nil read-from-minibuffer "Encryption Scheme: " t] 6)]) (fset 'mc-decrypt-message #[nil "ebP#P!`!  ͱP! `{!!  \neB! `lj& U b#! `# `#)###!`!&ͱ'P!! `(lj&  UǪ `#!+" [nil retval msg start re-search-forward "^" mc-pgp-msg-begin-line t re-search-backward mc-activate-passwd pgp buffer-read-only mc-pgp-passwd "\n" mc-pgp-msg-end-line pop-to-buffer get-buffer-create "*Decrypted Message*" erase-buffer "PGPPASSFD=0" process-environment message "Decrypting..." call-process-region mc-pgp-path "-f" mc-passwd-timeout mc-deactivate-passwd 0 "^Signature made.*\n" search-forward "Just a moment......" mc-temp-display "*Decryption*" "*ERROR*" mc-ripem-msg-begin-line search-backward ripem mc-ripem-passwd mc-ripem-msg-end-line mc-ripem-path "-d" "-k" "-" "Found no encrypted message in this buffer."] 10 "\ *Decrypt whatever message is in the current buffer. Return t on success." nil]) (fset 'mc-sign-message #[(&optional scheme) " ‰=eb Q!`! ȱ B dЉ& ) U b! `\"!=Peb Q!`! ȱ dЉ&  U?!\"+" [scheme mc-default-scheme nil command retval start pgp search-forward "\n" mail-header-separator mc-activate-passwd mc-pgp-passwd "PGPPASSFD=0" process-environment call-process-region mc-pgp-path t "-fast" "+clearsig=on" "+batchmode" "-u" mc-pgp-user-id mc-passwd-timeout mc-deactivate-passwd 0 "\nJust a moment...." mc-temp-display error "PGP signing failed. Use C-x u to undo." ripem mc-ripem-path " -e -m mic-clear -k -" mc-ripem-passwd "-e" "-m" "mic-clear" "-k" "-" "RIPEM signing failed. Use C-x u to undo." "Encryption scheme %s not recognized"] 12 "\ *Clear sign the message using the given encryption SCHEME." (byte-code "É$C" [current-prefix-arg read-from-minibuffer "Encryption Scheme: " nil t] 5)]) (fset 'mc-verify-signature #[nil "ebP#y`\nP! `{!q\ncedȉ&Ued#p!eb!y` `{!p!)P#y`P! `{!!qܱ\nc!edȉ& \" Ueb``{!p!!p!)!," [nil retval msg buf start re-search-forward "^" mc-pgp-signed-begin-line t 0 mc-pgp-signed-end-line generate-new-buffer "*Verification*" call-process-region mc-pgp-path "+batchmode" "-f" mc-temp-display "*ERROR*" kill-buffer search-forward "Good signature" message mc-ripem-msg-begin-line mc-ripem-msg-end-line mc-activate-passwd ripem mc-ripem-passwd "\n" "Verifying..." mc-ripem-path "-d" "-k" "-" mc-passwd-timeout mc-deactivate-passwd "RIPEM signature verified" "Found no signed message in this buffer."] 11 "\ *Verify the signature of whatever signed message is in the current buffer, and give the result as a message in the minibuffer. Returns t if the signature is verified." nil]) (fset 'mc-insert-public-key #[(&optional scheme) " ‰dbnc=\nR` \" b!y `\"=!!qeb#!`! `{#p!)\" c\"+" [scheme mc-default-scheme nil pubkey start command "\n" pgp mc-pgp-path " +batchmode -kxaf '" mc-pgp-user-id "'" shell-command t search-forward mc-pgp-key-begin-line 0 mc-temp-display ripem file-readable-p mc-ripem-pubkeyfile find-file-noselect mc-ripem-user-id search-backward mc-ripem-key-begin-line mc-ripem-key-end-line message "Couldn't find key for `%s' in file %s" kill-buffer error "Cannot read file %s for public key" "Encryption scheme %s not recognized"] 4 "\ *Insert your public key at the end of the current buffer." (byte-code "É$C" [current-prefix-arg read-from-minibuffer "Encryption Scheme: " nil t] 5)]) (fset 'mc-snarf-keys #[nil "eb#!ʔb`d & qed#) !#ʔb`#ʔʕ{!!!qeb\n#p!) `#!\"!," [nil exists user buf start search-forward mc-pgp-key-begin-line t generate-new-buffer " *Key Temp*" 0 call-process-region mc-pgp-path "+batchmode" "-kaf" mc-temp-display "*Key Management*" kill-buffer mc-ripem-key-begin-line re-search-forward "^User:s-*.*$" mc-ripem-key-end-line file-writable-p mc-ripem-pubkeyfile find-file-noselect append-to-file message "RIPEM public key for this user already exists." error "Can't write to file %s" "No public key in current buffer"] 9 "\ *Add any public keys in the buffer to your keyring." nil]) (defvar mc-modes-alist (byte-code "DBDBEBEBF" [rmail-mode mc-rmail-decrypt-message mc-rmail-verify-signature vm-mode mc-vm-decrypt-message mc-vm-verify-signature mh-folder-mode mc-mh-decrypt-message mc-mh-verify-message mc-mh-snarf-keys gnus-summary-mode mc-gnus-summary-decrypt-message mc-gnus-summary-verify-signature mc-gnus-summary-snarf-keys] 7) "\ *Association list to specify mode specific functions for reading. Entries are of the form (MODE . (DECRYPT VERIFY SNARF)). The SNARF is optional and defaults to `mc-snarf-keys'.") (fset 'mc-rmail-verify-signature #[nil "! !" [mode-name "RMAIL" error "mc-rmail-verify-signature called in a non-RMAIL buffer" mc-verify-signature rmail-add-label "verified"] 2 "\ *Verify the signature in the current message." nil]) (fset 'mc-rmail-decrypt-message #[nil "p š! ! !!!ed# \"!))" [oldbuf mode-name "RMAIL" error "mc-rmail-decrypt-message called in a non-RMAIL buffer" rmail-edit-current-message mc-decrypt-message rmail-abort-edit mc-always-replace y-or-n-p "Replace encrypted message with decrypted? " rmail-cease-edit rmail-kill-label "edited" rmail-add-label "decrypted" generate-new-buffer "*Mailcrypt Viewing*" tmp copy-to-buffer switch-to-buffer t view-buffer] 4 "\ *Decrypt the contents of this message" nil]) (fset 'mc-vm-verify-signature #[nil "t !! q " [vm-follow-summary-cursor vm-mail-buffer buffer-name error "Folder buffer has been killed." vm-check-for-killed-summary vm-error-if-folder-empty mc-verify-signature] 2 "\ *Verify the signature in the current VM message" nil]) (fset 'mc-vm-decrypt-message #[nil "pt \n\n!!\nq pC\"t ! ! !ed# \"!))" [oldbuf vm-follow-summary-cursor vm-mail-buffer buffer-name error "Folder buffer has been killed." vm-check-for-killed-summary vm-folder-read-only signal folder-read-only vm-error-if-folder-empty vm-edit-message mc-decrypt-message message "Decryption failed." vm-edit-message-abort mc-always-replace y-or-n-p "Replace encrypted message with decrypted? " vm-edit-message-end generate-new-buffer "*Mailcrypt Viewing*" tmp copy-to-buffer switch-to-buffer t view-buffer] 4 "\ *Decrypt the contents of the current VM message" nil]) (byte-code "MMM" [mc-gnus-summary-verify-signature #[nil " \" Ď!~ +" [gnus-summary-select-article gnus-save-all-headers selected-window GNUSStartBufferWindow ((select-window GNUSStartBufferWindow)) gnus-pop-to-buffer gnus-article-buffer mc-verify-signature] 3 nil nil] mc-gnus-summary-snarf-keys #[nil " \" Ď!~ +" [gnus-summary-select-article gnus-save-all-headers selected-window GNUSStartBufferWindow ((select-window GNUSStartBufferWindow)) gnus-pop-to-buffer gnus-article-buffer mc-snarf-keys] 3 nil nil] mc-gnus-summary-decrypt-message #[nil " \" Ď!~ +" [gnus-summary-select-article gnus-save-all-headers selected-window GNUSStartBufferWindow ((select-window GNUSStartBufferWindow)) gnus-pop-to-buffer gnus-article-buffer mc-decrypt-message] 3 nil nil]] 2) (fset 'mc-mh-decrypt-message #[(decrypt-on-disk) "!\n!! \n  !q \"  !!!)  !Ջ)\n!\n!q  eb!!) ? \n!," [mh-get-msg-num t msg mh-msg-filename msg-filename get-buffer mh-show-buffer show-buffer nil decrypt-okay mc-always-replace decrypt-on-disk create-file-buffer insert-file-contents mc-decrypt-message save-buffer message "Decryption failed." set-buffer-modified-p kill-buffer buffer-file-name ((mh-invalidate-show-buffer)) mh-show mh-invalidate-show-buffer] 4 "\ *Decrypt the contents of the current MH message in the show buffer. With prefix arg, decrypt the message on disk as well." "P"]) (fset 'mc-mh-verify-signature #[nil "!\n! q *" [mh-get-msg-num t msg mh-show mh-show-buffer mc-verify-signature] 2 "\ *Verify the signature in the current MH message." nil]) (byte-code "MMM!" [mc-mh-snarf-keys #[nil "!! q )" [mh-show mh-get-msg-num t mh-show-buffer mc-snarf-keys] 3 nil nil] mc-create-read-menu-bar #[nil " \n\"A@ \n\"AA@ \n\"A8 !  \"# # #F!A#)!B\"B\" B\" B\"+" [assoc major-mode mc-modes-alist 2 snarf verify decrypt error "Decrypt and verify functions not defined for this major mode." mc-snarf-keys string-match "Lucid" emacs-version "Mailcrypt" vector "Decrypt Message" t "Verify Signature" "Snarf Public Key" x set-buffer-menubar current-menubar add-menu nil local-set-key [menu-bar mailcrypt] make-sparse-keymap [menu-bar mailcrypt decrypt] [menu-bar mailcrypt verify] [menu-bar mailcrypt snarf]] 8] mc-create-write-menu-bar #[nil " \"###F ! A#)!B\"B\"B\"B\"" [string-match "Lucid" emacs-version "Mailcrypt" vector "Encrypt Message" mc-encrypt-message t "Sign Message" mc-sign-message "Insert Public Key" mc-insert-public-key x set-buffer-menubar current-menubar add-menu nil local-set-key [menu-bar mailcrypt] make-sparse-keymap [menu-bar mailcrypt encrypt] [menu-bar mailcrypt sign] [menu-bar mailcrypt insert]] 7] provide mailcrypt] 2)