%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/share/emacs/27.2/lisp/net/
Upload File :
Create Path :
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!\205MD)\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&\211\316\317
\320\321\322!\323&\306	\324\"?\205F\325	#\326#\327\330\211\211\203d\n\203d\203d!\262\203\251\331 \206\202\f\204z\306\332\"\205\202\333\310!\205\202\334 \211\262\203\251\306\307\"\327=\204\251\331 \204\f\335!\210rq\210d)\262\f\204\260\336\235\203\264\202\267\336B	\337#\211\203\344\340\341@!\342\341A@!F\244\343\341@!\344\341A@!F	\244\345$\262*\210\325#\210\306\346\"\203\f\326\n#\210\326#\211\205\347\f\"\262\203\251\331 \203T\337#\3501J\351\352	\353\322!\354\205DC&0\202O\210\335!\266\202`\355!\204`\335!\210\356!\357>\203o\360\262\202\220\f\204\220\316\317\320\321\322!\323&\262\325#\210\361!\204\237\362\363#\210\326\n#\262\f\203\346\327=\203\346\203\274\203\300\364\202\334\n\365>\204\314\366\310!\204\320\367\202\334\370\203\331\f\202\332
\371Q\262\335!\210\330\262\331 \203\376\372\360=\306\373\"%\262\257\207" [starttls-extra-arguments starttls-extra-args system-type starttls-use-gnutls starttls-gnutls-program starttls-program plist-get :type starttls :starttls-function :success :capability-command :end-of-command :end-of-capability make-network-process :name :buffer :host puny-encode-domain :service :nogreeting network-stream-get-response network-stream-command plain nil gnutls-available-p :use-starttls-if-possible require starttls-available-p delete-process "--insecure" network-stream-certificate "--x509keyfile" expand-file-name "--x509certfile" "--key-file" "--cert-file" starttls-open-stream :always-query-capabilities string-match (gnutls-error) gnutls-negotiate :process :hostname :keylist starttls-negotiate process-status (open run) tls process-live-p error "Unable to negotiate a TLS connection with %s/%s" "Server does not support TLS" (windows-nt ms-dos) featurep "Emacs does not support TLS" "Emacs does not support TLS, and no external `" "' program was found" nsm-verify-connection :warn-unless-encrypted] 28 (#$ . 8251)])
#@27 

(fn STREAM COMMAND EOC)
(defalias 'network-stream-command #[771 "\205r\300!q\210d)\301\"\210\302#\262\207" [process-buffer process-send-string network-stream-get-response] 8 (#$ . 10512)])
#@36 

(fn STREAM START END-OF-COMMAND)
(defalias 'network-stream-get-response #[771 "\211\2054r\300!q\210\212b\210\301!\302>\203)\303\304\305#\204)\306\307\"\210b\210\202`U?\2053`{*\207" [process-buffer process-status (open run) re-search-forward nil t accept-process-output 0.05] 7 (#$ . 10719)])
#@44 

(fn NAME BUFFER HOST SERVICE PARAMETERS)
(defalias 'network-stream-open-tls #[1285 "rq\210d\300 \203\301%\202'\302\303!\210\304$\305\306\"\305\307\"\203:\310\211\303F\202\231\300 \203L\203L\311#\262\204X\310\211\211\312F\202\231\300 \204{\211\203{\313#\210eb\210\314\310\315#\203{\316\224b\210e\317 |\210\305\320\"\305\321\"\206\207\313#\322#\303F\266\202\266\203)\207" [gnutls-available-p open-gnutls-stream require tls open-tls-stream plist-get :end-of-command :nowait nil nsm-verify-connection plain network-stream-get-response re-search-forward t 0 line-beginning-position :capability-command :end-of-capability network-stream-command] 16 (#$ . 11033)])
#@44 

(fn NAME BUFFER HOST SERVICE PARAMETERS)
(defalias 'network-stream-open-shell #[1285 "\303\304!\210\305\306\"\305\307\"rq\210`)\310\311	\n\304\305\n\312\"\313\314\315$\"%)\211\316#\317\305\n\320\"\206A#\321F\207" [process-connection-type shell-file-name shell-command-switch require format-spec plist-get :capability-command :end-of-command nil start-process :shell-command format-spec-make 115 112 network-stream-get-response network-stream-command :end-of-capability plain] 20 (#$ . 11759)])
(provide 'network-stream)

Zerion Mini Shell 1.0