aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorF. Jason Park2025-02-14 18:57:41 -0800
committerF. Jason Park2025-02-21 18:40:06 -0800
commit1f60f86af5edba45a7d59f45ca174f6c288dde3f (patch)
tree7f736bcfaf531e47043e813a4a239e13c9792a9b /doc
parent1270e6aec5ff4b6f420d132a2249bb94095a3f11 (diff)
downloademacs-1f60f86af5edba45a7d59f45ca174f6c288dde3f.tar.gz
emacs-1f60f86af5edba45a7d59f45ca174f6c288dde3f.zip
Use .pem extension for client certs in ERC docs
* doc/misc/erc.texi (Connecting): Change file-name extensions to .pem in all examples, and explain that the key and the cert can be combined into one file. (SASL): Use .pem extension for certs. * lisp/erc/erc.el (erc--warn-once-before-connect): Revise doc. (erc-tls): Use .pem extension for certs. (Bug#76278)
Diffstat (limited to 'doc')
-rw-r--r--doc/misc/erc.texi21
1 files changed, 14 insertions, 7 deletions
diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi
index 1c0afa3b300..c47747a5b1f 100644
--- a/doc/misc/erc.texi
+++ b/doc/misc/erc.texi
@@ -866,15 +866,15 @@ Examples of use:
866@example 866@example
867(erc-tls :server "irc.libera.chat" :port 6697 867(erc-tls :server "irc.libera.chat" :port 6697
868 :client-certificate 868 :client-certificate
869 '("/home/bandali/my-cert.key" 869 (list (expand-file-name "~/key.pem")
870 "/home/bandali/my-cert.crt")) 870 (expand-file-name "~/cert.pem")))
871@end example 871@end example
872 872
873@example 873@example
874(erc-tls :server "irc.libera.chat" :port 6697 874(erc-tls :server "irc.libera.chat" :port 6697
875 :client-certificate 875 :client-certificate
876 `(,(expand-file-name "~/cert-libera.key") 876 '("/home/bandali/libera.pem"
877 ,(expand-file-name "~/cert-libera.crt"))) 877 "/home/bandali/libera.pem")) ; same file
878@end example 878@end example
879 879
880@example 880@example
@@ -882,16 +882,23 @@ Examples of use:
882 :client-certificate t) 882 :client-certificate t)
883@end example 883@end example
884 884
885Make sure to use absolute file names for the key and the cert. The
886files themselves must be in @acronym{PEM}-encoded text format and can be
887concatenated into a single file.
888
885In the case of @code{:client-certificate t}, you will need to add a 889In the case of @code{:client-certificate t}, you will need to add a
886line like the following to your authinfo file 890line like the following to your authinfo file
887(for example, @file{~/.authinfo.gpg}): 891(for example, @file{~/.authinfo.gpg}):
888 892
889@example 893@example
890machine irc.libera.chat key /home/bandali/my-cert.key cert /home/bandali/my-cert.crt 894machine irc.libera.chat key /home/bandali/key.pem cert /home/bandali/cert.pem
891@end example 895@end example
892 896
893@xref{Help for users,,,auth, Emacs auth-source Library}, for more on the 897@xref{Help for users,,,auth, Emacs auth-source Library}, for more on the
894@file{.authinfo}/@file{.netrc} backend of @code{auth-source}. 898@file{.authinfo}/@file{.netrc} backend of @code{auth-source}.
899If you invoke @code{erc-tls} interactively and need ERC to query
900auth-source for a client cert, see the user option
901@code{network-stream-use-client-certificates}.
895For other uses of auth-source throughout ERC, @pxref{auth-source, 902For other uses of auth-source throughout ERC, @pxref{auth-source,
896ERC's auth-source integration}. 903ERC's auth-source integration}.
897@end defun 904@end defun
@@ -1244,7 +1251,7 @@ External
1244 1251
1245(erc-tls :server "irc.libera.chat" :port 6697 :nick "aph" 1252(erc-tls :server "irc.libera.chat" :port 6697 :nick "aph"
1246 :client-certificate 1253 :client-certificate
1247 '("/home/aph/my.key" "/home/aph/my.crt")) 1254 '("/home/aph/key.pem" "/home/aph/cert.pem"))
1248@end lisp 1255@end lisp
1249 1256
1250You decide to switch things up and try out the @samp{EXTERNAL} 1257You decide to switch things up and try out the @samp{EXTERNAL}
@@ -1258,7 +1265,7 @@ Multiple networks
1258@example 1265@example
1259# ~/.authinfo.gpg 1266# ~/.authinfo.gpg
1260 1267
1261machine irc.libera.chat key /home/aph/my.key cert /home/aph/my.crt 1268machine irc.libera.chat key /home/aph/key.pem cert /home/aph/cert.pem
1262machine Example.Net login alyssa password sEcReT 1269machine Example.Net login alyssa password sEcReT
1263machine Example.Net login aph-bot password sesame 1270machine Example.Net login aph-bot password sesame
1264@end example 1271@end example