;ELC ;;; Compiled ;;; in Emacs version 26.3 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\306\307\310\311\312DD\313\314\303\315\316&\210\306\317\310\311\320DD\321\314\303\315\322&\207" [require cl-lib format-spec rudel rudel-util rudel-socket custom-declare-variable rudel-tls-client-program funcall function #[0 "\300\301!\207" [executable-find "gnutls-cli"] 2] "The gnutls client program to use for encrypted connections." :group :type file rudel-tls-client-arguments #[0 "\300\207" [#1="--starttls --kx ANON_DH --port %p %h"] 1 #1#] "Arguments passed to the gnutls client program." string] 8) #@49 Version of the TLS transport backend for Rudel. (defconst rudel-tls-version '(0 1) (#$ . 994)) #@411 Make a network process with keyword arguments ARGS. This function works similar to `make-network-process'. Supported keyword arguments are :name (ignore), :host, :port, :filter and :sentinel. The returned process object is suitable for start-TLS. Once the enclosing protocol indicates TLS encryption should start, `rudel-tls-start-tls' can be called to enabled TLS for the network connection. (fn &rest ARGS) (defalias 'rudel-tls-make-process #[128 "\302\303\"\302\304\"\302\305\"\302\306\"\307\310\311\312\313 !$\"\314\315\316\317\"\320 \321\322\"%\323!\210\203;\324\325#\210\326\327\"\210\203I\330\"\210\324\331\332#\210\333\320\"\210\207" [rudel-tls-client-arguments rudel-tls-client-program plist-get :host :service :filter :sentinel format-spec format-spec-make 104 112 number-to-string apply start-process format "*tls-%s*" nil split-string " " stop-process process-put :old-filter set-process-filter rudel-tls-wait-init set-process-sentinel :supports-tls t set-process-query-on-exit-flag] 14 (#$ . 1096)]) #@146 Enable TLS encryption for the network connection PROCESS. This only works if PROCESS has been created by `rudel-tls-make-process'. (fn PROCESS) (defalias 'rudel-tls-start-tls #[257 "\300\301\302!#\210\303\304!\210\305\306\"\210\307\310\"\207" [process-put :old-filter process-filter message "tls-start-tls: switching to \"handshake\" filter" set-process-filter rudel-tls-wait-handshake signal-process sigalrm] 6 (#$ . 2142)]) #@102 Is installed as process filter on PROCESS until gnutls is done printing messages. (fn PROCESS DATA) (defalias 'rudel-tls-wait-init #[514 "\301\302\"\303\"\211A@\262\211@\262\210\304\302#\266\305\301\306\"\305\211\203O\211@\211\2034\307Q\262\202G\310\305\311\312#)\266\203\203G\311\262\210A\266\202\202 \210\203Y\"\210\211\205e\313\314!\210\315\"\207" [inhibit-changing-match-data process-get :buffer rudel-assemble-lines process-put nil :old-filter "\n" "- Simple Client Mode.*" t string-match message "tls-wait-init: switching back to old filter" set-process-filter] 15 (#$ . 2580)]) #@103 Is installed as process filter on PROCESS while gnutls is doing the TLS handshake. (fn PROCESS DATA) (defalias 'rudel-tls-wait-handshake #[514 "\301\302\"\303\"\211A@\262\211@\262\210\304\302#\266\305\301\306\"\305\211\203O\211@\211\2034\307Q\262\202G\310\305\311\312#)\266\203\203G\311\262\210A\266\202\202 \210\203Y\"\210\211\205k\313\314!\210\315\316\"\210\304\317\311#\207" [inhibit-changing-match-data process-get :buffer rudel-assemble-lines process-put nil :old-filter "\n" "- Compression.*" t string-match message "tls-wait-handshake: switching to \"established\" filter" set-process-filter rudel-tls-established :encryption] 15 (#$ . 3207)]) #@107 Is installed as process filter on PROCESS after gnutls has established TLS encryption. (fn PROCESS DATA) (defalias 'rudel-tls-established #[514 "\301\302\"\303\"\211A@\262\211@\262\210\304\302#\266\305\301\306\"\211\203D\211@\211\307\305\310\311#)\266\203\204<\312Q\262\210A\266\202\202\210\205M\211\"\207" [inhibit-changing-match-data process-get :buffer rudel-assemble-lines process-put nil :old-filter "- Peer has closed the GNUTLS connection" t string-match "\n"] 14 (#$ . 3900)]) (byte-code "\300\301\302\303!\"\210\300\304\305\303!\"\210\300\306\304\"\210\307\306\310\311#\210\312\303\313\304#\314\303\315\316\317$\207" [defalias rudel-start-tls-transport-p eieio-make-class-predicate rudel-start-tls-transport rudel-start-tls-transport--eieio-childp eieio-make-child-predicate rudel-start-tls-transport-child-p make-obsolete "use (cl-typep ... \\='rudel-start-tls-transport) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (rudel-socket-transport) nil (:documentation "Objects of this class provide socket transports with START TLS\ncapability.")] 6) #@82 Create a new object of class type `rudel-start-tls-transport'. (fn &rest SLOTS) (defalias 'rudel-start-tls-transport #[128 "\300\301\302#\207" [apply make-instance rudel-start-tls-transport] 5 (#$ . 5024)]) (byte-code "\300\301\302\303#\300\207" [function-put rudel-start-tls-transport compiler-macro rudel-start-tls-transport--anon-cmacro] 4) #@26 (fn WHOLE &rest SLOTS) (defalias 'rudel-start-tls-transport--anon-cmacro #[385 "\211@;\204\207\300\301\302@@#@\303@DABB\"\207" [macroexp--warn-and-return format "Obsolete name arg %S to constructor %S" identity] 7 (#$ . 5376)]) (byte-code "\300\301\302\303\304\305%\210\300\306\304\307\304\310%\210\311\312\313\314!\"\210\311\315\316\314!\"\210\311\317\315\"\210\320\317\321\322#\210\323\314\324\315#\325\314\326\327\330$\207" [cl-generic-define-method initialize-instance (:after) ((this rudel-start-tls-transport) _slots) nil #[514 "\300\301\302\"\303\304\301\302\"!#\210\305\301\302\"\306\"\207" [process-put slot-value socket :old-filter process-filter set-process-filter rudel-tls-wait-init] 10 "Repair filter of the process owned by THIS.\n\n(fn THIS SLOTS)"] rudel-enable-encryption ((this rudel-start-tls-transport)) #[257 "\211\300\301\302\"!\207" [rudel-tls-start-tls slot-value socket] 6 "Try to enable TLS encryption on THIS transport.\n\n(fn THIS)"] defalias rudel-start-tls-backend-p eieio-make-class-predicate rudel-start-tls-backend rudel-start-tls-backend--eieio-childp eieio-make-child-predicate rudel-start-tls-backend-child-p make-obsolete "use (cl-typep ... \\='rudel-start-tls-backend) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (rudel-transport-backend) ((capabilities :initform (connect encrypt))) (:documentation "STARTTLS transport backend.\nThe transport backend is a factory for transport objects that\nsupport STARTTLS behavior.")] 6) #@80 Create a new object of class type `rudel-start-tls-backend'. (fn &rest SLOTS) (defalias 'rudel-start-tls-backend #[128 "\300\301\302#\207" [apply make-instance rudel-start-tls-backend] 5 (#$ . 6898)]) (byte-code "\300\301\302\303#\300\207" [function-put rudel-start-tls-backend compiler-macro rudel-start-tls-backend--anon-cmacro] 4) #@26 (fn WHOLE &rest SLOTS) (defalias 'rudel-start-tls-backend--anon-cmacro #[385 "\211@;\204\207\300\301\302@@#@\303@DABB\"\207" [macroexp--warn-and-return format "Obsolete name arg %S to constructor %S" identity] 7 (#$ . 7240)]) (cl-generic-define-method 'initialize-instance nil '((this rudel-start-tls-backend) _slots) t #[771 " \210\302\303#\210 ?\205\304\305!\207" [rudel-tls-version rudel-tls-client-program eieio-oset :version error "Required program 'gnutls-cli' not available"] 7 "Initialize slots and set version of THIS.\n\n(fn CL--CNM THIS SLOTS)"]) #@66 History of hosts read by TLS backend's `rudel-ask-connect-info'. (defvar rudel-tls-ask-connect-info-host-history nil (#$ . 7819)) #@59 Last port read by TLS backend's `rudel-ask-connect-info'. (defvar rudel-tls-ask-connect-info-port-last nil (#$ . 7955)) (byte-code "\300\301\302\303\302\304%\210\300\305\302\306\302\307%\210\310\311\312!\313\314#\210\315\316!\207" [cl-generic-define-method rudel-ask-connect-info nil ((_this rudel-start-tls-backend) &optional info) #[513 "\302\303\"\206\304@\203\305\306@\"\202\307\310\300#\302\311\"\206&\312\313 \"\211\314\303\311F\"\207" [rudel-tls-ask-connect-info-host-history rudel-tls-ask-connect-info-port-last plist-get :host read-string format "Server (default %s): " "Server: " nil :port read-number "Port: " append] 9 "Augment INFO by read a hostname and a port number.\n\n(fn THIS &optional INFO)"] rudel-make-connection ((this rudel-start-tls-backend) info info-callback &optional _progress-callback) #[1027 "C\300\301\302\303\304\305!\306\"\307\310%\311\"\204\211\242\"\240\210\312\242\313\"\312\242\314\"\315\316\317\320\"\313\321\322\323&\324\317\325\"\326#\266\203\207" [cl-every make-byte-code 257 "\211\300\242\235\207" vconcat vector [] 3 "\n\n(fn KEYWORD)" (:host :port) plist-get :host :port rudel-tls-make-process :name format "STARTTLS TCP to %s" :service :stop t rudel-start-tls-transport "to %s" :socket] 16 "Connect to a START-TLS server using the information in INFO.\nINFO has to be a property list containing the keys :host\nand :port.\n\n(fn THIS INFO INFO-CALLBACK &optional PROGRESS-CALLBACK)"] rudel-add-backend rudel-backend-get-factory transport start-tls rudel-start-tls-backend provide rudel-tls] 6)