;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 "\301\302!\210\301\303!\210\301\304!\210\301\305!\210\301\306!\210\301\307!\210\310\300!\203L�\311W\203L�\312\313!\210\314\315\316\317\313$\210\320\315\313\"\210\314\321\322\317\313$\210\320\321\313\"\210\314\323\324\325\313$\210\320\323\313\"\210\313\207" [emacs-major-version require url-auth url-http url-util mail-parse cl-lib ntlm boundp 25 (lambda (#1=#:def-tmp-var) (defvar url-http-ntlm--parsing-headers #1#)) nil ad-add-advice url-http-parse-headers (clear-authorization nil t (advice lambda nil (let ((url-http-ntlm--parsing-headers t)) ad-do-it))) around ad-activate url-http-handle-authentication (clear-authorization nil t (advice lambda nil (let ((url-http-ntlm--parsing-headers nil)) ad-do-it))) url-retrieve-internal (clear-authorization nil t (advice lambda nil (when (and url-http-ntlm--parsing-headers (eq url-request-extra-headers url-http-extra-headers)) (setq url-http-extra-headers (cl-remove "Authorization" url-http-extra-headers :key #'car :test #'equal)) (setq url-request-extra-headers url-http-extra-headers)))) before] 5)
#@155 Authentication storage.
An alist that maps a server name to a pair of (<username> <ntlm
hashes>).

The hashes are built using `ntlm-get-password-hashes'.
(defvar url-http-ntlm--auth-storage nil (#$ . 1473))
#@98 The last `url-http-ntlm--get-stage' arguments and result.
This is used to detect multiple calls.
(defvar url-http-ntlm--last-args nil (#$ . 1686))
(make-variable-buffer-local 'url-http-ntlm--last-args)
#@105 A hash table used to detect NTLM negotiation errors.
Keys are urls, entries are (START-TIME . COUNTER).
(defvar url-http-ntlm--loop-timer-counter nil (#$ . 1895))
#@55 An alist that stores one default username per server.
(defvar url-http-ntlm--default-users nil (#$ . 2064))
#@56 Detect potential infinite loop when NTLM fails on URL.
(defalias 'url-http-ntlm--detect-loop #[(url) "\204	�\306\307\310\"\311	!\312\n\"\211@A\203T�\313 \fZ\314W\203I�
\315W\2036�\316\n\f
TB#\202\\�\317\n\320\"\210\321\n\"\210\322\323\324\n\"!\202\\�\316\n\313 \325B#\202\\�\316\n\313 \325B#,\207" [url-http-ntlm--loop-timer-counter url url-string last-entry start-time counter make-hash-table :test equal url-recreate-url gethash float-time 10.0 20 puthash url-http-ntlm--authorization :clear remhash error format "Access rate to %s is too high, indicating an NTLM failure; to debug, re-run with url-debug set to 1" 0] 5 (#$ . 2178)])
#@141 Return URL with its user slot set.
If URL's user slot is nil, set it to the last user that made a
request to the host in URL's server slot.
(defalias 'url-http-ntlm--ensure-user #[(url) "\305	!\n>\204�\306\307\300	D\"\210	\310H\203�	\202H�\305	!\n>\204*�\306\307\300	D\"\210	\211\310\311\305	!\n>\204>�\306\307\300	D\"\210	\312H\f\"AI\210)	)\207" [url new-url cl-struct-url-tags #1=#:v url-http-ntlm--default-users type-of signal wrong-type-argument 2 assoc 4] 8 (#$ . 2834)])
#@62 Report an error if `url-http-attempt-keepalives' is not set.
(defalias 'url-http-ntlm--ensure-keepalive #[nil "\204�\301\300\302\303\211$\210\303\207" [url-http-attempt-keepalives cl--assertion-failed "NTLM authentication won't work unless `url-http-attempt-keepalives' is set!" nil] 5 (#$ . 3322)])
#@67 Remove Authorization element from `url-http-extra-headers' alist.
(defalias 'url-http-ntlm--clean-headers #[nil "\301\302\"\211\207" [url-http-extra-headers url-http-ntlm--rmssoc "Authorization"] 3 (#$ . 3630)])
#@218 Determine what stage of the NTLM handshake we are at.
ARGS comes from `url-ntlm-auth''s caller,
`url-get-authentication'.  Its meaning depends on the current
implementation -- this function is well and truly coupled.
(defalias 'url-http-ntlm--get-stage #[(args) "\306\307\310\311\n\"\312\313\314\315\316p#\210\314\315\317#\210\314\315\320#\210@=\2038�\314\315\321A#\210A\202\226�\203H�\322A\"\203H�\323\202\212�G\324U\203\211�\211G\324U\203e�\211A\242\202m�\325\326\313GD\"@\211@\327\230\205\201�\322	@\"+\203\211�\330\202\212�\331\332 \210
B
)-\207" [response-rxp challenge-rxp url-http-extra-headers auth-header case-fold-search stage "^NTLM TlRMTVNTUAADAAA" "^TLRMTVNTUAACAAA" assoc "Authorization" t nil url-debug url-http-ntlm "Buffer: %s" "Arguments: %s" "Previous arguments: %s" "Returning previous result: %s" string-match :error 2 signal wrong-number-of-arguments "ntlm" :response :request url-http-ntlm--clean-headers args url-http-ntlm--last-args #1=#:--cl-rest-- challenge ntlm] 5 (#$ . 3851)])
#@309 Get or clear NTLM authentication details for URL.
If CLEAR is non-nil, clear any saved credentials for server.
Otherwise, return the credentials, prompting the user if
necessary.  REALM appears in the prompt.

If URL contains a username and a password, they are used and
stored credentials are not affected.
(defalias 'url-http-ntlm--authorization #[(url &optional clear realm) ";\203�\306!\202\f�\307	!\n>\204�\310\311\300	D\"\210	\312H\307	!\n>\204/�\310\311\300	D\"\210	\313H\307	!\n>\204B�\310\311\300	D\"\210	\314H\307	!\n>\204U�\310\311\300	D\"\210	\315H$\307	!\n>\204i�\310\311\300	D\"\210	\316H%\317\f
$F&\"'\f\205\200�%()\203\237�(?\205:\320
*\"*\320\321&\"&\322\202:(\204\274�'\203\267�\f\203\267�\f'@A@\232\203\274�'\2048\f\206\347�\323
\324#\206\347�\325+\326\206\334�\327\330!\331\332 \333\334#\"\335Q\266\202\f\206\346�\336 \",(\203\363�%\202\323
\337#\206\340\341\342\330!\"!-,
$F\211.\343-!D/(\2042
,B\320
*\"B*/\320.&\"B&/,\202:'.\207" [url href cl-struct-url-tags type user server url-generic-parse-url type-of signal wrong-type-argument 1 2 4 5 3 assoc url-http-ntlm--rmssoc (type user* server port) nil url-do-auth-source-search :user read-string "Username [for " url-truncate-url-for-viewing url-recreate-url - window-width 10 20 "]: " user-real-login-name :secret read-passwd format "Password [for %s]: " ntlm-get-password-hashes port pass url-http-ntlm--auth-storage stored both clear url-http-ntlm--default-users realm user* pass* key entry] 11 (#$ . 4910)])
#@118 Return the NTLM Type-2 message in the WWW-Authenticate header.
Return nil if the NTLM Type-2 message is not present.
(defalias 'url-http-ntlm--get-challenge #[nil "\214\301 \210\302\303!\304\305\"\205�\306\307\310\"!*\207" [www-authenticate mail-narrow-to-head mail-fetch-field "www-authenticate" string-match "NTLM\\s-+\\(\\S-+\\)" base64-decode-string match-string 1] 4 (#$ . 6464)])
#@55 Remove all elements whose `car' match KEY from ALIST.
(defalias 'url-http-ntlm--rmssoc #[(key alist) "\302	\303\304\305\306&\207" [key alist cl-remove :key car :test equal] 7 (#$ . 6860)])
#@40 Return DATA encoded as an NTLM string.
(defalias 'url-http-ntlm--string #[(data) "\301\302\303\"P\207" [data "NTLM " base64-encode-string :nobreak] 4 (#$ . 7057)])
#@992 Return an NTLM HTTP authorization header.
Get the contents of the Authorization header for a HTTP response
using NTLM authentication, to access URL.  Because NTLM is a
two-step process, this function expects to be called twice, first
to generate the NTLM type 1 message (request), then to respond to
the server's type 2 message (challenge) with a suitable response.

url-get-authentication' calls `url-ntlm-auth' once when checking
what authentication schemes are supported (PROMPT and ARGS are
nil), and then twice for every stage of the handshake: the first
time PROMPT is nil, the second, t; ARGS contains the server
response's "WWW-Authenticate" header, munged by
`url-parse-args'.

If PROMPT is not t then this function just returns nil.  This is
to avoid calculating responses twice.

OVERWRITE and REALM are ignored.

ARGS is expected to contain the WWW-Authentication header from
the server's last response.  These are used by
`url-http-get-stage' to determine what stage we are at.
(defalias 'url-ntlm-auth #[(url &optional prompt overwrite realm args) "\306=\205\255�\307 \210\310	!\311!\312\313\314\f#\210\315\f\316\"\203[�\317\n!\210\320\n\321
#\211\211A\242\211A\242\203J�\322\323\321\324G\\D\"\210AA@\205W�\325\326\321!!+\202\254�\315\f\327\"\203\241�\317\n!\210\330 \320\n\321
#\211 G\324U\203\202� \211A \242\202\212�\322\323\321 GD\" @\325\331A@#!,\202\254�\315\f\332\"\205\254�\320\n\333\"*\207" [prompt url user-url args stage realm t url-http-ntlm--ensure-keepalive url-http-ntlm--ensure-user url-http-ntlm--get-stage url-debug url-http-ntlm "Stage: %s" eql :request url-http-ntlm--detect-loop url-http-ntlm--authorization nil signal wrong-number-of-arguments 2 url-http-ntlm--string ntlm-build-auth-request :response url-http-ntlm--get-challenge ntlm-build-auth-response :error :clear #1=#:--cl-rest-- key hash challenge #2=#:--cl-rest--] 6 (#$ . 7229)])
(byte-code "\300\301\302\303#\210\304\305!\207" [url-register-auth-scheme "ntlm" nil 8 provide url-http-ntlm] 4)