summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>2013-07-30 17:11:58 +0200
committerLars Magne Ingebrigtsen <larsi@gnus.org>2013-07-30 17:11:58 +0200
commitac38e731d9113628bd6823372d11b895f67a5e33 (patch)
treed4c7e88ff8b12f1d72bea43e97d7e0a4076f3335
parent1211de5030608968438ff84d53c7a7a8f016ea9d (diff)
downloademacs-ac38e731d9113628bd6823372d11b895f67a5e33.tar.gz
Allow talking to STARTTLS servers that have no greeting
* net/network-stream.el (open-network-stream): Mention the new :nogreeting parameter. (network-stream-open-starttls): Use the :nogreeting parameter. Fixes: debbugs:14938
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/net/network-stream.el6
2 files changed, 10 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d7d3c904226..62a11e229a1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,10 @@
2013-07-30 Lars Magne Ingebrigtsen <larsi@gnus.org>
+ * net/network-stream.el (open-network-stream): Mention the new
+ :nogreeting parameter.
+ (network-stream-open-starttls): Use the :nogreeting parameter
+ (bug#14938).
+
* net/shr.el (shr-mouse-browse-url): Remove and use `shr-browse-url'.
* net/eww.el (eww-setup-buffer): Switching to the buffer seems
diff --git a/lisp/net/network-stream.el b/lisp/net/network-stream.el
index fd21997ba28..ab7d02cc802 100644
--- a/lisp/net/network-stream.el
+++ b/lisp/net/network-stream.el
@@ -128,6 +128,9 @@ values:
:use-starttls-if-possible is a boolean that says to do opportunistic
STARTTLS upgrades even if Emacs doesn't have built-in TLS functionality.
+:nogreeting is a boolean that can be used to inhibit waiting for
+a greeting from the server.
+
:nowait is a boolean that says the connection should be made
asynchronously, if possible."
(unless (featurep 'make-network-process)
@@ -211,7 +214,8 @@ STARTTLS upgrades even if Emacs doesn't have built-in TLS functionality.
;; Return (STREAM GREETING CAPABILITIES RESULTING-TYPE)
(stream (make-network-process :name name :buffer buffer
:host host :service service))
- (greeting (network-stream-get-response stream start eoc))
+ (greeting (and (not (plist-get parameters :nogreeting))
+ (network-stream-get-response stream start eoc)))
(capabilities (network-stream-command stream capability-command
eo-capa))
(resulting-type 'plain)