From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/86826 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.gnus.general Subject: Re: gssapi authentication for nnimap Date: Wed, 10 Feb 2016 15:30:39 +1100 Message-ID: <87twlhi3v4.fsf@gnus.org> References: <87oaecan6t.fsf@mid.deneb.enyo.de> <87d1sanxyx.fsf@gnus.org> <83a8ncfnkc.fsf@echidna.jochen.org> <8737t3g4hk.fsf@gnus.org> <831t8mgbpi.fsf@echidna.jochen.org> <87io1ykh0h.fsf@linux-m68k.org> <83vb5yhjpo.fsf@echidna.jochen.org> <87wpqeix2s.fsf@linux-m68k.org> <83zivammhs.fsf@echidna.jochen.org> <83wpqd4pk6.fsf@echidna.jochen.org> <87egcl795w.fsf@gnus.org> <83si1142u6.fsf@echidna.jochen.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1455078689 15838 80.91.229.3 (10 Feb 2016 04:31:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Feb 2016 04:31:29 +0000 (UTC) Cc: Andreas Schwab , ding@gnus.org, Florian Weimer To: Jochen Hein Original-X-From: ding-owner+M35051@lists.math.uh.edu Wed Feb 10 05:31:17 2016 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aTMQt-0008Ua-GS for ding-account@gmane.org; Wed, 10 Feb 2016 05:31:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.85) (envelope-from ) id 1aTMQo-00028L-JE; Tue, 09 Feb 2016 22:31:10 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.85) (envelope-from ) id 1aTMQm-00027q-Jp for ding@lists.math.uh.edu; Tue, 09 Feb 2016 22:31:08 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85) (envelope-from ) id 1aTMQl-00038j-Af for ding@lists.math.uh.edu; Tue, 09 Feb 2016 22:31:08 -0600 Original-Received: from hermes.netfonds.no ([80.91.224.195]) by quimby.gnus.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1aTMQj-00072v-VB for ding@gnus.org; Wed, 10 Feb 2016 05:31:05 +0100 Original-Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aTMQO-00088B-68; Wed, 10 Feb 2016 05:30:44 +0100 In-Reply-To: <83si1142u6.fsf@echidna.jochen.org> (Jochen Hein's message of "Wed, 10 Feb 2016 05:16:33 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-MailScanner-ID: 1aTMQO-00088B-68 MailScanner-NULL-Check: 1455683445.08456@BGm2di8D5v4psadXbQvhdw X-Spam-Status: No X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:86826 Archived-At: Jochen Hein writes: > That seems to be the way forward, yes. I guess that the wrapper willl > look a lot like open-protocol-stream... I'll have a try in the next few > days. An idea just occurred to me... This is the definition of open-network-stream is this: (open-network-stream NAME BUFFER HOST SERVICE &rest PARAMETERS) [...] :type specifies the connection type, one of the following: nil or =91network=92 -- Begin with an ordinary network connection, and if the parameters :success and :capability-command are also supplied, try to upgrade to an encrypted connection via STARTTLS. Even if that fails (e.g. if HOST does not support TLS), retain an unencrypted connection. =91plain=92 -- An ordinary, unencrypted network connection. =91starttls=92 -- Begin with an ordinary connection, and try upgrading via STARTTLS. If that fails for any reason, drop the connection; in that case the returned object is a killed process. =91tls=92 -- A TLS connection. =91ssl=92 -- Equivalent to =91tls=92. =91shell=92 -- A shell connection. We could extend this to `function', and that function would then deliver the socket top `open-network-stream'. It'd be exactly like `shell', but instead of calling the shell, we'd call the function. The function in this case would be a slight variation over open-gssapi-stream. Or rather, it would kinda look like this: (open-network-stream NAME BUFFER HOST SERVICE ... :type 'function :connection-function (lambda (name buffer host service parameters) (open-gssapi-stream name buffer server port nnimap= -user))) Wouldn't that do the trick with the minimal amount of hacking? If so, I can add the :type 'function to open-network-stream on the Emacs trunk... --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no