GNU bug report logs -
#22493
25.1.50; open-gnutls-stream doesn't respect :nowait, so the connections are synchronous
Previous Next
Reported by: Lars Ingebrigtsen <larsi <at> gnus.org>
Date: Sat, 30 Jan 2016 04:02:01 UTC
Severity: normal
Found in version 25.1.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Looking at the code, and doing some experimentation, it looks like this
should be possible to implement.
First of all, gnutls-open-stream should call open-network-stream with
:nowait, and put a sentinel on the stream to see when it's opened, and
then it should call gnutls-negotiate from the sentinel.
The problem is, though, that the process isn't marked as a gnutls
process until gnutls_boot is called, so this needs to happen much
earlier. Possibly by adding another keyword to make-network-process
that just sets
XPROCESS (proc)->gnutls_p = 1;
The other problem is that reading/writing from these things will just
send plain text if the gnutls stuff hasn't been initialised:
#ifdef HAVE_GNUTLS
if (p->gnutls_p && p->gnutls_state)
written = emacs_gnutls_write (p, cur_buf, cur_len);
else
#endif
written = emacs_write_sig (outfd, cur_buf, cur_len);
I think that looks rather nonsensical. If it's p->gnutls_p, then it
should never write to the process, no matter what the state is. Rather
is should just skip writing until p->gnutls_state gets set (which
happens during gnutls_boot).
Or is there something subtle here I'm missing? When would we ever want
to write plain text to something that's p->gnutls_p?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 9 years and 166 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.