diff options
| author | Lars Ingebrigtsen | 2016-01-31 02:32:21 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-01-31 02:32:21 +0100 |
| commit | cecf6c9ac58ecd9ea251241a6b8a18e0e01dbc2a (patch) | |
| tree | 3aeb6ebaa3f1418f48a99502107f1dae2703dd11 /lisp/url | |
| parent | 1f71df7aacf15dbf242c74a4b7a7ac8fe0984a3c (diff) | |
| download | emacs-cecf6c9ac58ecd9ea251241a6b8a18e0e01dbc2a.tar.gz emacs-cecf6c9ac58ecd9ea251241a6b8a18e0e01dbc2a.zip | |
Rework the mechanisms for async GnuTLS connections
* lisp/net/gnutls.el (open-gnutls-stream): Compute the
gnutls-boot parameters and pass them to the process object.
(gnutls-negotiate): New parameter :return-keywords that won't
connect to anything, just compute the keywords.
* lisp/url/url-http.el (url-http): Revert async TLS sentinel
hack, which is no longer necessary.
* src/gnutls.c (Fgnutls_asynchronous_parameters): Rename from
gnutls-mark-process.
* src/process.c (connect_network_socket): If we're connecting to
an asynchronous TLS socket, complete the GnuTLS boot sequence here.
* src/process.h: New parameter gnutls_async_parameters.
Diffstat (limited to 'lisp/url')
| -rw-r--r-- | lisp/url/url-http.el | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 43b2862e0ea..222dbc64d68 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el | |||
| @@ -1277,17 +1277,7 @@ The return value of this function is the retrieval buffer." | |||
| 1277 | (pcase (process-status connection) | 1277 | (pcase (process-status connection) |
| 1278 | (`connect | 1278 | (`connect |
| 1279 | ;; Asynchronous connection | 1279 | ;; Asynchronous connection |
| 1280 | (if (not (process-sentinel connection)) | 1280 | (set-process-sentinel connection 'url-http-async-sentinel)) |
| 1281 | (set-process-sentinel connection 'url-http-async-sentinel) | ||
| 1282 | ;; If we already have a sentinel on this process (for | ||
| 1283 | ;; instance on TLS connections), then chain them | ||
| 1284 | ;; together. | ||
| 1285 | (let ((old (process-sentinel connection))) | ||
| 1286 | (set-process-sentinel | ||
| 1287 | connection | ||
| 1288 | `(lambda (proc why) | ||
| 1289 | (funcall ',old proc why) | ||
| 1290 | (url-http-async-sentinel proc why)))))) | ||
| 1291 | (`failed | 1281 | (`failed |
| 1292 | ;; Asynchronous connection failed | 1282 | ;; Asynchronous connection failed |
| 1293 | (error "Could not create connection to %s:%d" host port)) | 1283 | (error "Could not create connection to %s:%d" host port)) |