;ELC   
;;; Compiled
;;; in Emacs version 29.4
;;; with all optimizations.



(byte-code "\300\301!\210\300\302!\210\300\303!\210\304\305\306\307\310\311%\210\312\313\314\315\316DD\317\320\321%\210\312\322\314\315\323DD\324\320\325%\210\312\326\314\315\327DD\330\331\332\320\333&\210\312\334\314\315\335DD\336\320\337%\210\312\340\314\315\341DD\342\320\343%\210\312\344\314\315\345DD\346\331\347\320\350&\210\312\351\314\315\352DD\353\320\354%\210\312\355\314\315\356DD\357\331\347\320\360&\210\312\361\314\315\362DD\363\320\364\331\365&\207" [require dig gnutls password-cache custom-declare-group smime nil "S/MIME configuration." :group mime custom-declare-variable smime-keys funcall function #[0 "\300\207" [nil] 1 #1=""] "Map mail addresses to a file containing Certificate (and private key).\nThe file is assumed to be in PEM format.  You can also associate additional\ncertificates to be sent with every message to each address." :type (repeat (list (string :tag "Mail address") (file :tag "File name") (repeat :tag "Additional certificate files" (file :tag "File name")))) smime-CA-directory #[0 "\300\207" [nil] 1 #1#] "Directory containing certificates for CAs you trust.\nDirectory should contain files (in PEM format) named to the X.509\nhash of the certificate.  This can be done using OpenSSL such as:\n\n$ ln -s ca.pem \\=`openssl x509 -noout -hash -in ca.pem\\=`.0\n\nwhere `ca.pem' is the file containing a PEM encoded X.509 CA\ncertificate." (choice (const :tag "none" nil) directory) smime-CA-file #[0 "\300 @\207" [gnutls-trustfiles] 1 #1#] "File containing certificates for CAs you trust.\nThe file should contain certificates in PEM format.  By default,\nthis is initialized from the `gnutls-trustfiles' variable." :version "29.1" (choice (const :tag "none" nil) file) smime-certificate-directory #[0 "\300\207" ["~/Mail/certs/"] 1 #1#] "Directory containing other people's certificates.\nIt should contain files named to the X.509 hash of the certificate,\nand the files themselves should be in PEM format." directory smime-openssl-program #[0 "\3001 \301\302\303\211\211\304%\305=0\202 \210\303\207\205 \302\207" [(error) call-process "openssl" nil "version" 0] 6 #1#] "Name of OpenSSL binary or nil if none." (choice string (const :tag "none" nil)) smime-encrypt-cipher #[0 "\300\207" ["-des3"] 1 #1#] "Cipher algorithm used for encryption." "22.1" (choice (const :tag "Triple DES" "-des3") (const :tag "DES" "-des") (const :tag "AES 256 bits" "-aes256") (const :tag "AES 192 bits" "-aes192") (const :tag "AES 128 bits" "-aes128") (const :tag "RC2 40 bits" "-rc2-40") (const :tag "RC2 64 bits" "-rc2-64") (const :tag "RC2 128 bits" "-rc2-128")) smime-crl-check #[0 "\300\207" [nil] 1 #1#] "Check revocation status of signers certificate using CRLs.\nEnabling this will have OpenSSL check the signers certificate\nagainst a certificate revocation list (CRL).\n\nFor this to work the CRL must be up-to-date and since they are\nnormally updated quite often (i.e., several times a day) you\nprobably need some tool to keep them up-to-date.  Unfortunately\nGnus cannot do this for you.\n\nThe CRL should either be appended (in PEM format) to your\n`smime-CA-file' or be located in a file (also in PEM format) in\nyour `smime-certificate-directory' named to the X.509 hash of the\ncertificate with .r0 as file name extension.\n\nAt least OpenSSL version 0.9.7 is required for this to work." (choice (const :tag "No check" nil) (const :tag "Check certificate" "-crl_check") (const :tag "Check certificate chain" "-crl_check_all")) smime-dns-server #[0 "\300\207" [nil] 1 #1#] "DNS server to query certificates from.\nIf nil, use system defaults." (choice (const :tag "System defaults") string) smime-ldap-host-list #[0 "\300\207" [nil] 1 #1#] "A list of LDAP hosts with S/MIME user certificates.\nIf needed search base, binddn, passwd, etc. for the LDAP host\nmust be set in `ldap-host-parameters-alist'." (repeat (string :tag "Host name")) "23.1"] 8)
(defvar smime-details-buffer "*OpenSSL output*")#@163 Asks the passphrase to unlock the secret key.
If `cache-key' and `password-cache' is non-nil then cache the
password under `cache-key'.

(fn &optional CACHE-KEY)
(defalias 'smime-ask-passphrase #[256 "\300\301\"\211\302\230?\205 \211\203 \203 \303\"\210\211\207" [password-read "Passphrase for secret key (RET for no passphrase): " "" password-cache-add] 5 (#$ . 4033)])#@27 

(fn B E BUF &rest ARGS)
(defalias 'smime-call-openssl-region #[899 "\301\302\303\303&\211\304\267\202- \305\207\306\307!\210\303\207\306\310!\210\303\207\306\311!\210\303\207\306\312!\210\303\207\313\314!\207" [smime-openssl-program apply call-process-region nil #s(hash-table size 5 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (0 19 1 21 2 27 3 33 4 39)) t message "OpenSSL: An error occurred parsing the command options." "OpenSSL: One of the input files could not be read." "OpenSSL: An error occurred creating the PKCS#7 file or when reading the MIME message." "OpenSSL: An error occurred decrypting or verifying the message." error "Unknown OpenSSL exitcode"] 13 (#$ . 4416)])#@18 

(fn CERTFILES)
(defalias 'smime-make-certfiles #[257 "\211\205 \300\301\302@!D\303A!\"\207" [append "-certfile" expand-file-name smime-make-certfiles] 5 (#$ . 5133)])#@432 Sign region with certified key in KEYFILE.
If signing fails, the buffer is not modified.  Region is assumed to
have proper MIME tags.  KEYFILE is expected to contain a PEM encoded
private key and certificate as its car, and a list of additional
certificates to include in its caar.  If no additional certificates is
included, KEYFILE may be the file containing the PEM encoded private
key and certificate itself.

(fn B E KEYFILE)
(defalias 'smime-sign-region #[771 "\301 \210\211\243\205 \211A@\242\206 \302\303!\304\305!!\306\307!\203% \310\311\"\210\312\313		D\307\314\315\305\f!\316\317!\f\205C \320\321D\"&	\203P \310\311\322\323#\210rq\210\324!\210\325!)\210\205| |\210\326!\210b\210\327\330!\203{ `\331y\210`|\210\323rq\210db\210\326!)\210\332!\210\207" [smime-details-buffer smime-new-details-buffer generate-new-buffer " *smime*" smime-ask-passphrase expand-file-name make-temp-file "smime" setenv "GNUS_SMIME_PASSPHRASE" apply smime-call-openssl-region "-sign" "-signer" append smime-make-certfiles "-passin" "env:GNUS_SMIME_PASSPHRASE" "" t insert-file-contents delete-file insert-buffer-substring looking-at "^MIME-Version: 1.0$" 1 kill-buffer] 21 (#$ . 5311)])#@267 Encrypt region for recipients specified in CERTFILES.
If encryption fails, the buffer is not modified.  Region is assumed to
have proper MIME tags.  CERTFILES is a list of filenames, each file
is expected to contain of a PEM encoded certificate.

(fn B E CERTFILES)
(defalias 'smime-encrypt-region #[771 "\302 \210\303\304!\305\306!\307\310D\306\311\312\313\f\"&r	q\210\314!\210\315!)\210\205E |\210\316!\210b\210\317\320!\203D `\321y\210`|\210\322r	q\210db\210\316!)\210\323!\210\207" [smime-encrypt-cipher smime-details-buffer smime-new-details-buffer generate-new-buffer " *smime*" make-temp-file "smime" apply smime-call-openssl-region "-encrypt" mapcar expand-file-name insert-file-contents delete-file insert-buffer-substring looking-at "^MIME-Version: 1.0$" 1 t kill-buffer] 16 (#$ . 6521)])#@130 S/MIME sign BUFFER with key in KEYFILE.
KEYFILE should contain a PEM encoded key and certificate.

(fn &optional KEYFILE BUFFER)
(defalias 'smime-sign-buffer #[512 "r\211\206 pq\210\301ed\206 \302\303\304\305\242\242$!#?\205! \306\307!)\207" [smime-keys smime-sign-region smime-get-key-with-certs-by-email gnus-completing-read "Sign using key" nil error "Signing failed"] 11 (#$ . 7343) nil])#@239 S/MIME encrypt BUFFER for recipients specified in CERTFILES.
CERTFILES is a list of filenames, each file is expected to consist of
a PEM encoded key and certificate.  Uses current buffer if BUFFER is
nil.

(fn &optional CERTFILES BUFFER)
(defalias 'smime-encrypt-buffer #[512 "r\211\206 pq\210\301ed\206 \302\303\304#C#?\205 \305\306!)\207" [smime-certificate-directory smime-encrypt-region read-file-name "Recipient's S/MIME certificate: " nil error "Encryption failed"] 9 (#$ . 7747) nil])#@180 Verify S/MIME message in region between B and E.
Returns non-nil on success.
Any details (stdout and stderr) are left in the buffer specified by
`smime-details-buffer'.

(fn B E)
(defalias 'smime-verify-region #[514 "\304 \210\305\205 \306\307!D	\205 \310\307	!D\"p\204  \311\312!\210\n\2033 \n\235\203. \2021 \nB\262\313\314\315\"r\211q\210\316\317\"\216prq\210\320\321D\322\323\324\325\f&	\205` r\211q\210\326 )+\207" [smime-CA-file smime-CA-directory smime-crl-check smime-details-buffer smime-new-details-buffer append "-CAfile" expand-file-name "-CApath" error "No CA configured" generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205	 \302\300!\207" [V0 buffer-name kill-buffer] 2] apply smime-call-openssl-region "smime" "-verify" "-out" "-" buffer-string] 16 (#$ . 8250)])#@193 Verify integrity of S/MIME message in region between B and E.
Returns non-nil on success.
Any details (stdout and stderr) are left in the buffer specified by
`smime-details-buffer'.

(fn B E)
(defalias 'smime-noverify-region #[514 "\302 \210\303\304D\305\306\307\310	&\203 \304\207\311!\210\312\207" [smime-details-buffer null-device smime-new-details-buffer smime-call-openssl-region t "smime" "-verify" "-noverify" "-out" insert-buffer-substring nil] 11 (#$ . 9064)])#@339 Decrypt S/MIME message in region between B and E with key in KEYFILE.
Optional FROM specifies sender's mail address.
On success, replaces region with decrypted data and return non-nil.
Any details (stderr on success, stdout and stderr on error) are left
in the buffer specified by `smime-details-buffer'.

(fn B E KEYFILE &optional FROM)
(defalias 'smime-decrypt-region #[1027 "\301 \210\302\303!\304\305!!\306\307!\203 \310\311\"\210\312\313D\307\314\315\305!\n\2050 \316\317D&	\203< \310\311\320\321#\210rq\210\322!\210\323!)\210\203f |\210\203\\ \324\325\261\210\326!\210\327!\210\321\207rq\210\326!)\210\327!\210|\210\326!\210\330\207" [smime-details-buffer smime-new-details-buffer generate-new-buffer " *smime*" smime-ask-passphrase expand-file-name make-temp-file "smime" setenv "GNUS_SMIME_PASSPHRASE" apply smime-call-openssl-region "-decrypt" "-recip" "-passin" "env:GNUS_SMIME_PASSPHRASE" "" t insert-file-contents delete-file "From: " "\n" insert-buffer-substring kill-buffer nil] 18 (#$ . 9546)])#@229 Verify integrity of S/MIME message in BUFFER.
Uses current buffer if BUFFER is nil.  Returns non-nil on success.
Any details (stdout and stderr) are left in the buffer specified by
`smime-details-buffer'.

(fn &optional BUFFER)
(defalias 'smime-verify-buffer #[256 "r\211\206 pq\210\300ed\")\207" [smime-verify-region] 4 (#$ . 10597) nil])#@295 Verify integrity of S/MIME message in BUFFER.
Does NOT verify validity of certificate (only message integrity).
Uses current buffer if BUFFER is nil.  Returns non-nil on success.
Any details (stdout and stderr) are left in the buffer specified by
`smime-details-buffer'.

(fn &optional BUFFER)
(defalias 'smime-noverify-buffer #[256 "r\211\206 pq\210\300ed\")\207" [smime-noverify-region] 4 (#$ . 10944) nil])#@333 Decrypt S/MIME message in BUFFER using KEYFILE.
Uses current buffer if BUFFER is nil, and query user of KEYFILE if it's nil.
On success, replaces data in buffer and return non-nil.
Any details (stderr on success, stdout and stderr on error) are left
in the buffer specified by `smime-details-buffer'.

(fn &optional BUFFER KEYFILE)
(defalias 'smime-decrypt-buffer #[512 "r\206 pq\210\301ed\302\206 \303\304\305\306\242\242$!!#)\207" [smime-keys smime-decrypt-region expand-file-name smime-get-key-by-email gnus-completing-read "Decipher using key" nil] 12 (#$ . 11361) nil])
(defalias 'smime-new-details-buffer #[0 "r\301!q\210\302 )\207" [smime-details-buffer get-buffer-create erase-buffer] 2])#@79 Convert S/MIME message between points B and E into a PKCS7 message.

(fn B E)
(defalias 'smime-pkcs7-region #[514 "\301 \210\302\303\304%\205 |\210\305!\210\306\207" [smime-details-buffer smime-new-details-buffer smime-call-openssl-region "smime" "-pk7out" insert-buffer-substring t] 8 (#$ . 12070)])#@86 Extract any certificates enclosed in PKCS7 message between points B and E.

(fn B E)
(defalias 'smime-pkcs7-certificates-region #[514 "\301 \210\302\303\304\305&\205 |\210\306!\210\307\207" [smime-details-buffer smime-new-details-buffer smime-call-openssl-region "pkcs7" "-print_certs" "-text" insert-buffer-substring t] 9 (#$ . 12383)])#@123 Get email addresses contained in certificate between points B and E.
A string or a list of strings is returned.

(fn B E)
(defalias 'smime-pkcs7-email-region #[514 "\301 \210\302\303\304\305&\205 |\210\306!\210\307\207" [smime-details-buffer smime-new-details-buffer smime-call-openssl-region "x509" "-email" "-noout" insert-buffer-substring t] 9 (#$ . 12735)])#@21 

(fn KEYFILE KEYS)
(defalias 'smime-get-certfiles #[514 "\211\205 \211@AA@\230\203 \3008\207\301\"\266\202\207" [2 smime-get-certfiles] 7 (#$ . 13110)])#@76 Return each line in region between B and E as a list of strings.

(fn B E)
(defalias 'smime-buffer-as-string-region #[514 "\212b\210\300`W\203! `\301 {\211\302\230\204 \211B\262\210\300y\210\202 )\207" [nil line-end-position ""] 6 (#$ . 13277)])#@17 

(fn MAILADDR)
(defalias 'smime-mail-to-domain #[257 "\300\301\"\203 \302\303\304\305$\207\207" [string-match "@" replace-match "." fixedcase literal] 6 (#$ . 13534)])#@55 Find certificate via DNS for address MAIL.

(fn MAIL)
(defalias 'smime-cert-by-dns #[257 "\302\303!\304\305\211\306%\307\310\311\"!rq\210\312\303!\304\")\211\205# \313!\211\203[ rq\210\314c\210\315G\211\316ZV\203K \211\316\\O\317\261\210\316\\\262\2021 O\317\261\266\320c)\210\202b \321!\210\305\262\321!)\210\207" [smime-dns-server dig-dns-server dig-invoke smime-mail-to-domain "cert" nil "+vc" generate-new-buffer format "*certificate for %s*" dig-extract-rr dig-rr-get-pkix-cert "-----BEGIN CERTIFICATE-----\n" 0 64 "\n" "-----END CERTIFICATE-----\n" kill-buffer] 11 (#$ . 13711)])#@72 Get certificate for MAIL from the ldap server at HOST.

(fn MAIL HOST)
(defalias 'smime-cert-by-ldap-1 #[514 "\300\301!\210\302\303P\304\305$\306\307\310\"!\305\211:\203\203 @@A@\211\262\203\203 G\311V\203\203 rq\210\311\312O\313\230\204A \311\314O\315\230\203M \316\317\320\305\321%\262\202S \322\321\"\262\323c\210\311G\211\324ZV\203s \211\324\\O\325\261\210\324\\\262\202Y O\325\261\266\326c)\210\202\212 \327!\210\305\262\207" [require ldap ldap-search "mail=" ("userCertificate") nil generate-new-buffer format "*certificate for %s*" 0 27 "-----BEGIN CERTIFICATE-----" 3 "MII" replace-regexp-in-string "\\(\n\\|\\|-----BEGIN CERTIFICATE-----\\|-----END CERTIFICATE-----\\)" "" t base64-encode-string "-----BEGIN CERTIFICATE-----\n" 64 "\n" "-----END CERTIFICATE-----\n" kill-buffer] 12 (#$ . 14326)])#@56 Find certificate via LDAP for address MAIL.

(fn MAIL)
(defalias 'smime-cert-by-ldap #[257 "\205' \3012' \211\205$ \211@\302\"\211\203 \303\301\"\210\210A\266\202\202	 \2620\207" [smime-ldap-host-list certbuf smime-cert-by-ldap-1 throw] 7 (#$ . 15167)])
(defvar smime-buffer "*SMIME*")
(defvar smime-mode-map (define-keymap :suppress t "q" 'smime-exit "f" 'smime-certificate-info))
(byte-code "\300\301\302\"\210\303\304\305\306#\207" [autoload gnus-completing-read "gnus-util" put smime-mode mode-class special] 4)
(defvar smime-mode-hook nil)
(byte-code "\300\301N\204\f \302\300\301\303#\210\304\305!\204 \302\305\306\307#\210\300\207" [smime-mode-hook variable-documentation put "Hook run after entering SMIME mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it.  (This is true for all hook variables.)" boundp smime-mode-map definition-name smime-mode] 4)
(defvar smime-mode-map (make-sparse-keymap))
(byte-code "\301\302N\204 \303\301\302\304\305!#\210\306\307!\204* \303\307\310\311#\210\312\307\306\307!\203& \313\202( \314 \"\210\307\302N\2048 \303\307\302\304\315!#\210\306\300!\204X \303\300\310\311#\210\312\300\306\300!\203P \313\202V \316\300\313\"\210\"\210\300\302N\204f \303\300\302\304\317!#\210\303\311\320\313#\207" [smime-mode-abbrev-table smime-mode-map variable-documentation put purecopy "Keymap for `smime-mode'." boundp smime-mode-syntax-table definition-name smime-mode defvar-1 nil make-syntax-table "Syntax table for `smime-mode'." define-abbrev-table "Abbrev table for `smime-mode'." derived-mode-parent] 5)#@284 Major mode for browsing, viewing and fetching certificates.

All normal editing commands are switched off.
\<smime-mode-map>

The following commands are available:

\{smime-mode-map}

This mode runs the hook `smime-mode-hook', as the final or penultimate
step during initialization.
(defalias 'smime-mode #[0 "\306\300!\210\307\310 \210\311\312\313!\210\314\f!\210\315\316 \210\307\211)\317\320!\207" [delay-mode-hooks major-mode mode-name smime-mode-map smime-mode-syntax-table smime-mode-abbrev-table make-local-variable t kill-all-local-variables smime-mode "SMIME" use-local-map set-syntax-table nil buffer-disable-undo run-mode-hooks smime-mode-hook local-abbrev-table mode-line-process truncate-lines buffer-read-only] 3 (#$ . 16762) nil])#@17 

(fn CERTFILE)
(defalias 'smime-certificate-info #[257 "\302\303\304\"!\305!\210\306 \210\307\310\311\312\313\314	!\315&\210\316 \210\317\310!\210\320eb\207" [smime-openssl-program buffer-read-only get-buffer-create format "*certificate %s*" switch-to-buffer erase-buffer call-process nil display "x509" "-in" expand-file-name "-text" fundamental-mode set-buffer-modified-p t] 11 (#$ . 17526) "fCertificate file: "])
(defalias 'smime-draw-buffer #[0 "rq\210\303\304 \210\305c\210\n\211\203$ \211@\306\307@A@#c\210A\266\202\202 \210\310c\210\311c*\207" [smime-buffer buffer-read-only smime-keys nil erase-buffer "\nYour keys:\n" format "		%s: %s\n" "\nTrusted Certificate Authorities:\n" "\nKnown Certificates:\n"] 6])#@25 Go to the SMIME buffer.
(defalias 'smime #[0 "\301!\204 r\302!q\210\303 )\210\304 \210\305!\207" [smime-buffer get-buffer get-buffer-create smime-mode smime-draw-buffer switch-to-buffer] 2 (#$ . 18263) nil])#@25 Quit the S/MIME buffer.
(defalias 'smime-exit #[0 "\300p!\207" [kill-buffer] 2 (#$ . 18480) [nil (smime-mode)]])#@14 

(fn EMAIL)
(defalias 'smime-get-key-by-email #[257 "\301\"A@\207" [smime-keys assoc] 4 (#$ . 18598)])#@14 

(fn EMAIL)
(defalias 'smime-get-key-with-certs-by-email #[257 "\301\"A\207" [smime-keys assoc] 4 (#$ . 18709)])
(provide 'smime)
