From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: claudio.bley@gmail.com (Claudio Bley) Newsgroups: gmane.emacs.bugs Subject: bug#7789: cannot send smtpmail using gmail & tls on woe32 Date: Fri, 21 Jan 2011 15:32:33 +0100 Message-ID: <84pqrqxr7i.wl%claudio.bley@gmail.com> References: <83y66zmilu.fsf@gnu.org> <87hbdneymc.fsf@gnu.org> <84k4i4x87t.wl%claudio.bley@gmail.com> <84hbd6p6p6.wl%claudio.bley@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: dough.gmane.org 1295621707 16332 80.91.229.12 (21 Jan 2011 14:55:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 21 Jan 2011 14:55:07 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 21 15:55:01 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PgIOD-00082Q-5p for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Jan 2011 15:55:01 +0100 Original-Received: from localhost ([127.0.0.1]:46790 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PgIOC-00035p-AU for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Jan 2011 09:55:00 -0500 Original-Received: from [140.186.70.92] (port=42923 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PgIO1-00031a-2m for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2011 09:54:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PgINz-0006LX-Rr for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2011 09:54:48 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60572) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PgINz-0006LT-QB for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2011 09:54:47 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PgHwB-0002Bn-Tg; Fri, 21 Jan 2011 09:26:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: claudio.bley@gmail.com (Claudio Bley) Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Jan 2011 14:26:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7789 X-GNU-PR-Package: emacs,w32 X-GNU-PR-Keywords: Original-Received: via spool by submit@debbugs.gnu.org id=B.12956199278368 (code B ref -1); Fri, 21 Jan 2011 14:26:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Jan 2011 14:25:27 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PgHva-0002Av-HS for submit@debbugs.gnu.org; Fri, 21 Jan 2011 09:25:26 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PgHvX-0002Ai-Jm for submit@debbugs.gnu.org; Fri, 21 Jan 2011 09:25:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PgI3A-0000Tg-7S for submit@debbugs.gnu.org; Fri, 21 Jan 2011 09:33:17 -0500 Original-Received: from lists.gnu.org ([199.232.76.165]:38712) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PgI3A-0000Tc-0g for submit@debbugs.gnu.org; Fri, 21 Jan 2011 09:33:16 -0500 Original-Received: from [140.186.70.92] (port=41841 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PgI38-0003W3-9C for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2011 09:33:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PgI36-0000Sl-HX for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2011 09:33:13 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:53504) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PgI36-0000Rr-7m for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2011 09:33:12 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PgI32-0001SX-M2 for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2011 15:33:08 +0100 Original-Received: from 178-24-235-97-dynip.superkabel.de ([178.24.235.97]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 21 Jan 2011 15:33:08 +0100 Original-Received: from claudio.bley by 178-24-235-97-dynip.superkabel.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 21 Jan 2011 15:33:08 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: bug-gnu-emacs@gnu.org Original-Lines: 77 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 178-24-235-97-dynip.superkabel.de Mail-Copies-To: never In-Reply-To: User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?Q?Goj=C5=8D?=) APEL/10.8 Emacs/23.2 (i386-mingw-nt5.1.2600) MULE/6.0 (HANACHIRUSATO) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 21 Jan 2011 09:26:03 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:43505 Archived-At: At Tue, 18 Jan 2011 17:45:42 -0500, Eli Zaretskii wrote: > > > From: claudio.bley@gmail.com (Claudio Bley) > > Date: Tue, 18 Jan 2011 16:33:41 +0100 > > Cc: > > > > > > gnutls-cli waits for a SIGALRM to initiate the STARTTLS handshake -- > > > > which Emacs isn't able to send -- or, alternatively, an EOF -- which > > > > doesn't work because communication is done over a pipe instead of a > > > > PTY. > > > > > > Is this a bug in the ported gnutls, in Emacs, or in both? > > > > I'd say it's a deficiency of the platform. > > A port that doesn't take platform deficiencies into consideration is a > broken port. I was asking where should the correction be: in gnutls > or in Emacs, or in both? Well, incorporate GNU TLS into Emacs and you're done. Any OS needs cryptographic and security features nowadays, no? > > Woe32 has no signal and no PTY support. So, the signal support > > has been ifdef'ed out in gnutls and Emacs for Woe32. > > If it has been ifdefed out, how are users supposed to do on Windows > what they do on GNU/Linux by using signals? Since you only need to signal gnutls-cli once that it should negotiate the TLS connection, it would be sufficient to set a boolean flag of some sort. One may use an event e.g. called "gnutls-cli-" and provide an auxiliary program which is able to signal events by a given name. You could also use a socket. Since Emacs is already able to use sockets that would only require a change in GNU TLS. > > > > I'm using cygwin's gnutls-cli and have hacked ssl.el in order to > > > > replace the signal-process calls with (call-process "kill.exe" nil nil > > > > nil "-ALRM" PID). This works because cygwin provides its own layer of > > > > signal handling and is able to send / receive the SIGALRM signal. > > > > > > How about making that hack part of Emacs? It could be conditioned on > > > running on Windows. > > > > You mean to distribute cygwin's kill.exe with Emacs and just using it > > instead of `signal-process' everywhere? Or to depend upon the user to > > install a cygwin environment along with Emacs? > > The latter, and also that hack in ssl.el you need for that. Sorry, I actually meant to say that I hacked starttls.el for that matter. > Is there a better way that's practical? It is more awkward to ask > users to change platforms, or tell them to fix gnutls by themselves, > no? > > > IMHO, it would be better to let the programs work together on all > > platforms using different means of notification where necessary, > > e.g. using events on windows instead of signals...?! But that would > > indeed require an appropriate change on both sides. > > Exactly. I'm trying to establish whether there's a less painful way, > even if it's less elegant. I just discovered that gnutls-cli is barely usable compiled on native Woe32 because it uses (must use) polling of stdin, stdout file descriptors which means 100% CPU usage when idle and connected to a pipe instead of a real console. Oh my... So, it seems that the least painful way is to use Cygwin's gnutls-cli and its kill command. It's still painful, though. And it's actually a bit slow compared to running it under Linux -- maybe that's because of the extra layer(s) of Cygwin...