%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/net/ |
Current File : //usr/local/share/emacs/27.2/lisp/net/network-stream.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; 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\304\305\306\"\210\304\307\306\"\210\310\311\312\313\314DD\315\316\317\320\321\322\323& \207" [require auth-source nsm puny autoload gnutls-negotiate "gnutls" open-gnutls-stream custom-declare-variable network-stream-use-client-certificates funcall function #[0 "\300\207" [nil] 1] "Whether to use client certificates for network connections.\n\nWhen non-nil, `open-network-stream' will automatically look for\nmatching client certificates (via `auth-source') for a\ndestination server, if it is called without a :client-certificate\nkeyword.\n\nSet to nil to disable this lookup globally. To disable on a\nper-connection basis, specify `:client-certificate nil' when\ncalling `open-network-stream'." :group network :type boolean :version "27.1"] 10) #@4526 Open a TCP connection to HOST, optionally with encryption. Normally, return a network process object; with a non-nil :return-list parameter, return a list instead (see below). Input and output work as for subprocesses; `delete-process' closes it. NAME is the name for the process. It is modified if necessary to make it unique. BUFFER is a buffer or buffer name to associate with the process. Process output goes at end of that buffer. BUFFER may be nil, meaning that the process is not associated with any buffer. HOST is the name or IP address of the host to connect to. SERVICE is the name of the service desired, or an integer or integer string specifying a port number to connect to. The remaining PARAMETERS should be a sequence of keywords and values: :type specifies the connection type, one of the following: nil or `network' -- Begin with an ordinary network connection, and if the parameters :success and :capability-command are also supplied, try to upgrade to an encrypted connection via STARTTLS. Even if that fails (e.g. if HOST does not support TLS), retain an unencrypted connection. `plain' -- An ordinary, unencrypted network connection. `starttls' -- Begin with an ordinary connection, and try upgrading via STARTTLS. If that fails for any reason, drop the connection; in that case the returned object is a killed process. `tls' -- A TLS connection. `ssl' -- Equivalent to `tls'. `shell' -- A shell connection. :return-list specifies this function's return value. If omitted or nil, return a process object. A non-nil means to return (PROC . PROPS), where PROC is a process object and PROPS is a plist of connection properties, with these keywords: :greeting -- the greeting returned by HOST (a string), or nil. :capabilities -- a string representing HOST's capabilities, or nil if none could be found. :type -- the resulting connection type; `plain' (unencrypted) or `tls' (TLS-encrypted). :end-of-command specifies a regexp matching the end of a command. :end-of-capability specifies a regexp matching the end of the response to the command specified for :capability-command. It defaults to the regexp specified for :end-of-command. :success specifies a regexp matching a message indicating a successful STARTTLS negotiation. For instance, the default should be "^3" for an NNTP connection. :capability-command specifies a command used to query the HOST for its capabilities. For instance, for IMAP this should be "1 CAPABILITY\r\n". :starttls-function specifies a function for handling STARTTLS. This function should take one parameter, the response to the capability command, and should return the command to switch on STARTTLS if the server supports STARTTLS, and nil otherwise. :always-query-capabilities says whether to query the server for capabilities, even if we're doing a `plain' network connection. :client-certificate should either be a list where the first element is the certificate key file name, and the second element is the certificate file name itself, or t, which means that `auth-source' will be queried for the key and the certificate. This parameter will only be used when doing TLS or STARTTLS connections. To enable automatic queries of `auth-source' when `:client-certificate' is not specified customize `network-stream-use-client-certificates' to t. :use-starttls-if-possible is a boolean that says to do opportunistic STARTTLS upgrades even if Emacs doesn't have built-in TLS functionality. :warn-unless-encrypted is a boolean which, if :return-list is non-nil, is used warn the user if the connection isn't encrypted. :nogreeting is a boolean that can be used to inhibit waiting for a greeting from the server. :nowait, if non-nil, says the connection should be made asynchronously, if possible. :shell-command is a format-spec string that can be used if :type is `shell'. It has two specs, %s for host and %p for port number. Example: "ssh gateway nc %s %p". :tls-parameters is a list that should be supplied if you're opening a TLS connection. The first element is the TLS type (either `gnutls-x509pki' or `gnutls-anon'), and the remaining elements should be a keyword list accepted by gnutls-boot (as returned by `gnutls-boot-parameters'). (fn NAME BUFFER HOST SERVICE &rest PARAMETERS) (defalias 'open-network-stream #[1156 "\301\302!\204\n \303\304!\210\305\306\"\305\307\"\211\204P \310=\2040 \311>\203P \305\312\"\2030 \305\313\"\204P \302\314\315 \316\317!\320\321\305 \321\"\322\305\322\"&\f\202\334 \206W \323\324!\310=\203h \305\325\"\204h \326\202~ \327\267\202z \330\202~ \331\202~ \332\202~ \303\333\"\203\221 \334\335\"\204\221 \336\335\337#\202\222 \340C\341\342\343\344\345 #\346\"\347$\216\211\f\f\f%\240\210)\203\327 \211\242@\350\242A@\351\352\2428\306\347\2428\353\354 \2428\257 \202\332 \211\242@\266\204\207" [network-stream-use-client-certificates featurep make-network-process error "Emacs was compiled without networking support" plist-get :type :return-list plain (nil network) :success :capability-command :name :buffer :host puny-encode-domain :service :nowait :tls-parameters generate-new-buffer " *stream buffer*" :always-query-capabilities network-stream-open-plain #s(hash-table size 7 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (nil 110 network 110 starttls 110 plain 110 tls 114 ssl 114 shell 118)) network-stream-open-starttls network-stream-open-tls network-stream-open-shell "Invalid connection type %s" plist-member :client-certificate plist-put t nil make-byte-code 0 "\300?\205 \303\302\242@!\203 \304\302\242@\305\"\210\306\301!\207" vconcat vector [processp set-process-buffer nil kill-buffer] 3 :greeting :capabilities 2 :error 4] 22 (#$ . 1213)]) #@32 (fn HOST SERVICE PARAMETERS) (defalias 'network-stream-certificate #[771 "\301\302\"\211<\203 \211\202P \211\303=\205P \303\3041, \305\306\307\310\311\312\313\n\"&@0\202. \210\314\301\315\"\301\316\"\205M \211\205M \317!\205M \317!\205M D)\266\203\207" [epa-suppress-error-buffer plist-get :client-certificate t (error) auth-source-search :max 1 :host :port format "%s" nil :key :cert file-readable-p] 13 (#$ . 7213)]) (byte-code "\300\301\302\"\210\300\301\302\303#\210\304\301\302\305#\207" [defalias open-protocol-stream open-network-stream nil make-obsolete "26.1"] 4) #@44 (fn NAME BUFFER HOST SERVICE PARAMETERS) (defalias 'network-stream-open-plain #[1285 "rq\210`)\300\301\302\303\304\n!\305\n\306\307\f\306\"&\n\307\310\"\203/ \311\312\313%\262\211\314\307\315\"#\312\316F\207" [make-network-process :name :buffer :host puny-encode-domain :service :nowait plist-get :warn-unless-encrypted nsm-verify-connection nil t network-stream-get-response :end-of-command plain] 19 (#$ . 7808)]) #@44 (fn NAME BUFFER HOST SERVICE PARAMETERS) (defalias 'network-stream-open-starttls #[1285 "rq\210`)\306\307\"\310=\306\311\"\306\312\"\306\313\"\306\314\"\306\315\"\206&