diff options
Diffstat (limited to 'lisp/url/url-http.el')
| -rw-r--r-- | lisp/url/url-http.el | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 3d5b6be80ac..f5a214a89d8 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -25,7 +25,9 @@ ;;; Code: -(eval-when-compile (require 'cl-lib)) +(eval-when-compile + (require 'cl-lib) + (require 'subr-x)) (defvar url-callback-arguments) (defvar url-callback-function) @@ -492,7 +494,12 @@ should be shown to the user." (url-http-mark-connection-as-free (url-host url-current-object) (url-port url-current-object) url-http-process) - + ;; Pass the certificate on to the caller. + (when (gnutls-available-p) + (when-let (status (gnutls-peer-status url-http-process)) + (setcar url-callback-arguments + (plist-put (car url-callback-arguments) + :peer status)))) (if (or (not (boundp 'url-http-end-of-headers)) (not url-http-end-of-headers)) (error "Trying to parse headers in odd buffer: %s" (buffer-name))) |
