From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: GnuTLS per-connection variables Date: Thu, 24 Nov 2016 13:50:30 +0100 Message-ID: <874m2xm489.fsf@gmx.de> References: <87r36x7kb9.fsf@gmx.de> <87wpgoofp3.fsf@lifelogs.com> <87mvhk4h9c.fsf@gmx.de> <87a8dk77do.fsf@lifelogs.com> <87zilk5jq3.fsf@gmx.de> <87pomf5o82.fsf@lifelogs.com> <87shqu5fcl.fsf@gmx.de> <87fumsyefh.fsf_-_@lifelogs.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1479991849 32339 195.159.176.226 (24 Nov 2016 12:50:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 24 Nov 2016 12:50:49 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 24 13:50:42 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c9tUA-0007Td-01 for ged-emacs-devel@m.gmane.org; Thu, 24 Nov 2016 13:50:42 +0100 Original-Received: from localhost ([::1]:39544 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9tUD-0000X8-HL for ged-emacs-devel@m.gmane.org; Thu, 24 Nov 2016 07:50:45 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9tU7-0000X0-Pi for emacs-devel@gnu.org; Thu, 24 Nov 2016 07:50:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9tU4-0002d3-G9 for emacs-devel@gnu.org; Thu, 24 Nov 2016 07:50:39 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:54664) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c9tU3-0002a8-UA for emacs-devel@gnu.org; Thu, 24 Nov 2016 07:50:36 -0500 Original-Received: from detlef.gmx.de ([87.146.62.107]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MZ7bs-1cSXMS0jIy-00Kzeg for ; Thu, 24 Nov 2016 13:50:32 +0100 X-Provags-ID: V03:K0:Pm7gRWhMX9A5PnM7JylD5eSPzMLPgE8dHMwQ9ql1bHPTuPjPii4 Vo79ciZZjeWR8VybMIQ+iFb6+u25/alD/RasT9VJuNptDZy4pXFnGUizbbvbol0YmQckuce U6pZKPQBkcknIPhPZP6n/0VYCyWNhXcPjk7Dap6wPhvDdAywWApFprpCdlz3pNwEe7CQTsO d5Qz9SpeKFYWhOHVfU0yQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:E34cy2v31og=:Iv/3areGRSetnx0IuI0AFP 6k4fb5yZIhk77CKNjL7rlj9HNuUGhXJjL+ZaiHfgncYHCKD+g9Z4xB9sUqhVmLhBQXTdsmV41 yoR4Mcj3kckWInW8pxiNdD4aIZFYAOlpORvT6sa0/HwwAOtV9avhWP2TnR6HTYKxm5vNqgEZa TvNvAGXs7r90SLy2CO1leacaulo+82vMcGeHXwz1Q+wGdB9+XWgWWSWZZq85euotzUokN4r9H a3xzW3B/eOR5SicaZzl0rRZmlUVxIHF+6cbiEBkNlDQ+1mbet7jw4Pn8xY9oIJ64PefTugd02 ZKCZgq2e9JFszIIT8beRW0BtuNny5y+O8jq5KpV2F+PuAa+qhYrIXXUbEEj7MgAMVErVkXmDG +aPH57SJ6Zm4uoSXGzwHz9RW5tFa0w4PVcnZ84iFk70FcL+N83+dtX6C02M0AlAG/eO2Uhk3T nN3wgFGlDZ1JPmfuBzh/fhLwxIos6l2u8picGVI3GAzemWCgnlxzlMJ3RKvpIfbuNhBDg6oIB i77DHXovViR8dPMsnd1i24hPdmHx88nMnxNT/+PPJlbTgCXeQ859iRgHifgNncvTHr7CK9i33 LDEBOgZJM3O3a4pMLdt+dZBfgga2WH+06j7xREdeo7DdxPPACd9L0IC94e9nJa0c2+wwB5HG2 7yKOadBLhaaqfNy0NYM1zFAKXdd5Uie8PGGdX7SgKiFhZjm7CENTMf69bziuVJpwYM5WR6+QC FqBKHTTSBYRYeesz/qyZFeZAY026ifRF+POj0ph3IqRBrrh/p+ukVkR6LA9AJEik31tac/49 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.21 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:209577 Archived-At: Ted Zlatanov writes: Hi Ted, > I looked at migrating gnutls.el to use this new facility. I have some > questions (and maybe Lars and others can add more). > > * how will users see and configure the settings per class? Connection local variables are specified so far for on Lisp level. No (end-) user is provided yet. Let's take the example from the manual: --8<---------------cut here---------------start------------->8--- (connection-local-set-class-variables 'remote-bash '((shell-file-name . "/bin/bash") (shell-command-switch . "-c") (shell-interactive-switch . "-i") (shell-login-switch . "-l"))) (connection-local-set-class-variables 'remote-null-device '((null-device "/dev/null"))) (connection-local-set-classes "^/ssh:" 'remote-bash 'remote-null-device) --8<---------------cut here---------------end--------------->8--- Then there are two undocumented (in the manual) functions which tel you the settings: (connection-local-get-class-variables 'remote-bash) => ((shell-file-name . "/bin/bash") (shell-command-switch . "-c") (shell-interactive-switch . "-i") (shell-login-switch . "-l")) (connection-local-get-classes "^/ssh:") => (remote-bash remote-null-device) > * how will users select the class per server? The NSM may be useful > here, since it already does some per-connection checks and storage. Again, as of today on Lisp level, per `connection-local-set-classes'. > * how to migrate users from the current defcustoms in > (customize-group 'gnutls) to this new system? Do we support both for > some time? That I don't know. Maybe one adds a new defcustom group per server on-the-fly, and let the variables declare inside every such group. A post customization function shall move those variables into connection-local variables then. And maybe one could write code to support such approach for a general use case, not only for gnutls. > Thanks > Ted Best regards, Michael.