%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/gnutls.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\303\304\305\306\307\310\311\312\313\314&	\210\315\316\305\317\313\304\320\321&\210\315\322\305\323\313\304\307\324\320\325&	\210\315\326\327\330\313\304\320\331&\210\315\332\305\333\320\334\313\304\307\335&	\210\315\336\337\340\313\304\320\341\307\335&	\207" [require cl-lib puny custom-declare-group gnutls nil "Emacs interface to the GnuTLS library." :version "24.1" :prefix "gnutls-" :group comm custom-declare-variable gnutls-algorithm-priority "If non-nil, this should be a TLS priority string.\nFor instance, if you want to skip the \"dhe-rsa\" algorithm,\nset this variable to \"normal:-dhe-rsa\".\n\nThis variable can be useful for modifying low-level TLS\nconnection parameters (for instance if you need to connect to a\nhost that only accepts a specific algorithm).  However, in\ngeneral, Emacs network security is handled by the Network\nSecurity Manager (NSM), and the default value of nil delegates\nthe job of checking the connection security to the NSM.\nSee Info node `(emacs) Network Security'." :type (choice (const nil) string) gnutls-verify-error "If non-nil, this should be t or a list of checks per hostname regex.\nIf nil, the default, failures in certificate verification will be\nlogged (subject to `gnutls-log-level'), but the connection will be\nallowed to proceed.\nIf the value is a list, it should have the form\n\n   ((HOST-REGEX FLAGS...) (HOST-REGEX FLAGS...) ...)\n\nwhere each HOST-REGEX is a regular expression to be matched\nagainst the hostname, on a first-match basis, and FLAGS is either\nt or a list of one or more verification flags.  The supported\nflags and the corresponding conditions to be tested are:\n\n  :trustfiles -- certificate must be issued by a trusted authority.\n  :hostname   -- hostname must match presented certificate's host name.\n  t           -- all of the above conditions are tested.\n\nIf the condition test fails, an error will be signaled.\n\nIf the value of this variable is t, every connection will be subjected\nto all of the tests described above.\n\nThe default value of this variable is nil, which means that no\nchecks are performed at the gnutls level.  Instead the checks are\nperformed via `open-network-stream' at a higher level by the\nNetwork Security Manager.  See Info node `(emacs) Network\nSecurity'." "24.4" (choice (const t) (repeat :tag "List of hostname regexps with flags for each" (list (choice :tag "Hostname" (const ".*" :tag "Any hostname") regexp) (set (const :trustfiles) (const :hostname))))) gnutls-trustfiles '("/etc/ssl/certs/ca-certificates.crt" "/etc/pki/tls/certs/ca-bundle.crt" "/etc/ssl/ca-bundle.pem" "/usr/ssl/certs/ca-bundle.crt" "/usr/local/share/certs/ca-root-nss.crt" "/etc/ssl/cert.pem" "/etc/certs/ca-certificates.crt") "List of CA bundle location filenames or a function returning said list.\nIf a file path contains glob wildcards, they will be expanded.\nThe files may be in PEM or DER format, as per the GnuTLS documentation.\nThe files may not exist, in which case they will be ignored." (choice (function :tag "Function to produce list of bundle filenames") (repeat (file :tag "Bundle filename"))) gnutls-min-prime-bits "Minimum number of prime bits accepted by GnuTLS for key exchange.\nDuring a Diffie-Hellman handshake, if the server sends a prime\nnumber with fewer than this number of bits, the handshake is\nrejected.  (The smaller the prime number, the less secure the\nkey exchange is against man-in-the-middle attacks.)\n\nA value of nil says to use the default GnuTLS value.\n\nThe default value of this variable is such that virtually any\nconnection can be established, whether this connection can be\nconsidered cryptographically \"safe\" or not.  However, Emacs\nnetwork security is handled at a higher level via\n`open-network-stream' and the Network Security Manager.  See Info\nnode `(emacs) Network Security'." (choice (const :tag "Use default value" nil) (integer :tag "Number of bits" 2048)) "27.1" gnutls-crlfiles '("/etc/grid-security/certificates/*.crl.pem") "List of CRL file paths or a function returning said list.\nIf a file path contains glob wildcards, they will be expanded.\nThe files may be in PEM or DER format, as per the GnuTLS documentation.\nThe files may not exist, in which case they will be ignored." (choice (function :tag "Function to produce list of CRL filenames") (repeat (file :tag "CRL filename")))] 10)
#@1492 Open a SSL/TLS connection for a service to a host.
Returns a subprocess-object to represent the connection.
Input and output work as for subprocesses; `delete-process' closes it.
Args are NAME BUFFER HOST SERVICE.
NAME is name for process.  It is modified if necessary to make it unique.
BUFFER is the buffer (or `buffer-name') to associate with the process.
 Process output goes at end of that buffer, unless you specify
 a filter function to handle the output.
 BUFFER may be also nil, meaning that this process is not associated
 with any buffer
Third arg HOST is the name of the host to connect to, or its IP address.
Fourth arg SERVICE is the name of the service desired, or an integer
specifying a port number to connect to.
Fifth arg PARAMETERS is an optional list of keyword/value pairs.
Only :client-certificate and :nowait keywords are recognized, and
have the same meaning as for `open-network-stream'.
For historical reasons PARAMETERS can also be a symbol, which is
interpreted the same as passing a list containing :nowait and the
value of that symbol.

Usage example:

  (with-temp-buffer
    (open-gnutls-stream "tls"
                        (current-buffer)
                        "your server goes here"
                        "imaps"))

This is a very simple wrapper around `gnutls-negotiate'.  See its
documentation for the specific parameters you can use to open a
GnuTLS connection, including specifying the credential type,
trust and key files, and priority string.
(defalias 'open-gnutls-stream #[(name buffer host service &optional parameters) "9\203\306D\202$\307G!\204\310\311!\202$:\203!\202$\310\312!\313	\n#\211\2051C\314\306\"\315	\n\306
\316
\205R\317\320\321\317\322\f\323\324	!&B&
\203_\202m\325\326\321\317\322\f\323\324	!&-\207" [parameters host service cert keylist nowait :nowait cl-evenp error "Malformed keyword list" "Unknown parameter type" network-stream-certificate plist-get open-network-stream :tls-parameters gnutls-x509pki gnutls-boot-parameters :type :keylist :hostname puny-encode-domain gnutls-negotiate :process name buffer process] 18 (#$ . 4823)])
(define-error 'gnutls-error "GnuTLS error")
#@449 Negotiate a SSL/TLS connection.  Returns proc.  Signals gnutls-error.

Note that arguments are passed CL style, :type TYPE instead of just TYPE.

PROCESS is a process returned by `open-network-stream'.
For the meaning of the rest of the parameters, see `gnutls-boot-parameters'.

(fn &rest SPEC &key PROCESS TYPE HOSTNAME PRIORITY-STRING TRUSTFILES CRLFILES KEYLIST MIN-PRIME-BITS VERIFY-FLAGS VERIFY-ERROR VERIFY-HOSTNAME-ERROR &allow-other-keys)
(defalias 'gnutls-negotiate #[(&rest spec) "\306\307\"A@\306\310\"A@\306\311\"A@\306\312\"A@\306\313\"A@\306\314\"A@\306\315\"A@\306\316\"A@ \306\317\"A@!\306\320\"A@\"\306\321\"A@#\n\206X\322\323$\324\310\n\311\312\f\313
\314\315\316 \317!\320\"\321#&%\323&\325\326	\n\327\330\331D%\"#\211&\332%#\210\333&!\203\241\334\335	&D\"\210	.\207" [spec process type hostname priority-string trustfiles plist-member :process :type :hostname :priority-string :trustfiles :crlfiles :keylist :min-prime-bits :verify-flags :verify-error :verify-hostname-error gnutls-x509pki nil gnutls-boot-parameters gnutls-message-maybe gnutls-boot append :complete-negotiation t "boot: %s" gnutls-errorp signal gnutls-error crlfiles keylist min-prime-bits verify-flags verify-error verify-hostname-error file-name-handler-alist params ret] 21 (#$ . 7015)])
#@2365 Return a keyword list of parameters suitable for passing to `gnutls-boot'.

TYPE is `gnutls-x509pki' (default) or `gnutls-anon'.  Use nil for the default.
HOSTNAME is the remote hostname.  It must be a valid string.
PRIORITY-STRING is as per the GnuTLS docs, default is based on "NORMAL".
TRUSTFILES is a list of CA bundles.  It defaults to `gnutls-trustfiles'.
CRLFILES is a list of CRL files.
KEYLIST is an alist of (client key file, client cert file) pairs.
MIN-PRIME-BITS is the minimum acceptable size of Diffie-Hellman keys
(see `gnutls-min-prime-bits' for more information).  Use nil for the
default.

VERIFY-HOSTNAME-ERROR is a backwards compatibility option for
putting `:hostname' in VERIFY-ERROR.

When VERIFY-ERROR is t or a list containing `:trustfiles', an
error will be raised when the peer certificate verification fails
as per GnuTLS' gnutls_certificate_verify_peers2.  Otherwise, only
warnings will be shown about the verification failure.

When VERIFY-ERROR is t or a list containing `:hostname', an error
will be raised when the hostname does not match the presented
certificate's host name.  The exact verification algorithm is a
basic implementation of the matching described in
RFC2818 (HTTPS), which takes into account wildcards, and the
DNSName/IPAddress subject alternative name PKIX extension.  See
GnuTLS' gnutls_x509_crt_check_hostname for details.  Otherwise,
only a warning will be issued.

Note that the list in `gnutls-verify-error', matched against the
HOSTNAME, is the default VERIFY-ERROR.

VERIFY-FLAGS is a numeric OR of verification flags only for
`gnutls-x509pki' connections.  See GnuTLS' x509.h for details;
here's a recent version of the list.

    GNUTLS_VERIFY_DISABLE_CA_SIGN = 1,
    GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT = 2,
    GNUTLS_VERIFY_DO_NOT_ALLOW_SAME = 4,
    GNUTLS_VERIFY_ALLOW_ANY_X509_V1_CA_CRT = 8,
    GNUTLS_VERIFY_ALLOW_SIGN_RSA_MD2 = 16,
    GNUTLS_VERIFY_ALLOW_SIGN_RSA_MD5 = 32,
    GNUTLS_VERIFY_DISABLE_TIME_CHECKS = 64,
    GNUTLS_VERIFY_DISABLE_TRUSTED_TIME_CHECKS = 128,
    GNUTLS_VERIFY_DO_NOT_ALLOW_X509_V1_CA_CRT = 256

It must be omitted, a number, or nil; if omitted or nil it
defaults to GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT.

(fn &rest SPEC &key TYPE HOSTNAME PRIORITY-STRING TRUSTFILES CRLFILES KEYLIST MIN-PRIME-BITS VERIFY-FLAGS VERIFY-ERROR VERIFY-HOSTNAME-ERROR &allow-other-keys)
(defalias 'gnutls-boot-parameters #[(&rest spec) "\306\307\"A@\306\310\"A@\306\311\"A@\306\312\"A@\306\313\"A@\306\314\"A@!\306\315\"A@\"\306\316\"A@#\306\317\"A@$\306\320\"A@%\f\206Q\321 
\206X\322 \323\324 >\203d\325\202e\326&\206\213	\327\267\202\212\330&P\202\213'\203\203'\226\202\213\331&P\202\213\332$\206\255(\333=\203\234\333\202\255(<\203\254\334\335(\"A@\202\255\332$\"\206\266)\"%\203\303\310$B$\336\310\n\337*\315\"\312\f\313
\314!\316#\317$.\340BBBBBBBBBBBBBBBBBB\207" [spec type hostname priority-string trustfiles crlfiles plist-member :type :hostname :priority-string :trustfiles :crlfiles :keylist :min-prime-bits :verify-flags :verify-error :verify-hostname-error gnutls-trustfiles gnutls-crlfiles ClientHello\ Padding gnutls-available-p ":%DUMBFW" "" #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (gnutls-anon 113 gnutls-x509pki 120)) "NORMAL:+ANON-DH:!ARCFOUR-128" "NORMAL" nil t cl-find-if #[(x) "\302@	\"\207" [x hostname string-match] 3] :priority :loglevel (:callbacks nil) keylist min-prime-bits verify-flags verify-error verify-hostname-error maybe-dumbfw gnutls-algorithm-priority gnutls-verify-error gnutls-min-prime-bits gnutls-log-level] 19 (#$ . 8349)])
(defalias 'gnutls--get-files #[(files) "\304\211	:\2032	@\211\203\305\n!\203\n \202\n\306\307\310\311\n\312\"\"!\244	A\211\202\237+\207" [files #1=#:--cl-var-- f #2=#:--cl-var-- nil functionp reverse cl-delete-if-not file-exists-p file-expand-wildcards t] 7])
#@37 Return a list of usable trustfiles.
(defalias 'gnutls-trustfiles #[nil "\301!\207" [gnutls-trustfiles gnutls--get-files] 2 (#$ . 12288)])
#@36 Return a list of usable CRL files.
(defalias 'gnutls-crlfiles #[nil "\301!\207" [gnutls-crlfiles gnutls--get-files] 2 (#$ . 12433)])
#@71 When DOIT, message with the caller name followed by FORMAT on PARAMS.
(defalias 'gnutls-message-maybe #[(doit format &rest params) "\303!\205\304\305\306\307!\310\311	\n\206\312#%\207" [doit format params gnutls-errorp message "%s: (err=[%s] %s) %s" "gnutls.el" gnutls-error-string apply format-message (nil)] 9 (#$ . 12573)])
(provide 'gnutls)

Zerion Mini Shell 1.0