[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
open-{gnutls,network}-stream backwards compatibility
From: |
Robert Pluim |
Subject: |
open-{gnutls,network}-stream backwards compatibility |
Date: |
Wed, 02 Jan 2019 17:49:13 +0100 |
Hi,
Iʼm working on a fix for bug 33780 [1].
I have two questions:
1. As part of that fix, Iʼd like to change the signature of
open-gnutls-stream from
(open-gnutls-stream name buffer host service &optional nowait)
to
(open-gnutls-stream name buffer host service &optional nowait parameters)
Normally this would be fine, I think, except that the caller in
Emacs core derives the value of 'nowait' from the plist that would be
passed in via 'parameters' anyway, so Iʼm tempted to just change it
to:
(open-gnutls-stream name buffer host service &optional parameters)
then adjust the single in-core caller and have open-gnutls-stream
call plist-get.
Does anyone see any issue with doing this? I have no idea if this
function is used by external code, but the Emacs GnuTLS manual says
"You should not have to use the ‘gnutls.el’ functions directly." so
that should mean the calling convention is fair game. [2]
2. The whole reason for doing this is so that people can use client
certificates rather than passwords for authentication of network
connections. Of course, for this to work at all, all the callers
of open-network-stream [3] need to be updated to pass in
':client-certificate t' to cause 'auth-source' lookups to be
performed for those certificates.
Again Iʼm tempted to change open-network-stream such that not
specifying :client-certificate is the same as specifying t, so
that all Emacs core and external packages can take advantage of
the feature just by adjusting their .authinfo entries, similarly
to how password lookup automatically works today. However, this
would be a change in default behaviour, plus I know some people
are very sensitive to changes in this particular area, so I
thought Iʼd ask here before doing anything.
Cheers
Robert
Footnotes:
[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33780#17
[2] I could keep the single optional parameter, and have it be the
union of nil/t/plist, with nil/t referring to :nowait, but that
seems needlessly complicated
[3] Of which there are at least 12 in Emacs itself
- open-{gnutls,network}-stream backwards compatibility,
Robert Pluim <=
- Re: open-{gnutls,network}-stream backwards compatibility, Eli Zaretskii, 2019/01/02
- Re: open-{gnutls,network}-stream backwards compatibility, Robert Pluim, 2019/01/02
- Re: open-{gnutls,network}-stream backwards compatibility, Eli Zaretskii, 2019/01/02
- Re: open-{gnutls,network}-stream backwards compatibility, Robert Pluim, 2019/01/02
- Re: open-{gnutls,network}-stream backwards compatibility, Eli Zaretskii, 2019/01/04
- Re: open-{gnutls,network}-stream backwards compatibility, Robert Pluim, 2019/01/04
- Re: open-{gnutls,network}-stream backwards compatibility, Eli Zaretskii, 2019/01/05
- Re: open-{gnutls,network}-stream backwards compatibility, Robert Pluim, 2019/01/05
- Re: open-{gnutls,network}-stream backwards compatibility, Eli Zaretskii, 2019/01/05
- Re: open-{gnutls,network}-stream backwards compatibility, Robert Pluim, 2019/01/09