GNU bug report logs - #33780
network-stream.el: network-stream-certificate always returns nil

Previous Next

Package: emacs;

Reported by: Vinothan Shankar <darael <at> dracon.is>

Date: Mon, 17 Dec 2018 19:17:01 UTC

Severity: normal

Tags: fixed

Fixed in version 27.1

Done: Robert Pluim <rpluim <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #38 received at 33780 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: darael <at> dracon.is, tzz <at> lifelogs.com, 33780 <at> debbugs.gnu.org
Subject: Re: bug#33780: network-stream.el: network-stream-certificate always
 returns nil
Date: Mon, 14 Jan 2019 18:40:59 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Robert Pluim <rpluim <at> gmail.com>
>> Cc: darael <at> dracon.is,  tzz <at> lifelogs.com,  33780 <at> debbugs.gnu.org
>> Date: Mon, 14 Jan 2019 17:25:55 +0100
>> 
>> When running the test suite, weʼre in batch mode, so thereʼs no way to
>> answer that question, as far as I know, so turning off the nsm is the
>> only way to go.
>
> You could also override the nsm-query-user function, I think.
>

True.

>> This only fails for the existing tests with ':nowait t', since then I
>> suspect nsm gets called automatically, whilst in the ':nowait nil'
>> case nsm never gets called (the existing tests all use
>> 'make-network-process' directly, rather than 'open-network-stream', so
>> they bypass nsm).
>
> I don't think I understood why nsm gets called only in the ":nowait t"
> case.  What did I miss?

process.c has:

#ifdef HAVE_GNUTLS
static void
finish_after_tls_connection (Lisp_Object proc)
{
  struct Lisp_Process *p = XPROCESS (proc);
  Lisp_Object contact = p->childp;
  Lisp_Object result = Qt;

  if (!NILP (Ffboundp (Qnsm_verify_connection)))
    result = call3 (Qnsm_verify_connection,
		    proc,
		    Fplist_get (contact, QChost),
		    Fplist_get (contact, QCservice));

so loading nsm.el causes nsm-verify-connection to get called in the
':nowait t' case. Presumably in the ':nowait nil' case gnutls-boot has
already completed the tls connection, and finish_after_tls_connection
never gets called (thatʼs speculation on my part). I donʼt know the
GnuTLS code well enough to know if this is a bug. Ted?

Robert




This bug report was last modified 6 years and 116 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.