From c38b4a9beffe7304dcee724f701276766d80d59d Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Mon, 10 May 2021 21:32:42 -0400 Subject: [PATCH] Tweak documentation relating to 'erc-tls' * doc/misc/erc.texi (Connecting): Add a reference to the auth manual. * etc/NEWS: Remove the verbose, detailed example of client certificate specification and refer to the ERC manual instead. * lisp/erc/erc.el (erc-tls): Fix leftover path example in docstring. --- doc/misc/erc.texi | 3 +++ etc/NEWS | 34 ++++------------------------------ lisp/erc/erc.el | 4 ++-- 3 files changed, 9 insertions(+), 32 deletions(-) diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi index 45a753d43ea..18f0ce4eca5 100644 --- a/doc/misc/erc.texi +++ b/doc/misc/erc.texi @@ -588,6 +588,9 @@ line like the following to your authinfo file @example machine chat.freenode.net key /home/bandali/my-cert.key cert /home/bandali/my-cert.crt @end example + +See (info "(auth) Help for users") for more on the +@file{.authinfo}/@file{.netrc} backend of @code{auth-source}. @end defun @subheading Server diff --git a/etc/NEWS b/etc/NEWS index 4870ca8ceda..de3779cd730 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1804,36 +1804,10 @@ activity overview sidebar for joined IRC channels is now part of ERC. The 'erc-tls' function has been updated to allow specifying a TLS client certificate for authentication, as an alternative to NickServ password-based authentication. This is referred to as "CertFP" (short -for Certificate Fingerprint) by several IRC networks. - -To use a certificate with 'erc-tls', specify the ':client-certificate' -optional parameter, whose value should be as described in the -documentation of 'open-network-stream': if non-nil, it should either -be a list where the first element is the file name of the private key -corresponding to a client certificate and the second element is the -file name of the client certificate itself to use when connecting over -TLS, or t, which means that 'auth-source' will be queried for the -private key and the certificate. - -Examples of use: - - (erc-tls :server "chat.freenode.net" :port 6697 - :client-certificate - '("/home/bandali/my-cert.key" - "/home/bandali/my-cert.crt")) - - (erc-tls :server "chat.freenode.net" :port 6697 - :client-certificate - `(,(expand-file-name "~/cert-freenode.key") - ,(expand-file-name "~/cert-freenode.crt"))) - - (erc-tls :server "chat.freenode.net" :port 6697 - :client-certificate t) - -In the case of ':client-certificate t', you will need to add a line -like the following to your authinfo file (e.g. "~/.authinfo.gpg"): - - machine chat.freenode.net key /home/bandali/my-cert.key cert /home/bandali/my-cert.crt +for Certificate Fingerprint) by several IRC networks. See the Info +node "(erc) Connecting" in the ERC manual for more details and +examples on how to specify and use TLS client certificates with +'erc-tls'. ** Battery diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 6717ee37cc7..547056361a8 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -2278,8 +2278,8 @@ Example usage: (erc-tls :server \"chat.freenode.net\" :port 6697 :client-certificate - '(\"/data/bandali/my-cert.key\" - \"/data/bandali/my-cert.crt\"))" + '(\"/home/bandali/my-cert.key\" + \"/home/bandali/my-cert.crt\"))" (interactive (let ((erc-default-port erc-default-port-tls)) (erc-select-read-args))) (let ((erc-server-connect-function 'erc-open-tls-stream)) -- 2.39.2